Ansicht
Dokumentation

ABAPHANDLER_METH_VALIDATE - HANDLER METH VALIDATE

ABAPHANDLER_METH_VALIDATE - HANDLER METH VALIDATE

ROGBILLS - Synchronize billing plans   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

FOR VALIDATE

Handler method definitions:

METHODS meth $[FINAL$]
   FOR VALIDATE ON SAVE
   $[IMPORTING$] ${ REFERENCE(im_par_val) $| im_par_val $}
   FOR bdef~val
   $[CHANGING ${ $[failed TYPE data$] $[reported TYPE data$] $}$].


Effect

Handler method that is used for the validations. 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 and val is the name of the validation.

Method Parameters

The importing parameter can also be passed by reference (see REFERENCE). The use of the ABAP word IMPORTING is optional.
  • 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.

BDEF Requirements

See the required BDEF notations for both variants in the topic CDS BDL - validations.

Example

Example for a RAP handler method definition. Find demonstrations of method implementations in the executable examples further down.

METHODS det_on_save FOR VALIDATE ON SAVE
    IMPORTING keys FOR bdef~val.






CL_GUI_FRONTEND_SERVICES - Frontend Services   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.

Length: 4494 Date: 20240419 Time: 075637     sap01-206 ( 55 ms )