I'm currently developing a java application on SAP BTP on the Cloud Foundry environment using the SAP java buildpack.
I use the JCo package to make RFC calls to an ABAP system. I want to use a Saas architecture so I need to specify my tenant id somewhere because right now it takes the destinations from the main subaccount.
Here is the beginning of my function which allows communication with the SAP system:
try {
destination = JCoDestinationManager.getDestination("<DESTINATION_NAME>"); repo = destination.getRepository();
} catch (Exception e) {
throw new Exception("missing or invalid destination | " + e.getMessage());
}
And return this error :
java.lang.Exception: missing or invalid destination in params | Destination <DESTINATION_NAME> does not exist
My destination is correctly configured on the subscriber subaccount.
It's works with destination define on the main subaccount, but not with the destination set on the subscriber subaccount.
Can anybody please guide here what I have to do ?