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:
1.select out all data needed to be outputed from table
2. update status
Loop :all records needed to be updated
1) sap lock:
2) do update
3) Unlock table
3.output I/F file
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.