07-05-2007 4:01 PM
Hi all,
Please help me in this issue,
When we using Update ABAP statement what is the need of using again a commit statement if we dont use commit statement.
Thanks & Regards
Reddy
07-05-2007 4:26 PM
Hello Reddy,
COMMIT is used when you code directly in ABAP and make changes in the database and want to reflect in the database immediately.
When you perform COMMIT , all the LUW s work will be reflected to the database,
COMMIT WORK is the key word to make the database change. And whereas ROLLBACK is the opposite to commit work,
This statement will apply any outstanding database updates and wait until they have actually been put on the database before proceeding to the next statement.
An ordinary commit work will initiate the process to update the databases in a separate task and will press on in your abap.
COMMIT WORK: ( Asynchronous)
Your program does not wait for any acknowledgement. it just start executing the next statment after COMMIT WORK.
<u><b>For your kind reference please check the below link</b></u>
<b>http://help.sap.com/saphelp_erp2005vp/helpdata/en/fc/eb3b64358411d1829f0000e
829fbfe/content.htm</b>
<b>
Reward points for all useful answers....
Cheers !
Moqeeth.</b>
07-05-2007 4:07 PM
it will update the database immediatly if we use commit statement
it will use generally for synchronous update case
07-05-2007 4:13 PM
Hi Reddy,
When we update a database, in the real time usage of the data, the updates should reflect the table immediately. Otherwise wrong data would be shown to persons who access it at the same time.
In order to ensure correct data availability at all times we do a commit immediately after the update.
Take the case of a airport using a database. lets say u've checked out the availability of tickets and it shows 2 tickets available. now if you have purchased a ticket. the database table is updated with the remaining one and if the commit is not performed, another person also sees 2 tickets and if he tries to book the two tickets that would be a mess. so u probably would have understood the importance of commiting after update.
<b>Reward points if I answered your question properly</b>
Kiran
07-05-2007 4:18 PM
A commit is related to the SAP LUW (Logical Unit of Work) concept. Do a commit whenever an LUW is complete. For most custom table updates, this is the end of the program and since a commit is done when the program completes, there is no need to code it.
Rob
07-05-2007 4:26 PM
Hello Reddy,
COMMIT is used when you code directly in ABAP and make changes in the database and want to reflect in the database immediately.
When you perform COMMIT , all the LUW s work will be reflected to the database,
COMMIT WORK is the key word to make the database change. And whereas ROLLBACK is the opposite to commit work,
This statement will apply any outstanding database updates and wait until they have actually been put on the database before proceeding to the next statement.
An ordinary commit work will initiate the process to update the databases in a separate task and will press on in your abap.
COMMIT WORK: ( Asynchronous)
Your program does not wait for any acknowledgement. it just start executing the next statment after COMMIT WORK.
<u><b>For your kind reference please check the below link</b></u>
<b>http://help.sap.com/saphelp_erp2005vp/helpdata/en/fc/eb3b64358411d1829f0000e
829fbfe/content.htm</b>
<b>
Reward points for all useful answers....
Cheers !
Moqeeth.</b>