cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to apply filter using input Parameter

former_member213277
Active Participant
0 Kudos

Hi Experts,

I am applying filter on a column using a input parameters but facing an error as shown below

Filter condition:

if('$$In_Opr_System_Status$$' !='*',in("SYS_STATUS",'$$In_Opr_System_Status$$'), match("SYS_STATUS",'$$In_Opr_System_Status$$')  )

I want to apply filter such that, when there is no entry made to the input parameter then all the values should be fetched for the column else it should fetch only entered value. Input parameter i am using is single input and data type of column where i am applying filter is NVARCHAR

Below is the error i am getting when tried to do data preview

Error: SAP DBTech JDBC: [2048]: column store error: search table error:  [2620] executor: plan operation failed


In one of the post it was suggested to enter client number/ make it session client in the View properties but still facing same error


Please help me to fix the issue

Regards,

Nag

Accepted Solutions (1)

Accepted Solutions (1)

former_member182302
Active Contributor
0 Kudos

I assume you are applying filter in the projection node in calculation view.

You could simply use:

in("SYS_STATUS",'$$In_Opr_System_Status$$') OR match("SYS_STATUS",'$$In_Opr_System_Status$$')

Regards,

Krishna Tangudu

former_member213277
Active Participant
0 Kudos

Hi Krishna,

Thanks for you reply.

Yes I am applying filter at Projection node.

If i use the formula you mentioned ,  it will fetch all the values right? even if I enter only one value.

Regards,

Nagaraj

former_member182302
Active Contributor
0 Kudos

if you use SINGLE (Correct) Value it will take only 1 value and if you use * then it will show all values. Do check and let us know

Regards,

Krishna Tangudu

Answers (2)

Answers (2)

former_member213277
Active Participant
0 Kudos

Hi Krishna and Raj,

It worked for me. Thanks a lot for your help

What if I want to use the input parameter with Multiple Single selections ?

I tried below formula but its not working, giving me error as mentioned in my initial post

IF(Isnull(<ip>), match(<attribute>, <ip>), IN(<attribute>,<ip> )

Please suggest

Regards,

Nagaraj

aluri_hemanth
Participant
0 Kudos

Hello,

If I could understand you're question correctly on ' Multiple Single selections' . Were you expecting in Input Parameter you wanted to provide multiple single values like ( France, Germany, India) ?.

If yes, you can select the check box Multiple Entries

Thanks,

HA

former_member213277
Active Participant
0 Kudos

Hi HA,

No.. I know how to make i/p as multiple single selections

My question was how to use i/p (that has property to select multiple values) in filter expression. If i do not enter any value and do data preview, then i should be able to see all values for the column to which i applied filter

Regards,

Nagaraj

rindia
Active Contributor
0 Kudos

Hi Nagaraj,

On using default value of *, will solve your problem.

I tried in this way and worked for me (I'm using HANA SPS 09 revision 97).

I created input parameter with default constant value *

I created filter expression as

if( '$$IP_COUNTRY$$' = '*', match("COUNTRY",'$$IP_COUNTRY$$'), in("COUNTRY",'$$IP_COUNTRY$$') )

Now when you do the data preview, the input parameter has a value *, on ok will give all results.

FROM clause generated would be:

FROM "_SYS_BIC"."demo/CA_MATCH" ('PLACEHOLDER' = ('$$IP_COUNTRY$$', '*'))

If I remove * and proceed will give all results.

FROM clause generated would be:

FROM "_SYS_BIC"."demo/CA_MATCH"

If I enter particular country, say 'France', will getting filtered as required.

FROM clause generated would be:

FROM "_SYS_BIC"."demo/CA_MATCH" ('PLACEHOLDER' = ('$$IP_COUNTRY$$', 'France'))

Regards

Raj