2025 Feb 18 5:34 PM - edited 2025 Feb 18 5:41 PM
Hi Experts,
We are working with a RAP Singleton OData V4 service that includes validations to restrict the SAVE operation using the FAILED structure under FOR VALIDATE ON SAVE.
APPEND VALUE #( %tky = ls_transactional_data-%tky ) TO failed-ProjectSBUAlloc.
APPEND VALUE #( %tky = ls_transactional_data-%tky
%state_area = 'VALIDATE_PERCENT'
%path-ProjectSBUAllocAll = CORRESPONDING #( ls_transactional_data )
%element-distkey = if_abap_behv=>mk-on
%msg = new_message(
id = 'ZTEST'
number = 000
severity = if_abap_behv_message=>severity-error "CONV #( 'E')
v1 = 'Percentage value cannot be greater than 100'
)
) TO reported-ProjectSBUAlloc.
This works as expected in the Eclipse ADT preview, but we are facing an issue when accessing it via the Fiori app.
The custom validation message does not appear on the UI; instead, only the framework error (RAP_DSP_REQUEST/023) is returned. Despite properly updating the FAILED AND REPORTED structures, the validation failures are not being correctly tied to the singleton instance, unlike regular entities.
The RAP framework is overriding the message, preventing it from being properly surfaced in the response.
What would be the best approach to ensure that our custom validation messages are correctly displayed in the UI when using RAP?
Any suggestions would be greatly appreciated!
2025 May 25 2:58 PM
2025 Sep 12 2:04 PM
Hi,
I wanted to ask if there has been any further progress or solution discovered for this issue? If you have any new insights, fixes, or workarounds, I would really appreciate if you could share them.
Thanks in advance for your help!
Best Retards