Skip to Content
0

StringIndexOutOfBoundsException: String index out of range XML - Idoc issue

Jan 17, 2017 at 06:04 PM

235

avatar image

Hi Experts

I'm having an issue in passing data from XML to an idoc. I get the error:

Runtime exception when processing target-field mapping /Z371INVOICE01/IDOC[4]/Z0371_INCINV_CREATE_ITEM[4]/MAKTX; root message: Exception:[java.lang.StringIndexOutOfBoundsException: String index out of range: 30] in class com.sap.aii.mappingtool.flib7.TextFunctions method substring[Lemon Floor Jell 5L (EA) B006, 0, 30,

Maktx field in source wsdl (idoc dest) has a max char length of 40 and I know in ecc it has a max length of 60. So this shouldn't be an issue.

I've checked in Notepad++ for odd characters - as you can see in attachment there are non.

Ive restricted the fields characters to 39 using substring in mapping and yet it still falls over.

Can you please provide some insight of what else I can check?

maktx-wsdl.pngmapping-string-restriction.pngmapping-stringindexoutofboundsexception.pngxml-excerpt.png

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Evgeniy Kolmakov Jan 17, 2017 at 08:33 PM
0

Hi George!

I guess that you use Substring function in your mapping and one of the indexes you set goes out of the actual string length.

Regards, Evgeniy.

Share
10 |10000 characters needed characters left characters exceeded
George Applegate Jan 18, 2017 at 09:04 AM
0

I've used substring to limit the no of chars for that field to maktx's limit of 40 -it failed on this so reduced it to 30 - but still sometimes fails..

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi George!

You should check your source element's queue in message mapping. It's quite possible that some of your source values has length less than 30 symbols.

Regards, Evgeniy.

0