Skip to Content

IDOC_INBOUND_ASYNCHRONOUS waits for completion/Asynchronous

Hi,

We are creating an IDOC through a program using the FM 'IDOC_INBOUND_ASYNCHRONOUS'.

We are using this because we want the program to continue, without waiting for the IDOC to be created/processed.

But, the program is actually waiting till the IDOC is processed. When we take a closer look, the program is waiting in the statement 'wait until g_semaphore = 'X'.' inside the same standard FM.

Why is this happening? Because the FM is an Asynchronous FM, isn't it supposed to return control rightaway. Why is it waiting for the IDOC to finish processing?

We have also checked the configuration in WE20. The IDOC partner profile we use is set as 'Trigger by Background Program.'.

What are we missing here? Any input will be much appreciated.

Thanks.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Aug 24, 2017 at 11:56 AM

    The reason i identified is, it is happening because in Partner profile (T CODE: WE20 ) -->Basic type--> 'Inbound options',here we have a radio button option, it was selected as 'TRIGGER IMMEDIATELY' due to which even if i am calling the FM in parallel processing(using CALL FM - STARTING NEW TASK) it will make the processing in wait until one IDOC gets process.

    So, below are the steps to resolve the issue:

    1. I have changed the radio button to 'TRIGGER BY BACKGROUND PROGRAM' in Partner profile(TCODE: WE20).

    2. Call your FM in starting new task (using syntax: CALL FM 'Ztest_fm' STARTING NEW TASK))

    3. Along with above we need to schedule a standard program in Production system to process in background mode,

    Report: RBDAPP01 i on hourly basis in production system.

    Please note: After above steps the subsequent IDOCs will not wait for the completion of the prior idocs processing, it will execute very quickly.

    And all the IDOCs will get process successfully with status as 64.

    Remember, the Report: RBDAPP01 will actually process the IDOCs in Asynchronous mode and change the status to 53 after IDOC processing.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 01, 2017 at 12:02 PM

    The FM IDOC_INBOUND_ASYNCHRONOUS is RFC enabled. You could (or should) call it 'asynchronously' with option CALL FUNCTION - STARTING NEW TASK.

    NB: For performance, in a MASS transaction, you should use the {CALLING meth}|{PERFORMING subr} ON END OF TASK option to manage the number of tasks currently running (like in any correct parallel task management)

    Add comment
    10|10000 characters needed characters exceeded