7

Documentation: Deploy SaaS Solutions (MTX) - Dependencies to Destination / Conne...

 1 year ago
source link: https://answers.sap.com/questions/13571670/documentation-deploy-saas-solutions-mtx-dependenci.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Feb 01 at 04:21 PM

Documentation: Deploy SaaS Solutions (MTX) - Dependencies to Destination / Connectivity Service

1065 Views Last edit Feb 01 at 05:54 PM 2 rev

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK