Skip to Content
avatar image
Former Member

Writeing the WAIT statment in output program

Hi Guru's.

I have come across the situation where we are triggering idoc once PGI (out bound delivery) is done and one of the segment in the Idoc carries the inbound number generated from SPED output type for the same outbound delivery. As the triggering point for the both out put types is PGI, VBFA is not updated at the time of Idoc got triggered.

For this can any suggestion how can I carry this inbound delivery number by the IDoc.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Dec 29, 2017 at 10:22 PM

    In this case it might be beneficial to switch from immediate output to processing by a background job. Then just process SPED output in one step and the other output in the next step.

    Even though output processing program is just a regular ABAP report and adding WAIT to it won't be any different per se, it's just not a great idea. If you're not careful you could end up with every user getting a pause just to look at a print preview.

    If the above suggestion is not feasible and you can't come up with any other non-ABAP options, it might make sense to include a pause in the place where the custom segment is filled. Check first if the document exists. If not then wait for a few secs and try again. In this way at least you'd minimize the effect to where it's actually relevant.

    Or maybe even just combine two outputs in one process with a custom program.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 01, 2018 at 11:38 PM

    I am not familiar with your document flow in this case but the other consideration you have to make with WAIT is that it results in an implicit database commit. Sounds like the background option that Jelena has suggested may be something to consider.


    Ryan Crosby

    Add comment
    10|10000 characters needed characters exceeded