Home » Categories » Solutions by Business Process » Profiler

EDI Messages and Files

Datafile Software

EDI Messages and Files

Returning to the postal analogy, the EDI computer file is the envelope. The very first piece of information in the file describes to whom the envelope is addressed, and also from whom it comes. The remainder of the information, the data being transferred, is the contents of the envelope — the orders, or invoices, or whatever.

As the data itself is going from one data processing system into another, it needs to be highly structured, the particular structure depending on the information it conveys. A brief description of EDI structures is given here for those that might be interested, although this knowledge is not necessary in order to set up and use the EDI interface.

The structure is based, of course, on the information being sent. An order, for example, first contains general data such as the order number, the reference, and delivery information. Then there will be one or more items ordered, for each of which a product code, quantity, and even a price will be included amongst other information for each line. The bodies that have developed the structures for (e.g.) Tradacoms and EDIFACT took very wide soundings in many arms of industry and commerce, with the result that their standards can cater for a very wide degree of variation.Most companies use only a subset of the facilities that are available.

Both Tradacoms and EDIFACT use similar terms when describing their structures. Both standards define the constructions of messages. A messagein EDIFACT would represent (say) a single order, although in Tradacoms a message could be a group of orders to a single destination. Messages for a particular company are generally grouped into a single envelope or computer file, as already described.

A message comprises a number of segments each of which describes a particular part of the overall set of information. In both standards, a segment starts with a three-character mnemonic that describes the data within it. One segment may define the delivery address if different, for example, so may not appear if the goods are to be delivered to the standard address. Another segment may describe the order line, and include the product code, quantity and price.

The data within a segment is broken down into data elements, which may contain more than one data item. A data item is the lowest level of detail, and has one unique purpose; product codes will be data items, as quantities and prices.This structure is illustrated in the diagram shown here.

An example of a multi-item data element is the one that gives the product code in an order line.It could be described by a universal code (the EAN code), or by the supplier’s own code, or by some other code.A data item must be specific, so one order line might quote the EAN code, but the next the supplier’s code if no EAN code exists for that product yet. The EAN data item is one data item, which would contain a value in the first order line, but contain no data in the second. The supplier’s code, which is another data item, would probably not be quoted in the first order line, but would be present in the second.

It is the level of detail down to which these standards were designed that gives them the possibility of universal use.

To describe a message and its segments, a "family tree” style of diagram is used. The example below is part of the Tradacoms order file, which is made up from three or four messages, ORDHDR, ORDERS, ORDTLR and (optional) RSGRSG. The three-character segment codes are shown in the boxes, and the asterisk shows that there can be multiple occurrences of that segment.Some segments may be mandatory; others may be optional according to some rules.

Reproduced from the TRADACOMS User Guide.

The structure of each segment is then defined, in terms of the data elements and their constituent data items — which may also be mandatory or conditional — and the structure of the data item in terms of being alphabetic, numeric, a mixture, or taking certain specific values.

An EDI file is just a string of text

The Datafile EDI capability uses a definition process both to create EDI message files from data in database files, and to create database records from EDI messages.

For presentation purposes, a more meaningful picture of the file results by starting each segment on a new line, as shown overleaf. The single quote mark, equal sign, plus sign and colon characters have special meanings in Tradacoms messages, separating segments, segment codes, data elements and data items respectively — a similar technique with different characters is used for EDIFACT messages.

This shows the structure in terms of the segments, which you can relate back to the diagram shown earlier.It is then easier, if necessary, to see the details of the message from this printout. It is clear, for example, that there are five detail lines in this order (the OLD segments).

If you needed to enter this order by hand, you would find, from reading the detailed message structure, that the product bar-code (EAN code) is the data item starting with the number "5”. The next number is the customer’s own code for the product, and the final two items are the pack size (single in each case) and the order quantity.

If you should ever need to print an EDI file in the above form, incidentally, use the option Print an EDI File that you will find under the System Maintenance option from the main menu — see detailed instructions above.

Custom Fields
  • Release ID: Standard
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
L - Listings
Viewed 1301 times since Thu, Jun 28, 2012
Create New Database
Viewed 1848 times since Fri, Jun 29, 2012
Q - Batch Run of a Menu
Viewed 1209 times since Fri, Jun 29, 2012
F - Forms Maintenance
Viewed 1136 times since Thu, Jun 28, 2012
User Defined Reports – Rotate Print Items
Viewed 852 times since Wed, Jun 13, 2012
A3 Datafile Application Extra Data Items - EDI Order Processing
Viewed 1303 times since Thu, Jul 5, 2012
B – Blank out a Database
Viewed 735 times since Thu, Jun 28, 2012
Operational Overview - EDI Order Processing
Viewed 1231 times since Thu, Jul 5, 2012
Screen Actions - Additional F4-Select Options
Viewed 1295 times since Fri, Jun 8, 2012
Maintain Table Entries
Viewed 1238 times since Fri, Jun 29, 2012