cancel
Showing results for 
Search instead for 
Did you mean: 

SBO HANA Query with user Parameters

josh12b
Explorer
0 Kudos

Hi all,

I'm quite lost here. I'm currently in the process of migrating a customers system from SQL to HANA. Previously we've had little issues with it. But now I try to convert the user Queries to be HANA compatible and it just won't work.

I have the following Query:

SELECT T0."DocNum",

T0."DocEntry",

T0."DocTotal" - T0."VatSum" - T0."TotalExpns" AS "Beleg gesamt",

(SELECT SUM(T2."GPTtlBasPr")

FROM OINV T1

INNER JOIN INV1 T2

ON T1."DocEntry" = T2."DocEntry"

AND T2."DocEntry" = T0."DocEntry") AS "Wareneinstand",

T0."GrosProfit"

FROM OINV T0

WHERE T0."DocDate" >= [%0]

AND T0."DocDate" <= [%1] and T0."CANCELED" = 'N'


When trying to execute this I get a Syntax error with no specific pointing in what is wrong. When I replace the user paramters [%0] and [%1] with just two single quotes ' ' the query works. How do I use the user parameters in SBO Query Manager?
I've tried the following formats:

[%0]

'[%0]'

"[%0]"

When I use the generator to generate a very simple query by clicking and selecting the paramter via the menu it works. But not this Query.

Any help is greatly appreciated!

cheers,
Josh

Accepted Solutions (0)

Answers (1)

Answers (1)

mgregur
Active Contributor
0 Kudos

Hi,

this works fine for me on HANA as long as I give it some dates. Do you input both parameters or do you keep one blank?

BR,

Matija

josh12b
Explorer
0 Kudos

Hi Matija,

thanks for your reply! The Problem I'm facing is that I am not even able to enter a date. That means that I won't even get this little pop-up window to enter the dates. When I try to execute this Query it gives me a Syntax violation error. If it works for you I guess I'll have to open a support ticket 😕

mgregur
Active Contributor
0 Kudos

Hi Josh,

I would try as a last resort to save the query without running it, and then try to run it through the Query Manager or the Menu. If it works, it could simply be a bug. What version are you using? I tested on 10 FP2111.

BR,

Matija