Skip to Content
author's profile photo Former Member
Former Member

Content Conversion with Deep structure

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jan 06, 2014 at 07:53 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2014 at 08:06 AM

    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-hierarchical-structure

    -Anand

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2014 at 09:12 AM

    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


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.