Friday, 20 March 2009

UN/EDIFACT message sample

Here below an INVOIC D97B sample:
UNB+UNOA:1+005435656:1+006415160:1+060515:1434+00000000000778'
UNH+00000000000117+INVOIC:D:97B:UN'
BGM+380+342459+9'
DTM+3:20060515:102'
RFF+ON:521052'
NAD+BY+792820524::16++CUMMINS MID-RANGE ENGINE PLANT'
NAD+SE+005435656::16++GENERAL WIDGET COMPANY'
CUX+1:USD'
LIN+1++157870:IN'
IMD+F++:::WIDGET'
QTY+47:1020:EA'
ALI+US'
MOA+203:1202.58'
PRI+INV:1.179'
LIN+2++157871:IN'
IMD+F++:::DIFFERENT WIDGET'
QTY+47:20:EA'
ALI+JP'
MOA+203:410'
PRI+INV:20.5'
UNS+S'
MOA+39:2137.58'
ALC+C+ABG'
MOA+8:525'
UNT+23+00000000000117'
UNZ+1+00000000000778'
Now, let's try to locate all the items mentioned in the previous post:

Simple Data Element: It's a single piece of data which cannot be reduced in smaller pieces of data. Each simple data element has a type (Alphanumeric, Alpha or Numeric Lenght) and can be Fixed or Variable Lenght and Mandatory or Conditional. In the sample, you can find a simple data element on BGM segment level as 1001:
BGM+380+342459+9'
Composite Data Element: It's a group of related simple elements; the simple elements, are separated using the simple element separator which is ':'. In the sample, you can find a Composite Data Element on UNH segment level as S009 which is the result of four Simple Data Elements (0065, 0052, 0054, 0051):
UNH+00000000000117+INVOIC:D:97B:UN'
Segment: It's a mixture of simple and composite elements. Each segment has a name and can contain three separator characters: ':', '+', '''. We have already discussed about ':'; the apostrophe (') indicates the end of a segment; The '+' separates data fields, which can be both simple or composite elements. Here below, segment NAD (Name and Address) from our INVOIC sample:
NAD+BY+792820524::16++CUMMINS MID-RANGE ENGINE PLANT
Segment Group: Segments can be grouped together to form a block of related data; here below, segment group nr.2, where you can figure out the buyer and the seller of the transaction:
NAD+BY+792820524::16++CUMMINS MID-RANGE ENGINE PLANT'
NAD+SE+005435656::16++GENERAL WIDGET COMPANY'

Message: An EDI transmission can have multiple messages; in our INVOIC sample, this basically means that you could find several block of data between segments UNH / UNT;

Functional Group: There can be multiple messages in one transmission, however all the messages should be of the same type (i.e. INVOIC) unless Functional Groups are used; Functional Groups are not commonly used;

Interchage: It's the complete EDI document.

In the next post, we will discuss again about our INVOIC sample.

No comments:

Post a Comment