โ2008 Feb 08 6:28 AM
โ2008 Feb 08 6:32 AM
Hello Sudheer,
Simply we can say like...
Commit - it saves whatever changes you have done .
Rollback - its reverse the changes done.
ROLLBACK->
In a ROLLBACK, all the changes made by a transaction or a subtransaction on the database instance are reversed.
ยท Changes closed with a COMMIT can no longer be reversed with a ROLLBACK.
ยท As a result of a ROLLBACK, a new transaction is implicitly opened.
In normal database operation, the database system performs the required ROLLBACK actions independently. However, ROLLBACK can also be explicitly requested using appropriate SQL statements.
In a restart, the system checks which transactions were canceled or closed with a ROLLBACK. The actions are these transactions are undone.
COMMIT->
In a COMMIT, all the changes made by a transaction or a subtransaction on the database instance are recorded.
ยท Changes closed with a COMMIT can no longer be reversed with a ROLLBACK.
ยท As a result of a COMMIT, a new transaction is implicitly opened.
In normal database operation, the database system performs the required COMMIT actions independently. However, COMMIT can also be explicitly requested using appropriate SQL statements.
In a restart, the system checks which transactions were closed with a COMMIT. These actions are redone. Transactions not yet closed with a COMMIT are undone.
************************************
From the point of view of database programming, a database LUW is an inseparable sequence of database operations that ends with a database commit. The database LUW is either fully executed by the database system or not at all. Once a database LUW has been successfully executed, the database will be in a consistent state. If an error occurs within a database LUW, all of the database changes since the beginning of the database LUW are reversed. This leaves the database in the state it was in before the transaction started.
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.
Reward If Helpful.
Regards
--
Sasidhar Reddy Matli.
โ2008 Feb 08 6:31 AM
Hi,
Check this thread..
/thread/556398 [original link is broken]
โ2008 Feb 08 6:32 AM
Comit will update the process we did in the LUW (search in the forum for LUW)..
roll back clears the LUW..and will not update any thing.
โ2008 Feb 08 6:32 AM
Hello Sudheer,
Simply we can say like...
Commit - it saves whatever changes you have done .
Rollback - its reverse the changes done.
ROLLBACK->
In a ROLLBACK, all the changes made by a transaction or a subtransaction on the database instance are reversed.
ยท Changes closed with a COMMIT can no longer be reversed with a ROLLBACK.
ยท As a result of a ROLLBACK, a new transaction is implicitly opened.
In normal database operation, the database system performs the required ROLLBACK actions independently. However, ROLLBACK can also be explicitly requested using appropriate SQL statements.
In a restart, the system checks which transactions were canceled or closed with a ROLLBACK. The actions are these transactions are undone.
COMMIT->
In a COMMIT, all the changes made by a transaction or a subtransaction on the database instance are recorded.
ยท Changes closed with a COMMIT can no longer be reversed with a ROLLBACK.
ยท As a result of a COMMIT, a new transaction is implicitly opened.
In normal database operation, the database system performs the required COMMIT actions independently. However, COMMIT can also be explicitly requested using appropriate SQL statements.
In a restart, the system checks which transactions were closed with a COMMIT. These actions are redone. Transactions not yet closed with a COMMIT are undone.
************************************
From the point of view of database programming, a database LUW is an inseparable sequence of database operations that ends with a database commit. The database LUW is either fully executed by the database system or not at all. Once a database LUW has been successfully executed, the database will be in a consistent state. If an error occurs within a database LUW, all of the database changes since the beginning of the database LUW are reversed. This leaves the database in the state it was in before the transaction started.
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.
Reward If Helpful.
Regards
--
Sasidhar Reddy Matli.
โ2008 Feb 08 6:32 AM
Hi,
ROLLBACK->
In a ROLLBACK, all the changes made by a transaction or a subtransaction on the database instance are reversed.
ยท Changes closed with a COMMIT can no longer be reversed with a ROLLBACK.
ยท As a result of a ROLLBACK, a new transaction is implicitly opened.
In normal database operation, the database system performs the required ROLLBACK actions independently. However, ROLLBACK can also be explicitly requested using appropriate SQL statements.
In a restart, the system checks which transactions were canceled or closed with a ROLLBACK. The actions are these transactions are undone.
COMMIT->
In a COMMIT, all the changes made by a transaction or a subtransaction on the database instance are recorded.
ยท Changes closed with a COMMIT can no longer be reversed with a ROLLBACK.
ยท As a result of a COMMIT, a new transaction is implicitly opened.
In normal database operation, the database system performs the required COMMIT actions independently. However, COMMIT can also be explicitly requested using appropriate SQL statements.
In a restart, the system checks which transactions were closed with a COMMIT. These actions are redone. Transactions not yet closed with a COMMIT are undone.
************************************
From the point of view of database programming, a database LUW is an inseparable sequence of database operations that ends with a database commit. The database LUW is either fully executed by the database system or not at all. Once a database LUW has been successfully executed, the database will be in a consistent state. If an error occurs within a database LUW, all of the database changes since the beginning of the database LUW are reversed. This leaves the database in the state it was in before the transaction started.
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.
***********************************
Reward Points if found helpfull..
Cheers,
Chandra Sekhar.
โ2008 Feb 08 6:33 AM
Hi,
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.
(OR)
Don't forget to reward if useful