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*.

Similar Messages

  • 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.

  • 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*.

  • 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

  • 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

  • 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

  • Lock object for Purchase Order

    Dear Experts.
    I am searching the function module "ENQUEUE_   " , which is for locking & Unlocking
    the Purchase order(ekko-ebeln).
    Please help me.
    Thanks in advance,
    Regards,
    Rahul.

    Hi,
    Use the Lock object EMEKKOE to Lock and Unloack the Purchase orders
    Use this FM to lock
    MM_ENQUEUE_DOCUMENT
    This is also used in the standard program. While enqueing,
    if there is any error (sy-subrc 0), then it means,
    that particular purchase order is already locked
    Use Fm DEQUEUE_ALL to release all lock at the end of report execution.
    Regards,
    Shamma
    Edited by: Shamma Firdous on Aug 20, 2009 10:22 AM

  • 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 customer(kunnr) in tcode vf01,vf02,f-28,va01

    While using any one of above tcode by using particular customer number(kunnr) ,for same customer other tcode should not allow to access(should be locked)

    I agree with nabheet madan, you could look for customer-exit/BAdI or at last implicit Enhancement spot to execute a call of ENQUEUE_EXKNA1 and lock customer record.
    You must do that for every dynpro PAI where the customer number can be input (and release previous customer when changed, DEQUEUE_EXKNA1)
    Are you sure that requirement is on customer number and not Credit Management ?
    Regards,
    Raymond

  • Creating Lock object for a field in a sap table

    Hi ,
           I need to lock a field in sap table
    eg.  To lock a Standard price(stprs) field in Material Valuation (mbew) table.

    Try with the following Code :
    CALL FUNCTION 'ENQUEUE_EZMBEW'
    EXPORTING
       MODE_MBEW      = 'S'
       MANDT                = SY-MANDT
       MATNR                = '000000000000000043'
       BWKEY                =  '0001'
        STPRS                =  '20,00'
    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.
    Thank you,
    Sekhar.

  • Lock object funtion module for afpo table

    Hii,
    I have designed a screen and maintained batch field as mandatory field in that screen. and when i give batch number and hit enter the order number related to that batch number is automatcially picked. order and batch field's i am taking from AFPO table.now i want to lock this batch or order  field so that no 2 user's can use same batch  or order number while making entries.
    can anyone let me know what is the function module i should use for enqueue and dequeue technics for these 2 fields.
    Regards,
    Venkat.
    Edited by: venkat akella on Jun 29, 2010 1:40 PM

    Hi Venkat,
    For your requierment, you have to create a lock object for table AFPO using T code SE11.
    The name of the Lock object should be start with EZ.
    Then use the FM DEQUEUE_EZ**** & ENQUEUE_EZ**** For unlock and lock of the order.
    Regards
    DKS

  • Tcode for displaying the locked objects

    Hi Experts,
    Can anybody please let me know what is the tcode for displaying the "locked objects" for a user? Thanks a ton for your help.

    Hi Sam,
    you can see the locked objects in E071 table.
    Reward if it helps,
    Satish

  • Error while lock object creation

    Hi
    When I tried to create a lock object, I get the following error.
    Error: "Total length of lock argument for table XXXXXXXXX longer than 150"
    I have 3 tables in which Table1 is the check table for the value tables (Table2 & Table3). During the process of deletion of a record from Table1 (CT) I need the lock tobe established on value tables and then I delete all the corresponding entries in value tables are also deleted.
    Would like to know If there is any other std ways of doing this ? and
    Solution to overcome the error.
    Regards
    Karthick

    Hi,
    I think the error is becoz you have given too many LOCK parameters in the lock object. the total length of the PARAMTERS of lock object should not exceed 150.
    By default all the KEY fields will be taken as Lock paramters, so your table key's length is more than 150.
    Also why dont you create 3 lock objects for each table and then use only KEY's of each table as LOCK PARAMETERS.
    Then Lock T1 record first then lock T2 and T3 records, then delete records from T2 and T3.
    Then you delete T1 record.
    The execute DEQUEUE_ALL.
    Regards,
    Sesh

  • Where do I use These lock object FM's (Enqueue & D? and How do I use them?

    I created lock object for user defined table (zconsist). The system automatically created 2 FM's (Enquiue & Dequeue).
    I created a new TCode and accessing this with mulitple users to do some updates and inserts in that above table.
    I used INSERT ZCONSIST statement in 5 places in my program (4 include programs).
    Where do I use These FM's? and How do I use them?
    I mean before inserting which FM I need to use? after immediately what fm used?.
    every insert statemnt before i need to use the respective fm? so 5 places i need to call the respective FM is it right?
    thank in advance.

    Hi Sekhar,
    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
    kindly reward if found helpful.
    cheers,
    Hema.

  • Help in lock object

    HI All
    i am want to handle lock object for instance if i want to lock some object and it's already locked i want to do some loop on it for 5 times .
    1. i need to know if what i was doing is OK since this is my first time .
    2. what should i use i parameter wait can it help me ?
    Kind Regards
    Chris
    iv_try_x_times = 5. "this value on the method signature
      DO iv_try_x_times TIMES.
        lv_count = lv_count + 1.
        CALL FUNCTION ENQUEUE_USR_DATA
        EXPORTING
        mandt = sy-mandt
        userid = mv_userid
        x_for_user            = iv_is_exact 
        _wait                 = iv_is_wait
      EXCEPTIONS
        foreign_lock = 1
        system_failure = 2
        OTHERS = 3.
        IF sy-subrc = 0.
          RETURN.
        ENDIF.
        IF lv_count < iv_try_x_times.
          WAIT UP TO 1 SECONDS.
        ENDIF.
      ENDDO

    Hi Chris,
    Such a code piece might help you;
    data: is_locked type c,
             lv_counter type i.
    is_locked = ''.
    lv_counter = 0.
    while is_locked = '' and lv_counter < 5.
      lv_counter = lv_counter + 1.
        CALL FUNCTION ENQUEUE_USR_DATA
        EXPORTING
        mandt = sy-mandt
        userid = mv_userid
        x_for_user            = iv_is_exact 
        _wait                 = iv_is_wait
      EXCEPTIONS
        foreign_lock = 1
        system_failure = 2
        OTHERS = 3.
        IF sy-subrc = 0.
          is_locked = 'X'.
       else.
          wait  up to 1 seconds.
       endif.
    endwhile.
    Regards;
    Ozcan.

Maybe you are looking for