cancel
Showing results for 
Search instead for 
Did you mean: 

MappingRule to map multiple records from src to single segment on tgt

Former Member
0 Kudos

Hi,

I am doing file to idoc scenario.

I need mapping rule for a particular field.

Requirement is like this :

source Structure

Record 1-unbounded

NomineeName

Target structure

E1P006

Name1

Name2

Name3

Name4

Now record in src should be repeated such that Record[1]/NomineeName -> E1P006/Name1 --- First Nominee

Record[2]/NomineeName -> E1P006/Name2 --- second Nominee

Record[3]/NomineeName -> E1P006/Name3 --- third Nominee

Record[4]/NomineeName -> E1P006/Name4 --- Fourth Nominee.

I need to do this using Message Mapping only and not XSLT or any other mapping.I can use UDF.

Please help me out with the coding for UDF.

Regards

Madhu

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

You do not need udf, you can use the index function for counting the nodes, compare the value to constant and forward the value by ifwithoutelse function:

Record - index \
                        EqualS
     constant(1) /           \
                                    ifWithoutElse - removeContext - First Nominee
            NomineeName /

Regards

Stefan