Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

COMMIT WORK in a separate LUW from my program so that it does not effect the main program?

Former Member
0 Kudos
1,149

How can I do COMMIT WORK in a separate LUW from my program so that it does not effect the main program? Actually I am updating the BI system with my sales data using the Function /DMF/BI_SALES_DATA. In the main program we are fetching the sales data using the FETCH CURSOR. Now my requirement is to set the the commit after each fetch.

4 REPLIES 4

Mohamed_Mukhtar
Active Contributor
0 Kudos
293

Hi,

Call the FM /DMF/BI_SALES_DATA (if it is RFC) in background task.

ABAP Documentation - Call Function in background task

Hope it helps.

Thanks

0 Kudos
293

Dont use Background task as it is now obsolete.

raymond_giuseppi
Active Contributor
0 Kudos
293

Consider call of the FM (or a RFC enabled wrapper) STARTING NEW TASK. Also in the OPEN CURSOR statement use the WITH HOLD option (to protect it against implicit database commit).

Former Member
0 Kudos
293

I am not sure but why you need a Commit after fetching?

Second you can call your FM in a new task and there perform the Commit(new task will not affect your main program)