cancel
Showing results for 
Search instead for 
Did you mean: 

UI with Parameter AMDP Table function

ankesh_jindal4
Participant
0 Kudos

Hi Everyone,

In building one of UI screen, it is parametrized, means from UI , some parameters should be passed they will flow through consumption view to Interface view to Table function and then AMDP method that implement that TF.

Now in RAP(Restful programming model) is not much supported for parametrized application, My questions are:

1) Is there any workaround we still pass the parameter on RAP with all CRUD functioning and handle all complexities on the UI.

2) If we don't pass parameter and pass filter on UI , will those filter be application till base level of query even if I get all the records in AMDP.

Suppose in AMDP I retrieve all sales order and from UI I passed '100000028' as filter on Sales order , Will system will calculate all the sales order and then apply where clause or it will pass this sales order till the base query level and fetch only this sales order not all.

Looking for your answers

Regards

Ankesh Jindal

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member14709
Contributor
0 Kudos

Hi Ankesh,

Please follow as suggested by Torsten in below link:

https://answers.sap.com/questions/494539/fiori-elements-consuming-cds-view-with-parameters.html

This might help you and you can stick to Parameters and avoid filters this way.

Thanks,

Aman Garg

former_member14709
Contributor
0 Kudos

Hi Ankesh,

To answer your 2nd question, I am pretty sure that filters won't be cascaded to the underlying layers, although I didn't try this. Reason why I am saying this: To pass parameters, we add 'with parameters' addition in the CDS/TF, so that data definition would know this parameter with this field type would come, however, there is no such alternative to specify filters in CDS/TF. Moreover, filter would also not serve the performance purpose, which Parameters serve. I mean using filter, you would query entire db, but would send only filtered results to UI, but when using Parameters, you would query only entries matching the Parameter.

Thanks,

Aman Garg

former_member14709
Contributor
0 Kudos

Hi Ankesh,

When you wrote "Now in RAP(Restful programming model) is not much supported for parametrized application", you were only partially correct. It's not RAP framework, it's the preview tool which has this limitation. Through preview tool, we can not call the parametrized entities. However, you can still build your services with parametrized entities, and from your UI, you can pass the parameter value while doing the operations. This parameter value will cascade perfectly to your entity, underlying TF and the AMDP beneath. Preview tool is just a testing tool, and has multiple limitations, which you can easily overcome while building your real UI.

Hope this helps.

Thanks,

Aman Garg

ankesh_jindal4
Participant
0 Kudos

aman9garg

Hi Aman,

If I heard you correctly, you mean to say RAP model which is build on Consumption Parameterized view as root entity will take parameters from Real UI and pass it to Consumption parameter which is further can be passed to below layer and Still I can do all the CRUD operations on that behavior entity set? In my Real UI , I am using Smart Table , Initially data get loaded respecting parameter but once I click on settings button or any other action , Table get refresh automatically, then if I click refresh again , data comes back again and then it will retain on any operation on screen.

I know Parameters once I get it will be cascaded to below layer but by 2nd question is if I don't pass any parameters but pass filter on ODATA service will that filter will also be cascaded to all the layers benefit automatically by the framework or it will 1st get the result set and apply filter on the result set , I hope I am clear?

Regards

Ankesh