cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RAP Read/Get unmanaged with custom validations and logic after fetch data

5,180

Hi All,

I have a scenario where I have to present data to UI with some selections(filters) and, using RAP.

Before presenting the data to UI I need to perform lot many validations from SAP standard BAPIs and some custom ABAP code validations(from existing classes).

I can see RAP unmanaged scenario is the best fit for scenario, but need some help .i.e. can I implement custom ABAP logics and validations in the READ operation(not CUD operations) of my behaviour definition ?.

I been through SAP's flight unmanaged scenario, but when I put debug point for Travel entity READ method it gets triggered only when click on travel item but I don't see any options never stops when I click GO button(attached screen shot).

In short how cloud I perform some custom validations and logic when I click on GO button before presenting the data on UI.

Using unmanaged we can create custom actions and can handle them in behaviour implementations I believe. Please correct me ?

Thanks

R

Accepted Solutions (1)

Accepted Solutions (1)

0 Likes

Hi,

Hi,

Virtual element works for one field in the structure to perform some custom calculations.

Table Functions with AMDP is only for native SQL quires to handle, can't keep custom ABAP logics like calling classes.

I am done this by choosing "custom entity" , here I have an option to implement my select query when GO button clicks. Usingif_rap_query_provider interface.

Thanks

R

Answers (1)

Answers (1)

former_member749640
Discoverer
0 Likes

For the read operation you need to implement Calculated Fields, Virtual element or table function in the CDS view.

Basically the GET operation is always a select on the CDS view and any calculated fields you need to perform should be done in the CDS views

https://help.sap.com/viewer/cc0c305d2fab47bd808adcad3ca7ee9d/7.51.6/en-US/a7fc007921d44263b09ccc0923...