Hi Anil,
Can you please explain this with a simple example..
Regards,
Nithin
Hi Anil,
Can you please explain this with a simple example..
Regards,
Nithin
If you opt to try E_HANAAW_141 i wrote a full guide on
Hi Nithin,
1. When you create an .procedure file to create a procedure, you can create a local table type which can be used inside that procedure alone to input/output multiple values. Below screenshot shows one such table type.
In the table type tab next to SQLScript, you can create a local table type by adding code
CREATE TYPE tt_test AS TABLE ( col1 VARCHAR(4), col2 DECIMAL, col3 INTEGER);
CREATE TYPE tt_test2 AS TABLE(out1 INTEGER);
You can use it as input or output as below :
CREATE PROCEDURE test (IN tt_test_in tt_test, OUT tt_out tt_test2) ...
This acts as an array locally to that procedure.
2. If you want to declare global table types, you can go for CDS approach. You can create a .hdbdd file with below sample code:
namespace sap.hana.practice.tabletype;
@Schema: 'SOME_SCHEMA'
context GlobalTypes {
type tt_test
{ col1: String(10);
col2: String(40);
col3: Decimal(15,2);}; };
Upon saving and activating, this table type is available under corresponding schema -> procedures -> tabletypes section. You can drag and drop and use it in the required procedure as array globaly.
Regards,
Anil
Hi Thomas,
will this only support READ requests or full CRUD requests?
Regards,
Wolfgang
One more question: will we get a free Netweaver 7.5 Developer on SAP CAL?
How is the localization of EndUserText.* annonations supposed to work (Both in HANA CDS and in ABAP CDS)? Will we get localized annotations?
Hi Anil
Thanks you.
In this case, I will seek the procedureto pass thedatafrom one table toanother.
Again, Iappreciate yourresponse.
I will not closethe caseuntil I have the procedureandanswerhere.Maybe I canhelpsomeone else.
Regards
Dear Gurus,
I am having an issue with a calc view which has required input params while calling it from a stored proc. When I hard code the same value, then the stored proc runs fine, however, when I call it with a variable that I am passing in.. then I get an error. any pointers are appreciated.
while debugging the stored proc, I am able to see the value that I need, however, the error contains a funny looking message... the word [here] appears as the value which is assigned to the variable which I am using. I am confused as to where this value is getting assigned from
Hello all, I am new to HANA.
I am currently using hana trial version.
I have created XS application, and it was execeuted successfully, by creating hello.xsjs, xsaccess, xsapp files.
I have created a table called TEST in my inbuilt schema, and also created xsjs file in the following way,
============================================
function getDataFromTable(){
var id = $.request.parameters.get("id");
if (id === null) {
$.response.setContentType("text/plain");
$.response.addBody("id is null!");
}
var val1 = $.request.parameters.get("val1");
if (val1 === null) {
$.response.setContentType("text/plain");
$.response.addBody("val1 is null!");
}
var output = {};
output.data = [];
var conn = $.db.getConnection();
conn.prepareStatement("SET SCHEMA \"xxxxxxxxx\"").execute();
var st = conn.prepareStatement("INSERT INTO \"xxxxxxxtrial.p1234567.hello","TEST\" values(1,K)");
st.setString(1,id);
st.setString(2,val1);
st.executeQuery();
st.execute();
conn.commit();
var record = [];
record.push(id);
record.push(val1);
output.data.push(record);
conn.close();
$.response.setContentType("text/json");
$.response.addBody(JSON.stringify(output)); }
along with this , also created xsaccess, xsprivileges, xsapp, TEST.hdbtable,model_access.hbd role files .
==========================================================================================================
model_access.hbdrole ---------- (role xxxxxxxxxtrial.p1234567.hello::model_access {
application privilege: xxxxxxxtrial.p1234567.hello::Basic;
}
But when I am trying to run the xsjs file, I am unable to see the table and inserted values , it is showing me blank page.
Could you please help me.
Huh?
That asks for an ERP source system.
Hi florian,
Your answer is so helpful florian.
Have moved all the objects and activated all the objects, I am also able to run the below statement.
call "HCP"."HCP_GRANT_SELECT_ON_ACTIVATED_OBJECT"('s0014485595trial.p1234567.hello', 'TESTS')
But tried to open this url,
https://s8hanaxs.hanatrial.ondemand.com/sxxxxxxxtrial/p1234567/hello/hello.xsjs?id=1&&val1=6) It is showing a blank page again.
Could you tell me what all steps do I need to take apart from this and also how to do
a HTTP GET to the URL pointing to my .xsjs file, passing the URL parameters.
this same issue is happening when i call it from SQL Console.
My query:
select * from myCalView ( 'PLACEHOLDER' = ('$$i_matnr$$', '000000000000001182'),
'PLACEHOLDER' = ('$$i_location$$', '''D012'',''D005'''))
The error is:
Could not execute 'SELECT *, ...' in 11 ms 81 µs .
SAP DBTech JDBC: [2048]: column store error: search table error: [6968] Evaluator: syntax error in expression string;expected TK_RPAREN,parsing "in (\"MATNR\",'000000000000001182') AND in (\"WERKS\",''[here]D012','D005'')"
Why does the [here] show on the error.. I am not sure where that is coming from.
the funny thing is that if i pass a single value, then i get a result back..
in my calc view i have a filter expression that looks like this:
in ("VWERK",'$$i_location$$')
and
in ("MATNR",'$$i_matnr$$')
Where can I find error logs for a failed SAP HANA One upgrade?
I tried to upgrade SAP HANA One Rev 70.0 to version 85 using the SAP HANA One Management Console's Addons tab and it failed with the following error message about transport: transport is failed; tar -xzvf failed
I clicked Retry Uninstall and again, same failure message. Any guidance is greatly appreciated! I'm unsure of what the real problem is that is causing the upgrade to fail and would like to review log files to troubleshoot further. Thanks!
This view is not for custom XS jobs at all.
Instead it provides the status of SAP HANA internal jobs.
So for larger operations, e.g. merging a table SAP HANA can internally put the different steps of that operation into a "job" API, which will then take over the control over the execution of this job.
Having said that, the view you refer to is to provide the admin some insight into the current status of these jobs.
Hi Gaurav,
I consider this behavior a bug and you should open a support incident for it.
- Lars
Hi Quiros,
As I see, only one object is added to Join_5 node, which might be causing the issue. Two objects are required for a join node.
If you want a simple select on the row table OSRQ, then you can go with Calculation view - add a projection, add table OSQR to that and connect it to output. Calculation views can be build on row tables as well. But it is recommended to have the table as a column table in SAP HANA for analysis purposes.
Regards
Chandra
Hi there,
you're mixing things up here.
Intra-query parallelism is not influenced by the SQLScript features used. It refers to the operations performed for one single SQL command (scanning, filtering, projecting, joining, etc.). There is no direct way for you to control that. SAP HANA will always try to execute the statements as fast as possible.
However, the inter-query parallelism is heavily influenced by what commands you use and the dependencies between the queries in your script.
In your example itab_all_bp depends on temp3 which in turn depends on temp1 and temp2.
So the execution graph would allow temp1 and temp2 to be executed in parallel, the result set will be fed into temp3 (maybe this could be transformed into a outer query and sub-selects internally, but to be sure you need to use planviz here).
Finally itab_all_hp takes the result set from temp3 and works on that.
So, yes, you do get parallelism here.
- Lars
Thank you Chandra,
Sorry about theJoin_5
I leavethe image with theprojection
I have thesame error...
Internal Deployment of objects failed; Repository: Encountered an error in repository runtime extension; Internal Error 1 : no.950000 (mdx/metadata/deployment/deployCalcView.cpp:642)n An internal error occured. Assertion failed with error message
Thanks again, i appreciate thecooperation.
Please use the appropriate space for your questions - in this case SAP HANA Developer Center
--Vlado (Moderator)