4.1.Syntax directories

How the messages are supported

In order to display an EDI file correctly, there must exist matching syntax directories with
the display rules. All syntax directories are in the R2EdiViewerSD.zip file
with the following directory structure:

Depending on the detected EDI message, the corresponding display rule is searched
language dependent in these directories. The Windows language is used by default,
overwritten by the language-startup parameter.

(info) Tip

Customizations must be made in the empty file R2EdiViewerSD.zip,
which is in the subdirectory "private".

 

4.1.1. Extend UN/EDIFACT-directories

EDIFACT directories consist of 3 files per release (e.g. D.23A), a relationship information
and the message structure files:

  • EDSD.23A  = segment specifications
  • EDMD.ZIP  = message structures
  • UNCL.23A  = field value short description (code lists)
  • Sl40303.txt = field value short description (code lists) for the service segment fields from version 4
  • UNSL.19A  = field value short description (code lists) for the service segment fields for version 3


1. https://unece.org/trade/uncefact/unedifact/download for the EDSD/UNCL/EDMD files

The file "d23a.zip" contains the 3 files:

  • edsd.zip with the file EDSD.23A
  • uncl.zip with the file UNCL.23A 

    Save both files to "R2EdiViewerSD.zip\SyntaxDirectories\EDIFACT\en".

  • edmd.zip with the message structures for each message.
    Create a directory D23A into "R2EdiViewerSD.zip\SyntaxDirectories\EDIFACT\msgstruct".
    Then unpack all edmd.zip files into this directory.


2. Code lists for syntax version 3 (UNSL file)

From February 2022, only syntax version 4 will be a valid ISO standard. This means that EDIFACT messages
based on syntax version 3 are no longer formally standard (ISO) compliant.

For compatibility reasons, for a new EDIFACT directory (e.g. D.24A)
copy the file "EdiViewerSD.zip\SyntaxDirectories\EDIFACT\en\UNSL.23A" to UNSL.24A
and add the description text in field 0054.


3. https://service.gefeg.com/jwg1/Current/cl/lc1.htm for code lists from syntax version 4

For a new EDIFACT directory (e.g. D.24A), copy the file
"EdiViewerSD.zip\SyntaxDirectories\EDIFACT\en\Sl40303.txt" to Sl40304.txt.
Then the changes according to service.gefeg.com must be manually entered for each field
in the Sl40304.txt file.

 

4. Relation.csv

The file "R2EdiViewerSD.zip\SyntaxDirectories\EDIFACT\SI-Relation.csv" makes the connection between
the EDIFACT directory (e.g. D.24A) and the code lists from syntax version 4 (e.g. Sl40304.txt).

...
D.19A;Sl40215.txt
D.19B;Sl40216.txt
D.20A;Sl40217.txt
D.20B;Sl40218.txt
D.21A;Sl40219.txt
D.21B;Sl40300.txt
D.22A;Sl40301.txt
D.22B;Sl40302.txt
D.23A;Sl40303.txt

The entry "D.24A;Sl40304.txt" should then be added for D.24A.

 

4.1.2. Extend SAPIDOC-directories

SAPIDOC directories consist of a segment specification file per IDOC message.
In addition, there is a file with the field value short descriptions and a file with the
message structures, valid for all IDOC messages.

4.1.2.1. SAPIDOC segment specification file

The SAPIDOC segment specification file name of an IDOC message is, for example:

  • EDSD.DELFOR02 for delivery schedule
  • EDSD.SHPMNT05 for delivery note
  • EDSD.INVOIC02 for invoice

Constant is always EDSD. After one point, the IDOC Basic type / Enhancement name follows.
Any existing slashes in the EDSD file name must be replaced by underlines.

Via SAP ® transaction WE60, the file can be generated directly from the SAP® system:

  • As the "Basic type", select desired IDOC (e.g. DELFOR02)
  • Alternatively, you can specify an IDOC customer enhancement under "Enhancement".
  • Via the menu: select Documentation/C-header

 

  • Save the file via the menu "System/List/Save/Local file".
    Use as file name EDSD.DELFOR02 and select 1160 (Microsoft 1252: Superset of ISO 8859-1)
    as the SAP® code page.
    Save the file to R2EdiViewerSD.zip\SyntaxDirectories\SAPIDOC\en.

 

4.1.2.2. SAPIDOC message structure

  1. The table IDOCSYN contains the message structures of all the basic IDOCs.
    It comes standard with R2EdiViewer.
    If you have created your own IDOCs (IDOC types), only the table lines
    of your own IDOCSs must be taken over.


  2. The table CIMSYN contains the message structures of customer enhancements
    to existing IDOCs.
    If you have extended an IDOCS, the complete table must be adopted.

Transfer of the tables to the directory R2EdiViewerSD.zip\SyntaxDirectories\SAPIDOC\msgstruct:

  • Use transaction SE16 to display both tables
  • Save the list display as "Local File" with "Text with Tabs" and SAP® code page = 1160 under:
    - IDOCSYN.PRV
    - CIMSYN.PRV
  • Delete all heading rows and the empty first column
  • Save the .PRV files to R2EdiViewerSD.zip\SyntaxDirectories\SAPIDOC\msgstruct

4.1.2.3. SAPIDOC field value short description

All field value short descriptions for all IDOC messages are in the file UNSL.ALL and
must be adapted or extended manually in case of changes.
A modified UNSL.ALL file, with e.g. English field value short descriptions, must then be included
in the directory "R2EdiViewerSD.zip\SyntaxDirectories\SAPIDOC\en".