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

.net HanaCommand TimeStamp parameter error

$
0
0

Ok, I have an HanaCommand to save some data through a stored procedure, when I give a DateTime value to the TimeStamp parameter I get a "Illegal TIMESTAMP value for parameter/column (7)"

Any input on this?


Moving SQL Dynamic Queries to HANA

$
0
0

Ok, so in SQL I have this basic stored procedure:

 

DROP PROCEDURE MYTEST

 

GO

 

CREATE PROCEDURE MYTEST (@ItemCode nvarchar(20))

AS

BEGIN

  exec SP_EXECUTESQL N'select ItemCode, ItemName from OITM where ItemCode = @ItemCode', N'@ItemCode nvarchar(20)', @ItemCode = @ItemCode

END

 

GO

 

exec MYTEST 'LM4029'

 

Now in Hana I have not found a way to execute a dynamic query without sending parameters to the EXECUTE IMMEDIATE syntax. The only way is putting the variable value directly in a query, this leaves space for sql injections with I avoid in SQL and I don't want to open up in Hana. Is there any solution for this or will be done in the futute?.

 

DROP PROCEDURE MYTEST;

 

CREATE PROCEDURE MYTEST (IN ItemCode nvarchar(20))

AS

BEGIN

  EXECUTE IMMEDIATE('select "ItemCode", "ItemName" from OITM where "ItemCode" = ''' || :ItemCode || '''');

END;

 

call MYTEST('LM4029');

Exception Aggregation in Analytic or Calc View

$
0
0

Hi Everyone,

    I'm trying to perform something similar to BW exception aggregation on one of my HANA views. I need to get the maximum and minimum 'Net Value' for various Material/Customer combinations. I've created a column that concatenates the Material and Customer, however I can't find how to acquire the max and min values. I'm trying to avoid using SQL here as I believe there should be a way to do this graphically. I tried using the Min and Max aggregation on calculated columns, but I'm having trouble grouping this by the Material/Customer so it can fetch the MAX or MIN value specific to that MATERIAL/CUSTOMER. Here is an example of what I would like to see:

 

CUSTOMER+MATERIALNET_VAL_PER_LBMAX_NET_VAL_PER_LBMIN_NET_VAL_PER_LB
10000003000005800282
10000003000005800282
10000003000005800582
10000003000005800482
10000003000005800382
10000003000005800282
10000003000005800382
10000003000005800882

 

Any ideas? Thanks for your help!

HANA Indicies Ram Consumption

$
0
0

Hey experts,

 

I played a bit with the indicies in HANA.

 

When I create a table and it is loaded into memory it needs 3,45GB Ram. After I created some single column indices the table needs 3,55GB Ram. When I delete these indicies the table needs only 2,7GB Ram.

 

Some pictures for a better understanding... is there a good explanation for it?

 

By the way is there a table where you can see how much ram is used by which index? I only found M_CATALOG_MEMORY where you can get the aggregated numbers.

 

After initial table setup with data:

Unbenannt.png

 

 

After creation of indicies:

 

Unbenannt2.png

 

After deletion of indicies:

Unbenannt3.png

Thanks

Patrik

HANA CERTIFICATION ? SUGGEST DO'S AND DON'TS.

$
0
0

Please help me by suggesting what to do or not to do for a Hana Certification . Well i am a SAP Consultant in BI field .

HANA connection to PowerPivot

$
0
0

Hi.

 

I am trying to create a connection from Excel PowerPivot to HANA and cannot get this to work.

 

I can create the connection to HANA using the basic Excel connection.

 

I would like to download a fairly large amount of HANA data into Excel and need more than the 1M rows available in an Excel tab.  I have used PowerPivot models in the past using other data sources to capture more than 1M rows.

 

Any advice would be greatly appreciated.  mark.kruse@amd.com.

 

Thank you.

How can I connect HANA with MS SSIS?

$
0
0

I want to insert data with using SSIS.How can I connect hana with SSIS?

SAP HANA Replication - Different number of records in a table

$
0
0

Hi Everyone!

 

Recently I have been replicating data from ERP system to SAP HANA. There are about 560 tables, which have been replicated without any troubles.

There is also the DD03L table, which according to SAP system has about 8mln records:

 

SAP_DD03L.jpg

 

However, SAP HANA Studio (as well as LT Cockpit) shows that it has only 352 373 records:

SQL_DD03L.jpg

and currently the replication process is over (its status is 'Replicate In Process'):

STUDIO_DD03L.jpg

 

Has anyone had a similar case? Which records number is correct?

 

I will be grateful for any help!

Tomasz Sobkowiak


Having issues redirecting to SAP HANA Logon Page on Session Timeout

$
0
0

Hi Folks,

 

Is there a way to redirect the user to log on page without capturing the page context when the session times out?

 

I am working on a SAP UI5 App and when the user session times out, I see that following happens when I go to developer mode of the browser:

 

1. It appends the current url to the end of login.html. example: http://101.101.101.101:1234/sap/hana/xs/formLogin/login.html?x-sap-origin-location=%2Fsam%2Fportal%2FserverSideXS%2FgetTags.xsjs

 

2. Then it keeps looping there, i.e does not redirect to the SAP HANA Logon page.

 

3. When I hit refresh, now it redirects me to the logon page.

 

What am I missing here? Is there a way I can disable x-sap-origin-locationparameter or set it to my default index.html page?

 

Please advice..

 

Thank you!

 

Prab

HANA Developer Edition for "Administrators"

$
0
0

I understand that as the name suggests, the focus of HANA Developer Edition appears to be "Developers". So, since I am paying for the cloud cost of the HANA instance, can I use this platform to learn about HANA administration activities? such as:

 

  • Performing backup and restore
  • Setting up HANA System Replication for HA
  • Scale-out environment to learn data management on multiple nodes
  • etc.


Note: The goal is learning system administration aspects of this platform, like development aspects.

HANA data connection to Excel PowerPivot

$
0
0

Hi.

 

I am trying to create a connection between HANA and Excel PowerPivot but cannot get the connection to work.

 

I can create a connection from HANA to basic Excel.

 

I have the need to download more than 1M records from HANA into Excel.  The basic Excel tab can only accept 1M rows.  I have captured more than 1M rows in the past in an Excel PowerPivot data model.

 

I would also like to use Power Query and I also cannot get that connection to HANA working.

 

Any help would be greatly appreciated.  Thank you.  mark.kruse@amd.com

XSODATA: 'create using' procedure leads to authorization error

$
0
0

Hello all,

 

I have an odata (xsodata) service in which I want to call a CREATE operation using a procedure: create_new.

 

service  {    "ccm.data::model.dynamicCase.DynamicCaseView"                      as "MyView"                                     with ( "caseId", "TITLE")                           key  ("caseId")    create using "ccm.data::create_new" ;    }

The CREATE operation works fine if I call the operation without the procedure 'create_new'. However if I want to create an entry with the procedure I get an error in SAPUI5:

 

{ "error": { "code": "", "message": { "lang": "en-US", "value": "Service exception: insufficient privilege."},
"innererror":{"exception":"exception  1: no.71000258  (ptime\/query\/checker\/query_check.cc:2588)\n    
Not authorized\nNO exception throw location recorded. Stack generation suppressed.\n"}}}

So it looks like I have to give (myself?) an authorization to call the procedure? Is that a right assumption?

 

Any one encountered this problem?

 

Any help will be appreciated.

 

Regards,

Bert

Replicate Data from HANA DB to SAP ECC(Backend DB)

$
0
0

I am using HANA ondemand trial account . I know that replication of data from SAP system to HANA is possible through SLT.

But can we replicate data from HANA DB to SAP ecc system .Definitely some procedure must be there.

My question is how many ways are there to replicate data from HANA to SAP ecc system and their process.


Till now I have searched and found .

  1. Data replication from HANA to Non SAP system through SLT.
  2. OData service consumption in SAP gateway by redefining Odata service in SEGW T-Code.

 

Please help experts .Its little bit urgent.

SAP Hana Modeling-views

$
0
0

Hello Everyone,

 

As per Db concept, views are  nothing but virtual tables and are not stored on disk.

Now whenever i access my studio under sys_bic schema i see column views.

Can somebody please let me know exactly where my understanding is not in sync with what SAP is trying to convey as it seems to be a little contradictory.

 

Also while modeling aren't we creating views?

So creation of views is nothing but equivalent to "create View"  query in sql .

The content folder just lets us choose from which table we would like to create our view( i.e. in content we decide all that is in the "where clause" in view creation sql stmt .

When we activate this view  or open the content by clicking on the column view  in sys_bic it actually is created at that time only ( as "CREATE VIEW " is executed) as a  runtime object  and is  then available in sys_bic schema . In this way the db concept of not storing view is also not violated.

 

Please let me know if my understanding is correct.

 

Regards,

Pooja M

SP09 - File API on XSJS??

$
0
0

Hi all,

 

  How can I save a file using FILE API on a server-side JavaScript? I have to use httpdest?

 

Thank you.


How to pass table Input parameter to a SQL Procedure in SAP HANA SQL Script?

$
0
0

Hi,

 

I need to pass a Table Input Parameter to a SQL Procedure but i'm not able to pass it.

 

Table TYpe Definition

 

CREATETYPE"SCHEMA"."TT_TECHOBJECT"ASTABLE (

         TECH_OBJECT                NVARCHAR(10) );


Below is my procedure definition.

 

PROCEDURE "P00105715"."ZEAM.procedures::get_breakdown_list_by_techobject" (

  IN  IP_VALID_DATE  NVARCHAR(8),

  IN  IP_TECH_OBJECT "P00105715"."TT_TECHOBJECT",

  OUT OT_BREAKDOWNLIST "P00105715"."TT_BREAKDOWNDUR_TECHOBJECT" )

  LANGUAGE SQLSCRIPT

  SQL SECURITY INVOKER

  DEFAULT SCHEMA "SAPR3"

  READS SQL DATA AS

BEGIN

 

     /* Logic written here */

 

END;

 

Now i'm trying to call this procedure in SQL Console but it's giving error.

 

CALL "SCHEMA"."ZEAM.procedures::get_breakdown_list_by_techobject" (

  IP_VALID_DATE => '20120309', ('PLACEHOLDER' = ('$$IP_TECH_OBJECT$$ = '4401','1503'')),

  OT_BREAKDOWNLIST => ?

);

 

 

Can anyone suggest me how to pass Input Table Parameter to a procedure.

 

Thanks in advance.

 

Regards,

Ramana.

SAP PAL : No ScriptServer available. See SAPNote 1650957

$
0
0

Hello SCN folks,

 

Well, the following seems to be a common error to most of the beginners with SAP PAL.

 

The error itself describes clearly that the scriptserver is not running. But I did refer to note 1650957. Now, my scriptserver is running. I restart HANA instance and now when I run the below query(source : SAP developer guide)

 

CALL _SYS_AFL.TRIPLESMOOTH_TEST_PROC(PAL_TRIPLESMOOTH_DATA_TBL, "#PAL_CONTROL_TBL", PAL_TRIPLESMOOTH_RESULT_TBL) WITH OVERVIEW;

 

I still get the following  error.

 

Could not execute 'CALL _SYS_AFL.TRIPLESMOOTH_TEST_PROC(PAL_TRIPLESMOOTH_DATA_TBL, "#PAL_CONTROL_TBL", ...' in 114 ms 771 µs .

SAP DBTech JDBC: [2048]: column store error: search table error:  [34091] No ScriptServer available. See SAPNote 1650957 for further information.

 

So, I recheck the configuration again and I see that scriptserver is set to 1 and is active :

scriptserver.PNG

Did anyone experience the same situation before?

Anyone has an idea on how to fix this?

 

Any suggestions would be highly appreciated.

 

Thanks and Regards
Sangamesh

.net HanaCommand TimeStamp parameter error

$
0
0

Ok, I have an HanaCommand to save some data through a stored procedure, when I give a DateTime value to the TimeStamp parameter I get a "Illegal TIMESTAMP value for parameter/column (7)"

Any input on this?

create extra column/mark column if match found in table a vs table b with loops

$
0
0

Hi,

 

Would be really nice if someone could help me out on the following problem. There are 2 tables: table A vs. Table B. where certain columns are the same. I have tried to make a loop to take out or at least mark the matches in an extra column.

 

The procedure that i want: take the 1st row from table A. and loop over table B for matches, if found than marked in extra column (only for the first match, other matches could be ignored).

 

i have tried an IF function in the for loop like:

 

FOR v_column_rowA in a..(:v_max_row_columnA) DO

    

     FOR v_column_rowB in a..(:v_max_row_columnB) DO

 

               IF(:v_c_columnA[:v_rowA] = v_d_columnB[v_rowB])

               THEN v_c_extracolumn[:v_column_rowA] := mark;

                          v_c_extracolumn[:v_column_rowB] := mark;

 

 

i do get data in return but there are no matches to be found. it kinda look like random numbers. Any know how to do this?

 

Please tell me,Thanks!

HANA table with "wrong number of partitions"

$
0
0

Hello everyone,

 

I'm currently trying to do the prep steps before migrating our HANA system (rev 83) to the new Embedded Stats Service.

 

The first check involves running the following procedure:

CHECK_TABLE_CONSISTENCY ('CHECK','_SYS_STATISTICS',null)

 

The checks fail, stating that "_SYS_STATISTICS"."HOST_HEAP_ALLOCATORS" has the "Wrong number of partitions/replicates is stored in the NameServer".

 

Looking at the table runtime info, the system is expecting 2 partitions, but only the first (range to 2014/04/01) exists - the "Other" partition is missing.

tabconsist.JPG

I've tried running ALTER TABLE commands - both to try and merge partitions, and also to force the creation of the missing "other" partition, but they all fail, eg as follows:

tabconsist2.JPG

I've also tried dropping the entire table (with a view to recreating it correctly), but this also fails because of an "invalid part id":

tabconsist3.JPG

Does anyone know a way to repair the table so we can proceed with the migration?

 

Many thanks in advance.

 

Guy

 

 


Viewing all 6412 articles
Browse latest View live


Latest Images