on 03-06-2008 10:41 PM
Hi all,
I'm getting this when i'm trying to display the queue for the sub-string function, i have set the starting position to zero and no.of characters to 4. So should increase the no.
RuntimeException in Message-Mapping transformation: Exception:[java.lang.StringIndexOutOfBoundsException: String index out of range: 4] in class com.sap.aii.mappingtool.flib3.TextFunctions method substring[, com.sap.aii.mappingtool.tf3.rt.Context@18913e8]
Thanks,
Srinivas
Srini,
Which SP u r working in?
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Srinivas,
Can you paste the code for your subString udf here...as String indexoutOf Bounds is thrown when the string you are trying to subString is smaller than the one you expected....you can try this..get all the elements in the string..into an array and print them out with the value for each...that should tell you whats going wrong...
Hope that helps..
Regards
Ravi Raman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
StringIndexOutOfBoundException
Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the string
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StringIndexOutOfBoundsException.html
Also check
This may be due to
1. there is no values or characters in that place
2. value is not passed to the sub string..i.e..its empty
Can you check whether there is any string in there and check its length....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Davuluri,
I think in your input field one value is less than 4 charcters. So make a display queue on the source input field. If you see a value which is less than 4 that is causing the error.
So in this case you use if--else functionality. Check the length of the input field and if the input is greater than 4 then only take the substring else pass directly.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
Could you please send your UDF code. so that it would be easy to find the cause of error.
Thanks,
Jag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.