07-13-2007 2:33 AM
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
07-13-2007 2: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
07-13-2007 2: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
07-13-2007 3:32 AM