SAP SET LOCKS OF ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• OF SET LOCKS OF
• ENTITY SET LOCKS OF
• FROM SET LOCKS OF

SET LOCKS OF, Long Form

ABAP_SYNTAX
SET LOCKS OF bdef
ENTITY entity1 FROM inst1
$[ENTITY entity2 FROM inst2$]
$[...$]
$[response_param$].

ABAP Addition
... response_param.

What does it do?
The long form of the SET LOCKS statement is used to exclusively lock instances of multiple RAP BO entities.
bdef must be a root entity followed by a list of locks grouped by individual entities. entity1, entity2, and so on, must be entities contained in the composition tree of the root entity bdef. The root entity itself can also be inserted in the position of entity1, for example. Each part of the list specified after SET LOCKS OF bdef has the same syntax as the short form. At least one entry (ENTITY bdef1 FROM inst) must be specified. The root entity name in the position of the first statement, SET LOCKS OF bdef, must be the full entity name. entity1, and so on, should be the entity alias names if provided in the BDEF . Using the full entity name will cause a warning. If the root entity is used in the list of operations, its alias name, if defined in the BDEF, should be used as well.
inst1, inst2, and so on, are internal tables specifying the instances that are to be locked. The tables must be typed with the BDEF derived type TYPE TABLE FOR KEY OF. They can be constructed in an operand position using constructor expressions, for example with the value operator ( VALUE) and other constructor operators to fill the internal tables with instances as input parameters after the keyword FROM.

ABAP Addition

What does it do?