cancel
Showing results for 
Search instead for 
Did you mean: 

Calculation view with multiple values on input parameter

SergioG_TX
Active Contributor
0 Kudos

Gurus,

i have a calculation view (exposed via odata) with one input parameter and receiving one value which is working fine.

Now, I have another requirement on which I need to pass multiple values to the input parameter, similarly to an IN clause in SQL.

without the input parameter I am able to query based on Odata syntax. my question is.. .can this be accomplished via input parameter on the view?

thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

SergioG_TX
Active Contributor
0 Kudos

if this helps at all, i am following section 5.3.3. of the developer guide but it doesnt seem to be working.

Former Member
0 Kudos

odata :

"air.sap.human.datamodels::ZHR_LEAVE" as "HRLeaves"

     keys ("SAPClient","PersonnelNumber","BeginDate", "EndDate")

     aggregates always

     parameters via key and entity "HRLeaves";

Input parameters in the information model

using the below code we can call the above odata:

hana.air.com:8000/air/sap/hr/odata/HR.xsodata/HRLeavesP_SAPClient='001',P_KeyDate='20150721',P_UserID='abcd')/Results?$format=json

SergioG_TX
Active Contributor
0 Kudos

I am aware that I can use multiple input params... my question was .. can i pass multiple values to one input parameter. and how

gowrisankar_m2
Contributor
0 Kudos

Hello,

Please refer below thread, it is already blogged,

http://scn.sap.com/community/hana-in-memory/blog/2013/12/30/using-multiple-values-in-input-parameter...

BR,Gowrisankar

Answers (2)

Answers (2)

prafful_agrawal
Explorer
0 Kudos

Hi Sergio,

Mutiple value can be passed to a single IP by following mentiond steps .

1. Create new parameter table in HANA & maintained muliple values in the table  by asssigning Unique key values as per user requirement like

Field Name                                         VALUE               Unique_key

Document  Status                                  error                       1

Document  Status                                    ok                         1

Document  Status                               In Process                 1

Document  Status                                    ok                         2

2. Link this table in Information model in HANA by Inner join .(Parameter.value join with Transactional Table.Document Status)

3. Create & Apply IP on Unique_Key.

Now the user needs to pass the 1 or 2 in IP then it will get mutiple values in Output (1--> error,ok,in process ....etc)

Let me know if you need any further any help

Regards

PA

Former Member
0 Kudos

Gentle Man Thanks for your inputs, I guess asking about the consumption of multiple parameter values in the model which is used for UI level via ODATA..

What ever the content you are helping him with is an option that is available at the tool level and I guess he aware this option.

Please excuse me if my understanding is wrong....

prafful_agrawal
Explorer
0 Kudos

Hi Sharath,

I understand his concern but don't you think that by following the mentioned steps he can achieve the same functionality .

As we are aware that HANA dosen;t support mutiple IP's .

Lets wait & see his response.

Regars

PA

Former Member
0 Kudos

yes we can do this with input parameters...