cancel
Showing results for 
Search instead for 
Did you mean: 

Sring index out of range exception?

Former Member
0 Kudos

Hi,

I am doing a IDOC to file scenario, where I am using BPM to collect Idocs for 3 minutes and then generate a file whith those many idocs.

File is getting generated at receiver side with one ot rwo Idocs, But when I am triggering more than two Idocs then I am getting a error String index Out of range :9 in one certain field of file.

Why is it so?

Please help me out.

Regards,

Sachi

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member200962
Active Contributor
0 Kudos
I am getting a error String index Out of range :9 in one certain field of file.
zunor---->substring(6...9)---->codmdlveh

Check the field length....i feel that the string (zunor) ends before the 9th position.....so the substring is failing.

former_member200962
Active Contributor
0 Kudos

This may happen when some length-limit is exceeded.....check if any field/ process is having any limit defined.

Regards,

Abhishek.

Former Member
0 Kudos

Thanks abhishek for your response.

But still I am not able to resolve the problem.

I am trying to map field ZUONR(of idoc) having max length 18 with field CODMDLVEH(of file) with max lenth 8 using substring.

as zunor-->substring(6...9)-->codmdlveh

with one or two idocs mapping works fine..

I am not able to understand why it fails in BPM with String index out of range:9 when more than two idocs are triggerd.

Sachi

Former Member
0 Kudos

Hi,

Also check that there is a value in the field ZUONR , if it is blank, then you will deifinitely get the Index out of bounds error when it is trying to substring the ZUONR field.

Br,

Advait