Skip to Content
author's profile photo Former Member
Former Member

How to pass multiple values in input parameter in calculation views

Hi,

I have created a calculation view and need to pass multiple values in its input parameter. Calculation view syntax is:

select * from "_SYS_BIC"."fingerprint/GET_CREATIVE_DATA"('PLACEHOLDER' = ('$$PARAM1$$', 'value1,value2'));

The value1 and value2 are strings and i need to search in my query using IN example:

select * from tablename where column IN('value1','value2');

I tried the following way but it did not work:

select * from "_SYS_BIC"."fingerprint/GET_CREATIVE_DATA"(PLACEHOLDER' = ('$$PARAM1$$,'''201202'', ''201203''') ;

Any suggestions?

Thanks

Unnati

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jan 02, 2014 at 10:32 AM

    Hi Unnati,

    Change it as

    PLACEHOLDER' = ('$$PARAM1$$,'201202'', ''201203') ;

    If Select * wont work then select some columns.

    Below is the example:

    Regards

    Raj


    Multiple_IP.jpg (44.9 kB)
    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Unnati,

      You can use CE_Projection and pass multiple parameters

      but as mentioned by you if you are using SQL based approach, you have to do the following:

      1) You need to split the values received in the input parameters and use it. For this you may need to use Procedure as mentioned in the below document.

      SAP HANA: Handling Dynamic Select Column List and Multiple values in input parameter

      2) We can use "Locate" in the select query in the SQL Script inside view:

      select region_cd from "TABLE"

      where locate(:Region,REGION_CD)>0;

      GROUP BY region_cd

      In the above statement instead of 'APAC,AMR' you can your input parameter now and pass the value in the input parameter as shown below:

      SELECT * FROM VIEW ('PLACEHOLDER' = ('$$Region$$', 'AMR'',''APAC')) ;

      Above one might give you some performance implications as "locate" will not actually pushdown the filter logic, Which we actually want.

      3) Based on your reporting tool if it is HTML5 or BO, we can further discuss on how to handle the input parameter from the front end.

      Regards,

      Krishna Tangudu

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.