Quantcast
Channel: SCN : Discussion List - SAP HANA and In-Memory Computing
Viewing all 5653 articles
Browse latest View live

SAPHANA:Unable to expose store procedure via ServerSide

$
0
0

Hi Experts

 

I am a beginner to server side java script(XSJS).                                     

I am trying to expose the .xsjs, file data containing StoreProcedure and access through web browser with the following url containing hostname,portnumber and package path as shown below:

 

"hostname:80<instance#>/testdemo/Demodata.xsjs"

 

and i am getting the following error when i am trying to access it.  

 

"This link seems to be broken

We could not find the resource you're trying to access.

It might be misspelled or currently unavailable"

 

 

I have created the following files in Project Explorer:

 

1.An Empty File with file extension .xsapp

2.A file with extension .xsaccess: 

 

 

            {

            "exposed":true,

            "authentication":[{"method":"LogonTicket"},{"method":"Basic"}]

            }

 

 

3.A file with file name Demodata.xsjs:

 

     $.response.contentType = "text/html";

     var body = ''; 

     var conn = $.db.getConnection(); 

     var cst = conn.prepareCall('{CALL testdemo.TESTPROCEDURE(?,?)}');  

     if (cst.execute()) { 

     body = 'Ok'  + cst.getInteger(3); 

     }

     else

     { 

     body = 'Failed'; 

     } 

    cst.close();

    conn.commit();

    conn.close();

 

4.A Store procedure with name TEST_PROCEDURE in SQL console:

 

create procedure testdemo.TEST_PROCEDURE LANGUAGE SQL SCRIPT AS "TEST"

/********* Begin Procedure Script ************/

BEGIN

SELECT

           cStyID,

           cName,

           cDimension,

           cSea,

           cDes,

           cMCCod,

           cBrand,

     Avgpr,

           cFil,

           cCom,

           cWhs,

           cUse,

           dtDa,

           dtDat,

           Art,

           STyp,

           SVal,

           CreatBy,

           Crea,

           ModiBy,

           ModiDt,

           Log

FROM tblArticl;

END;

/********* End Procedure Script ************/

 

 

The procedure gets executed well and the result value is OK.

 

Below are the views:

 

Project Explorer View Below:

       ProjectExplorer.png

RepositoryViewBelow:

        Repository.png

NavigatorViewBelow:

NavigatorView.png

All the above files are committed and activated succesfully.But an error occured when I tried to access "hostname:80<instance#>/testdemo/Demodata.xsjs" it in browser.

 

What could be wrong here?

 

Any sample examples would be appreciated.

 

Thanks for your time

Koushik.


Create Measures in SAP HANA

$
0
0

After joining a few tables in SAP HANA, I created an Analytical View with 5 columns. However, all of them are Dimensions. My Measures(Values) would consist of counting the values of the 5 columns.

 

I'm able to get the data I want using SQL statements which look like these:

 

select count(*) AS Meter_Reads, TO_DATE(IR.date_wid) AS Date_of_Read

From "ANLT_SBX"."INTERVAL_READ_F" IR ,

"ANLT_SBX"."ESIID_SDP_XREF" XR ,

"ANLT_SBX"."UAA_METER" UM

where IR.SDP_WID = XR.SDP_WID and XR.ESIID = UM.ESIID

group by IR.date_wid

order by IR.date_wid

 

 

select count(*) AS no_of_times, UM.MTR_NO

From "ANLT_SBX"."INTERVAL_READ_F" IR ,

"ANLT_SBX"."ESIID_SDP_XREF" XR ,

"ANLT_SBX"."UAA_METER" UM

where IR.SDP_WID = XR.SDP_WID and XR.ESIID = UM.ESIID

group by UM.MTR_NO

order by count(*)

 

 

as you can see both of the above queries have counting based on the group by function. which reduces my output dataset from a few thousand rows to less than a 100 which can then be easily represented on the dashboard.

 

Can someone please help me on how to create calculated columns for my Measures? I tried to create a calculated column to get the result dataset of the first query as count_meter_no which has the function as count("MTR_NO") But since the counting is based on the group by function, this column would only give me a value as 1

 

what am I doing wrong here?

 

Thanks for your help guys!

Attribute view content from SLT system tables like KNA1

$
0
0

Hi All,

I  have strange issue with Attribute view created on tables from SLT system. I created a view on KNA1 and MARA . when I tried to do a DATA PREIVIEW with my user id  nothing comes up . This is same for Analytical view. But when I try to view the content from SYSTEM User Id everything comes up for both Attribute and Analytical Views. I checked the Authorizations for both my User Id and SYSTEM id for SLT sytem  and they look same.

I am on SP06 and does any body come across this kind of scenario?

If yes  and found solution please let me know. I really appreciate your input.

 

Thanks in advance.

 

Sree C

I want to migrate to SAP from .NET.

$
0
0

My domain knowledge is from .NET with that I have also worked on MS SQL , Oracle, Informix and bit on Reporting and Data modeling. I have about 3 yrs of experience in in IT industry.

I have just started to inquire into SAP domain. I find SAP BI and HANA interesting. But have no previous knowledge into SAP I require some candid suggestions. I am sincere about shifting my career into SAP so please help me on this. thank in advance.

 

Should I do with SAP BI? what are career prospective and advancement ? or should I go for HANA?

Should I know Hana in order to generate report with SAP BI? please make me clear on it ..thanks!!

Message while starting HANA:Impromptu CCC initialization by 'rscpCInit'.

$
0
0

Hi,

 

I am getting error while starting HANA.

hanadb4:/usr/sap/PRD/HDB88> HDB start

 

 

 

 

StartService

Impromptu CCC initialization by 'rscpCInit'.

  See SAP note 1266393.

OK

OK

Starting instance using: /usr/sap/PRD/SYS/exe/hdb/sapcontrol -prot NI_HTTP -nr 8                            8 -function StartWait 2700 2

 

 

27.07.2013 17:02:57

Start

OK

 

----

 

hanadb4:/usr/sap/PRD/HDB88> /usr/sap/hostctrl/exe/sapcontrol -nr 88 -function GetProcessList

 

 

27.07.2013 17:04:51

GetProcessList

OK

name, description, dispstatus, textstatus, starttime, elapsedtime, pid

hdbdaemon, HDB Daemon, GREEN, Running, 2013 07 27 17:02:58, 0:01:53, 3351

hdbnameserver, HDB Nameserver, GREEN, Running, 2013 07 27 17:03:01, 0:01:50, 3371

hdbpreprocessor, HDB Preprocessor, GREEN, Running, 2013 07 27 17:03:22, 0:01:29, 3433

hdbindexserver, HDB Indexserver, GREEN, Running, 2013 07 27 17:03:25, 0:01:26, 3460

hdbstatisticsserver, HDB Statisticsserver, GREEN, Running, 2013 07 27 17:03:25, 0:01:26, 3461

hdbxsengine, HDB XSEngine, GREEN, Running, 2013 07 27 17:03:25, 0:01:26, 3462

sapwebdisp_hdb, SAP WebDispatcher, GREEN, Running, 2013 07 27 17:04:10, 0:00:41, 3659

hdbcompileserver, HDB Compileserver, GREEN, Running, 2013 07 27 17:03:22, 0:01:29, 3434

hanadb4:/usr/sap/PRD/HDB88>

 

 

All services are runnning, but i am unable to connect from HANA Studio.

 

Pleaes suggest.

 

Thanks,

Priya

HANA Transport Mechanism

$
0
0

Hi All,

 

I'm new to SAP HANA and was wondering how the transport mechanism works for Views Created in HANA Studio.

 

I was just reading a Document which talked about CTS+  ( I'm SAP ABAP Developer - I know CTS )- But I Read CTS+ is used for Non ABAP Objects -Can Some Explain what are Non ABAP Objects .

 

Also as per the document - First I have to create the Views In Packages which are attached to Delivery Unit - Then Download the Delivery Unit to your local PC and then go to STMS and Create a Transport and then attach the Delivery Unit File from Your Local PC and then Release the transport...

 

 

Its almost similar to what i do for SAP ABAP objects but the it asks me instantly when i edit or create a new program - I don't have to download and then attach to transport. Do we have any similar mechanism in SAP HANA or its just the downlaod attach mechanism

 

Also what about the tables that i created in HANA Studio and i believe the tables are not attached to Delivery Unit - How do you move your tables from DEV to QA to PRD

 

Thanks

Queries for Used and Resident memory and comparison with Overview tab numbers

$
0
0

Hi,

 

I look at the overview tab of the HANA studio for DB used memory and DB resident memory.

 

When I use the queries 1 ,2 and unix command below, the results match with the numbers displayed in the overview tab.

 

SQL Query 1 for DB used memory: (Available in HANA documents)

SELECT ROUND(SUM(TOTAL_MEMORY_USED_SIZE/1024/1024/1024), 2) AS
"Used Memory GB" FROM SYS.M_SERVICE_MEMORY;

 

SQL Query 2 for DB Resident memory: (I created this by observing the table contents)

SELECT ROUND(SUM(PHYSICAL_MEMORY_SIZE/1024/1024/1024), 2) AS
"DB RESIDENT Memory GB" FROM SYS.M_SERVICE_MEMORY;

 

Unix command: Provides same value as SQL query 2.

cat `ps h -U qp4adm -o "/proc/%p/status" | tr -d ' '` | awk '/VmSize/ {v+=$2} /VmPeak/ {vp+=$2} /VmRSS/ {r+=$2;} /VmHWM/ {rp+=$2} END {printf("Virtual Size = %.2f GB (peak = %.2f), Resident size = %.2f GB (peak = %.2f)\n", v/1024/1024, vp/1024/1024, r/1024/1024, rp/1024/1024)}'

 

My Questions:

 

Question 1:Now when I use the query 3 below(just getting the above 2 together with the process name), I observe that used memory is more than the resident memory for some services.

I believe that this is wrong based on the below explanation which is in the official HANA docs.

 

Can anybody in this forum throw more light on this observation?

 

SQL Query 3:

SELECT SERVICE_NAME,ROUND(SUM(TOTAL_MEMORY_USED_SIZE/1024/1024/1024), 2) AS
"Used Memory GB", ROUND(SUM(PHYSICAL_MEMORY_SIZE/1024/1024/1024), 2) AS
"DB RESIDENT Memory GB" FROM SYS.M_SERVICE_MEMORY GROUP BY SERVICE_NAME

 

Explanation on Resident from HANA doc:

"

When memory is required for table growth or for temporary computations, the SAP HANA code obtains it from the existing memory pool. When the pool cannot satisfy the request, the HANA memory manager will request and reserve more memory from the operating system. At this point, the virtual memory size of the HANA processes grows.

Once a temporary computation completes or a table is dropped, the freed memory is returned to the memory manager, who recycles it to its pool, without informing Linux. Thus, from SAP HANA‟s perspective, the amount of Used Memory shrinks, but the process‟ virtual and resident sizes are not affected. This creates a situation where the Used Memory may even shrink to below the size of SAP HANA‟s resident memory, which is perfectly normal."

 

Question 2:

SQL Query 5: This query doesn't match with the resident memory value in overview tab. Should it? I mean if it doesn't then is it an issue in the studio?

 

SELECT ROUND((USED_PHYSICAL_MEMORY + FREE_PHYSICAL_MEMORY)/1024/1024/1024, 2) AS "Physical Memory GB", ROUND(USED_PHYSICAL_MEMORY/1024/1024/1024, 2) AS "Resident GB" FROM PUBLIC.M_HOST_RESOURCE_UTILIZATION

 

Question 3:

 

In some Studios(meaning different versions) I have used the result of SQL query 1 doesn't match with the studio number. Can we consider this as an issue in the studio?

 

Question 4:

 

From the explanation above, can we understand that the Resident size increases since the freed memory is not released to the OS but to the HANA memory pool?

How do we differentiate between DB used and DB Resident memory?

The definition for both are same-> Physical memory in use by the process.

 

Used memory=" Code+stack+HANA memory pool(Tables,temporary computations)

Resident memory=?

 

Regards,

Sandeep

Key and Text Functionality in HANA

$
0
0

Hello Experts,

We are on SP6 and trying to use the label column functionality, so that we don't have to create a concatenated attribute showing both at the same time. The idea is whenever we pull any key such material no or so, the associated text also get pulled in automatically.

 

But somehow, if we create a Universe on top of an analytic view then key and text is not visible in the data preview at universe level.

 

Can you please provide your expert opinion here ?

 

Thanks & regards,

Jomy


PAL Error while invoking from a stored proc[HANA Solution Adoption and Deployment (CSA)]

$
0
0

Hello All,

I'm facing a strange error.

When i invoke a Triple Exponential Smoothing Algorithm  from SQL Console,

Everything works fine as expected and i get the desired results.

The input data and parameters have been prepared as explained in the documentation.

CALL _SYS_AFL.WOW_FCST_TRIPLE (V_WOW_FCST_DATA, WOW_FCST_PARAMS, WOW_FCST_RESULTS) WITH OVERVIEW

 


The problem arises when i try to invoke the same PAL Algorithm procedure from a SQL Script procedure.

Input data, parameter and parameters are same, and I triple checked for errors with this.

Procedure is created without any problem , but when i run it i get the error :

Could not execute 'call getTesOutputNew('2010-01-05')' in 196 ms 773 µs .

SAP DBTech JDBC: [2048]: column store error: search table error:  [2620] VINAY.GETTESOUTPUTNEW: line 5 col 2 (at pos 97): InternalFatal exception: _SYS_AFL.AFLPAL:TRIPLESMOOTH: AFLFunctionFatal exception: PAL error[73001043]:Value [7] of parameter CYCLE is invalid. $APPEND$

What is strange is that , when i run the algorithm in SQL Console, i use the same parameters and it works fine.

Below is the snippet for create procedure : , i have checked for authorization,syntax and other issues and everything is what its supposed to be.

PFA the indexserver trace.

Any pointers on this?

 

dropprocedure getTesOutputNew;

 

CREATEPROCEDURE getTesOutputNew( IN TES_TILL_DATE DATE)

     LANGUAGE SQLSCRIPT AS

   

BEGIN

  inputtable = select

  row_number() over (orderby"DATE" ) as CALENDAR_DATE,

  PROD_QTY

  from VINAY.ITEMSALESUBSET

  where"DATE"

  between'2010-01-01'and :TES_TILL_DATE

  orderby

  CALENDAR_DATE ;

 

 

P_WOW_FCST_PARAMS = select * from VINAY.WOW_FCST_PARAMS;

 

CALL _SYS_AFL.WOW_FCST_TRIPLE (:inputtable,:P_WOW_FCST_PARAMS, P_WOW_FCST_RESULTS) WITH OVERVIEW;

SELECT * FROM :P_WOW_FCST_RESULTS;

--insert into  VINAY.FCST_HIST

--select top 1 *,to_DATE('2010-01-01'),'140574' AS "ARTICLE",'1282' AS "STORE"  from :P_WOW_FCST_RESULTS order by CALENDAR_DATE DESC;

SAP BI and BO software

$
0
0

I am currently in need of software for BI+BO for study purpose, do SAP have these software for personal educational purpose?

 

I tried to look for it online but I could not find one, if you can suggest some sites from where I can download these software?

 

Thanks

Jay

field or table alias is not allowed as an input of table functions

$
0
0

Hi,

 

I am trying to invoke a user defined table function through a SQL snippet like below.

 

SELECT (SELECT * FROM PKG_ORG_ORG_HAS_CHILDREN(org_id)) has_child

from PA_ORG_OWNER

where stud_id = 'np1';

 

But for some reason it will not accept column name as an IN parameter

 

Could not execute 'SELECT (SELECT * FROM PKG_ORG_ORG_HAS_CHILDREN(org_id)) has_child from PA_ORG_OWNER os where ...' in 2 ms 451 µs .

SAP DBTech JDBC: [7] (at 47): feature not supported: field or table alias is not allowed as an input of table functions: line 1 col 48 (at pos 47)

 

In general our product has a LOT of small Oracle PL/SQL functions that are invoked from SQL within application code. This is a huge bottleneck while migrating to HANA. Any best practice anyone can recommend for this issue?

 

-Thanks

nphana

Does HANA support timezone functions?

$
0
0

We have a datetime stored in HANA tables. I have gone thro the SQL reference guides but did not find any functions that would give me the timezone or translate one timezone to another.

 

Does HANA support timezone functions?

Sorting date in HANA Models

$
0
0

Is there a way to sort date in HANA Modeling Views output?

Which module has a good scope in future either SAP HANA or SAP BW?

$
0
0

Hi,

 

I am SAP BO consultant.Currently in the market SAP BI-BO has good demand, but in future( May be after 2 years) SAP HANA has a good demand.

 

In SAP HANA  SAP R/3 data directly replicate to HANA using Sybase replicate server and  SAP BI sources & Non SAP Data sources  should be transformed to SAP HANA using  BODS.

 

In BW 7.3 the DS 4.0 was tightly integrated.

 

Please guide me which module should i learn,  SAP BW 7.3 with BO 4.0 or SAP HANA with BO DS 4.0 & BO 4.0.

 

Thanks & Regards,

Rajesh.

I want to migrate to SAP from .NET.

$
0
0

My domain knowledge is from .NET with that I have also worked on MS SQL , Oracle, Informix and bit on Reporting and Data modeling. I have about 3 yrs of experience in in IT industry.

I have just started to inquire into SAP domain. I find SAP BI and HANA interesting. But have no previous knowledge into SAP I require some candid suggestions. I am sincere about shifting my career into SAP so please help me on this. thank in advance.

 

Should I do with SAP BI? what are career prospective and advancement ? or should I go for HANA?

Should I know Hana in order to generate report with SAP BI? please make me clear on it ..thanks!!


Shift career to SAP Hana

$
0
0

Hi Friends,

 

I have been working in BI/DW technoloy for the last 9 years mainly on the Microsoft BI stack (SSIS, SSAS, SSRS). I also have a fair amount of experience in Business Objects 6.5 and XI. I would like to shift my skillset to SAP especially into SAP HANA platform. I would like to know that by self paced training is it possible to take up SAP HANA certification and which certification would suit me based on my previous experience.

 

Thanks and regards

Sai

Calculated column and null values

$
0
0

Hi folks,

 

I have a fairly simple formula for a calculated column.  I have a field called Flag and it can contain either 'Yes', 'No', or null.  My calculated measure is simply trying to label both 'No' and null results as 'N' like this;

 

if("Flag" = 'Yes', 'Y','N')

 

So my interpretation of this formula is that anytime the Flag is set to Yes then place a Y else for every other case (such as 'No' or null) it should just put 'N'.  It is successfully converting Yes to Y and No to N but it leaves nulls as '?' instead of converting them.

 

Is this a bug?  My Flag field is the result of an outer join with other tables and it's almost as though the calculated column is being calculated BEFORE all of the joins are occurring.  Any suggestions?

 

Thanks,

-Patrick

Pre-Sort data via View

$
0
0

Hi folks,

 

I want to create a view where the output is already sortet. In my case I need the data prepared in a sorted manner for Predictive Analysis using HANA Online scenario.

 

So is it possible to create a view where I can sort the data upfront??

 

Cheers, Christoph.

CSV upload to HANA

$
0
0

Right now I have an Attribute view pulling from 5 different tables with different data. They are all connected with an ID.

I have a .csv file with columns that need to be uploaded to all 5 tables. The .csv columns dont have the same names as the current columns, but I can change this if i need to.

Right now I am importing the selected columns to each table and after I'm done they show up in my Attribute View fine.

I was just wondering if there is an easier way to do this, instead of importing the csv 5 different times.

Thanks

Can I insert a value null into column with a foreign key constraints in a COULMN table?

$
0
0

I have a problem when I try insert a value NULL into a column with foreign key constraints

 

Example:

 

CREATECOLUMNTABLE AZIENDA2 (

COD_AZIENDA VARCHAR(30) NOTNULL,

RAGIONE_SOCIALE VARCHAR(600) NULL,

SEDE_LEGALE VARCHAR(330) NULL,

SEDE_AMMINISTRATIVA VARCHAR(330) NULL

);

 

----PROMPT 'CREATE COLUMN TABLE AZIENDA_GERARCHIA';

 

CREATECOLUMNTABLE AZIENDA_GERARCHIA2 (

COD_AZIENDA_GERARCHIA VARCHAR(2) NOTNULL,

COD_AZIENDA_ELEGER VARCHAR(30) NOTNULL,

COD_AZIENDA_RIFERIMENTO VARCHAR(30) NULL

);

 

--'Create primary key on table AZIENDA';

 

ALTERTABLE AZIENDA2

ADDCONSTRAINT PK_AZIENDA2

    PRIMARYKEY (COD_AZIENDA);

 

--'Create primary key on table AZIENDA_GERARCHIA';

 

ALTERTABLE AZIENDA_GERARCHIA2

ADDCONSTRAINT PK_AZIENDA_GERARCHIA2

    PRIMARYKEY (COD_AZIENDA_GERARCHIA, COD_AZIENDA_ELEGER);

 

--'Create foreign key on table AZIENDA_GERARCHIA';

 

ALTERTABLE AZIENDA_GERARCHIA2

ADDCONSTRAINT FK_GENERALE2_00348

    FOREIGNKEY (COD_AZIENDA_RIFERIMENTO)

    REFERENCES AZIENDA2;

   

-- 'Standard configuration - Table AZIENDA_GERARCHIA';

INSERTINTO AZIENDA_GERARCHIA2 (

COD_AZIENDA_GERARCHIA, COD_AZIENDA_ELEGER,COD_AZIENDA_RIFERIMENTO

) VALUES ('$', '$', NULL);

 

When I try to insert into AZIENDA_GERARCHIA2, I get the following error

 

Could not execute 'INSERT INTO AZIENDA_GERARCHIA2 ( COD_AZIENDA_GERARCHIA, COD_AZIENDA_ELEGER,COD_AZIENDA_RIFERIMENTO ...' in 470 ms 710 µs .

SAP DBTech JDBC: [461]: foreign key constraint violation: 

 

This error does NOT happen if I create the table with this instruction

 

Example:

CREATETABLE AZIENDA2 (…);

 

Could you please help us with Issue? Can I insert a value null into column with a foreign key constraints in a COULMN table? (In a row table I can)

Viewing all 5653 articles
Browse latest View live


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