EDIFACT BGM Segment: Beginning of Message

Indicates the type and function of the message and contains the document/message reference number.

Segment Code: BGM
Mandatory: Yes
Position: After UNH

BGM Syntax Example

BGM - Beginning of Message
BGM+220+PO12345+9'

Data Elements

PositionNameDescription
C002Document/message nameCode identifying document type (e.g., 220=Order, 380=Invoice)
C106Document/message identificationThe document reference number
1225Message function codeCode indicating the function (9=Original, 5=Replace)

Common Mistakes

  • Wrong document type code for message
  • Missing document reference
  • Incorrect message function code

Other EDIFACT Segments

Related Resources

Format Your EDIFACT Messages

See the BGM segment in context. Paste any EDIFACT message to format and analyze instantly.

Open EDIFACT Formatter →