cancel
Showing results for 
Search instead for 
Did you mean: 

How to Add a Filter in SAP Cloud RESTful Application Programming Without Affecting Data Retrieval?

bettulaksu
Explorer
0 Kudos
149

Hi everyone,

I am working on a Fiori Elements application and want to add a new filter parameter (e.g., CustomDateFilter as shown in the screenshot). However, I don’t want this parameter to impact the actual data retrieval when clicking the Go button. Instead, I need it for additional processing or logic within the application.

How can I implement this in SAP Fiori Elements or RAP without affecting the dataset returned from the backend? Are there any best practices for handling such scenarios? (By the way i am using Restful Application Programming).

Thanks in advance!

CLOUD GORSEL.png

 



View Entire Topic
ClearQueries
Explorer

Hi @bettulaksu,

If I understood your requirement correctly, then you want to show some input field for the enduser (some kind of configuration in order for app to run, e.g., Currency Code, As on Date, etc.), but you want to use it in the further CRUD operation and not exactly for data filtering.

If you ask me - then placing this field on Filter/Selection field level is not ideal.

There are 2 possible ways you can try to achieve this solution - 

1. (Using custom action) Rather then using Filter, add a static action on your toolbar and add one importing parameter in this actions definition. It will prompt the enduser to add the value when clicked, and you can name the button accordingly - set config currency/date/...etc. When this action gets executed, you can store this value entered by user in some database table or some shared buffer memory and use it for further processing as and when required.

2. (Using Custom Filter) Add a custom filter using Fiori/UI5 extension and trigger some backend action/patch call to update this value in some buffer on backend. Use this value to do the further processing as and when required. Using this approach, you will be able to give the look and feel you're trying for, but if you ask me it's bit misleading for enduser as in reality it's not actually filtering the set of data visible in the list report table below.

Hope this resolve your request.

Please accept the answer if it does.

Regards,

ClearQueries.com 

Follow on LinkedIn