The TRADACOMS (TRAding DAta COMmunications Standards) standard was widely used in the UK for electronic data interchange (EDI) before being mostly replaced by EDIFACT. TRADACOMS is particularly used in the retail industry and was originally developed by the UK Article Number Association (ANA). Its structure is different from both ANSI ASC X12 and EDIFACT, with a specific organization of segments, groups, and data elements.
1. Message Structure Overview
A TRADACOMS message is composed of multiple levels:
- Transmission (envelope for the entire transmission)
- Interchange (contains multiple messages or groups of messages)
- Message (the individual transaction, such as an order or invoice)
- Segment (a unit containing data elements)
- Data Elements (the smallest units of data in a segment)
2. Transmission Structure
At the highest level, a TRADACOMS document contains transmission envelopes. The transmission envelope consists of the following segments:
a. STX Segment (Start of Transmission)
- Purpose: Marks the start of the entire transmission.
- Key Data Elements:
- Transmission Reference Number (STX01)
- Sender's Identification (STX02)
- Receiver's Identification (STX03)
- Transmission Date (STX04)
- Transmission Time (STX05)
- Transmission Control Number (STX06)
Example:
STX=ANA:1+SENDERID+RECEIVERID+240814:1530+1'
b. END Segment (End of Transmission)
- Purpose: Marks the end of the transmission.
- Key Data Elements:
- Transmission Control Number (END01): Should match the control number in the STX segment.
Example:
END=1'
3. Interchange Structure
An interchange can contain one or more related messages. It's essentially a grouping mechanism within the transmission, similar to EDIFACT's functional group. The group is made up of a header and trailer:
a. MHD Segment (Message Header)
- Purpose: Marks the start of an interchange.
- Key Data Elements:
- Message Type Identifier (MHD01): Identifies the type of message (e.g.,
ORDHDR
for Purchase Order Header). - Message Version Number (MHD02)
- Message Number (MHD03)
- Message Type Identifier (MHD01): Identifies the type of message (e.g.,
Example:
MHD=ORDHDR:9+0001'
b. MTR Segment (Message Trailer)
- Purpose: Marks the end of an interchange or a group of messages.
- Key Data Elements:
- Total Number of Segments (MTR01)
- Message Number (MTR02): Should match the number in the MHD segment.
Example:
MTR=15+0001'
4. Message Structure
The message is the core of the TRADACOMS standard and contains the business transaction. A message is typically divided into three parts:
- Header: Contains identifying information about the message.
- Body: Contains the actual business data, such as items in an order or invoice.
- Footer: Contains summary or control information.
For example, in a purchase order (ORDHDR
message), the message structure could be divided as follows:
a. ORDHDR Message (Purchase Order Header)
- Purpose: Represents the beginning of a purchase order.
Header Segments:
- TYP Segment (Transaction Type): Indicates the type of transaction.
- SDT Segment (Supplier Details): Identifies the supplier.
- BDT Segment (Buyer Details): Identifies the buyer.
Example:
TYP=0350+ORDHDR'SDT+SUPPLIERID'
BDT+BUYERID'
Body Segments:
- LIN Segment (Line Item): Details individual items in the order.
- QTY Segment (Quantity): Specifies the quantity of the line item.
- PRI Segment (Price): Specifies the price of the line item.
Example:
LIN+1+ITEMID'QTY+10'
PRI+25.00'
Footer Segments:
- SST Segment (Summary Totals): Provides summary information, such as total quantity and value.
- TRL Segment (Transaction Trailer): Indicates the end of the message.
Example:
SST+TOTALQTY:100+TOTALVALUE:2500.00'TRL+1'
5. Segments
Segments are the building blocks of TRADACOMS messages, similar to other EDI standards. Each segment contains one or more data elements. Segments in TRADACOMS are identified by a three-letter code and contain data elements separated by the equals sign (=
) or plus sign (+
).
- Segment Name: Always begins with a three-letter code.
- Data Elements: Contain the actual information and are separated by
+
.
Example Segments:
- ORDHDR Segment (Order Header):ORDHDR+ORDERID+DATE'
- LIN Segment (Line Item):LIN+1+ITEMID'
- QTY Segment (Quantity):QTY+10'
6. Data Elements
Each segment in TRADACOMS consists of data elements that provide the specific details for that segment. Data elements are separated by plus signs (+
), and sub-elements (if any) are separated by colons (:
).
a. Example of Data Elements:
TYP Segment:
TYP=0350+ORDHDR'- 0350: Transaction Type Code
- ORDHDR: Message Identifier
LIN Segment:
LIN+1+ITEMID'- 1: Line Item Number
- ITEMID: Unique Item Code
7. Delimiters
Delimiters are special characters used to separate components within TRADACOMS messages. These include:
- Segment Separator: Typically the apostrophe (
'
), marking the end of each segment. - Data Element Separator: Typically the plus sign (
+
), separating individual data elements. - Sub-element Separator: Typically the colon (
:
), separating sub-elements within a data element.
Example : Full Structure of a Purchase Order
STX=ANA:1+SENDERID+RECEIVERID+240814:1530+1'MHD=ORDHDR:9+0001'
TYP=0350+ORDHDR'
SDT+SUPPLIERID'
BDT+BUYERID'
LIN+1+ITEMID'
QTY+10'
PRI+25.00'
LIN+2+ITEMID2'
QTY+5'
PRI+50.00'
SST+TOTALQTY:15+TOTALVALUE:500.00'
TRL+1'
MTR=9+0001'
END=1'
8. Key Message Types
- ORDHDR: Purchase Order
- INVOIC: Invoice
- DELHDR: Delivery Note
- PRICAT: Price Catalogue
No comments:
Post a Comment