cancel
Showing results for 
Search instead for 
Did you mean: 

How to map one element to multiple target nodes? Kindly help!

gopalkrishna_baliga
Participant
0 Kudos

Hi Experts,

I have a source XML:

<Inventory>

<MaterialNo>Z001</MaterialNo>

<InventoryLineItem>

<BatchNo>B001</BatchNo>

<Quantity>100</Quantity>

</InventoryLineItem>

<InventoryLineItem>

<BatchNo>B002</BatchNo>

<Quantity>120</Quantity>

</InventoryLineItem>

<InventoryLineItem>

<BatchNo>B003</BatchNo>

<Quantity>50</Quantity>

</InventoryLineItem>

</Inventory>

I want the target output as: This is a RFC function module which has an internal table ITAB_STOCK as the input parameter.

YGET_STOCK

ITAB_STOCK

Item

MM - Z001

Batch - B001

Qty - 100

Item

MM - Z001

Batch - B002

Qty - 120

Item

MM - Z001

Batch - B003

Qty - 50

What I am getting is:

YGET_STOCK

ITAB_STOCK

Item

MM - Z001

Batch - B001

Qty - 100

Item

Batch - B002

Qty - 120

Item

Batch - B003

Qty - 50

The MaterialNo (MM) is not coming in all the items. What could be the problem in my graphical mapping? How to achieve the expected target uisng graphical mapping?

Kindly help!

Thanks

Gopal

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hello,

Just do the below mapping you will get it...

Map InventoryLineItem to Item in your table.

Then MaterialNo--->CopyValue---->MM

[0]

You will get it let me know if not.

Regards,

Former Member
0 Kudos

The [0] is for CopyValue position.

Regards,

Former Member
0 Kudos

Hi gopal,

have u tried with my reply?

what is occurance of MM node??? plz check that its not 1...it should be 1 to unbound.

Thanks,

Maheshwari.

Former Member
0 Kudos

Hi,

Use <b>useOneAsMany</b> function

it has 3 inputs:

1. MaterialNo >useOneAsMany>MM

2. BatchNo>RemoveContext->useOneAsMany

3. BatchNo-->useOneAsMany.

Thanks,

Maheshwari.

Former Member
0 Kudos

Use the function,

<b>useOneAsMany</b>

It has 3 inputs.

1. MaterialNo

2. InventoryLineItem

3. InventoryLineItem

Map the output to target.

Regards,

Jai Shankar

gopalkrishna_baliga
Participant
0 Kudos

Hi Jai,

But InventoryLineItem is only one element which has occurance 0--N.

In the example I have shown 3 InventoryLineItems. In reality it can be many.

Plesae help me!

Thanks

Gopal

Former Member
0 Kudos

Gopal,

Map as I explained in my previous reply and test your mapping and let us know the result.

To get the InventoryLineItems node two times, just double click on it again. You will find the node 2 times in the mapping area.

Regards,

Jai Shankar

gopalkrishna_baliga
Participant
0 Kudos

Hi Jai,

I have tried as you have said but still it is showing the same result. It is not generating the target message as I want.

Please help

Thanks

Gopal