2

I am developing a Java app that is deployed on the SAP Cloud Platform, using the SAP JCo3 Connector. It should make some RFC calls to an ABAP Backend, therefore I am using a SAP Cloud Connector. The destination is defined in the SAP Cloud Platform, however I would like to dynamically pass the Username and Password (from a login mask) to login in the SAP back-end with different users. The aforementioned properties are jco.client.user and jco.client.passwd respectively.

How can one dynamically change the properties of the JCoDestination, enabling several users using the application concurrently? There is no method "setProperties(...)".

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
uw473r100
  • 21
  • 1

1 Answers1

1

You can't use Properties-files for this but have to register a DestinationDataProvider. This topic has been discussed at SAP, the answer contains example code how to do this.

Another document that covers this topic is How to Migrate from SAP JCo2 to SAP JCo3 and use SAP JCo3 in a Multi-Threaded Environment. You might not be interested into the particular quirks in order to do a migration, but it describes things like the DestinationDataProvider and other things you might find useful

Lothar
  • 5,323
  • 1
  • 11
  • 27
  • I included the JCo3 library in the project lib and implemented the functionality from your suggested topic, but the app fails on resolving the "ashost" in the Cloud Platform destination(Cloud Connector). The standalone JCo3 library includes the extensions, but the JCo Library in the SAP Cloud Platform doesn't. Is there a way to programmatically address the jco.client.user and jco.client.passwd properties without the .ext package of the library? Is there an alternative to be used in the context of invoking RFC Calls from SAP Cloud Platform to ABAP Server via Cloud Connector? – uw473r100 Sep 13 '17 at 11:45