SAP HANDLER METH READ ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• FOR READ METHODS
• FOR READ FOR READ
• FOR FUNCTION FOR READ
• FOR FOR READ
• FULL FOR READ
• REQUEST FOR REA
• RESULT FOR READ
• LINK FOR READ

FOR READ, RAP Handler Method

ABAP_SYNTAX
Handler method definitions:
METHODS meth $[ FINAL$]
FOR READ
$[IMPORTING$] ${ REFERENCE(im_par_read) $| im_par_read $}
FOR ${ READ bdef RESULT ${ REFERENCE(res_read) $| res_read $} $}
$| ${ READ bdef _assoc FULL ${ REFERENCE(full_rba) $| full_rba $}
RESULT ${ REFERENCE(res_rba) $| res_rba $}
LINK ${ REFERENCE(link_rba) $| link_rba $} $}
$| ${ FUNCTION bdef~function $[REQUEST ${ REFERENCE(req_func) $| req_func $}$]
RESULT ${ REFERENCE(res_func) $| res_func $} $}
$[CHANGING ${ $[failed TYPE data$] $[reported TYPE data$] $}$] .

ABAP_VARIANTS:
1 ... READ bdef ...
2 ... READ bdef _assoc ...
3 ... FUNCTION bdef~function ...

What does it do?
Handler method that is used for read operations in RAP. It must be defined and implemented in a handler class of an ABAP behavior pool. The method name meth can be chosen freely. bdef is the name or the alias of the BDEF, assoc the name of the association, and function the name of a function.
The method parameters can be passed by reference (see REFERENCE), except for the predefined parameters failed and reported.

ABAP Addition
1 ... REQUEST ...
2 ... CHANGING ...

ABAP_VARIANT_1 ... READ bdef ...

What does it do?
Handles the read requests in RAP read operations. BDEF requirement for the read operations: The entities to be read from must be declared after the notation define behavior for.
Method parameters:
IMPORTING parameter:
im_par_read: Includes the entities to be read. It is an internal table of type TYPE TABLE FOR READ IMPORT bdef.
CHANGING parameters:
res_read: Mandatory parameter used to store the read result. It must be specified after the ABAP word RESULT and is an internal table of type TYPE TABLE FOR READ RESULT bdef.