on 11-14-2018 1:27 PM
Hi All,
Please bear if the question is amateur as I dont have much knowledge working with HANA XSA.
PROCEDURE "location"( )
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
AS
BEGIN
insert into "new.new" values(333,80000,'Dummy1','Dummy2');
commit;
END
The procedure works fine when I called. Now I have created a xsodata service "user.xsodata" and below is the code
service {
"new.new"
as "Adjustment" create using "location";
}
The intention of the xsodata is to invoke the procedure and insert the data into the table which is not happening. Pls help. I'm just getting the JSON output alone, inserting is not done.
See if this help.
one important point you must consider is , you are using a procedure to insert data to the table ( entity ) . How will you receive the payload in your procedure ? there is no "IN" / "OUT" in your given procedure. Above document says how you should manage the syntax .
-- sorry for late response.
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, thanks for the response. Just one more question, I need to expose either procedure/xsjs output which would be either a table/JSON respectively via xsodata. Is this possible? If so can u pls provide me a simple example? Whatever resources I have seen, it asks to use views for xsodata READ operations.
easy way to consume procedure ( read only ) and return the output is , use the procedure in a scripted calculation view and expose the calculation view as xsodata .
you cannot propagate xsjs response to xsodata unless you either code the logic in xsodata layer . why dont you use xsjs instead ?
https://blogs.sap.com/2014/06/23/transferring-complex-structured-data-from-ui-to-xsjs-posting-json/
Sreehari
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.