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

Re: HANA SQL Sub Query - Unique Record

$
0
0

Appreciate your feedback, I was able to resolve it using the MAX function.

Below is my query.

 

Can you suggest a good document.


it_sales_data has the sales order data. My below query works perfect.

SELECT  b.mandt,b.vbeln,b.posnr,b.etenr,b.ettyp,b.edatu,
        b.bmeng as vbep_bmeng,b.vrkme as vbep_vrkme,b.mbdat,
        b.lifsp,b.lddat
        from :it_sales_data as a
        LEFT OUTER JOIN vbep as b on  a.mandt = b.mandt and
                                      a.vbeln = b.vbeln and
                                      a.posnr = b.posnr
       where b.bmeng = (select max(BMENG) from vbep as c where b.vbeln = c.vbeln and
                                                                                                          b.posnr = c.posnr )
       order by b.vbeln,b.posnr;


Re: Extend UI of CEI - Audience Discovery and Targeting

$
0
0

I have solved the issue by using the code page "UTF-8", when the program opens a popup asking for an code page.

Re: cannot get the data provider outline

$
0
0

Hi Angad,


Do one thing for testing purpose just create sample Attribute view  run it then see  the view is activated or not  if not ur getting same error the u have to go for administrator or u have to give the analytic privileges under add ur package where ur create views


Regards

V@li

HEX String to INTEGER conversion

$
0
0

Hi,

 

I would like to convert a hex string representation to the corresponding INTEGER value.

 

I've tried:

 

select cast(hextobin('A') as int) from dummy;

which yields:

 

Could not execute 'select cast(hextobin('A') as int) from dummy' in 34 ms 902 µs .

SAP DBTech JDBC: [339]: invalid number: '0A' at function to_int()

 

I know that the next statement works, but 0xA is already binary and I guess implicite typeconversion just parses the token to integer without typecasting.

 

select cast(0xA as int) from dummy;

Any ideas?

 

Many thanks in advance,

Bodo

 

PS: The background is that I'm searching a way to hash a string value with hash_sha256 to number format (like ORA_HASH in oracle db). I've not found a way to typecast varbinary to number. Instead I try to convert to hex representation first and then convert to integer.

Re: HEX String to INTEGER conversion

$
0
0

This looks like a core HANA DB question, not Cloud Platform related => moved to HANA dev center.

Re: HEX String to INTEGER conversion

$
0
0

Yes, sorry that I failed to hit the right forum.

Passing nvarchar param values to scalar UDF from XSJS

$
0
0

Hi,

 

I've created a few scalar UDFs (User Defined Functions) in HANA repository via an XS project. They work really nice from SAP HANA Studio SQL Console, but despite many attempts I've not managed to pass nvarchar param values from XSJS. Let me show the problem on an example:

 

Capture.PNG

 

This very simplistic scalar UDF is executed without any problems and returns a result at once in SQL Console, however within XSJS I get an error:

 

Capture4.PNG

Capture3.PNG

I have tried with different users and privileges, different functions (scalar UDFs with integer parameters are working fine), .xssqlcc, but without success.

 

Thank you in advance for your help!


Regards

Michal

Re: cannot get the data provider outline

$
0
0

Hi,

 

yes i can create a attribute view and preview the data. but in analytical view don't have permissions.

 

i'm wondering in HANA cloud platform why don't have an administrative rights?  now since i'm a user how can i assign privileges which i don't have.

 

how to give permissions to my user id to have other privileges where i can create schema, create tables, load data etc.

 

in short how to assign rights for a user ( who doesn't have rights to assign) in Cloud platform.

any configuration to setup?

 

 

Regards,

-Varaprasad


Execution of hdbaddhost failed

$
0
0

Hello SAP experts,

 

I am facing and error  when I am trying to add host to single node sps7 Hana as worker from HLM tool from studio.The add Host fails..with below error.My Master node (single node) is connected via storage connector but for some reason my python script hdbaddhost failes..sudeor is also maintaid for sidadm ,sapadm user.

 

My all Hana node has separate data and Log storage and hana/shared is NFS mounted on all host

 

Could not execute 'hdbmount.py --sudoers...'

    Performing python script failed

    Starting external program /usr/bin/python

      Command line is: /usr/bin/python /hana/shared/SID/HDB/exe/python_support/hdb_ha/hdbmount.py --sudoers --configFiles=/hana/shared/SID/global/hdb/custom/config

      Output line 1: failed with: list index out of range

      Output line 2: please check loadability of your Storage Connector

      Program terminated with exit code 1

 

I maintained Below parameter as per instructions. Maintiained new client.py file per note 1880721

 

 

[communication]

listeninterface = .global

[internal_hostname_resolution]

<IP>=Host1

<IP>=Host2

 

[persistence]

basepath_datavolumes = /hana/data/SID

basepath_logvolumes = /hana/log/SID

[storage]

ha_provider = hdb_ha_fcClientLVM

partition_*_*__prtype = 5

partition_1_data__lvmname = hanadata1vg-hanadata1lv

partition_1_log__lvmname = hanalog1vg-hanalog1lv

partition_2_data__lvmname = hanadata2vg-hanadata2lv

partition_2_log__lvmname = hanalog2vg-hanalog2lv

partition_3_data__lvmname = hanalog3vg-hanalog3lv

ha_provider_path = /usr/sap/SID/HDB/exe/python_support

 

I have attached the hlm err log to this discussion.

 

Please advise to resolve this error asap

Regards

Pranav

Got confused on: HANA Studio with SAP Development Tools-, Eclipse- and SAP Software Center's - Downloads !?!?

$
0
0

Hi,

what's the best way for useing SAP HANA Studio + SAP Development Tools for Eclipse ?


HANA Studio and install new Software form https://tools.hana.ondemand.com

     or

Downloading from SAP Software Download Centers,  https://support.sap.com/swdc
and installing from local disk "
SAP BW MODELING TOOLS", "SAP ABAP IN ECLIPSE"


What's that what's in Eclipse Downloads: Kepler or Luna ?


What's that what's in SAP Software Download Centers: Kepler or Luna ?


Can You mix software from SAP Software Download Center's
("SAP BW MODELING TOOLS", "SAP ABAP IN ECLIPSE")

with Software from  https://tools.hana.ondemand.com ?


ThanXs
Martin

 

Is it possible to use ABAP dictionary type for stored procedure variable

$
0
0

Is it possible to utilize a classical ABAP dictionary object type in HANA SQL?

 

In my particular case I am working with an .hdbprocedure and would therein like to declare a table variable of a type already existing in the ABAP-dictionary.  AMDP is not suitable in my case.

 

Is that possible or do I have to also declare the table type as global table types via  CDS(.hdbdd files) for consumption within the SP?

is null

$
0
0

Hi Gurus,

 

I have some table pairs with nearly same structure like the tables below:

 

A_TABLE:

 

A_IDsomething not important
1
2
B

 

B_TABLE:

 

B_IDsomething not important
1
2

 

I would like to filter out what is in NOT in B_TABLE, and union the result with the other pairs.

 

The SQL syntax would be the following:

SELECT DISTINCT a_id, b_id

     FROM A_TABLE AS a

     LEFT OUTER JOIN B_TABLE as b

          ON a.a_id = b.b_id

          WHERE b.b_id IS NULL

(then UNION the other pairs...)

 

My problem is that when I do the join in an attribute view and I use the filter on B_ID then I get the following result

 

A_IDB_ID
1<NULL>
2<NULL>
B<NULL>

 

instead of the expected result:

 

A_IDB_ID
B<NULL>

 

Why?

I know that the above SQL could be used in a scripted view, but I would like to use attribute views and a calculation view to union the pairs....

 

THX for the help!

Re: Is it possible to use ABAP dictionary type for stored procedure variable

$
0
0

Table types in ABAP Dictionary are in Application layer. They are not database objects, hence you can not refer it in SQL Script .

Sree

Input Parameters in Scripted Calculation Views

$
0
0

Hi All!

 

Why are input parameters restricted in scripted calculation views? I mean the following:

 

1) Mandatory: They must be mandatory.

2) Single Values: No multiple values are possible.

3) Default values

 

1) and 3) are possible with graphical calculation views.

 

My major problem concerns 1): I offer several input parameters but the application does not require that all of them are always provided with input values. In the SQL script I use them in where-conditions of select statements.

 

How can I handle it best, when the value shall not be filled? I already thought about passing a default value like X, if one would like to enter nothing. Then do an if - else branch to decide whether there is an X and if yes write a select statement without that input parameter. This sounds clumsy and does not work anyway.

 

So who has an idea?

 

Thanks,

Ingo

Failure in first tutorial from developer guide, a little help for a novice?

$
0
0

In SAP HANA Developers Guide, following the first tutorial,

installed eclipse Luna, installed HANA Studio, added HANA system, added Repository Workspace,

now... FAIL wheni try to Add an Application Project.

     From the File menu in the SAP HANA studio, select NewProject.2.

     In the New Project dialog, under SAP HANA Application Development, select XS Project, and choose Next.

but there is no entry  for "XS Project".

no_XSproject.JPG

Why?  and then of course, how do i fix it, so i can create an XS project?


error when opening catalog folder

$
0
0

I'm getting an error when I try to open the Catalog folder with my Monsoon (AWS) system.  I'm able to open the catalog on other instances, i.e. my team's development instance, but this one gives error:

 

 

An exception occurred invoking extension: com.sap.ndb.studio.federation.navigator.SourcesContent for object org.eclipse.jface.viewers.TreePath@a861b532

java.lang.NoClassDefFoundError: com/sap/ndb/studio/federation/model/catalog/ISourcesFolder

  at com.sap.ndb.studio.federation.catalog.navigator.SourcesContentProvider.hasChildren(SourcesContentProvider.java:55)

  at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.hasChildren(SafeDelegateTreeContentProvider.java:110)

  at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.callNormalHasChildren(NavigatorContentServiceContentProvider.java:430)

 

 

I've seen many discussions on this, but none seem to be my problem.  any help is appreciated.

reset_by on hdbsequence artifact

$
0
0

I use sequences to generate keys for my tables.  I am trying to use the reset_by clause in my hdbsequence file. It is my understanding that if you use the reset_by clause, it will reset the sequence using the SQL embedded in the hdbsequence file when the system restarts.  In order to keep my seqeuences in line with the actual data already stored in my ID field(s), I need to make sure that the sequences do not reset to the starting point after a system restart.   It appears that I might have a syntax issue or a permission issue on my SQL used in the hdbsequece reset_by because my sequences are all reset to the start_with number on system restart. 

Here's the code for my hdbsequence file.

 

// Obs_Data_ID sequence

schema="MEDPORTAL";

start_with=200;

reset_by="SELECT IFNULL(MAX(\"ID\"), 0) + 200 FROM \"MEDPORTAL\".\"adsm.data::OBS_DATA\"";

depends_on_table="adsm.data::OBS_DATA";

If I run the clause in the SQL console (SELECT IFNULL(MAX(ID), 0) + 200 FROM "MEDPORTAL"."adsm.data::OBS_DATA";) , I get the 33,565 as the result, 

But if I run the SQL to provide the next number in the sequence (select "MEDPORTAL"."adsm.data::Obs_Data_ID".NEXTVAL from dummy;)  I get 201 as the result, indicating that the sequence has been reset to 200. 

I am running the CAL version of Rev 80 on AWS (1.00.80.00.391861 (NewDB100_REL))

Did I do something wrong in the SQL in the reset_by clause or do I need to grant schema permissions to a user other than the SYSTEM user to get this to work?

Thank you,

Jim Giffin

Transport by Sap Hana Life cycle manager

$
0
0

When i am trying to transport objects via sap hana life cycle manager

and try to create a transport route none of the delivery units is populated

from the source system . Can some please let me know if i am missing any

configuration steps .We are on version 1.00.73 .

 

 

delivery units.PNG

Re: Connecting JS and HANA Tables

Re: SQL Server and HANA - Query with parameters

$
0
0

Maybe you should ask that question in a MS SQL Server development forum.

 

Not sure that MS SQL supports parameters for views - that's rather SAP HANA specific.

Usually you would go and simply put the selection criteria in your WHERE condition.

 

What you can do however is something similar: create a user defined function that returns a table.

 

Anyhow, as said above: better ask someone who knows MS SQL Server development.

Viewing all 9165 articles
Browse latest View live


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