Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3363

XS OData on Calc view with wild card Input Params

$
0
0

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.

 

Expression1.png

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:

metadata.png

 

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.


Viewing all articles
Browse latest Browse all 3363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>