Skip to Content
0
Former Member
Jan 20, 2009 at 09:52 AM

JCo Connection / RFC in Pricing Userexit

48 Views

Hi all,

going through all the subjects concerning RFC & JCo connection I found a post with a code sample used to make an RFC call:

import com.sap.mw.jco.JCO;
import com.sap.sce.engine.ddb_inst;
import com.sap.sxe.db.*;
import com.sap.sxe.db.imp.rfc.*;
import com.sap.mw.jco.IFunctionTemplate;
import com.sap.mw.jco.IRepository;
...
...
// For the default connection
JCO.Client crmJCO = null;
try{
/ RFC and JCO connection to CRM
	connRFC cRFC = (connRFC)connection_factory.get_current_connection();
	crmJCO = cRFC.getIdleConnection();
}catch(Exception e){
	log_api.log_write_msg("LOG1", "LOG2",1,
       "Error establishing JCO connection to CRM: "+ e);
	...
        ...
}

Important (I guess) clue - this one is for the CRM and we're using ISA.

And the problem is - for the class connRFC there is no such method as getIdleConnection(). Actually for this class we have some 5 or 6 basic methods. We realize that there are some differences between CRM and ISA, but we've got no idea how to handle this one...

Any kind of help will be greatly appreciated.

Regards,

T.M.