cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Mapping issue: Function 'Substring error'

Former Member
0 Likes
2,278

Hi All,

I have an incoming field of length upto 30 which needs to be split into 3 diff fields of length 10 each.

I used the function 'substring' in Mapping using the following range 0-10 and 10-20 and 20-30. It works fine if the string has all 30 characters.

If the string has only 10 characters, then the first field is poulated but for the remiaing 2 fields I get the error

Exception:[java.lang.StringIndexOutOfBoundsException: String index out of range: 10] in class com.sap.aii.mappingtool.flib3.TextFunctions method substring[185120, com.sap.aii.mappingtool.tf3.rt.Context@3d1048df]

I guess the issue is because string is only 20 caharcters long.

Is there any other way I can split the string without getting this error.

Many thanks

Shirin

View Entire Topic
Santhosh_Vellingiri
Active Contributor
0 Likes

Hi,

Use the combination of length, if and substring function in the graphical mapping

Thanks

SaNv...