Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

how i can pass this sy-mandt value in HANA XSJS File

Dear Colleagues,

I am using an ABAP Managed Database Procedure in a HANA XSJS Service.

The system i use has HANA as its Primary DB.

I need to pass the client (sy-mandt) and bp id to this procedure and get the customer info.

This client can vary depending depending on the system.

I want to know how i can pass this sy-mandt value in HANA XSJS File or would i need to hardcode it in the xsjs file for the systems .

Code as below:

var body = '{'; 

         var bpid = $.request.parameters.get("BPID"); 

          var conn = $.db.getConnection();

     try{

  var client = '800';

         var pc = conn.prepareCall('CALL "SAPTEST"."CL_CUST_OPEN_INVOICES=>GET_CUST_INFO"(?,?,?) WITH OVERVIEW');

        // var cst = conn.prepareCall(pc);

pc.setString(1, client);

pc.setString(2, bpid);

pc.execute();

Please suggest.

Thanks,

Ipsita

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question