We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!
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$] $}$].
1. ... READ bdef ...
2. ... READ bdef\_assoc ...
3. ... FUNCTION bdef~function ...
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.
1. ... REQUEST ...
2. ... CHANGING ...
... READ bdef ...
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:
... READ bdef\_assoc ...
Handles the read requests in RAP read-by-association operations. BDEF requirement for read-by-association operations: The entities to be read from must be declared after the notation define behavior for.
Method parameters:
The parameters must be specified in the method definition in the following sequence: ... IMPORTING ... FULL ... RESULT ... LINK ... CHANGING ...
... FUNCTION bdef~function ...
Handles the read requests in the context of functions. See the required BDEF notations for functions in topic CDS BDL - function.
Method parameters:
The parameters must be specified in the method definition in the following sequence: ... IMPORTING ... FULL ... RESULT ... LINK ... CHANGING ...
... REQUEST ...
The addition and the parameter req_func are only available in the context of functions that are
specified with the notation
result selective in the BDEF. req_func is a structure of type TYPE STRUCTURE FOR FUNCTION REQUEST bdef~function.
... CHANGING ...
The CHANGING parameters failed
and reported are implicitly
available. They are used to return information on failures or messages respectively. It is possible
to specify the parameters with the predefined names failed and reported explicitly following
the ABAP word CHANGING. In this case, the generic type DATA
is used. At runtime, the typed parameters implicitly have the BDEF derived type TYPE RESPONSE FOR.
Examples for RAP handler method definitions. Find demonstrations of method implementations in the executable examples further down.
METHODS read FOR READ
IMPORTING keys FOR READ bdef RESULT result.
METHODS rba_assoc FOR READ
IMPORTING keys_rba FOR READ bdef\_assoc
FULL result_requested RESULT result LINK association_links.
METHODS function1 FOR READ
IMPORTING keys FOR READ bdef~function1 RESULT result.
METHODS function2 FOR READ
IMPORTING keys FOR READ bdef~function2
REQUEST requested_fields RESULT result.
Leave us your contact details and we will call you back. Fields marked with * are mandatory.
We offer holistic SAP solutions from a single source to shape digital change and develop new business areas.
Switzerland
Schaffhausen
Germany
Mannheim, Düsseldorf, Munich
USA
Haverhill
Greece
Thessaloniki