Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

EDIFACT

...

Inbound

EDIFACT Inbound Single Partner Data File to Oracle Adv Positional file including Acknowledgement generation scenario with Data Mapping Rules.

🤔 Problem Statement:

Here XYZ Company is the receiver and it is receiving the Invoice/Bill from its Vendor/Partner through EDI (Electronic Data Exchange) and wants to convert it into the format in which it can process it in its system (here the format is Position (fixed length flat file)).

...

Sample File

...

Understanding the sample file details:

  • AVNETEU: Sender or organization name.

  • 4511866069: Order or transaction identifier.

  • 0010: Segment identifier indicating a header segment.

  • CTCTLEDPPOI ORDEROR4511866069: Order type or description.

  • AVNETEU: Buyer or seller organization name.

  • BE11: Additional identifier or location code.

  • 20231011: Date.

  • 1: Quantity or another numeric value.

  • EDIFACT: Standard identifier.

...

📄 Solution Architecture:

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

  • Create a UNB Envelope

  • Create Source Schema- EDI INVOIC

  • Create Target Schema - Advance positional

  • Create a File Event activity

  • Create Target folder Location (LAN)

  • 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. 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. 

...

 EDI Configuration Example:

Field

Description

Sample Value

EDI Standard

Type of EDI standard used

EDIFACT

EDI Standard Version

Version of the EDIFACT standard

D.96A

Association Assigned Code

Code assigned by the association

(Empty)

Transaction Set Code

Specific type of EDI transaction/document

ORDERS

Example EDIFACT Message with Sample Data

Segment

Element

Description

Sample Value

UNA

Service String Advice

UNA:+.?*'

UNB

S001

Syntax Identifier

UNOA:2

S002

Interchange Sender

1234567890123:ZZ

S003

Interchange Recipient

9876543210987:ZZ

S004

Date and Time of Preparation

210301:1234

0020

Interchange Control Reference

000000001

UNH

0062

Message Reference Number

000000001

S009

Message Identifier

ORDERS:D:96A:UN

BGM

C002

Document/Message Name

220:ORDER

1004

Document/Message Number

450123

1225

Message Function Code

9

DTM

C507

Date/Time/Period

137:20210301:102

NAD

3035

Party Qualifier

BY

C082

Party Identification Details

1234567890123:9

LIN

1082

Line Item Number

1

C212

Item Number Identification

ABC123:VN

QTY

C186

Quantity Details

21:10:EA

UNS

0081

Section Control

S

UNT

0074

Number of Segments

8

0062

Message Reference Number

000000001

UNZ

0036

Interchange Control Count

1

0020

Interchange Control Reference

000000001

Explanation

  • UNA Segment: Defines separators.

  • UNB Segment: Contains interchange header information including sender and recipient.

  • UNH Segment: Message header segment identifying the message type and reference number.

  • BGM Segment: Provides the message name, number, and function.

  • DTM Segment: Specifies the date/time related to the message.

  • NAD Segment: Identifies the buyer.

  • LIN Segment: Describes line item details.

  • QTY Segment: Specifies quantity.

  • UNS Segment: Section control.

  • UNT Segment: Message trailer indicating the number of segments.

  • UNZ Segment: Interchange trailer indicating the control count and reference number.

This example provides a comprehensive view of how EDIFACT messages are structured and the role of each segment.

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

...

Association Assign Code: Code, designated by the organization responsible for creating and managing the specific message type, serves as a unique identifier for the message.

...

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

...

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

...

Info

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. Select Target Data Format/Target Layout

...

  1. Create an Advance Positional advanced positional Target Data Layout

...

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

...

Info

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.

  1. Firstly we create variables

  • Let's create a variable using the following name: varTP_Code

  • The logic of the conditions: The logic examines the value of the UNB0201 element within the UNB segment of the EDIFACT INVOIC message. Depending on the specific value present in UNB0201, it assigns a corresponding output value:

    • 'O0013000023HELLA-KG-EDIP' corresponds to ['HELLA_EU']

    • 'O0013000023HELLA-KG-HER' corresponds to ['HELLA_EU_HER']

    • 'O0013000023HELLA-KG-BHTC' corresponds to ['HELLA_EU_BHTC']

    • 'O0013000023HELLA-KG-HIS' corresponds to ['HELLA_EU_HIS']

    • Any other value corresponds to ['ERROR']

Condition applied : "WHEN CONDITION{$Input_EDIFACT_D07A_INVOIC/EDIRoot/UNB/UNB02/UNB0201='O0013000023HELLA-KG-EDIP' } VALUE=['HELLA_EU' ]
WHEN CONDITION{$Input_EDIFACT_D07A_INVOIC/EDIRoot/UNB/UNB02/UNB0201='O0013000023HELLA-KG-HER' } VALUE=['HELLA_EU_HER' ]
WHEN CONDITION{$Input_EDIFACT_D07A_INVOIC/EDIRoot/UNB/UNB02/UNB0201='O0013000023HELLA-KG-BHTC' } VALUE=[ 'HELLA_EU_BHTC']
WHEN CONDITION{$Input_EDIFACT_D07A_INVOIC/EDIRoot/UNB/UNB02/UNB0201='O0013000023HELLA-KG-HIS' } VALUE=[ 'HELLA_EU_HIS']
OTHERWISE VALUE=['ERROR' ]"

...

  • Let's create a variable using the following name: varNAD_ST_0201

Condition applied: $Input_EDIFACT_D07A_INVOIC/EDIRoot/TS_INVOIC/Loop2_NAD/NAD[NAD01='ST']/NAD02/NAD0201"

The logic of the above condition :

  • The system directs its attention to the section of the message dedicated to storing address information.

  • Within this section, it specifically searches for the address type denoted as "ST", which signifies the ship-to address.

  • Subsequently, it extracts the identification code assigned to the ship-to party from this address segment.

...

  • Let's create a variable using the following name: varTp_loc

Condition applied: WHEN CONDITION{ $varNAD_ST_0201='1014'} VALUE=['SBI1014' ]
WHEN CONDITION{ $varNAD_ST_0201='1015'} VALUE=[ 'SBI1015']
WHEN CONDITION{ $varNAD_ST_0201='1000'} VALUE=['SBI1000' ]
WHEN CONDITION{ $varNAD_ST_0201='1025'} VALUE=[ 'SBI1025']
WHEN CONDITION{ $varNAD_ST_0201='1263'} VALUE=['SBI1263' ]
OTHERWISE VALUE=[ 'ERROR']

The Logic of the above condition :

  • Check the variable: It checks the value of a variable called $varNAD_ST_0201.

  • Assign specific values: Based on the value of $varNAD_ST_0201, it assigns a corresponding output:

    • If $varNAD_ST_0201 is '1014', the output is ['SBI1014'].

    • If $varNAD_ST_0201 is '1015', the output is ['SBI1015'].

    • If $varNAD_ST_0201 is '1000', the output is ['SBI1000'].

    • If $varNAD_ST_0201 is '1025', the output is ['SBI1025'].

    • If $varNAD_ST_0201 is '1263', the output is ['SBI1263'].

  • Default output: If the value of $varNAD_ST_0201 does not match any of the specified values, the output is ['ERROR'].

...

  • Let's create a variable using the following name: varLANtax_amt

Condition applied: round( $Input_EDIFACT_D07A_INVOIC/EDIRoot/TS_INVOIC/Loop26_LIN/Loop27_MOA/MOA/MOA01/MOA0102 * 0.19,2)

The logic of the above condition: The process involves extracting a particular monetary figure from an electronic invoice, computing 19% of that amount, and subsequently rounding the outcome to two decimal places.

...

  • Let's create a variable using the following name: varNAD_BY

Condition applied: $Input_EDIFACT_D07A_INVOIC/EDIRoot/TS_INVOIC/Loop2_NAD/NAD[NAD01='BY']/NAD02/NAD0201

The logic of the above condition: Putting it all together, the condition is seeking the initial sub-element of the second element (NAD0201 within NAD02) in the Name and Address (NAD) segment, which is designated as of the Buyer ('BY') in an electronic invoice document.

In more straightforward terms, it locates a particular address detail for the buyer in an electronic invoice.

...

  • Let's create a variable using the following name: varTP_BILL_LOC

Condition applied: WHEN CONDITION{ $varNAD_BY='317050'} VALUE=[ 'SBI1014']
WHEN CONDITION{ $varNAD_BY='317051'} VALUE=['SBI1015' ]
WHEN CONDITION{ $varNAD_BY='317052'} VALUE=['SBI1000' ]
WHEN CONDITION{ $varNAD_BY='317053'} VALUE=[ 'SBI1025']
WHEN CONDITION{ $varNAD_BY='317054'} VALUE=['SBI1263' ]
OTHERWISE VALUE=[ 'ERROR']

The logic of the above condition: In more straightforward terms, based on the value stored in $varNAD_BY, one of the designated values ('SBI1014', 'SBI1015', 'SBI1000', 'SBI1025', 'SBI1263') will be allocated. If $varNAD_BY does not correspond to any of these particular values, it will default to 'ERROR'. This configuration enables varied results depending on the value of $varNAD_BY.

...

  1. We implement the For Each operation at the top level on the destination side.

...

 Steps to Turn on the Transaction

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

...

  • 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 EDIFACT Interchange logs

Logs provide runtime details about the inbound and outbound transactions.

...