Creating a Document Type for Your IDoc
Regardless of the way in which you pass the IDoc to the flow, you need to create a document describing the content and structure of the IDoc. There are three ways to create this document:
The first two options produce the most complete document because they are based on the IDoc's metadata defined at the SAP system or a DTD, which describes all possible fields in the IDoc. Use one of the first two options whenever possible.
Use the third option only if a DTD is not available for the IDoc with which you are working. Because this option derives a document from a sample document, there is no assurance that the document will include all possible fields. Fields that are not used in the sample document will not appear in the document type.