‎2008 Nov 21 7:13 AM
Hi Experts,
I want to know the basic concept of commit work & roll back.
Regards,
Rupali.
‎2008 Nov 23 4:42 AM
Try this link:
http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3b64358411d1829f0000e829fbfe/content.htm
Open SQL contains the statements
COMMIT WORK.
and
ROLLBACK WORK.
for confirming or undoing database updates. COMMIT WORK always concludes a database LUW and starts a new one. ROLLBACK WORK always undoes all changes back to the start of the database LUW.
These statements are part of the SAP transaction concept, and should only be used in this context.
As well as the COMMIT WORK and ROLLBACK WORK statements, there are other situations where data is implicitly written to the database or rolled back, and where database LUWs therefore begin and end.
Furthermore, the above statements also control SAP LUWs, which extend over several database LUWs.
The ABAP statements COMMIT WORK and ROLLBACK WORK only work like the corresponding Standard SQL statements if the entire application program is represented by a single implicit database LUW, that is, for example, in a single dialog step.
Regards
Neha
‎2008 Nov 21 7:18 AM
Use the search functionality of this forum or the wiki, and you will find the answer.
But :
a commit work take care of real storage of you db actions in the database.
a roll back does the opposite.
regards,
Hans
‎2008 Nov 21 7:19 AM
Hi Rupali,
This is regarding the changing the states of DB tables.
if you are trying to modify the DB table
if you modify any record the data base state changes.
if you use COMMIT WORK means the changes are update within the data base and new state is achieved.
for any reason if you think the changes are inappropriate and you want to come back to the previous state of the DB table then we use ROLLBACK key word.
for further info please go through LUW or COMMIT and ROLLBACK key word documentatin
regards
Ramchander Rao.k
‎2008 Nov 23 4:42 AM
Try this link:
http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3b64358411d1829f0000e829fbfe/content.htm
Open SQL contains the statements
COMMIT WORK.
and
ROLLBACK WORK.
for confirming or undoing database updates. COMMIT WORK always concludes a database LUW and starts a new one. ROLLBACK WORK always undoes all changes back to the start of the database LUW.
These statements are part of the SAP transaction concept, and should only be used in this context.
As well as the COMMIT WORK and ROLLBACK WORK statements, there are other situations where data is implicitly written to the database or rolled back, and where database LUWs therefore begin and end.
Furthermore, the above statements also control SAP LUWs, which extend over several database LUWs.
The ABAP statements COMMIT WORK and ROLLBACK WORK only work like the corresponding Standard SQL statements if the entire application program is represented by a single implicit database LUW, that is, for example, in a single dialog step.
Regards
Neha
‎2008 Nov 24 6:07 AM
‎2020 Nov 27 1:01 PM
Hi,
Differences between commit work and roll back are given below,
COMMIT WORK ROLLBACK COMMIT validates the modifications made by the current transaction. ROLLBACK erases the modifications made by the current transaction. After execution of COMMIT statement, the transaction cannot be ROLLBACK. Once ROLLBACK is executed database reaches its previous state, i.e. before the execution of the first statement of the transaction. COMMIT occurs when the transaction gets executed successfully. ROLLBACK occurs when the transaction is aborted in middle of the execution.Regards,
Tanuja.