cancel
Showing results for 
Search instead for 
Did you mean: 

Different Custom Flat File Formats to XML Java Mapping

Former Member
0 Kudos

Hi Experts,

We are currently in the middle of a massive SAP Migration project. One of the requirements of course is to migrate all B2B and A2A interfaces from various integration platforms (3 different versions of PI and 2 additional integration platforms) to a single SAP PI 7.31 instance.

One of the challenges is that we have a huge number of custom position based flat files for different 3PL providers (96 in my last count). All of which are mapped either to or from standard and extended IDocs. Since we have a number of custom flat files, even though we have the B2B Add-on available, I am hesitant to use the Content Manager for Plain Text as that would mean we need to create 96 different configurations. On top of that the Data Type/Message Definitions in ESB. It could have been possible but the problems are as follows: 1. need to complete map migration (from another mapping tool to SAP PI graphical) within 3 months and 2. almost all of my developers are new to SAP PI and don't have the knowledge how to use B2B Add-on.

Now, I was thinking of another approach - use Java code to convert the Flat File to XML and vice versa by using the XSD within ESB as a basis (by using the exact length of each field). This way, we can standardize the Flat File <-> XML Conversion since we are utilizing the XSDs that define the Message Type already since we are only going to use 1 Java code for all conversions. I was searching through SCN and JavaDocs for SAP PI and I haven't come across anything that could help me.

Does anyone here have the same scenario from past implementations or experience in getting the Receiver/Sender Interface's XSD from ESR via Java code?

I don't see any value in uploading the different XSDs to create each Message Type just to have a reference when using the Java code (either as an Adapter Module or a Java Mapping).

Thanks in advance for the help.

Regards,

Rommel

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

Hi Rommel,

AFAIK - There are no methods to access the schema from ESR directly.

However if you really wanted to go for one generic java mapping for all your conversions then

->pass those field names & lengths as properties file and handle the conversion.

->supply the schema as an input(import the xsd as under imported archive). With this approach you need to parse the xsd and identify the fields and lengths.

XI schema validation using DOM parser via Java code - Process Integration - SCN Wiki

Parsing an XSD schema in Java

Former Member
0 Kudos

Hi Hareesh,

I figured out as much. Thanks for the inputs. We're currently using B2B Add-on SP4 to standardize the conversions.

Thanks!

Regards,

Rommel

Answers (0)