What is an IDoc? IDoc stands for Intermediate Document in SAP. IDocs are categorized according to their message types, and each message type contains the basic IDoc type. The IDoc we use in our scenario is ORDERS05, which is a basic IDoc type and is categorized under the ORDERS message type. Using the Microsoft BizTalk Adapter v2.0 for mySAP Business Suite, we can generate the ORDERS05 schema as shown in the steps in the previous section.
Usually, the ORDERS05 schema is around 1,700 KB in size and complicated in structure. The first element of the schema is EDI_DC40, which contains the control record information representing the IDoc header message. Some of the important fields in this element are IDOCTYP, MESTYP, SNDPOR, SNDPRT, SNDPRN, RCVPOR, RCVPRT, and RCVPRN. It is important to have appropriate values in these fields for the SAP system to identify a valid inbound IDoc. IDOCTYP is the type of IDoc, MESTYP is a message type, SNDPOR is a send port, SNDPRT is a send port type, and SNDPRN is a send port number. Similarly, RCVPOR is a receive port, RCVPRT is a receive port type, and RCVPRN is a receive port number.
Another element in this schema is E1EDK14. This part is important because it defines the organizational data such as the Sales Organization, Distribution Channel, and Division in the SAP system for the IDoc. It has a qualifier to identify each type of E1EDK14 message. For example, the QUAL field in the schema (which represents the qualifier) is 008 for Sales Organization, 007 for Distribution Channel, and 006 for Division. Each qualifier has an Org Id to represent which type of Sales Organization it is, which type of Distribution Channel, and so on.
E1EDK03 is the next segment, which defines dates. It contains a qualifier (IDDAT) and a value (DATUM) to hold the date type and the date. Examples of a qualifier (IDDAT) are 012 for Document Date, 022 for Purchase Order Date, and 028 for Due Date.
E1EDKA1 is a segment in this message type where it defines the partner information. It contains the address of the business partner. The individual roles are defined in the PARVW field and the partner number is defined in the PARTN field. It has other fields such as NAME1, NAME2, STRAS, STRAS2, ORT01, REGIO, PSTLZ, TELF1, and TITLE. All of these fields define Firstname, Lastname, Street1, Street2, City, State, Zip, and so on. In this segment, PARVW identifies the business partner role type, such as AG to be sold-to-party, RE to be bill-to-party, LF to be vendor, and WE to be ship-to-party.
Figure 5 shows a sample ORDERS05 schema.
Figure 5 A sample of the ORDERS05 IDoc schema in the BizTalk Schema Editor
.gif)
The E1EDP01 segment contains information about the line item. POSEX is the first field in this segment and signifies the line item number of a line item. The ACTION field defines which action to take before the dispatch, or which action to carry out by the receiver. MENGE and MENEE describe the quantity and unit of measure, while BMNG2 and PMENE describe the quantity in price unit and price unit of measure, respectively. The other two segments, E1EDP19 and E1EDP20, are subsegments of E1EDP01. E1EDP19 includes the material description. It has a qualifier (QUAL) to pass different types of material descriptions. For example, 001 is a material number used by a customer and 002 is a material number used by a vendor. E1EDP20 includes scheduled quantity and dates for an item. It has fields like WMENG, AMENG, EDATU, EZEIT, and ACTION. For example, WMENG is a scheduled quantity, EDATU is a scheduled date, and EZEIT is a scheduled time.