Quantcast
Channel: SCN : Unanswered Discussions - SAP HANA Developer Center
Viewing all 5115 articles
Browse latest View live

Unique Constraint error

$
0
0

Hello everyone,

 

I'm trying to insert some data  from a time series to another time series using the following query:

 

 

insert into "test"."testing::TimeSeries.CostRevenueSubscriberKeyFigureSeries"

select

'ABC001' as "MODEL_ID",

"CUSTOMER_TYPE"||';'||

"REGION"||';'||

"COUNTRY_NAME",

"PRODUCT_ID",

'PROFIT' as "KEY_FIGURE",

"VALID_FOR_DATE",

"VALID_FOR_MONTH",

"PROFIT_AMOUNT"

from "test"."testing::TimeSeries.SubscriberCostRevenueSeries"

group by "CUSTOMER_TYPE","REGION","COUNTRY_NAME","PRODUCT_ID","VALID_FOR_DATE","VALID_FOR_MONTH","PROFIT_AMOUNT"uting

 

Upon executing the query I recieve the following error:

 

Could not execute 'insert into "test"."testing::TimeSeries.CostRevenueSubscriberKeyFigureSeries" select 'ABC001' as ...' in 5.583 seconds .

[301]: unique constraint violated: TrexUpdate failed on table 'test"."testing::TimeSeries.CostRevenueSubscriberKeyFigureSeries' with error: unique constraint violation in self check for table "test"."testing::TimeSeries.CostRevenueSubscriberKeyFigureSeriesen, constraint='$trexexternalkey$', udiv='6,ABC001;17,ME;Berlin;Germany;32,xyz;6,PROFIT;2015-02-01', pos=1048561, indexname=_SYS_TREE_CS_#775972_#0_#P0, rc=55

 

I would really appreciate it if someone could shed some light on the issue


Mapping MSSQL ISNUMERIC to HANA

SAPUI5 authorization on SAP Hana XS

$
0
0

Hello.

We have application backend with SAP Hana XS and are developing frontend SAPUI5 application on SAP Hana. We would like to create the system of privileges on standard SAP HANA & HANA XS tools.

 

In this system we should decide three tasks:

1. Show applications in Launchpad

The user see the application in launchpad if he has privilege on it.

2. Show objects

The user see records from db if he has privilege on it. As far as I understand I should use the analytic privilages for it.

3. Block the update operation in SAPUI5 interface

The user can update the record in SAPUI5 interface if he has "update privilages" for this application.

 

Did anybody decide these tasks?

Does anybody has documentation for this topic?

 

Really we have standard SAPUI5 application on HANA and want choose the right way for system of rights.

Thanks in advance for any information. 

Categorizing multiple texts with TM_CATEGORIZE_KNN in one call

$
0
0

Hi guys,

 

I have a working application right now, but I want to make the things more efficient. I am developing a Java Dynamic web project with SAP HANA. In this project, I call a procedure which executes kNN text classification by using TM_CATEGORIZE_KNN from text mining which had been defined as follows

 

create procedure "SYSTEM"."KNN_TEXT_CLASSIFICATION_MAINCATEGORY"
(in textInput NCLOB) as
begin
SELECT T.CATEGORY_VALUE, T.NEIGHBOR_COUNT, T.SCORE  FROM TM_CATEGORIZE_KNN(    DOCUMENT :textInput      MIME TYPE 'text/plain'    SEARCH NEAREST NEIGHBORS 5 "text"      FROM "SYSTEM"."aveaLabelledData"    RETURN top 1      "main_category"      from "SYSTEM"."aveaLabelledData"     ) AS T;
end;

So, every time I call this procedure, I am able to categorize only one text (which is textInput). However, I have a table (named as SYSTEM/AVEA_UNLABELLEDDATA_VIEW) which contains hundreds of rows and all these records need to be categorized by TM_CATEGORIZE_KNN function. That's why I iterate through all rows in that table and for each row I call KNN_TEXT_CLASSIFICATION_MAINCATEGORYprocedure from my code as follows.

 

PreparedStatement pstmt = null;            pstmt = connection                    .prepareStatement("SELECT \"id\",\"text\" FROM \"_SYS_BIC\".\"SYSTEM/AVEA_UNLABELLEDDATA_VIEW\"");            ResultSet rs = pstmt.executeQuery();            pstmt = null;                       String text = null, sql=null;            Double id = null;            Statement stmt = null;            ResultSet rs2 = null;            while (rs.next()) {                id = rs.getDouble(1);                text = rs.getString(2);                stmt = connection.createStatement();                sql = "CALL \"SYSTEM\".\"KNN_TEXT_CLASSIFICATION_MAINCATEGORY\"(\'" + text + "\')";                rs2 =  stmt.executeQuery(sql);                           }

It actually works without any error. But, since there are hundreds of rows to be categorized, that means I call hundreds of calls of my procedure from my code. That makes the things quite slow.

 

I wonder, is there a way to categorize all the rows in one call? In other words, I need to change my procedure such that, it will categorize all the records, not just one.

 

Thanks in advance,

Inanc

SAP HANA Stored Procedure takes lots of time to execute

$
0
0

Hi experts,

 

Currently for APO and production data we use certain logic to calculate derived line items for bikes chars. Code is written in stored procedure and generated line items data is stored in temp table. Then we are using this temp table in calculation view. Now issue is stored procedure is executed through schedule job. So Hana data is not real time. My query is what are other options for stored procedure logic to incorporate so that calculations happens at real time in place of batch job .so that we can avoid using stored procedure.


Thanks,

Amy.

abap call proxy procedure

$
0
0

hi experts,

   I was create a proxy data procedure. And I can see it does exist in BW(like below picture 1). Now I call this procedure by CALL DATABASE PROCEDURE [PROCEDURE NAME]. But it's an error happen(below picture 2).

  Does any another steps I missed when I created Proxy Procedure.

  Anyone can help me?

QQ截图20160130141947.png

 

1.png

How to call a Hana Variable in crystal

$
0
0

1.Have created a Hana variable in a calculated view and added to a project node. Called it as VAR_COUNTRY

2.How to call this variable in a client tools like Crystal

3.Below is what I tried but it does not work

SELECT *

FROM "_SYS_BIC"."mypkg/CV_SALES_DATA"

where

''{Country}'' in ''VAR_COUNTRY''

4.Country is the field for which I need to filter the data

5.VAR_COUNTRY is the variable in Hana

6.Do I have to create a parameter in the client tool and pass it to the variable

 

Any help is appreciated.

 

Thanks

Aswin

Error message while activating a Decision Table

$
0
0

Team:

 

I received an error message while activating a decision table, as follows:

 

Repository: internal error during statement execution, please see the database error traces for additional details, error in generated procedure --

Insufficient privilege not authorised at ptime/query/checker/query_checker. cc:3302line: 4294967295 column 4294967295.

 

Does anybody know what system privilege I should use to correct this error message?


SAP HANA FI VDM

$
0
0

Hello

 

Ps provide the path in SAP service market place to know available SAP FI VDM.

 

Santhosh

How to get the distinct values in calculation views

$
0
0

Hi

 

I have an requirement where I need to get the distinct values( employee ids) from a calculation views. The views returns distinct rows but there are duplicate employee id with different other attributes in the view from where I need to extract the distinct ids.

 

Any help would be highly appreciated.

 

Regards

Rajib

Passing an input parameter through decision table

$
0
0

Hello there,

I have stumbled upon an interesting requirement:

I need to pass an input parameter through a decision table. We have defined our data models to contain a decision table to achieve "user friendly" filtering.

Now I need to do a calculation based on an input parameter in a view that is "before" this decision table. Is there a way how to pass an input parameter through a decision table?

 

Thanks a lot, Milos.

HANA lost privileges to change roles - greyed out

$
0
0

hello all

for some reason, today, i appear to have lost privileges to change certain roles.

i have a sap delivered role that requires changing, which i have done before on a different environment, now is greyed out.

i cannot understand what has happened. the roles in question all appear to be in the sap. namespace

 

anyone ?

 

thanks

g

Getting error during calculation view in SQL-pLS HELP

$
0
0

Message :

  Repository: Encountered an error in repository runtime extension;Model inconsistency. Deploy Calculation View: SQL: transaction rolled back by an internal error: table ambiguously defined: D: line 12 col 51 (at pos 675)

Set Schema DDL statement: set schema "SYSTEM"

Type DDL: create type "_SYS_BIC"."sales_pipeline/LEAD/proc/tabletype/VAR_OUT" as table ("CLIENT" NVARCHAR(3), "GUID" VARBINARY(16), "opport_COUNT" INTEGER)

Procedure DDL: create procedure "_SYS_BIC"."sales_pipeline/LEAD/proc" ( OUT var_out "_SYS_BIC"."sales_pipeline/LEAD/proc/tabletype/VAR_OUT" ) language sqlscript sql security definer reads sql data as 

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

BEGIN

  var_out = select  a.CLIENT,a.GUID , count(1) as "opport_COUNT" from  "SAPDM1"."CRMD_OPPORT_H" as a

 

 

       inner join "SAPDM1"."CRMD_LEAD_H" as b on b.client = a.client and a.guid = b.guid

      

        inner join "SAPDM1"."CRMD_ORDERADM_H" as c on C.OBJECT_ID = A.guid

      

        inner join "SAPDM1"."CRMD_ORDERADM_I" as d on c.guid = d.guid

 

 

        inner join "SAPDM1"."CRMD_ORDER_INDEX" as d on c.client = d.client

      

        where c.OBJECT_ID=c.GUID

      

        group by a.guid ;

               

 

 

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

Capture.PNG

Hanatrail Version Not working

Convering a procedure to HANA information views

$
0
0

Hi

 

I have the following procedure which I need to convert into calc/attribute view . Please suggest how to do that?

 

procedure proc1(IN p1 numeric, IN p2 numeric, OUT ref cursor )

declare

var1 character varying;

begin

 

    select     region

    into     var1

    from      unit_level_mapping

    where      unit = p1

    and     level = p2;

 

    if(p1 = 1) then

        open ret_cursor for

        SELECT region_code,region_name

        FROM t_region where code = 3;

 

    elsif(p1 = 2) then

 

        open ret_cursor for

        SELECT at_country_code, at_country_name

        FROM t_country where at_regioncode = var1;  -- from the initial select stmt

 

    end if;

   

end    ;

 

 

Regards

Rajib


SLT table Replication status showing as scheduled

$
0
0

Hello,

 

I have replicated Master data table(LFA1), and status showing as scheduled and Local Table Rec filed is empty, table is not creating.

 

I have stopped the replication and re-replicated the table couple of times, but it didn't work.Still status showing as LTRC.

 

 

Santhosh

Using a schema mapping or schema synonym for SQL Views

$
0
0

We have a scenario where a schema has different names in DEV, QA and Prod. This schema, which happens to be an SLT target, contains tables to be used in SQL Views.

 

Is there any way to establish a synonym or a mapping for this schema name? For example can I define a synonym/map for ECC to ED1/EQ1/EP1 depending on the system? Then all SQL view definitions would be able to be defined using the virtual schema name "ECC".

 

I know schema map capability exists, but I only see it being usable for Analytic/Calc Views and not SQL views or any SQL Script procedure. There is a Public Synonym feature, but it doesn't seem to apply on schema names.

 

What are my options to model this?

SAP HANA SERVICE LAYER AND UI (ADD-ONS)

$
0
0

Hi Experts,

 

I have started palying around with the service layer but all my previous HANA add-ons was developed via the DI with HANA syntax queries.

 

I have the following few querstion:

 

1. Will UDO's,UDT's and UDF's in a HANA DB still be created via the DI API (SAPbobs) or will the Service Layer be used for this ?

2. Will I be able to use the Service Layer (for backend) and still use xml forms as per normal (SAPboui) DLL.

 

I would really appreciate any feedback...

 

Brenden Draper

Need help understanding ".xsprivilege"

$
0
0

Hi,

I am having trouble understanding how the .xsprivilege works when used in a XS application project. I read the help documentation and imported some hello world example projects and toyed around but I still don't get it....

Here's what I need help with,

1)     When we define a .xsprivilege with 'Display' and 'Admin' options, are they keywords that set the privilege levels? I think it is not, but not sure.

2)     The help document on '.xsaccess' specifies,

          "The authorization keyword in the .xsaccess file enables you to specify which authorization level is required for access to a particular           application package, for example, execute or admin on the package sap.xse.text."........where do we specify what actions are permitted           as part of 'execute' or 'admin' privilege?

3)     Or is the level of access for 'execute' and 'admin' actually defined when we use the privilege in the '.hdbrole' file depending on the access levels we           define there? 

 

Thank You,

Benedict

Sap Hana Replication

$
0
0

Hello all,

 

I have 2 SAP Hana Systems i am using to test replication.

Although when i start with replication secondary hosts wont start. Making some analyse to the  nameserver.trc and indexserver.trc i have the following:

 

nemeserver.trc

 

i Crypto           Utils.cpp(02368) : generated new PersistenceRootKey.

i Crypto           Utils.cpp(02408) : generated new DpApiRootKey.

e Stream           NetworkChannel.cpp(02672) : NetworkChannel::connectBlocking peer closed

e DaemonClient     NetworkLinux.cpp(00233) : Cannot connect (connection refused) to 127.0.0.1:30000

e TrexNet          Responder.cpp(02062) : can't accept: (ssl: internal error)

e TrexNet          Responder.cpp(02062) : details: Internal Error. Crypto/SSL/CommonCrypto/Engine.cpp:516: SSL handshake failed: SSL error [536871970]: ???, General error: 0x20000422 | SAPCRYPTOLIB | SSL_accept SSL API error

0xa060023c | SSL | ssl3_get_record

Version in SSLPlaintext.version field of currently received record differs from the one negotiated in the current or currently accomplished handshake.

SSL record with a non supported version received

(ErrCode: 536871970)

 

 

Indexserver.trc

 

e tz               DateParser.cpp(04444) : Time zone validity checker could not find database tables with timezone data. Aborting validity check. Please make sure that you have up-to-date timezone data tables. (see SAP Note 1932132)

e TrexNet          EndPoint.cpp(00329) : ERROR: failed to open channel <SecondaryServerIP>:30010! reason: (ssl: no context given)

e TrexNet          EndPoint.cpp(00329) : details: Internal Error. Crypto/SSL/CommonCrypto/Context.cpp:128: Cannot create SSL context: Error in api.SSL_CTX_set_default_pse_by_name - SSL error [4129]: ???, General error: 0x00001021 | SAPCRYPTOLIB | SSL_CTX_set_default_pse_by_name

SAPCRYPTO API error

The PSE file does not exist.

0xa1d50108 | TOKEN_TOKPSE | sec_SSL_CTX_set_asc

Token application not existing

(ErrCode: 4129)

[4213]{365351}[18/13865] 2016-02-02 15:40:04.706691 e Row_Engine       msglog.cc(00082) : error: general configuration error (at ptime/session/eapi/jdbc/Statement.cc:20

33 )

[4213]{365351}[18/13865] 2016-02-02 15:40:04.706797 e EmbeddedAPI      Statement.cc(04397) : unhandled ltt exception was caught: conn_id=365351, stmt_id=156917060728915

7, stmt_hash=aabe125e5c487fd1ae50133f0f4aaf98, error=error: general configuration error, sql=alter system alter configuration ('global.ini','SYSTEM') unset ('communicat

ion','ssl') with reconfigure

[4213]{365351}[-1/-1] 2016-02-02 15:40:04.706913 e EmbeddedAPI      Connection.cc(02012) : internal error: message=error: general configuration error

[4213]{365351}[-1/-1] 2016-02-02 15:40:04.836169 e EmbeddedAPI      Connection.cc(00336) : exception  1: no.70000030  (TREXNameServer/ReconfigServer.cpp:113)

    error: general configuration error

exception throw location:

 

 

Can anyone help me debuging and resolving this please. I am starting with SAP Note 1932132.

 

Regards,

 

Lostrans

Viewing all 5115 articles
Browse latest View live


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