cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicating records

Former Member
0 Kudos
58

Hi,

In my mapping i am doing a R/3 look up, which returns with variable number of values. now for each of these returned value i have to build a seperate record,

For example if the Look up has returned 2 values say 13 & 16.I have to build 2 records like

aaa,123,bbb,13

aaa,123,bbb,16

and say if MDM returns n values we have to build 'n' records, i think we need to use Global container here, however I am not well aware of this is there any code you guys can suggest any UDF to do this.. any other idea will be appreciated.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Yes, you need to use Global containers to handle this situation. The only thing is you need to know the number of records to be generated for the other elements.

Another possible solution is Java Mapping. you can construct your Output as you require.

Regards,

P.Venkat

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Many ways to handle this.

1. SImilar to Global Containers, you have a seperate section called JAVA section in your Message Mapping. You can declare your Global Variables in these sections and then reused them in any UDF in your mapping.

Make the call to the RFC in the initlaization section of your JAVA section and so you will have the multiple response inn a global Variable array and then access them when needed using UDF's in your Mapping!

More on global variables in this blog,

/people/sap.user72/blog/2005/10/01/xi-new-features-in-sp14

2 Using Advanced User Defined Functions is another option,

Regards

Bhavesj