To get Lock object for Standard Table

Hi all,
i want to update table FKK_GPSHAD,so i need corresponding lock object for this table.can any one sughgest me the solution for this.
Thanks in advance,...

Hi,
Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
SAP Provide three type of Lock objects.
Read Lock(Shared Locked)
protects read access to an object. The read lock allows other transactions read access but not write access to
the locked area of the table
Write Lock(exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to
the locked area of the table.
Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses from the
same transaction.
You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
Technicaly:
When you create a lock object System automatically creat two function module.
1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
You have to use these function module in your program.
check this link for example.
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
tables:vbak.
call function 'ENQUEUE_EZLOCK3'
exporting
mode_vbak = 'E'
mandt = sy-mandt
vbeln = vbak-vbeln
X_VBELN = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Normally ABAPers will create the Lock objects, because we know when to lock and how to lock and where to lock the Object then after completing our updations we unlock the Objects in the Tables
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
purpose: If multiple user try to access a database object, inconsistency may occer. To avoid that inconsistency and to let multiple user give the accessibility of the database objects the locking mechanism is used.
Steps: first we create a loc object in se11 . Suppose for a table mara. It will create two functional module.:
1. enque_lockobject
1. deque_lockobject
before updating any table first we lock the table by calling enque_lockobject fm and then after updating we release the lock by deque_lockobject.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
GO TO SE11
Select the radio button "Lock object"..
Give the name starts with EZ or EY..
Example: EYTEST
Press Create button..
Give the short description..
Example: Lock object for table ZTABLE..
In the tables tab..Give the table name..
Example: ZTABLE
Save and generate..
Your lock object is now created..You can see the LOCK MODULES..
In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
Lock objects:
http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
Match Code Objects:
http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html
See this link:
http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
Check these links -
lock objects
Lock Objects
Lock Objects
Please reward points if useful.
Regards
Rose

Similar Messages

  • Existing Lock Objects for a table

    Is there a function module or program to get a list of existing lock objects for a given table?

    Hi,
    I am not sure of function module..
    But you can get the lock objects for the a table..
    Go to SE16..Give the table name DD25L
    In the ROOTTAB field give the table name.
    In the field AGGTYPE give 'E' which is for lock object.
    Thanks,
    Naren

  • Lock object for KONV table/Cluster table ??

    Hi All,
    Is it possible to set Lock/Enqueue cluster tables or in my case table:KONV (KNUMV field) ?.
    OSS provided some programs without locks so was hoping if I could add before performing data manipulation.
    Regards,
    Neeth

    Hi Nameeth,
    you can use generic lock object E_TABLE with function modules ENQUEUE_E_TABLE, DEQUEUE_E_TABLE for locking and unlocking with parameters table name and key field.
    Regards,
    Satya

  • Lock object for table KNVP and KNVK

    Hello Friends,
    Can you please tell me the standard lock object for the table KNVP and KNVK.
    Thank and regards,
    Kuldeep

    Hi
    see this and do accordingly
    Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
    SAP Provide three type of Lock objects.
    - Read Lock(Shared Locked)
    protects read access to an object. The read lock allows other transactions read access but not write access to
    the locked area of the table
    - Write Lock(exclusive lock)
    protects write access to an object. The write lock allows other transactions neither read nor write access to
    the locked area of the table.
    - Enhanced write lock (exclusive lock without cumulating)
    works like a write lock except that the enhanced write lock also protects from further accesses from the
    same transaction.
    You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
    Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
    Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
    Technicaly:
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    You have to use these function module in your program.
    check this link for example.
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    tables:vbak.
    call function 'ENQUEUE_EZLOCK3'
    exporting
    mode_vbak = 'E'
    mandt = sy-mandt
    vbeln = vbak-vbeln
    X_VBELN = ' '
    _SCOPE = '2'
    _WAIT = ' '
    _COLLECT = ' '
    EXCEPTIONS
    FOREIGN_LOCK = 1
    SYSTEM_FAILURE = 2
    OTHERS = 3
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Normally ABAPers will create the Lock objects, because we know when to lock and how to lock and where to lock the Object then after completing our updations we unlock the Objects in the Tables
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    purpose: If multiple user try to access a database object, inconsistency may occer. To avoid that inconsistency and to let multiple user give the accessibility of the database objects the locking mechanism is used.
    Steps: first we create a loc object in se11 . Suppose for a table mara. It will create two functional module.:
    1. enque_lockobject
    1. deque_lockobject
    before updating any table first we lock the table by calling enque_lockobject fm and then after updating we release the lock by deque_lockobject.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    GO TO SE11
    Select the radio button "Lock object"..
    Give the name starts with EZ or EY..
    Example: EYTEST
    Press Create button..
    Give the short description..
    Example: Lock object for table ZTABLE..
    In the tables tab..Give the table name..
    Example: ZTABLE
    Save and generate..
    Your lock object is now created..You can see the LOCK MODULES..
    In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
    Lock objects:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    Match Code Objects:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html
    See this link:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    Check these links -
    lock objects
    Lock Objects
    Lock Objects
    Regards
    Anji

  • Lock object for knvv

    Hi,
    is there any lock object for KNVV table for EIKTO field.
    If yes please help me.
    Thanks,
    Sandeep Garg

    Hi,
    According to my search i found lock objects only for KNA1 table. you may try it by,
    GOTO se11.
    select Lock object Radio button.
    Press F4.
    A popup appears, in that popup, under Short Description, type
    CustomerMaster* or what ever description you feel and press enter. you will get a list of lock objects, if they match your description.
    One tip is always give the first letter in CAPS. like CustomerMaster*.

  • Lock object for table EKES

    Hi experts,
    I developed a function module to update the confirmations tab of a PO on ME22N screen. Now, I want to have a lock object in the FM so that a user cant make changes while this FM is in use. I do not know if there is any standard lock object for this purpose. I created a lock object in SE11 'EZEKES' since table EKES corresponds to vendor confirmations details. The Enqueue function was called into the program. The code is below:
    CALL FUNCTION 'ENQUEUE_EZPHLOCK'
    EXPORTING
       MODE_EKES            = 'E'
       MANDT                = SY-MANDT
       EBELN                = ponumber
    EXCEPTIONS
       FOREIGN_LOCK         = 1
       SYSTEM_FAILURE       = 2
       OTHERS               = 3
    The problem is, i'm not able to have a lock on the confirmations tab when the FM is in use. Is there any problem with the lock object i have created. The lock mode is Exclusive,Cumulative.
    Please help me with this.

    Code:
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(PONUMBER) TYPE  EKKO-EBELN
    *"  TABLES
    *"      ITAB STRUCTURE  UEKES
    TABLES: EKES, EKKO.
      DATA: BEGIN OF I_EKKO OCCURS 0,
            EBELN LIKE EKKO-EBELN,
            END OF I_EKKO.
      DATA: X LIKE EKES-ETENS.
      data: i_tab like itab occurs 0 with header line.
      move itab[] to i_tab[].
      DATA: i_ekes LIKE uekes OCCURS 0 WITH HEADER LINE.
      SELECT EBELN FROM EKKO INTO TABLE I_EKKO WHERE EBELN = PONUMBER.
      IF NOT I_EKKO[] IS INITIAL.
        SELECT  * FROM EKES INTO TABLE I_EKES
        FOR ALL ENTRIES IN I_EKKO
      WHERE EBELN = I_EKKO-EBELN.
      ENDIF.
      select single etens from ekes into x WHERE EBELN = PONUMBER.
      x = x + 1.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    DATA: VARKEY LIKE RSTABLE-VARKEY.
      CALL FUNCTION 'ENQUEUE_E_TABLE'
       EXPORTING
        MODE_RSTABLE         = 'E'
         TABNAME              = EKES
         VARKEY               = VARKEY
        X_TABNAME            = ' '
        X_VARKEY             = ' '
        _SCOPE               = '2'
        _WAIT                = ' '
        _COLLECT             = ' '
      EXCEPTIONS
        FOREIGN_LOCK         = 1
        SYSTEM_FAILURE       = 2
        OTHERS               = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
        LOOP AT I_TAB. "WHERE EBELN = PONUMBER.
        READ TABLE I_TAB.
        LOOP AT i_ekes WHERE ebelp EQ ITAB-EBELP "itemnumber
                          AND ebtyp EQ 'LA'.
          i_ekes-menge = ITAB-MENGE. "quantity.
          i_ekes-kz   = 'U'.
          i_ekes-eindt = ITAB-EINDT. "deldate.
          I_EKES-XBLNR = ITAB-XBLNR.
          i_ekes-erdat = sy-datum.
          i_ekes-ezeit = sy-uzeit.
          MODIFY i_ekes.
        ENDLOOP.
      ENDLOOP.
      IF sy-subrc NE 0.
        LOOP AT I_TAB. "WHERE EBELN = PONUMBER.
          READ TABLE I_TAB.
          LOOP AT i_ekes WHERE ebelp EQ ITAB-EBELP "itemnumber
                         AND ebtyp EQ 'AB'.
            i_ekes-menge = ITAB-MENGE. "quantity.
            i_ekes-ebtyp = 'LA'.
            i_ekes-kz   = 'I'.
            i_ekes-etens   = x.
            i_ekes-eindt = ITAB-EINDT. "deldate.
            I_EKES-XBLNR = ITAB-XBLNR.
            i_ekes-erdat = sy-datum.
            i_ekes-ezeit = sy-uzeit.
            APPEND i_ekes.
          ENDLOOP.
        ENDLOOP.
      ENDIF.
    To update the confirmations tab
      CALL FUNCTION 'ME_CONFIRMATION_UPDATE'
        EXPORTING
          I_EBELN = PONUMBER
        TABLES
          XEKES   = i_ekes[].
            YEKES         = I_EKES[].
      IF SY-SUBRC = 0.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      ENDIF.
    CALL FUNCTION 'DEQUEUE_E_TABLE'
    EXPORTING
      MODE_RSTABLE       = 'E'
       TABNAME            = EKES.
       VARKEY             = VARKEY
      X_TABNAME          = ' '
      X_VARKEY           = ' '
      _SCOPE             = '3'
      _SYNCHRON          = ' '
      _COLLECT           = ' '
    ENDFUNCTION.

  • How to get F4 help for Standard Text Key of a operation based on Order type

    Hi Experts,
      How to get F4 help for Standard Text Key (STK) of a operation based on Order type entered in selection screen. The F4 help should give the STK of related order type. At the same time the F4 help for Task Types based on Notification type. How to acheive the above two. Please provide the table names or any search help name if exists or Function modules...
    Thanks in Advance.
    Regads,
    Bujji

    Hi Guys,
       Any help on this...
    Regards,
    Bujji
    Edited by: Bujji on Dec 22, 2008 12:42 PM
    Edited by: Bujji on Jan 5, 2009 2:00 PM

  • SEQUENCE Object for Small Tables Only?

    QUOTE from a recent thread: "Long term solution should be to use SEQUENCE with NO CACHE for small tables instead of identity and benefit from performance improvement for large tables."
    Thread:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/cf63d145-7084-4371-bde0-eb3b917c7163/identity-big-jump-100010000-a-feature?forum=transactsql
    How about using SEQUENCE objects for large tables? Thanks.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

    Well Erland, either you calm down your manager (with a martini?) or use NO CACHE.
    QUOTE: "This could cause a sequence to run out of numbers much more quickly than an IDENTITY value. It could also cause managers to become upset that values are missing, in which case they’ll need to simply get over it and accept that
    there will be numbers missing.
    If you need SQL Server to use every possible value, configure a cache setting of NO CACHE. This will cause the sequence to work much like the IDENTITY property. However, it will impact the sequence performance due to the additional metadata writes."
    LINK: Microsoft SQL Server: The Sequencing Solution
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Is it possible to get locked objects in passed time?

    Hi,
    I would like to get locked objects in passed time. The oracle version is 9i.
    For example,
    Can I get a list locked objects five days ago? Because I would like to keep locked objects statistics?
    Does these information stored?
    regards,

    Hi,
    your best shot is ASH (active session history). It contains information about active sessions, their wait events, wait times, blockers, objects accessed, SQL running etc. For recent events you may query V$ACTIVE_SESSION_HISTORY, if you are interested in older data then you can try
    looking in DBA_HIST_ACTIVE_SESS_HISTORY.
    There are many limitations when analyzing ASH data, such as:
    1) limited retention time
    2) periodic sampling (you won't be able to see anything that falls in between snapshots)
    3) bias towards longer events
    etc.
    so you need to be careful when analyzing these data.
    Best regards,
    Nikolay

  • Find lock object for field

    Hi Friends,
    I have one qurey. I would like to know the lock object for field MATNR.
    Any suggestion how I can find it out the lock object for specific field.
    Regards,
    Poonam

    hi,
    GOTO se11.
    select Lock object Radio button.
    Press F4.
    A popup appears, in that popup, under Short Description, type
    *Material* and press enter. you will get a list of lock objects, select your required.
    Always give the first letter in CAPS. like *Material*.

  • Getting the objects for a class

    I am able to get all live classes of a dynpro by using method cl_gui_cfw=>get_living_dynpro_controls. (Also thanks to this forum).
    The resulting table has a reference to a class like ...
    How do I use this reference to:
    1. Get the objects for it?
    2. How can I then free the object from memory by using the "free" method.
    I guess I am asking how to dynamically assign it, then make sure it has a free method and then to use the method to actually free it.

    Hello Uwe
    My first reaction was "NO it cannot be that easy!!". It almost was but on the second line I get a short dump. Then I realised why: the other live control in the table was a sub class of the first class and as a result it was cleared on the first call.
    So I modified the call to be a recursive call (of the form) as follows...
    form clear_live_controls .
    DATA:
      gt_list       TYPE cnto_control_list,
      gt_wa like line of gt_list.
      REFRESH: gt_list.
      CALL METHOD cl_gui_cfw=>get_living_dynpro_controls
        IMPORTING
          control_list = gt_list.
      describe table gt_list lines tab_lines.
      if tab_lines = 0.
    *    Nothing
      else.
         loop at gt_list into gt_wa.
           gt_wa->free( ).
           exit.
         endloop.
         perform clear_live_controls.
      endif.
    endform.                    " clear_live_controls
    This took care of it.
    Many thanks for your help.
    Regards

  • DI object for OACT table

    Hi,
    Does anyone know what is the DI object for OACT table, if I wanted to set "Relevant to Budget" flag on a G/L account through DI?
    If there is an object for OACT, how would I have found it in SDK help? I think I've asked this question before, but if I know the db table, how do I search for the DI object for it? I find the cross-reference between the two very inadequate in the SDK help, unless I'm just missing something really obvious?

    Maybe by the Services
    Search Services in the SDK and the second entry is DI Services

  • Is there any command/query/etc, which would allow to understand what database objects (for example tables) are consuming memory and how much of it?

    TimesTen Release 11.2.1.9.6 (64 bit Linux/x86_64)
    Command> dssize;
    PERM_ALLOCATED_SIZE:      51200000
      PERM_IN_USE_SIZE: 45996153
    PERM_IN_USE_HIGH_WATER:   50033464
    TEMP_ALLOCATED_SIZE:      2457600
    TEMP_IN_USE_SIZE:         19680
    TEMP_IN_USE_HIGH_WATER:   26760
    Is there any command/query/etc, which would allow to understand what database objects (for example tables) are consuming memory and how much of it?
    tried to use ttsize function, but it gives some senseless results – for example, for the biggest table, tokens, it produces following output (that this table is 90GB in size – what physically cannot be true):
    Command> call ttsize('tokens',null,null);
    < 90885669274.0000 >
    1 row found.

    Are you able to use the command line version of ttSize instead? This splits out how much space is being used by indexes (in the Temp section of the TT memory segment), which I think is being combined into one, whole figure in the procedure version of ttSize you're using. For example:
    ttSize -tbl ia my_ttdb
    Rows = 4
    Total in-line row bytes = 17524
    Total = 17524
    Command> create index i1 on ia(a);
    ttSize -tbl ia my_ttdb;
    Rows = 4
    Total in-line row bytes = 17524
    Indexes:
    Range index JSPALMER.I1 adds 5618 bytes
      Total index bytes = 5618
    Total = 23142
    Command> call ttsize ('ia',,);
    < 23142.0000000000 >
    1 row found.
    In 11.2.2 we added the procedure ttComputeTabSizes which populates system tables with detailed table size data, and was designed to be an alternative to ttSize. Unfortunately it still doesn't calculate index usage though, and it isn't in 11.2.1.

  • Error while getting data objects for instance

    Hello Expert,
    I am getting some weird error - whenever there is a new process is triggered and I check context Data, I get following error -
    "Error while getting data objects for instance processinstanceid"
    Thanks is advance
    Priya

    Hi Priya,
    this is a known issue in the xml processing of the Java Virtual Machine. Please refer to the SAP Note for this issue: 1949395
    This should solve your issue.
    Best regards,
    Stefan

  • How to find the function module for standard tables.

    Hi
    Could any one please tell me how to find the standard function module to update the standard tables
    Thanks & Regards
    Sowmya

    Hi sowmya,
    To find the function modules for standard tables you go for a where used list of that particular table and check only function module interfaces checkbox...
    and more over you can go for DB_UPDATE_TABLE will be the function module for updating database table..
    Hope this information would help you
    Regards
    Narin Nandivada

Maybe you are looking for

  • Canvas Remains Still While Output Monitor is Fine

    Recently the Mac Pro station I work on was upgraded from FCP 6.x to 7.03. Noting that everything worked fine prior to the upgrade and everything works fine after the upgrade except this new problem: When scrubbing the timeline audio and video playbac

  • Adobe Premier Elements.

    Has Anyone got Capture to work with N93? WhatData cable mode do you use? Will it work? Any settings to change in Adobe P Elements?

  • Why is my speed slider greyed out?

    Im not sure what version of iMovie i have. its the one with the purple icon. I have several clips I'm putting together and want to slow some down. However the rabbit icon is greyed out. I have gone into prefs and made sure the slow motion option is c

  • Entry in "Proxy Server" field in app. attributes

    Hi, I automatically assumed the above mentioned entry needs to be in the format: host:port I tried it and the emails my app sends do not make it to the recipient. (The e-mail configuration settings are set properly.) Am I missing anything? -Dan

  • Google TV 2.0

    when will support google TV 2.0