on 11-03-2009 8:35 AM
HI,
I would like to ask for some solution in one of my objects. I need to map values to the target field in horizontal (left to right) positioning. The sample output would be like this..
Material QTY1 QTY2 QTY3 QTY4 QTY5
MAT1 5 6 5 8 9
MAT2 7 8 5 10 6
Input file would be look like this.
<Purchase_Order_Message>
....
<FUNCTIONAL_LOOP>
<LOOP_34>
<Item_Identifier_010>MAT1</Item_Identifier_010>
</LOOP_34>
<LOOP_37>
<Quantity_020>5</Quantity_020>
</LOOP_37>
<LOOP_37>
<Quantity_020>6</Quantity_020>
</LOOP_37>
<LOOP_37>
<Quantity_020>5</Quantity_020>
</LOOP_37>
<LOOP_37>
<Quantity_020>8</Quantity_020>
</LOOP_37>
<LOOP_37>
<Quantity_020>9</Quantity_020>
</LOOP_37>
</FUNCTIONAL_LOOP>
<FUNCTIONAL_LOOP>
<LOOP_34>
<Item_Identifier_010>MAT2</Item_Identifier_010>
</LOOP_34>
<LOOP_37>
<Quantity_020>7</Quantity_020>
</LOOP_37>
<LOOP_37>
<Quantity_020>8</Quantity_020>
</LOOP_37>
<LOOP_37>
<Quantity_020>5</Quantity_020>
</LOOP_37>
<LOOP_37>
<Quantity_020>10</Quantity_020>
</LOOP_37>
<LOOP_37>
<Quantity_020>6</Quantity_020>
</LOOP_37>
</FUNCTIONAL_LOOP>
...
</PURCHASE_ORDER_MESSAGE>
Could you help me to find ways to solve this issue. I am a bit running out of logic of ways what I can do for this mapping since it is using only one field from the selection and needs to be mapped horizontally.
Hope to hear from you gurus.
Thanks!
Hi,
You target structure should look like
<root>
-<Details>
--<Materials>
--<QTY1>
--<QTY2>
--<QTY3>
--<QTY4>
--<QTY5>
--<QTY6>
Now duplicate Details once and map the constant values Material QTY1 QTY2 QTY3 QTY4 QTY5 to respective nodes and mapp Details to a constant.
Now to the duplicated Details do a one to one mapping between source fields and target fields.
In receiver side use File content Conversion and you will get the desired output
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Confused with your requirement :S
I need to map values to the target field in horizontal (left to right) positioning.
1) Should your output file (if the target is file) look like:
Material QTY1 QTY2 QTY3 QTY4 QTY5
MAT1 5 6 5 8 9
MAT2 7 8 5 10 6
OR
2) Do you want to stuff the values from input file into the respective target nodes in the above format?
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you try using the Concat function? If you need a space between two values then use the space as delimiter.
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.