‎2007 Oct 22 7:59 PM
Hi Experts,
Pls. clarify one of my simple doubt that, Wht is the functionality of UPDATE TASK, in following sttement?
<i><b>call function 'Z_FM_1' in update task</b></i>
I found SAP help as follow, but not understood??
<i>Flags the function module func for execution in the update task. It is not executed at once, but the data passed with EXPORTING or TABLES is placed in a database table and a subsequent COMMIT WORK then causes the function module to be executed by the update task. Update function modules must be flagged as such in the Function Builder
The return value is not set.</i>
thanq
‎2007 Oct 22 8:03 PM
Hi,
IN UPDATE TASK:
When FM is called with this extension then call to the FM is not made until COMMIT WORK is executed. This flags the function module for later execution when implicit or explicit COMMIT WORK is executed.
Regards,
Ferry Lianto
‎2007 Oct 22 8:03 PM
Hi,
IN UPDATE TASK:
When FM is called with this extension then call to the FM is not made until COMMIT WORK is executed. This flags the function module for later execution when implicit or explicit COMMIT WORK is executed.
Regards,
Ferry Lianto
‎2007 Oct 22 8:08 PM
OK, thanq.
1)If the data is not written to DB:
Then Wht is sy-subrc for COMMIT WORK
in this case, Is this z_FM_1 will be called? or not?
2) How it differs from defining a FM as UPDATE FM in its attributes, while creating a FM?
thanq
‎2007 Oct 22 8:16 PM
Sy-subrc will have 4 ,then comitt work will not happen.
check the my previous reply and it is similar to LUW.
Thanks
Seshu
‎2007 Oct 22 8:05 PM
Simple word is LUW..
Check the SAP Help :
http://help.sap.com/saphelp_nw04s/helpdata/en/41/7af4bfa79e11d1950f0000e82de14a/frameset.htm
SAP uses LUW (logical unit of work) concept, with this it basically does a sequence of steps and if all of them were successful it commits all the data to the database. During this process it keeps all the data in temporary memory. So lets say in your process you have 4 steps that complete the process, so you want to commit only when all the 4 steps are successful, in this case you will use CALL FM in UPDATE TASK for all the 4 of them, once the 4th FM is successful you use the statement COMMIT WORK to commit all the changes to the database.
Thanks
Seshu
‎2007 Oct 23 4:44 AM
thanq for simple, useful explanation.
I understood. If u provide one example(i mean, say, VA01, VL01 etc), it wuld b greate!
thanq.
‎2007 Oct 22 8:19 PM
Hi,
Any error during the update, the update work process executes a database rollback and the sy-subrc <> 0.
Regards,
Ferry Lianto
‎2007 Oct 22 8:28 PM
so, I guess, this z_fm_1 will not be called!! for un successful COMMIT WORK?
Am i correct?
And wht is the differenmce btwn a Upadate attribute assigning FM and this?
thanq
Message was edited by:
Srikhar
‎2007 Oct 22 8:31 PM
Hi,
It sounds like the FM was not called but it was (rollback process).
And what is the difference between an update attribute assigning FM and this?
You control the FM update process by setting the update module attribute.
- Update with immediate start
Set this option for high priority ("V1") functions that run in a shared (SAP LUW). These functions can be restarted by the update task in case of errors.
- Update w. imm. start, no restart
Set this option for high priority ("V1") functions that run in a shared (SAP LUW). These functions may not be restarted by the update task.
- Update with delayed start
Set this option for low priority ("V2") functions that run in their own update transactions. These functions can be restarted by the update task in case of errors.
Regards,
Ferry Lianto