Wanting to integrate SAP IDocs, the Builder supports you with creating UML classes that are extracted from SAP IDoc meta data. It is not necessary to create these potentially large classes manually. The IDoc import rules are described in detail in Import - Export Mechanisms.
Once you exported IDoc documentation files from the SAP system, you can import the meta data into a UML model containing all classes and relations. The IDoc parser or HTML documentation files need to be generated by the SAP transaction WE60 beforehand.

The Importer offers the import of an IDoc parser file and an IDoc HTML documentation file. The IDoc parser file is required to be imported and contains the hierarchical structure of IDoc segments and their attribute definitions. Only importing this file, all attributes of the IDoc parser file will be mapped to strings.
Optionally, you can import an IDoc HTML documentation file, which contains the native SAP data types of the IDoc attributes. If this file is imported, all attributes of the IDoc parser file will not only be mapped to strings, but also to other Bridge base types like Integer, Float, etc. You can find the SAP - ABAP Types Mappings in the Reference Guide.

If you need to perform, for instance, calculations with IDoc data, also import the IDoc HTML documentation file together with the IDoc parser file. Then, you will not have to do data type conversions in the UML model yourself, as the IDoc attributes have already been mapped to the required data types.

To import their meta data, select Import > SAP IDoc File E2E Model Compiler menu.

To import the meta data of the IDoc parser file (text file), click ... and navigate to the directory containing the file.

Select the IDoc parser file.

You will be taken to the previous dialog, where you can select an IDoc HTML documentation file. Click the appropriate button ... and navigate to the HTML file.

In the IDoc HTML documentation file, the native SAP data types of all attributes are defined. Select the HTML file.

You will be taken to the previous dialog again.

Enter the Package Name, which will be used to store the generated classes in the UML model. The default name is derived from the IDoc parser file name. Choosing a unique package name will prevent conflicts with other imported IDoc files.

Choose the version of the IDoc record type. It depends on the SAP version where you have extracted the files.
Click Import.

Select the UML model, in which the data should be imported. The uml source path of the current Builder project will be suggested. Choose an XMI file and click OK.

After a few seconds, the chosen XMI file will be loaded. The imported types will be stored in the package Data / <Package Name>.

You need to save the UML model to persist the imported entities and packages.

Creating a Class Diagram for Imported Types

Create a class diagram to visualize all imported classes and associations.
Mark all IDoc classes in the containment tree, and drag and drop them to the class diagram.

Select all classes with CTRL + A and click the right mouse button to open the context menu. Select Related Elements > Display Paths. This will display all associations between the related classes.

To show the hierarchic dependencies of the classes, click the right mouse button on a free space in the diagram pane to open the context menu. Select Layout > Layout Hierarchic Style or Layout > Layout Orthogonal Style The new class layout will be drawn.

Now, the class diagram represents the class structure of the imported SAP IDoc Meta Data.