cancel
Showing results for 
Search instead for 
Did you mean: 

Horizontal mapping

Former Member
0 Kudos

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!

Accepted Solutions (1)

Accepted Solutions (1)

former_member187339
Active Contributor
0 Kudos

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

Answers (2)

Answers (2)

former_member200962
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Thanks for the help guys...

former_member200962
Active Contributor
0 Kudos

Did you try using the Concat function? If you need a space between two values then use the space as delimiter.

Regards,

Abhishek.