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

Select a column given by parameter via XSDS

$
0
0

Hi,

 

I'm new to SAP HANA, and know I'm facing this problem:

 

I've been given an entity declared like this:

 

Entity translation {

key id: Integer64 not null;

en: String(5000);

fr: String(5000);

de: String(5000);

it: String(5000);

es: String(5000);

zh: String(5000);

ko: String(5000);

ru: String(5000);

jv: String(5000);

ar: String(5000);

pt: String(5000);

ja: String(5000);

};

 

So you get the id and depending on the language that is been used, you choose one column or other

 

For example: we are using the language "english" (en). So I've got a global variable: var lang = "en";

 

Is it possible to perform a select with XSDS like this, so I choose the column i want to display depending on the variable "lang"?

 

        var XSDS = $.import("sap.hana.xs.libs.dbutils", "xsds");

 

        var MyEntity = XSDS.$importEntity("package", "model.translation");

       

        // retrieve entity instance

   

        var query = MyEntity.$query().$where(MyEntity.id.$eq(1));

       

        var results = query.$execute();

       

        // process result

        if (results.length > 0){

            $.response.setBody(JSON.stringify(results[0].lang));

        }

 

Of course this code is wrong, but is just so you canget the idea...

 

Thank you very much


HANA XSJS Bulk Update (PUT operation)

$
0
0

Hi all,

 

I have a scenario to do Batch operation/ bulk update on my Hana table.

 

To perform this I suppose to use HANA XSJS.

 

I have a SAPUI5 screen with 10 text boxes, as soon as user fills the text box and enters the save button, the complete 10 fields should get updated into HANA table via XSJS with serial numbers.

 

Can you please help me to figure this out.

 

Regards,

Vicky.

HANA Multi-host Replication Certificates

$
0
0

Friends!

 

Hana 3 host system version 97
SUSE linux server 11 sp3

 

I create a system with same topology version 10

Add new system as replication slave,

replication mode: sync

 

1.) Do Certificates replicate over?

2.) Does all XS engine Content replicate over?

 

I have been stuck in some old sap cockpit, webdispatcher ui problems during recovery and update process.

 

I have been updating my hana system and then Recovering and that order of operations is overwriting the updates in xs engine administration UI.

 

Would replicating over write my xs engine administration ui? /sap/hana/xs/admin OR /sap/xs/admin/webdisptacher/admin ?

 

Thank you for your time and diligence!

Regarding Import From statement in stored procedure

$
0
0

I have created a stored procedure which contains IMPORT FROM CSV FILE statement.

While calling the procedure from SAP HANA Studio, it gives following error "GenericFailure exception: feature not supported: import from doesn't support DDL auto commit mode off"

If same statement is fired directly from SAP HANA Studio then it works without issue.

 

Auto commit mode is "on", but still getting the error.

How to fix it?

 

Regards,

Rahul

HANA nJDBC issue in JPA application

$
0
0

Hi,

 

We are in HANA version SP09 1.00.094.00.1427101515 and migrating our DB2 DB to HANA DB where we have few JPA and JDBC based application , in JPA application when we try to perform Insert statement its ends with strange error as given here :

 

Caused by: com.sap.db.jdbc.exceptions.jdbc40.SQLTransactionRollbackException: [129]: transaction rolled back by an internal error: cannot change this transaction's access mode from read-only to update directly: please use "SET TRANSACTION READ WRITE" statement first

 

Do we have any annotation in JPA where we can instruct container to handles the above transaction behaviour ?


Also does njdbc have versions w.r.t. specific HANA DB ?


Please help.

 

 

Best Regards,

Satish Kumar

Problem with input parameters not used

$
0
0

Hi everyone,

 

I have the following problem, i have two input parameter wich are derived from tables, all of them depends on another field. for example, i

have a table with date, last day of month and first day of previous month. i want to get only the last two values but they are depend on the field date.Screenshot_1.png

 

The thing is in the filter expression im not using $$IP_FECHA$$ so the prompt to write this value is not appear. filter expression is this:

 

("ZFECHEFEBAJ" >='$$IP_LDPY$$' AND "ZFECHEFEBAJ"<='$$IP_LDPM$$')

 

thanks

Link to download HANA Client?

$
0
0

Hi,

 

Can anyone give the link to download HANA Client for HANA Studio version 2.0.2

 

Best Regards,

Himanshu

SAP Hana - Data Preview of Attribute View fails

$
0
0

Hello,

 

I have an Attribute View created in my package, and it uses tables from my schema. I was able to Validate and Activate the Attribute view after using the following SQL:

 

GRANT SELECT ON SCHEMA "<SCHEMA_NAME>" to _SYS_REPO WITH GRANT OPTION;

 

But when I do a Data Preview of this Attribute View, and click on Raw Data, I get the following error:

 

Error: SAP DBTech JDBC: [258]: insufficient privilege: Not authorized

 

(I'm doing this in SAP Hana Modeler in Eclipse)

 

How can I fix this error?


SAP HANA Advanced Data Processing

$
0
0

Hi,

 

we want to use the Text Analytics (TA) on HANA.

But we are not able to activate or install this Option.

 

Can someone help me, or is the Option always installed and we only need the correct license ???

 

 

Thanks a lot

Simon

 

 

http://help.sap.com/hana/SAP_HANA_Server_Installation_Guide_en.pdf

 

1.1

●SAP HANA options provide additional functions you can use together with the SAP HANA base edition. To use the SAP HANA options you need a dedicated license for the options you want to use (see disclaimer below). SAP HANA options are:○

SAP HANA Accelerator for SAP ASE○

SAP HANA Advanced Data Processing○

SAP HANA Dynamic Tiering○

SAP HANA Enterprise Information Management○

SAP HANA Predictive○

SAP HANA Real-time Replication○

SAP HANA Smart Data Streaming○

SAP HANA SpatialCautionSAP HANA server software and tools can be used for several SAP HANA platform and options scenarios, based on the available SAP HANA licenses and the SAP HANA landscape.

How to calculate last day of month in calculated coulmn window

$
0
0

Hi Experts,

 

Today is 20th Oct 2015. I want last day of current month i.e. 31. So, could you please let me know, how to do that in calculate column window.

last_day.PNG

XSDS huge performance issue

$
0
0

Hi

I'm using XSDS extensively in my project. However, there is a huge performance issue with even small update/inserts to the data.
From the blog and PPT I got to know that I should do all the imports of the entities in an xsjslib file, rather than each xsjs file to improve performance.
I created a library with all the 8-9 entities that I need for the entire project. Not all these entities are used in all the xsjs files.

Should I create a separate xsjslib file for each entity?
I read in the blog that we can serialize the imports, can you please tell me how it's done?


Thanks

Inventory reports on Native HANA

$
0
0

Hello All,

 

Request you to please provide your inputs to implement Inventory reports in HANA.

 

How to implement Non-cumulative key figure concept in HANA ?

 

Kindly provide input to build reports on stock history ?

 

Regards,

Ravi

Query logics

$
0
0

Hello Experts!

 

I am in need of some query related tips from you J . By reading the given below table structures can you please suggest me the best way to write the query for retrieving results faster..

 

The following example is not the real data structure with me, but it is a copy with the original one.

I have a table which contains the name of the students and their location. Please see the below structure.


Student Master Table

Student_Id

Name

Continent

Country

Region

Province

1

Adriana

Europe

NL

NL1

Utrecht

2

Leo

Europe

NL

NL2

Gelderland

3

Steff

North America

USA

Idaho

Boise

4

Catherine

South America

Brazil

Federal District

Brasilia

5

Alan

Europe

Germany

Bavaria

Munich

6

Herman

North America

Canada

Ontario

Toronto

7

Aved

Asia

India

Kerala

Calicut

8

Lee

Australia

Australia

New South Wales

Sydney

9

Akio

Asia

Japan

Toyota

Aichi

10

Fernando

North America

Mexico

Baja California

Mexicali

11

Mahendra

Asia

India

Delhi

New Delhi

 

To classify the above students table based on their regions, I have another translation table which contains a classification name and the list of continent, country, region and province belongs to the classification.

Regional Classification Table

Id

Region

Continent

Country

Region

Province

1

Europe

Europe

 

 

 

2

USA

North America

USA

 

 

3

Latin America

South America

 

 

 

4

Canada & Mexico

North America

Canada

 

 

5

Canada & Mexico

North America

Mexico

 

 

6

East Asia

Asia

Japan

 

 

7

Australasia

Australia

 

 

 

8

Australasia

Oceania

New Zealand

 

 

9

South India

Asia

India

Kerala

 

10

South India

Asia

India

Tamil Nadu

 

11

North India

Asia

India

Delhi

 

12

Mumbai

Asia

India

Maharashtra

Mumbai

 

Based on the above translation table I need to classify the students with the Region they are belonging to. The translation here can be done with the combination of four columns; Continent, Country, Region and Province. That means a Region can be either only a Continent or a group of Continents, or the combination(s) of Continent and Country, or combination(s) of Continent, Country  and Region, or combination(s) of Continent, Country, Region and Province. So four types of combinations can be done. Can you please suggest what is the best way to join this table to Master table having millions of records of data in ti? As of now I have created 4 queries and clubbed them with ‘Union All’ clause.


Thanks in advance,

Nithin

AFM Getting Started - Parse Error on Activation

$
0
0

Hello everybody,

 

I followed the getting started tutorial for the Application Function Modeler here: SAP HANA Academy - AFM: 9. Getting Started with the Application Function Modeler - Part 2 [SPS 09] - YouTube

 

Unfortunately when I try to activate my flowgraph I get the following errors:

 

Message :

    Activation ID: 7011 (Repository: Activation failed for at least one object;At least one error was encountered during activation. Please see the CheckResult information for  detailed information about the root cause. No objects have been activated.)

 

"AFM_1/FG_2.hdbflowgraph": Parse the flowgraph XML document to generate objects error; cannot find structure info of a specified flowgraph part

 

I also tried it with a matching table as a Data Sink instead of a Data Sink (Template Table). But this didn't help.

The validation seems to be successful, just the activation fails.

 

I would really appreciate your help!

odata error: Parameters are not allowed for entity "calculationView" as it is not a calculation or analytical view

$
0
0

I have created scripted calculation view

cv.jpg

I can add parameter in aforesaid calculation view

cv1.jpg

It fetches me right result

cv2.jpg

 

But when I am to call aforesaid calculation view from odata service I am getting following error:

 

ERROR      zcustsearch/services/AutoComplete.xsodata

           Parameters are not allowed for entity "calculationView" as it is not a calculation or analytical view.

 

cverror.jpg

Any solutions


Third Party Javascript In XS Engine?

$
0
0

Is it possible to use third party libraries in the XS Engine? I'm currently writing a lot of server side code for a REST API and would like to use something like underscorejs but I can't seem to import it. I tired copying the source code into an xsjslib file (not ideal anyway) but that didn't work either.

How to use stored procedures

$
0
0

I went thru tutorials on how to create stored procedures but I am confused as to where you use them.  The tutorials execute the stored procedures via the SQL console but they do not provide any details on how I would use outside of the SQL console.  Can someone please explain how I would use a stored procedure outside of the SQL consoled (for example, calculation view)?

Thanks.

Sandy

Rev 60: Data Backup --> Out of Memory

$
0
0

Hello,

after upgrade to SP6 (Cloudshare) I just wanted to backup the data.

 

But running the backup gives me this error:

 

 

2013-09-23T02:36:13-07:00  P31433      1414a2d1409 ERROR   BACKUP   SAVE DATA finished with error: [447] backup could not be completed, [1000002] Out of memory ; $size$=536870912; $name$=ChannelUtils::copy; $type$=pool; $inuse_count$=1; $allocated_size$=536870912

 

 

With SP5 I've never had this issue before.

Administration Console in HANA Studio tells me (after failed backup)

Used Memory 13.52 GB

Peak Used Memory: 15.94 GB

Allocation limit: 17.57 GB

 

 

I also tried restarting the server, but it doesn't change anything.

System Monitor in SuSe Linux shows me only 4.9 GB of used Memory. I can't even see any change in this value during the backup attempt.

 

 

Can somebody help me please?

Kind Regards,

Fabian

Large Data volume on HANA - XS

$
0
0

Experts,

 

I have a requirement to be able to show large data volumes on a UI5 application that I am building on HANA. The requirement is to be able to show like 20-30 million rows of data in a grid (if the need be, not practical, but user can if we wishes to) based on multiple tables in HANA. The product is like a data explorer of the underlying tables being built for a larger process.

 

We planned to achieve this by using an OModel (server side model) on UI5 and tying the same to a XSOdata service. The XSOdata service is built to expose a calculation view which has a union of multiple tables and a projection on top. We have server side paging enabled by default on the table control in UI5. What that means is that every-time a user scrolls (or does a pagedown), the UI5 control makes a call to the OData service with $top and $skip commands. This takes like 4-6 seconds and gives a bad user experience. The key problem that I see here is not being able to cache the result of my query. Is there a way to cach the result of a query on a calculation view instead of running the view again and again for every $top and $skip? How can I attain some level of state-full behavior in this scenario? 

Decision Table: incorrect syntax near "/"

$
0
0

Listed below is the SQL code generated by my Decision Table in a Projection in my Calculation View.  When I select Data Preview on the Projection, I get the following error: "SAP DBTech JDBC: [257]: sql syntax error: [257] sql syntax error: incorrect syntax near "/": line 2 col 70 (at pos 165)".  Any ideas as to why I am getting this error?

 

SELECT

     "PURCHASE_DATE",

     "MANUFACTURER",

     "MODEL",

     "PRICE",

     sum("TOTAL_PURCHASE") AS "TOTAL_PURCHASE"

FROM "_SYS_BIC"."hanahandson/S4EX2_PRODUCT_DISCOUNT_BY_CUST_CV"

GROUP BY "PURCHASE_DATE",

     "MANUFACTURER",

     "MODEL",

     "PRICE",

     "NAME"

 

Thanks.

Sandy

Viewing all 6745 articles
Browse latest View live


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