Mentor SAP
For messages related to a RAP BO entities, it is possible to further bind them to one or more fields of the entity. This is particularly helpful for error messages from validations. Binding the messages to fields improves the user experience, because it enables navigation and clear allocation of errors when there are multiple error messages.

 

Component %element in Parameter REPORTED

 

To report a message that is related to field FIELD of RAP BO entity ENTITY, proceed as follows:

  1. Create a message object with message text and message severity.
  2. Add a new entry to the table-like component ENTITY of deep structure REPORTED.
  3. In the new entry, fill field group %tky with the entity instance key.
  4. Fill component %msg with a reference to the message object.
  5. ll sub-component FIELD of component %element with IF_ABAP_BEHV=>MK-ON.

 

If you want to bind the message to more than one field, repeat the last step.