Step by Step Guide to Validate EDI ANSI X12 Document using Java Mapping By Kubra Fatima, Yash Technologies Electronic Data Interchange(EDI) refers to the structured transmission of data be tween organizations by el ectronic means. It is used to transfer electronic documents from one computer system to another (i.e.) f rom one trading partner to another trading partner. SAP relies on Partners (Ex: Seeburger) to provide EDI Adapters for Exchange Infrastructure. This Adapter is used to perform conversion between EDI and XML format. Now, we would look at how to read EDI ANSI X12 document in SAP PI 7.0without using any partner adapter. Pre-Requisites: Basic knowledge of XI and how it works. Basic know ledge of Java and how to do Java Mapping i n XI. Basic knowledge of ANSI X12 standards for EDI. Scenario: EDI ANSI X12 document is read as flat/text file using Sender File Adapter. To send correct EDI Document to the trading partner, the document is validated against EDI standards in SAP PI and the validated EDI ANSI X12 document is transferred to trading partner using Receiver File Adapter.
15
Embed
(is) Step by Step Guide to Validate EDI ANSI X12 Document Using Java Mapping
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
8/10/2019 (is) Step by Step Guide to Validate EDI ANSI X12 Document Using Java Mapping
Step by Step Guide to Validate EDI ANSI X12 Document using Java Mapping
By Kubra Fatima, Yash Technologies
Electronic Data Interchange (EDI) refers to the structured transmission of data between organizations by electronic means. It is used to transfer electronicdocuments from one computer system to another (i.e.) f rom one trading partner to another trading partner.
SAP relies on Partners (Ex: Seeburger) to provide EDI Adapters for Exchange Infrastructure. This Adapter is used to perform conversion between EDI and XMLformat.
Now, we would look at how to read EDI ANSI X12 document in SAP PI 7.0 without using any partner adapter.
Pre-Requisites:
Basic knowledge of XI and how it works.
Basic knowledge of Java and how to do Java Mapping in XI.
Basic knowledge of ANSI X12 standards for EDI.
Scenario:
EDI ANSI X12 document is read as flat/text file using Sender File Adapter. To send correct EDI Document to the trading partner, the document is validatedagainst EDI standards in SAP PI and the validated EDI ANSI X12 document is transferred to trading partner using Receiver File Adapter.
8/10/2019 (is) Step by Step Guide to Validate EDI ANSI X12 Document Using Java Mapping
Check if in-between one ISA segment to IEA segment, no other ISA, IEA segments exists, else raise an exception.
Check if in-between one GS segment to GE segment, no other GS, GE segments exists, else raise an exception.
Check if in-between one ST segment to SE segment, no other ST, SE segments exists, else raise an exception.
Check if total number of segments from ST to SE is equal to the value in SE01 (Number of included segments) else raise an exception.
Check if the Interchange control number specified in ISA13 equal to the Interchange control number specified in IEA02, else raise an exception. Check if the group control number specified in GS06 equal to the Group control number specified in GE02, else raise an exception.
Check if the Transaction Set control number specified in ST02 equal to the Transaction Set control number specified in SE02, else raise an exception.
Check if in the ISA segment, data elements ISA05, ISA06, ISA07, ISA08 are empty, raise corresponding exceptions.
Step-By-Step approach for validating above conditions in a scenario:
1. System Landscape Directory (SLD)
Create the Product.
Create the Software Component for the newly created Product.
Define Technical Systems.
Define Business Systems (BS_FILE_SENDER & BS_FILE_RECEIVER) and assign the related integration Server for the Business Systems.
2. Integration Repository (IR)
Import the Software Component into IR.
Create the Name Space.
Create the Source Data Type.
8/10/2019 (is) Step by Step Guide to Validate EDI ANSI X12 Document Using Java Mapping
Message Mapping MM_String_2_XML is used to split the validated EDI Document. A RECORD is created in the target structure for each segment in the EDIDocument.
8/10/2019 (is) Step by Step Guide to Validate EDI ANSI X12 Document Using Java Mapping
The complete EDI ANSI X12 document is read in the Data Field specified in the Source Message Type MT_Source Using File Content Conversion at senderCommunication Channel.
Create a receiver communication channel CCT_FILE_REC_EDIValidation_YH1309 under Business System BS_FILE_RECEIVER and configure as
below
8/10/2019 (is) Step by Step Guide to Validate EDI ANSI X12 Document Using Java Mapping
Put the Text file which contain EDI ANSI X12 document as a single string on the FTP server. output file will be as follows(only if all the validations are correct).
8/10/2019 (is) Step by Step Guide to Validate EDI ANSI X12 Document Using Java Mapping
If you put a incorrect file on the FTP server (like No of segment from ST to SE is not equal to the value in SE01),then message in the SXMB_MONI is as follows