Application Development 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: 

implicit commit

Former Member
0 Kudos

hi all ,

Sub : Regarding DB Commit .

While in a DB updating program , when a new screen is displayed ,the old screen contents are implicitly updated or a DB commit is triggered ?

Whether this actual saves the Data in the DB,or as per my understanding (i am not sure ) wait for the program to end and a single SAP LUW is triggered that will save the Data in the DB and can't be rollback.

please clarify my doubts?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Tony,

One SAP LUW can have multiple DB LUWs. This is the case with most of the SAP standard transactions like VA01 etc where data is captured on multiple screens but committed to database only once at the end, on the last screen.

This is done using bundling techniques where start ( CALL FUNCTION...IN UPDATE TASK ) and end ( COMMIT WORK ) of the SAP LUW are clearly marked and all DB LUWs between these 2 points will hold data in the data objects and write to database at the end of the SAP LUW which coincides with the last DB LUW (last screen).

There can be more than one SAP LUWs in one program e.g. each call to a FM starts its own SAP LUW which ends when the control returns from the FM call and then continues with the original SAP LUW. So, at a time, there is only one SAP LUW running for a program.

Close the thread if the question was answered.

Thanks

Sanjeev

Edited by: Sanjeev Kumar on Jan 15, 2008 12:41 PM

7 REPLIES 7

Former Member
0 Kudos

Hi tony,

1. You are right.

2. It will save the data.

(Implicit commit will work like

as if we have given the commit statement explicitly)

3. Hence, whatever db statements were there,

they all will get committed, and we cannot rollback them.

regards,

amit m.

0 Kudos

hi Amit , thanks for clarifying .

so the commit happens in between the screen work process are send to the DB after the program is complete.right?

so till the program completes where will be the committed data stored?

0 Kudos

I'm not a DBA, but my understanding is this.

After the database is updated and before either an implicit or explicit COMMIT, the data is saved in the system rollback segment. If your program SELECTs the updated data, it will go to the rollback segment to retrieve the data, but other users will go to the database. After the COMMIT, everyone goes to the database.

Somebody please correct me if I'm wrong.

Rob

Former Member
0 Kudos

implicit commits

Former Member
0 Kudos

Hi Tony,

It is the work process in the application layer that handles any ABAP requests from the presentation layer. Work processes also handle any database access if required by the ABAP program they are handling via Database Interface from the database layer.

Every screen change is associated with an implicit database commit (DB LUW) as the work process that was handling the previous screen (dialog) needed to be freed up as per the SAP architecture to handle the next dialog request. So, the ABAP program that updates the database will hold the values in the data objects e.g. structures in the memory associated with the program on the work process before the implicit commit happens.

In case of explicit commits e.g. using UPDATE TASK, the data is written to table VBLOG until the commit happens. Once it happens, database is updated using data from this table and this happens using a separate type of work process known as update work process.

Once the database commit happens, data is saved in the database and cannot be rolled back. Database needs to be in a consistent stage at all times.

For more help, read [Update Techniques|http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm]

Hope this helps.

Thanks

Sanjeev

0 Kudos

thanks Sanjeev ,

now i got a clear cut picture of explicit update!

So while a implicit commit(DB LUW) is happen (with every screen change) the data is saved in the DB. so when will SAP LUW comes into the picture?

i have read(somewhere) that only one SAP LUW will occur for a Program. Will all the DB LUW( with each screen change) combines and form a single SAP LUW and saves all the data in the DB in a single process.

Former Member
0 Kudos

Hi Tony,

One SAP LUW can have multiple DB LUWs. This is the case with most of the SAP standard transactions like VA01 etc where data is captured on multiple screens but committed to database only once at the end, on the last screen.

This is done using bundling techniques where start ( CALL FUNCTION...IN UPDATE TASK ) and end ( COMMIT WORK ) of the SAP LUW are clearly marked and all DB LUWs between these 2 points will hold data in the data objects and write to database at the end of the SAP LUW which coincides with the last DB LUW (last screen).

There can be more than one SAP LUWs in one program e.g. each call to a FM starts its own SAP LUW which ends when the control returns from the FM call and then continues with the original SAP LUW. So, at a time, there is only one SAP LUW running for a program.

Close the thread if the question was answered.

Thanks

Sanjeev

Edited by: Sanjeev Kumar on Jan 15, 2008 12:41 PM