Skip to Content
avatar image
Former Member

Problem in message mapping due to file sender content conversion

Hi all

basically i m using file sender content conversion and couldn't make file in a proper nested structure where weight was the nested field of detail as there is a limitation of content conversion in file adapter:

My file came out like this:

<header>

............

</header>

<Detail>

........

........

</Detail>

<Weight>

........

..........

</Weight>

<Weight>

..........

...........

</Weight>

<Detail>

........

........

</Detail>

<Weight>

........

..........

</Weight>

<Weight>

..........

...........

</Weight>

<trailer>

.........

</trailer>

and i wanted it like:

<header>

............

</header>

<Detail>

........

........

<Weight>

........

..........

</Weight>

<Weight>

..........

...........

</Weight>

</Detail>

<Detail>

........

........

<Weight>

........

..........

</Weight>

<Weight>

..........

...........

</Weight>

</Detail>

<trailer>

.........

</trailer>

so now the problem is i want to generate an idoc from it....but theres no way out to determine which weight is related to what detail except that the weight related to detail 1 comes after start and end of detail 1 tag and then weights of second detail comes after start and end of detail 2 tag in my source xml file.

The structure of the target idoc is

<header>

............

</header>

<Detail>

........

........

<Weight>

<flag>D1</flag>

........

..........

</Weight>

<Weight>

<flag>D1</flag>

..........

...........

</Weight>

</Detail>

<Detail>

........

........

<Weight>

<flag>D2</flag>

........

..........

</Weight>

<Weight>

<flag>D2</flag>

..........

...........

</Weight>

</Detail>

<trailer>

.........

</trailer>

so i was wondering if i can make a user defined function in which i feed detail and weight and result a flag d1/ d2 inside the tag field. My logic is smth like

while detail is 1 make all the tag weights coming after detail 1 inside tag then resultlist.CC for context change then while detail is 2 make a loop to fill the weight coming after detail 2 inside the

Is this possible by any means. I really need help

Thnks

Naina

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Jun 09, 2010 at 03:15 PM

    Hi nina

    Can you put your parameters from you FCC.?

    also please check

    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

      My sender file content conversion have this setting:

      HEADER,1,DETAIL,*,Weights,*,TRAILER,*

      And plz give me more idea of the adapter module ....is there any blog available which is related to my problem.

      Naina

  • Jun 09, 2010 at 03:15 PM

    You need to write an adapter module ( I think file adapter supports that to insert it before call adapter bean) and write some dirty code inside it so that you can introduce new nodes and move weights under it.

    VJ

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 16, 2010 at 07:15 AM

    solved it by adding one more identifier

    Thnks

    Naina

    Add comment
    10|10000 characters needed characters exceeded