Skip to Content
0
Jun 26, 2008 at 09:36 PM

XI custom lookup function in mapping - error

45 Views

Hi,

I created custom function to do RFC lookup with ECC. We are on PI 7 with service pack level 14. The custom function takes value of 4 attributes from source and does RFC call to do lookup.

The below is the import of classes I used in the function

javax.xml.parsers.DocumentBuilder;java.io.*;

org.xml.sax.*;

javax.xml.transform.dom.DOMSource;

javax.xml.parsers.*;

org.w3c.dom.*;

com.sap.aii.mappingtool.tf3.rt.ResultList;

com.sap.aii.mapping.*;

com.sap.aii.mapping.lookup.*;

com.sap.aii.mapping.lookup.Payload;

javax.xml.transform.stream.StreamResult;

javax.xml.transform.*;

in the code I put warning trace as below -

trace.addWarning("INSIDE");

//determine the communication channel

Channel channel = LookupService.getChannel("DE1CLNT301", "RFC_O_FPATH" );

trace.addWarning("CHANNEL LOOKUP DONE");

//get RFC Accessor for the channel

accessor = LookupService.getRfcAccessor(channel);

trace.addWarning("ACESSOR LOOKUP DONE");

when I test run I get the below error:

Compilation of MM_O_MQ_I_SAP successful

INSIDE

CHANNEL LOOKUP DONE

Errorjava.lang.StringIndexOutOfBoundsException: String index out of range: -1

Can anyone help?

Thanks in advance