on 2014 May 08 6:35 AM
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
Request clarification before answering.
hi Ipsita,
You can URL Mangle the sap client.
http://*.*:8nnn:/myXSJS/GEtClient.xsjs?sap-mandt=800
in your XSJS implementation,
var client = $.request.parameters.get("sap-mandt");
client variable will hold the client.
Sreehari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sreehari,
We tried the above as well : we call the XSJS from the UI5 Code as below and then use the values in our code :
http://test:8000/myPacakage/services/getInvoiceInfo.xsjs?BPID=0100000003&CLIENT=800
but the question here is if tomorrow i login to a different system again in the ui code i would need to change the Client value.
Is there some way to dynamically fetch this value.
Thanks,
Ipsita
User | Count |
---|---|
78 | |
30 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.