on 12-09-2011 12:05 AM
As our HANA has been upgraded to SPS03 (SP21), I didn't hesitate to try user input variables. So I have created a variable V_CM in my Analytical View for, say, CALMONTH attribute, of the same data type as CALMONTH (varchar 6). Then I created a Calculated Measure (e.g. "CM1") with the formula logic to return 1 for CALMONTH variable equal to, say, '201112', and 0 otherwise.
What I noticed is that running a SQL query in the SQL Editor for that Analytical View didn't render a variable value entry popup, and CM1 was always 0. The same result I've got when running Analysis for Excel on top of that View.
I only got that variable value entry popup when running Data Preview function on my Analytical View in Studio -- but that has no practical use. When running Data Preview, I noticed that the generated SQL statement contained stuff like " ('PLACEHOLDER' = ('$$V_CM$$', '201102'))" -- is it how variables should be used in a SQL Editor to simulate the variable entry? How about Analysis for Excel and other user frontend tools?
Or is this functionality in the very early stage and should not be used yet? Any comment?
Thanks!
The current version of HANA does provide variable functionality however none of the reporting tools recogonizes HANA variables currently. Recoginition of HANA variable is definitely in the development pipeline and would be available soon however not have info on exact time-line.
My understanding based on discussion is BW on HANA has to play key role why variables are available in the current version of HANA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I noticed that the generated SQL statement contained stuff like " ('PLACEHOLDER' = ('$$V_CM$$', '201102'))" -- is it how variables should be used in a SQL Editor to simulate the variable entry?
Yes.. you can find more information in SAP HANA Database - SQL Script Guide
page 16 - chapter CREATE PROCEDURE
https://service.sap.com/~sapidb/011000358700000604932011
Normally, procedures can only be executed via the call statement. By using WITH RESULT VIEW it is possible to query the result of a procedure as part of a SQL statement. Please notice that no variable references are supported in the WITH PARAMETERS clause and that all constants are passed as string constants (i.e. enclosed in single quotes). Also, parameter names are lower case independent from the original capitalization in the procedure signature.
Example:
SELECT * FROM ProcView WITH PARAMETERS ('placeholder' = ('$$id$$', '5'))
Procedures are sharing same "roots" as Calculation views...
Tomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.