The following sections provide a basic description of each of these structures. For more detailed information on each of these structures, please refer to the X12 standard.
It is a group of one or more related transaction sets sharing the same functional group ID. Functional groups start with the segment GS Functional Group Header and end with the segment GE Functional Group Trailer.
The details in the Functional Group GS/GE envelope are often used to route the group's transaction sets to the appropriate department or business application within a company.
A transaction set contains the data for a well defined business function. For example, there are X12 transaction sets for purchase orders, invoices, and financial statements.
A business transaction is defined by a transaction set composed of a number of segments of variable lengths. Each segment is in turn composed of a number of data elements of variable lengths. A transaction set is analogous to a business document, such as a purchase order; a segment is analogous to a line of information in that purchase order; and a data element is analogous to a unit of information in the item line. For example, in the purchase order for a book, the number of copies requested or the unit price would be represented by data elements.
Each transaction set starts with a transaction set header (ST), followed by a beginning segment that uniquely identifies the type of transaction set. The transaction set header contains the transaction set identification and transaction set control number. This is followed by other segments (which may also be found in other transaction sets) and concluded by a transaction set trailer.
The transaction set trailer (SE) is the last element in the transaction set. It defines the end of the transaction set and contains the number of segments included and the transaction set control number.