Quantcast
Channel: SCN : All Content - SAP HANA Developer Center
Viewing all 6745 articles
Browse latest View live

Where condition on time travel column view

$
0
0

Hi,

I want to put a where condition to get the very first fresh records inserted

SELECT key,value,"value1", "$validfrom$", "$validto$" from "practice_history1" ('REQUEST_FLAGS'='ALLROWS') where "$validto$"  is null

 

But im getting SAP DBTech JDBC: [2048]: column store error: search table error:  [1999] Error during optimizer search  issue.

Requesting for help

Thanks in Advance,

Athrey


know how a particular column value has evolved in History column table

$
0
0

Hi,

     I want to track the history of each column individually in a History table. Is there a way to do it?

eg:-

KEY VALUE ENTITY

AA     1         XX

BB     2         YY

 

UPDATE table set value=3 where key='BB'

UPDATE table set entity='ZZ' where key='BB'

UPDATE table set value=2 where key='BB'

 

KEY VALUE ENTITY

AA     1         XX

BB     2         YY

BB     3         YY

BB     3         ZZ

BB     2         ZZ

 

I want to know how the value ENTITY having the key='BB' has evolved

Request you to help.

Thanks,

Athrey

SUBSTRING filter on Projection

$
0
0

Hi Guys,

I am new to HANA and tried searching through forums but couldn't find a similar question so i thought I would ask the experts here.

This is what is needed : I have a view on COEP and COBK tables and all I want is only show values for when OBJNR = 'K'. when i write a SQL statement in SQL console to test using this:

 

select top 10 * from "_SYS_BIC"/MY_COVP_VIEW" where "GJAHR" = '2014' and "PERIO" = '002' and substring("OBJNR",1,1) = 'K'

 

this returns what I want, But when i try to put in the a filter in my Projection node (graphical view) on the column OBJNR, saying substring("OBJNR",1,1) = 'K', it returns an error during activation so this is definitely not the right way of doing this filter.

 

Will appreciate your time and help.

 

Thanks.

SAPUI5 error "404 not found"

$
0
0

Hi all,

I'm looking into the SHINE content for SAPUI5, Odata, XS etc.  Looks very nice, and it's working fine. (HANA dev edition 1.91 via MS Azure!)

The next step I'm trying to take is to make some examples myself.  First by starting simple and replicating the shine content into a project of my own.

I started with exposing a table using Odata (.xsodata file), which works fine.

When I run it in the HANA web server, I get the logon screen, and after logging on I get the XML or JSON.  Nice.

I also created an .xsjs which returns a json of the same data, also nice.  I'm on a roll, or at least that's what I thought...

 

Now I want to display this data in a SAPUI5 application, which is also in the shine content.

The Shine content works fine.  But now I want to redo the shine content in a custom package.

And there it goes wrong.

No matter what I do, I always get error "404 not found" when running the html page in the hana web server.

I don't even get to the login screen.  Immediately I get this error.

Let me also add that the shine content (so sap package) works fine.  Only if I run the same code in a package created by me, it does not work.

I also copied the (working) shine content into my project.  Result: this copied code does not work, the same error.

 

The generated URL seems to be ok, the code is checked, shared and committed.

 

What could this be?

 

I already reinstalled my hana studio and addons + sapui5, but the issue remains.  Am I missing something?

XS, UI5 etc seem to work fine, or the shine content wouldn't work.

.NET error - Cannot find libSQLDBCHDB.dll

$
0
0

Has anyone encountered this error before when trying to establish a HANA DB connection from your .NET program using ADO.NET?

 

I have this piece of code and the error occurs at this statement

 

            HanaConnection conn = new HanaConnection("Server=hana.server.com;UserID=username;Password=password");

The error message that i keep getting is {"Cannot find libSQLDBCHDB.dll.":null}

 

there is nothing much on SDN and based on the standard documentation, i seems that i have this dll missing in the regedit but i have re-installed the client component numerous times with no success.

 

have you encounter this error before?

Call hdbprocedure from xsjs

$
0
0

Hi Experts,

 

I'm following post http://scn.sap.com/thread/3376895 to call a procedure from a xsjs, also created inside my xs project, using hdbprocedure file, but I'm getting an authorization error. Because of it, I got somehow confused about the authorization concept when executing web application. See below some questions:

 

1- Who is the owner of the procedure created by the hdbprocedure file?

2- When I call the xsjs service, the credentials used (by default) to execute the procedure is the user logged in the web application, right?

3- Is there any difference between calling sql queries from studio and from the web ide catalog?

 

Thank you all.

Roberto Falk

Real scenario example fro use of Sqlscript over graphical Approach in calculation view.

$
0
0

Hi Folks,

 

Can anyone share one business scenario when the calculation view needs to be created by sql-script and please explain why it was not achievable by graphical approach. any example of complex business logic which bound to use SQL-script.

SAP HANA Studio download?

$
0
0

Hello all, I am currently following a course on OpenSAP and i need to download SAP HANA Studio to following along the course but i cannot seem to find HANA Studio anywhere. After looking around I am under the impression that SAP has discontinued the distribution but then I wonder why the Course is still alive

 

 

 

Regards


AWS - SAP Cloud Appliance Library

Problem adding SAP Hana Cloud Platform System in Eclipse

$
0
0

Hi,

 

 

I am facing the issue in adding the cloud trial account system to the eclipse . I am using Eclipse Luna 4.4.2.

All the HANA development plugins are installed in eclipse .But while adding the system it is giving me the error (check the snapshot)

Please help me.

Thanks in advance.

 

 

 

ErrorWhileAddingHanaSystemToCloud.PNG).

 

 

 

Regards,

Sahil.

How to determine SQL Plan Cache Size?

$
0
0

Hi Everyone,

 

In our HANA production box, we are getting the below alert:

"96292 plan cache evictions occured on host hana, port 30003" and the recommendation HANA is showing is "To increase size of plan cache"

 

At present the plan cache size is default i.e. 2 GB

 

I found below three notes related to SQL plan cache

 

As per SAP Note 2124112 ,  HANA Mini Check with Check ID 1130 stands for SQL cache evictions

 

SAP Note "1977253 - Determines whether or not the plan cache is too small" seems relevant but is not yet released

 

I also checked SAP Note "2040002 - Size recommendation for the HANA SQL Plan Cache"

 

This note says if any of the following conditions is true in your system, please increase the plan cache capacity as outlined below:

 

1. "If CACHED_PLAN_SIZE is bigger than PLAN_CACHE_CAPACITY, newly compiled plans cannot be cached at all. In this case, you must increase your cache capacity"

-> In our HANA System, PLAN_CACHE_CAPACITY is greater than CACHED_PLAN_SIZE

 

2. "In an equilibrated system, the PLAN_CACHE_HIT_RATIO is lower than 90% (introduced in SP7)"

-> In our HANA system PLAN_CACHE_HIT_RATIO is lower than 90% for indexserver, so the second condition is satisfied

 

As per the Note, for Non-ABAP system,

plan_cache_size = 0.90 x (current PLAN_CACHE_CAPACITY)/(current PLAN_CACHE_HIT_RATIO)

 

For ABAP system,

plan_cache_size = # of SQL connections x 15 MB

 

We are running HANA in a Sidecar Scenario and also using HANA Accelerators so in a way, we also have a ABAP stack on top of HANA

 

So how should we determine the plan cache size?

 

Regards,

Vivek

sap hana function to calculate the string length in bytes

$
0
0


Hello All, i am trying to find a sap hana function to calculate the number of bytes in a string. Well what i exactly need to check if there are any DBCS data in a column. i googled for the issue and found the trick to just compare the number of bytes in a string with number of characters which seems  nice to me to check for any DBCS values. in column but the problem is i cann't find a function which can return me the string length in no of bytes.

 

can anyone please let me know if there is any function to calculate that or to any alternate way to do what i want !

 

Thanks for spreading knowledge

Missing values from calculated column

$
0
0

Can anyone help me with the problem i'm facing.

I have a simple calculation view as shown below.

 

CA_VIEW.png

In the join I add one calculated column to my dataset.

MEDIATYPE with a hardcoded value 'Call'

Cal_column.png

When I preview the result of my view it looks ok, so far so good.

 

Example.png

 

But when I use the distinct values in this same data preview it gives a result I did not expected.

0 values found

Distinct.png

Also when I open this view in SAP Lumira I get a empty column

 

Lumira.png

Can anyone tell me what i'm doing wrong or how I can fix my problem.

 

Thx

Error while connecting Power Pivot to HANA

$
0
0

Hi,

 

I am trying to establish connection form power pivot to hana via odbc. I am successful in connecting to hana server and I was able to see the list of available views/tables. But when I click on any particular table/view I get the following error ERROR [42000] [SAP AG][LIBODBCHDB32 DLL][HDBODBC32] Syntax error or access violation;257 sql syntax error: incorrect syntax near "[": line 1 col 10 (at pos 10). But I am able to get the results if I execute the query directly. Please find the attached screen shots.

 

sc2.PNGsc3.PNGsc1.PNG

 

Regards,

Monissha

HANA Modeling: Default client setting in calculation view

$
0
0

Hi,

 

I am a HANA Live calculation reuse view (semantic setting: Data Category= <blank>, Default Client = 'Cross Client', Execute In = 'SQL Engine'), in another calculation view which has semantic settings as Data Category= Cube, Default Client = 'Session Client', Execute In = ''.

 

The data preview of the final calculation view should display the data only for the client that is specified in my user profile (under Security). However, in the output I am getting data for all the clients that are maintained in the database.

 

Any inputs around how this can be corrected?

 

Thanks,

Alston.


Grouping in Calculation view

$
0
0

Hi people,

 

one simple question: do we have some equivalent to the Group By-clause in graphical calculation view? I want to find duplicates and want to group my rows by having count(*) > 1. Any ideas?

XSJS and OData-Batch result consuming

$
0
0

Hello,

 

I've got some problems regarding the consuming of Batch-Responses of OData. I've successful send out an OData Batch request via POST to $Batch;

 

The returned request however seems to be inaccessible to me in XSJS (this is just a shortened example!):

HTTP/1.1 200 OK
Date: Tue, 17 Mar 2015 17:12:37 GMT
Server: Apache/2.4.7 (Unix)
OData-Version: 4.0
Content-Length: 455
Content-Type: multipart/mixed; boundary=batchresponse_idcdnaCy-dI6D-MOde-391O-3CTLb0Gk1Glf
--batchresponse_idcdnaCy-dI6D-MOde-391O-3CTLb0Gk1Glf
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 400 Bad Request
Content-Type: application/json;odata.metadata=minimal;charset=utf-8
Content-Length: 160
{
"error" : {
"code" : -1000,
"message" : {
"lang" : "en-us",
"value" : "Property 'U_test' of 'Item' is invalid"
}
}
}
--batchresponse_idcdnaCy-dI6D-MOde-391O-3CTLb0Gk1Glf--

This seems a quite easy task, yet I cant access the content of the body, e.g.:

 

var client = new $.net.http.Client();
response = client.request(b1request, b1slDest).getResponse();
$.response.setBody(response.status + " \n-\n " + JSON.stringify(response.headers)        + "\n-\n" + JSON.stringify(response.entities) + "\n-\n" + response.contentType        + "\n-\n" + JSON.stringify(response.body));

and it returns:

 

 

200
-
{"0":{"name":"~response_line","value":"HTTP/1.1 200 OK"},"1":{"name":"~server_protocol","value":"HTTP/1.1"},"2":{"name":"~status_code","value":"200"},"3":{"name":"~status_reason","value":"OK"},"4":{"name":"date","value":"Tue, 17 Mar 2015 17:29:16 GMT"},"5":{"name":"server","value":"Apache/2.4.7 (Unix)"},"6":{"name":"odata-version","value":"4.0"},"7":{"name":"content-length","value":"455"},"8":{"name":"content-type","value":"multipart/mixed; boundary=batchresponse_HR17MOOa-eebB-kJ1s-6HT8-h5yG3uEzbuwM"}}
-
{"0":{}}
-
multipart/mixed; boundary=batchresponse_HR17MOOa-eebB-kJ1s-6HT8-h5yG3uEzbuwM
-
undefined

 

So where is my body? How can I access the interesting part that is returned within the batch response? According to the XSJSDoc there are no more fields to access? (JSDoc: Class: WebResponse)

 

Best Regards,

 

KB

How to import data from .CSV into SAP HANA at a scheduled interval?

$
0
0

Dear SAP HANA Experts:

 

I have a scenario  in which I want to load the data from one or more .csv files ( from the Windows box where HANA studio is installed)  into SAP HANA database at a regular interval. what are my options?

1. Create a windows batch file to invoke "import ..... .csv into XYZ table" at a scheduled interval. If it is possible, how do I connect to HANA database from command prompt and invoke the import command ( the way we import the data from the command prompt in Oracle/SQLPLUS

2. Is it possible to get this scheduled job done from within SAP HANA Studio?

Please direct me to a similar case study or code example.

 

Thanks in advance.

 

Jag

SAP HANA Studio installation and system ID

$
0
0

I want to install the SAP HANA studio on my PC. I have downloaded and installed the SAP HANA studio but now I am unable to add the system. The user ID and password that I am using is not recognized by the HANA. Also it asks to insert the SYSTEM ID to add the system. But don't know where the system ID is. Is anybody has some idea about it?

.csv files upload from windows batch file, IMPORT not able to access .ctl file

$
0
0

Hi Guys,

 

I am trying to schedule the upload of a .csv file from windows batch file .bat

 

I am able to connect to HANA using HDBSECUSER store login and can execute every single SQL command through batch file, but not IMPORT or IMPORT FROM command.

 

Here is what I am doing.

1) I created a Batch file xxx.bat with the following

"C:\Program Files\sap\hdbclient\hdbsql" -U LSSxxx -c ";"  -I "C:\Users\LSSRBD\Desktop\xxx\MBEW Upload\xxx.sql"

 

2) xxx.sql file contains:

DELETE FROM "XXX_CUSTOM"."XXX_UPLOAD";

IMPORT FROM CONTROL FILE 'C:\Users\LSSxxx\Desktop\xxx\XXX Upload\xxx.ctl';

 

3) xxx.ctl file contains:

IMPORT DATA INTO TABLE "XXX_CUSTOM"."XXX_UPLOAD" FROM 'C:\Users\LSSXXX\Desktop\xxx\xxx Upload\xxx201502.csv'

RECORD DELIMITED BY '\n'

FIELD DELIMITED BY ','

OPTIONALLY ENCLOSED BY '"'

 

when I try executing xxx.bat file from the command line, I am getting the following message.

 

 

general error: Cannot open Control file

 

So I gave the command: icacls "xxx.ctl" /grant Everyone:F from command line and it worked. So I am assuming this gave the permission to every one on the pc.

 

I am still getting the error: general error: Cannot open Control file.

 

What exactly is wrong that I am doing here? HDBSQL works with every SQL command I through onto HANA DB content, but IMPORT command is failing. How do I solve this issue?

 

IMPORT or IMPORT FROM Commands are SQL commands, Is not it, the xxx.sql file executes all other SQL commands but not these IMPORT* command(s).

Viewing all 6745 articles
Browse latest View live




Latest Images