cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC to Flat file and Flat file to IDOC

Former Member
0 Kudos

Hello Experts,

I have the following requirement in my current project:

Third Party Sender sends the data in the in the below XML format via HTTP:

<?xml version="1.0"?>

<fxEnvelope>

<header>

<message>

<exchangeID></exchangeID>

<messageID></messageID>

<subject></subject>

<payloadType>IDOC</payloadType>

</message>

<from>

<orgID></orgID>

<locationID></locationID>

<messageID></messageID>

</from>

<to>

<orgID></orgID>

<locationID></locationID>

</to>

</header>

<body>

<Opaque>

<DataType></DataType>

<DataStream></DataStream>

</Opaque>

</body>

</fxEnvelope>

In the above XML, the Tag <DataStream> is a string which contains the IDOC flat file.

Now, the scenario is HTTP to IDOC, where the sender sends the above XML payload and PI needs to convert <DataStream> to IDOC XML and pass it on to the receiver R/3.

But the challange i am facing is converting this <DataStream> tag which contains the IDOC flat file to IDOC XML using a Mapping program.Since both adapters are running on ABAP stack i can not go for Adapter Modules available(We are using PI 7.10).

Looking for some guidance on the same.

Thanks in advance.

Cheers,

Manasa.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

There are 2 options for you

In either case, you might need a java mapping to convert the DataStream into String. Use a file adpater to write this string to IDOC-File.

1) Option1: Write the content of DataStream into IDOC-Flatfile.(java mapping) Pick it from PI to convert IDOC-flat file inot IDOC-XML (using std features of PI) & send it to ECC.

2) Option2: Write the Content of DataStream to IDOC-Flatfile (accessible to ECC system). Configure WE21 to pick the file from a file port.

If the datastream was IDOC-XML, then it would have been simpler, it will be a direct communcation from PI to ECC (using java mapping & IDOC adapter).

Regards,

Siva Maranani

Former Member
0 Kudos

Hi Siva,

Thanks for your immediate response.

Please find my reply:

1. This option i have already tried with XSLT mapping. But the output payload was containing the extra <xml version...> tag.

Now i will try with java mapping as per your inputs. But i need to convience the client to go for breaking up the scenario:

HTTP to File and then File to IDOC.

2. Can you please explain the same with more clarity? After picking the file using FTP port how to convert the flat file to IDOC??

Thanks,

Manasa.

Former Member
0 Kudos

If your XSLT map works, then use the following tags to skip the XML header. Either one works fine

<xsl:output method="text" />

or

<xsl:output method="xml" omit-xml-declaration="yes"/>

Answers (0)