Skip to Content

This article describes how to use SAP XI Conversion Agent to process EDI X12 messages.
It is the second part of a series of articles related to SAP XI Conversion Agent and EDI:

Part 1: SAP XI supports EDIFACT
Part 2: SAP XI supports EDI X12
Part 3: Handling EDI Exceptions with the SAP XI Conversion Agent
Part 4: SAP XI Conversion Agent Frequently Asked Questions

Introduction

 

The X12 is the ANSI standard for exchanging EDI business transactions between organisations. X12 is used primarily within the US.
The X12 standard is the counterpart of the EDIFACT standard maintained by the International Standards Organization.
SAP XI supports both of these industry standards.

Outline of EDI X12 process in SAP XI

 

A standard X12 process within SAP XI can be decomposed as follows:

1. Receive the native X12 message via FTP or via a proprietary Value Added Network (VAN) protocol
2. Convert the native X12 message into XML X12
3. Map/Transform the XML X12 message into an XML Idoc message
4. Post the XML Idoc to a SAP SAP R/3

 

The process is illustrated in the diagram below:

image

 

EDI X12 and SAP XI Conversion Agent

 

The SAP XI Conversion Agent provides:

– a library of EDI X12 metadata required for the conversion and the mappings (see diagram steps 2 and 3)
– a tool to develop and deploy the conversion of native EDI X12 message into XML X12 (see diagram step 2)

The implementation consists in the following tasks:

– Create a Content Master Studio Project
– Deploy the Content Master Project to the XI Server
– Import the X12 schema to the XI repository
– Import the Idoc metadata into the XI repository
– Configure your flow into the XI Directory Objects

 

How to create a Content Master Studio Project

 

Create a CM Library Project:

image

 

Enter X12_850_Purchase_Order as the project name:

image

 

Select the purchase order message in the X12 library EDI_MSG_850_Purchase_Order. Make sure you select the parser object EDI_MSG_850_Purchase_Order_Parser:

image

 

The following project structure is created:

image

 

How to test the X12 conversion

In order to test the conversion with a sample EDI X12 file you set the parameter example_source to LocalFile and you browse to the location of your sample file:

image

 

You can test the parsing locally by selecting the menu option run :

image

 

You can check the generated output file and the event log:

image

 

How to create the transformation mapping from X12 to IDOC

 

First locate the X12 Purchase Order schema (xsd) available in the Content Master project:

image

 

You import the xsd as an external definition in SAP XI

image

 

Once imported,the X12 Purchase Order message structure is available as an external definition. It will be used as source document for the mapping.

 

image

 

This weblog was co-authored by Lionel Biennier and Béla Suranyi.

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Marc Roussel
    Yeah how can I export a purchase order from SAP to X12 format  from SAP Business One 2005A

    I’m about to code a module to make it  but I wanted to know a shorter way to achieve it

    They gave me 3 days to make it 🙂

    (0) 
  2. Frank Klein
    …is there a way vice versa and perhaps in X25!? Does anybody have some experience with this?! I face an IDoc – XI – OFTP scenario (OFTP = Odette (X.25))

    thx for help!

    (0) 
  3. Madhu Sudan Reddy B
    Hi,

       Which versions of X12 files are supported using Item filed conversion (Either 4010 version or 4030 version).Is there any option that it supports both the versions.

      Thanks and Regards,
      Madhu

    (0) 

Leave a Reply