Quantcast
Channel: SCN: Message List - Data Warehousing
Viewing all articles
Browse latest Browse all 3366

Avoid COMMIT WORK in Function Module 'RSDRD_SEL_DELETION'

$
0
0

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.  

Viewing all articles
Browse latest Browse all 3366

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>