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

Background Tasks and Commit Work and Wait

Former Member
0 Likes
2,344

I've got a custom FM which is called in background task, which is refusing to honour the commit work and wait commands. The FM intermittently fails if the DB updates are slow and the FM tries to read from the DB tables before the data has been committed

I'm calling function BAPI_SHIPMENT_CREATE, followed by BAPI_TRANSACTION_COMMIT with the WAIT parameter set. I've even tried an explicit commit work and wait.

Might this have something to do with the fact that the background task is executed asynchronously?

5 REPLIES 5
Read only

Former Member
0 Likes
1,434

Hi Chris,

Try calling your FM in UPDATE TASK.

Regards,

ravi

Read only

Former Member
0 Likes
1,434

Hi Chris,

I guess if you give the Commit work command instead of Commit work and wait between the two FMs, your problem is solved.

Ravi.

Read only

0 Likes
1,434

I should have mentioned that the FM is called as part of a user dialog, so I don't think UPDATE TASK is viable.

The problem is that COMMIT WORK AND WAIT is behaving like COMMIT WORK

Read only

Former Member
0 Likes
1,434

anyone ?

Read only

0 Likes
1,434

anyone?