X12 segment reference
GE — Functional Group Trailer
X12 GE segment closes a functional group: transaction set count and group control number echo for 997 acknowledgement correlation.
GE segment facts
- GE02 must exactly match GS06 — a one-digit drift breaks 997 correlation for the entire batch.
- GE01 counts transaction sets, not segments — multi-document batches need accurate ST..SE counting.
- Outbound generators should assign GS06/GE02 from a monotonic partner-scoped sequence.
What the GE segment does
GE ends each GS..GE envelope. GE01 counts ST..SE transaction sets; GE02 must match GS06 group control number referenced in 997 AK1.
Loop: Once per functional group
Key elements
| Element | Name | Description |
|---|---|---|
| GE01 | Number of transaction sets | Includes all ST..SE sets in the group. |
| GE02 | Group control number | Must equal GS06. |
Example GE segment
GE*1*42~
Parse and validate samples with the free EDI validator or send JSON via the JSON→X12 mapping guide.
Common GE errors
- GE02 mismatch vs GS06
- GE01 wrong after splitting interchanges
Related reference
FAQ
Frequently asked questions
AK102 echoes GS06 so you know which functional group the acknowledgement covers.