Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Documentation
Guideline ORDERS
Purchase orders
Version 0.2
ii
Table of Contents
1 Schema structure ...................................................................................................... 3
2 History ........................................................................................................................ 4
3 Example ...................................................................................................................... 5
4 UNB (INTERCHANGE HEADER) ............................................................................... 6
5 Message ..................................................................................................................... 9
5.1 UNH_D01B (MESSAGE HEADER) ...................................................................... 10
5.2 BGM_220 (BEGINNING OF MESSAGE) .............................................................. 11
5.3 DTM_137_2 (DATE/TIME/PERIOD)...................................................................... 12
5.4 FTX_SUR (FREE TEXT) ....................................................................................... 13
5.5 SG2 ....................................................................................................................... 14
5.5.1 NAD_BY_SU_ST_IV_SF (NAME AND ADDRESS) .................................... 15
5.5.2 RFF_VA ...................................................................................................... 16
5.5.2.1 RFF (REFERENCE) ............................................................................... 17
5.6 SG7 ....................................................................................................................... 18
5.6.1 CUX_2 (CURRENCIES) ............................................................................. 19
5.7 SG28 ..................................................................................................................... 20
5.7.1 LIN_SRV (LINE ITEM) ................................................................................ 21
5.7.2 PIA_IN_SA (ADDITIONAL PRODUCT ID) .................................................. 22
5.7.3 IMD_F (ITEM DESCRIPTION) .................................................................... 23
5.7.4 OTY_21 (QUANTITY) ................................................................................. 24
5.8 UNS_S (SECTION CONTROL) ............................................................................ 25
5.9 CNT_2 (CONTROL TOTAL) .................................................................................. 26
5.10 UNT (MESSAGE TRAILER) .............................................................................. 27
6 UNZ (INTERCHANGE TRAILER) ............................................................................. 28
2/7/19 12:13 PM Page 3 of 28
1 Schema structure
UNT 1 1 MESSAGE TRAILER
CNT_2 1 10 CONTROL TOTAL
UNS_S 1 1 SECTION CONTROL
OTY_21 2 99 QUANTITY
IMD_F 2 99 ITEM DESCRIPTION
PIA_IN_SA 2 25 ADDITIONAL PRODUCT ID
LIN_SRV 2 1 LINE ITEM
SG28 1 200000
CUX_2 2 1 CURRENCIES
SG7 1 5
RFF 3 1 REFERENCE
RFF_VA 2 99
NAD_BY_SU_ST_IV_SF2 1 NAME AND ADDRESS
SG2 1 99
FTX_SUR 1 99 FREE TEXT
DTM_137_2 1 35 DATE/TIME/PERIOD
BGM_220 1 1 BEGINNING OF MESSAGE
UNH_D01B 1 1 MESSAGE HEADER
Name Level Max Occ. Content
2/7/19 12:13 PM Page 4 of 28
2 History
Version Comment Date
0.1 Initial version 2019-02-07
0.2 ZZZ as UNB qualifier 2019-02-13
2/7/19 12:13 PM Page 5 of 28
3 Example
UNB+UNOC:3+UPFIELD:ZZZ+531150209001814:ZZZ+180215:1112+123123123'
UNH+20674485+ORDERS:D:01B:UN'
BGM+220+201405500687+9'
DTM+137:20140215:102'
DTM+2:20181014:102'
NAD+BY+7779992223335::9'
NAD+SU+1123581321340::9'
NAD+ST+1231231232131::9'
NAD+IV+4534523123123::9'
RFF+VA:DE123123123'
CUX+2:EUR:9'
LIN+1++5418114875192:SRV'
PIA+1+48534-682:SA'
PIA+1+804723:IN'
IMD+F++:::ITEM_DESC'
QTY+21:2:PCE'
UNS+S'
CNT+2:1'
UNT+18+20674485'
UNZ+1+123123123'
2/7/19 12:13 PM Page 6 of 28
4 UNB (INTERCHANGE HEADER)
To start, identify and specify an interchange. Example: UNB+UNOC:3+UPFIELD:ZZZ+531150209001814:ZZZ+180215:1112+123123123' This segment is mandatory here. Max. occurrences is 1.
Label Name Standard Impl Comment
S001 SYNTAX IDENTIFIER
M M Identification of the agency controlling the syntax and indication of syntax level, plus the syntax version number.
Max. occurrences is 1.
0001 Syntax identifier
M A4 M A4 Coded identification of the agency controlling a syntax and syntax level used in an interchange.
Code Description
UNOC UN/ECE level C
0002 Syntax version number
M N1 M N1 Version number of the syntax identified in the syntax identifier (0001)
Code Description
3 Version 3
S002 INTERCHANGE SENDER
M M Identification of the sender of the interchange.
Max. occurrences is 1.
0004 Sender identification
M AN..35 M AN..35 Name or coded representation of the sender of a data interchange.
0007 Partner identification code qualifier
O AN..4 O AN..4 Qualifier referring to the source of codes for the identifiers of interchanging partners.
Code Description
ZZZ Mutually defined
0008 Address for reverse routing
O AN..14 O AN..14 Address specified by the sender of an interchange to be included by the recipient in the response interchanges to facilitate internal routing.
S003 INTERCHANGE RECIPIENT
M M Identification of the recipient of the interchange.
Max. occurrences is 1.
2/7/19 12:13 PM Page 7 of 28
Label Name Standard Impl Comment
0010 Recipient identification
M AN..35 M AN..35 Name or coded representation of the recipient of a data interchange.
0007 Partner identification code qualifier
O AN..4 O AN..4 Qualifier referring to the source of codes for the identifiers of interchanging partners.
Code Description
ZZZ Mutually defined
0014 Routing address
O AN..14 O AN..14 Address specified by the recipient of an interchange to be included by the sender and used by the recipient for routing of received interchanges inside his organization.
S004 DATE/TIME OF PREPARATION
M M Date/time of preparation of the interchange.
Max. occurrences is 1.
0017 Date of preparation
M N6 M N6 Local date when an interchange or a functional group was prepared.
0019 Time of preparation
M N4 M N4 Local time of day when an interchange or a functional group was prepared.
0020 Interchange control reference
M AN..14 M AN..14 Unique reference assigned by the sender to an interchange.
S005 RECIPIENT'S REFERENCE, PASSWORD
O O Reference or password as agreed between the communicating partners.
Max. occurrences is 1.
0022 Recipient's reference/password
M AN..14 M AN..14 Unique reference assigned by the recipient to the data interchange or a password to the recipient's system or to a third party network as specified in the partners interchange agreement.
0025 Recipient's reference/password qualifier
O AN2 O AN2 Qualifier for the recipient's reference or password.
Standard codelist for _0025 is supported.
0026 Application reference
O AN..14 O AN..14 Identification of the application area assigned by the sender, to which the messages in the interchange relate e.g. the message identifier if all the messages in the interchange are of the same type.
0029 Processing priority code
O A1 O A1 Code determined by the sender requesting processing priority for the interchange.
Standard codelist for _0029 is supported.
2/7/19 12:13 PM Page 8 of 28
Label Name Standard Impl Comment
0031 Acknowledgement request
O N1 O N1 Code determined by the sender for acknowledgement of the interchange.
Standard codelist for _0031 is supported.
0032 Communications agreement ID
O AN..35 O AN..35 Identification by name or code of the type of agreement under which the interchange takes place.
0035 Test indicator O N1 O N1 Indication that the interchange is a test.
Standard codelist for _0035 is supported.
2/7/19 12:13 PM Page 9 of 28
5 Message
This segment group is mandatory here. Max. occurrences is "unbound".
2/7/19 12:13 PM Page 10 of 28
5.1 UNH_D01B (MESSAGE HEADER)
To head, identify and specify a message. Example: UNH+20674485+ORDERS:D:01B:UN' This segment is mandatory here. Max. occurrences is 1.
Label Name Standard Impl Comment
0062 Message reference number
M AN..14 M AN..14 Unique message reference assigned by the sender.
S009 MESSAGE IDENTIFIER
M M Identification of the type, version etc. of the message being interchanged.
Max. occurrences is 1.
0065 Message type M AN..6 M AN..6 Code identifying a type of message and assigned by its controlling agency.
Code Description
ORDERS Purchase order message
0052 Message version number
M AN..3 M AN..3 Version number of a message type.
Code Description
D Draft version/UN/EDIFACT Directory
0054 Message release number
M AN..3 M AN..3 Release number within the current message type version number (0052).
Code Description
01B Release 2001 - B
0051 Controlling agency
M AN..2 M AN..2 Code to identify the agency controlling the specification, maintenance and publication of the message type.
Code Description
UN UN/CEFACT
0057 Association assigned code
O AN..6 Not used
2/7/19 12:13 PM Page 11 of 28
5.2 BGM_220 (BEGINNING OF MESSAGE)
To indicate the type and function of a message and to transmit the identifying number. Example: BGM+220+201405500687+9' This segment is mandatory here. Max. occurrences is 1.
Label Name Standard Impl Comment
C002 DOCUMENT/MESSAGE NAME
O M Identification of a type of document/message by code or name. Code preferred.
Max. occurrences is 1.
1001 Document name code
O AN..3 M AN..3 Code specifying the document name.
Code Description
220 Order
1131 Code list identification code
O AN..17 Not used
3055 Code list responsible agency code
O AN..3 Not used
1000 Document name
O AN..35 Not used
C106 DOCUMENT/MESSAGE IDENTIFICATION
O O Identification of a document/message by its number and eventually its version or revision.
Max. occurrences is 1.
1004 Document identifier
O AN..35 O AN..35 To identify a document.
1056 Version identifier
O AN..9 Not used
1060 Revision identifier
O AN..6 Not used
1225 Message function code
O AN..3 M AN..3 Code indicating the function of the message.
Code Description
9 Original
2/7/19 12:13 PM Page 12 of 28
5.3 DTM_137_2 (DATE/TIME/PERIOD)
To specify date, and/or time, or period. Example: DTM+137:20140215:102' DTM+2:20181014:102' This segment is mandatory here. Max. occurrences is 35.
Label Name Standard Impl Comment
C507 DATE/TIME/PERIOD
M M Date and/or time, or period relevant to the specified date/time/period type.
Max. occurrences is 1.
2005 Date or time or period function code qualifier
M AN..3 M AN..3 Code qualifying the function of a date, time or period.
Code Description
2 Delivery date/time, requested
137 Document/message date/time
2380 Date or time or period value
O AN..35 M AN..35 The value of a date, a date and time, a time or of a period in a specified representation.
2379 Date or time or period format code
O AN..3 M AN..3 Code specifying the representation of a date, time or period.
Code Description
102 CCYYMMDD
2/7/19 12:13 PM Page 13 of 28
5.4 FTX_SUR (FREE TEXT)
To provide free form or coded text information. Example: FTX+SUR+++Supplier remarks' This segment is optional here. Max. occurrences is 99.
Label Name Standard Impl Comment
4451 Text subject code qualifier
M AN..3 M AN..3 Code qualifying the subject of the text.
Code Description
SUR Supplier remarks
C108 TEXT LITERAL
O O Free text; one to five lines.
Max. occurrences is 1.
4440 Free text value M AN..512 M AN..512 Free form text.
4440 Free text value O AN..512 O AN..512 Free form text.
4440 Free text value O AN..512 O AN..512 Free form text.
4440 Free text value O AN..512 O AN..512 Free form text.
4440 Free text value O AN..512 O AN..512 Free form text.
2/7/19 12:13 PM Page 14 of 28
5.5 SG2
RFF 4 1 REFERENCERFF_VA 3 99NAD_BY_SU_ST_IV_SF3 1 NAME AND ADDRESSName Level Max Occ. Content
This segment group is optional here. Max. occurrences is 99.
2/7/19 12:13 PM Page 15 of 28
5.5.1 NAD_BY_SU_ST_IV_SF (NAME AND ADDRESS)
To specify the name/address and their related function, either by C082 only and/or unstructured by C058 or structured by C080 thru 3207. Example: NAD+BY+7779992223335::9' NAD+SU+1123581321340::9' NAD+ST+1231231232131::9' NAD+IV+4534523123123::9' This segment is mandatory here. Max. occurrences is 1.
Label Name Standard Impl Comment
3035 Party function code qualifier
M AN..3 M AN..3 Code giving specific meaning to a party.
Code Description
BY Buyer
IV Invoicee
ST Ship to
SU Supplier
SF Ship from
C082 PARTY IDENTIFICATION DETAILS
O O Identification of a transaction party by code.
Max. occurrences is 1.
3039 Party identifier M AN..35 M AN..35 Code specifying the identity of a party.
1131 Code list identification code
O AN..17 Not used
3055 Code list responsible agency code
O AN..3 M AN..3 Code specifying the agency responsible for a code list.
Code Description
9 EAN (International Article Numbering association)
91 Assigned by seller or seller's agent
92 Assigned by buyer or buyer's agent
2/7/19 12:13 PM Page 16 of 28
5.5.2 RFF_VA
RFF 4Name
This segment group is mandatory here. Max. occurrences is 99.
2/7/19 12:13 PM Page 17 of 28
5.5.2.1 RFF (REFERENCE)
To specify a reference. Example: RFF+VA:DE123123123' This segment is mandatory here. Max. occurrences is 1.
Label Name Standard Impl Comment
C506 REFERENCE M M Identification of a reference.
Max. occurrences is 1.
1153 Reference code qualifier
M AN..3 M AN..3 Code qualifying a reference.
Code Description
VA VAT registration number
1154 Reference identifier
O AN..70 O AN..70 Identifies a reference.
1156 Document line identifier
O AN..6 Not used
4000 Reference version identifier
O AN..35 Not used
1060 Revision identifier
O AN..6 Not used
2/7/19 12:13 PM Page 18 of 28
5.6 SG7
Name
This segment group is optional here. Max. occurrences is 5.
2/7/19 12:13 PM Page 19 of 28
5.6.1 CUX_2 (CURRENCIES)
To specify currencies used in the transaction and relevant details for the rate of exchange. Example: CUX+2:EUR:9' This segment is mandatory here. Max. occurrences is 1.
Label Name Standard Impl Comment
C504 CURRENCY DETAILS
O O The usage to which a currency relates.
Max. occurrences is 1.
6347 Currency usage code qualifier
M AN..3 M AN..3 Code qualifying the usage of a currency.
Code Description
2 Reference currency
6345 Currency identification code
O AN..3 M AN..3 Code specifying a monetary unit.
6343 Currency type code qualifier
O AN..3 M AN..3 Code qualifying the type of currency.
Code Description
9 Order currency
6348 Currency rate value
O N..4 Not used
2/7/19 12:13 PM Page 20 of 28
5.7 SG28
OTY_21 3 99 QUANTITY
IMD_F 3 99 ITEM DESCRIPTION
PIA_IN_SA 3 25 ADDITIONAL PRODUCT ID
LIN_SRV 3 1 LINE ITEM
Name Level Max Occ. Content
This segment group is optional here. Max. occurrences is 200,000.
2/7/19 12:13 PM Page 21 of 28
5.7.1 LIN_SRV (LINE ITEM)
To identify a line item and configuration. Example: LIN+1++5418114875192:SRV' This segment is mandatory here. Max. occurrences is 1.
Label Name Standard Impl Comment
1082 Line item identifier
O AN..6 M AN..6 To identify a line item.
C212 ITEM NUMBER IDENTIFICATION
O O Goods identification for a specified source.
Max. occurrences is 1.
7140 Item identifier O AN..35 M AN..35 To identify an item.
7143 Item type identification code
O AN..3 M AN..3 Coded identification of an item type.
Code Description
SRV EAN.UCC Global Trade Item Number
1131 Code list identification code
O AN..17 Not used
3055 Code list responsible agency code
O AN..3 Not used
2/7/19 12:13 PM Page 22 of 28
5.7.2 PIA_IN_SA (ADDITIONAL PRODUCT ID)
To specify additional or substitutional item identification codes. Example: PIA+1+48534-682:SA' PIA+1+804723:IN' This segment is optional here. Max. occurrences is 25.
Label Name Standard Impl Comment
4347 Product identifier code qualifier
M AN..3 M AN..3 Code qualifying the product identifier.
Code Description
1 Additional identification
C212 ITEM NUMBER IDENTIFICATION
M M Goods identification for a specified source.
Max. occurrences is 1.
7140 Item identifier O AN..35 O AN..35 To identify an item.
7143 Item type identification code
O AN..3 M AN..3 Coded identification of an item type.
Code Description
IN Buyer's item number
SA Supplier's article number
1131 Code list identification code
O AN..17 Not used
3055 Code list responsible agency code
O AN..3 Not used
2/7/19 12:13 PM Page 23 of 28
5.7.3 IMD_F (ITEM DESCRIPTION)
To describe an item in either an industry or free format. Example: IMD+F++:::ITEM_DESC' This segment is mandatory here. Max. occurrences is 99.
Label Name Standard Impl Comment
7077 Description format code
O AN..3 M AN..3 Code specifying the format of a description.
Code Description
F Free-form
C272 ITEM CHARACTERISTIC
O O To provide the characteristic of the item being described.
Max. occurrences is 1.
7081 Item characteristic code
O AN..3 Not used
1131 Code list identification code
O AN..17 Not used
3055 Code list responsible agency code
O AN..3 Not used
C273 ITEM DESCRIPTION
O O Description of an item.
Max. occurrences is 1.
7009 Item description code
O AN..17 Not used
1131 Code list identification code
O AN..17 Not used
3055 Code list responsible agency code
O AN..3 Not used
7008 Item description
O AN..256 M AN..256 Free form description of an item.
7008 Item description
O AN..256 O AN..256 Free form description of an item.
3453 Language name code
O AN..3 Not used
2/7/19 12:13 PM Page 24 of 28
5.7.4 OTY_21 (QUANTITY)
To specify a pertinent quantity. Example: QTY+21:2:PCE' This segment is mandatory here. Max. occurrences is 99.
Label Name Standard Impl Comment
C186 QUANTITY DETAILS
M M Quantity information in a transaction, qualified when relevant.
Max. occurrences is 1.
6063 Quantity type code qualifier
M AN..3 M AN..3 Code qualifying the type of quantity.
Code Description
21 Ordered quantity
6060 Quantity M AN..35 M AN..35 Alphanumeric representation of a quantity.
6411 Measurement unit code
O AN..3 M AN..3 Code specifying the unit of measurement.
Code Description
KGM Kilogram
PCE Piece
LBR Pound
GRM Gram
MIL Thousand
2/7/19 12:13 PM Page 25 of 28
5.8 UNS_S (SECTION CONTROL)
To separate header, detail and summary sections of a message. Example: UNS+S' This segment is mandatory here. Max. occurrences is 1.
Label Name Standard Impl Comment
0081 Section identification
M A1 M A1 Separates sections in a message.
Code Description
S Detail/summary section separation
2/7/19 12:13 PM Page 26 of 28
5.9 CNT_2 (CONTROL TOTAL)
To provide control total. Example: CNT+2:1' This segment is mandatory here. Max. occurrences is 10.
Label Name Standard Impl Comment
C270 CONTROL M M Control total for checking integrity of a message or part of a message.
Max. occurrences is 1.
6069 Control total type code qualifier
M AN..3 M AN..3 Code qualifying the type of control of hash total.
Code Description
2 Number of line items in message
6066 Control total value
M N..18 Not used
6411 Measurement unit code
O AN..3 Not used
2/7/19 12:13 PM Page 27 of 28
5.10 UNT (MESSAGE TRAILER)
To end and check the completeness of a message. Exampple: UNT+20+20674485' This segment is mandatory here. Max. occurrences is 1.
Label Name Standard Impl Comment
0074 Number of segments in the message
M N..6 M N..6 Control count of number of segments in a message.
2/7/19 12:13 PM Page 28 of 28
6 UNZ (INTERCHANGE TRAILER)
To end and check the completeness of an interchange. Example: UNZ+1+123123123' This segment is mandatory here. Max. occurrences is 1.
Label Name Standard Impl Comment
0036 Interchange control count
M N..6 M N..6 The count either of the number of messages or, if used, of the number of functional groups in an interchange. One of these counts shall appear.
0020 Interchange control reference
M AN..14 M AN..14 Unique reference assigned by the sender to an interchange.