IDoc structures
Read on this page how IDocs in Raw format and XML IDocs are structured.
IDoc in Raw format
An IDoc Raw document is an XML document that contains metadata about the message, structure information, and SAP IDoc in raw format as text. The XML document is structured as follows:
<X4SAP TID="<!--Transaction ID-->">
<X4IDoc type="<!--IDoc type-->" description="">
<X4Mandatory>
<X4RecipientPort><!--Recipient port--></X4RecipientPort>
<X4RecipientPartnerType><!--Partner type abbreviation--></X4RecipientPartnerType>
<X4RecipientPartnerNumber><!--Partner number--></X4RecipientPartnerNumber>
<X4RecipientPartnerFunction />
<X4RecipientAdress />
<X4RecipientLogicalAdress />
<X4SenderPort><!--Sender port--></X4SenderPort>
<X4SenderPartnerType><!--Partner type abbreviation--></X4SenderPartnerType>
<X4SenderPartnerNumber><!--Partner number--></X4SenderPartnerNumber>
<X4SenderPartnerFunction />
<X4SenderAddress />
<X4SenderLogicalAddress />
<MessageType> <MSGTYPE><!--Message type--></MSGTYPE> </MessageType>
</X4Mandatory>
<X4Structure>
<Tablename SEGMENT="1"> <!--Segment 1--> </Tablename>
</X4Structure>
<RAW> <!--Raw data of the IDoc message (text)--> </RAW>
</X4IDoc>
</X4SAP>
IDoc in XML format
An IDoc XML document contains one IDoc message that has been completely converted to XML elements. In addition, the XML document contains metadata about the message and structure information. Within the element <IDOC>
all tables are successively deposited.
An IDoc in XML format is structured as follows:
<X4SAP TID="<!--Transaction ID-->">
<X4IDoc type="<!--IDoc type-->" description="">
<X4Mandatory>
<X4RecipientPort><!--Recipient port--></X4RecipientPort>
<X4RecipientPartnerType><!--Partner type abbreviation--></X4RecipientPartnerType>
<X4RecipientPartnerNumber><!--Partner number--></X4RecipientPartnerNumber>
<X4RecipientPartnerFunction />
<X4RecipientAdress />
<X4RecipientLogicalAdress />
<X4SenderPort><!--Sender port--></X4SenderPort>
<X4SenderPartnerType><!--Partner type abbreviation--></X4SenderPartnerType>
<X4SenderPartnerNumber><!--Partner number--></X4SenderPartnerNumber>
<X4SenderPartnerFunction />
<X4SenderAddress />
<X4SenderLogicalAddress />
<MessageType>
<MSGTYPE><!--Message type--></MSGTYPE>
</MessageType>
</X4Mandatory>
<X4Structure>
<Tablename SEGMENT="1">
<!--Segment 1-->
</Tablename >
</X4Structure>
<RAW>
<!--Raw data of the IDoc message (text)-->
</RAW>
</X4IDoc>
</X4SAP>