OUTBOUND - EDIFACT

EDIFACT ORDRSP Outbound

Oracle Adv Positional file(Single/Multiple Partner Data File) to EDIFACT outbound including Acknowledgement reconcile scenario with Data Mapping Rules.

Problem Statement:

XYZ Company is the sender of the Purchase Order file and aims to convert it from a fixed-length flat-file format into an EDI (Electronic Data Exchange) format that can be processed in its system by Vendor/Partner.

Solution Architecture:

  1. Design a Transaction using an EDI Inbound Pre-built template.

  2. Create a UNB Envelope

  3. Create Source Schema- Advance positional

  4. Create Target Schema - EDI ORDRSP

  5. Create a File Event activity

  6. Create Target folder Location (LAN)

  7. Create Mapping activity

Pre-requisites:

a. Create a Network for which you are creating a transaction.

b. Create a Partner for the data exchange.

Solution:

Design: Create transaction in Adeptia Connect to convert data

  1. Go to transaction > Select EDI Outbound Pre-built Template

image-20240619-034458.png
  1. To configure the transaction provide the name in the context of the use case and a description of the Transaction.

image-20240618-034132.png
  1. Select the Network from the Select Network field & Select the partner for whom you are creating this Transaction. All the Partners of the Network(s) to which this Template belongs will be populated in the field. 

  1. Select and configure the EDI Configuration details like EDI Standard, EDI Standard version, association assign code, transaction set code, etc.

The UNB segment in an EDIFACT message serves as the interchange header, providing essential information about the interchange, including details about the sender and recipient, the date and time the message was created, and control information. Here is an in-depth look at each property of the UNB segment:

  1. Syntax Identifier (UNB.1)

    • Element: S001

    • Component Elements:

      • 0001: Syntax identifier

        • Example: "UNOA" (UN/ECE level A)

        • Description: Specifies the syntax rules used in the interchange. "UNOA" is a common value indicating EDIFACT syntax.

      • 0002: Syntax version number

        • Example: "2"

        • Description: Indicates the version of the syntax. Version "2" is widely used.

  2. Interchange Sender (UNB.2)

    • Element: S002

    • Component Elements:

      • 0004: Sender identification

        • Example: "1234567890123"

        • Description: A unique identifier for the sender, often a company’s EDI ID.

      • 0007: Identification code qualifier

        • Example: "ZZ"

        • Description: Qualifier for the sender’s ID, where "ZZ" means mutually defined.

      • 0008: Address for reverse routing

        • Description: Optional address for routing responses back to the sender.

  3. Interchange Recipient (UNB.3)

    • Element: S003

    • Component Elements:

      • 0010: Recipient identification

        • Example: "9876543210987"

        • Description: A unique identifier for the recipient, often a company’s EDI ID.

      • 0007: Identification code qualifier

        • Example: "ZZ"

        • Description: Qualifier for the recipient’s ID, where "ZZ" means mutually defined.

      • 0014: Routing address

        • Description: Optional routing address for the recipient.

  4. Date and Time of Preparation (UNB.4)

    • Element: S004

    • Component Elements:

      • 0017: Date of preparation

        • Example: "210301"

        • Description: Date when the interchange was prepared, in YYMMDD format (March 1, 2021).

      • 0019: Time of preparation

        • Example: "1234"

        • Description: Time when the interchange was prepared, in HHMM format (12:34 PM).

  5. Interchange Control Reference (UNB.5)

    • Element: 0020

    • Description: A unique reference number assigned by the sender to the interchange, ensuring each interchange can be uniquely identified.

    • Example: "000000001"

  6. Recipient's Reference/Password (UNB.6)

    • Element: S005 (optional)

    • Component Elements:

      • 0022: Recipient's reference/password

        • Description: Optional reference or password for the recipient.

      • 0025: Recipient's reference/password qualifier

        • Description: Qualifier for the reference or password.

  7. Application Reference (UNB.7)

    • Element: 0026

    • Description: An optional reference to a specific application or message within the interchange.

    • Example: "MYAPP"

  8. Processing Priority Code (UNB.8)

    • Element: 0029 (optional)

    • Description: Indicates the processing priority of the interchange.

    • Example: "1" (high priority)

  9. Acknowledgement Request (UNB.9)

    • Element: 0031 (optional)

    • Description: Indicates whether an acknowledgment of receipt is requested.

    • Example: "1" (acknowledgment requested)

  10. Interchange Agreement Identifier (UNB.10)

    • Element: 0032 (optional)

    • Description: Identifies an agreement between the sender and recipient regarding the interchange.

  11. Test Indicator (UNB.11)

    • Element: 0035 (optional)

    • Description: Indicates whether the interchange is a test.

    • Example: "1" (test interchange)

Example UNB Segment

Here is an example of a UNB segment with typical values:
UNB+UNOA:2+1234567890123:ZZ+9876543210987:ZZ+210301:1234+000000001++MYAPP+1'

  • UNB+: The segment tag indicating the start of the UNB segment.

  • UNOA:2: Syntax identifier "UNOA" and version "2".

  • 1234567890123

    : Sender identification "1234567890123" with qualifier "ZZ".

  • 9876543210987

    : Recipient identification "9876543210987" with qualifier "ZZ".

  • 210301:1234: Date "210301" (March 1, 2021) and time "1234" (12:34 PM).

  • 000000001: Interchange control reference number "000000001".

  • ++MYAPP: Optional application reference "MYAPP".

  • +1: Optional processing priority code "1" (high priority).

This segment initiates the interchange, providing the necessary information to process and route the contained messages correctly.

UNA Segment Properties

The UNA segment is a fixed-length segment containing six characters, each representing a specific separator or indicator.

  1. Component Data Element Separator

    • Position: UNA1

    • Default Value: +

    • Description: Separates component data elements within a composite data element.

  2. Data Element Separator

    • Position: UNA2

    • Default Value: ,

    • Description: Separates simple data elements.

  3. Decimal Mark

    • Position: UNA3

    • Default Value: :

    • Description: Indicates the decimal point in numeric values.

  4. Release Indicator

    • Position: UNA4

    • Default Value: .

    • Description: Used to release (escape) special characters when they are part of the data.

  5. Repetition Separator

    • Position: UNA5

    • Default Value: ?

    • Description: Separates repeated instances of data elements or segments.

  6. Segment Terminator

    • Position: UNA6

    • Default Value: '

    • Description: Indicates the end of a segment.

  1. Add UNB Envelope Properties, and select the checkbox for content-based routing.

  1. In the Transaction settings page > select the Repository File Retention.

  • Repository File Retention- DONT DELETE, DELETE, DELETE ON SUCCESS, and DELETE ON SUCCESS EXCEPT SOURCE DATA

  1. Click Next to define the Source as a LAN File.

File Event Recommended setting: Need to maintain the polling frequency at 1 minute and ensure that the stable time is not less than 10 seconds.

  1. Click on Next to add the File Event.

 

  1. Click on Next to select the Source data format & Layout

  1. Click Next to define the Destination application account.

  1. Click on Next to create a LAN File Target

  1. Click on Next to fill in the File Generation Policy

  1. Click on Next to define the Routing Rule

  1. Click on Next to create data mapping > Load Source & Target Schema

Note: When an icon is marked as (Required), it must be mapped to a specific value in the data mapping process. Failure to do so will result in an error at the schema level during transaction execution.

Adding a new variable

Let's create a variable using the following name: varDOCCODE

Local Variable Value: normalize-space( Document_Code)

Logic of the above condition:

The expression normalize-space(Document_Code) is a function typically used in XPath or XQuery to manipulate text data. Here's what it means in simple terms:

  1. Document_Code: This refers to a piece of text or string data named "Document_Code".

  2. normalize-space(): This is a function used to clean up and normalize whitespace characters within a string:

    • It removes leading and trailing whitespace (spaces, tabs, newlines, etc.).

    • It also replaces multiple consecutive whitespace characters inside the string with a single space.

  1. Let's create a variable using the following name: varTPCODE

Local Variable Value: normalize-space(TP_Translator_Code_855 )
Logic of the above condition:

  • It takes the text stored in the variable or field named "TP_Translator_Code_855".

  • It ensures that any extra spaces or tabs at the beginning or end of this text are removed.

  • It condenses any multiple spaces, tabs, or newline characters within the text into a single space.

This function is useful for cleaning up and standardizing text data, making it easier to handle and ensuring consistency when working with strings in data processing or document handling tasks.

  1. Let's create a variable using the following name: varPosition

Local Variable Value: string(position( ))
Logic of the above condition: In more straightforward language, the function string(position()) provides a text-based representation (string) of the current item's position (index) within a sequence or list. It is commonly utilized to exhibit or modify the order or index of items in XML or similar structured data formats.

  1. Let's create a variable using the following name: varSet_0010_Loop

Local Variable Value: set-context('0010Loop', $varPosition)

Logic of the above condition: The value of $varPosition is being stored or associated with a specific identifier '0010Loop'. This identifier could be used later in the code to retrieve or manipulate the value stored in $varPosition under the context or category '0010Loop'. This kind of mechanism is often used in programming to manage and organize data based on different contexts or purposes within an application.

  1. Let's create a variable using the following name: varGet_0010Loop

Local Variable Value: get-context( '0010Loop','' )

Logic of the above condition: The function aims to retrieve the value that was previously stored or set under the identifier '0010Loop'. The second parameter, '', serves as a placeholder or default value if there is no value associated with '0010Loop'.

  1. Let's create a variable using the following name: varPos

Local Variable Value: position( )

The Logic of the above condition: position() appears to be a function call that retrieves the current position or index within a certain context or structure.

  • In the TS_ORDRSP field, we implement a For Each Loop and utilize a Local Variable named "varPos".

  • Applying Loop3_NAD,Loop3_NAD[1] & Loop3_NAD[2] For Each iteration to meet the requirement within the nested dataset.

  • Applying Loop26_LIN For Each iteration to meet the requirement within the nested dataset.

Steps to Turn on the Transaction

After you have Saved and Exit the Transaction page. You will be asked to Turn on the transaction

 Viewing execution details

  • Navigate to the Dashboard to access execution details. The Status column will indicate the current status of the transaction.

  • Select the execution icon located under Action to delve into specific information about the transaction.

  • To gain insights into each step's execution details, click on the information icon corresponding to that particular step.

  • For additional transaction details, expand by clicking on the More arrow within the Action menu.

 

EDI Dashboard and EDI X12 Interchange logs

Logs provide runtime details about the inbound and outbound transactions.

Users can search logs with Partner ID, Sender/Receiver ID, Transaction Control Number, and any other data field.