Hello andre.fischer ,
I have created two applications , one is draft enabled other one is Strict (Non-draft), both from your RAP generator.
I have some validations for mandatory fields , and i log message which i want to show in the UI.
Everything is working fine , but with one big difference , on how the messages are displayed.
In Non- draft behavior , i get the messages at the footer with hyperlinks, and in draft based app , i get the message in the form of pop up.
My requirement is get the error messages at the footer in draft Scenario.
Is this some kind of product error in RAP , or i am missing something in my code , which i have to add.
Raising messages and calling validation from Behavior is 100% same in both cases. But message handling is different
volker.drees : would you please look at this bheaviour and provide some solution or answer
Waiting for your response.
Thanks and Regards ,
Per my experience, Managed scenario with Draft will show all error messages collectively, which is already happening in your case. But in unmanaged scenario we need to have Draft Enabled (must).
To collect all error messages and show then on bottom left you need to add
%state_area property in your REPORTED-<ENTITYNAME> structure like below...
reported-<entity name> = VALUE #((
%tky = <record>-%tky
%state_area = 'VALIDATE_FIELD' "this can be any text just to identify state of field
%element-<fieldname to validate> = if_abap_behv=>mk-on
%msg = new_message ("update your error message").
for more step by step details please visit below video:
Hope this helps...
Hi shavs ,
Can you share the code you have used to implement the behavior for draft case?
'Error in footer' indicates that it is the final state of the BO entity.
I think it is by design that for a draft entity (i.e. still not saved to active table) the messages will appear in a popup.
Ideally, If you don't add entry into 'failed' workarea explicitly RAP framework assumes that the BO has not failed yet (final state), hence http=412 precondition failed which results in confirmation popup.