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

Iterating through A Data Frame - R & Sap Hana

$
0
0

Hello,

 

I was trying to create a procedure which accepts a table and within the procedure I wanted to modify the contents of the table and store the modified contents into another table.

 

I would like to know how to pass an entire table into a procedure and then iterate through it.

Appreciate a reply.

 

Much Thanks,

Indu


Create Procedure fails

$
0
0

Hi All,

 

I am working on a product which integrates with SAP B1 and I am trying introduce support for SAP HANA. As part of our product configuration I need to insert some code into the B1 SBO_SP_TransactionNotification stored procedure. I have converted our current MS SQL code into a HANA format but I have been experiencing issues when trying to run the create procedure statement.

 

I thought it might be failing due to it being a B1 stored procedure so I have tried creating a stored procedure within the B1 database which replicates the basic idea of what I am trying to do. I am executing this statement from HANA Studio.

 

Create Procedure TestVariables(in SONum int) LANGUAGE SQLSCRIPT AS 
docTotal decimal;
BEGIN   BEGIN     DECLARE a INT :=12;          select "LogInstanc" into a from "ORDR" where "DocEntry" = :SONum;          if a > 0 then      select "DocTotal" into docTotal from "ADOC" where "DocEntry" = :SONum and "LogInstanc" = :a and "DocType"=17;    end if;  END;  Select :docTotal from DUMMY;
END;

 

This fails with following error:-

 

Could not execute 'Create Procedure TestVariables(in SONum int) LANGUAGE SQLSCRIPT AS docTotal decimal; BEGIN BEGIN ...' in 25 ms 250 µs .
SAP DBTech JDBC: [257] (at 334): sql syntax error: line 12 col 1 (at pos 334)


Could not execute 'Select :docTotal from DUMMY' in 25 ms 98 µs .
SAP DBTech JDBC: [7] (at 7): feature not supported: line 1 col 8 (at pos 7)


Could not execute 'END' in 24 ms 547 µs .
SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "END": line 1 col 1 (at pos 1)

 

 

 

If I take out the "if" statement and run it the procedure is created. I have looked at some of the B1 stored procedures and they appear to be a lot more complex than this with multiple levels of nesting and conditional statements.

 

I am very new to HANA and I have read the documentation on the sqlscript but cannot see anything that would suggest why this wouldn't work.

 

Is anybody able to help on this issue?

 

Thanks,

Darren

QUESTION about HANA SQL

$
0
0

Hi Everyone,,i'm a new to SAP HANA.

 

I have a few question about HANA SQL.

 

 

1. Can I use 'goto' structure?

 

I usually use like this in MS SQL.

 

----------------sample-----------------------------------------

IF @Parameter = '1'

     BEGIN

          GOTO SP_END

     END

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

SP_END:

select * from [tablename] where 'condition'

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

can i change this structure for HANA?

 

 

 

 

2. Can I use function in procedure ?

 

sorry but , MS SQL sample

--------------MS sample----------------------------------------

INSERT #TEMP TABLE  (A, B, C)

SELECT   E, F, G

FROM [DBO].[FN_GET_FQTY](@SDATE)

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

i try to like this but it doesn't work

--------------sample---------------------------------------------

INSERT INTO #TEMP TABLE  (A, B, C)

SELECT   "E", "F", "G"

FROM     CALL   FN_GET_FQTY   (:SDATE)

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

if you know how to slove this problem please let me know, it is very important thing for me.

 

 

 

3.UPDATE TEMPORARY TABLE

if i try this structure in some procedure it doesn't work .        

--------------sample---------------------------------------------------------------------------------------------------

create local temporary table #"temp" (ItemCode NAVARCHAR(20));

 

update #"temp" set ItemCode='23';

 

SAP DBTech JDBC: [7] (at 4652): feature not supported: update statement for volatile table

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

 

if i try in hana session  it is ok ,  but not to work in procedure

 

Best regards and thanks to all of you that have helpfull answears, Thanks.

Which HANA certification will support Developer Role

$
0
0

Hi Guys,

 

I'm a web developer (PHP).

 

I'm interested in HANA Developer. But when I checked certification path, I couldn't find any specific certification for HANA Developer.

 

Should I get certified as HANA Technical Associate?

 

Please help me to suggest suitable certification (Application Associate or Technical associate) to continue my career as HANA Developer (Native application)

 

I hate JAVA , so I don't want to become HANA Cloud application developer.

 

I'm really confused about choosing the right certification and career with HANA?

 

 

Hope some one understands what I'm trying to say and give me suggestions

 

Regards,

 

Kavashagr M

How to enable the create history feature in HANA for tables?

$
0
0

When i run the below statement

ALTER TABLE "TST"."tsttable" CREATE HISTORY;

got an error as below SAP DBTech JDBC: [7]: feature not supported: This feature is currently disabled.

 

How can i enable this feature.

 

Thanks in advance.

CSV Upload fails / Flat File Data Upload fails

$
0
0

Hi,

 

hope you can help me. I try to upload a csv file via File > Import > SAP HANA Content > Data from Local File in SAP HANA Studio. Everything works fine (file found, mapping correct) but after finishing all steps, I get the following error message:

 

 

Untitled.png

 

 

Please point me what the problem might be!

 

 

Best

Isabelle

SP6 ON CLOUDSHARE

$
0
0

Have noticed the following changes in SP6 on cloudshare from SP5

 

 

  • The UNLOCK button occuring  everytime you open the studio on SAP HANA System view of the Development perspective

     - This will go away when I recover the password from the Preferences -> secure storage -> Recover Password

  • It took an average of 1 minute to activate an object when SP5 took seconds to activate - the same object : hdbtable, .xsodata etc
  • Committing Package process kicks in when you open a file and then start to edit showing below window and and is frustratingly never ending.

 

 

 

 

savepackageissue.png

 

 


Is there anyway I can stop the frequent saving, commits of the package this is very annoying. Have tried disabling few settings such as:

Removed the build automatically, workspace refresh set to over 50 minutes, disabled everything under the editor and yet it continues to commit resulting into making the code not even editable.


Have anyone encountered this ? If yes please suggest some solutions here .

Also what would be the best way (performance-wise ) to connect to the remote hana on cloudshare ?

AWS Hana instance is not reacheable

$
0
0

Hi, I have created an hana instance in AWS account. I have configured the instance with elastic IP and appropriate ports. I have started developing an application using hana. Last 20 days, I'm able to connect from my hana studio and also I'm able to view the deployed application through web browsers. However, today before giving a demo to my management I found that I'm not able to connect to the Hana instance. I have checked my proxy settings , internet connection etc. Everything is fine. There is practically no change. Even the hana server in AWS is up and running. The status check also is fine there. Still I could not connect to the hana server neither to the deployed application.  I'm clueless here. Please help.


Does anyone know the HANA equivalent of the following SQL statement?

$
0
0

SELECT 1 FROMINFORMATION_SCHEMA.TABLESWHERETABLE_TYPE = 'BASE TABLE'ANDTABLE_NAME = 'MYTABLE'

How other users can access shared package?

$
0
0

Hi All,

 

I created one Project in HANA Development system through Studio, and shared it. However no one else is able to access it. Currently I saved the package & related workspace in my local machine C drive. Do I have to move it to some shared drive so that others can access it? If others can’t access this project even after I shared it, how the “Sharing” feature works in HANA.

 

My issue is under this shared project I created couple of roles as design time repository objects and none of my other Security Team members can access this project. So they can't update the permissions defined in the roles I created.

 

Please let me know if anyone else faced the same issue and how to overcome it.

 

 

 

Regards,

Debajit

Invalid JSON found in XSAPP or XSACCESS in package “workshop.sessiona.00”

$
0
0

Hi,

 

 

Getting error message "invalid JSON found in XSAPPS or XSACCESS” during activation.

 

 

Attached is the error message screen shot for more information.

 

 

Any help is greatly appreciated

 

 

Thanks,

Kavideepa

Host Name - Free 30 day trial - to run application

$
0
0

Hi Team ,

 

I have recently started with free 30 days trial version of SAP HANA .

 

Need to know the host name to run the application built i.e. XSJS.

 

Please guide me.

 

Thanks

Kamal

not able to add ABAP system running on HANA DB in HANA Studio,

$
0
0

I am not able to add ABAP system running on HANA DB in HANA Studio,

Please help me .

 

Capture.PNG

 

I am receiving above error.

 

 

 

 

 

 

Thanks,

Ashik

Currency tables: Using your own SCHEMA

$
0
0

I would like to use currency tables in my own schema creating them in a project.

HANA revision v 56 (Amazon developer edition)

Steps I've done so far:

1. Created a project.

2. Created the hdbschema, hdbtables, hdbtim, hdbtid, hdbrole objects - using the SAP_HANA_EPM_DEMO as the guide. Activate and import data into the tables. Assign the roles to the SYSTEM user.

3. Create a calculation view with a measure (type: amount with currency)

     In the properties of the calc view, the currency schema is set to my schema (CURRENCY). The system only shows CURRENCY and SAP_HANA_EPM_DEMO as valid choices to select the schema. The client is set to 001 as loaded in the files.

 

The problem.

When I try to use the currency translation in the measure by following these steps

      Select - Enable for conversion.

     Click the target currency selector.

     Choose "Fixed".

     I get the error

System tables for currency conversion is missing in the default schema.

 

This doesn't happen with the SAP_HANA_EPM_DEMO schema - even though the tables and permissions are identical.

As anyone successfully created currency tables prefixed with a package name in any other schema?

 

 

Further notes:

I was able to get it working by recreating the tables without the package prefix i.e.

CREATE TABLE "CURRENCY".TCURC as (SELECT * from "CURRENCY"."CurrencySet.data::TCURC");

CREATE TABLE "CURRENCY".TCURF as (SELECT * from "CURRENCY"."CurrencySet.data::TCURF");

CREATE TABLE "CURRENCY".TCURN as (SELECT * from "CURRENCY"."CurrencySet.data::TCURN");

CREATE TABLE "CURRENCY".TCURR as (SELECT * from "CURRENCY"."CurrencySet.data::TCURR");

CREATE TABLE "CURRENCY".TCURT as (SELECT * from "CURRENCY"."CurrencySet.data::TCURT");

CREATE TABLE "CURRENCY".TCURW as (SELECT * from "CURRENCY"."CurrencySet.data::TCURW");

CREATE TABLE "CURRENCY".TCURX as (SELECT * from "CURRENCY"."CurrencySet.data::TCURX");

 

So it works when the currency tables do not have a package prefix.

 

Any insight appreciated!

SQLScript - implicit variable declarations?

$
0
0

The following code comes from the SPS06 SQLScript manual.  I've got the following code to run just fine, but what confuses me is where the result set "rst" was declared.  I can change the name "rst" to anything and it still runs, so I am guess it must be declared implicitly?

 

Can anyone explain where and how rst was declared, and why the below does not give a compilation error?

  

CREATE PROCEDURE ARRAY_UNNEST_SIMPLE()

LANGUAGE SQLSCRIPT

SQL SECURITY INVOKER AS

BEGIN

  DECLARE id INTEGER ARRAY;

  DECLARE name VARCHAR(10) ARRAY;

 

  id[1] := 1;

  id[2] := 2;

  name[1] := 'name1';

  name[2] := 'name2';

  name[3] := 'name3';

  name[5] := 'name5';

 

  rst = UNNEST(:id, :name) AS ("ID", "NAME");

  SELECT * FROM :rst;

END;


facing issue in currency conversion

$
0
0

hi,

 

I am facing some issue in currency conversion. I have all the TCUR* tables required for currency conversion loaded into my schema named "AMANDEEP" (they were present in another schema named "HS30877D" on the system but I did not have the needed previliges on this other schema so I imported these TCUR* tables into my schema AMANDEEP. I have imported these tables in the following way:

 

create table "AMANDEEP"."TCURR" as (select * from "HS30877D"."TCURR)

 

and similarly imported the other 4 currency conversion tables into my schema called "AMANDEEP".

 

Then I created an analytic view whose data foundation table is also present in the schema AMANDEEP. In the analytic view, I have made AMANDEEP as the default schema.

 

Now, I changed the measure type to "Amount with currency" and was going to choose the currency, but I got a message like "schema does not have the required currency conversion tables" and no option for choosing currency was displayed (I should be getting a list of currencies as I had chosen currency type as "Fixed").

 

Please help me on fixing this.

 

I am using Hana studio SP5 version.

 

Thanks,

Aman

R connect to HANA with ODBC

$
0
0

hi All.

      These days I want to use R to connect to hana with RODBC like the following guide

      http://scn.sap.com/community/hana-in-memory/blog/2012/02/21/sap-hana-my-experiences-on-using-sap-hana-with-r

       I installed the RODBC package , and I can connect to the Data Source with odbcConnect

         But each time I submit a query , there will be an error saying that ""S1000 362 [SAP AG][LIBODBCHDB DLL][HDBODBC] General error;362 invalid schema name".

        The Schema is really exists, What is the problem .

        Thank you for help.

HANA Developer Edition SPS6 Status & Roadmap

$
0
0

Status Update: Client and Studio downloads have been updated to SPS6 - get it here. Just a reminder, the Studio for Mac OS-X comes without regi, so XS development will require creative workarounds (you can find those workarounds in the forum). We have also added a download for the SAPUI5 Studio plugin.

 

 

===================================

 

Status Update: HANA Developer Edition on AWS and Cloudshare has been updated to SPS6 (Revision 60). PT, KT will follow shortly. Studio and Client can be downloaded directly from the servers, the downloads on the Developer Center will be updated to Revision 60 early next week.

 

Please note that we changed the default instance type on AWS to m2.2xlarge (34GB RAM) to make sure you have a smooth experience. You can still overwrite the default to m2.xlarge, but don't complain about out of memory exceptions

 

What else? Updates - we will share update snapshots for AWS and CloudShare early next week. If you operate instances on KT or PT and want to upgrade, please send us an email to devcenter@sap.com

 

 

====================================

 

 

Hi HANA Developers,

 

Quite a few of you have already asked for availability of HANA SPS6 for developers. And quite a few of you have also faced memory issues with HANA Revision 56, especially on small instances types (less than 32 GB). Well, there is light at the end of the tunnel:

 

With the just released SPS6, the allocation after startup of the DB is back to ~13GB. For the last few days, we were fighting the over-allocation issue (HANA showing more used memory than was actually available on the system, while OS tools such as free would still show plenty of unused memory) for systems that were upgraded from Rev 56 to Rev 60, but it seems we found a solution.

 

Starting next week we will roll out

  1. fresh master images for CloudShare, AWS, PT and KT on Revision 60 (SPS6) and following that
  2. update installers for CloudShare and AWS instances
  3. if you are running on PT or KT, you can contact devcenter@sap.com and we will help you with upgrading your instances.

 

--juergen

 

Message was edited by: Juergen Schmerder

HANA - Native Development Excercises - Sample codes

$
0
0

Hi Team ,

 

I have been going through the various videoes in Open SAP and in HANA Academy .

 

Need to know is there any place from where one can find all the basic templates about the various codes to be used.

 

Please suggest.

 

Thanks

Kamal

Sap Hana and R Configuration

$
0
0

Hello,

 

I have my Hana instance on Amazon Web Services (AWS) and my R and Rserve is installed on my local machine (Windows).

I have 2 doubts.

 

1. Is it necessary that I should install R & Rserve on Linux box?

2. Is it possible that I can configure my Sap Hana to connect to Rserve on my local machine?

 

I tried to configure hana to Rserve installed on my local machine. Unfortunately I was receiving the below error

 


Could not execute 'CALL SP1("CustomerData","CUST" ) WITH OVERVIEW' in 247 ms 565 µs .


SAP DBTech JDBC: [2048]: column store error: search table error:  [34081] Connection error: Unable to connect with Rserve.;None of the Rserve can be connected:  Cannot connect to the host with the port; 

 

The default port is 6311 for rserve installation. I have given my IP & 6311 as the cer_rserve_address

 

I have not created any user/ password for authentication.

 

Am I missing something?

 

Thank you,

Indu

Viewing all 6412 articles
Browse latest View live


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