cancel
Showing results for 
Search instead for 
Did you mean: 

How to filter data in message mapping?Kindly help! URGENT

gopalkrishna_baliga
Participant
0 Kudos

Hi Experts,

I have a source XML as shown below:

<Inventory>

<InventoryItem>

<InventoryQty>

<MaterialNo>X001</MaterialNo>

<ItemCode>InTransit</ItemCode>

<Quantity>1000</Quantity>

</InventoryQty>

<InventoryQty>

<ItemCode>Available</ItemCode>

<Quantity>1500</Quantity>

</InventoryQty>

<InventoryQty>

<ItemCode>UnRestricted</ItemCode>

<Quantity>1250</Quantity>

</InventoryQty>

</InventoryItem>

<InventoryItem>

<InventoryQty>

<MaterialNo>X002</MaterialNo>

<ItemCode>InTransit</ItemCode>

<Quantity>1500</Quantity>

</InventoryQty>

<InventoryQty>

<ItemCode>Available</ItemCode>

<Quantity>1600</Quantity>

</InventoryQty>

<InventoryQty>

<ItemCode>UnRestricted</ItemCode>

<Quantity>1200</Quantity>

</InventoryQty>

</InventoryItem>

</Inventory>

My Target XML is mapped to a RFC Fnction module (YGET_STOCK). The target function module has a internal table (ITAB_STOCK) as input:

YGET_STOCK

-


ITAB_STOCK

-


item

- <Material>X001</Material>

- <AvailableStock>1500</AvailableStock>

- <IntransitStock>1000</IntransitStock>

-


item

- <Material>X002</Material>

- <AvailableStock>1600</AvailableStock>

- <IntransitStock>1500</IntransitStock>

</Inventory>

So how to get the desired target XML using graphical XI mapping?

I have tried using graphical mapping and I am getting the following:

YGET_STOCK

-


ITAB_STOCK

-


item

- <Material>X001</Material>

- <IntransitStock>1000</IntransitStock>

- <AvailableStock></AvailableStock>

-


item

- <Material>X001</Material>

- <IntransitStock></IntransitStock>

- <AvailableStock>1500</AvailableStock>

</Inventory>

As shown it is reading only the first <InventoryItem> and splitting the Available and InTransit quantity into two separate items of the internal tables instead of putting them into one item.

Kindly help me! URGENT!

Thanks

Gopal

Message was edited by:

gopalkrishna baliga

Message was edited by:

gopalkrishna baliga

Message was edited by:

gopalkrishna baliga

Message was edited by:

gopalkrishna baliga

Message was edited by:

gopalkrishna baliga

Accepted Solutions (0)

Answers (1)

Answers (1)

prabhu_s2
Active Contributor
0 Kudos

what is ur mapping def...did u map <InventoryItem> to -


item in rfc?