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

Is it possible to create a view in HANA CDS which queries from a table in repository (not from the entity)?

$
0
0

Dear Experts,

 

I am trying to create a view in Hana CDS which will fetch data from "SCARR" table of "SFLIGHT" schema.

 

Code:

 

namespace dev.cds.model;

 

 

@Schema: 'CDS'

context sampleCDS {

 

 

    view sample as select from "SFLIGHT"."SCARR"

   {

    CARRID,

    CARRNAME,

    CURRCODE,

    URL

   };

 

 

};

 

When I try to activate this CDS document, it is throwing an error saying 'Cannot find artifact "SFLIGHT"' .

 

As per my understanding, it is trying to find the SFLIGHT entity in the same CDS document, but I want it to fetch data from a table in schema(which was imported, not created through any CDS document).

 

Is it possible to achieve my requirement through CDS ?, I have been referring multiple sources including reference docs, but couldn't find any guidance.

 

I am using HANA MDC Trial, 1.00.102.03.1449674847.


SAP HANA Cloud Trial account - Content - Insufficient privilege

$
0
0

Dear SCN members,

 

I am trying to use free trial HANA Cloud account mentioned in Open SAP https://account.hanatrial.ondemand.com but after creating an account and schema, I have added the account in HANA studio.

 

But in Contents folder, I am receiving an error as "Insufficient privilege (EXECUTE on REPOSITORY_REST)".

 

Hence, I cannot try the practice sessions provided.

 

Please suggest the solution or guide me if I have missed anything in the setup of an account.

 

Thanks in advance,

 

Regards,

Nachappa S

SAP HANA Cockpit Trial Account - Hana MDC: Login failed - Wrong Credentials

$
0
0

Hi All,

 

 

Anyone encountered this error when tried to log in SAP HANA Cockpit trial account Administration Tools. I got this error where I am sure I input the correct username and passwords. I want to link to Eclipse.

 

My database already started. Did I miss something? or any configurations needed?

hanadb started.PNG

logfiles.PNG

When I try to debug . See below image.

error.PNG

 

Please help.

 

Thanks in advance.

 

Regards,

Lando

HANA Studio, Save and Activate a View via SQL console

$
0
0

Hi Guys,

 

is it possible to

 

1. save and activate OR

2. redeploy a view

 

via sql console?

 

Thanks in advance

Sebastian

SAP ECC on HANA

$
0
0

Hi All,

 

We know that SAP has started to support HANA on Business Suite Applications. We are in the process of leveraging SAP ECC on HANA.

 

We are looking for some docs which would guide us in migrating to SAP ECC on HANA, below are few of my questions:

 

1. What are the pre requisites, for  migration from SAP ECC to HANA, currently our ECC EHP5 is on MSSQL database. Do we need to upgrade ECC to EHP6?

2. What are the platforms supported by ECC on HANA?

3. How will the migration happen?

4. I checked installation guides for the same and did not find one, could you share any?

 

Regards,

SBK

Problem in nested IF loop in calculated column

$
0
0

Hello,

 

I am trying to use nested IF loop in a calculated column. My requirement is as below.

 

IF "MBEW" = 0 THEN

   STATUS = 'NA'

ELSEIF "MBEW" > 0 THEN

 

       IF  "NET_CONS_CARATS" > 0 THEN

               STATUS = 'C'

       ELSEIF    "TRANSIT_QTY"  >  0 THEN

               STATUS = 'TR'

       ELSEIF  "DIR_PEND_CARATS" > 0 THEN

               STATUS = 'NA'

      ELSEIF  "TTL_OH_CARATS" > 0 THEN

               STATUS = 'A'

      ELSE

               STATUS = 'NA'

      ENDIF.

 

 

ENDIF.

 

 

For this I tried to use nested IF with 2 different ways, as below in HANA calculated column.

 

1)   IF("MBEW_LBKUM" = 0 , 'NA', IF("MBEW_LBKUM" >  0  AND "NET_CONS_CARATS" > 0 , 'C' ,  IF ("MBEW_LBKUM" >  0 AND "TRANSIT_QTY"  >  0 , 'TR',  IF("MBEW_LBKUM" >  0 AND "DIR_PEND_CARATS" > 0, 'NA',  IF("MBEW_LBKUM" >  0 AND "TTL_OH_CARATS" > 0 , 'A','NA')))))

 

2)  IF("MBEW_LBKUM" =  0 , 'NA',  IF("NET_CONS_CARATS" > 0 ,'C' , IF("TRANSIT_QTY"  >  0, 'TR', IF("DIR_PEND_CARATS" > 0, 'NA', IF("TTL_OH_CARATS" > 0, 'A','NA')))))

 

 

I am sure that the second try is wrong. But with both codes it is considering only first equation of else part ie. IF("MBEW_LBKUM" >  0  AND "NET_CONS_CARATS" > 0 , 'C'  . For rest of the scenarios it is giving null output (?) .

 

Please check and help with proper way to write it.

 

 

Thanks,

Shriniwas

XS Engine Session Timeout?

$
0
0

Hi,

 

Anyone know if it is possible to set the XS Engine Session Timeout at the server side (say I want my sessions to last no more then 2 minutes before the user has to login again). I do not seem to find a global setting for that, or should I just do that in the code?

 

thx.

S.

Input parameter

$
0
0

Dear all,

 

In hana studio, I build two input parameters:"Year" and "Month"

 

And I put the two parameters as filters in calculation view,

 

There are two cases,

 

one case,  I want to view the data on date 2016-03, I just input year(2016) and month(03) in the filter, the result is ok

 

second case, I want to view the whole year data, such as year 2016, I just input year(2016) in the filter, do nothing in the filter month, there is nothing

 

How to solve the problem, if I input nothing in the filter, the database returns the all data

 

Many thanks


CDS view with SQL Privileges

$
0
0

Hi all,

 

Since SP11 it should be possible to add CDS view to SQL Privileges. I am not able add CDS objects or add the view below (V_VBAP) to SQL Privilege.

 

@WithStructuredPrivilegeCheck: true

view V_VBAP as select from VBAP_SYN

{

          "MANDT", "VBELN"

};

 

I am using the first revision of SP11. I have attached the presentation given by SAP which shows how it works. Did I miss something?

 

Second issue: I have created structured privileges by using SQL statement for this V_VBAP view, but this privilege is not available as an object in a package. Therefor it can not be moved to other environments. See statement below. Any idea how to add this structured privilege to a package.

 

CREATE STRUCTURED PRIVILEGE AP_VIEW_SQL FOR SELECT ON "DD.V_VBAP" WHERE "MANDT" = '100';

 

I would gladly receive a solution for this.


Thanks

Is syntax description correct for CREATE SPATIAL REFERENCE SYSTEM

$
0
0

I do not understand CREATE SPATIAL REFERENCE SYSTEM

 

I want to create a new spatial reference system which is based on an EPSG srid, but I'd like to register it with a different SRS_ID.

View ST_SPATIAL_REFERENCE_SYSTEMS has columns SRS_ID and ORGANIZATION_COORDSYS_ID.

So how do I fill those columns with different values?

I can only create a new spatial reference system where SRS_ID and ORGANIZATION_COORDSYS_ID are the same...

 

I tried:

 

CREATE SPATIAL REFERENCE SYSTEM "Test My CS"

SRID 1213

LINEAR UNIT OF MEASURE "meter"

TYPE PLANAR

COORDINATE X BETWEEN 0 AND 400000

COORDINATE Y BETWEEN 0 AND 700000

DEFINITION 'HELLO WORLD'

ORGANIZATION "EPSG" IDENTIFIED BY 1212;

 

But that fails on SRID...

Could not execute 'CREATE SPATIAL REFERENCE SYSTEM "Test My CS" SRS_ID 1213 LINEAR UNIT OF MEASURE "meter" TYPE PLANAR ...'

SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "SRS_ID": line 2 col 1 (at pos 48)

 

 

While the definition of the statement is. see : SAP HANA Spatial Reference - SAP Library

 

CREATE SPATIAL REFERENCE SYSTEM <srs-name>

[ srs-attribute ] [ srs-attribute ... ]

 

srs-attribute - (back to Syntax)

SRID <srs-id>

  | DEFINITION { <definition-string> | NULL }

  | ORGANIZATION

  { <organization-name> IDENTIFIED BY <organization-srs-id> | NULL }

  | TRANSFORM DEFINITION { <transform-definition-string> | NULL }

  | LINEAR UNIT OF MEASURE <linear-unit-name>

  | ANGULAR UNIT OF MEASURE { <angular-unit-name> | NULL }

  | TYPE { ROUND EARTH | PLANAR }

  | COORDINATE <coordinate-name>

  { UNBOUNDED | BETWEEN <low-number> AND <high-number> }

  | ELLIPSOID SEMI MAJOR AXIS <semi-major-axis-length>

  { SEMI MINOR AXIS <semi-minor-axis-length> |

  INVERSE FLATTENING <inverse-flattening-ratio> }

  | TOLERANCE { <tolerance-distance> | DEFAULT }

  | SNAP TO GRID { grid-size | DEFAULT }

  | AXIS ORDER axis-order

  | POLYGON FORMAT polygon-format

  | STORAGE FORMAT storage-format

 

grid-size - (back to srs-attribute)

DOUBLE : usually between 0 and 1

 

axis-order - (back to srs-attribute)

{ 'x/y/z/m' | 'long/lat/z/m' | 'lat/long/z/m' }

 

polygon-format - (back to srs-attribute)

  { 'CounterClockWise' | 'Clockwise' | 'EvenOdd' }

 

storage-format - (back to srs-attribute)

{ 'Internal' | 'Original' | 'Mixed' }

Install random NPMs

$
0
0

Hi,

 

I received an error during implementing NPM's squel:

npm ERR! 404 no such package available : squel

npm ERR! 404

npm ERR! 404 'squel' is not in the npm registry.

npm ERR! 404 You should bug the author to publish it (or use the name yourself!)

npm ERR! 404 It was specified as a dependency of 'js'

npm ERR! 404

npm ERR! 404 Note that you can also install from a

npm ERR! 404 tarball, folder, http url, or git url.

 

But this package is official released yet:https://www.npmjs.com/package/squel

 

Even when I try to install it locally on my machine, all seems to be fine:

 

Unbenannt.PNG

 

How to install random NPMs with SPS12 ? I have no access to our linux Server - just to the WebIDE.

Thank you in advance!

How can I install HANA XSA Job Scheduler?

$
0
0

I have installed HANA SPS12 in my server and after following the tiny tutorial I've got the application fully working.

 

Now I'm trying to make work in my server the "SAP HANA Interactive Education (SHINE) SPS 12 for SAP HANA XS Advanced Model" by following the document at:

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

 

I have been able to download and install the "XS Advanced Monitoring Component".

 

But while checking the Job Scheduler Service with "xs marketplace" command seems like the job scheduler is not running:

 

ndbadm@xxxxx:/usr/sap/NDB/HDB00> xs marketplace

 

Getting services from marketplace...

 

service         plans                                       description

--------------------------------------------------------------------------------

fs-storage   free                                        xs file service provides an                                                   

                                                                 env variable which denotes

                                                                 the root of the clients

                                                                 application file system.

hana           hdi-shared,
                   sbss, schema, securestore   SAP HANA database

xsuaa        default, devuser, space           XS UAA Service Broker for

                                                                 authentication &

                                                                 authorization services

 

 

ndbadm@xxxxx:/usr/sap/NDB/HDB00>

 

 

Then the documentation says we need to contact the system administrator to install the job scheduler:

If it not installed, tcontact your system administrator to install the job scheduler service in the SAP space.

 

But I'm the system administrator and I cannot find out how to install the job scheduler. Could you please give me some hints how to proceed?

 

I have find out information about the job scheduler but not how to install it:

Scheduling Jobs in XS Advanced - Introduction to Application Development and Deployment (XS Advanced Model) - SAP Librar…

 

 

Thanks,

Trinidad.

Number of Rows difference between CRM query and HANA view

$
0
0

Hi,

 

One of the user running WebI report created on Universe which is on HANA CV and during one of the testing process , we found out that number of rows between CRM query(SQL Query) (Which is source) is less when compared with HANA view.

 

I did checked the Staged table in HANA and it is also giving me matching results when compared with the source but not Analytical view or Calc view.

 

Just a filer was applied at ETL side on table but nothing at view side.

 

Little confused and lost why the result set has the discrepancy.

 

Any thoughts or advices are appreciated.

 

Thanks,

Jothi

Problem in calling stored procedure in multiple triggers in HANA

$
0
0

Hi,

 

I have a requirement  to call a stored procedure PROCEDURE1 in 10 triggers written on 10 different tables in HANA.

After creating 3 triggers, system is giving me error : " SAP DBTech JDBC: [648]: nesting depth of trigger and procedure is exceeded: maximum nesting depth 64 " .

Anybody has faced same situation before? Please help.

 

 

Thanks,

Shriniwas

INPUT PARAMETER - Default value as (*) (I.E. All values of the column) - Calculation view

$
0
0

Hi Friends,

 

Could you please  help me on the below scenario.

 

How to set Default value as (all values)  in  calculation view - input parameter.

 

My input parameter value  is optional. if i leave it blank  - system considers this as blank value and returns 0 result.

 

basically i need to fetch all the rows , if i leave the INPUT PARAMETER as blank.

 

Your thoughts on this - would be very helpful.

 

regards

Raaj


Not able to preview data at projection node...

$
0
0

Hi All,

I am not able to preview data at each node of calculation view . I am able to preview data of calculation view but not at at the node level.

Its giving me error SAP DBTech[321] JDBC..Invalid view name.

Can anyone help me in this ...

 

Regards,

Nitin

SAP HANA Application Function Modeler: failed to create the part's control

$
0
0

Hi,

 

I would like to create new AFM in SAP HANA (SAP HANA 1.00.102, SAP HANA Studio 2.1.6).

 

I am using SAP Tutorial:

Tutorial - SAP HANA Administration Guide - SAP Library

 

After point 3 and 4 from the tutorial, AFM is created, but I got an error 'Failed to create the part's controls' (attached).

 

Any idea how to solve that?

SAP HANA SDI Setup Issue - Register Adapter

$
0
0

Hello,

 

While setting up Smart Data Integration in my system I was able to install the SDI agent and connect the HANA Server and do the agent registration as shown in the picture below:

 

 

SDI1.PNG

However when I wanted to register the adapter I was getting the following error:

 

SDI2.PNG

Any solution?

 

Regards,

Abhijeet

Calling scripted calc view from another scripted calc view with INPUT PARAMETERS

$
0
0

Hi All,

 

I am trying to call a scripted calculated view with INPUT PARAMETERS from another scripted calculated view and passing INPUT PARAMETER and having trouble activating it.

 

1. I am able to call the scripted calculated view with INPUT PARAMETERS from a Graphical Calculated view and able to pass INPUT PARAMETERS and I could do this on multiple level in other Graphical view.

 

2. When referring and calculation view with INPUT PARAMETERS the values are passed using PLACEHOLDER syntax in the FROM clause. So I tried the same when invoking the scripted calculation from another scripted calculation view and get and error"argument type mismatch: Only named parameter is supported for column view search" (It expects actual values)

 

I changed it different ways but no success. Attached is the sample work I did.

 

Two Questions:

1. Is it possible to call Graphical Calculated View from Scripted Calculated view with INPUT PARAMETERS?

2. Is it possible to call Scripted Calculated View from another Scripted Calculated View with INPUT PARAMETERS?

 

Any ideas?

 

Arthur.

SQL Debugging is not ready

$
0
0

Dear experts,

 

I am following Chaim Bendelac's excellent blog Developing with XS Advanced: A TinyWorld Tutorial.

 

However, executing the tinyworld:tinydb::createCountry SQL Procedure fails with a strange error message "Executing the SQL Statement is not valid...":

SQL Editor.png

Any idea what might cause this would be very much appreciated. My HANA system is version 1.00.121.00.1466466057.

 

However, I did not leave it there, but tried to debug the SQL Procedure. For this I gave my user the Debugger role:

Debugger.png

I also set the system parameters accordingly and restarted it to be sure that the changes got applied:

true.png

However, when trying to Toggle the Connection, I get this error message, that SQL Debugging is not ready. Could not connect SQL Debugging for Service...:

SQL Debugger.png

What am I missing?

 

Many thanks for any help in advance

 

Frank

Viewing all 6745 articles
Browse latest View live


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