EDIFACT–Basic Rule


As an EDI consultant, basically, I should be familiar with EDIFACT, it is ISO 9735, I put this document to my blog, for conveniency.

ISO 9735 Electronic data interchange for administration, commerce and transport (EDIFACT) – Application level syntax rules (first edition 1988, amended 1990).

EDIFACT was prepared by UN/ECE Trade Division and adopted by ISO/TC 154. The UN/ECE has also prepared Message Design Guidelines which are included in the UN/ECE Trade Data Interchange Directory. The standard was published in 1988 and amended with very small changes in 1990.

In Europe the Western European EDIFACT Board (WE/EB) supports the usage of standard and maintains the directory service. WE/EB is coordinating the activities of ten message design groups for different application fields (trade, transport, customs, finance, construction, statistics, insurance, tourism, health care and social administration). Futhermore, the EC supports the development projects in applying EDIFACT in the data interchange and the information services (TEDIS projects) – for example the ENVI_D_I project (Environmental Data Interchange). Until now tens of different messages have been designed and taken in use by thousands of user organizations. Messages are written and translated by EDI translator software. Tens of products are available in the market.

The standard gives syntax rules for the preparation of messages to be interchanged between partners. ISO/OSI service specifications and protocols can be followed in communication of messages. The standard specifies several levels which are identical except for the character sets. Certain characters are reserved for use as a terminator, separators and a release character. The interchange structure is the following:

The segments and elements in a message can be optional. In the message structure the segments are often defined to be repeated and/or nested. The structure of a message can be described by using a certain message like DIRDEF (Directory Definition) or KUVAUS (Message Description, SFS 5751). A translator might be able to interpret the message by reading the description message.

A simple example of a message structure is the following.

The message schema should be read from left to right and from the top to the bottom. Therefore, in the message file the data segments are in the following order:

AAA'BBB'CCC'DDD'DDD'DDD'DDD'CCC'DDD'EEE'FFF'FFF'GGG'GGG'FFF'HHH'III'

A data segment is defined to contain certain data elements. The requirement (mandatory/conditional) and the form (alphabetic/alphanumeric/numeric and mamimum number of characters) of each data element is defined as well. A simple example of a data segment is the following.

Example of the corresbonding data is the following

FTX+OSI+++This is just informative text'
FTX+OSI+++Text can be devided:in separate parts:or coded.+ENG'
FTX+ZZZ+A+123:NN:BBB'

Representation of position geometry and topology (according to JHS 117)

The general characteristics of spatial information such as the overall position of objects, uncertainty of position and employed geometric and topological representations, may be given in a data segment SGT at the beginning of the message.

The coordinate system is referred to by using the identifier of the system, and, when necessary, the applied projection zone of the coordinate system by using its identifier in segment KOJ, represented at the beginning of the message. The elevation system is referred to by using its identifier.

Data segment identifier and name
data element identifier and name M/C
(and role identifier)
component data element identifier and name repetition M/C format
(and role identifier)
value explanation
KOJ Coordinate system
KJTU Coordinate system identifier M an..3
KOTU Projection zone identifier M an..3
KRTU Elevation system identifier M an..3
6411 Measure unit C an..3
KOOR Coordinates C
Coordinates of the origin (ORI)
PITU length M n..10
north coordinate (N)
PITU length M n..10
east coordinate (E)
PITU length C n..10
elevation coordinate (EL)
The uncertainty of a position is a metric value expressing how much the coordinates may at most deviate from the given coordinates, with the probability of 95%. The uncertainty of a position is calculated from the metric standard error of the position by multiplying it with the number 2.5. If the coordinates do not have any specified standard error value, the uncertainty of the position is estimated using the number sequence (0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, …

The uncertainty of a position is represented in a data segment SGT at the beginning of a message, when the given number expresses the uncertainty of all coordinates occurring in the message. Information concerning the uncertainty of a position may always be attached to a geometric entity when it differs from the one given at the beginning.

data element identifier and name M/C
(and role identifier)
component data element identifier and name repetition M/C format
(and role identifier) lue explanation
SIEP Uncertainty of the position
EPLU uncertainty value M an..5
uncertainty of planar position (UP)
EPLU uncertainty value C an..5
uncertainty of elevation position (UP)

An object is represented as a geometric entity, ie. as a point, a line, an area or a grid-cell or as a combination of these.

A point consists of a pair of north and east coordinates or of a triple complemented by an elevation coordinate, to which one may append information concerning the uncertainty of the position or topological relations of the point.

A point may be an isolated point or a point of a line. A point of a line may be a terminal point (a starting or an end point) or an intermediate point or the center of a circle. A point may be a node point, i.e. a terminal point common to several lines, the terminal point of each line then having the same topological identifier. A point may be the reference point of an area.

A point is represented by a segment PIS. A point may have a topological identifier. In the topological information of a node or a terminal point one may refer to a line or to lines, to which the point belongs. In topological information of a point that is a reference point one may refer to the area in question.

Data segment identifier and name
data element identifier and name M/C
(and role identifier)
component data element identifier and name repetition M/C format
(and role identifier)
PIS Point
KOOR Coordinates M
PITU length M n..10
north coordinate (N)
PITU length M n..10
east coordinate (E)
PITU length C n..10
elevation coordinate (EL)
SIEP Uncertainty of the position C
EPLU uncertainty value M n..5
uncertainty of planar position (UP)
EPLU uncertainty value C n..5
uncertainty of elevation position (UE)
PITO Topology of the point C
TOTU topological identifier M an..5
topological identifier of the point (P)
TOTU topological identifier C an..5
topological identifier of an area (A)
TOTU topological identifier max.99 C an..5
topological identifier of a line (L)

An object positioned as a point

The objects in the example are buildings that are positioned using their approximate centre points. Attributes are the construction year, the number of floors and the base area.

In the same manner, one may represent other objects positioned as points.

In the structural scheme of a simple building message, there are the data segment RAK, containing attribute information of the building, and the data segment PIS, representing the approximate centre point.

The message in the example could have the following appearance

UNH+1+RAKDAT:1:931...
RAK+1943+2+145'PIS+6987712:3465723+10'
RAK+1932+1+140'PIS+6987724:3465747+10'
RAK+1955+3+220'PIS+6987752:3465719+10'
...
UNT+...

A line consists of two or several points so that, depending on the interpolation method, the line proceeds as a broken line, a circle arc, or a curve through the points in point order (except for a circle arc when the center of the circle is given) and does not intersect itself.

A circle arc line may be represented by three points on the arc (A3), or the starting and end points with the centre (AC,AN), or the starting and end points with the radius (ARC, ARN). A curve is represented by at least four points and it may not deviate from the broken line passing through the points more than the uncertainty of the position.

A line may be an isolated line or a line in a network or an edge line of an area.

A line is represented by a data segment VII. The points of the line are represented by segments PIS, either as a repeating sub-segment after the line or separately using the topological identifiers of the points. A topological identifier may be attached to the line as well as references to starting and end points, to left and right side areas of a line, and to adjacent lines at the starting and end points.

A line may be provided with information about the uncertainty of the position, which also concerns each point of the line if no different value is given to the point.

Data segment identifier and name
data element identifier and name M/C
(and role identifier)
component data element identifier and name repetition M/C format
(and role identifier)
value explanation
VII Line
ESTA Representation M an..3
interpretation method of the line (I)
B broken line
A3 circle arc with three points on the arc
AC circle arc with the starting, end and centre points clockwise
AN circle arc with the starting, end and centre points counter clockwise
ARC circle arc with the starting and end points and the radius clockwise
ARN circle arc with the starting and end points and the radius counter clockwise
C curve (at least four points)
PITU Length C n..10
length of radius (R)
SIEP Uncertainty of the position C
EPLU uncertainty value M an..5
uncertainty of planar position (UP)
EPLU uncertainty value C an..5
uncertainty of elevation position (UE)
VITO Topology of the line C
TOTU topological identifier M an..5
topological identifier of the line (L)
TOTU topological identifier C an..5
topological identifier of the starting point (SP)
TOTU topological identifier C an..5
topological identifier of the end point (EP)
TOTU topological identifier C an..5
topological identifier of the left side area (LA)
TOTU topological identifier C an..5
topological identifier of the right side area (RA)
TOTU topological identifier C an..5
topological identifier of the left line of the starting point (SL)
TOTU topological identifier C an..5
topological identifier of the right line of the starting point (SR)
TOTU topological identifier C an..5
topological identifier of the left line of the end point (EL)
TOTU topological identifier C an..5
topological identifier of the right line of the end point  (ER)

An object positioned as a line

The objects in the example are roads positioned using their centre lines. Attributes are the road number, the road class and the maintaining organization. In the same manner, one may represent other objects positioned as lines.

In the structural scheme of a simple road message, there are the data segment TIE, containing attribute information of the road, and the data segments VII and PIS, representing the centre line of the road.

The message in the example could have the following appearance

UNH+1+TIEDAT:1:931...
TIE+123+2+TL/VII+M+20'PIS+6988766:2665235'PIS+6988744:2665258'...
TIE+1234+3+TL/VII+M+20'PIS+6988671:2665445'PIS+6988652:2665383'...
TIE+5+232'VII+M+50'PIS+6988712:2665542'PIS+6988766:2665568'...
...
UNT+...

An area is formed by a continuous planar section, the edge of which is represented by one or several lines. Edge lines must not intersect.

When an area is represented as an isolated area (IA), the edge line or lines confine the area in a clockwise direction and the possible inner edge line or lines confine in a counter clockwise direction parts that do not belong to the area. Isolated areas may intersect.

When an area is represented as a part of an area partition (AP), the edge lines enclose the area as defined by topological information, or only because of the position of the lines. The areas in an area partition must not intersect each other. Common lines of adjacent areas are represented only once. When the areas in an area partition are represented by isolated areas (IP), the isolated areas may not intersect each other. The lines of adjacent areas are represented twice.

A reference point locating inside of an area may be attached to the area.

An area is represented by a data segment ALU. The edges of the area are represented by data segments VII. The points of the edge lines are represented by data segments PIS. The possible reference point is represented by a data segment PIS.

The data segments may form a hierarchical structure, in which the area (ALU), its edge lines (VII) and the points of the lines (PIS) are subordinated to each other. Alternatively, the segments are presented in parallel, in which case the relationships between areas, edges and points are based on topological identifiers.

An area may be provided with information about the uncertainty of the position, which also concerns each edge line and its points, if no different value is given in connection with the line or the point.

An area may be provided with a topological identifier, a topological identifier of the reference point of the area, and a topological identifier of one line of the outer edge and a topological identifier of one line of each inner edge.

Data segment identifier and name
data element identifier and name M/C
(and role identifier)
component data element identifier and name repetition M/C format
(and role identifier)
value explanation
ALU Area
ESTA Representation M an..3
representation of the area (A)
IA isolated areas
AP area partition
IP area partition as isolated areas
SIEP Uncertainty of the position C
EPLU uncertainty value M n..5
uncertainty of planar position (UP)
EPLU uncertainty value C n..5
uncertainty of elevation position (UE)
ALTO Topology of the area C
TOTU topological identifier M an..5
topological identifier of the area (A)
TOTU topological identifier C an..5
topological identifier of the reference point (RF)
TOTU topological identifier max.99 C an..5
topological identifier of the edge line (L)

An object positioned as an area

The objects in the example are natural reserve areas positioned using their edge lines. Attributes are the identifier and the year of establishment. In the same manner, one may represent other objects positioned as areas.

In the structural scheme of a simple natural reserve message, there are the data segment LUO, containing attribute information of the area, and the data segments ALU, VII and PIS, representing the geometry of the area.

The message in the example could have the following appearance

UNH+1+LUODAT:1:931...
LUO+3/56+1956'ALU+EA+100'VII+M+'PIS+7681104:1488293'PIS+7681266...
LUO+234/77+1977'ALU+EA+50''VII+M+'PIS+7681351:1488432'PIS+7688652'...
VII+M'PIS+7681351:1488432'PIS+7688644'...
...
UNT+...
A phenomenon positioned as an area partition

The objects of the example are soil type areas positioned using their edges. The attribute is the soil type. In the same manner, one may represent other phenomina positioned as area partitions.

In the structural scheme of a simple soil type message, there are the data segment MAA containing the attribute information of the area, the data segments ALU and PIS representing the area and the reference point, and VII and PIS representing area edges. The data segments KOJ and SGT contain information concerning the coordinate system and the representation of spatial information. Coordinate values are abbreviated by subtracting the origin from them.

The message in the example could have the following appearance

UNH+1+MAADAT:1:931...
KOJ+KKJ+PK1++m+6787000:1566000'
SGT+108:130+470:512+35+++AJ++VPP+VSI+10+ARF+AS'
ALU+AJ'MAA+Ka'PIS+454:293'
ALU+AJ'MAA+Mr'PIS+351:332'
...
VII+M'PIS+351:432'PIS+368:477'...
VII+M'PIS+351:432'PIS+322:418'...
...
UNT+...

A grid is formed by an even, rectangular grid of squares, i.e. grid cells, each having a known side length. The number of cells in the direction of the axes of the grid is known. The position of the grid is expressed using its northwest corner point. The grid cells are represented in order from west to east, row by row, from north to south. If the grid is not parallel with the coordinate axes, the position is complemented using the northeast corner point, and references to the points of the compass are approximate.

The dimensions of a grid are represented by a data segment HIL segment. The origin of the grid is represented by a data segment PIS, and the uncertainty given in connection with it represents the uncertainty of the position of the entire grid. Grid cells are represented as data segments, either by groups HAR or as single grid cells HAL.

A group of grid cells is a set of consequential, similar grid cells, where the code value or values are given once and a number expresses the number of grid cells. A grid cell may simultaneously have a maximum of 99 attributes, which are expressed as values of a set of values associated with each attribute.

Data segment identifier and name
data element identifier and name M/C
(and role identifier)
component data element identifier and name repetition M/C format
(and role identifier)
value explanation
HIL Grid
ESTA Representation M an..3
representation of a grid (G)
HAL per grid cell
HAR per group of grid cells
HIUL Dimensions of the grid M
6060 Quantity M n..15
number of cells southward (S)
6060 Quantity M n..15
number of cells eastward (E)
PITU length n..10
side length of grid cell (L)
HAR Group of grid cells
6060 Quantity M n..15
number of similar, consequential grid cells (C)
KOAR Code value max.99 M an..15
code value of grid cell
HAL Grid cell
KOAR Code value max.99 M an..15
code value of grid cell

A phenomenon positioned as a grid

An example is information about soil types represented by grid cells. The attribute is the type of soil. In the same manner one may represent various other phenomena positioned as grids.

In the structural scheme of the simple soil type message, there are the data segment HIL representing the dimensions of the grid, the data segment PIS representing the grid origin and the soil type values as groups of grid cells.

The message in the example could have the following appearance

UNH+1+MAAHIL:1:931...
HIL+R+7:8:50'
PIS+6787400:1566200'
HAR+1+0'HAR+6+Ka'HAR+1+0'
HAR+1+Ka'HAR+3+Mr'HAR+3+Ka'HAR+1+0'
HAR+6+Mr'HAR+2+Ka'...
...
UNT+...


About The Author

从事SAP行业有些年头,对SAP技术稍有了解; 如无特别声明,本博客文章为原创,转载请注明; 博主MSN:xuchunbo0901@hotmail.com; 博主邮箱:bob.xu@abaptech.com。

No Comments

Leave A Reply


注意: 评论者允许使用'@user空格'的方式将自己的评论通知另外评论者。例如, ABC是本文的评论者之一,则使用'@ABC '(不包括单引号)将会自动将您的评论发送给ABC。使用'@all ',将会将评论发送给之前所有其它评论者。请务必注意user必须和评论者名相匹配(大小写一致)。

无觅相关文章插件,快速提升流量