‎2012 Jun 06 5:12 PM
Hello
1) Some times we use COMMIT WORK AND WAIT and some times we pass 'X' falg for WAIT param in BAPI_TRANSACTION_COMMIT, so the standars SAP How many micro seoconds / seconds will be passes for this WAIT command?
2) Instead can i sue COMMIT WORK and checking the system DB for update in question, if its successful, EXITting the block, Can i implement this alternative in performence perspective is it useful?
Thank you
‎2012 Jun 06 6:22 PM
‎2012 Jun 07 8:38 AM
1) There is no number of seconds for this WAIT. The work process waits until the V1 (most important) updates are completely finished and then returns. Please be aware that V2 updates might still be running. But normally they are not a big problem.
2) Yes, you can theoretically do that, but do not forget to put "WAIT UP to 1 seconds" after each select in the loop.
Using this method you will be wasting in average 500 milliseconds.
‎2012 Jun 26 3:28 PM
Adding to what Yuri said , wanted to add the pitfalls of COMMIT WORK without WAIT statement, COMMIT WORK without WAIT is basically asynchronous, the code below ur COMMIT WORK will always execute without waiting for the database updates to complete (say if u have 5 tables to update) the current program will not wait for table updates to complete, sometimes it might take a second at times it might take more than that...WAIT UPTO 1 SEC can minimize ur probabilitly of an slect not failing however it cannot be eliminated... I will prefer to use COMMIT WORK AND WAIT in case if u wanted the recently posted data thru BAPI /code for subsequent processing
‎2012 Jun 27 10:09 AM
Hi MSR,
WAIT addition is used for synchronous updating, that means the program will resume its execution till the update work finish, and it will continue after the database update. Otherwise it will be a asynchronous update (means the program wont wait for the database update).
When we call a COMMIT WORK the following actions are occurring in the system.
It Handles the SAP locks associated with the current program.
Trigger database commit and close the current database LUW and database cursors.
Trigger the TRANSACTION_FINISHED event
The system field sy-subrc will contain the following follows when we execute this statement.
some times we pass 'X' falg for WAIT param in BAPI_TRANSACTION_COMMIT, so the standars SAP How many micro seoconds.
Using this you will be average in 600 Microseconds
‎2012 Jun 27 12:37 PM
naveen kumar wrote:
some times we pass 'X' falg for WAIT param in BAPI_TRANSACTION_COMMIT, so the standars SAP How many micro seoconds.
Using this you will be average in 600 Microseconds
‎2012 Jun 27 12:57 PM
Better give the link to documentation like COMMIT WORK [AND WAIT]. than copy/paste part of the documentation
I always thought the answer was 42 and not 600
Regards,
Raymond
‎2015 Jan 15 7:07 PM
The SAP document seems not explaining "AND WAIT" clearly.
Regards,
Yuping
‎2015 Jan 16 8:09 AM