Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

In order to process an EDIFACT message inside XI, we have to convert the incoming EDI stream to an XML document.

 

Introduction

 

Until recently it was complex to handle industry formats such as EDIFACT within SAP XI.


The main challenges were:
- the definition of XML structure in SAP XI that reflected EDIFACT metadata
- the conversion of native EDIFACT messages into XML messages


SAP XI includes from SP15 an optional component called SAP Conversion Agent aimed at simplifying the processing of EDIFACT messages. This weblog describes how to use SAP Conversion Agent for EDIFACT/XML conversions.

 

A standard EDIFACT process within SAP XI can be decomposed as follows:
1. Receive the native EDIFACT message via FTP or via a proprietary Value Added Network (VAN) protocol
2. Convert the native EDIFACT message into XML EDIFACT
3. Map/Transform the XML EDIFACT message into an XML Idoc message
4. Post the XML Idoc to a SAP application (SAP R/3)

 

The process is illustrated in the diagram below:


 

EDIFACT and SAP Conversion Agent

 

The SAP XI Conversion Agent provides:
- a library of XML EDIFACT metadata required for the conversion and the mappings (step number 2 and 3)
- a tool to develop and deploy the conversion of native Edifact message into XML EDIFACT (step number 2)


At this point of the weblog we assume that the installation of SAP Conversion Agent is completed. If it is not the case please refer to the weblog How to get started using Conversion Agent from Itemfield written by William Li.


For additional background information on SAP XI / SAP Conversion Agent integration you can also read the weblog of Alexander Bundschuh : How to get started using Conversion Agent from Itemfield


The implementation consists of the following tasks:
- Create a Content Master Studio Project
- Deploy the Content Master Project to the XI Server
- Import the EDIFACT schema to the XI repository
- Create XI Repository Objects
- Create XI Directory Objects

 

How to create a Content Master Studio Project

 

Create a CM Library Project:

 

Enter ORDERS96_Parser as project name:

 

Select the corresponding ORDERS 96a parser template:

 

The following project structure is created:

 

In order to test the conversion with our local EDI file example we have to modify the example_source value to LocalFile and enter the file name with its full path in the corresponding parameter:

 

We can test the parsing locally :

 

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

 

How to Deploy a Content Master Project to the XI Server

 

Execute the Content Master Configuration Utility in order to set the CM repository:

 

We have to point our CM Repositry configuration to the XI Content Server directory:

 

We can deploy the service directly from Content Master Studio:

 

The service name entered at this stage will be used later in the Adapter Module configuration to invoke the EDIFACT to XML conversion.

 

How to create the EDIFACT to IDOC mapping

 

We have to import into the XI repository the XSD provided with the EDIFACT library:

 

Once imported,the EDIFACT XML message structure is available as an external definition. It will be used as a source document in the mapping.

 

How to execute the conversion inside XI

 

Once the conversion agent service is deployed, we can call it from within any adapter that runs on the SAP XI Adapter Framework by using the EJB module : localejbs/sap.com/com.sap.nw.cm.xi/CMTransformBean

 

In the module tab we have to configure the module name and set the parameter TransformationName to the service that we deployed before.

 

 

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