Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Function in Update Task not being called properly

Former Member
0 Kudos

Hi guys,

I've created a 'Z' function module to call it 'IN UPDATE TASK' inside an EXIT (EXIT_SAPLLMDE_006). This EXIT is right after a MB_CREATE_GOODS_MOVEMENT, that performed a 101 moviment.

In my function, I'm performing another MB_CREATE_GOODS_MOVEMENT but to moviment 311. When system reach my 'Z' function, the moviment before (101) is not commit yet, than my moviment stops because there is an ENQUEUE of purchase table, but the table is being used in moviment 101 (means to me that my function is not being called in update task).

My 'Z' function is 'Update Module' and 'Star Immed.'.

Thanks!!

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos

As you probably understood, you can't make it work as you planned, you have to find another workaround. One way is to schedule a subsequent job to do this additional movement, for instance using workflow or tRFC (CALL FUNCTION IN BACKGROUND TASK). You'll have to handle exceptions (lock for instance) asynchronously (mail by workflow for instance, or SM58).

4 REPLIES 4

Sandra_Rossi
Active Contributor
0 Kudos

As you probably understood, you can't make it work as you planned, you have to find another workaround. One way is to schedule a subsequent job to do this additional movement, for instance using workflow or tRFC (CALL FUNCTION IN BACKGROUND TASK). You'll have to handle exceptions (lock for instance) asynchronously (mail by workflow for instance, or SM58).

0 Kudos

Hello mrs. Rossi.

Worked as you said. I've changed my function to 'Remote-Enabled Module' and called it 'IN BACKGROUND TASK AS SEPARATE UNIT' and worked. The process before my function finished and in SM58 I was able to check my function working fine. I also put a 'infinite loop' and could see the function running.

I appreciate your help.

bala_sikkal
Explorer
0 Kudos

Hi,

You can try with

My 'Z' function is 'Update Module' and 'Star Delayed.' Otherwise Put wait up to 2 seconds in the FM.

0 Kudos

I tried both...did not work.