Skip to Content
avatar image
Former Member

Lock objects

how to lock a specific table entries?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

8 Answers

  • Best Answer
    Jan 22, 2007 at 03:15 PM

    Hi,

    You can do by creating a lock object (SE11) and use this FM.

    ENQUEUE_E_TABLE

    DEQUEUE_E_TABLE

    Regards,

    Ferry Lianto

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 22, 2007 at 03:17 PM
    * Lock Table ZFISVTAX_CCTR
      CALL FUNCTION 'ENQUEUE_E_TABLE'
       EXPORTING
         MODE_RSTABLE         = C_E
         TABNAME              = C_CCTR
       EXCEPTIONS
         FOREIGN_LOCK         = 1
         SYSTEM_FAILURE       = 2
         OTHERS               = 3

    .

    *   Unlock table ZFISVTAX_CCTR
         CALL FUNCTION 'DEQUEUE_E_TABLE'
          EXPORTING
            MODE_RSTABLE       = C_E
            TABNAME            = C_CCTR
                   .

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 22, 2007 at 03:20 PM

    Hi Sunil,

    If it is a standard table, there might be lock function modules created by SAP. If you want to create lock for ztable entries to use in custom transactions, create a lock object from SE11 starting with 'E' char like Eflightno and select lock parameters and table inside it. It will create two function modules in the Dictionary with names as

    ENQUEUE_EFLIGHTNO and

    DEQUEUE_EFLIGHTNO

    which should be used in the custom transaction ..

    Let me know, if i am not clear.

    Regards,

    Vivek

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 22, 2007 at 03:15 PM

    By using Lock Objects 😊 You create a lock object for you table via SE11, doing so, creates two function modules, an ENQUEUE function module and a DEQUEUE funciton module. When you want to lock a table entry, you simply call the ENQUEUE function module for that lock object and pass the values in which are the key of the record that you want to lock.

    http://help.sap.com/saphelp_nw2004s/helpdata/en/a2/3547360f2ea61fe10000009b38f839/frameset.htm

    Regards,

    Rich Heilman

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 22, 2007 at 03:16 PM

    sunil

    check the below link may be useful for u

    Oops

    ~~Guduri

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 22, 2007 at 03:16 PM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 22, 2007 at 03:16 PM

    use...

    DB_GET_LOCKED_TABLES

    BKK_PA_LOCKS_DB_SET_OBJECTS

    BKK_CLOSCTRL_LOCK_OBJECTS

    TRINT_OLE_LOCK_OBJECTS

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 22, 2007 at 06:13 PM
    Add comment
    10|10000 characters needed characters exceeded