Showing results for 
Search instead for 
Did you mean: 

How to perform Validations before a custom Action with a dialog in RAP?


Hello Experts,

We have implemented a custom action having a dialog for entering some comments. For the dialog we use a abstract entity as described in ABAP RAP : Enabling custom actions with a dialog for additional input fields | SAP Blogs.

Now we have an additional requirement to perform some validations before executing the action. That means, when the user presses the button, we would like to check if everything has been filled out correctly and only if the data are correct, we then show the dialog.

Our problem is mainly the time for the checks. In the action implementation the pop up has already been processed, so it is to late to trigger the checks here. Using PRECHECK in the behavior definition also doesn't help, because the corresponding method is executed after the dialog.

Also, we do not want to use the feature control, because we would like to give feedback, why the action is not possible.

Are there any possibilities to perforn the chekcs before the dialog is shown?

Thanks in advance

Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Alexandra,

instance feature control (together with annotated side-effects (currently only possible in the UI project)) would be an option. But then the button would magically be enabled/disabled based on the end-user input. And if the button is disabled, the end-user would not see why.

I'd nevertheless use the feature control, as you also need to make sure that the action is not executed via a REST client.or via EML. Alternatively you implement the validation inside the action, so that the execution fails for the prerequisites are not fulfilled.

And as per the Fiori Elements UI I'd assume that some breakout can be implemented that calls a backend function that performs a GET PERMISSIONS call and transports this information to the UI, so that a message can be shown when the user clicks the action.

Best Regards,
Volker Drees

0 Kudos
Hi Alexandra, is there any update on that matter? I am struggling with the same case. Any framework action I found is triggered only after the pop up is closed. Regards, Edna

Accepted Solutions (0)

Answers (0)