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 MODIFY
$[IMPORTING$]
${ REFERENCE(im_par_mod) $| im_par_mod $}
FOR ${ CREATE bdef $}
$| ${ CREATE bdef\_assoc $}
$| ${ UPDATE bdef $}
$| ${ DELETE bdef $}
$| ${ ACTION bdef~action
$[REQUEST ${ REFERENCE(req_act) $| req_act $} $]
$[RESULT ${ REFERENCE(res_act) $| res_act $}$] $}
$| ${ ACTION ${ bdef~activate
$| bdef~edit
$| bdef~discard
$| bdef~resume $} $}
$[CHANGING ${ $[
failed TYPE data$]
$[reported TYPE data$]
$[mapped TYPE data$] $}$].
1. ... CREATE bdef ...
2. ... CREATE bdef\_assoc ...
3. ... UPDATE ...
4. ... DELETE ...
5. ... ACTION bdef~action ...
6. ... ACTION bdef~activate ...
7. ... ACTION bdef~edit ...
8. ... ACTION bdef~discard ...
9. ... ACTION bdef~resume ...
1. ... REQUEST ...
2. ... RESULT ...
3. ... CHANGING ...
Handler methods that are used for changing operations on
RAP BO entities and
operation augmentation. They must be defined and implemented in a
handler class of an
ABAP behavior
pool. A single method can include multiple, different operations during one processing step. 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 action the name of an action. It is possible to combine operations in one method.
... CREATE bdef ...
Handles create operations.
See more details and the required BDEF notations for the variant in the following topics:
Method parameters:
... CREATE bdef\_assoc ...
Handles create-by-association operations.
See more details and the required BDEF notations for the variant in the following topics:
Method parameters:
... UPDATE bdef ...
Handles update operations.
See more details and the required BDEF notations for the variant in the following topics:
Method parameters:
... DELETE bdef ...
Handles delete operations.
See more details and the required BDEF notations for the variant in the following topic: CDS BDL - standard operations.
Method parameters:
... ACTION bdef~action ...
Handles actions.
See more details and the required BDEF notations for the variant in the following topics:
Method parameters:
... ACTION bdef~activate ...
Handles the activate action in draft scenarios.
See more details and the required BDEF notations for the variant in the following topic: CDS BDL - draft actions.
Method parameters:
... ACTION bdef~edit ...
Handles the edit action in draft scenarios.
See more details and the required BDEF notations for the variant in the following topic: CDS BDL - draft actions.
Method parameters:
... ACTION bdef~discard ...
Handles the discard action in draft scenarios.
See more details and the required BDEF notations for the variant in the following topic: CDS BDL - draft actions.
Method parameters:
... ACTION bdef~resume ...
Handles the resume action in draft scenarios.
See the required BDEF notations for the variant in the following topic: CDS BDL - draft actions.
Method parameters:
... REQUEST ...
The addition and the parameter req_act are only available in the context of non-draft actions that are specified with a parameter in the BDEF. req_act is a structure of type TYPE STRUCTURE FOR GLOBAL FEATURES REQUEST bdef~action.
See more details and the required BDEF notations for the variant in the following topics:
... RESULT ...
The addition and the parameter res_act are only available in the context of non-draft actions that are specified with a result in the BDEF. res_act is an internal table of type TYPE TABLE FOR ACTION RESULT bdef~action. The parameter can also be passed by reference.
See more details and the required BDEF notations for the variant in the following topics:
... 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. The first example in the code below shows a handler method definition combining multiple operations in one method.
METHODS modify FOR MODIFY
IMPORTING ent_cr FOR CREATE bdef
ent_upd FOR UPDATE bdef
keys FOR DELETE bdef.
METHODS create FOR MODIFY
IMPORTING entities FOR CREATE bdef.
METHODS cba_child FOR MODIFY
IMPORTING entities_cba FOR CREATE bdef\_child.
METHODS update FOR MODIFY
IMPORTING entities FOR UPDATE bdef.
METHODS delete FOR MODIFY
IMPORTING keys FOR DELETE bdef.
METHODS action1 FOR MODIFY
IMPORTING keys FOR CREATE bdef~action1.
METHODS action2 FOR MODIFY
IMPORTING keys FOR CREATE bdef~action2 RESULT result.
METHODS action3 FOR MODIFY
IMPORTING keys FOR CREATE bdef~action3
REQUEST requested_fields RESULT result.
METHODS activate FOR MODIFY
IMPORTING keys FOR ACTION bdef~activate.
METHODS discard FOR MODIFY
IMPORTING keys FOR ACTION bdef~discard.
METHODS create FOR MODIFY
IMPORTING entities FOR CREATE bdef.
METHODS edit FOR MODIFY
IMPORTING keys FOR ACTION bdef~edit.
METHODS resume FOR MODIFY
IMPORTING keys FOR ACTION bdef~resume.
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