Sales report as EDIFACT-Format (EANCOM)
1. Document information
| Message type | Date | Version | Subsets | 
| SLSRPT | 03.08.2016 | 1.2 | D.96A/D.01B | 
2. Structure of an EDIFACT interchange
In the following you´ll see an overview of the structure of an EDIFACT interchange.
  
| Structure | Segment | Status | Function | |||
| UNA | C | Separator character | ||||
| UNB | M | Head of interchange | ||||
| UNH | M | Head of message 1 | ||||
| … | Message segments | |||||
| UNT | M | End of message 1 | ||||
| UNH | M | Head of message 2 | ||||
| … | Message segments | |||||
| UNT | M | End of message 2 | ||||
| UNZ | M | End of interchange | ||||
 3. Description of the EDIFACT service segments UNA, UNB, UNZ
All necessary elements in one segment are displayed. Not used elements not indicated. Codes and attributes in the column "content/comments" are displayed in black, bold and italic notation. At any segment there is an example below the description.
Note: EDIFACT allows to group multiple messages within an interchange but this not supported by beeline actually.
| UNA | C | 1 | SERVICE STRING ADVICE | |
| Function: | To define the characters selected for use as delimiters and indicators in the rest of the interchange that follows. | |||
| Element | Status | Format | Description | Content/Notes | 
| UNA1 | M | an1 | Component data element separator | : - colon | 
| UNA2 | M | an1 | Data element separator | + - plus sign | 
| UNA3 | M | an1 | Decimal notation | . - full stop | 
| UNA4 | M | an1 | Release indicator | ? - question mark | 
| UNA5 | M | an1 | Reserved for future use | space character | 
| UNA6 | M | an1 | Segment terminator | ' - apostrophe | 
| Example: | UNA:+.? ' | |||
| UNB | M | 1 | INTERCHANGE HEADER | |
| Function: | To start, identify and specify an interchange. | |||
| Element | Status | Format | Description | Content/Notes | 
| S010 | M | SYNTAX IDENTIFIER | ||
| 0001 | M | a4 | Syntax identifier | UNOC | 
| 0002 | M | n1 | Syntax version number | 3 | 
| S002 | M | INTERCHANGE SENDER | ||
| 0004 | M | an..35 | Interchange sender identification | GLN of the sender | 
| 0007 | C | an..4 | Identification code qualifier | 14 - GLN | 
| S003 | M | INTERCHANGE RECIPIENT | ||
| 0010 | M | an..35 | Interchange recipient identification | GLN of the recipient | 
| 0007 | C | an..4 | Identification code qualifier | 14 - GLN | 
| S004 | M | DATE AND TIME OF PREPARATION | ||
| 0017 | M | n6 | Date | 070208 - YYMMDD | 
| 0019 | M | n4 | Time | 1511 - HHMM | 
| 0020 | M | an..14 | Interchange Control Reference | 787878 | 
| Example: | UNB+UNOC:3+4016632000000:14+4334400000008:14+070208:1511+787878' | |||
| UNZ | M | 1 | INTERCHANGE TRAILER | |
| Function: | To end and check the completeness of an interchange. | |||
| Element | Status | Format | Description | Content/Notes | 
| 0036 | M | n..6 | Interchange Control Count | The count of the number of messages in the interchange. | 
| 0020 | M | an..14 | Interchange Control Reference | Shall be identical to 0020 in UNB | 
| Example: | UNZ+1+787878' | |||
4. SLSRPT - Segment description
All service-segments will be specified in the following. All effective elements in one segment are displayed in black lettering. Codes and attributes in the column "content/comments" are displayed in black and italic lettering. All elements which are unused in one segment are grey deposited. At any segment there is an example below the description.
| UNH | M | 1 | MESSAGE HEADER | |
| Function: | To head, identify and specify a message. | |||
| Element | Status | Format | Description | Content/Notes | 
| 0062 | M | an..14 | Message reference number | e.g. 123456 | 
| S009 | M | MESSAGE IDENTIFIER | ||
| 0065 | M | an..6 | Message type | SLSRPT | 
| 0052 | M | an..3 | Message version number | D | 
| 0054 | M | an..3 | Message release number | 96A (D.96A) 01B (D.01B) | 
| 0051 | M | an..2 | Controlling agency | UN | 
| 0057 | C | an..6 | Association assigned code | EAN004 (D.96A) EAN007 (D.01B) | 
| Example D.96A: | UNH+123456+SLSRPT:D:96A:UN:EAN004' | |||
| Example D.01B: | UNH+654321+SLSRPT:D:01B:UN:EAN007' | |||
| BGM | M | 1 | BEGINNING OF MESSAGE | |
| Function: | To indicate the type and function of a message and to transmit the identifying number. | |||
| Element | Status | Format | Description | Content/Notes | 
| C002 | C | DOCUMENT/MESSAGE NAME | ||
| 1001 | C | an..3 | Document/message name, coded | 73E - sales report | 
| 3055 | C | an..3 | Code list responsible agency, coded | 9 - GTIN | 
| 1004 | C | an..35 | Document/message number | Identifier e.g. 654321 | 
| 1225 | C | an..3 | Message function, coded | 9 - Original | 
| Example: | BGM+73E::9+654321+9' | |||
| DTM | M | 35 | DATE/TIME/PERIOD | |
| Function: | To specify date, and/or time, or period. | |||
| Element | Status | Format | Description | Content/Notes | 
| C507 | M | DATE/TIME/PERIOD | ||
| 2005 | M | an..3 | Date/time/period qualifier | 137 - Document/message date/time 356 - Sales date | 
| 2380 | C | an..35 | Date/time/period | z.B. 20061229 | 
| 2379 | C | an..3 | Date/time/period format qualifier | 102 - CCYYMMDD | 
| Example: | DTM+137:20061229:102' | |||
| Example: | DTM+356:20061229:102' | |||
| Note: | DTM segment is mandatory for qualifier 137 and 356 (Element 2005). | |||
| SG1 (D.96A) SG2 (D.01B) | M | 5 | NAD | |
| NAD | M | 1 | NAME AND ADDRESS | |
| Function: | To specify the name/address and their related function, either by CO82 only and/or unstructured by CO58 or structured by CO80 thru 3207. | |||
| Element | Status | Format | Description | Content/Notes | 
| 3035 | M | an..3 | Party qualifier | SU - Supplier BY - Buyer | 
| C082 | C | PARTY IDENTIFICATION DETAILS | ||
| 3039 | M | an..35 | Party id. identification | GLN (z.B. 4016632000000) | 
| 3055 | C | an..3 | Code list responsible agency, coded | 9 - GTIN | 
| Example: | NAD+SU+4016632000000::9' GLN of supplier | |||
| Example: | NAD+BY+1234567890123::9' GLN of buyer | |||
| Note: | NAD segment is mandatory for qualifier SU and BY (Element 3035) | |||
| SG4 (D.96A) SG5 (D.01B) | C | 5 | CUX | |
| CUX | M | 1 | CURRENCIES | |
| Function: | To specify currencies used in the transaction and relevant details for the rate of exchange. | |||
| Element | Status | Format | Description | Content/Notes | 
| C504 | C | CURRENCY DETAILS | ||
| 6347 | M | an..3 | Currency details qualifier | 2 - Reference currency | 
| 6345 | C | an..3 | Currency, coded | ISO 4217 3-Alpha-Code (e.g. EUR) | 
| 6343 | C | an..3 | Currency qualifier | 10 - Currency | 
| Example: | CUX+2:EUR:8' | |||
| Note: | CUX segment is mandatory. | |||
| SG5 (D.96A) SG6 (D.01B) | M | 200000 | LOC-DTM-SG7 (D.96A) LOC-DTM-SG8 (D.01B) | |
| LOC | M | 1 | PLACE/LOCATION IDENTIFICATION | |
| Function: | To identify a country/place/location/related location one/related location two. | |||
| Element | Status | Format | Description | Content/Notes | 
| 3227 | C | an..3 | Place/location qualifier | 162 - Place or location of sale | 
| C517 | C | LOCATION IDENTIFICATION | ||
| 3225 | C | an..25 | Place/location identification | GLN of Point of sale | 
| 1131 | C | an..3 | Code list qualifier | |
| 3055 | C | an..3 | Code list responsible agency, coded | 9 - GTIN 92 - Article code at the buyer | 
| 3224 | C | an..70 | Place/location | |
| C519 | C | RELATED LOCATION ONE IDENTIFICATION | ||
| 3223 | C | an..25 | Related place/location one identification | |
| 1131 | C | an..3 | Code list qualifier | |
| 3055 | C | an..3 | Code list responsible agency, coded | |
| 3222 | C | an..70 | Related place/location one | |
| C519 | C | RELATED LOCATION TWO IDENTIFICATION | ||
| 3223 | C | an..25 | Related place/location two identification | |
| 1131 | C | an..3 | Code list qualifier | |
| 3055 | C | an..3 | Code list responsible agency, coded | |
| 3222 | C | an..70 | Related place/location two | |
| 5479 | C | an..3 | Relation, coded | |
| Example: | LOC+162+4333194124174::9' GLN of Point of sale | |||
| Example: | LOC+162+4333194124174::92' Store number of Point of sale | |||
| Note: | LOC segment is mandatoy | |||
| SG5 (D.96A) SG6 (D.01B) | M | 200000 | LOC-DTM-SG7 (D.96A) LOC-DTM-SG8 (D.01B) | |
| DTM | M | 35 | DATE/TIME/PERIOD | |
| Function: | To specify date, and/or time, or period. | |||
| Element | Status | Format | Description | Content/Notes | 
| C507 | M | DATE/TIME/PERIOD | ||
| 2005 | M | an..3 | Date/time/period qualifier | 356 - Sales date | 
| 2380 | C | an..35 | Date/time/period | z.B. 20061229 | 
| 2379 | C | an..3 | Date/time/period format qualifier | 102 - CCYYMMDD | 
| Example: | DTM+356:20061229:102' | |||
| Note: | DTM segment is mandatory. | |||
| SG7 (D.96A) SG8 (D.01B) | C | 200000 | LIN-PRI-SG8 (D.96A) LIN-SG9-SG10 (D.01B) | |
| LIN | M | 1 | LINE ITEM | |
| Function: | To identify a line item and configuration. | |||
| Element | Status | Format | Description | Content/Notes | 
| 1082 | C | n..6 | Line item number | Consecutive number | 
| C212 | C | ITEM NUMBER IDENTIFICATION | ||
| 7140 | C | an..35 | Item number | GTIN e.g. 4043977029571 | 
| 7143 | C | an..3 | Item number type, coded | EN (D.96A) SRV (D.01B) International Article Numbering Association (GTIN) | 
| 3055 | C | an..3 | Code list responsible agency, coded | 9 - GTIN | 
| Example D.96A: | LIN+1++4043977029571:EN::9' | |||
| Example: D.01B | LIN+1++4043977029571:SRV:9' | |||
| Note: | Article number is mandatory. | |||
| SG7 (D.96A) SG9 (D.01B) | C | 200000 | LIN-PRI-SG8 (D.96A) PRI | |
| PRI | C | 5 | PRICE DETAILS | |
| Function: | To specify price information. | |||
| Element | Status | Format | Description | Content/Notes | 
| C509 | C | PRICE INFORMATION | ||
| 5125 | M | an..3 | Price qualifier | AAE - Information price | 
| 5118 | C | n..15 | Price | Price, e.g.: 7.95 | 
| 5375 | C | an..3 | Price type, coded | |
| 5387 | C | an..3 | Price type qualifier | RTP - Selling price | 
| Example: | PRI+AAE:7.95::RTP' | |||
| Note: | PRI segment is mandatory. | |||
| SG8 (D.96A) SG10 (D.01B) | C | 999 | QTY | |
| QTY | M | 1 | QUANTITY | |
| Function: | To specify a pertinent quantity. | |||
| Element | Status | Format | Description | Content/Notes | 
| C186 | M | QUANTITY DETAILS | ||
| 2005 | M | an..3 | Quantity qualifier | 153 - Statistical sales quantity | 
| 2380 | C | n..15 | Quantity | e.g. 3 | 
| 2379 | C | an..3 | Measure unit qualifier | PCE - PCE | 
| Example: | QTY+153:3:PCE' | |||
| Note: | QTY segment is mandatory. | |||
| UNT | M | 1 | MESSAGE TRAILER | |
| Function: | To end and check the completeness of a message. | |||
| Element | Status | Format | Description | Content/Notes | 
| 0074 | M | n..6 | Number of segments | |
| 0062 | M | an..14 | Message reference number | 123456 | 
| Example: | UNT+12+123456' | |||
Here you can download a sample sales report and test barcodes in EDIFACT format: 
EDIFACT D.96A sales report 
EDIFACT D.01B sales report 
Test Barcodes (matching sample messages)
5. Legend to the EDIFACT tables:
| Element | Definition | Example | 
| Format | ||
| n | numeric | n3 = exact 3 numeric positions | 
| an | alphanumeric | an12 = exakt 12 alphanumeric positions | 
| Status | ||
| M | must | |
| O | optional |