Entering content frameBackground documentation Design Guidelines and Formatting Rules for Creating New Segments Locate the document in its SAP Library structure

Design guidelines

Before you create a new segment, check whether your requirements can be met by an existing segment. Use the EDI standards, for example, ANSI X12 (North America) or EDIFACT (worldwide). You should use ISO codes for coded field values so that they are based on a standard which is generally applicable. ISO codes exist, for example, for countries (ISO 3166), currencies (ISO 4217) and units of measure (ISO 31).

Business data is contained in segment fields. Data which belongs together from a logical point of view should be combined to form a segment. Segments which belong together from a logical point of view should be combined to form a segment group. For example, the materials in a purchase order could be contained in one segment. Together with other segments (information about the partner, taxes and terms of payment), this segment can then form part of the "Items" segment group.

You can use segments which you have already created in other IDoc types. Check whether a segment can be used for different messages. An example of a universal segment is one which contains general address data.

Position the required fields as close as possible to the start of the segment. Two segments which always occur together should be combined in one segment.

Consider whether the use of qualifiers can be avoided. Qualifiers indicate how a segment is used and are difficult to document and interpret. Qualifiers are not usually defined on a cross-application basis, with the result that these segments are not universal.

The maximum length of all the fields in a segment is 1000 characters. The larger the segment, the better the ratio of useful data to administration data. A certain amount of space should be reserved in segments to allow for additional fields in the future.

Use the documentation options provided by the segment editor. You can store an additional data element for each field to provide information about how the field is used in the application. You can also document a segment to explain the attributes and structure of the entire segment. When documenting segments, remember that the segment fields are used in both inbound and outbound processing.

Note the following formatting rules which specifically apply here.

Formatting rules

The following formatting rules usually apply to data in segment fields:

German use: The number -2,097,152.64 is represented as 2097152.64-.

American use: The number -2,097,152.64 is represented as 2097152.64-.

German use: The number -23.4 is represented as -2.34E+01.

American use: The number -23.4 is represented as -2.34E+01.

The following rules may be useful if your IDocs are to be converted to other EDI standards (EDIFACT, ANSI X12):

Leaving content frame