Skip to Content
0

Function in Update Task not being called properly

Apr 16, 2017 at 06:03 AM

69

avatar image

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!!

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

2 Answers

Best Answer
Sandra Rossi Apr 16, 2017 at 06:21 AM
0

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).

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

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.

0
BALACHANDRAN DURAI Apr 16, 2017 at 01:50 PM
0

Hi,

You can try with

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

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

I tried both...did not work.

0