Skip to Content
avatar image
Former Member

XSJS code for calling the REST in SAP HANA

I am writing the code for calling the REST service in SAP HANA,

Code is,

var strPayloadFromJava ="{\"isSynonymSearchRequired\":false,\"isCaseInsensitiveSearchRequired\":false,\"metadata\ {\"localName\":\"home.hana.xs.dt.base.work.wolfgang.ContentToBeChecked::ROVYMETAENTITY\",\"scope\":[{\"baseLocalName\":\"ROVY\",\"type\":[\"TABLE\"],\"mode\":[\"RT\"]}]}]}";
var strHeaderServiceName ="checkMetadataExistence";
var strSapBackPack = strPayloadFromJava;
var request =new $.net.http.Request($.net.http.GET, cMetaDataAccessP);
request.headers.set('SapBackPack', strSapBackPack);
request.headers.set('Service-Name', strHeaderServiceName);
var response = client.request(request, destination).getResponse();

It shows error while saving the file in Hana Developer.

"client" was used before it was defined.

"cMetaDataAccessP" was used before it was defined.

"destination" was used before it was defined.

Please help me.

Thank you,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers