Ansicht
Dokumentation

ABAPHANDLER_METH_LOCK - HANDLER METH LOCK

ABAPHANDLER_METH_LOCK - HANDLER METH LOCK

General Material Data   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

FOR LOCK

Handler method definition:

METHODS meth $[FINAL$]
   FOR LOCK
   $[IMPORTING$] ${ REFERENCE(im_par_lock) $| im_par_lock $}
   FOR LOCK bdef
   $[CHANGING ${ $[failed TYPE data$] $[reported TYPE data$] $}$].


Effect

Handler method that is used for the locking of RAP BO instances corresponding to the lock properties in the behavior definition. This method is automatically called before a modify operation. 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.

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 - locking.

Examples

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

METHODS lock FOR LOCK
    IMPORTING keys FOR LOCK bdef.

Example for RAP Handler Methods: Demonstrates this RAP handler method within a RAP handler class using a simple unmanaged RAP BO that is draft-enabled.






CL_GUI_FRONTEND_SERVICES - Frontend Services   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 4430 Date: 20240614 Time: 055042     sap01-206 ( 78 ms )