cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in message mapping due to file sender content conversion

Former Member
0 Kudos

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 <detail1> 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 <detail2>

Is this possible by any means. I really need help

Thnks

Naina

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

solved it by adding one more identifier

Thnks

Naina

VijayKonam
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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