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

Data exchange between SAP UI list and back with the help of oData services

$
0
0

Hi All,

 

we try to use the oData services for data exchange between the SAP UI and backend.

 

We know the solutions if we would be use RESTful only.

 

But the OData usage is still new for us, and we don't know what are the best practices in SAP UI / oData environment.

 

THE USE CASE

  1. We want, that a user entering in the input field one or more countries .
  2. After that the list of countries to be displayed.
  3. The user can select specific countries and request more information for those countries.
  4. In the ffurther list should be displayed details related to selected countries.

 

 

In RESTful only solution would ausehen as follows:

 

The user enters a search term.

The keyword is sent to the back-end controller.

The back-end controller sends these input parameters to the database on.

In response gets front-end JSON array with JSON Objects where countryID and country name is.

The JSON array is set in the UI list. Each element contains contryName and countryID. Therefore you know what are selected for elements.

The countryIDs are sent back to back .....

 

How can this by using oData services solve?

I've read that via call of odata serive withGET with &filter, the amount of results will be limited. I have also read about the CalculationView + Stored Procedure with Input Parameters ...

 

 

Thanks in Advance,

 

Udo


Consume HANA Procedure in XSODATA Service

$
0
0

Hi Experts,

I created on procedure with out output table parameter with "WITH RESULT VIEW" on the same.

signature.JPG

When I am executing the procedure in the console , I am getting the result as expected. Can I expose the service as OData via XSODATA ? Or do I need to create XSJS or Scripted Calc View ? Procedure is taking one mandatory input parameter .

output.JPG

Regards

Sreehari

Using UDF datasource in calc view fails

$
0
0

Hi experts,

 

I'm looking for a sample, how to use UDFs (table function) within calc views.

I try to use an udf table function within a calculation view as a datasource but don't get it activated.

 

error:

Repository: Encountered an error in repository runtime extension;Model inconsistency. Could not derive table type for variable "_SYS_SS2_RETURN_VAR_" (SQL error: index out of bounds: PersistVector index out of bound)

 

 

If I select the udf directly in a sql statement it works as expected.

select * from "TBASE_PUBLIC"."development......functions::get_labor_by_patid"(3161,'','');

 

The table type is a cds .hdbdd artifact. Could this be a reason for the error?

 

Thanks for your help!

Get all tables from a schema that a user has access to

$
0
0

Hi,

 

So I would like to get all tables from a schema. What I found on the SCN:

SELECT TABLE_NAME AS "Table" FROM  M_CS_TABLES WHERE SCHEMA_NAME = 'your schema name';

Now I would like to extend this to the security concept.

 

So if I have tables

A1

B2

C3

 

and User1 has Access to tables A1 and C3.

 

If User1 would run the query, he would only get A1 and C3 as a result, not B2 though.

 

Is that even possible? Any idea of a workaround?

System Replication / SSL Internal Error Registering Secondary Site

$
0
0

Hello,

I recently wanted to try System Replication between a SPS 10 (SLES 11 SP2) (SiteA) and  SPS 11  (SLES 12) (SiteB).

I tried to follow the steps described in the "How to System Replication" Guide. But i always get the same error message after trying to register the secondary Site:

 

checking for inactive nameserver ...

nameserver bn-sap09t:30001 not responding.

collecting information ...

error: unable to contact primary site; to 172.18.2.24:30102; original error: ssl: internal error,location=172.18.2.24:30102;

 

I thought that this was an problem with the communication between the two systems, so i deactivated both firewalls. But nothing changed.

 

SiteA:

System Replication State

~~~~~~~~~~~~~~~~~~~~~~~~

 

 

mode: primary

site id: 1

site name: SiteA

 

 

Host Mappings:

~~~~~~~~~~~~~~

 

 

done.

 

 

SiteB:

System Replication State

~~~~~~~~~~~~~~~~~~~~~~~~

 

mode: none

 

done.

 

 

172.18.2.24 (SiteA)

172.18.2.252 (SiteB)

Here is the nameserver trace:

 

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.663413 i Basis            TraceStream.cpp(00457) : ==== Starting hdbnsutil, version 1.00.112.00.1457525470 (fa/newdb100_rel), build linuxx86_64 98d910879443fac9296f37a2c88276b68bc453ec 2016-03-09 13:24:03 ld7272 gcc (SAP release 20150717, based on SUSE gcc48-4.8.3+r212056-6.3) 4.8.3 20140627 [gcc-4_8-branch revision 212064]

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.663938 i Basis            TraceStream.cpp(00459) : MaxOpenFiles: 1048576

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.663955 i Basis            TraceStream.cpp(00461) : Server Mode: L2 Delta

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.663981 i Memory           AllocatorImpl.cpp(01349) : Allocators activated

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.663985 i Memory           AllocatorImpl.cpp(01365) : Using big block segment size 268435456

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.663985 i Basis            ProcessorInfo.cpp(00732) : Using GDT segment limit to determine current CPU ID

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.663986 i Basis            Timer.cpp(00642) : Using RDTSC for HR timer

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.663989 e Configuration    ConfigStoreManager.cpp(00693) : Configuration directory does not exist.

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.663990 e Configuration    ConfigStoreManager.cpp(00693) : Configuration directory does not exist.

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.663990 e Memory           MallocProxy.cpp(01619) : libnuma: Error: mbind: Invalid argument

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.668708 i Basis            TopologyUtil.cpp(04651) : command: hdbnsutil -sr_register --remoteHost=172.18.2.24 --remoteInstance=00 --name=Siteb --replicationMode=sync

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.669296 w Environment      Environment.cpp(00375) : Changing environment set SSL_WITH_OPENSSL=0

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.745976 w Environment      Environment.cpp(00352) : Changing environment set LINES=31

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.746022 w Environment      Environment.cpp(00352) : Changing environment set COLUMNS=105

[9439]{-1}[-1/-1] 2016-04-04 09:19:56.777337 i sr_nameserver    DRClientUtils.cpp(00299) : Remove takeover file: /usr/sap/SHA/SYS/global/hdb/sr_takeover.sem

[9439]{-1}[-1/-1] 2016-04-04 09:20:00.020673 e TNS              TNSClient.cpp(00822) : sendRequest dr_gethdbversion to 172.18.2.24:30102 failed with NetException. data=

[9439]{-1}[-1/-1] 2016-04-04 09:20:00.022161 e TNS              TNSClient.cpp(00822) : sendRequest dr_registerdatacenter to 172.18.2.24:30102 failed with NetException. data=(S)hdbversion=1.00.112.00.1457525470|instance=00|instancename=SHA|mode=sync|name=Siteb|opmode=delta_datashipping...|...|(B)...|(SV)...|

[9439]{-1}[-1/-1] 2016-04-04 09:20:00.022194 e sr_nameserver    TNSClient.cpp(08535) : unable to contact primary site; to 172.18.2.24:30102; original error: ssl: internal error,location=172.18.2.24:30102

[9439]{-1}[-1/-1] 2016-04-04 09:20:00.022243 e sr_nameserver    TopologyUtil.cpp(02401) : unable to contact primary site; to 172.18.2.24:30102; original error: ssl: internal error,location=172.18.2.24:30102;

 

KR

Johann

Substitute for "Where current of" in HANA

$
0
0

I am migrating PL/SQL code to HANA procedure. I have a update query with WHERE CURRENT OF c_temp(c_temp is a cursor). When I am running it in HANA, it's trowing the below error.

sql syntax error: incorrect syntax near "OF": line 261 col 22 (at pos 8940).

Refresh Analytical Views after making changes to Attribute View

$
0
0

I have an Analytical View (we'll call it AN_ONE) that currently uses an Attribute View (AT_ONE).

 

After making a change to AT_ONE by adding a new column and Activating it, the changes that I have made do not reflect on my Analytical View (AN_ONE).

 

Is there a way to refresh the Analytical View (AN_ONE) to reflect the changes I have made to my Attribute View (AT_ONE) without getting rid of it and reloading it?

 


Thanks!

Cache HANA View

$
0
0

Hello Experts,

 

I had a unique customer question the other day and I am not sure if it can be done or the best approach to take. Any advice would be much appreciated.

Background: The customer has built a development web application which uses multiple HANA views to display different reports used by management. The views are built on tables which are updated daily.

Problem: While demoing the reports from week to week to management they want to be able to display the same output on their application even if the underlying data had been changed. So basically they want to be able to cache all the view outputs from today and display them weeks from now, even though the underlying data changes. I have read about Caching in HANA and I believe its purpose to be for more for enhancing query execution time for complex querries rather than taking snapshots of the views. After the demo period is over they won't have a need for this and will go back to their live views.

Any ideas on what can be done here?

 

Thanks,

Connor


Substitute for "RRMM" of ORACLE in HANA

$
0
0

I want to perform a to_date function on a string e.g 9906 to get the output as 199906. This is possible in Oracle using TO_DATE('9906',''RRMM''). But in HANA I didn't find such option. While using YYMM I'm getting the output as 209906 which is not desirable. Please suggest.

Facing errors while creating a odata service consuming a calculation view.

$
0
0

HI All.

 

I am pretty new to XS , I am trying to create an ODATA service from a calculation view . But whenever I try to activate the service I get the following error

"Missing specification of keys for view "demo::CV_PASS1".

 

Thanks,

Tanush

SQL statement form HANA cal views

$
0
0

  Hi All,

 

 

is there any way that we can view  SQL statement for a cal view (graphical ) in HANA

 

 

 

 

Thanks

Krishna

Multiple input parameters in HANA SQLScript calculation view

$
0
0

Dear Experts,

I'm trying to select data within date interval but when I put more than one input parameter i get this error

Error: SAP DBTech JDBC: [2048]: column store error: search table error:  [34092] search on calculation model requires parameters;Required variable $$tdate$$ is not set.

 

Capture.PNG

 

My code:

/*********** Begin Procedure Script ************/ 
 BEGIN 
VAR_OUT = select RYEAR AS "FISCAL_YEAR",  DOCNR AS "DOCUMENT_NUMBER",  RBUKRS AS "COMPANY_CODE",  RACCT AS "GL",  "GLAccountName" AS "GL_NAME",  "GLAccountDescription" AS "GL_DESC",  F.PRCTR "PROFIT_CENTER_CODE",  PC.KTEXT AS "PROFIT_CENTER_DESC",  RCNTR AS "COST_CENTER_CODE",  CC.KTEXT AS "COST_CENTER_DESC",  TO_DATE(BUDAT,'YYYYMMDD') AS "POSTING_DATE",  "IsBalanceSheetAccount" AS "ISBALANCESHEETACCOUNT",  HSL AS LC_AMOUNT  FROM "FAGLFLEXA" AS F inner join "CSKT" AS CC ON F.RCLNT = CC.MANDT AND F.RCNTR = CC.KOSTL  INNER JOIN "CEPCT" AS PC ON F.RCLNT = PC.MANDT AND F.PRCTR = PC.PRCTR  INNER JOIN "_SYS_BIC"."sap.hba.ecc/SKA1" AS GL ON F.RCLNT = GL."SAPClient" AND F.RACCT = GL."GLAccount"  where F."BUDAT" >= TO_DATS(:FDATE)  AND F."BUDAT" <=  TO_DATS(:TDATE)  AND RCLNT = '900'  ;
END 
/********* End Procedure Script ************/

Thank you in advance.

Is it possible to enable anonymous user access to xsodata without setting authentication to null?

$
0
0

I am developing an app on HCP and I have given anonymous user access.

But as per my requirement, I can set the "authentication" to null in xsaccess file as I need the user details from the session.

Hence, I have to enable SSO.

Enabling SSO is barring the users from accessing the xsodata giving the error as "Insufficient privilege".

So I want to know that is it possible to enable SSO and still provide anonymous access?

How to split a comma separated String into multiple rows in HANA SQL

$
0
0

Hi Experts,

I have a requirement in HANA where in I have data like below.

 

404856883FA212,FA214,
404856883FA211,FA213,FA204
404856883FA203,FA195,FA177
404856883FA204,FA177,

 

I need to convert to as below.

 

404856883FA212
404856883FA214
404856883FA211
404856883FA213
404856883FA204
404856883FA203
404856883FA195
404856883FA177
404856883FA204
404856883FA177

 

Can I achieve it in HANA SQL?

 

In Data services we can achieve, can we achieve it in HANA, without going into Procedure logic. As I have to bring the First table data virtually from Teradata.

 

How to split a comma separated String into multiple rows via word_ext - Enterprise Information Management - SCN Wiki

 

Please help.

 

Regards,

Chandan

SQL Script

$
0
0

Greetings...

 

Not able to convert in SQL Script

 

SQL Query

 

SELECT TOP 10 'orders' AS "Type", T0."DocNum",T0."Docdate",T0."CardCode",T0."CardName", '17' AS "ObjectType", T0."Docentry"

FROM ORDR T0

 

when I converted this in hana DB it shows error

 

 

HANA conversion

 

SELECT TOP 10 'orders' AS "Type", T0."DocNum", T0."Docdate", T0."CardCode", T0."CardName", '17' AS "ObjectType", T0."Docentry" FROM "ORDR" T0

 

Please Suggest what is lacking


Can't access to SAP HANA Live Browser.

$
0
0

Hello everyone. I hope you're good,

 

I have a question, I'm trying to access to SAP HANA LIve Browser, but when I put my credentials and press "Login"  nothing happens, it gets stuck in the main page,

 

the URL I'm using is http://<server>:<port>/sap/hba/explorer and my user in HANA have the sap.hba.explorer.roles::Developer role assigned,

 

Am I missing something?

 

Thanks for your help.

HANA Live view for table - EINA

$
0
0

Hi Experts,

 

                  Can you let me know which HANA Live view (CAR HANA Live content) has the data related to SAP Table EINA (Purchasing info record) ??

 

                 which is desperately needed for one of the master view that we need, as we couldnt query ECC tables directly.

 

 

Regards,

Prasana

How to Migrate from 64 GB to 128 GB system

$
0
0

Hello team,

 

 

We are currently using 64GB system in AWS and we are running out of memory, so we decided to migrate to 128 GB.

What is the best/faster way to migrate?

Error during execution of Predictive Analytics Library (PAL) in HANA for Random Forest.

$
0
0

Dear SCN community,

 

We are trying to build a predictive model from the HANA PAL guide provided by SAP. Unfortunately we keep running into an error which is quite surprising since the code is copy pasted from the guide. Only the schema name is changed. Could one of the gurus please help us out? The algorithm is Random Forest.

 

The full code is also pasted at the bottom.

 

Thanks a lot!!!


**********************************************************************************

Error 1

Could not execute 'CALL "SYS".AFLLANG_WRAPPER_PROCEDURE_CREATE('AFLPAL', 'RANDOMFORESTTRAIN', 'DE001_D14_710', ...' in 971 ms 345 µs .

SAP DBTech JDBC: [423]: AFL error:  [423]



"SYS"."AFLLANG_WRAPPER_PROCEDURE_CREATE": line 156 col 5 (at pos 5073): [423] (range 3) AFL error exception: AFL error: Registration of AFLLANG wrapper procedure "DE001_D14_710"."PAL_RF_TRAINING_PROC" failed with error 'unknown function'.


Error 2

Could not execute 'CALL "DE001_D14_710".PAL_RF_TRAINING_PROC(PAL_RF_DATA_TBL, #PAL_CONTROL_TBL, PAL_RF_MODEL_TBL, ...'

SAP DBTech JDBC: [328]: invalid name of function or procedure: PAL_RF_TRAINING_PROC: line 1 col 22 (at pos 21)


**********************************************************


SQL Code


SETSCHEMA DE001_D14_710;

----DROP TYPE PAL_RF_DATA_T;

CREATETYPE PAL_RF_DATA_T ASTABLE(

"OUTLOOK"VARCHAR(20),

"TEMP"DOUBLE,

"HUMIDITY"DOUBLE,

"WINDY"VARCHAR(10),

"CLASS"VARCHAR(20)

);

 

 

----DROP TYPE PAL_RF_MODEL_T;

CREATETYPE PAL_RF_MODEL_T ASTABLE(

"ID"INTEGER,

"TREEINDEX"INTEGER,

"MODEL"VARCHAR(5000)

);

----DROP TYPE PAL_RF_VAR_IMP_T;

CREATETYPE PAL_RF_VAR_IMP_T ASTABLE(

"VAR"VARCHAR(100),

"IMP"DOUBLE

);

----DROP TYPE PAL_RF_ERR_RATE_T;

CREATETYPE PAL_RF_ERR_RATE_T ASTABLE(

"TREEINDEX"INTEGER,

"ERR"DOUBLE

);

----DROP TYPE PAL_RF_CONFUSION_T;

CREATETYPE PAL_RF_CONFUSION_T ASTABLE(

"ID"INTEGER,

"CONTENT"VARCHAR(1000)

);

----DROP TYPE PAL_CONTROL_T;

CREATETYPE PAL_CONTROL_T ASTABLE(

"NAME"VARCHAR (100),

"INTARGS"INTEGER,

"DOUBLEARGS"DOUBLE,

"STRINGARGS"VARCHAR(100)

);

----DROP TABLE PAL_RF_PDATA_TBL;

CREATECOLUMNTABLE PAL_RF_PDATA_TBL(

"POSITION"INT,

"SCHEMA_NAME"NVARCHAR(256),

"TYPE_NAME"NVARCHAR(256),

"PARAMETER_TYPE"VARCHAR(7)

);

INSERTINTO"PAL_RF_PDATA_TBL"VALUES (1, 'DE001_D14_710', 'PAL_RF_DATA_T', 'in');

INSERTINTO"PAL_RF_PDATA_TBL"VALUES (2, 'DE001_D14_710', 'PAL_CONTROL_T', 'in');

INSERTINTO"PAL_RF_PDATA_TBL"VALUES (3, 'DE001_D14_710', 'PAL_RF_MODEL_T', 'out');

INSERTINTO"PAL_RF_PDATA_TBL"VALUES (4, 'DE001_D14_710', 'PAL_RF_VAR_IMP_T', 'out');

INSERTINTO"PAL_RF_PDATA_TBL"VALUES (5, 'DE001_D14_710', 'PAL_RF_ERR_RATE_T', 'out');

INSERTINTO"PAL_RF_PDATA_TBL"VALUES (6, 'DE001_D14_710', 'PAL_RF_CONFUSION_T', 'out');

--CALL "SYS".AFLLANG_WRAPPER_PROCEDURE_DROP('DM_PAL', 'PAL_RF_TRAINING_PROC');

 

CALL"SYS"."AFLLANG_WRAPPER_PROCEDURE_CREATE"('AFLPAL', 'RANDOMFORESTTRAIN',

'DE001_D14_710', 'PAL_RF_TRAINING_PROC', "PAL_RF_PDATA_TBL");

 

 

----DROP TABLE PAL_RF_DATA_TBL;

 

CREATECOLUMNTABLE PAL_RF_DATA_TBL LIKE PAL_RF_DATA_T;

INSERTINTO PAL_RF_DATA_TBL VALUES ('Sunny', 75, 70, 'Yes', 'Play');

INSERTINTO PAL_RF_DATA_TBL VALUES ('Sunny', null, 90, 'Yes', 'Do not Play');

INSERTINTO PAL_RF_DATA_TBL VALUES ('Sunny', 85, null, 'No', 'Do not Play');

INSERTINTO PAL_RF_DATA_TBL VALUES ('Sunny', 72, 95, 'No', 'Do not Play');

INSERTINTO PAL_RF_DATA_TBL VALUES (null, null, 70, null, 'Play');

INSERTINTO PAL_RF_DATA_TBL VALUES ('Overcast', 72, 90, 'Yes', 'Play');

INSERTINTO PAL_RF_DATA_TBL VALUES ('Overcast', 83, 78, 'No', 'Play');

INSERTINTO PAL_RF_DATA_TBL VALUES ('Overcast', 64, 65, 'Yes', 'Play');

INSERTINTO PAL_RF_DATA_TBL VALUES ('Overcast', 81, 75, 'No', 'Play');

INSERTINTO PAL_RF_DATA_TBL VALUES (null, 71, 80, 'Yes', 'Do not Play');

INSERTINTO PAL_RF_DATA_TBL VALUES ('Rain', 65, 70, 'Yes', 'Do not Play');

INSERTINTO PAL_RF_DATA_TBL VALUES ('Rain', 75, 80, 'No', 'Play');

INSERTINTO PAL_RF_DATA_TBL VALUES ('Rain', 68, 80, 'No', 'Play');

INSERTINTO PAL_RF_DATA_TBL VALUES ('Rain', 70, 96, 'No', 'Play');

 

--DROP TABLE #PAL_CONTROL_TBL;

CREATELOCALTEMPORARYCOLUMNTABLE #PAL_CONTROL_TBL(

"NAME"VARCHAR (100),

"INTARGS"INTEGER,

"DOUBLEARGS"DOUBLE,

"STRINGARGS"VARCHAR (100)

);

INSERTINTO #PAL_CONTROL_TBL VALUES ('TREES_NUM', 300, null,null);

INSERTINTO #PAL_CONTROL_TBL VALUES ('TRY_NUM', 3, null,null);

INSERTINTO #PAL_CONTROL_TBL VALUES ('SEED', 2, null,null);

--DROP TABLE PAL_RF_MODEL_TBL;

CREATECOLUMNTABLE PAL_RF_MODEL_TBL LIKE PAL_RF_MODEL_T;

--DROP TABLE PAL_RF_VAR_IMP_TBL;

CREATECOLUMNTABLE PAL_RF_VAR_IMP_TBL LIKE PAL_RF_VAR_IMP_T;

--DROP TABLE PAL_RF_ERR_RATE_TBL;

CREATECOLUMNTABLE PAL_RF_ERR_RATE_TBL LIKE PAL_RF_ERR_RATE_T;

--DROP TABLE PAL_RF_CONFUSION_TBL;

CREATECOLUMNTABLE PAL_RF_CONFUSION_TBL LIKE PAL_RF_CONFUSION_T;

CALL"DE001_D14_710".PAL_RF_TRAINING_PROC(PAL_RF_DATA_TBL, #PAL_CONTROL_TBL,

PAL_RF_MODEL_TBL, PAL_RF_VAR_IMP_TBL, PAL_RF_ERR_RATE_TBL, PAL_RF_CONFUSION_TBL)

WITH OVERVIEW;

SELECT * FROM PAL_RF_MODEL_TBL;

SELECT * FROM PAL_RF_VAR_IMP_TBL;

SELECT * FROM PAL_RF_ERR_RATE_TBL;

SELECT * FROM PAL_RF_CONFUSION_TBL;


XS Advance Runtime installation failed !!

$
0
0

Hi Thomas JungRich Heilman , Experts,

 

I have a query on XSA..

 

We recently upgraded our system to SP11.. With the launch of XSA in this SP, I decided to install the XSA runtime.. It was a single host installation with "worker" role assigned

 

After installation, I can see the components - xsuaaserver(active),xsexecagent(active),xscontroller(inactive) in System information (admin cockpit). When I restarted the instance I get the error "FAIL: process hdbxscontroller HDB XS Controller not running"

 

Will it be because of assigning role to host ?? ..

 

Can you please advice what can be done for fixing this..

 

-Avinash

Viewing all 6412 articles
Browse latest View live


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