Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all 9165 articles
Browse latest View live

Re: Table column type error using ARRAY_AGG in SQLScript

$
0
0

Hi Addi,

 

    Thank you for your reply and suggestions.

    You asked why I want to add a column to a table variable. The problem lies in: I can't find the proper XSJS API to consume more than one result sets returned from the Procedure it calls.

 

    In XSJS, it invokes the procedure:

Capture.JPG

   and the last '?' represents the result set it returns.

 

   After checking XSJS API (http://help.sap.com/hana/SAP_HANA_XS_JavaScript_Reference_en/$.db.ResultSet.html), it seems that only one result set can be returned at a time.

 

   On the other hand, inside the Procedure, I want to return tables like this:

Capture.JPG

   In order to return these two tables (temp_major_list, temp_rank_list) at a time, I construct a global table type:

Capture.JPG

   In this case, I have to add one column called 'TYPE' to tell different result sets apart.

 

 

   This is the complete story. Can you come up with better solutions? Any suggestion would help a great deal.

 

   By the way, are there more ways to call Procedure of functions in XS project instead of XSJS?

 

 

Thank you and best regards,

Angel


Re: UPGRADE SBODEMOUS IN SAP HANA

correct use of input parameter in calc view

$
0
0

Hi,

 

I created a script-based calc view USERS_CALC with input parameter as following.

/********* Begin Procedure Script ************/

BEGIN

    DECLARE session_user_var VARCHAR(256) := '$$userId$$';

    all_users = CE_COLUMN_TABLE("USER_TABLE", ["ID", "NAME", "UUID", "TYPE", "USER_ID"]);

    

    var_out = CE_PROJECTION(:all_users, ["ID" AS "Id",

                                          "NAME" AS "Name",

                                          "UUID" AS "Uuid",

                                          "TYPE" AS "Type",

                                          "USER_ID" AS "UserId",

                                          CE_CALC('"UserId"='':session_user_var''', TINYINT) AS "IsMe"]);

END /********* End Procedure Script ************/

It seems the input parameter doesn't take effect when I call the calc view "select *from"_SYS_BIC"."test.calc/USERS_CALC"(placeholder."$$userId$$"=>'b')". No matter what value I pass to the view, the result of CE_CALC is always 0 even though there should be a match that results 1.

 

Is there anything wrong with my calc view? Your help is appreciated.

 

Thanks,

Michael

Re: HANA and Hadoop in Future road map ?

$
0
0

Hi Pradeep,

 

Just saw your post.

Guess by now you may have got answers to your query from someone or other.

Nevertheless, in my view Native Integration of HANA with HADOOP can only be achieved via SDA ( smart data access ) native capability in HANA.

Re: correct use of input parameter in calc view

$
0
0

Hello Michael,

 

there seems to be an issue with the  box brackets...

from what i understand from your code

 

var_out = CE_PROJECTION(:all_users, ["ID" AS "Id",

                                          "NAME" AS "Name",

                                          "UUID" AS "Uuid",

                                          "TYPE" AS "Type",

                                          "USER_ID" AS "UserId"],

'"UserId"=:session_user_var');

 

 

Note: i have not tried this specific code out out but have a look in the example  on (quoted below) help.sap.com/hana/SAP_HANA_SQL_Script_Reference_en.pdf pg 95.

 

ot_books1 = CE_PROJECTION (:it_books,["TITLE","PRICE", "CRCY" AS "CURRENCY"], '"PRICE" > 50');

 

Warm regards

aadi

 

p.s. the statement 'See CE_CALC for the filter expression syntax' on pg 94 is only for valid syntax you need not use CE_CALC

HANA XS - How to fix Inactive Testing issue of items not loading (when using the cookie)

$
0
0

Is anyone else having issues with the inactive testing using the cookie (sapXsDevWorkspace)?  My team has abandoned using it because it is causing us a lot of trouble.  It initially worked well for a few hours, but eventually it stopped loading resources.  We got errors loading the SAP js libs or even the newly commited ( but not activated) code changes.  

I have seen the feedback on SCN post http://scn.sap.com/thread/3517042 but we cannot seem to fix the issue of the system not loading things.  I am on version SPS7 (1.00.70.00.386119) on AWS and I have seen it work for a short period then it seems to get flaky and stop working.   I don't understand what is causing the error to occur as I cannot make it do the same thing twice. 

Here are some screenshots:

image001.jpg

Cookie defined in Chrome

 

image002.png

Repository Name with my user:

 

image003.png

This is the result:

 

image004.png

Sometimes it loads more of the files and fails later:

 

I verified that I logged in under the same user and the cookie name.  The system has developer_mode set to true.  Is there something we're missing? 

 

 

 

Jim Giffin.

Re: correct use of input parameter in calc view

$
0
0

Hi Aaditya,

 

Thanks for the answer. I need a calculated attribute 'IsMe' produced by CE_CALC into the projection. I don't want to filter the projection by 'UserId'. Is there anything I need to do in order to add the calculated attribute?

 

Thanks,

Michael

Re: cannot get the data provider outline

$
0
0

Hi Akhilesh, were you able to resolve this issue? I am getting exactly the same error. Please let me know.


Thanks,


Jennifer


Re: correct use of input parameter in calc view

$
0
0

Hello Michael

 

Sorry for misunderstanding your question...

 

But i cannot guess what you intend to calculate by the expression

 

UserId"='':session_user_var

 

are you trying to output the result of the comparison?

 

warm regards

aadi

Re: correct use of input parameter in calc view

$
0
0

Hi Aaditya,

 

following is in my first post that I'm trying to output the calculated attribute:

 

CE_CALC('"UserId"='':session_user_var''', TINYINT) AS "IsMe"

 

 

Thanks,

Michael

Re: correct use of input parameter in calc view

$
0
0

Hi Michael,


The Calculation View code is correct. I am just not sure what are you trying to here:

CE_CALC('"UserId"='':session_user_var''', TINYINT)


I feel the above statement is incomplete.


Few probable checks:

1. If there is a comparison that you intend to do of the user id entered (in the input parameter) and the session variable (with which the user had logged in), try to put that condition outside and use the output here or change the existing condition to have complete comparison. Since I am not sure, if CE_CALC understands what is to be done here.


2. Replace the CE_CALC condition with something simple (math formula) and see if the Calculation View executes as expected.


3. Check the input parameter itself.


Hope it helps!


Regards,

kG

Re: HANA and Hadoop in Future road map ?

$
0
0

Hello Pradedeep,

 

Integration with Big data like Hadoop, Teradata, etc.. or any other sources is done by SDA(Smart Data Access) in SAP HANA.

 

Bca, SAP HANA Database consists 2 types of table or data , i.e Hana Table or Data and Virtual Table or Data.

 

1. Hana Table lies inside of SAP HANA Database for combining its own data.

 

2. Virtual Table, which is used for  combining SAP HANA data with other heterogeneous data sources like Hadoop, Teradata, SAP Sybase ASE and SAP Sybase IQ.

 

This is called Smart Data Access(SDA).

can't send Ajax request via POST method to HANA DB

$
0
0

Hi all,

 

In one SAPUI5 project, I am intended to send some arrays in Ajax to XSJS file.

I first convert array elements into a string and adopt "GET" method in Ajax. The request looks like this:

Capture.JPG


Capture.JPG

But it turns out that the length of string exceeds the length of URL.

So I try POST method, since it is defined in jQuery library. However, the HANA Developer Guide (the latest one, page 452) says POST method is not supported.

 

Does anyone know how to send my data in this case? So far, I'm thinking of encoding my data (to make it shorter) before it is sent and decoding it when reaching XSJS file, which is quite a trouble.

 

Any suggestion will be of great help.

 

Best Regards,

Angel

Re: can't send Ajax request via POST method to HANA DB

$
0
0

Where exactly do you see that POST isn't supported? I don't see anything in that page that says that. Do you perhaps mean this sample:

 

if($.request.method === $.net.http.GET) {

// get query parameter named id

var qpId = $.request.parameters.get("id");

 

// handle request for the given id parameter...

var result = handleRequest(qpId);

 

// send response

$.response.contentType = "plain/test";

$.response.setBody("result: " + result);

$.response.status = $.net.http.OK;

} else {

// unsupported method

$.response.status = $.net.http.INTERNAL_SERVER_ERROR;

}

 

If so, that's not saying that POST isn't supported in XSJS in general. Its just demonstrating a service that only expects GET. Therefore this one particular service implementation produces this message for any other request methods.

Re: can't send Ajax request via POST method to HANA DB

$
0
0

Sorry for the mistake I've made. Thank you Thomas.


Re: can't send Ajax request via POST method to HANA DB

$
0
0

It turns out that it is practical to send Ajax request via POST method. Thanks Thomas again for pointing out my misunderstanding.

 

Here is the way I send array data in my case described above:

First change array into string using join();

After that, using $.post

Capture.JPG

Finally in XSJS:

Capture.JPG

 

Best Regards,

Angel

Re: correct use of input parameter in calc view

$
0
0

Hi Michael,

 

Can you please make the following change and try. I think the userId is the input variable to your scripted Calc view.

 

Michael An wrote:

 

/********* Begin Procedure Script ************/

BEGIN

--    DECLARE session_user_var VARCHAR(256) := '$$userId$$'; -- not really required, unless there is specific other use for this.

 

    all_users = CE_COLUMN_TABLE("USER_TABLE", ["ID", "NAME", "UUID", "TYPE", "USER_ID"]);

   

    var_out = CE_PROJECTION(:all_users, ["ID" AS "Id",

                                          "NAME" AS "Name",

                                          "UUID" AS "Uuid",

                                          "TYPE" AS "Type",

                                          "USER_ID" AS "UserId",

                                          CE_CALC('"UserId"='':userId''', TINYINT) AS "IsMe"]);

END /********* End Procedure Script ************/

 

Migration of BW to HANA Data Base

$
0
0

Hi Experts,

For Migration of BW 7.3 SP7 to HANA Data Base , I would like to know procurement details for HANA data base.

 

suppose current Database used by BW in production is 468GB (51%), assuming for HANA database (ROW and column store) it may require say 350GB space.

In that case , how many CPUs will be required??

as per details i believe , production system can be only on 1 HANA DB, and for Dev. and Quality we may require separate HANA BOX.

Also, w.r.t. Master and slave, at least 2 BOX are necessary (since scale out option is possible).

 

So does that mean , total 4 BOX are required?? or 2 HANA BOX are enough, may be of T-shirt size 'M' 4 CPU sockets.

 

Please correct me if this is not the case..

 

Thanks and Regards,

Amit.

Update to SP7 on AWS ?

$
0
0

Hi,

 

Is it possible to update my SAP HANA Developer Edition on AWS to SP7 ?

 

Thank you

Re: SAP HANA Developer Edition on Amazon Web Services (AWS)

$
0
0

Hi Hari,

 

I just used CAL to test SAP HANA developer edition rev 72 on AWS. The password of SYSTEM should be the solution password which you set. It works for me.

 

Screen+Shot+2014-03-24+at+1.19.52+PM.png

 

Best regards,

Wenjun

Viewing all 9165 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>