on 11-22-2008 3:02 AM
Hello everyone,
I have a configured a Sender File Adapter that uses Content Conversion to translate a text file into XML.
Currently, one message is created for each groupings of B, C, and D (see below). A is the header portion.
example.txt
A 20081010
B 0100012
C 234
D 0000001
B 0100013
C 235
D 0000002
Using the above text file as an example, I get two messages generated:
Output 1
<Recordset>
<Header>
<A>20081010</A>
</Header>
<Details>
<B>0100012</B>
<C>234</C>
<D>0000001</D>
</Details>
</Recordset>
Output 2
<Recordset>
<Details>
<B>0100013</B>
<C>235</C>
<D>0000002</D>
</Details>
</Recordset>
However, I want the output to replicate the value in A to the header portion of each of the succeeding messages:
Desired Output 1
<Recordset>
<Header>
<A>20081010</A>
</Header>
<Details>
<B>0100012</B>
<C>234</C>
<D>0000001</D>
</Details>
</Recordset>
Desired Output 2
<Recordset>
<Header>
<A>20081010</A>
</Header>
<Details>
<B>0100013</B>
<C>235</C>
<D>0000002</D>
</Details>
</Recordset>
Can anyone help me out?
Kind regards,
Glenn
Use UseOneAsMany
check this link
http://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Guys!
thanks for your replies! As I understand it, the UseOneAsMany function may be used for one mapping; however, in my case, a new XML file (hence new mapping instance) is generated for each occurence of the Group B, C, and D.
I don't think I can use the UseOneAsMany in this case. Please correct me if I'm wrong.
Warm regards,
Glenn
HI Glenn
If the requirement is to generate the field A header for all the occurances that is doable using UseOneAsMany and even you can map header multiple times in target. But if you want to do it before mapping to satisfy your source XML generated with field A multiple times. Then either you have to go for adapter module or Script to modify file itself before reading.
Thanks
Gaurav
UseOneAsMany node function in the message mapping..!!
VJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.