cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Passing Multiple Values in Input Parameters

Former Member
0 Likes
2,321

Hi,

I have created a graphical calculation view say 'A' with VAR_CUSTOMER_NAME (on column CUSTOMER_NAME).

Here IP - Input Parameter and VAR - Variable.

I have created another scripted calculation view say 'B' with IP_CUSTOMER_NAME.

I have used this calculation view 'A' in 'B' in the following way

var_out =  select COMPANY_NAME from A

                 where CUSTOMER_NAME in (:IP_CUSTOMER_NAME)

Requirement:

I need to pass multiple values to the IP_CUSTOMER_NAME in B and hence the values are filtered accordingly in A.

Note: I have made IP_CUSTOMER_NAME and VAR_CUSTOMER_NAME as a single value with multiple entries.

I tried the following, but it didn't work.

SELECT COMPANY_NAME

FROM B

('PLACEHOLDER' = ('$$IP_CUSTOMER_NAME$$', 'Adam","Ian'))


and


SELECT COMPANY_NAME

FROM B

('PLACEHOLDER' = ('$$IP_CUSTOMER_NAME$$', 'Adam','Ian'))


Kindly some one help me with the same.


Regards,

Monissha


Accepted Solutions (0)

Answers (3)

Answers (3)

pradeep_gupta1
Active Participant
0 Likes

SELECT COMPANY_NAME

FROM B

(     PLACEHOLDER."$$IP_CUSTOMER_NAME$$" => 'Adam' ',' 'Ian'     );

Former Member
0 Likes

Hi Monissha,

         this will work for you

SELECT COMPANY_NAME

FROM B

(

   'PLACEHOLDER' = ('$$IP_CUSTOMER_NAME$$', 'Adam',),

   'PLACEHOLDER' = ('$$IP_CUSTOMER_NAME$$', 'Ian')

);



All the Best

Nagababu Tubati

pfefferf
Active Contributor
0 Likes

Hello Monissha,

string based values have to be passed like following.

SELECT COMPANY_NAME

FROM B

('PLACEHOLDER' = ('$$IP_CUSTOMER_NAME$$', '''Adam'',''Ian'''))

I assume that your are on a HANA system >= SPS09 and that you use the parameter within your expression with the "in" function.

Best Regards,

Florian

Former Member
0 Likes

Hi Florian,

I tried the above syntax too. It ddint work.

Can you please tell me syntax using 'IN' ?

Thanks

Monissha

pfefferf
Active Contributor
0 Likes

In your filter expression you have to write:

in("<your attribute to be filtered", $$IP_CUSTOMER_NAME$$)

former_member182114
Active Contributor
0 Likes

Just complementing

There's another option possible that work in same way:

('PLACEHOLDER' = ('$$IP_CUSTOMER_NAME$$', 'Adam'',''Ian')) 


and

in("<your attribute to be filtered", '$$IP_CUSTOMER_NAME$$')


The difference is from first '' and last '', so if you don't have multi parameters you can pass like this:

('PLACEHOLDER' = ('$$IP_CUSTOMER_NAME$$', 'Adam')) 


Regards, Fernando Da Rós