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: 

Commit and Rollback

Former Member
0 Kudos

I write some code like this:

REPORT YTEST.

TABLES: YTABLE.

DATA WA LIKE YTABLE.

WA-F1 = 'L1'.

WA-F2 = 'D1'.

INSERT YTABLE FROM WA.

BREAK-POINT.

ROLLBACK WORK.

when the program go into the debug mode, we can see the line 'L1 D1' in the table 'YTABLE' through tcode SE16. Is it a auto commit in debug mode?

If the line is commit, why it was deleted after the statement 'rollback work'.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

The concept lies in the database LUW (Logical Unit of Work).

Actiualy a database table is updated in batch method say n.

It means when u upload n no of data then one auto-commit will be triggered and ur data will be updated permanently, before that u can see the data in the table but they will reside in some intermediate memory (e.g. re-log file in ORACLE). This memory is deletable.

When the cursor hit the ROLL-BACK statement this data is flashed .

However, when one screen change occurs one database LUW completes, so in case of data less than n above, if you insert and save, one SAP screen change occurs and auto-commit triggers eventhough no of data is less than n.

for more idea check

http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4bca79e11d1950f0000e82de14a/content.htm

the 'interin state ' here is something which I refered as intermediate storage/memory.

Regards,

Anirban

3 REPLIES 3

Former Member
0 Kudos

Hi,

The concept lies in the database LUW (Logical Unit of Work).

Actiualy a database table is updated in batch method say n.

It means when u upload n no of data then one auto-commit will be triggered and ur data will be updated permanently, before that u can see the data in the table but they will reside in some intermediate memory (e.g. re-log file in ORACLE). This memory is deletable.

When the cursor hit the ROLL-BACK statement this data is flashed .

However, when one screen change occurs one database LUW completes, so in case of data less than n above, if you insert and save, one SAP screen change occurs and auto-commit triggers eventhough no of data is less than n.

for more idea check

http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4bca79e11d1950f0000e82de14a/content.htm

the 'interin state ' here is something which I refered as intermediate storage/memory.

Regards,

Anirban

0 Kudos

It means when u upload n no of data then one auto-commit will be triggered and ur data will be updated permanently

Do you mean : If no of data is more than n, the 'roll back' statement will only flash the lines that has not been commit ?

0 Kudos

Hi,

Exactly so.

let's take in number.

Your database has a default setting of 10 data-row.

when you upload 11 data, auto-commit will betriggred after the 10th for data-1 to data-10 and data-11 has to wait to get auto-commit when the sap-screen will be changed.

The same thing will happen for all the data when u upload less than 10 data, say 9 data.

There is one default setting for the no of data to be uploaded to trigger auto commit. But DB-admin can change the number as per the requirment.

Regards,

Anirban