Skip to Content
0
Jul 05, 2016 at 05:37 PM

XS OData on Calc view with wild card Input Params

247 Views

Hi Experts,

I am trying out a scenario with XS OData where I want to pass optional / wild card Input parameters.

Sample scenario: Calculation view Outputs an Aggregate of Sales Amount per 'Business Partner ID' and 'Billing Status'. Created a Calculation view with two input parameters (BILL_STATUS and PARTNER_ID) both Optional. These parameters are used in an expression at the Projection level with a match condition.

Data preview of Calculation view works fine, when either of the Parameters are entered as '*'. Infact both input parameters have default value as '*' in the Parameter Definition.

Next, this Calculation view was exposed as an OData service. The service metadata is as shown below:

My intension was to pass wildcard (to begin with *) for either or both of these parameters (as it works in the data preview). However the OData is not allowing passing '*' for any of the input parameters.

The following call returns results:

...serviceName.xsodata/InputParams(BILL_STATUS='I',PARTNER_ID='0100000000')/Results

However a call with wildcard for input parameters does not return any records; URL like:

...serviceName.xsodata/InputParams(BILL_STATUS='*',PARTNER_ID='0100000000')/Results

I even tried escape character for wildcard like '\\*' or '\*'. none of these worked.

My question is:

  1. Is wild card characters not allowed in XS OData as Input parameters?
  2. Since the parameters are optional with default value. Is there a way to skip passing them /one of them. I could not get the service working without passing both the parameters.

Thanks,

Avishek.

Attachments

Expression1.png (17.4 kB)
metadata.png (176.1 kB)