on 11-25-2019 8:22 AM
Hello All,
Hope you are doing good!
I am trying , to pass filter parameters with "or" operation, in odata call to fetch records for a read querry.
PFB read url/querry:
TruckloadOptimizationStatusSet?$filter=(IMaterial eq '149D7B' or IMaterial eq '216F90') and (IQuantity eq 0 or IQuantity eq 0) and (IPlant eq '3601' or IPlant eq '') and (IShipTo eq '12057502' and ITrasGroup eq '0002').
From ui side, the materials and quantities are to be passed, after clicking on "Add to Cart" button as per attached screenshot:
Can anyone please help me, on how to pass the filter parameters, for read operation, especially the IMaterial and IQuantity, from ui/frontend?
BR,
Sushant
Hi Sushant, how to cretate a combinded and / or filter is explanined in https://sapui5.hana.ondemand.com/sdk/#/api/sap.ui.model.Filter%23constructor
Example: Combining a list of filters either with AND or OR
new Filter({
filters: [
...
new Filter({
path: 'Quantity',
operator: FilterOperator.LT,
value1: 20
}),
new Filter({
path: 'Price',
operator: FilterOperator.GT,
value1: 14.0
})
...
],
and: true
})
Try to get the where clause in the DPC_EXT Class with the input parameter IO_TECH_REQUEST_CONTEXT
IO_TECH_REQUEST_CONTEXT->GET_OSQL_WHERE_CLAUSE_CONVERT ( )
Best Regards
Thorsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
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.