Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JCo version 3.0 - how to set connection properties?

I'm in the process of migrating from SAP JCo 2.1 to the recently release JCo version 3.0. I don't understand the new process of defining destinations and setting connection properties. The SAP JCo 3.0 example is called StepByStepClient, and that example uses a stored properties file, and the JCo 3.0 documentation has the following warning, but does not provide any further info on how you should actually perform this in a real situation:

"For this example the destination configuration is stored in a file that is called by the program. In practice you should avoid this for security reasons."

static String ABAP_AS_POOLED = "ABAP_AS_WITH_POOL";

Properties connectProperties = new Properties();
connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST, "value" );
connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR,  "value" );
connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "value" );
connectProperties.setProperty(DestinationDataProvider.JCO_USER,   "value" );
connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "value" );
connectProperties.setProperty(DestinationDataProvider.JCO_LANG,   "value" );
connectProperties.setProperty(DestinationDataProvider.JCO_POOL_CAPACITY, "value" );
connectProperties.setProperty(DestinationDataProvider.JCO_PEAK_LIMIT, "value" );

createDataFile(ABAP_AS_POOLED, "jcoDestination", connectProperties);

JCoDestination destination = JCoDestinationManager.getDestination(ABAP_AS_POOLED);
JCoFunction function = destination.getRepository().getFunction("BAPI_SALESORDER_GETSTATUS");

I don't understand the connection between getDestination and DestinationDataProvider.

I am building some web-based inquiry screens using Tomcat that use JCo to extract R/3 data and I want to define the connection properties outside of the code for easy manipulation when moving from test to prod. I don't use J2EE - JNDI lookups.

Has anyone else migrated to JCo 3.0? Can you provide an explanation of how this should be perfomed?

Thanks, points to be awarded.

Former Member
Not what you were looking for? View more on this topic or Ask a question