EDI Envelope Segment Maintenance
Envelope Segments refers to the segments which are automatically inserted before and after messages, these segments do not ordinarily contain transaction data, they serve as envelope segments to the data segments. These segments are generally known as Service Segments or Envelope Segments. Envelope segments are responsible for containing Interchange & message reference numbers, count of contents (such as; Segments within Message and Messages within Interchange), Identification values and control data.
Envelope Segment definitions are assigned to each Trading Partner Event and are used for Inbound and Outbound transactions:
Outbound
The configuration of Interchange and Message Envelope Header/Trailer Segments is mandatory for Outbound Trading Partner Events. The Envelope Segment values are automatically inserted by the ECS/EDI Processor when the Interchange is created (Message Pack). The Message Envelopes Segment Header is retrieved and inserted at the beginning of each Message. The Message Trailer is added to the end of each Message data.
Functional Groups can be used to group together messages of the same type, the use of functional groups is optional (and rarely used with EDIFACT). If functional groups are used the grouping is performed by Trading Partner Event.
The Interchange Header and Trailer Segments serve as an envelope around the messages/functional groups. The interchange header contains the addressing information used to transmit the EDI Interchange to the relevant Trading Partner and for the Trading Partner to identify who the interchange is from.
The Syntax Set Envelope Header/Trailer Segment values are automatically copied on the creation of a new Outbound EDI Trading Partner Event. The Syntax Set default Envelope Segment values can be maintained using Syntax Set Maintenance.
Inbound
The configuration of Envelope Header/Trailer Segments is important for Inbound Trading Partner Events. The values configured within Envelope Segments is used as comparison data to associate inbound interchanges and messages with EDI Trading Partner Events. A value must be entered that matches the Interchange/Message header to ensure the Interchanges and messages are associated with the correct Trading Partner Event.
Partial matching of Inbound Interchanges and Messages is acceptable, so if your Trading Partner Id is "5469852697521" and this value is unique then it is possible to define this value as the Interchange Header Envelope value. Likewise, for Message Envelope header values, "ORDERS" would be allowed if the EDI Message header segment contained this value.
The Message Envelope Header Segment values are automatically populated with the EDI Message Id on the creation of a new Inbound EDI Trading Partner Event.
Inbound interchanges can only be processed if there is a
positive match against a defined Trading Partner Event. Matching is performed
using the Interchange Envelope Header values defined within the EDI Trading
Partner Events. If an Unknown Interchange is received then it is placed in the
folder defined as the “unknown interchange” Folder (Default value is
C:\ECSIE\EDI_UNKNOWN\) and an Error report sent to the System
administrator stating that an Interchange has been received from an Unknown
Trading Partner.
Note: The email that is sent to the Administrator on the receipt of unknown Interchanges can be disabled to allow the receipt of unknown interchanges to be ignored (but still placed in the EDI_UNKNOWN Folder). This Error email can be disabled by changing the system Parameter "ECSEDI_Send_Unmatched_TP_Error_Messages" from “1” (the default) to “0”.
If an EDI Message is being unpacked for a known Trading
Partner that does not have a Trading Partner Event defined for the message type
being processed then the Status of the Control record is changed to
"ERR", the Event Id set to "*UNKNOWN" and an Error message
sent to the system Administrator. The matching of the Message to the Trading
Partner Event is performed using the Message Envelope Header values defined
within the Trading Partner Events.
EDI Control records that have been assigned *UNKNOWN
Trading Partner Events can be later re-assigned to a valid Event using the
"Reset" function within the "EDI Transaction Control" Panel.
Note: The email that is sent to the Administrator on the
receipt of unknown messages for known Trading Partners can be disabled to allow
un
Configuration of Inbound & Outbound Events
Outbound Header and Trailer Envelope Segments can contain specific volatile information, such as Date, Time and retrieve certain key values from the ECS/EDI Processor Control file. The insertion of these values is controlled by using the following special values which will be automatically replaced by the ECS/EDI Processor when the outbound EDI Interchange is generated:
| Special Value | Replacement Value | Example |
| &YYMMDD | Current Date in YYMMDD format | 021231 |
| &YYYYMMDD | Current Date in YYYYMMDD format | 20030231 |
| &YYYY | Current Year with Century | 2003 |
| &YY | Current Year | 02 |
| &MM | Current Month | 12 |
| &DD | Current Day | 31 |
| &HHMMSS | Current Time HHMMSS format | 125959 |
| &HHMM | Current Time HHMM format | 1259 |
| &HOUR | Current Hour | 12 |
| &MIN | Current Minute | 59 |
| &SEC | Current Second | 59 |
| &XCGUI | Unique Identifier from IEXC.XCGUI | 021231125959001 |
| &XCOGUI | Original Unique Identifier from IEXC.XCOGUI | 021231125959001 |
| &XCAREF | Application reference from IEXC.XCAREF | PO1001 |
| &SID | Sender Id retrieved from EDI Trading Partner Event IEXE.XESID | ECS |
| &RID | Receiver Id retrieved from EDI Trading Partner Event. IEXE.XERID | BBB |
| &XCSID | Sender Id retrieved from EDI Control File. IEXC.XCSID | ECS |
| &XCRID | Receiver Id retrieved from EDI Trading Partner Event. IEXC.XCRID | BBB |
| &TP | Trading Partner retrieved from EDI Control File. IEXC.XCTP | BBB Limited |
| &XCTP | Trading Partner retrieved from EDI Control File. IEXC.XETP | BBB Limited |
| &EVENT | EDI Trading Partner Event Id. IEXE.XEEVT | BBB_ORD_OUT |
| &PROTOCOL | Communications Protocol retrieved from EDI Trading Partner Event. IEXE.XETRAN | FTP |
| &EDISTD | EDI Standard retrieved from EDI Trading Partner Event. IEXE.XESTD | EDIFACT |
| &EDIMSGVER1 | 1 position of EDI Message Version, from EDI Trading Partner Event IEXE.XEVER | D |
| &EDIMSGVER2 | Last 3 positions of EDI Message Version, from EDI Event IEXE.XEVER | 96A |
| &EDIMSGVER | EDI Message Version retrieved from EDI Event, IEXE.XEVER | D96A |
| &EDIMSG | EDI Message Id retrieved from EDI Trading Partner Event. IEXE.XEMSG | ORDERS |
| &EDISYN | EDI Syntax Set retrieved from EDI Trading Partner Event. IEXE.XESYN | UNOB |
| &EDISYNVER | EDI Syntax Set Version retrieved from EDI Trading Partner Event. IEYY.YYVER | 1 |
| &SYSINTCOUNT | System Level Interchange Count | 155 |
| &SYSFGCOUNT | System Level Functional Group Count | 315 |
| &SYSMSGCOUNT | System Level Message Count | 525 |
| &TPINTCOUNT | Trading Partner Level Interchange Count | 155 |
| &TPFGCOUNT | Trading Partner Level Functional Group Count | 315 |
| &TPMSGCOUNT | Trading Partner Level Message Count | 525 |
| &EVTINTCOUNT | EDI Trading Partner Event Level Interchange Count | 155 |
| &EVTFGCOUNT | EDI Trading Partner Event Level Interchange Count | 315 |
| &EVTMSGCOUNT | EDI Trading Partner Event Level Interchange Count | 525 |
| &INTFGCOUNT | Number of Functional Groups within Interchange | 2 |
| &INTMSGCOUNT | Number of Messages within Interchange | 10 |
| &FGMSGCOUNT | Number of Messages within Functional Group | 10 |
| &MSGSEGCOUNT | Number of Segments within Message | 23 |
Note: Special Values &SYSINTCOUNT to &MSGSEGCOUNT can be configured to write a value with a fixed length of between 3 and 12 positions. The values should be defined by suffixing the Special value with the required number of positions. The following example shows how the Special values can be written with a fixed length of 7 positions:
| &SYSINTCOUNT7 | System Level Interchange Count, Length of 7 positions | 0000155 |
| &SYSFGCOUNT7 | System Level Functional Group Count, Length of 7 positions | 0000315 |
| &SYSMSGCOUNT7 | System Level Message Count, Length of 12 positions | 0000525 |
| &TPINTCOUNT7 | Trading Partner Level Interchange Count, Length of 7 positions | 0000155 |
| &TPFGCOUNT7 | Trading Partner Level Functional Group Count, Length of 7 positions | 0000315 |
| &TPMSGCOUNT7 | Trading Partner Level Message Count, Length of 7 positions | 0000525 |
| &EVTINTCOUNT7 | EDI Trading Partner Event Level Interchange Count, Length of 7 positions | 0000155 |
| &EVTFGCOUNT7 | EDI Trading Partner Event Level Interchange Count, Length of 7 positions | 0000315 |
| &EVTMSGCOUNT7 | EDI Trading Partner Event Level Interchange Count, Length of 7 positions | 0000525 |
| &INTFGCOUNT7 | Number of Functional Groups within Interchange, Length of 7 positions | 0000002 |
| &INTMSGCOUNT7 | Number of Messages within Interchange, Length of 7 positions | 0000010 |
| &FGMSGCOUNT7 | Number of Messages within Functional Group, Length of 7 positions | 0000010 |
| &MSGSEGCOUNT7 | Number of Segments within Message, Length of 7 positions | 0000023 |
To configure EDI Envelope Segment values, perform the following:
From the main "ECS/integrated email" panel click on the drop down menu "e-commerce", select "EDI" then select "EDI Trading Partner Events"
The "EDI Trading Partner Event Maintenance" window will now be displayed, listing any previously defined EDI Events.
"Edit" the required Outbound EDI Trading Partner Event and click on the "Interchange" Command button.
A panel resembling the following window should be displayed, containing the default values retrieved from the EDI Syntax Set:
Note: Sequence number 1 refers to Header Envelope Segments and Sequence number 2 refers to Trailer Envelope Segments.
Select the required record and click "Edit" command button to edit the Envelope Value.
The "EDI Header/Trailer Maintenance" window will now be displayed ready to maintain the EDI Envelope Segment values.
<<<<< Back to ECS/EDI Menu <<<<<
Copyright © 1998-2003 Electronic Commerce Solutions All rights reserved.
ECS/integrated email & ECS/ie are trademarks of Electronic Commerce Solutions, Ltd. Other brand names and product names used in this document are the trademarks and trade names of their respective holders and may be registered.