What does it do? BDEF derived type> used for RAP response parameters> and operands of ABAP_EML statements> for the purpose of providing or storing RAP responses>. The BDEF derived types with TYPE RESPONSE FOR ...> are basically deep structures> containing one internal table as nested component for each entity of the RAP BO. Therefore, all information on all entities of a RAP BO can be provided and retrieved at once. bdef> stands for the source name of a RAP BO root entity>. The addition EARLY> applies to responses from within the RAP interaction phase>; the addition LATE> applies to responses in the RAP save sequence>. Where Used>
The three predefined formal parameters > of RAP handler methods> and RAP saver methods> mapped>, failed> and reported> - whose names are also reflected in the syntax here - are typed with these BDEF derived types. In ABAP behavior pools>, the parameters of the said methods typed with this BDEF derived type are implicitly available. The following images show the F2> help information in ADT> for a RAP handler method for which the response parameters have not been explicitly specified: METHODS create FOR MODIFY IMPORTING entities FOR CREATE demo_unmanaged_root_2.> F2> help information in ADT: IMAGE type_response_for2.png 705 134 The parameters can also be explicitly specified. When specified explicitly, for example, for a RAP handler method that creates instances and that includes ... FOR MODIFY ... FOR CREATE ...>, the syntax can be as follows. Note that for the explicit declaration of the changing parameters, the generic type DATA>> is used. At runtime, the typed parameters implicitly have the type TYPE RESPONSE FOR ...>. METHODS create FOR MODIFY IMPORTING entities FOR CREATE bdef CHANGING failed TYPE DATA mapped TYPE DATA reported TYPE DATA.>
The operands following the MAPPED >, FAILED> and REPORTED> additions of nondynamic forms of ABAP_EML statements> are typed with these BDEF derived types. ABAP_NOTE The operands following these additions in dynamic ABAP_EML statements are internal tables of type ABP_BEHV_RESPONSE_TAB>>, see here>. The operands store the RAP responses when an ABAP_EML statement triggers the calling of a method in the behavior pool. One example is the internally created data object f_resp> in the statement MODIFY ENTITY ... FROM ... FAILED FINAL(f_resp) ...>.
In ABAP programs, these BDEF derived types can also be used to declare data objects and types, for example, as follows: DATA f TYPE RESPONSE FOR FAILED demo_managed_root.
TYPES r TYPE RESPONSE FOR REPORTED demo_managed_root.
DATA m TYPE RESPONSE FOR MAPPED demo_managed_root.> Details on the Syntax>