Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

commit work and process to update DB

I am programming a sap batch, in this program, it first select out all data needed to output to a I/F file, and then update these data's status as 'Outputed'.

so. i want to do it with the next logic: out all data needed to be outputed from table

2. update status

Loop :all records needed to be updated

1) sap lock:

lock table

2) do update

3) Unlock table

End loop

3.output I/F file

4.commit work

is there any problem with above logic? i want to update DB only if updating and I/F output are executed corretly. and sap lock is necessory? commit work is the last step, any problem?

thanks for your answer.

Former Member
Not what you were looking for? View more on this topic or Ask a question