1,960 questions
0
votes
0
answers
45
views
How to split one row with column = "A, B" into two rows with "A" and "B"
I have a table where the values are written this way in one single row:
A, B
I want "A, B" to be split into two different rows, along with the other fields of the table.
For example:
I need ...
-1
votes
1
answer
157
views
How to update from a temporary table? FROM clause not working
I'm trying to update table1.logged_off (a LONGDATE column) using data from a local temporary table with matching IDs. Here's what I have so far:
Here's what I'm doing:
Step 1: Create and fill the ...
0
votes
0
answers
68
views
How to update HANA Cloud DB table across schemas in SAP BTP HDI container (insufficient privilege + grantor/grantee identical error)?
I want to update data in ITOP_SCHEMA_1_1.GENERAL_INFO(HDI container schema) using data from cockpit database DBADMIN.GENERAL_INFO. Specifically, I want to update HIGHEST_TIME_CONTRIBUTOR field in ...
0
votes
0
answers
96
views
SAP HANA statement_memory_limit_threshold revoked by ECS standards Aug 8th 2022
In SAP HANA, We wanted to increase the statement_memory_limit_threshold parameter to 50% of the Global Allocation Limit (GAL) as recommended here https://www.linkedin.com/pulse/quick-tip-sap-s4hana-...
0
votes
0
answers
89
views
SAP HANA performance degradation with increasing background ABAP jobs (CPU and memory not saturated)
We are running SAP HANA (version 81) on IBM POWER9.
I have a simple ABAP program that runs as a background job. It receives random MATNR keys and performs SELECTs using these keys. There can be more ...
0
votes
1
answer
111
views
SAP HANA: How to create a data base at a specific location?
I'm trying to create a HANA database at a specific location (mounted drive). Using hddsql I can create/insert/modify. However controlling the location where I want this database to be created is the ...
0
votes
0
answers
45
views
How can we use a subquery in Hibernate filter for SAP HANA Table
I am implementing Instance based authorisation. And for that, I need to add entityfilter to my JPA model:
@Filter(name = "entityFilter", condition = "\"TablePrimaryKey\" in (:...
0
votes
1
answer
166
views
SAP HANA drivers Sap.Data.Hana.Net.v8.0 failed to load when publishing program in single file mode on a C# .NET 8 project
I use the latest drivers Sap.Data.Hana.Net.v8.0.dll I found as an external assembly to connect to SAP HANA database in a C# .NET 8 CLI program.
I have the following error when running my program if I ...
0
votes
1
answer
69
views
SAP HANA Node.js client - How to authenticate using SAML?
I want to connect to a Hana DB with the Hana Node.js Client using SAML to authenticate. The app will be hosted on Azure, outside any Hana server, e.g. XS Classic App server, Hana Cloud, etc...
How can ...
0
votes
1
answer
72
views
SAP HANA SQL can't reference column from outer table inside open_json function
I can't find any information if I can reference outside table column while trying to convert JSON data in a table format.
An example:
-- create temp table for data
create local temporary table #test(&...
0
votes
0
answers
228
views
ERROR [S1000] [SAP AG][LIBODBCHDB32 DLL][HDBODBC32] General error;613 execution aborted by timeout
I'm running a complex query that returns millions of records from a SAP HANA DB and I get:
ERROR [S1000] [SAP AG][LIBODBCHDB32 DLL][HDBODBC32] General error;613 execution aborted by timeout
I know ...
2
votes
1
answer
87
views
Transpose all dates in column for a month or year to row
I am trying to pivot the DATE( over a month to year) in the below sample table
DATE
WEEK
BRAND
VALUE
2024-04-01
Monday
abc
100
2024-04-02
Tuesday
abc
200
2024-04-03
Wednesday
abc
300
2024-04-04
...
0
votes
0
answers
54
views
hana sql,transpose column date value to row
I have a table as below and date value are over the year.
DATE
WEEK
BRAND
VALUE
2024-04-01
Monday
abc
100
2024-04-02
Tuesday
abc
200
2024-04-03
Wednesday
abc
300
2024-04-04
Thursday
abc
800
2024-04-01
...
0
votes
0
answers
47
views
hana database: Not null fields are retrieved as null
I use php to connect to it. The sql query: "SELECT * FROM "AE"."vw2k_DetFactura limit 2". The problem, just a few fields are correctly retrieved, while the others are null. ...
0
votes
0
answers
188
views
When running a planning sequence with an AMDP function inside, a dump occurs
I wrote a test class and tried to run it from RSPLAN.
I created a planning function in RSPLF1 with these settings:
"without blocks"
"process empty records"
I enter the planning ...
0
votes
0
answers
64
views
Update the column joining 2 tables [duplicate]
I have 2 tables, Table 1 is a master which has code and respective plants. Table 2 has some data where I have the same code in Master(table 1) and I have to update the plant column in Table 2 as like ...
1
vote
2
answers
713
views
Elusive Error "JDBC: [339]: invalid number: SQL error" in HANA SQL
My goal is selecting values using a WHERE clause on HANA SQL.
My_Table contains a column PartnerID of type NVARCHAR that stores an integer number.
The following works fine:
SELECT * FROM "...
0
votes
2
answers
388
views
AMDP Unable to use UNION ALL with local tables - sql syntax error: incorrect syntax near "UNION
I have a requirement to create a table for 2 columns: first date of the month and the last day of the respective month. The last day calculation works correctly but I am not able to merge the results ...
1
vote
0
answers
36
views
PDO_ODBC not returing same data as odbc_* functions
I'm not able to return same data with PDO functions and with ODBC_* functions. With the same driver.
The database is SAP HANA.
Code:
$driver = 'HDBODBC';
$host = "XX.XX.XX.XX:...
0
votes
1
answer
76
views
Performance implications of INSERT INTO...SELECT :NEW.FIELD FROM DUMMY
Let's say we have a table BASE in a HANA:
CREATE COLUMN TABLE BASE
("CLIENT" NVARCHAR(3) DEFAULT '000' NOT NULL ,
"KEY" DECIMAL(21,7) CS_FIXED DEFAULT 0 NOT NULL ,
"...
0
votes
0
answers
85
views
Requests per second(RPS) not going above certain number with Hana database and Locust
I wanted to perform some load testing on Hana database. For this I decided to use Locust and I referenced the implementation given in this link for another database:
https://community.cratedb.com/t/...
0
votes
1
answer
56
views
Update Set for a column
This is a sample table and I would like to update the column 'TYPE' as like the value which is there 'STOCKIN' /'STOCKOUT' for the particular DOCNUM in each row.
Sample Table
CODE
DOCNUM
TYPE
Z01
...
1
vote
1
answer
211
views
ABAP select with primary key in HANA applying condition to whole primary key
Is there a way to implement a full primary key select? I will explain it in more detail in the following lines.
I have to process all records of a table in sequence, using cursors, if the process ends ...
0
votes
1
answer
73
views
Query - Same Tables Twice
This is from SAP Business One - Hana database but the concept is the same for SQL.
I have a query that lists all of the invoices and payments in the system.
SELECT T2."TotalExpns" AS "...
1
vote
1
answer
55
views
Connect to a Hana database through a jar file from a php script
I'm having some issues to use the jar file ngdbc.jar. First of all, I need to do queries to a Hana database often, but since I'm developing with PHP and not able to get the proper drivers for it, I ...
0
votes
1
answer
68
views
HANA SQL CHAR25 with value 1/19/2017 2:28 PM ( example ) to DATE
I have a table ZCRM_DATA
Column - MODIFIED_DATE . Type - CHAR25
Values in column MODIFIED_DATE =
1/19/2017 2:28 PM
11/16/2018 2:44 PM
3/22/2019 12:52 PM
While selecting using data from this table how ...
0
votes
1
answer
202
views
Can we connect Views in SAP HANA to Tableau Desktop?
Ok, so I think this is a simple question, but I would like to know that if I create some views in SAP HANA using SQL, and want to connect with Tableau, will those views be available, or does Tableau ...
-2
votes
1
answer
51
views
Database schemas export issue
We are currently using an Azure Marketplace image for our SAP HANA Express instance for development purposes. I need to migrate the database schemas from one Azure account to another, but I'm facing ...
0
votes
0
answers
158
views
EXPORT INTO raising syntax errors in AMDP procedure
I am trying to upload the data from SAP tables to GCS Storage bucket and followed the documentation provided in EXPORT INTO Statement (Data Import Export), however when I try to implement the same in ...
0
votes
1
answer
74
views
How to store "export into" command in stored procedure
I am working on SAP HANA BTP Cockpit. I created 1 instance and enter in database explorer. There I created 1 table and transfer that table to AWS S3 bucket using this command:
Export into '<s3-...
0
votes
0
answers
304
views
issues with [%0] in SAP B1 Hana Query
I used [%0] to call a selection criteria on SAP B1 that looks like this:
The query looks like this:
SELECT
'Handshake' AS "Link"
FROM OITM T0
WHERE T0."ItmsGrpCod&...
1
vote
1
answer
94
views
How to prompt query selection criteria with just Year
I'm trying to get just the year in the following table with timestamps. Which is usually possible using Year(), but somehow I can't get it to work on query selection criteria thing:
I tried to cast ...
0
votes
1
answer
451
views
Issues connecting to SAP Hana Cloud DB for Vector embeddings
I've been following a blog on RAG with SAP HANA Cloud Vector Engine, GenAI Hub & CAP, pulled the Git Rep and following the instructions in the README.
The AI-Core part works fine and is connecting ...
0
votes
1
answer
860
views
How to set limit connections per user in SAP HANA?
The task is to write a request that will receive the number of connections for the current user. As well as a request that will set a different value for the database SAP HANA.
I did not find anything ...
0
votes
1
answer
245
views
SAP HANA native procedural SQL, create function within a function doesn't work
I would like to create a function within a function in native SAP HANA SQL
CREATE or REPLACE FUNCTION my_func (pi_param VARCHAR(1))
RETURNS v_return varchar(10) AS
BEGIN
DECLARE ....;
DECLARE ....;...
0
votes
2
answers
90
views
SQL Data Group and Formating
I have a table like the one on the left. I want to transform this table into the one on the right. Is it possible with SQL? If so, how can I do it?
First cvn = Lowest score for
Last cvn = Highest ...
2
votes
0
answers
164
views
temp index create error when running HANA subquery?
I wrote an AMDP method, and when I run the method, I get the following DUMP.
Error while executing a database procedure
During execution of database procedure
ZCL_MM_REPORTE_INV_AMDP=\>...
1
vote
1
answer
78
views
Making totals from two queries?
I am trying to calculate the space in a warehouse bin location.
I have the following data:
Table 1
Bin Location Item Quantity Total Spots Used
000-A-006 ABC1 100 2
...
0
votes
1
answer
77
views
How to build WHERE condition based on a calculated field?
I have this query that pulls data from the inventory bin location and a user defined field that shows the max number of pallets per warehouse.
My data:
Bin Code Max Pallets Total Pallets ...
2
votes
0
answers
241
views
Extract BW/4HANA using Python vs exporting data directly
I am trying to explore the option of exporting data from BW/4HANA to AWS S3 in flat file format.
I have two options
Open Hub
Use Python
I checked with SAP BW consultant in my company. He said I can'...
0
votes
1
answer
240
views
dynamic conversion of Decimal(38,18)data type that converts from default decimal datatype in ADF
ADF copy activity by default converts decimal datatype to decimal(38,18) , how can I overcome it to use original datatype decimal as source for multiple tables dynamically with different schemas for ...
1
vote
1
answer
603
views
Fetch multiple SAP Tables to Azure Data Factory?
I am trying to connect multiple SAP tables in ADF. I have a SAP table connector with dataset but I am not able to connect multiple tables with this. It is working for a single table without any error. ...
0
votes
1
answer
97
views
M Code of UTF-32 Encoded Emoji in Power Query is not processed by SAP HANA
I wrote this M code in Power Query to create a column whose cells contain this emoji 🚢:
#"Added Column" = Table.AddColumn(#"PreviousStep", "Column Name", each Character....
0
votes
1
answer
63
views
SQL Cursor multiply two sets of lines
I am using Hana data studio (SQL) and need to write a cursor that takes the original dataset, makes column age set to 0 and sets the the fiscal quarter to the iterated value over a distinct list of ...
0
votes
1
answer
80
views
HANA returns Formatted Values through hdbcli
HANA Studio has a default format option (Preferences>Runtime>Result>'Format Values').
Ex:
A View Column of Decimal(13,3) outputs 30 in Data Preview with 'Format Values' setting, and 30.000 ...
0
votes
1
answer
277
views
Not getting all the distinct values into the FOR Loop?
I am trying to fetch Distinct values into the For loop in SAP HANA using CURSOR and For Loop and I am not getting all the distinct values into the For Loop. Instead of getting 10 distinct names, I am ...
0
votes
1
answer
70
views
Hana SQL , Is there a way to use mapping/setup table of constants?
Is there a way use mapping table instead of hardcoding of values and their replacements?
mapping table
value
replacement
N
Module Not turned In
PC
Pending Corrections
LT_REVIEW_STATUS = SELECT ...
0
votes
1
answer
2k
views
Is there any currency conversion function in GCP Bigquery?
I'm trying to migrate a procedure from SAP HANA to GCP bigquery.
The procedure in HANA uses a native function - CONVERT_CURRENCY in HANA which allows me to provide a historical date and it gives me ...
0
votes
1
answer
792
views
SAP HANA, query to check the size of the FullBackup as displayed in the HANA Studio backup catalog
I need help in creating an SQL query that can retrieve the size occupied by the latest FullBackup in HANA Studio. I haven't been able to find this SQL query in any forum or SAP note. Any ideas on how ...
0
votes
0
answers
766
views
Why can't I connect to the Hana database through Python but can through Hana Studio?
I have the following setup in Hana Studio and the connection works:
As you can see I selected "Multiple containers" and "Tenant database".
My python code is:
from hdbcli import ...