on 11-30-2015 10:23 PM
Hello gurus
i have created a Calc view with graphical approach AND JSON links which works perfectly.
i am trying to add input parameters on Plant and want to pass multiple values through Odata link but its not working.
I have created Input parameter Plant and have linked Plant from view using "Column" and made it mandatory.
If i execute the JSON link it still brings all the values
do i need to tie the Input parameter to any calculated column or something to make it work ?
here is the syntax i try to pass in odata link-
InputParams%28PLANT=%27AZ01%27%29/Results?$format=json
kartik,
yes you need to add the filter into the columns.. when you have a node, click on the filter, then provide your formula whether it is for one value or multiple.
COLUMN=IN_FILETER or
in(COLUMN, values_comma_separated)
this would do the filtering on your column and the input values provided.
here is a link how to pass the input values from sql for your test
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
so the only way i can add FILTER is at PROJECTION level only.
i added the filter and expression like below and it works correctly for 1 value.
question is if i have to pass multiple values or all values what wwould be the syntax in odata link ?
working link---InputParams(PLANT='AZ01')/Results?$format=json
i have tried below and that doesnt work-
InputParams(PLANT2='AZ01','US01')/Results?$format=json
Kartik,
the values in the input parameter must be comma separated and must have double single quotes in order to work - check out the link I provided. here it is again: http://scn.sap.com/thread/3818350
Filters expression is as below-
in("PLANT2",'$$PLANT$$') or match ("PLANT2",'*$$PLANT$$*')
it brings all values for US01,US02,US03,US04 if i use syntax - (PLANT='US0*'')/Results?$format=json
if i use -(PLANT='US01'',''US03')/Results?$format=json
it brings both US01 & US03
if i use -(PLANT='US01'',''US02')/Results?$format=json
it brings both US01 & US02
so the only time i try to enter more than 2 values it doesnt work-
InputParams(PLANT='US01'',''US02","US03')/Results?$format=json
Hi Sergio,
what version of HANA are you on?
if i remove the or match ("PLANT2",'*$$PLANT$$*')
i loose the functionality of searching on "*"
i can still search for 2 values but more than 2 values it just doesnt bring data.
also looks like the exercise you have tried in the link above is more on SQL side of HANA Modeller right?
or were u trying in an ODATA link?
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.