Quantcast
Channel: SCN : All Content - SAP HANA Developer Center
Viewing all 6745 articles
Browse latest View live

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


SAP Hana Mini Checks.

$
0
0

I have run the Hana mini checks last week..
Is there a NOTE to reference some of the data responses?
One of the responses says critical but does not reference an SAP note..

 

CHID;DESCRIPTION;HOST;VALUE;EXPECTED_VALUE;C;SAP_NOTE

;;;189467;<= 100000;X;

 

Not sure what it is referencing as there in no description or host and just a bunch of the same from row 217 to 1000.. Which may be more as eclipse only allows for up to 1000 rows...

 

 

there is an AUTO merge table withmany delta records but it is not one of my tables and I cannot seem to find it?  Any help with finding this table would be insightful,

THank you for your time and diligence.

 

HANA_Configuration_MiniChecks_Rev90+_ESS

HANA 102 on AWS Linux SUSE SERVER 11 sp3

SAP HANA and Twitter data

$
0
0

Dear colleagues,

could you please help me with short cuts to SAP HANA and Twitter related knowledge, documents, projects, tools, case studies and all other relevant materials that could be found on SCN.

In short we are running SAP HANA lab at our university (Polytechnic of Zagreb, Croatia). Its quite new lab, but if everything goes as planned this academic year we will have three applications developed. Slowly planing next year projects and trying to explore options of the SAP HANA for the purpose of Twitter analysis. We started quite extensive research project and currently collecting data from almost 10,000 startup founders across all EU countries. We would like to learn more about startups by observing founders tweets. In my view this could be nice project where we could explore how SAP HANA could be used to analyse data we are collecting. In current team we have different skills, from affective computing, NLP, social media for purpose of social science. So theoretical background and fundaments are here and to try SAP HANA as a technology platform could be nice and challenging task. 

 

Link to our first paper is here (we done two additional ones, but they are in process of publishing, so will share them later publicly, or on request)

 

https://www.researchgate.net/publication/292392240_An_Analysis_of_Twitter_Usage_Among_Startups_in_Europe

 

Every little help so please share ideas from where to start. Also if you are interested in collaboration, we are always open for new ideas, perspectives and network extensions

Best

Sergej from Croatia

how to restrict line items at header level

$
0
0

Hello Experts,

 

I am a Newbie to HANA and need help on the following requirement.

 

Need to pull a item level field and display in output (probably first record)

 

 

Fields in Header table

HF1

HF2

HF3

HF4

 

 

Fields in Line item table

HF1

LT1

LT2

Lt3

LT4

 

 

 

I want to display some thing like this:

 

HF1   HF2   HF3     LT4

 

 

LT4 will be first line item from that table

 

 

Can you suggest which view is better and how to achieve it? thanks.

 

regards,

Sumanth

Group by functionality in sap hana studio with graphical views mode

$
0
0

Hi,

 

Please help me to find option of using Group by functionality in HANA studio without using SQL query. i need to use this option on calc views where i have to display plant wise totals in output

Define CDS Table using given table type

$
0
0

Hi,

 

Is it possible to use a table type when defining an hdbdd-table (as entity)? This table type shall not be defined in the same hdbdd-file, but be given somewhere else. I want to omit listing all the fields in the table definition as the structure is already given; something like an include structure in ABAP-DDIC.

 

Thanks,

Ingo

Reading HANA data from SQL Server, using ODBC

$
0
0

Hi all,

I've created a linked server (SQL Server 2012), pointing to a HANA database, using This excellent blog

Connection test finishes successfully, but when trying to run a very simple query (from SQL Server Management studio),

the query hangs forever and no results retrieved.

I have the very same settings, pointing a second HANA and it works perfectly.

Both HANA databases are in version 1.00.102.02.1446663129.We use client version 1.00.111.00.

We use the very same HW, for both HANA databases and NO firewalls are present.


I've tried to compare the two environments, but couldn't find any difference (obviously, there is a difference )


Please assist,

Ami.

stored procedure

$
0
0

Hi Experts,

 

can you please help me convert this SQL query below;

 

SQL QUERY

CREATE proc [dbo].[Project_Bal_100715]

 

@Prjcode1 date,

@prjcode2 date

as

 

begin

      IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[test_table]') AND type in (N'U'))

            DROP TABLE [dbo].[test_table]

            SELECT T2.[TransId], T0.[PrjCode], T0.[PrjName], T1.[Account],T3.[AcctName],T1.[RefDate], T2.[Memo],T1.[Debit],

            T1.[Credit],T1.[BatchNum], T2.[CreateDate],T2.TaxDate , T0.[U_PR_TYPE],T1.[Ref2],T1.[FCDebit], T1.[FCCredit],

            T1.[DueDate],0 as Debit_BF,0 as Credit_BF

            into [test_table]

            FROM OPRJ T0  INNER JOIN JDT1 T1 ON T0.[PrjCode] = T1.[Project]

            INNER JOIN OJDT T2 ON T1.[TransId] = T2.[TransId]

            INNER JOIN OACT T3 ON T1.[Account] = T3.[AcctCode]

            where T1.RefDate >= @Prjcode1 AND T1.RefDate <= @prjcode2 AND T0.U_PR_TYPE ='Employee'

            --and T3.AcctCode ='2001010952'

            ORDER BY t0.prjcode,T2.[TransId]

end

            Declare Curupdate1 Cursor For Select distinct T0.[PrjCode],T0.[PrjName],T1.[Account],T3.[AcctName],sum(T1.[Debit]) as D_BF,sum(T1.[Credit]) as C_BF

            From  OPRJ T0  INNER JOIN JDT1 T1 ON T0.[PrjCode] = T1.[Project]

            INNER JOIN OJDT T2 ON T1.[TransId] = T2.[TransId]

            INNER JOIN OACT T3 ON T1.[Account] = T3.[AcctCode]

            where T1.[RefDate]< @Prjcode1  group  by  T0.[PrjCode],T0.[PrjName],T1.[Account],T3.[AcctName]

            Declare @prjCode varchar(200),@prjName varchar(200),@Account varchar(200),@AcctName varchar(200),@D_BF money,@C_BF money

            Open Curupdate1

            Fetch Curupdate1 Into  @prjCode,@prjName,@Account,@AcctName,@D_BF,@C_BF

            While @@Fetch_Status=0

            Begin

                   if @D_BF=''

                        begin

                              set @D_BF=0

                              set @C_BF=0

                        end

                        update [test_table] set Debit_BF  =@D_BF,Credit_BF =@C_BF

                      where PrjCode =@prjCode and PrjName =@prjName and Account = @Account and AcctName = @AcctName

           

                 

            Fetch Curupdate1 Into @prjCode,@prjName,@Account,@AcctName,@D_BF,@C_BF

            End

            Close Curupdate1

            Deallocate Curupdate1

--end

 

select * from [test_table] order by PrjCode

 

Regards

Justice


Unable to register Adapter with Agent - SAP Hana Data Provisioning Configuration

$
0
0

I am trying to register the Adapter but my SAP Hana instance but I keep running into that error (see screenshots):

 

"Adapter 'TwitterAdapter' could not be registered with HANA server.

Request Failed for ADMIN_REGISTER_ADAPTER Context: Execute statement create adapter "TwitterAdapter"

at location "AGENT" failed with SAP DBTech JDBC: [403]:internal error:

Cannot get adapter capabilities: exception 151040: No agent was found for adapter "AGENT"

"

 

I was trying with the TwitterAdapter but I get the same error with any of them.  The dpserver is running fine.

 

I believe there is a Adapter guide somewhere but I have not been able to find it yet.  I also saw that I may need to set up the LD_Library_Path variable but again I am lacking a bit of details.

 

Would someone be able to give me some pointers on what I may be missing?  I would really appreciate.

 

Thank you!

 

Christian

Does Analytic privilege work with OData?

$
0
0

Hana SP07

I created a simple table with couple of fields using hdbdd.

Created an Attribute view based on that table.

Added an analytic privilege that restricts rows on that table for certain values. This is a fixed filter.

Appropriate roles were assigned.

 

When I viewed data using the attribute view, the data was correctly filtered based on the analytic privilege constraints.

 

Then I exposed the view in an OData service. When I query the OData EntitySet, all the rows were returned. That is not what I expected. What did I miss?

How to calculate Surplus w.r.t the previously changed value?

$
0
0

Dear Team,

 

I have a scenario where I need to calculate the surplus/ shortage as (Surplus of previous entry - Pegging Qty of current entry). The values are already available with me. But since there is a change in one of the entries(2nd entry below) I need to re-calculate for all the following entries.

 

Recpt Qty     Pegg Qty     Surplus

1000               287               713

1000               0                    713  = Entry which is changed from 427

1000               300               700

1000               200               500

 

The result should look like this:

 

Recpt Qty     Pegg Qty     Surplus

1000               287               713    <== 1000 - 287

1000               0                    713    <== 713 - 0

1000               300               413    <== 713 - 300

1000               200               213    <== 413 - 200

 

I am using the LAG window function to get the previous value. When I come to the 4th entry the calculation goes 700 - 200 = 500, whereas it should be 413 - 200 = 213. The LAG window function will take the previous entry from the table, but I need to consider the changed previous entry.

How can I approach !!!

 

Thanks in advance.

Mayur

BAPIs and FMs were converted on layer HANA?

$
0
0

Hi Gurus,

 

The BADIs and FMs that exist in the ABAP AS, for example BAPI_PO_CREATE1, were converted to HANA?

Can we create a Purchase Order easily via non-standard program without using ABAP?

 

Thanks!

HCP : HTML5 Application SSO with SAP Cloud Identity

$
0
0

Hi,

 

In HCP, I have a HANA XS Application public.dev (https://**.hana.ondemand.com/public/dev/) containing an xsodata service (https://**.hana.ondemand.com/public/dev/services/services.xsodata).

 

In HANA XS configurations, I connected SAP Cloud identity (https://mytenant.accounts.ondemand.com/admin/) to manage users. I also configure all HCP features to be managed with the SAP Cloud Identity.

 

Now it is configured, when I want to access to my xsodata service (https://****.hana.ondemand.com/public/dev/services/services.xsodata), I have a login page from SAP Cloud Identity. (I enter an email and password of my personal SAP Cloud Identity and xsodata service is working).

 

In HCP, I want to create HTML5 Applications (FIORI). When I launch SAP Web IDE, I have also a login page from my own SAP Cloud Identity provider. Email/Password and I can access to the WebIde and develop.

 

I want to consume my xsodata service from my HTML5 application. In this service, there are some features in terms of user information. I want to create a destination for that. Back in my HCP, I choose Destinations and create one with AppToAppSSO Authentification. In my Web IDE, I can see destination, it’s trying to connect to my Hana XS Service, but it’s not working. This is the error of my HANA XS server:

 

Assertion authentication failed with reason: Unable to verify XML signature(StatusCode: , StatusMessage: )

 

This is a SAML error.

 

I tried to launch my application using destination with the Launchpad, but I have the same issue in logs.

 

The real question is: How can I consume my xsodata service (in HANA XS) from my HTML5 Application without losing user information? Knowing that all identity management is configured with SAML – my own SAP Cloud identity provider.

 

For SAML and Destinations configurations, I followed guides:

 

SAP_Cloud_Identity_Service.pdf

SAP_HANA_Administration_Guide_en.pdf

SAP_HANA_Cloud_Platform.pdf

SAP_HANA_Developer_Guide_en.pdf

 

Thank you for your help.

 

Cheers,

 

Severin

Error debugging SAP HANA Procedures

$
0
0

Hi guys,

 

I have a problem when I'm debugging any SAP HANA Procedure.   When I'm  putting the toggle breakpoint and run the local debug, then appear this error (see the attach files).

 

Any solution?? I'm really hopeless.

 

I have created the XS Project and I have debug priviliege to this procedure,

 

Thanks very much.

How to use HTTP POST Binding for SSO in XS SAML Authentication?

$
0
0

Hi,

 

I want to use HTTP POST Binding for SAML SSO in XS. Because the IDP I use only support HTTP POST Binding.

Does anyone know how to configure it in XS Admin Tool?

Seems it always use HTTP Redirect Binding, though I can set a "SingleSignOn URL (PostBinding)" in XS Admin Toll when add a new IDP.


Unable to access XS Administration Tool URL

$
0
0

Hi,

 

We have MDC for HANA.When I am trying to open XS Administration Tool i.e the URL (http://hostname-TenantDB:8000/sap/hana/xs/wdisp/admin/) itself I am getting below error.

 

403 Access denied

 

You do not have the permissions to access this resource

 

 

I checked there are some modification rule is in place.Are they responsible for this.If Yes then how to fix this?Simply commenting out the rule will resolve this?

 

 

Hostname:/usr/sap/<SID>/HDB00/hostname/tmp> more default_mod_rules_admin_ui

#These are the default modification rules used for restricting accessto the Admin UI to SingleDb and SystemDb users only!

if %{SID} != ---

RegIForbiddenUrl ^/sap/hana/xs/wdisp/admin/(.*) - [break]

Hostname:/usr/sap/<SID>/HDB00/hostname/tmp>

 

Thanks,

Mofizur

Unable to start SAP HANA Data Provisioning Agent

$
0
0

I am unable to start the SAP HANA Data Provisioning Agent. When I start the agent it gives the following error (screenshot attached):

 

"Failed to start Agent service. Return code: 5"

 

Can someone help me what might be wrong? I would really appreciate that.

 

 

Regards,

Waleed

HANA graphical calculation view cross join

$
0
0

Hi all,


I didn't found an official documentation regarding this topic so I reach out to the community. (Check it here)

 

As far as I know there are 2 possibilities:

 

First in the join node you will not specify a link between the entities and this results in a cross join.

The second one is to create constant column (with lets say value 1) on both sides and join on these columns.

 

What is the best way (considering performance, best practices and so on) of doing a cross join between 2 tables using HANA graphical calculation view?

 

Best regards,
Andrei

How to get distinct values from table in calculation view?

$
0
0

Hi ,

 

I have a scenario in which there are two tables.

1. MPM_PROD_EVENTS

2. MPM_EVENT_MAP

 

MPM_PROD_EVENTS has many events with its effective durations.

MPM_EVENT_MAP contains Parent and child Events associations.

 

Suppose In MAP table I have association as

 

Parent Event          Child Event

51                              10

51                              11

 

MPM_EVENT table has entries as:

 

Event ID          Duration

51                    100

Now my requirement is that I want only those events from EVENT table which are present as Parent_Event in MAP table.

On doing left join between Map and Event table ,

I am getting Records as :

 

Parent ID  Duration

51               100

51               100

 

But Duration of 51 is 100 only.On aggregating this , It will make duration of event 51 as 200.

 

To solve this problem I need to get distinct values of parent id from MAP tables.

 

 

Same example is there in tmp.oee.test/test_events in VS3.

 

Please check and reply.

 

Thanks and Regards,

Tarun Rawal

Binding new entities to existing entities via NavigationProperty is not supported

$
0
0

Hi all,

 

I am trying to insert multiple records using nested json request body but when I am inserting it using POSTMAN I am getting following error

 

Binding new entities to existing entities via NavigationProperty is not supported

 

Following are the artifacts that I am using to do so :

 

service url : http://server:port/logic/odata/person.xsodata/PersonBean   POST

 

request body :

 

{

    "PERS_ID": 30,

    "FIRSTNAME": "TstFNameClient",

    "LASTNAME": "TstLNameClient",

    "E_MAIL": "TstemailClient@gmail.com",

    "AddressBean": [

        {

            "ADDRESS_ID": 12,

            "ADDRESS_TEXT1": "tstadd1client",

            "ADDRESS_TEXT2": "tstadd2client",

            "CITY": "tstcityclient",

            "STATE": "tststateclient",

            "COUNTRY": "tstcountryclient",

            "ZIP": "12345",

            "PERS_ID": 30

        }

    ]

}

 

OData Service code :

 

service namespace "cust.quote.service" {

  "ZCUSTSEARCH"."TBL_PERSON"

   as "PersonBean"

   navigates ("Address" as "AddressBean");

 

  "ZCUSTSEARCH"."TBL_ADDRESS"

  as "AddressBean";

 

  association "Address" principal "PersonBean"("PERS_ID")

  multiplicity "1" dependent "AddressBean"("PERS_ID") multiplicity "*";

 

}

Viewing all 6745 articles
Browse latest View live


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