Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

SQL Script Calculation View: in CE_PROJECTION use locally declared variable as a filter

$
0
0

Hello,

I have the following code that is currently working:


BEGIN
DECLARE LV_TABLE NVARCHAR(4) := 'MAKT';
....
p_r1_rules = CE_PROJECTION (:t_rules,
["RULE_ID","TABLE_NAME","FIELD_TECH_NAME","MATERIAL_TYPE",
"RULE_SHORT_TEXT","RULE_LONG_TEXT","RULE_DIMENSION",
"FIELD_DESCRIPTION",
CE_CALC(' '':LV_TABLE'' ',NVARCHAR(4)) AS "ANALYSIS_TABLE"],
'"TABLE_NAME" = "ANALYSIS_TABLE" AND
  "FIELD_TECH_NAME" = ''MAKTG'' AND
  "RULE_SHORT_TEXT" = ''Mandatory''');


Is there a way to filter "TABLE_NAME" using LV_TABLE variable directly instead of having to create "ANALYSIS_TABLE" calculated column and filtering on it?

 

Something like:

 

'"TABLE_NAME" = LV_TABLE AND
  "FIELD_TECH_NAME" = ''MAKTG'' AND
  "RULE_SHORT_TEXT" = ''Mandatory'''


Thank you,
Victoria


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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