on 2022 Feb 01 4:21 PM
Hello CAP Team, Hi iwona.hahn,
in the last days I've spent quite some time to get remote services, defined in destinations of the Subscriber Subaccount working. The most crutial part was to return the xsappname as described in Register the Multitenant Application to the SAP SaaS Provisioning Service from the Variable: <VCAP_SERVICES.<service>.credentials.xsappname.
The Cookbook - Deploy SaaS Solutions does mention the SAP BTP Dependencies but uses this example
"mtx": {
"dependencies": ["xsappname-1", "xsappname-2"]
}
to be put into the package.json. But as the xsappname is dynamic I would suggest to replace this with the code I've added to the server.js:
const xsenv = require("@sap/xsenv");
xsenv.loadEnv();
const services = xsenv.getServices({
dest: { tag: "destination" },
conn: { tag: "connectivity" },
});
cds.env.mtx.dependencies = [services.dest.xsappname, services.conn.xsappname];
In addition the section Use Destinations from Subscriber Account should mention that for On Premise destination also the connectivity service must be bound. Especially as an S/4HANA System is given as an example.
Best Regards
Gregor
Hi gregorw,
I know this question is a bit old, but there is also a "catch" related to the usage of destinations via Cloud SDK on a Multitenant Application.
For future reference and for those that are using Cloud SDK, please check the following documentation at session dedicated to Multitenancy:
https://sap.github.io/cloud-sdk/docs/js/features/connectivity/destinations#destination-service
Best regards,
Ivan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ivan,
my"Question" is actually more of an improvement request regarding the pre-requisite to use subscriber subaccount destionations. Because you need to return the destination service, and when using on premise destination you also need to return the connecitvity service as a dependency while subscribing in the dependency callback.
Best Regards
Gregor
User | Count |
---|---|
70 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.