Skip to main content

SE — Transaction Set Trailer

X12 SE segment closes each transaction set: segment count and ST control number echo for integrity checks.

SE segment facts

  • SE01 segment counts must include both ST and SE — off-by-one errors are a frequent outbound generator defect.
  • SE02 must exactly match ST02 or 997 acknowledgements cannot correlate to the intended transaction set.
  • The EDI validator tool flags SE mismatches before documents leave your sandbox.

What the SE segment does

SE ends each ST..SE envelope. SE01 counts segments including ST and SE; SE02 must match ST02.

Loop: Once per transaction set

Common transaction sets: 850, 856, 810, 997

Key elements

ElementNameDescription
SE01Number of included segmentsIncludes ST and SE; miscounts break 997 validation.
SE02Transaction set control numberMust equal ST02.

Example SE segment

SE*42*0001~

Parse and validate samples with the free EDI validator or send JSON via the JSON→X12 mapping guide.

Related reference

Frequently asked questions

© 2026 SignalEDI Inc. All rights reserved.