Creating a parser file for SAP IDoc structures
In addition to directly reading structures for SAP IDoc documents from an SAP system, it is also possible to create a so-called parser file in the SAP system, export it and then import it as a structure template. The generation of a parser file in SAP is done by calling transaction WE60. The following screenshot shows the input mask of the transaction.
Note: The same transaction WE60 can be used to generate an HTML description for an IDoc type. Furthermore, an XSD file for the XML IDoc type can be created via the menu item Documentation/XML schema. See section SAP IDocs.
(1) Specifies the name of the IDoc for which a parser file is to be created.
(2) Specifies that the control record of the IDoc should be included in the parser file.
(3) Specifies that the data record of the IDoc should be included in the parser file.
(4) Starts the generation of the parser file.
The screenshot shows the result after creating the parser file.
The following screenshot shows how the generated parser file can be saved to a file.
The following screenshot shows the dialogue that opens after starting the backup of the parser file, in which you can choose the format of the parser file to be saved. We store it unconverted for our purpose.