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

RAP - Action (Processing options)

5814

How do you actually enable multi-select in RAP and control the various processing options? Here we'll look at the different options in the framework.

Advertising


In last week's article, we looked at an action in the area of custom entities. In this article, we provide some more details on processing and generation in BAS.

 

Introduction

Not all options are available as annotations during modeling. Certain options, such as autoload, extensions, or UI actions, are only set when the Fiori application is generated. To validate the various processing options, we must first activate multi-select in the table. Then we can observe the app's behavior.

 

Preparation

As a preparatory step, we must first generate the app so that we can then adapt and test it. We use the Business Application Studio as the standard in development, as it is available to us out-of-the-box without any further configuration. Here, we generate the project using the Tool Bridge. We should now see the overview page:

 

Multi Select

Using OData v2, we only get radio buttons in the list, but we can activate multi-select via the BAS. To do this, we can start Guided Development and look for the option "Configure Multiple Selection for a Table".

 

In the next step, we start the wizard and have to set the option in the lower area to "True" to activate multiple selection. The setting is activated in the app using the "Insert Snippet" button.

 

If the file has now been expanded, multiple selection of entries should now be possible in the preview. With this small adjustment, our app now has full flexibility if we want to process multiple data sets.

 

Processing Options

In this chapter, we'll take a look at the processing options available for actions. Using the "invocationGrouping" suffix in the UI annotation, we can control two different states of an action.

 

ISOLATED

This is the default setting if you define an action but don't specify the suffix. This causes each selected record in the list to generate its own query. If we execute our "Custom Action," it will be called as often as there are selected records. However, with each pass, we only receive one key for processing.

 

Things get a bit strange with the static "Reset" action, which behaves differently if we have not selected any records or if we have selected records from the list. If no record is selected, the action is called exactly once, as we expect. For example, if we select two records, the action is executed twice, which makes no sense for a reset, for example.

 

CHANGE_SET

The second option is the change set, and as the name suggests, a set of changes is created here. To do this, we set the option once for both actions and look at the behavior in detail. If we select all three entries in the list and call the "Custom Action," our implementation is called exactly once. However, we receive all the keys to the method.

 

Now for the static action. Here, too, we receive exactly one call to the action, regardless of whether we have selected records or not. We would actually expect this behavior from the static action by default, since the selected records are not actually relevant.

 

Usage

With the knowledge from above, we can define the two actions for the UI. To ensure the static action works as desired, we would work with the change set here. With the custom action, you can decide whether the records should be processed as a group.

@UI.lineItem: [{ position: 10 }, 
  { type: #FOR_ACTION, dataAction: 'myCustomAction', label: 'Custom Action', invocationGrouping: #ISOLATED },
  { type: #FOR_ACTION, dataAction: 'resetAllIcons', label: 'Reset', invocationGrouping: #CHANGE_SET } ]

 

Hint: In principle, actions should be implemented in such a way that they can also handle multiple data sets.

 

Complete example

The complete example of the service and the app can be found in the GitHub repository in the package ZBS_DEMO_RAP_CUSTOM_ACTION. However, you won't find the small changes from this article there.

 

Conclusion

You now know how to activate multi-select via the Business Application Studio and how to configure the action correctly to suit your processing.

 

Source:
SAP Help - invocationGrouping


Included topics:
RAPBTPCustom ActioninvocationGrouping
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.


RAP - Auxiliary Class

Category - ABAP

As the implementation grows in the behavior implementation of a RAP object, what options do you still have for clean encapsulation? Let's look at this in detail.

04/17/2026

RAP - Implement change documents (Manual)

Category - ABAP

This article delves into the manual implementation of change documents in our RAP object and examines the various integration steps. The goal is to generate change documents automatically.

04/14/2026

RAP - Draft Query

Category - ABAP

In this article, we'll look at the Draft Query in RAP and how you can use it to control entries and their visibility. We'll also look at a practical example.

04/03/2026

RAP - Importance

Category - ABAP

Let's look at the importance of information within an SAP Fiori application and how we can use it to control visibility in the RAP application.

03/24/2026

RAP - Criticality

Category - ABAP

What do you actually need criticality for in your application, and what can you achieve with it? Let's look at different forms and scenarios.

03/21/2026