1.

Explain about lock objects in SAP ABAP.

Answer»

Lock Object is an ABAP Dictionary provided feature used for synchronizing the access to the same data by multiple users or programs. Lock Objects in SAP ABAP are used for avoiding inconsistency during data insertion or modification in the database. Tables WHOSE data records are gonna locked must be defined with their key fields in a Lock Object.

Consider an example for the usage of Lock Object, suppose a travel agent wants to book a place in flight. Also, the customer WISHES to fly to a particular city on a particular day with a particular airline. The BOOKING will be possible only if there exists a free place on the flight. The database entry for the flight must be locked through access prevention for other transactions to avoid the possibility of OVERBOOKING. This will make sure that a user can find out the number of free places, do the booking, and change the AVAILABLE number of free places without the data being changed at the same time by another transaction.



Discussion

No Comment Found