on 2025 Mar 02 10:27 AM
Hello everyone,
I am using the RAP Model with a Custom Entity and have implemented an Unmanaged Behavior Definition. I want to refresh the Object Page after executing an action.
However, since the Custom Entity does not have a projection, I cannot use the "use side effects" syntax in the projection. I have tried using "side effects affect ..." but the Object Page does not refresh.
Is there any way to refresh the Object Page when using a Custom Entity in RAP?
Thank a lot.
Request clarification before answering.
Hello @liutiuriu
You can refresh the Object Page using RAP (ABAP RESTful Application Programming Model) by exposing your Custom Entity through a behaviour projection and enabling side effects.
In the base behavior, declare side effects {action <YourAction> affects $self, messages, permissions; }
In projection behavior, add use side effects and expose the projection in your service.
Fiori elements (OData V4) will remind the page after the action. See RAP side effects and projection behavior docs. SAP Help Portal-ABAP Keywood Documentation-RAP - side effects
With kind regards
Chuma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @liutiuriu,
As you rightly mentioned, custom entities are not part of BO model and hence triggering side effect via RAP won't be possible.
In order for you to achieve this, you have to write your Side Effect annotation on Fiori side using local annotations.
Refer XML annotations specified in following documentation - https://sapui5.hana.ondemand.com/sdk/#/topic/18b17bdd49d1436fa9172cbb01e26544
You've to define this SideEffect to trigger after execution of action and target entity should be your custom entity.
If you don't want to use local annotation, then you can try invoking you action via UI Controller coding and after it's successful execution you can request for your object page refresh using controller code.
Either way - you've to implement the side effect/refresh trigger on frontend side to achieve the behaviour you are looking for.
Hope this answer your query.
Please accept this answer if it resolves your query.
Regards,
Follow on LinkedIn
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.