Step by Step Guide to Validate EDI ANSI X12 Document using Java Mapping
a mapping object of type Imported
Archive. To import the archive, choose Import
Now select the jar / zip file you have created for your
mapping program and save it.
Create Interface Mappings (IM_EDI), select Outbound Message Interface as
Source Interface and Inbound Message Interface as target interface.
Now select Mapping
Program Type as Java Class and choose archive program name IA_ValidateEDI.Add
Message Mapping MM_String_2_XML below java class as shown below.
Test Interface Mapping
.Give the input to the Data field as given below
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 EDI Document.
If the total number of segments from ST to SE is not equal to the number
in SE01 (Number of included segments) it raises
MISMATCH_TOTAL_NUMBET_OF_SEGMENT _SPECIFIED_IN_SE_DATA_SEGMENT exception.
it throws corresponding Exception if the Validation conditions
mentioned above are not met.
3. Integration Directory
are now going to create A2A scenario manually.
Create a scenario & name it then save it.
the Scenario is created & saved, it is displayed in Left panel
Add Business Systems to your Scenario (BS_FILE_SENDER and BS_FILE_RECEIVER).
Create a sender
communication channel CCT_FILE_SEND_EDIValidation_YH1309 under Business System
BS_FILE_SENDER and configure
the Target Directory, File Name Scheme and FTP Connection parameters with your
mandatory processsing parameters and also specify Content Conversion parameters
as shown below
complete EDI ANSI X12 document is read in the Data
Field specified in the Source
Message Type MT_Source Using File Content Conversion at sender Communication
Create a receiver communication
channel CCT_FILE_REC_EDIValidation_YH1309 under Business System
BS_FILE_RECEIVER and configure
mandatory processing parameters and also specify Content Conversion parameters
as shown below
create Receiver Determination as shown below:
Interface Determination as
create Sender Agreement as shown below
we have to create the Receiver Agreement as shown below.
all the Objects.
4.Test the Scenario
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).
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
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM
©2006-2007 SAPTechnical.COM. All rights reserved.
Graphic Design by Round the Bend Wizards