This is a test message to test the length of the message box.
Login
|
ABAP RAP Side Effects
Created by Software-Heroes

RAP - Side Effects

5150

How can you update parts of the Fiori UI without doing a complete refresh? With Side Effects, this is easily possible in ABAP and RAP.

Advertising


In this article we look at the different types of side effects and how you can use them effectively in your everyday life.

 

Introduction

To do this, we will expand our application from the Report Pattern series to include additional functionality. If you have already worked with the application, you will certainly have noticed that certain components of the application are only loaded when updating, such as after processing the Excel file or when adding a new country.

Side effects can be created for this purpose. These define a trigger, which in turn triggers an effect on an object. Only the affected objects are reloaded. For example, if it is a field, then only this field will be reloaded. In principle, this function was already possible in Fiori, but you can now control this from the RAP behavior.

 

Options

Currently, certain actions can trigger a side effect, including:

  • Fields - A specific field is changed in the UI.
  • Actions - An action is triggered, usually linked to a button in the UI.
  • Determination - An determination is initiated that automatically changes the contents of fields.
  • SELF - Refers to the own entity.

 

The following objects can then be influenced:

  • Fields - Updating individual fields in the UI, but also individual fields of associations.
  • Permissions - This can be used to deactivate buttons, such as custom actions and standard actions.
  • Entity - This can be used to reload complete associations if data in entire nodes has changed.
  • Messages - Forces the reloading of messages generated via REPORTED.
  • SELF - Refers to the own entity.

 

In principle, you can use side effects in the RAP business objects (managed and unmanaged), as well as in the projection layer of the objects. You can also find further details in the technical documentation that we have linked below. However, you need an S/4HANA 2023 system on-premise for this.

 

Example

In this example, we want to equip the upload button with an action. To do this, after executing the action, the country entity should be updated and the Excel file field, as this will be deleted after the upload. Let's take a look at what it looks like before the action.

 

To do this, we extend the projection of the behavior definition and insert the new statement under the "LoadExcelContent" action. With SIDE EFFECTS you open the area where you can define all side effects. To do this, we define an effect for our actions that affects the Country entity and the ExcelAttachment field. Since the object can only be listed once, we separate the effects with a comma at the end.

side effects {
  action LoadExcelContent affects entity _Country, field ExcelAttachement;
}

 

After this small change, let's look at the impact on the UI. It is noticeable that the interface has already been reloaded after the action has been carried out.

 

Full example

All changes made in this article can be found in the GitHub repository under the corresponding commit. This will help you better understand all changes.

 

Conclusion

Side Effects can be integrated into the UI with very little effort and make the user's work much easier, as they can immediately see the updated information without having to reload the application.

 

Source:
SAP Help - Side Effects


Included topics:
RAPBTPSide EffectREX5
Comments (0)



And further ...

Are you satisfied with the content of the article? We post new content in the ABAP area every Tuesday and Friday and irregularly in all other areas. Take a look at our tools and apps, we provide them free of charge.


ADT - RAP Extension Assistent [MIA]

Category - ABAP

You want to extend a RAP object and don't know exactly where to start? Perhaps the Extension Assistant can help you and guide you through the process step by step.

03/06/2026

ADT - RAP Analyzer [MIA]

Category - ABAP

Getting to grips with and understanding existing RAP objects can not always be easy, especially when dealing with complex objects. Questions such as which pattern is used and which objects are important usually need to be worked out.

02/24/2026

RAP - Position of Buttons

Category - ABAP

In this article, we'll look at the different button positions. Where can we place the various actions in RAP, and how do we use them?

02/17/2026

RAP - Analytical Table

Category - ABAP

Let's take a look at the last missing piece of the puzzle in RAP to replace the ALV and how we can set up the Analytical Table with minimal effort.

02/13/2026

RAP - Mixed Content

Category - ABAP

How do we actually get different content into the same column in the List Report? Let's look at a practical example using our Sales App.

02/10/2026