cancel
Showing results for 
Search instead for 
Did you mean: 

Exception: String index out of range

Former Member

Hi ,

We have IDOC to EDI 820 scenario. Its an outbound. I am using File receiver channel. in Module config I am using localejbs/X12ConverterModule. and  UDF for filename.

I am getting the below error.

  1. com.sap.aii.converter.x12.module.X12ConverterModule.process(com.sap.aii.af.lib.mp.module.ModuleContext,com.sap.aii.af.lib.mp.module.ModuleData) throws com.sap.aii.af.lib.mp.module.ModuleException method on bean instance com.sap.aii.converter.x12.module.X12ConverterModule@5366879a for bean sap.com/converter~x12~x12moduleapp*xml|sap.com~converter~x12~x12module.jar*xml|X12ConverterModule in application sap.com/converter~x12~x12moduleapp.; nested exception is: java.lang.StringIndexOutOfBoundsException: String index out of range: 3

Please suggest.

Thanks,

Sherwin

Accepted Solutions (0)

Answers (4)

Answers (4)

manoj_khavatkopp
Active Contributor

Sherwin,

May i know after mapping what is the value for DataElementSeperator  / SegmentTerminator ?

Bdw , did you try to take the output of the mapping and execute the same in ANSIX12--->XML to EDI converter directly in  Toolkit.

Br,

Manoj

Former Member
0 Kudos

HI Manoj,

DataElementSeperator  / SegmentTerminator are not mapped. When I am trying to Execute the same in B2bIC. I can see the EDI output. Do you think that the UDF for file name can create issues?. I am stuck right now on this issue.


Please suggest.


Thanks,

Sherwin

former_member186851
Active Contributor
0 Kudos

Hello sherwin,

In the UDF are you using any sub string function?

Former Member
0 Kudos

HI Raghuraman,

No, Not using any sub string.

Thanks

manoj_khavatkopp
Active Contributor
0 Kudos

This isnt failing in mapping if any udf/substring is used then it will fail ,but in your case it is failing when the module is trying to convert Raw EDI xml to flat EDI file that is the reason why i asked you to execute this directly in B2B toolkit.

As you have mentioned this is working in toolkit check if all your B2B components are on Same and latest SP

Former Member
0 Kudos

HI Manoj,

But the other interfaces are working fine. Still it can give the issue?

Thanks

manoj_khavatkopp
Active Contributor
0 Kudos

Are those working interface of same Version i mean ANSIX12 version is same ? if yes then do have the fields DataElementSeperator  / SegmentTerminator are not mapped mapped there ?

Former Member

HI Guys,

The issue got resolved when I put the values for DataElementSeperator  / SegmentTerminator .

Thank you so much guys for helping me.

BR,

Sherwin

manjunathn10
Member
0 Kudos

can we write the groovy script for this issue?

GauravKant
Contributor
0 Kudos

Hi Sherwin,

Based on the type of exception I'm guessing it is related to data issue. In some of the field you are passing data which is exceeding the limit.

Please check and make sure it should not exceed field limit.

Regards,

Gaurav

former_member186851
Active Contributor
0 Kudos

Hello Sherwin,

This seems to be data issue,check the below discussion

Former Member
0 Kudos

HI Raghuraman and Gaurav,

Thanks for the reply. I have checked the link you have provided. The field are mapped correctly. The issue is I am not able to check which field is giving issue. I tried checking trace but no results.

Please suggest.