cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping from Single Text field under Items to multiple fields in target

Former Member
0 Kudos

Hi Friends

I have a scenario where under Items(0...unbounded) there is a Text field in the source structure , for every text field that comes under item it needs to be mapped to a Address Line  field like Line1, Line2, Line3 etc. up to Line10.So under first Item whatever Text comes it is mapped to first Line i.e Line1, next whatever Item comes , its Text value is mapped to Line2 and so on. Could anyone help me on this , can this be done using standard functions or do we need a udf, if we need a UDF , would really appreciate if anyone can provide code.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Arjun,

You can very much do it with standard functions.

Can I ask you something ? In your source table can you place a counter indicating row ? ( 1,2,3, ??)

In that case it becomes straight forward. We handled similar situation like this..

1. Changed the context of counter field in source to one level higher.

2. Placed a check of counter

3. Passed line to target based on condition.

Please check if this works.

Thanks..

regards,

Omkar.

Former Member
0 Kudos

would appreciate if you could provide some screenshots and explained

former_member184720
Active Contributor
0 Kudos

Of course you can do with standard functions.... provided UDF for simplification.

you just need to adjust constant value..

change constant value to "0" and copyValue[0] and map it to line1

change constant value to "1" and copyValue[1] and map it to line2

change constant value to "2" and copyValue[2] and map it to line3 etc...

Answers (4)

Answers (4)

Pranil1
Participant
0 Kudos

Hi Arjun,

Check below mapping.

Regards,

Pranil.

Former Member
0 Kudos

Hi Pranil , I have used your mapping and it is working great I used yours because you had given me screenshots for both the mapping as well as the result and also it is more simpler , I think Harish's solution will also work , so I am grateful to both of you. Thank you guys for such a quick solution.

vinaymittal
Contributor
0 Kudos

I think Hareesh gampa has provided the right answer to it it cant be made any simple since target fields are all different, it is really an extrememly simple mapping.

Former Member
0 Kudos

This message was moderated.

former_member184720
Active Contributor
0 Kudos

Hi Arjun -

Can you try below mapping.. you just need to change the constant value.. 1..2.. 3..

iaki_vila
Active Contributor
0 Kudos

Hi Arjun,

Have you tried with the standard function useOneAsMany?. Check this links to understand this function:

https://help.sap.com/saphelp_nw04/helpdata/en/ef/df564b6aa24fc9ab0d685460747de5/content.htm

Regards.