Question:
Hi all
In a program I am trying to change a ztable using modify but that ztable is only modifying after that program is executed.Actually I have certain chech condition which I use later in the program but since ztable is modified after the execution of program i a not able to validate certain condition.
However when I use commit work immediately after the modify then the table is changed during program execution .
Now the confusion is what are the other effects of this commit work ?
Please reply soon...
Answer:
SAP updates it's databases in LUW's or Logical Units Of Work. For example, the entry of a purchase order including the update of the various supplier records and materials is a LUW, the update of a production order is an LUW.
The idea behind this is that you break your updates up into distinct pieces that in themselves are complete. If everything is ok after you have written this work unit to the database, there are no errors and everything is hunky-dory you then commit that unit of work to the database.
Until you commit that piece of work to the database, or until the program or transaction ends, all of the database operations that have taken place can be undone using the 'ROLLBACK WORK' command. Once the work has been committed using the 'COMMIT WORK' statement, you cannot undo the LUW easily.
Updates are carried out by the Update task which essentially processes a sequential queue of database requests. Your program in itself does not write to the database but places the request in the queue. Depending on how stressed your update task is, updates can be instantaneous or can take minutes. You can however wait for the update task to process your request by using the 'COMMIT WORK AND WAIT'. statement.
The other side effect of the COMMIT WORK statement is that it resets the process timer preventing short dumps caused by program time outs.
_________________
Regards
R
Abap KC
SFMDR