cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic filter in scripted CV HANA

former_member182537
Active Participant
0 Kudos

How to get this working using APPLY_FILTER...

[‎********* Begin Procedure Script ************/ BEGIN DATA_SET=APPLY_FILTER("_SYS_BIC"."XA_UTC.XXX/CA_ABC_CUBE_T_EXPOSURE", :FILTER_EXP) ; var_out = SELECT XC_ABC_KONZXXX,RANK FROM (select CC_ABC_KONZS,C_FTGGF, RANK() over (order by CM_ABC_EXPOSURE_TXN_AMOUNT DESC) AS RANK FROM "_SYS_BIC"."XA_CTC.XXXT/VVV" --WHERE CC_ABC_RECORD_TYPE_CODE='Q' --AND "CC_ABC_CALQUARTER_YYYYxQ"='2016Q4' --AND LAND1_1='AU' --AND CC_ABC_PR_ID='Aluminium' ) WHERE RANK<=10;

END /********* End Procedure Script ************/

we want the highlighted part to be passed through input parameter and we need to run the inner SELECT(with rank()) on top of apply_filter result set.

lbreddemann
Active Contributor
0 Kudos

There's no highlighting in your question, so I've no idea, what you are asking.

Also, please be more specific about your problem. Do you get error messages or wrong results or what?

Your table variable DATA_SET doesn't seem to be used anywhere - what is it for in your code?

Accepted Solutions (0)

Answers (0)