Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

what is

Former Member
0 Likes
1,054

hi gurus,

what is commit &roll back.describe in simple words

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,033

Hi,

These keyworks are basically used for Database update terminology:

Commit: This saves data into database table.

rollback: This cancels saving into database table.

Jogdand M B

Hi,

These keyworks are basically used for Database update terminology:

Commit: This saves data into database table.

rollback: This cancels saving into database table.

Jogdand M B

7 REPLIES 7
Read only

Former Member
0 Likes
1,033

Hi,

It the transaction is completed it is said commited.If it is started again due to some reasons then it is said as rolledback

Read only

Former Member
0 Likes
1,033

hi,

commit : it will update the data base.

roll back : the data base will be moved back to the previous stable state.

Regards

Reshma

Read only

Former Member
0 Likes
1,034

Hi,

These keyworks are basically used for Database update terminology:

Commit: This saves data into database table.

rollback: This cancels saving into database table.

Jogdand M B

Read only

Former Member
0 Likes
1,033

Hi Babu,

Check this info.

COMMIT WORK.

Executes a database commit and thus closes a logical processing unit or Logical Unit of Work ( LUW ) (see also Transaction processing ). This means that

  • all database changes are made irrevocable and cannot be reversed with ROLLBACK WORK and

  • all database locks are released.

COMMIT WORK also

  • calls the subroutines specified by PERFORM ... ON COMMIT * executes asynchronously any update requests (see CALL FUNCTION ... IN UPDATE TASK ) specified in these subroutines or started just before,

  • processes the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK ,

  • cancels all existing locks (see SAP locking concept ) if no update requests exist,

  • closes all open database cursors (see OPEN CURSOR ) and

  • resets the time slice counter to 0.

COMMIT WORK belongs to the Open SQL command set.

Return code value

The SY-SUBRC is set to 0.

ROLLBACK WORK.

Closes a logical processing unit by reversing all database changes made since the last COMMIT .

You use this statement if you cannot be certain that all the database changes have been executed correctly.

The update routines are not performed.

ROLLBACK WORK belongs to the Open SQL command set.

Note

If the ROLLBACK statement occurs within a SELECT loop, the processing cannot continue because the database cursor is invalid. After the ROLLBACK statement, you should therefore ensure that all SELECT processing has been explicitly terminated.

Hope this resolves your query.

<b>Reward all the helpful answers.</b>

Regards

Read only

former_member196299
Active Contributor
0 Likes
1,033

hi ,

Below are few informations about COMMIT and ROLLBACK work :

commit work and roll bak work are open SQL statements use for database updates .

COMMIT WORK always concludes a database LUW and starts a new one . ROLLBACK work always

uncodes all changes back to start of the database LUW .

The ABAP statements COMMIT WORK and ROLL BACK work only work like the corresponding standard

SQL statements if the entire apoplication program is represented by a single implicit database LUW.

Reward if helpful !

Regards,

Ranjita

Read only

0 Likes
1,033

If u change some DataBase table

the changes will be really happend only after the COMMIT statemnt.

If there is a ROLLBACK statement occured before COMMIT statement itself cannot identify the changes.

<b>Award if uesful</b>

Sudheer

Read only

0 Likes
1,033

Hi,

U have to <b>award points for useful answers</b> and u have to mention it as <b>Solved</b> if ur question is solved. Dont forget.

Regards,

Sudheer