Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

IDOC related to PO

Hi Experts,

My requirement is to find out 6months old purchase orders with uncompleted status and create and idoc for them and distribute them.

Please let me know what Function modules to use for creating PO idocs and distributing the idocs.

Regards,

Sangeeta.

replied

Hello,

You can follow the below method since you would like to Distribute the PO IDocs programatically.

1. Create a Z-Report in which you'll be querying on Purchasing Tables EKKO, EKPO etc to fetch all the PO Numbers which are 6 Months Old.

2. Secondly, For each Purchase Order (In a LOOP), create an IDoc. For this, you need to have the IDoc Structure ready first. Meaning, you can use the Existing IDoc Type or Create your own Custom IDoc Type in WE30.

Also, you may want to define a Custom Message Type in WE81 or Use the Existing ORDERS message Type.

3. Create the Respective Segments (PO Header , PO Item , PO Texts etc) in the Transaction in WE31.

4. Once the IDoc is Populated for each PO which is not Complete, then Call the FM "MASTER_IDOC_DISTRIBUTE" to generate IDocs.

5. Make sure to populate the IDoc Control Record Information for each PO IDoc that you generate before calling the above FM.

6. Your Selection Screen may contain the PO Number Range & Date Range.

7. Your Report program can be run Online or in Background Job.

8. In this way, you can easily Send your 6 months old PO IDocs with less effort by developing a Standalone Program.

Hope it was helpful.

Thanks and Regards,

Venkat Phani Prasad Konduri

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question