cancel
Showing results for 
Search instead for 
Did you mean: 

Content Conversion with Deep structure

Former Member
0 Kudos

Hi All,

I have a problem with content conversion at Receiver file adapter

My source is

<root>

   <data>

      <header>

               <item1>

               <item2>

      </header>

     <detail>

               <item3>

               <item4>

      </detail>

     <footer>

               <item5>

               <item6>

      </footer>

   </data>

</root>

there can be multiple occurrences of <data>

Expected output is a csv file like the following

item1,item2

item3,item4

item5,item6

Please help me with the Record Strucute and conversion parameters at receiver file adapter

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sudah

The easiest way would be removing the node 'root' from the data type in ESR. So you will have the structure like below

<data>

      <header>

               <item1>

               <item2>

      </header>

     <detail>

               <item3>

               <item4>

      </detail>

     <footer>

               <item5>

               <item6>

      </footer>

   </data>

Then you can perform the content conversion like below

Former Member
0 Kudos

Hi Sudha,

The FCC at receiver side is possible with structure shown in below URL.

http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

Have a look at below blog by karthik, which handles FCC of multi hierarchy structures.

http://scn.sap.com/people/karthiknarayan.kesavan2/blog/2007/08/22/file-content-conversion-for-multi-...

-Anand

Former Member
0 Kudos

Hello,

>>I have a problem with content conversion at Receiver file adapter

FCC is not possible on ur structure so in order to accomplish ur req u have to use below workaround

http://scn.sap.com/community/pi-and-soa-middleware/blog/2010/01/14/file-conversion-using-nodeception

once u r done with message mapping which creates data in ur desired format then use java mapping and remove "data" node from the target xml (code for the same is pasted in above blog). So output of JM will be:

<root>

      <header>

               <item1>

               <item2>

       </header>

     <detail>

               <item3>

               <item4>

       </detail>

     <footer>

               <item5>

               <item6>

       </footer>

<header>

               <item7>

               <item8>

       </header>

     <detail>

               <item9>

               <item10>

       </detail>

     <footer>

               <item11>

               <item12>

       </footer>

</root>

And then eventually use FCC for the transformed XML

Thanks

Amit Srivastava