04-18-2014 11:32 AM
I have the below code, where the commit work is after the loop.
LOOP AT itab INTO str.
UPDATE dtab FROM str.
ENDLOOP.
COMMIT WORK.
As per my understanding an update work process will be created after the COMMIT WORK. Is this can be viewed in SM50 ?
In case the work process created is not processed and ON HOLD. If i try to update the dtab table again, is there is a possibility I can get a lock error since the last work process in not processed.
Regards,
Thanga
04-18-2014 12:08 PM
I dont think Commit Work is going to do that, its job is to complete one LUW and updates database with pending data in the temporary memory, in the above case the location of commit work is correct.
04-18-2014 12:11 PM
04-18-2014 7:45 PM
Hi Thanga,
If you are not using update task ( CALL FUNCTION IN UPDATE TASK ) / background tasks(CALL FUNCTION IN BACKGROUND TASK ), then commit work statement is optional. System will do implicit commit after the program ends. However to be on the safer side, you should explicitly code it.
https://help.sap.com/abapdocu_70/en/ABAPCOMMIT.htm
Please note that - If you are directly updating the table in your program without using update task, no entry exists in SM13- Monitor Update task.
Regards,
DPM
04-19-2014 10:21 AM
Hello Thanga Prakash,
Here your directly updating a table. Please make sure that you are not updating a standard table, as this may result into unimaginable consequences.
If you wish to update a custom table you need not use COMMIT WOEK. No job will be triggered. The UPDATE processing will happen in a LUW.
Regards,
Dnyanesh.