Namespace: $

$

Global scope for the SAP HANA Extended Application Services (SAP HANA XS) API

Classes

Application
Session

Namespaces

db
hdb
jobs
net
security
text
trace
util
web

Members

application :$.Application

The current XS application
Type:

request :$.web.WebRequest

The HTTP request instance that is passed over from the HTTP server to the XS Engine. Use this object as input for your XS Engine script.
Type:

response :$.web.WebResponse

The HTTP response instance that is passed over to the HTTP server. Use this object as output for your XS Engine script.
Type:

session :$.Session

The current XS session
Type:

Methods

import(package, library) → {Object}

Imports a server-side JavaScript library artifact. The library is a design-time artifact located in the repository. JavaScript library design-time artifacts have the suffix '.xsjslib'.
Parameters:
Name Type Description
package string The name of the package in which the library object is located
library string The name of the library object in the repository (without the suffix .xsjslib)
Throws:
Throws an error if the import failed or if the parameters were not valid.
Returns:
Type
Object
Example
// import math lib
var mathlib = $.import("sap.myapp.lib","math");

// use math lib
var max_res = mathlib.max(3, 7);
// legacy usage
var max_res_old = $.sap.myapp.lib.math.max(3, 7);

import(path) → {Object}

Imports a server-side JavaScript library artifact. The library is a design-time artifact located in the repository. JavaScript library design-time artifacts have the suffix '.xsjslib'.
Parameters:
Name Type Description
path string An absolute or relative path referring the library to be imported
Throws:
Throws an error if the import failed or if the parameters were not valid.
Returns:
Type
Object
Example
// import math lib
var mathlib = $.import("/sap/myapp/lib/math.xsjslib");

// use math lib
var max_res = mathlib.max(3, 7);
// legacy usage
var max_res_old = $.sap.myapp.lib.math.max(3, 7);