Skip to Content

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

Query on Mapping Function

Hi Experts,

I am not clear about the functionality of the standard mapping functions

Indexof() and Lastindexof().

What is the functionality of 2 and 3 input parameters..

It would be help full if some one could explain with examples...

Former Member
Former Member replied

Hi saravana,

>>Indexof (2 input parameter)

Returns the positon where the second string is found in the first string.

Eg: santhosh & a = 1.

santhosh & s = 0.

>>Indexof(3 input parameter)

Returns the positon where the second string is found in the first string but the search starts from the specified position.

Eg: santhosh & s & 0 = 0 but

santhosh & s & 3 = 6 bcz after the 3rd pos s occurs at 6th pos.

>>Lastindex of(2 input parameter)

Eg: santhosh & s = 6.

>>Lastindexof(3 input parameter)

santhosh & s & 3 = 6

Lastindex is same as index except it searches for the last occurance

Hope this clears

Regards

San

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question