on 01-11-2011 3:52 PM
Hi,
I am running an interface which is erroring in sxmb_moni due to mapping issues.
When I check the mapping issues it states:
Runtime exception during processing target field mapping /ZRMD_A07/IDOC[2]/E1PLOGI/E1PITYP/E1P0015/ZUORD(suppressed field). The message is: Exception:[java.lang.StringIndexOutOfBoundsException] in class com.sap.aii.mappingtool.flib3.TextFunctions method substring[, com.sap.aii.mappingtool.tf3.rt.Context@55f455f4] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ZRMD_A07/IDOC[2]/E1PLOGI/E1PITYP/E1P0015/ZUORD(suppressed field). The message is: Exception:[java.lang.StringIndexOutOfBoundsException] in class com.sap.aii.mappingtool.flib3.TextFunctions method substring[, com.sap.aii.mappingtool.tf3.rt.Context@55f455f4]
The mapping it is refering to is a few lines of Java code (below) which I think picks up the file name. There is then a substring which identifies 8 characters from the filename.
String filename="";
DynamicConfiguration attrib = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey fileKey = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File","FileName");
try{
* filename = attrib.get(fileKey);*
* *
}
catch(Exception e)
{
* *
}
return filename;
This interface worked fine two weeks ago and nothing in the system has changed. Does anybody have any pointers on how to resolve this?
Thanks,
Nick.
Have you checked the dynamic configruration header in SXMB_MONI?
Is the filename available?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you post the suspected Java code( from the mapping), we can have a look and help you
Regards
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the problem. Your java coding uses substring function something like (0,7) to fetch portion of the string. if the substring does not able to parse 8 characters , it will obvious give stringoutofboundexception. Please check the filename which is more than 8 characters or less.
If you want , provide your coding here . we will fix it.
NOte: Since you declare statically 8 characters to use, if you dont have the substring length more than 8, you will hit always runtime exception stringoutofboundexception. Hope I answered your question. The problem occurs specific to your data and not always.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the code snippet...
String filename = "G0XX_XXXXXXX_XXXXX_31-01-2011".
String result = filename.substring(19,27);
Please let us know, if you need further support.
Note: Since index starts from 0, if you want 20th character as starting point, you have to specify starting point as 19.
since you want 8 characters from it, I specify number 27 as endpoint. If you want complete date like 31-01-2011, then specify as filename.substring(19,29);
Thanks
Baskar
There are couple of ways to debug. I dont know whether you have ideas to debug using eclipse tool.
Please follow the below links
/people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
/people/christian.drumm/blog/2008/09/30/debugging-java-mappings-using-sap-netweaver-developer-studio
Hope this might be helpful.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.