cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CPI - UDF Mapping Context Issue

PramilaR
Explorer
0 Kudos

Hello Experts of CPI,

I have a requirement of mapping and below is the requirement which i am unable to get the output, please review and provide the best CPI UDF solution

I used create copies udf but it is not creating as shown in target value needed

1 source context values should repeat again and again by given count value

Source single context values     context number of copies             Target Value Needed

101.22                                                   3                                             101.22

202.22                                                   2                                            202.22

303.22                                                   1                                            303.22

                                                                                                             ------------

                                                                                                             101.22

                                                                                                             202.22

                                                                                                             ------------

                                                                                                              101.22

 

CPI Context Mapping.png

 

 

 

View Entire Topic
PramilaR
Explorer
0 Kudos

Hi Dinu,

Thank you for the reply,

When i tested with your code I am getting a different result, please see the screen shot

First context should repeat it self based on second input count number

if count value in second context is 1 then repeat 1 time

if count value in second context is 5 then repeat 5 times

if count value in second context is 3 then repeat 3 times

CPI Context Mapping1.png

Thanks

Dinu
Contributor
0 Kudos
If you have context changes in the second argument, you will not get what you want. All the counts (1,2,3) should be in one context.