Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Repeat PO IDOC during GI

former_member396021
Discoverer
0 Kudos

Hello Gurus,

We have an Output type configured, which will trigger IDOC if a PO is created or is changed(only for STOs). Now, The requirement is to repeat same output during GI posting.

Following approach i tried and failed:

  • submitting application,PO number and output type to RSNAST00 in update task in exit EXIT_SAPLMBMB_001(also tried EXIT_SAPLIE01_007) . Reason of failure: Submit statement can not be used in update task.
  • making zFM coping RSNAST00 and calling it from same exits. Reason of failure: RSNAT00 calls a routine of RSNASTED which calls screen and it is not allowed in update mode.
  • Changing any dummy field in PO from same exit using BAPI_PI_CHANGE, But again this Bapi Requires external COMMIT statement, which we cant.
  • ReDistributing last generated IDOC of same PO. But this will not contain current and latest PO data.

Please guide me with some approach which i can take here.

Thanks in Advance.

1 ACCEPTED SOLUTION

former_member396021
Discoverer
0 Kudos

Hi All,

I accomplished requirement by using MASTER_IDOC _DISTRIBUTE FM only in exit EXIT_SAPLMBMB_001 which is called after posting GI.

I took last generated IDOC for particular Order and as there is change only in Schedule line segments, populated them again with latest data and then distributed them agian.

8 REPLIES 8

Jelena
Active Contributor
0 Kudos

What is the business reason? Why is this required?

This doesn't seem like a good design. You've already sent out the PO information from the PO output, so why do you have to do this again at GI?

Sandra_Rossi
Active Contributor
0 Kudos

PO: purchase order; GI: good issue; BAPI_PO_CHANGE (not PI)

JL23
Active Contributor
0 Kudos

How would a goods issue at all be connected to a purchase order? A receipt could be understood. A goods issue only in case of a stock transfer between two plants, but you said third party so it is not a stock transfer.

How do you connect a goods issue from neutral warehouse stock to the purchase order?

0 Kudos

Hi Jurgen,

I corrected by comment. Indeed it is only for case of STOs. Requirement is to generate updated PO's IDOC again during PGI after delivery is done from other side.

JL23
Active Contributor
0 Kudos

okay with your correction of the story you have a technical link between a goods issue and a PO, but honestly it is still not clear why you would send the PO again in that moment and to whom. Since the goods issue is made by the vendor who originally received the PO it would actually mean that he sends himself the same PO.

Its time to explain the process, there might be other ways to achieve it, there might be other Idocs that make eventually more sense.

0 Kudos

Hi,

This business scenario is related to short shipments. So when the GI is done for less qty than planned. In that scenario we need to send the proper issued quantity and open quantity in the PO.

JL23
Active Contributor
0 Kudos

Wouldn't this be a shipping notification from the outbound delivery. And why it is needed at all, the buyer can see immediately what goes one when he looks into the PO history tab.

former_member396021
Discoverer
0 Kudos

Hi All,

I accomplished requirement by using MASTER_IDOC _DISTRIBUTE FM only in exit EXIT_SAPLMBMB_001 which is called after posting GI.

I took last generated IDOC for particular Order and as there is change only in Schedule line segments, populated them again with latest data and then distributed them agian.