Skip to Content
author's profile photo Former Member
Former Member

Regarding lock objects

Hi,

Could anyone please tell me how to use lock objects in coding.

Thanx in advance

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 15, 2008 at 08:38 AM

    Hi,

    To lock objects use function module ENQUEUE_*

    To unlock objects use function module DEQUEUE_*

    Cheers.

    ...Reward if useful

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Vijay,

      Locking concept is used to avoid data inconsistency. Let me explain with one simple example.

      Suppose the bank balances of the customer is stored in some table say zbal. If the customer is withdrawing money from ATM and at the same time if the bank manager is viewing this customer balance details there may be data inconsistency because of time lag of data base update after cash withdrawel.

      For this what we will do is we will use locking concept. So as soon as customer logs in to ATM machine we will lock this table zbal for this customer. So till he logs out no updates will happend to this table for this customer(i.e Row belongs to this customer). For this we have to create lock object for this table.

      In SAP we can do it in SE11. When we create lock object 2 FMs will be created. ENQUEUE_tabname, DEQUEUE_tabname.

      When customer logs in some program will be called. In this program first call FM ENQUEUE FM and at the end of the program call DEQUEUE FM.

      Hope it is clear now.

      Thanks,

      Vinod.

  • Posted on Jun 15, 2008 at 10:47 AM

    Hi vijay,

    this document may help you to get some understanding about lock concept in SAP:

    [The SAP Lock Concept (BC-CST-EQ)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCSTEQ/BCCSTEQ_PT.pdf]

    Regards,

    Clemens

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.