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

Commit in program

Former Member
0 Likes
465

Hi All,

COMMIT is used in almost in all Standard programs but why we are not using COMMIT in our Z programs.

1 ACCEPTED SOLUTION
Read only

Sm1tje
Active Contributor
0 Likes
436

When you want to commit data to the database from your Z-program, you can and you should.

The Data in the standard programs, most of the times are transactions in which people are entering data like creating a business partner. When pressing SAVE, the data must be stored in the database. Function code SAVE is followed by a COMMIT.

Edited by: Micky Oestreich on May 10, 2008 1:43 PM

3 REPLIES 3
Read only

Sm1tje
Active Contributor
0 Likes
437

When you want to commit data to the database from your Z-program, you can and you should.

The Data in the standard programs, most of the times are transactions in which people are entering data like creating a business partner. When pressing SAVE, the data must be stored in the database. Function code SAVE is followed by a COMMIT.

Edited by: Micky Oestreich on May 10, 2008 1:43 PM

Read only

matt
Active Contributor
0 Likes
436

I do use commit in my Z programs.

But here's a few reasons why you don't see any.

Because you're not updating and tables.

Because you're only using CALL TRANSACTION to update the database, which has it's own commit.

Because you're relying on the implicit commit that happens when a program ends.

Do remember that it is a REALLY REALLY BAD IDEA to update standard SAP tables, so you shouldn't be encountering any programs that do this - with or without a commit.

matt

Read only

Former Member
0 Likes
436

hi check this..

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/commit.htm

you should some of the answers which are correct by awarding the points ...i hope you are not doing this..why dont you award points for one of the best answers and why dont you close the thread..

regards,

venkat