Skip to Content

CALL TRANSACTION LT31 in an update task

Dear experts,

I am implementing a function exit, EXIT_SAPLL03T_002 which is executed in an update task at the end of a TO confirmation. Here, I will need to trigger the TO printing upon confirmation, by calling the standard transaction LT31 (via BDC codes).

However, due to the nature of "in update task", I cannot use SUBMIT or CALL TRANSACTION statements. :(

I have tried to wrap the BDC codes in an FM and call this FM "in background task", but the TO will NOT be printed at the end. :(

How can I resolve this issue?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 03, 2017 at 03:39 PM

    Make sure that the BDC works when you run it manually after the Transfer Order (TO) confirmation (the final database commit must have finished).

    If it doesn't work when it's triggered via a CALL FUNCTION ... IN BACKGROUND TASK (tRFC), then it's probably due to the fact that the tRFC has started before the final database commit of the TO confirmation.

    To make sure, you should do a test with a big wait at the beginning of the tRFC (10 seconds, to make sure the database commit is done).

    If it still doesn't work, then your code is buggy as it's obvious it doesn't correspond exactly to the initial BDC (because you had initially made sure it was okay).

    But if it works, then you're sure the solution is the wait, and you should replace the wait with a loop doing a SELECT on a table until the TO confirmation is done (I'm not expert in this subject, you'll find to find the SELECT by yourself).

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 02, 2017 at 10:58 AM
    -1

    I have tried to wrap the BDC codes in an FM and call this FM "in background task", but the TO will NOT be printed at the end. :(

    The statement above applies to TO with the requirement type, "L".

    For TOs with the requirement type, "P", this works perfectly fine.

    Any ideas on how I can resolve this?

    Add comment
    10|10000 characters needed characters exceeded