EDIFACT Tutorial From GXS
EDIFACT Tutorial From GXS
EDIFACT Tutorial From GXS
Learn About Key e-Commerce Trends and Technologies at Your Own Pace
Welcome!....................................................................................................................................... 3 How To Use This Tutorial. .............................................................................................................. 3 Tutorial Objectives. ........................................................................................................................ 3 Part 1: Why use EDI Standards?. ................................................................................................... 4 Part 2: What is EDIFACT?. .............................................................................................................. 4 Part 3: Message Definition. ........................................................................................................... 6 Part 4: Message Structure: Segment Tables................................................................................. 6 Part 5: Message Structure: Segment Groups. ............................................................................... 8 Part 6: Segments. .......................................................................................................................... 9 Part 7: Segment Terminators and Delimiters. ..............................................................................10 Part 8: What is Mapping?. ............................................................................................................10 Part 9: Data Elements: Simple and Composite........................................................................... 11 Part 10: Composite Data Elements: Qualifier and Value.............................................................13 Part 11: Message Structure and Electronic Enveloping. ...............................................................14 Part 12: Envelope Architecture.....................................................................................................14 Part 13: Electronic Enveloping. .....................................................................................................15 Part 14: The Message Envelope...................................................................................................15 Part 15: The Functional Group Envelope. .....................................................................................17 Part 16: The Interchange Envelope..............................................................................................17 Part 17: The CONTRL Message.....................................................................................................18 EDIFACT Wrap-up. .........................................................................................................................19 EDIFACT Glossary. .........................................................................................................................19 EDIFACT Self-Test I: After Completion of Part 5. ..........................................................................21 EDIFACT Self-Test II: After Completion of Part 10....................................................................... 22 EDIFACT Self-Test III: After Completion of Part 17...................................................................... 23
Welcome!
This tutorial is an overview of the EDIFACT Standard format. The topics covered in this tutorial are: Objectives of this tutorial and how to use it EDIFACT 101some basic information about EDIFACT Standards development Messagesstructure, segments, types, loops, etc. Segmentsstructure, interpretations, conditions, etc. Data Elementswhat they are and how to use them Message Structure and Envelopingpackaging it all Functional Acknowledgementswho needs them? Terms marked in red are defined in the EDIFACT Glossary.
Tutorial Objectives
After completing this tutorial, you should be able to discuss: What are EDIFACT and EDIFACT Standards How and why the EDIFACT Standard was developed What is the basic structure of the EDIFACT format How the EDIFACT documents are read What are Functional Acknowledgements and why are they used How the EDIFACT Standard may be used in providing electronic commerce solutions
Commission for Europe). It provides: an international EDI standard a set of syntax rules data elements, segments and codes messages As shown in the following diagram, EDIFACT is the product of the evolution in bringing the Proprietary Standards of the US and Europe together to form a single international EDI standard.
Proprietary (U.S.)
TDCC
ANSI X.12 EDIFACT GTDI Industry Specific and National Versions UN/EDIFACT International Standards
Proprietary (Europe)
In order to bring about the evolution of the EDIFACT standard, the UN has created UN/ECE to coordinate this effort. The organizational structure of the UN/ECE is made up of the following board members:
United Nations
General Assembly R A P P O R T E U R S
Australia/New Zealand EDIFACT Board Eastern Europe EDIFACT Board Pan American EDIFACT Board Western Europe EDIFACT Board
UN/ECE
Committee on Trade
WP.4
GE.1
The organizational structure of the regional boards are all structured in a similar fashion. Here is the organizational structure of the Pan American Board:
Rapporteur/Vice Rapporteur
Chair/Vice Chair
Steering Committee
Secretariat (D.I.S.A.)
Here is an example of a segment table for the Extended Payment Order (PAYEXT):
Segment tables specify if a segment must appear in a message. This is done using the Requirements Designator field. Each segment in the table is designated as either Mandatory (M) or Conditional (C). Mandatory means that at least one occurrence of the segment must appear in the message. Conditional means a segment may be used, if needed, but it is not required. Segment tables also specify how many times a particular segment may repeat. This is called the Repetition field. Here are the requirements designators and repetition as displayed in the table for the Extended Payment Order (PAYEXT) message:
Segment groups may be nested. This means that a segment group is fully contained within another segment group. Here is an example of a Nested Segment Group:
Both Segment Group 7 segments (CUX, DTM) and Segment Group 8 segments (AJT, MOA, RFF) are within Segment Group 6 (Document Details).
Take Self Test I to check your understanding at this point. Self Test I can be found at the end of this tutorial.
Part 6: Segments
A segment is a collection of logically-related data elements in a fixed, defined sequence. Segments contain: A three-character alphanumeric code that identifies the segment. This is called the segment tag. Variable length data elements. These can be either simple or composite. Segments must be separated by a data element separator (data element delimeter), which is normally + and :, and terminated by a segment terminator, normally . All segments are fully documented in the United Nations Trade Data Interchange Directory (UNTDID). These tables list the segment position, segment tag and segment name. Segment tables also specify if a segment must appear in a message using the requirements designator M (Mandatory) or C (Conditional), and how many times a particular segment may repeat (repetition field). In EDIFACT, there are two kinds of segments: Service Segments Generic Segments Service Segments are: Envelopes (UNB-UNZ, UNG-UNE, UNH-UNT) Delimiter String Advice (UNA) Section Separator (UNS) Generic Segments are: DOC to identify and specify documents MOA for monetary amounts DTM for dates and times NAD for name and address data Here is a sample segment:
Optional or conditional data elements that are not used must be accounted for by their position within the segment. Here is an example:
However, optional or conditional data elements without data that appear at the end of a data segment do not need additional data element separators to correctly position the data. Here is an example:
Here is a list of data element types and the rules that apply to them:
Numeric
A numeric segment may contain only digits, a decimal point and, if negative, a minus sign.
If the numeric is a given as a decimal, the number must have a digit before and after the decimal point. For example: 2.0 is correct (as is 2), however, 2. is wrong. 0.50 is correct (as is 0.5), .50 is wrong.
Alphabetic
An alphabetic segment contains the specified number of alpha characters, including embedded blanks. Leading spaces must be preserved.
Alphanumeric
Alphanumeric segments contain the specified number of alphanumeric characters (including embedded blanks). Leading spaces must be preserved.
Different types of data elements also have specific rules they must follow. The data element dictionary usually specifies the codes (identifiers) by using the words coded or qualifier in the data element name:
This is how the Party Qualifier data element (3035) is displayed in the message:
The composite data elements (C078 and C088) are made up of various conditional components from the segment table. Because they are conditional, not all of the data elements are used. All components are separated by a sub-element qualifier (:). Take Self Test II to check your understanding at this point. Self Test II can be found at the
end of this tutorial.
The UNA Interchange is transmitted as a single string of 9 characters prior to the UNB Interchange segment. UNA is optional, and if not used, the defaults shown below apply: A release character is used when there is a need to transmit a message in which a character is designated as a delimiter, indicator or terminator, but it also represented in the message data. For example:
The name of a company is DONS DISTRIBUTION COMPANY. The apostrophe is designated as the segment terminator. Question: How do you transmit the apostrophe in DONS in your message?
Solution: Use a release character (normally ?). So the data would look as follows:
DONS DISTRIBUTION COMPANY
It is also possible to release the release character. The question: WHEN WILL YOU SEND THE SHIPMENT? would be transmitted: WHEN WILL YOU SEND THE SHIPMENT??
In addition, there is one optional envelope level: Functional Group (UNG/UNE). It is used to group like messages together and for sub-addressing within an organization. In the US ANSI X.12 standards, this group level is where the message format and version are specified. Use of the UNG/ UNE is mandatory to/from North America. The following diagram illustrates Electronic Enveloping:
Message Identifier (M): Composite which identifies the message being enveloped using the six character message code (e.g., PAYEXT, REMADV) and the Version/Release data. Common Access Reference Number (C): Relates multiple transactions together. Status of the Transfer (C): Sequences a series of related messages.
The UNT segment has two data elements: Number of Segments in a Message (M): count of segments in the message (including UNH and UNT). Message Reference Number (M): same one that was used in the UNH for that particular message.
Here is an example of how the CONTROL mechanism in the UNH element is used to validate message data:
The Common Access Reference Number is used to identify a series of related EDIFACT messages. For example, one purchase may involve a message exchange that requires four messages to accomplish the complete business transaction as given here:
1st Message: ORDERS (Purchase Order) 2nd Message: DESADV (Dispatch Advice) 3rd Message: INVOIC (Invoice)
Buyer
Seller
For Message #1: UNH+2348+ORDERS:D:94B:UN+10381+1:C For Message #2: UNH+156009+DESADV:D:94B:UN+10381+2 For Message #3: UNH+156078+INVOIC:D:94B:UN+10381+3 For Message #4: UNH+2451+REMADV:D:94B:UN+10381+4:F
This envelope is used to identify data sent from one sender to one receiver: The UNA segment contains:
Delimiter String Advice Examples of included data elements
Take Self Test III to check your understanding at this point. Self Test III can be found at the end of this tutorial.
EDIFACT Wrap-up
Some things to keep in mind: EDIFACT was orginally developed from a base of US ANSI standards and UN GTDI standards. The syntax of both standards are remarkably similar. Many segments are similar in the two standards. Translation software can readily generate/accept either EDIFACT or ANSI ASC X.12 data. A key issue will be the organizational improvements needed to develop/maintain EDIFACT standards within the US and Canada. Thank you for using the GXS EDIFACT Tutorial. Please send all feedback to [email protected].
EDIFACT Glossary
AreaAreas contain groups of segments that perform specific functions. The areas, in turn, make up a message. To be complete, a message must contain a header area, detail area and summary area. ComponentA composite data element made up of two or more pieces of data. Composite Data ElementTwo or more related data items separated by a delimiter character,
grouped together to form a unit or piece of information as defined in the data dictionary of a system of EDI Standards, and contained in an EDI message.
ConditionalAttribute that indicates that the data element may or may not contain data, de-
segment.
EDIFACTAlso known as UN/EDIFACT, is the acronym for EDI for Administration, Commerce
and Transport. It is the international message standard for EDI being developed through the cooperation of the United Nations and the Economic Commission for Europe (UN/ECE).
MandatoryAttribute that indicates that the data element must contain data.
Nested Segment GroupSegment groups that reside within other segment groups.
QualifierTypically an ID (code value) field, it is used to qualify a particular value in a segment.
Repetition FieldEntry in a segment table which states how many times a particular segment
may repeat.
Requirements DesignatorUsage indicator of segment detail: Mandatory, Optional or Floating. SegmentA part of an EDI message or transaction set, made up of a number of logically-related
data elements in a fixed, defined, sequence, separated by a delimiter, conveying a part of the business transaction being made.
Segment TablesThe message structure is defined in a listing known as a segment table. These
characters in the actual data. Minimum and maximum size of the element is given in the element table.
it is an industry-to-industry only standard. it is from the UN. it is both industry-to-industry and country-to-country. it is a form of data encryption.
2. Messages:
have all the of the next three features. collections of sequenced segments within defined areas. being with the UNH segment and end with the UNT segment. identified by a six character name.
3. Message structure is defined in the:
a segment tag. simple or composite variable length data elements. the data element separators + or :. all of the above.
All optional or conditional elements must be accounted for. All conditional elements are dependent on message requirements. All mandatory data elements must contain data. All of the above.
2. EDIFACT uses two separate pieces of data in a single element:
Value and Qualifier Simple and Composite Numeric and Alphabetic Composite and Component
3. If there is an alphanumeric data element with an attribute of AN5, all of these would be correct except:
need additional data element separators to correctly position the data. must be accounted for by their position with the segment. do not need additional data element separators to correctly position the data. all of the above.
upper case, includes non-printing characters for delimiters. upper and lower case. upper case with only printable characters. none of the above.
2. A release character...
allows the use of a delimiter or terminator within data. is normally the ?. can release a release character. all of the above.
3. EDIFACT has two required levels of envelopes:
Interchange and Functional Group Message and Interchange Functional Group and Message Sub-Addressing and Message
4. For an incoming message, it is the responsibility of the receivers computer to...
check syntax, then build and transmit a Contrl message. check control numbers, then build and transmit a Contrl message. build and transmit a Contrl message. check syntax and control numbers, then build and transmit a Contrl message.