Defining Segments

This section involves a scenario in which you have to create a new segment. If you have to create a new segment definition, change an existing segment using the segment editor.


You have authorization to create development objects and transport requests.



       1.      Choose SAP menu ® Tools ® IDoc Interface/ALE ® Development ® IDoc ® Generate ALE Interface ® Segments (WE31). Select Utilities ® Requests (Organizer) to create a request.

       2.      Specify a segment type , and choose .

       3.      Specify a description of the segment and enter the field names and data elements. Decide whether your field is to store data which is coded according to the ISO standard.

The field lengths (in bytes) and any fixed values are derived from the data elements using the domains (with field lengths as export lengths). The documentation for the data element is also copied and displayed by the documentation tools.

Do not change the export length. Data is sent to and from the external systems as character fields with this length. However, internally (in the IDoc), the data is stored as a field of the same type as the selected data element (for example as an integer) with the corresponding length. Different lengths can lead to a loss of data (unnecessary bytes are cut off).

       4.      Choose Goto ® Documentation and describe the segment type. Save the active version of your application documentation and return to the segment editor.

If you use the segment later in an IDoc type and display this type using the documentation tools, the description you have entered here will be displayed.

       5.      Save the segment definition by selecting . Enter the segment in a transport request.

You should assign all your development objects (segments, IDoc type, function group, and so on) for IDoc types to the same package, so that the transport properties are identical.

       6.      Exit the screen.

The segment definition you have created appears with the version number 000 in the segment editor. It is also included in the transport request you created.


You have now created a new segment type with one segment definition. Although not released, you can still test and work with the segment type. You should only release the segment after you have successfully tested the processing.

You should define two segments in the example - E1HEAD (header) and E1ITEM (item). These two segments already exist in the system. They are only used as examples and should not be used in live systems.For example, the segment E1HEAD starts with the following fields:


Data element


BELNR  (document number)



VKORG (sales org.)



VTWEG (distrib. channel)



SPART  (division)