Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  ABAP RESTful Programming Model →  Entity Manipulation Language 

ABAP EML - SET LOCKS

Other versions: 7.31 | 7.40 | 7.54

Syntax


SET LOCKS OF root_name 
   ENTITY entity_1_name FROM lt1
  [ENTITY entity_2_name FROM lt2 ...]
  [FAILED   it_failed]
  [REPORTED it_reported].

SET LOCKS
   ENTITY entity_name FROM lt
  [FAILED it_failed]
  [REPORTED it_reported].

Effect

The explicit locking of instances for a following modification is not necessary since the framework automatically locks instances contained in the method MODIFY. However, if the application knows that instances will be needed (that need to be protected so that users cannot change the same data simultaneously), the SET LOCKS statement can be used.

Two types of the statement SET LOCKS are available:

  • a long form SET LOCKS OF root_name
  • a short form SET LOCKS.

The table types required here can be declared statically using the syntax TYPE ... TABLE FOR LOCK OF (see Derived Types).

Continue

ABEN EML - SET LOCKS DYN