‎2017 Sep 08 7:00 AM
Hello Experts,
Good Day!
I'm working on a user exit where a couple of existing custom FM is implemented as below, each FM updates different field from table LT_TAB_UPDATE.
CALL FUNCTION XX1 in UPDATE TASK
TABLES = LT_TAB_UPDATE
CALL FUNCTION XX2 in UPDATE TASK
TABLES = LT_TAB_UPDATE
Now, i have a new requirement to update a new field and planning to implement a new FM, i don't want to touch the existing FM's.
CALL FUNCTION XX3 in UPDATE TASK
TABLES = LT_TAB_UPDATE
I cant find anything in the forum if it's allowed to have multiple update task in one LUW but base on debugging it seems that multiple update task doesn't work as expected. Can anyone confirm if this is allowed or not?
Thanks,
Dimmak
‎2017 Sep 08 7:29 AM
Why don't you read the documentation for CALL FUNCTION IN UPDATE TASK and COMMIT WORK instead of searching forums?
‎2017 Sep 08 7:29 AM
Why don't you read the documentation for CALL FUNCTION IN UPDATE TASK and COMMIT WORK instead of searching forums?
‎2017 Sep 08 7:57 AM
Hello Horst,
Thanks for that, to be honest, I've done reading that already and the way i understand it is that it should be allowed however during my testing the fields are not getting updated that is why i wanted some confirmation.
Thanks,
Dimmak
‎2017 Sep 08 8:11 AM
Yep, at COMMIT WORK the processing of all update function modules registered with IN UPDATE TASK is triggered. If it not works for you, something else is wrong.
‎2017 Sep 08 8:27 AM
Hello,
Still, here is the 6th sentence :
"If the statement is executed during the update task, the addition IN UPDATE TASK is ignored."
Sounds clear to me.
Bertrand
‎2017 Sep 08 7:37 AM
The update task (if any) occurs at the end of the SAP LUW. There's only one. It's triggered by COMMIT WORK (only if there's at least one CALL FUNCTION IN UPDATE TASK since the beginning of the current SAP LUW). A new SAP LUW is started at the beginning of an internal session (SUBMIT, transaction, etc.) and after every COMMIT WORK or ROLLBACK WORK.
I don't fully understand your question, please give more details about your scenario.
‎2017 Sep 08 8:09 AM
Hello Sandra,
Thanks for your comments, my issue is related to the scenario below. Three FMs executed in UPDATE TASK which are called inside a user exit, updating different fields using the same table as parameter, for some reason the fields are not getting updated so I'm wondering if this is allowed.
CALL FM1 IN UPDATE TASK ( this update field flight date)
TABLE = LT_FLIGHT
CALL FM2 IN UPDATE TASK ( this update field flight time )
TABLE = LT_FLIGHT
CALL FM3 IN UPDATE TASK ( this update field flight day)
TABLE = LT_FLIGHT
Thanks,
Dimmak
‎2017 Sep 08 11:54 AM
Yes allowed. Consider the parameters being passed like "by value" as they are saved into a system table at call time
‎2017 Sep 12 3:52 PM
Hi,
You can call any number of FMs in UPDATE TASK in a single SAP LUW, once the COMMIT WORK statement is executed, all registered FMs will execute in update work process. Now if your field is not getting updated then there should be something wrong in your FM. Please use SM13 t-code to check if your update FM went to any error. Also you can use UPDATE DEBUGGING to debug your update FM.