Skip to Content
-1

CALL FUNCTION XXX UPDATE TASK

Sep 08, 2017 at 06:00 AM

115

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Horst Keller
Sep 08, 2017 at 06:29 AM
2

Why don't you read the documentation for CALL FUNCTION IN UPDATE TASK and COMMIT WORK instead of searching forums?

Show 3 Share
10 |10000 characters needed characters left characters exceeded

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

0

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.

0

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

0
Sandra Rossi Sep 08, 2017 at 06:37 AM
0

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.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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

0

Yes allowed. Consider the parameters being passed like "by value" as they are saved into a system table at call time

0
avatar image
Former Member Sep 12, 2017 at 02:52 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded