‎2007 Jan 16 6:21 PM
I have a question for all of the guru's out there. I am updating multiple files in my Mobile Asset Process, but at some point I want to do a commit, but I only want to do the commit for one file not all of them. Is there a way to do that?
Thanks
Mike
‎2007 Jan 16 7:19 PM
OK - do the commit after one file and then a rollback at the end.
Rob
‎2007 Jan 16 6:24 PM
‎2007 Jan 16 6:27 PM
Hi,
Use COMMIT WORK statement after each file...Is that what you are looking for..
Thanks,
Naren
‎2007 Jan 16 7:15 PM
No, that isn't what we are looking for, just the ability to do a Commit Work for one file. We may have to do it after each file, but that is not the goal at this time.
Thanks
Mike
‎2007 Jan 16 7:16 PM
No, that isn't what we are looking for, just the ability to do a Commit Work for one file. We may have to do it after each file, but that is not the goal at this time.
Thanks
Mike
‎2007 Jan 16 7:19 PM
OK - do the commit after one file and then a rollback at the end.
Rob
‎2007 Jan 16 7:57 PM
Michael,
hope this will answer your question:
In database update processes, two things happen:
- the objects to be updated are locked
- database changes are written to the database rollback segment
Every work process or transaction runs in it's own logical unit of work (LUW).
At end of this LUW, an implicit COMMIT WORK occurs committing the rollback segment to the database. From now on, database changes become visible for all processes and users. Also all functions called with the addition IN UPDATE TASK are released for processing in an update process. An explicit COMMIT WORK at the end of active program will do the same and additionally start all FORMs called with the addition ON UPDATE.
In your case: A COMMIT WORK will commit <b>all</b> database requests as described above: There is no way to to 'selected' COMMIT.
If you process too many objects, either the database rollback segment or the lock table will overflow.
In terms of performance, it is better to wait for commit as long as possible because every commit means heavy processing for ABAP and database.
It is good practice to do a COMMIT after a certain number of objects. Some prefer 100; my personal experience says 1000 is fine.
ROLLBACK works the same way but it will clear the whole rollback segment making all changes undone. If you encounter an error after say 900 uncommited objects and a rollback is necessary, you have to start again right from the beginning.
Hope this helps you to find the best way.
Regards,
Clemens
‎2007 Jan 16 8:57 PM
It wasn't the answer I was looking for but it was very helpful.
Thanks
Mike