Skip to Content
avatar image
Former Member

Function in Update Task not being called properly

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 16, 2017 at 06:21 AM

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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • Apr 16, 2017 at 01:50 PM

    Hi,

    You can try with

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

    Add comment
    10|10000 characters needed characters exceeded