Skip to Content
0
Sep 14, 2007 at 11:44 AM

commit work and wait OR 'BAPI_TRANSACTION_COMMIT' doesnt work..

174 Views

Dear Expert,

After a BAPI called, i do commit work and wait, or

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

For both, it return "XXXX is still processed by user XXXX".

This shows that the second loop of job is starting even the first job havent completed the update. i have tried commit work and wait, or bapi_transaction_commit with wait = 'X' .

It works in Debug mode, when I stop break on the line BAPI_TRANSACTION_COMMIT.

Is there any other way to do this ?

These are my codes:

CALL FUNCTION 'BAPI_ENTRYSHEET_CREATE'

EXPORTING

entrysheetheader = l_entrysheetheader

IMPORTING

entrysheet = v_entrysheet

TABLES

return = it_messages .

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'

IMPORTING

return = it_messages2.