Purchase Order Components for EDIFACT

Mandatory components

For an EDIFACT purchase order (ORDERS), the following groups, segments, composites, and elements have been defined as mandatory by the standards committee.

This table describes the components that are activated automatically when you create a new form.

Segment Composite Element Description
BGM     Beginning of Message
DTM     Date/Time/Period
C507    
DTM01 Date/Time/Period Qualifier
UNS     Section Control
UNS01 Section Identification

Required components

This table lists the form components that are required (need to be activated) and are not mandatory for the standard.

Element Description Data Type Length Code Value/Format to Be Assigned
Beginning of Message (BGM Segment) (Already Activated)
BGM05 Document/Message Number String 35  
BGM06 Message Function, Coded String 3  
Date/Time/Period (DTM Segment)
DTM01 Date/Time/Period Qualifier String 3  
DTM02 Date/Time/Period String 35
  • 4 (Change)
  • 13 (Request)
Free Text (FTX Segment)
FTX01 Text Subject Qualifier String 3  
FTX06 Free Text String 70  
Reference (RFF Group)

Reference (RFF Segment)

RFF01 Reference Qualifier String 3  
RFF02 Reference Number String 35  
Name and Address (NAD Group)

Name and Address (NAD Segment)

NAD01 Party Qualifier String 3
  • AA (Party billed)
  • BY (Buyer)
  • ST (Ship to)
NAD10 Party Name String 35  
NAD16 Street and Number/P.O. Box String 35  
NAD17 Street and Number/P.O. Box String 35  
NAD19 City Name String 35  
NAD20 Country Sub-Entity Identification String 9  
NAD21 Postcode Identification String 9  
Payment Terms Basis (PAT Group)

Payment Terms Basis (PAT Segment)

PAT01 Payment Terms Type Qualifier String 3
  • 10 (Instant)
  • 18 (Previously Agreed Upon)
PAT02 Terms of Payment Identification String 17  
PAT05 Terms of Payment String 35  
Line Item (LIN Group)

Line Item (LIN Segment)

LIN01 Line Item Number Number 6  
Additional Product ID (PIA Segment in LIN Group)
PIA01 Product ID Function Qualifier String 3  
PIA02 Item Number String 35  
Item Description (IMD:2 Segment in LIN Group)
IMD:206 Item Description String 35  
Measurements (MEA:3 Segment in LIN Group)
MEA:301 Measurement Application Qualifier String 3  
MEA:305 Measure Unit Qualifier String 3  
MEA:306 Measurement Value String 18 Format = R0
Quantity (QTY:3 Segment in LIN Group)
QTY:301 Quantity Qualifier String 3  
QTY:302 Quantity Number 15 Format = N0
Date/Time/Period (DTM:13 Segment in LIN Group)
DTM:1301 Date/Time/Period Qualifier String 3  
DTM:1302 Date/Time/Period String 35  
Monetary Amount (MOA:5 Segment in LIN Group)
MOA:501 Monetary Amount Type Qualifier String 3  
MOA:502 Monetary Amount Number 18 Format = R2
Section Control (UNS Segment)
UNS01 Section Identification String 1  
Control Total (CNT Segment)
CNT01 Control Qualifier String 3  
CNT02 Control Value Number 18 Format = N0

Customization tasks

This table lists the customization tasks for EDIFACT described in this tutorial.

Form Component Description Customization Task
BGM05 element Document/Message Number You will set up the document name (which enables you to differentiate between messages in the document browsers in Sterling Gentran:Server®) in this element. In addition, the standard allows this element to have a maximum length of thirty-five characters, but you expect a string no longer than ten characters from your trading partner. You will change both the maximum length of the element and the display length of the field to ten. Also, you will change the field name to Order Number, which better describes the data in this field for your company.
BGM06 element Message Function, Coded The code from this element will be used to look up the description in a code list table, and the description will be printed in another field that you create. You will prevent the Message Function, Coded field from being displayed on the printout, because the more meaningful description will be printed instead.
DTM segment Date/Time/Period The standard allows this segment to be used up to thirty-five times in one purchase order, but you and your trading partner have decided to use this segment only once. Therefore, you will change the maximum use of this segment to one.
DTM01 element Date/Time/Period Qualifier This element is required in the purchase order, but is not meaningful for your purposes. You will prevent this field from being displayed on the printout.
DTM02 element Date/Time/Period The standard allows a maximum length of thirty-five characters, but you expect a string no longer than eight characters from your partner. You will change the maximum length of the element and the display length of the field to eight. Also, you will change the field name to Order Date, which better describes the data in this field for your company.
FTX segment Free Text The standard allows this segment to be used up to five times in one purchase order, but you and your trading partner have decided to use this segment only once. Therefore, you will change the maximum use of this segment to one.
FTX01 element Text Subject Qualifier This element is required in the purchase order, but is not meaningful for your purposes. Therefore, you will prevent this field from being displayed on the printout.
FTX06 element Free Text The standard allows a maximum length of seventy characters, but you expect a string no longer than sixty characters from your partner. You will change the maximum length of the element and the display length of the field to sixty. Also, the data in this element will be self-explanatory, so you will remove the label from this field.
RFF group Reference The standard allows this group to be used up to ten times in one purchase order, but you and your trading partner have decided to use this group only once. Therefore, you will change the maximum use of this group. Also, you will promote this group so that the fields in this group are placed on the same frame as the related header fields.
RFF01 element Reference Qualifier This element is required in the purchase order, but is not meaningful for your purposes. You will prevent this field from being displayed on the printout.
RFF02 element Reference Number The standard allows a maximum length of thirty-five characters, but you expect a string no longer than twelve characters from your partner. You will change the maximum length of the element and the display length of the field to twelve. Also, you will change the field name to Contract No., which better describes the data in this field for your company.
NAD01 element Party Qualifier The qualifier from this element will be used to look up the description in a code list table, and the description will be printed in another field that you create. You will prevent the Party Qualifier field from being displayed on the printout, because the more meaningful description will be printed instead.
NAD10 element Party Name The data in this element will be explained by the qualifier in the Party Qualifier element, so you will remove the label from this field.
NAD16 element Street and Number/P.O. Box The data in this element will be self-explanatory, so you will remove the label from this field.
NAD17 element Street and Number/P.O. Box The data in this element will be self-explanatory, so you will remove the label from this field.
NAD19 element City Name The standard allows a maximum length of thirty-five characters, but you expect a string no longer than thirty characters from your partner. You will change the maximum length of the element and the display length of the field to thirty. Also, the data in this element will be self-explanatory, so you will remove the field label.
NAD20 element Country Sub-Entity Identification The standard allows a maximum length of nine characters, but you expect a string no longer than two characters from your partner. You will change the maximum length of the element and the display length of the field to two. Also, the data in this element will be self-explanatory, so you will remove the field label.
NAD21 element Postcode Identification The data in this element will be self-explanatory, so you will remove the field label.
PAT group Payment Terms Basis The standard allows this group to be used up to ten times in one purchase order, but you and your trading partner have decided to use this group only once. Therefore, you will change the maximum use of this group. Also, you will promote this group so that the fields in this group are placed on the same frame as the related header fields.
PAT01 element Payment Terms Type Qualifier The qualifier from this element will be used to look up the description in a code list table, and the description will be printed in another field that you create. You will prevent the Payment Terms Type Qualifier field from being displayed on the printout, because the more meaningful description will be printed instead.
PAT02 element Terms of Payment Identification This element is required in the purchase order, but is not meaningful for your purposes. You will prevent this field from being displayed on the printout.
PAT05 element Terms of Payment The data in this element will be explained by the qualifier in the Terms of Payment Identification element, so you will remove the label from this field.
LIN group Line Item After you customize and format the fields in the LIN group, you will copy and paste the LIN group at the same level in the EDI file. The original LIN group will contain column headings for the line item detail, but you will prevent the column headings from being printed for all line items after the first. You will change the maximum use of the first LIN group to one so that the column headings are printed only once (for the first line item). You will change the maximum use of the second LIN group to 199,999. Up to two hundred thousand line items (one from the first LIN group and 199,999 from the second LIN group) can be printed on the printout (without printing the column headings for each line item).
LIN01 element Line Item Number The standard allows a maximum length of six characters, but you expect a string no longer than five characters from your partner. You will change the maximum length of the element and the display length of the field to five. Also, you will change the field name to Line, which briefly describes the data in this field.
PIA segment (in LIN group) Additional Product ID The standard allows this segment to be used up to twenty-five times for each line item, but you and your trading partner have decided to use this segment only once. Therefore, you will change the maximum use of this segment to one.
PIA01 element Product ID Function Qualifier You will change the field name to Code, which more briefly describes the data in this field for your company.
PIA02 element Item Number The standard allows a maximum length of thirty-five characters, but you expect a string no longer than six characters from your partner. You will change the maximum length of the element and the display length of the field to six. Also, you will change the field name to Prod ID, which briefly describes the data in this field.
IMD segment (in LIN group) Item Description The standard allows this segment to be used up to ten times for each line item, but you and your trading partner have decided to use this segment only once. Therefore, you will change the maximum use of this segment to one.
IMD06 element Item Description The data in this element will be self-explanatory, so you will remove the label from this field.
MEA segment (in LIN group) Measurements The standard allows this conditional segment to be used up to five times for each line item, but you and your trading partner want to use this segment only once. You will change the maximum use of this segment to one. Also, to make this segment mandatory, you will change the minimum use of this segment to one.
MEA01 element Measurement Application Qualifier This element is required in the purchase order, but is not meaningful for your purposes. You will prevent this field from being displayed on the printout.
MEA05 element Measure Unit Qualifier This element is required in the purchase order, but is not meaningful for your purposes. You will prevent this field from being displayed on the printout.
MEA06 element Measurement Value The standard allows a maximum length of eighteen digits, but you expect a number no longer than two digits from your partner. You will change the maximum length of the element and the display length of the field to two. You will change the field name to Unit, which better describes the data in this field for your company. Also, the standard defines the data in this element as being formatted with an explicit decimal point and up to nine decimal places. You will not use decimal places for the data in this field, so you will format both the EDI data and the printed data without decimal places.
QTY segment (in LIN group) Quantity The standard allows this segment to be used up to ten times for each line item, but you and your trading partner want to use this segment only once. You will change the maximum use of this segment to one. Also, to make this segment mandatory, you will change the minimum use of this segment to one.
QTY01 element Quantity Qualifier This element is required in the purchase order, but is not meaningful for your purposes. You will prevent this field from being displayed on the printout.
QTY02 element Quantity The standard allows a maximum length of fifteen digits, but you expect a number no longer than six digits from your partner. You will change the maximum length of the element and the display length of the field to six. You will change the field name to Qty, which briefly describes the data in this field. Also, the standard defines the data in this element as being formatted with an explicit decimal point and up to nine decimal places. You will not use decimal places for the data in this field, so you will format both the EDI data and the printed data with an implicit decimal point and no decimal places.
DTM segment (in LIN group) Date/Time/Period The standard allows the date/time/period to be used up to thirty-five times for each line item. You need two separate DTM segments: the required shipment date, and the last delivery date (in that order). You will promote this segment to cause another iteration of this segment to occur for each line item, and then change the maximum use to one because you need to use this segment only once per line item. Also, you know what types of dates you will receive (and in what order), so you will use the key field function to print the required shipment date in one DTM segment and the last delivery date in the other DTM segment.
DTM01 element Date/Time/Period Qualifier This element is required in the purchase order, but is not meaningful for your purposes. You will prevent this field from being displayed on the printout.
DTM02 element Date/Time/Period The standard allows a maximum length of thirty-five characters, but you expect a string no longer than eight characters from your partner. You will change the maximum length of the element and the display length of the field to eight. Also, you will change the field name to Requested (or Ship No for the DTM02 element in the second iteration of the DTM segment), which briefly describes the data in this field.
MOA segment (in LIN group) Monetary Amount The standard allows this segment to be used up to five times for each line item, but you and your trading partner have decided to use this segment only once. You will change the maximum use of this segment to one.
MOA01 element Monetary Amount Type Qualifier This element is required in the purchase order, but is not meaningful for your purposes. You will prevent this field from being displayed on the printout.
MOA02 element Monetary Amount The standard allows a maximum length of eighteen digits, but you expect a number no longer than eight digits from your partner. You will change the maximum length of the element and the display length of the field to eight. You will change the field name to Price, which better describes the data in this field for your company. Also, the standard defines the data in this element as being formatted with an explicit decimal point and up to nine decimal places. You need only two decimal places for the data in this field, so you will format the EDI data and the printed data with two decimal places.
UNS01 element Section Identification This element is required in the purchase order, but is not meaningful for your purposes. You will prevent this field from being displayed on the printout.
CNT segment Control Total Segment You want this segment to print the total number of line items at the end of the printout. However, if the form were generated now, the total would be printed at the beginning of the printout (because the fields in the CNT segment would be displayed on the same frame as the fields in the BGM segment). You will change the arrangement of the form, while maintaining the integrity of the EDI data, so the total is printed at the end of the purchase order.
CNT01 element Control Qualifier This element is required in the purchase order, but is not meaningful for your purposes. You will prevent this field from being displayed on the printout.
CNT02 element Control Value The standard allows a maximum length of eighteen digits, but you expect a number no longer than six digits from your partner. You will change the maximum length of the element and the display length of the field to six. You will change the field name to Number of Line Items, which better describes the data in this field for your company. Also, the standard defines the data in this element as being formatted with an explicit decimal point and up to nine decimal places. You will not use decimal places for the data in this field, so you will format both the EDI data and the printed data with an implicit decimal point and no decimal places.