2007 Jun 06 4:07 AM
Hi,
after calling a FM WITH 'IN BACKGROUND TASK',
what's the difference between 'commit work' and 'commit work and wait' ?
Thanks!
2007 Jun 06 4:32 AM
HI Edgar,
The function of the COMMIT WORK statement is extended when you use it in conjunction with Object Services. Before COMMIT WORK closes the SAP LUW and triggers an update, it calls internal methods of the Persistence Service. These methods bundle the changes made to managed objects of the Persistence Service and pass them to a special update function module using CALL FUNCTION ... IN UPDATE TASK. Thus the Persistence Service works with traditional update methods. The update module is usually registered after any update modules that have already been registered. The update is then triggered and the update task executes the update module in the order in which they were registered.
After the system executes the COMMIT WORK statement, it sets the attributes of each persistent object in the ABAP program to initial. (That is, it calls the IF_OS_STATE~INVALIDATE method).
regards
Sathish
Hi,
after calling a FM WITH 'IN BACKGROUND TASK',
what's the difference between 'commit work' and 'commit work and wait' ?
Thanks!
2007 Jun 06 4:09 AM
Hi,
COMMIT WORK AND WAIT will wait for all the updates to complete..
Thanks,
Naren
2007 Jun 06 4:32 AM
HI Edgar,
The function of the COMMIT WORK statement is extended when you use it in conjunction with Object Services. Before COMMIT WORK closes the SAP LUW and triggers an update, it calls internal methods of the Persistence Service. These methods bundle the changes made to managed objects of the Persistence Service and pass them to a special update function module using CALL FUNCTION ... IN UPDATE TASK. Thus the Persistence Service works with traditional update methods. The update module is usually registered after any update modules that have already been registered. The update is then triggered and the update task executes the update module in the order in which they were registered.
After the system executes the COMMIT WORK statement, it sets the attributes of each persistent object in the ABAP program to initial. (That is, it calls the IF_OS_STATE~INVALIDATE method).
regards
Sathish
2007 Jun 06 4:34 AM
Hi,
to add one more pt,, in simple
Asynchronous Update The program does not wait for the work process to finish the update. Commit Work.
Synchronous Update The program wait for the work process to finish the update. Commit Work and Wait.
regards
Sathish
2007 Jun 06 4:47 AM
Thanks for all reply!
CALL FUNCTION 'ZRFC_TS_SCM_BOMRTNG'
in background task
................................
if sy-subrc eq 0.
commit work and wait.
endif.
the above is synchronous ;
-
CALL FUNCTION 'ZRFC_TS_SCM_BOMRTNG'
in background task
................................
if sy-subrc eq 0.
commit work.
endif.
the above is asynchronous ?
2007 Jun 06 4:47 AM
hi
good
To apply the changes made to the runtime objects of persistent classes to the actual persistent objects in the database, execute the COMMIT WORK statement. (Alternatively, use COMMIT WORK AND WAIT or SET UPDATE TASK LOCAL). Unless you are executing an object-oriented transaction from within the Transaction Service, you must include the COMMIT WORK statement explicitly in the program. Otherwise, it is encapsulated in the Transaction Service. (If you explicitly include the COMMIT WORK statement as described here, the t op-level transaction runs in compatibility mode).
http://help.sap.com/saphelp_nw04/helpdata/en/d2/7849b8bec911d4b2e80050dadfb92b/content.htm
thanks
mrutyun^
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |