Definition
The IDoc ORDERS02 is used to create stock transport orders. Since its structure is fairly complicated, it is not listed here in detail. For detailed information, follow the menu path Tools
® Administration ® Administration ® Process technology ® IDoc ® IDoc basis ® Documentation ® IDoc type.Structure
This IDoc contains only one transport order. It must start with segment E1EDK01 followed by other header segments and item segments. Each item must start with segment E1EDP01 followed by other item segments. Except for starting segments E1EDK01 for the header and E1EDP01 for the items, the order of the other segments is irrelevant. If one segment type occurs more than once, only the last one is used.
Function module IDOC_INPUT_REC_SHIPMENTS can create a stock transport order, change the dates and quantities in an order, delete an entire order or individual items, and release individual items in an order. But it can not add an item to an existing order. Also, it does not distinguish between deletion and locking of the items. The following will list the important (not mandatory) fields required to build up an order IDoc for the function module to process successfully.
Segments
E1EDK01 Document header general data
Field name |
Value |
Description |
ACTION |
000 001 |
Insert |
BSART |
NB |
Standard purchase order |
BELNR |
Document number |

BSART: When it equals ‘UB’, the plant field in segment ‘E1EDK14’ must be filled with QUALF = ‘004’. When it equals ‘NB’, the vendor number in segment ‘E1EDKA1’ must be filled.
BELNR: This field is filled when the order document is to be changed or deleted. An external number can be used as a reference number stored in E1EDKA1-IHREZ. However, if the document needs to be created in the same ID as the external number, this field can be filled with that number under the condition that the number lies within the external number range configured in R/3.
E1EDK14 Header organization data
Field name |
Value |
Description |
QUALF |
004 |
Plant in charge |
ORGID |
Value determined by the qualifier |

Each item in an order can have a separate ordering plant. The values in the header segment are used as the default value for every item. If an item has its own plant, it is used only for that item. If the plant is not given in the header segment, it must be given separately for every item.
E1EDK03 Document header Date segment
Field name |
Value |
Description |
IDDAT |
001 |
Delivery date |
DATUM |
Value determined by IDDAT |

Purchase order date is the date when the order is created. The delivery date indicates the date when the goods are delivered to the destination plant. These two dates are mandatory. Shipping date is the date when the goods are shipped out of the plant. Both delivery date and shipping date are used as defaults for items. The difference between them is used as the planned delivery time for the items. If a shipping date is not provided by the IDoc, the planned delivery time will be read from the customization.
E1EDKA1 IDOC: Header partner information
Field name |
Value |
Description |
PARVW |
AG |
Sold-to party |
IHREZ |
Your reference | |
PARTN |
Partner number |

IHREZ: This field can be used to store the external order number. If E1EDK01-BELNR is filled while creating an order, information from IHREZ will be used as the requisition note number for the items. A relationship is thus established between the external order number and the internal order number.
PARTN: With order type ‘NB’, this segment must provide the vendor number in the field PARTN. The vendor number must exist in the system. With order type ‘UB’, you can use the plant number in the field PARTN.
E1EDP01 IDOC: Item general data
Field name |
Value |
Description |
POSEX |
Item number | |
ACTION |
001 |
Item added |
PSTYP |
0 |
Normal (NB) |
MENGE |
Quantity | |
MENEE |
Unit of measure | |
PMENE |
Price unit of measure | |
VPREI |
Price (net) | |
PEINH |
Price unit |

POSEX: The external system should provide this number when multiple items are created in one order document. R/3 can create the item numbers if they are not provided, but this will make it difficult for the external system to trace the items.
ACTION: If the header segment indicates a creation of an order document, this field should be ‘001’.
PSTYP: If the field is empty, it will take the content from E1EDK01-BSART.
E1EDP03 Item date segment
Field name |
Value |
Description |
IDDAT |
001 |
Delivery date |
DATUM |
Date determined by IDDAT |

The date provided by this segment overwrites the default date set by the header segments. It only controls the item it refers to. If the header segments do not define the dates, you need to provide the dates using this segment type for every item.
E1EDP19 Item object identification
Field name |
Value |
Description |
QUALF |
002 |
Material number used by vendor |
IDTNR |
Material ID |
E1EDPA1 Item partner information
Field name |
Value |
Description |
PARVW |
WE |
Ship-to party |
PARTN |
Partner number |