Skip to Content

Writeing the WAIT statment in output program

Dec 20, 2017 at 09:35 AM


avatar image

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.

10 |10000 characters needed characters left characters exceeded

Have you thought about adding the output determination in your delivery, it could be coded to look for the PGI.


I don't get you

* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Jelena Perfiljeva
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.

10 |10000 characters needed characters left characters exceeded
Ryan Crosby Jan 01 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

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

Good point, I haven't even thought about the commit part.