Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to get occurance value

Hi,

How to get 1 , 2 and 3rd occurance value?

ex:Source

-


E1EDP10

E1EDP16

a

b

c

Whenever E1EDP16 repeates (duplicate segments are there). Once I need to send in target element the 1st occurance of E1EDP16/a value, send time I need to send the send occurance of E1EDP16/a value, and as on...

How to achive this.

regards,

Ansar.

Former Member
Former Member replied

This can be done by using a UDF.

Provide complete queue of source to UDF, have a for loop which loops through the queue and takes only second value and fills it in resultlist. Pass the result to your target..

example ......

getSecondValue(sourcefield)

{

for(source=0; source <= 1; source ++ )

{

result = sourcefield[1];

}

}

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question