‎2007 Sep 14 12:44 PM
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.
‎2007 Sep 14 12:54 PM
‎2007 Sep 14 1:04 PM
‎2007 Sep 14 1:02 PM
Hi kokwei,
The same problem was faced by me once.
If time is not the major factor in your report.
try using wait command.
Eg : WAIT UP TO '2' SECONDS.
Or any seconds. Try doing it to the minimum time possible and use it.
In the function module also try using some value instead of X
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = '7'
IMPORTING
return = it_messages2.
Surely it will work. Let me know if it does not.
<b><REMOVED BY MODERATOR></b>
Gowri
Message was edited by:
Gowri Shankar
Message was edited by:
Alvaro Tejada Galindo
‎2007 Sep 14 2:14 PM
You could debug this message and see if it is being issued based on an enqueue wait for some object.
If so you could check this in your program before doing the commit and loop till it is available.
Andrew