We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!
%msg is a component of BDEF derived types. It is used as a component of the reported response parameter.
%msg provides an instance of the message interface IF_ABAP_BEHV_MESSAGE. If no self-implementation of the interface is needed, the inherited methods new_message( ) or new_message_with_text( ) can be used to get a standard implementation.
The component has the following type: TYPE REF TO IF_ABAP_BEHV_MESSAGE (contains IF_T100_DYN_MSG)
See more details on message handling in the Development Guide for the ABAP RESTful Application Programming Model, section Messages.
The following source code section taken from the BP_DEMO_MANAGED_ROOT_REPORTED=CCIMP of the global class of the behavior pool BP_DEMO_MANAGED_ROOT_REPORTED demonstrates the component %msg in the context of a method implementation for a validation that checks field values of RAP BO instances before saving. See the executable program for this example further down.
The example Example for Message-Related BDEF Derived Type Components demonstrates the use of various BDEF derived type components including %msg with a managed RAP BO.