cancel
Showing results for 
Search instead for 
Did you mean: 

Connect through saprouter using jco 3

Former Member
0 Kudos

I've been trying to connect a java program to SAP using JCO Java connectors (latest version 3.0.13). I was having trouble and i was told that the problem was that i was trying to connect directly and i need to connect via saprouter. There's a connection property called saprouter where i need to place the sap router string. I've only found the way to specify such string for JCO (v 2.xx) and it is: /H//H/

Is this the same for JCO in its latest versison? If so, the specification of connection properties will be done well like this?

  Properties connectProperties = new Properties();
  connectProperties
.setProperty(DestinationDataProvider.JCO_ASHOST, "xx.xx.x.xx");
  connectProperties
.setProperty(DestinationDataProvider.JCO_SYSNR,  "00");
  connectProperties
.setProperty(DestinationDataProvider.JCO_CLIENT, "020");
  connectProperties
.setProperty(DestinationDataProvider.JCO_USER,   "xxxxx");
  connectProperties
.setProperty(DestinationDataProvider.JCO_PASSWD, "xxxxxx");
  connectProperties
.setProperty(DestinationDataProvider.JCO_LANG,   "en");
  connectProperties
.setProperty(DestinationDataProvider.JCO_SAPROUTER,   "/H/<saprouter>/H/<hostname>");

Accepted Solutions (1)

Accepted Solutions (1)

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Fernando,

DestinationDataProvider.JCO_SAPROUTER only needs to contain the SAPRouter host: /H/<saprouter>/H/. In case the addressed SAProuter doesn't use the default port 3299, you also put the port like this: /H/<saprouter>/S/<saprouterport> All other properties can remain the same.

Best regards,

Markus

Former Member
0 Kudos

Thank you very much for kind response Markus.

Best regards

Answers (0)