cancel
Showing results for 
Search instead for 
Did you mean: 

How to bring all records when Input Parameter is Blank.

former_member184624
Participant
0 Kudos
1,313

Dear HANA Experts,

I am using the input parameter in my calculation view. My requirement is, if we pass blank value to input parameter, the system is bringing zero records. I want to show all records, when the input parameter field is Blank. To achieve this, i tried the below filter expression in projection. It is working as expected. But it takes 10 minutes to bring less records.

Step 1 : I have created the input parameter (IP_DIST_CHAN) with constant and given the VALUE as BLANK.

Step 2 : Written the below if condition in Filter of the projection.

if('$$IP_DIST_CHAN$$' = '',match("0DISTR_CHAN",'*'),match("0DISTR_CHAN",'$$IP_DIST_CHAN$$'))

Please suggest, how to achieve this in different way to improve the performance.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

venkateswaran_k
Active Contributor
0 Kudos

You can use LIKE Operator Instead of = in your where clause.

Then always contatenate your input parameter with wild card * or %

Regards,

Venkat

former_member184624
Participant
0 Kudos

Thank you for the quick reply. Can you please share the expression.

Thanks.

venkateswaran_k
Active Contributor
0 Kudos

I do not have system now.

In the projection screen , In the filed expression editor

you use "0DISTR_CHAN",'$$IP_DIST_CHAN$$'+'*'

Filter screen, use Operator as LIKE instead of equal.

So effectively as

('PLACEHOLDER' LIKE ('$$ IP_DIST_CHAN$$' $$'*)

Just as below example

former_member184624
Participant
0 Kudos

Hi Venkat,

The solution you provided is not working as expected. $$IP_1$$ = *. By this statement, Hana is not picking all records.

Thanks.

venkateswaran_k
Active Contributor
0 Kudos

you should use LIKE operator, not =

former_member184624
Participant
0 Kudos

Thank venkat.

I have used the below expression in the filter of the projection. It is working fine as expected.

(match("0DISTR_CHAN",'$$IP_DIST_CHAN$$') OR in("0DISTR_CHAN",'$$IP_DIST_CHAN$$'))

Thanks.

Answers (0)