Idoc for Purchase Order

I want to create a purchase order with IDOCs and I don't know how to do it.

I need to know the message and function module used in the transaction WE20.


In we20 for the partner profile vendor in the outbound parameters maintain the:

Message type - PORDCR1

Process code - BAPI

You should use Message Determination in order to make the system creates an Idoc automatically when a Purchase Order is created/modificated in the system.

This is customized via IMG activities under next path: 

Materials management > Purchasing > Messages > Output control. 

Application for PO is EF. Output type is NEU and medium processing is EDI or ALE for Idocs. Oparation 1 (new) and 2 (change). You have to define schemas and partner roles as well.

Finally, Partner profiles have to be defined in WE20 transaction. ORDERS message have to be defined in (for ORDERS05 type for example) in output parameters.
In Mesage Control tab, define two lines:

PO creation --> Application EF, Message type NEU and Process code ME10

PO change --> Same but mark change message flag. You also could define ORDCHG using process code ME11 if you want to maintain different message for PO modifications.


Message type : ORDERS


Process code : ME10

Look at partner profile fo that vendor and see the message control and are you using correct message control:

Application : EF

Output type - Purchase order transaction ( NEU Standard one) and process code = ME10

Check it out in WE20 Transaction properly..

If not try to debug your function module : IDOC_OUTPUT_ORDERS.

Set your Break point at your code

Now come to ME22n Transaction and use PO number.

click on enter


Give the output type and print medium should be 6(EDI) or A( ALE)

Click on Further data and select->select send with periodically scheduled job and save it.

Now Come to SE38 and use RSNAST00 

Output Application : EF

Object key - PO Number ( 10 digit)

Output type - NEU( SAP Standard)

Transmission medium = 6(EDI) ,A(ALE)

Now it will stop at your code.

See Also
Trigger an IDoc whenever a Purchase Order is Created

Get help for your SAP MM problems
SAP MM Forums - Do you have a SAP MM Question?

SAP Material Management Books
SAP MM Books - Certification, Interview Questions and Configuration

SAP Materials Management Tips
SAP MM Configuration Tips and Materials Management Discussion Forum

Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff

All the site contents are Copyright © and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site is in no way affiliated with SAP AG. 
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk. 
 The content on this site may not be reproduced or redistributed without the express written permission of or the content authors.