cancel
Showing results for 
Search instead for 
Did you mean: 

Message mapping:hierarchical to Flat Structure: Need help

former_member257758
Participant
0 Kudos

Hi Gurus,

In message mapping I need convert hierarchical structure to Flat Structure: Pls see the below screen shot of source and target structure.

Output: For all item structure Name and Address in header should repeat.

And I have tried useOneAsMany with SplitByBalue but it is not working as expected, Only first record from the structure is displayed in test results, 2nd record is missed out. Pls see the below screen shots.

Can you pls help if this correct way using node functions or If i missed out something or need to write UDF, If yes can you pls provide me the sample code.

Thanks for the help.

Arun

Message was edited by: Arun D

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member257758
Participant
0 Kudos

I have tried useOneAsMany with SplitByValue but not working as expected. It is displaying only 1st record and 2nd record is not displayed in the test results. Here are the screens shots.

Test result

Can you pls suggest me how to do this.

Thanks

Arun

Former Member
0 Kudos

below works.

1. map Item to Row

2. for Name use useOneAsMany in this manner::  name, item, material-->useOneAsMany--> Name

3. for Address use useOneAsMany name, item, material-->useOneAsMany-->Address

4. one on one material to material

5. one on one units

6. one on one  price.

zameerf
Contributor
0 Kudos

Just follow the below wiki and the first example for useOneAsMany.

Hope this helps.

http://wiki.sdn.sap.com/wiki/display/XI/Explain+node+functions

former_member257758
Participant
0 Kudos

Hi Prem,

I did as you suggested,

Now it is working correctly for 1 header and multiple items, But not working for multiple headers and multiple items. pls see the below screen shot.

Something else i need add? appreciate your help.

Thanks

Arun

Former Member
0 Kudos

Change the order context to MT_Purchase order.  to do so; right click on order and change it to higher level "MT_Purchase order" that should work.

former_member257758
Participant
0 Kudos

Hi Prem,

I did not use Order anywhere in the mapping. How can i change the context for order?

Former Member
0 Kudos

i see there is order in your screenshot. the node. changes its context.