Application Development and Automation 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: 
Read only

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

Former Member
0 Likes
2,465

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
Read only

Mohamed_Mukhtar
Active Contributor
0 Likes
1,609

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

Read only

0 Likes
1,609

Dont use Background task as it is now obsolete.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,609

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).

Read only

Former Member
0 Likes
1,609

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)