Skip to Content

Data written into DB table without COMMIT WORK

Dear all,

I wrote a simple program to test the data update:

DATA: line TYPE ZDATA,

flag TYPE I VALUE 1.

line-data1 = '1'.

line-data2 = 'abc'.

INSERT INTO zdata VALUES line.

WHILE flag EQ 1.

flag = 1.

ENDWHILE.

COMMIT WORK.

After the program enters the endless loop, I checked the DB table content and found the data "1" and "abc" has already been written into the table. But here the COMMIT WORK statement has not been executed yet. Can anybody clarify this issue?

Thanks + Best Regards

Jerome

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 13, 2007 at 01:38 AM

    Yes, this is how the system works, the data is temporary written to the table during program execution, but say you put a breakpoint in the program at the endless loop, and then exit the program without it completing normal, the line in the table will be removed automatically, because a) the commit work has not been executed and/or b) the program did not end normally(because you ended while in debug) Make sense?

    REgards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.