SAP HANDLER METH LOCK ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• FOR LOCK METHODS
• FOR LOCK FOR LOCK

FOR LOCK, RAP Handler Method

ABAP_SYNTAX
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$] $}$] .

What does it do?
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
IMPORTING parameter:
im_par_lock: Includes the keys of RAP BO instances that are to be locked. It is an internal table of type TYPE TABLE FOR KEY OF.
The importing parameter can also be passed by reference (see REFERENCE). The use of the ABAP word IMPORTING is optional.
CHANGING parameters: