Skip to Content
0

XSJS code for calling the REST in SAP HANA

May 30, 2017 at 02:33 AM

37

avatar image
Former Member

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,

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers