Skip to content


$.net.Destination class returns the network destination with the given name. A network destination contains metadata (e.g., host name or port number). The network destination can also contain custom properties.


API Changes

Destinations in XSK make use of SAP BTP Destination service (see xshttpdest). As such, destinations no longer live in the file tree, so the first parameter of Destination representing the package is no longer needed. If provided, it will be ignored. Lookup for destinations happens based on the name.

Sample Usage

let net = $.net;

Read service.xshttpdest inside the Demo package that contains:
let dest = new net.Destination("Demo", "service");
// Check if the file has been read properly
$.response.setBody("Host: " " Port: " +dest.port);


new $.net.Destination(package, objectName)

Throws an error if no valid destination is found with the given name.


Parameter Name Description Required Type
package Ignored as lookup is done in Destination service optional String
objectName The name of the destination in Destination service required String