on 01-27-2015 3:54 PM
Hi guys,
i have the follwing problem:
I do a selective deletion on a Standard- DSO by using the function module 'RSDRD_SEL_DELETION'.
But, i want to be able to do a ROLLBACK WORK after a successfull run of this function module.
But the Problem is, in case of succefull deletion, the function module set a COMMIT WORK by FM 'RSDU_DB_COMMIT.
The COMMIT is set only for condition 'executes a database commit exept if the program runs in update task'
FUNCTION rsdu_db_commit .
*"----------------------------------------------------------------------
*" executes a database commit exept if the program runs in update task
*"----------------------------------------------------------------------
DATA:
l_flg_update_task LIKE sy-subrc.
CALL FUNCTION 'TH_IN_UPDATE_TASK'
IMPORTING
in_update_task = l_flg_update_task.
IF l_flg_update_task = 0.
EXEC SQL.
COMMIT WORK
ENDEXEC.
ENDIF.
ENDFUNCTION.
But i want to avoid this COMMIT here.
Reason:
I have to do the selective Deletion in DSO1 and DSO2. But BOTH must run succesfull !!!
If selc. deletion for DSO1 run correct, but the second one DSO2 failed, then i have to retrieve the sel. deletion for DSO1.
But it is not possible, because for the DSO1 a COMMIT is executed.
That means, if sel. del for DSO2 failed, then ROLLBACK WORK for all.
How can i achieve this?
CALL FUNCTION 'RSDRD_SEL_DELETION'
EXPORTING
i_datatarget = 'DSO_NAME'
i_thx_sel = lt_thx_sel
* I_DEL_ACTIV = RS_C_TRUE
* I_DEL_UPDATE = RS_C_FALSE
* I_DEL_CHANGE = RS_C_FALSE
i_authority_check = rs_c_false
* i_mode = rsdrd_c_mode
* I_REQDELMOD = '2'
* I_THRESHOLD = '0.1'
* I_PARALLEL_DEGREE = 1
* I_NO_LOGGING = RS_C_FALSE
i_no_commit = abap_true
i_no_enqueue = rs_c_true
* I_SHOW_REPORT = RS_C_FALSE
* I_TRANSACTIONAL_ODS = RS_C_FALSE
* I_WORK_ON_PARTITIONS = RS_C_FALSE
* I_REBUILD_BIA = RS_C_FALSE
* I_WRITE_APPLICATION_LOG = RS_C_FALSE
* I_ARCHIVED = RS_C_FALSE
IMPORTING
e_cnt = lv_cnt
CHANGING
c_t_msg = lt_msg
EXCEPTIONS
x_message = 1
inherited_error = 2
invalid_type = 3
OTHERS = 4.
IF sy-subrc <> 0.
* Implement suitable error handling here
ROLLBACK WORK.
ENDIF.
Hi,
Although you are able to write a custom selective deletion program yourself, I don't advise you to go into this direction. Moreover, there are better ways to delete data from DSOs.
I think of a standard data flow with a Transformation with deletion logic. Use 0RECORDMODE = 'D' in conjunction with the key fields to delete data from the DSO. This will be a much more robust mechanism in my opinion.
Best regards,
Sander
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.