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

Financial statements in HANA

$
0
0

Dear Experts,

I want to create financial ratios reports based on balance sheet and income statement, Is there is any ready made financial statements view created in SAP HANA or should I create them from scratch.

 

Regards.


Identify Surrogate ID's

$
0
0

Hi Experts,

 

Can you please help me to identify surrogate ID's present in HANA table.

 

Is there any specific SQL statement to find this or is there any other way to find.

 

 

Thanks,

Saravanan.

How to find out who deleted a user in HANA

$
0
0

Hi,

 

We've had an incident in our project where a user's account was deleted from HANA and our requirement is to find out who deleted that id. Is there any table where we can find out the change history for a particular user(like we have in t code SUIM).

 

Many Thanks in advance.

Replication editor not showing full list of objects

$
0
0

Hi,

I have created a HANA instance in CAL SAP hana using my Azure account. I have an MSSQL DB that i want to replicate into HANA instance i have created. To achieve this I created a remote source using Smart data access. I have successfully connected to my MSSQL DB from HANA remote source. I have more than 500 DB tables in my MSSQL schema which i am able to view all of those when i expand the remote source.

Now I have a created a replication task to replicate the data from the remote source. when i am try to add the objects i could see only some DB entries from my remote source. I have the following problems:


1. I am not able to see all the DB tables from my remote source while adding the objects.

2. No find/search option in the replication editor even to search

3. No find/search option available in the context menu for remote source of Web IDE.


Can any one help me find out all my entries of the schema from a remote source??


Thanks in advance!

Kalyani

Best Practices HANA Modeling: Attr/An/Calc Views or CDS

$
0
0

Hello all,

 

My comrades and me are having a discussion about how to create a proper model on HANA to consume with Design Studio.

 

As far as I've read, all the best modeling practices teach you to model the dimensions with Attribute views to use the Join Engine, model the Fact tables with Analytic views (OLAP Engine) and model complex measures (past year, YTD, var %, etc) on Calculation views to use the Calc. engine.

 

We have done all our modeling following these practices and there were fine, but lately we have start listening about CDS and his powerful modeling capabilities. However, as far we know, Design Studio only can consume Analytic and Calculation views so, at the end, we should develop Calculation views from CDS.

 

Doing this will not penalize the performance? As far as we know, doing joins in Calculation views is not the right thing.

 

On the other hand, all HANA Live views from SAP come only with calculation views, why they don't use attribute or analitical views? Are deprecated and the future is CDS?

 

We would greatly appreciate a bit of light about this discussion.

 

 

Thank you very much

YTD and PYTD in SAP HANA

$
0
0

Hi All,

 

Can you please help me in creating Calculated Column in  SAP HANA Calculation view for Current Year (YTD) and Previous Year (PYTD) where i have the columns for Fiscal Year  (2016 and 2015) and Period (jan to dec).

ERROR WHILE CALLING STORED PROCEDURE

$
0
0

Hello Experts,

 

When i try to call my stored procedure , i am getting a below mentioned error

 

Could not execute 'CALL "SUDARSHAN_MOHAN"."USP_MKT_COMMUNITY"('2015-03-01','Y',?)' in 2.047 seconds .

[303]: invalid DATE, TIME or TIMESTAMP value:  [303] "SUDARSHAN_MOHAN"."USP_MKT_COMMUNITY": line 113 col 4 (at pos 4342): [303] (range 3) invalid DATE, TIME or TIMESTAMP value exception: invalid DATE, TIME or TIMESTAMP value: search table error:  [6931] Error during optimizer search

 

As per the error log  i checked 113th line it seems ok and its mentioned below

 

SELECT "MetricValue" INTO v_MValue FROM "JIVE"."TBL_MKT_COMMUNITY_METRICS"

           WHERE "MetricName" = 'Total Members' AND  "Lvl" = 'M' AND  CAST("Mth" || '-01' as DATE) = :v_PrevMonthDt;

 

  i  kindly request you to guide me in resolving this error

 

Regards

Naresh P

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?


Compilation Error: Getting error while using UNNEST function in DB Trigger

$
0
0

Hi,

 

Getting error while compiling the DB Trigger code in HANA Studio:

 

This trigger is being executed on update of a table.

We are trying to accumulate the data in some arrays and finally after the loop is over

we are using UNNEST function to combine these arrays to a table in variable var_arr_to_tbl.

Code.PNG

This error is coming at the statement: var_arr_to_tabl = UNNEST( :LVMANDT....

error.PNG

 

Please let us know in case we are doing anything wrong here.

 

Thanks,

Akash Kumar

How to iterate over internal table in SQL procedure?

$
0
0

Hello SDN.

 

I work on port some ABAP code to the HANA SQL stored procedure.

One of the input parameter has table type.

I want to know how I can iterate over this table?

In the ABAP I can write something like this:

 

LOOP AT lt_table ASSIGNING <fs_row>.     <statements>...
ENDLOOP.

But I don't know how to do such loop in HANA.

 

My variant

lt_rows = SELECT * FROM :TBL_DATA;
FOR ls_rows AS :lt_rows DO     <statements>...
END FOR;

leads to syntax error near lt_rows.

 

 

 

Regards,

Lev

May I use "Virtual Table (SDA table) " as Source/Target in SDI ?

$
0
0

Hi ,

I want to import/export 'Spark' table's data  to HANA . I want to use SDI for this.

But It looks like SDI does not support 'Spark' , It support only Hive as source currently .

 

However , I found SDA supports 'Spark' via Spark adapter .

 

Question : May I use 'Virtual Table' as Target/Source in SDI flow ?

If yes , I can use Spark Table in SDI flow , Is it supported usage ?

 

 

Regards,

JT

Eclipse UI5 version and SAP UI5 version conflicts

$
0
0

Hi All,

 

I am trying to customize the fiori app for that I am using fiori tool kit in eclipse.Successfully I have extended the fiori app but the problem is while try to run the extended fiori app it displaying blank screen.I open the chrome Inspect element it showing fialed to loadComponent.js and sap.ui.core.js not found errors.

 

Could you please help me on this?

 

 

Thanks&Regards,

Satya.

Using table varbiable in procedure, attach results

$
0
0

I have procedure with a for loop and would like to put the result into a table variable.

In the followowing code the variable is overwritten on each loop.

 

How I can avoid the overwrite and jsutatttach it to the before results

 

PROCEDURE "BETA_SYSTEM"."beta.procedures::patternIdentification" (
OUT myResult "RESULTTAB"
)   LANGUAGE SQLSCRIPT  SQL SECURITY INVOKER   DEFAULT SCHEMA "BETA_SYSTEM"  READS SQL DATA AS  
BEGIN  DECLARE counter INT;  FOR counter IN 1 .. 5 DO  myResult = SELECT           day_before AS "DATE",    FROM                (SELECT A."DATE" date_range.OFF, add_days(A."DATE", date_range.OFF*-1) AS day_before         FROM :tab1 A       CROSS JOIN (SELECT  :counter AS OFF FROM DUMMY) date_range) dates    END FOR;
END;

EXECUTE IMMEDIATE throwing syntax error

$
0
0

I am on HANA SPS10, I am not sure why I am getting syntax error while using EXECUTE IMMEDIATE.

HANA modelling aggregation issue

$
0
0

Hi Friends,

I am trying to achieve following requirement.

 

I want one extra coloum showing final status, that should be derived from the Status coloumn, for example, lets say I have three coloums that I am fetching(Complain ID, Item no, and Status) in table.

sample.png

For Complaint ID 100001, there are two line items both with status as 'Accepted', so in this case I want to populate final status as 'Fully Accepted'.

In second scenario , complaint ID 100002 has just one line item , and it has status as 'Rejected'. In this case I want Final status as 'Fully Rejected'.

And third scenario, for complaint ID 100003, there is 'Rejected' and 'Accepted' status both present, so final status should be 'Partially Rejected'.

 

I am not sure how can we achieve this. Is it possible to do using aggregation function. If yes kindly suggest how I should do it.

 

Thanks a lot.


Difference result between SELECT and CE_OLAP_VIEW

$
0
0

Dear experts,

Is it possible to get difference results between CE functions and SQL?

My scenario is

1- I have created Analytical view to get GL balances from table FAGLFLEXT with GLs description and Company codes data

2- I'm creating Script calculation view to perform my logic based on SQL here is my code

var_out =  SELECT "RCLNT",  "RYEAR",  "RACCT",  "KTOPL",  "COMP_CODE",  "Profit_center",  "Cost_center",  "GL_DEC_S",  "GL_DEC_L", 
"ACCUNT_GROUP",       "GRP_NUM",  "RCNTR",  "PRCTR",   sum("HSLVT") AS "HSLVT",  sum("HSL01") AS "HSL01",  sum("HSL02") AS "HSL02",  sum("HSL03") AS "HSL03",  sum("HSL04") AS "HSL04",  sum("HSL05") AS "HSL05",  sum("HSL06") AS "HSL06",  sum("HSL07") AS "HSL07",  sum("HSL08") AS "HSL08",  sum("HSL09") AS "HSL09",  sum("HSL10") AS "HSL10",  sum("HSL11") AS "HSL11",  sum("HSL12") AS "HSL12",  sum("HSL13") AS "HSL13",  sum("HSL14") AS "HSL14",  sum("HSL15") AS "HSL15",  sum("HSL16") AS "HSL16",  sum("TOTAL_AMOUNT") AS "TOTAL_AMOUNT"   FROM "_SYS_BIC"."Financial.Statments/GL_BALANCES" --:GL_BALANCE  group by
 "RCLNT",  "RYEAR",  "RACCT",  "KTOPL",  "COMP_CODE",  "Profit_center",  "Cost_center",  "GL_DEC_S",  "GL_DEC_L", 
 "ACCUNT_GROUP",       "GRP_NUM",  "RCNTR",  "PRCTR",   ;

and CE function is

CE_OLAP_VIEW("_SYS_BIC"."Financial.Statments/GL_BALANCES" ,   ["RCLNT",  "RYEAR",  "RACCT",  "KTOPL",  "COMP_CODE",  "Profit_center",  "Cost_center",  "GL_DEC_S",  "GL_DEC_L",  "ACCUNT_GROUP",  "GRP_NUM",  "RCNTR",  "PRCTR",  
 sum("HSLVT") AS "HSLVT",  sum("HSL01") AS "HSL01",  sum("HSL02") AS "HSL02",  sum("HSL03") AS "HSL03",  sum("HSL04") AS "HSL04",  sum("HSL05") AS "HSL05",  sum("HSL06") AS "HSL06",  sum("HSL07") AS "HSL07",  sum("HSL08") AS "HSL08",  sum("HSL09") AS "HSL09",  sum("HSL10") AS "HSL10",  sum("HSL11") AS "HSL11",  sum("HSL12") AS "HSL12",  sum("HSL13") AS "HSL13",  sum("HSL14") AS "HSL14",  sum("HSL15") AS "HSL15",  sum("HSL16") AS "HSL16",  sum("TOTAL_AMOUNT") AS "TOTAL_AMOUNT" ])

When test result, CE_Function retrieve data correctly but Select statement does not.

Execute Stored Procedure that uses "ALTER TABLE" and "DELETE FROM"

$
0
0

Business requirement: append the monthly new data into an archive table, then delete the oldest month data in the archive table. The archive table only keeps the most recent two months of data.


Example: we have February and March data in ARCHIVE. When April data comes, we append April data to the table, then delete February.


Our solution: create a stored procedure, steps below:


  1. Insert data into Archive table (sql: INSERT INTO)
  2. Add a column called “FLAG” (ALTER TABLE)
  3. Assign value to “FLAG”, assign 1 to the most recently two months, assign 0 to others (UPDATE)
  4. Delete records that have “FLAG” = 0 (DELETE FROM)
  5. Delete column “FLAG”(ALTER TABLE)
  6. Repeat every month

 

Question:

 

Since my procedure involves ALTER TABLE and DELETE FROM, I can’t execute them all at once because they depend on others. What’s the best way to run all these steps in sequence? Do I need 4 different procedures, call one by one, or is there a better way to execute all these procedures?


Note: I tried to use dynamic EXEC but I wasn't allow to exec ALTER TABLE using EXEC.

Dynamic Tiering - Missing tile

$
0
0

Hello,

 

I have installed Dynamic Tiering SPS11 but I am not able to access the tiles in the HANA Cockpit. So far, I have done the following:

 

     - Added System PRIV EXTENDED STORAGE and ADMIN

     - Added Role sap.hana.tiering.data::TieringUser (this is the only tiering role in the system)

     - Added Role sap.hana.admin.role::Administrator

     - Added Role sap.hana.admin.role::Monitoring

          - role sap.hana.tiering.roles::Monitoring is missing

          - role sap.hana.tiering.roles::Administrator is missing

     - re-imported DU HANA_TIERING.tgz

     - attempted to add Dynamic Tiering app from the cockpit, but no tile available.

     - attempted to import HDC_TIERING.tgz but not available in archive

 

Any ideas how to proceed?

 

Thank you.

 

Best regards,

Julius

Need help for XS application

$
0
0

Hello All,

I am working on a XSJS application where I would need to call an analytics view through XSJS and then to display the result data of this view to a Fiori cockpit page in form of graph /chart . Kindly guide me how to proceed further with logic .

 

 

Thanks

Amit .

xsodata - expose multiple tables in the same service

$
0
0

Hi,

 

  Is it possible to expose data from multiple tables in the same service?

 

   e.g. let's say we have table_A and table_B  - may or may not be related and we want the caller to see data from both tables listed one after another (e.g. 4 rows of table_A, then 1 row of table_B).

Viewing all 6412 articles
Browse latest View live


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