The lock-object in synchronized clause.

If two threads are entering a synchronized statement, what condition on the lock-statement is then tested?
Say, we have:
Object lock1 = new Object() {
         public boolean equals(Object aObj) {
            return true;
Object lock2 = new Object() {
         public boolean equals(Object aObj) {
            return true;
      };Then the statements in the two following synchronized-clauses would be able to execute concurrently:
synchronized(lock1) {
    // Some statements
... in another thread
synchronized(lock2) {
    // Some statements
}The following statement (in my test) did not execute concurrently:
synchronized("test") {
// some statements
synchronized("test") {
   // Some statements
}...but the following did:
synchronized(new String("test")) {
// some statements
synchronized("test") {
   // Some statements
}This lead me to believe that a (object == object) condition was tested (not object.equals(object)). Is this correct?

This lead me to believe that a (object == object)
condition was tested (not object.equals(object)). Is
this correct?No. No test is performed on the references, and equals is not called.
Kaj

Similar Messages

  • Fm or metod that retrieve the lock object name from the table name

    HI ALL,
    there is FM or method that retrieve the lock object name from the table name ?
    Best regards
    Nina

    CALL FUNCTION 'ENQUEUE_REPORT'            
    EXPORTING                                
    gclient                     = sy-mandt   
    gname                       = 'RCTMV'         "Table Name
      GTARG                       = ' '       
      GUNAME                      = SY-UNAME  
    IMPORTING                                 
      number                      =           
      SUBRC                       =           
      TABLES                                  
        enq                         =  lt_seqg3
    EXCEPTIONS                               
       communication_failure       = 1        
       system_failure              = 2        
       OTHERS                      = 3

  • What is the use for lock object and how to use the lock objects

    Hi Guru's,
    I am new to ABAP .Can you please clarify the that what is the use of lock object and how to use the loct object .what is use of the Deque & Enque  function modules .

    hi ,
    below are some minfo about lock objects :
      Lock Objects
    These types of objects are used for locking the access to database records in table. This mechanism is used to enforce data integrity that is two users cannot update the same data at the same time. With lock objects you can lock table-field or whole table.
    In a system where many users can access the same data, it becomes necessary to control the access to the data. In R/3 system this access control is built-in on database tables. Developers can also lock objects over table records.
    To lock an object you need to call standard functions, which are automatically generated while defining the lock object in ABAP/4 dictionary. This locking system is independent of the locking mechanism used by the R/3 system. This mechanism also defines LUW i.e. Logical Unit of Work. Whenever an object is locked, either by in built locking mechanism or by function modules, it creates corresponding entry in global system table i.e. table is locked. The system automatically releases the lock at the end of transaction. The LUW starts when a lock entry is created in the system table and ends when the lock is released.
    Creating Lock Objects
    Lock object is an aggregated dictionary object and can be defined by using the following steps:
    o From initial data dictionary screen, enter the name for the object, Click Lock object radiobutton and then click on Create. The system displays a dialog box for Maintain Lock Objects screen
    o Enter short text as usual and the name for primary table.
    -Save
    -Select Tables option
    From this screen you can:
    Select secondary tables, if any, linked by foreign key relationship.
    Fields for the lock objects. This option allows you to select fields for objects (R/3 system allows locking up to record level). Lock object argument are not selected by user but are imposed by the system and includes all the primary keys for the table.
    1) Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
    2) Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
    3) Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
    Also, last but not the least, locking the object is logical (locking with any enqueue ) .so, you have to use the lock object while trying to access from second program .
    reward if helpful ,
    Regards,
    Ranjita

  • 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

  • How can we release the locked objects..

    Hi,
    I have created some objects such as pages and iviews in the portal. If i edited any of the object, then when next time when i access the object, I am hgetting a message as object is locked by admin, you canot edit it. Infact, I have logged in as admin.
    How can we release the lock of objects?
    Your help and suggestins solicited...
    Best regards,
    Sudhesh...

    Login as the Portal Administrator.
    Go to System Administration > Monitoring ->Detailed navigation -> Object Locking
    Here you can find all the objects that are in locked state.
    Now to unlock,  tick mark the object that you want to work with & click on the "Unlock" Button.

  • Reassigning the Locked object in ID

    Hi Expert,
    I amtrying to the edit the Communication channel object and it is throughing the error like " <object name> is already locked in another chnage list by user <user name> if necessary, you can reassign the other user's change list to yourself
    can any body give me an idea how can we reassign the object?
    THanks in Advance
    Neeru

    Hi Neeru,
    you have 2 options.
    1. Unlock the object
    2. Re-assign the object to another user.
    Unlock the object: in the XI home page click on Administration --> Lock over view then select the required locked object and click on unlock.
    Re Assign the object: Go to ESR change list and select the required object then give the target user name and click on transfer then that object is transferred to the required target user.
    Regards
    Ramesh

  • Download the lock object's technical setting on loack machine

    Dear Experts,
            I want to download lock object's technical setting on loack machine.when i give on selection screen name of local objects and desire path.it save on given path.
    Please give me example for it.
    Thanks & regard,
    jaten

    Also, when reviewing the Plumtree_.NET_Web_Controls_InstallLog.log there were 5 nonfatal erros. These error's were:
    Install File: E:\plumtree\ptwc\2.0\bin\assemblies\edk.dll Status: ERROR Additional Notes: ERROR - java.io.FileNotFoundException: E:\plumtree\ptwc\2.0\bin\assemblies\edk.dll (The process cannot access the file because it is being used by another process)
    Install File: E:\plumtree\ptwc\2.0\bin\assemblies\jsregistry.dll Status: ERROR Additional Notes: ERROR - java.io.FileNotFoundException: E:\plumtree\ptwc\2.0\bin\assemblies\jsregistry.dll (The process cannot access the file because it is being used by another process)
    Install File: E:\plumtree\ptwc\2.0\bin\assemblies\log4net.dll Status: ERROR Additional Notes: ERROR - java.io.FileNotFoundException: E:\plumtree\ptwc\2.0\bin\assemblies\log4net.dll (The process cannot access the file because it is being used by another process)
    Install File: E:\plumtree\ptwc\2.0\bin\assemblies\openfoundation.dll Status: ERROR Additional Notes: ERROR - java.io.FileNotFoundException: E:\plumtree\ptwc\2.0\bin\assemblies\openfoundation.dll (The process cannot access the file because it is being used by another process)
    Install File: E:\plumtree\ptwc\2.0\bin\assemblies\Plumtree.WCFilter.dll Status: ERROR Additional Notes: ERROR - java.io.FileNotFoundException: E:\plumtree\ptwc\2.0\bin\assemblies\Plumtree.WCFilter.dll (The process cannot access the file because it is being used by another process)
    When installing the Web Control's do you need to stop any services? I didn't see anything in the install notes about doing this?

  • Lock Object (Not locking the table)

    Hi Guys
    I have a custom table ZDRAD same like standard table DRAD with an additional 'DATE' field . ZDRAD's Key fields are same like DRAD . I have created a lock object 'EZDRAD' where I put name = 'ZDRAD' (Custom table) and mode = 'EXCLUSIVE CUMULATIVE' . Now I want to lock the table(Whole table) before modifying/Inserting/deleting the records in se38. Please check the code below and suggest me if I am passing wrong values to the lock object Function module.
    Code
    TABLES : ZDRAD.
    CALL FUNCTION 'ENQUEUE_EZDRAD'
    EXPORTING
       MODE_ZDRAD           = 'E'
       MANDT                = SY-MANDT
       DOKAR                = ' '
       DOKNR                = ' '
       DOKVR                = ' '
       DOKTL                = ' '
       DOKOB                = ' '
       OBZAE                = 0
       OBJKY                = ' '
       X_DOKAR              = ' '
       X_DOKNR              = ' '
       X_DOKVR              = ' '
       X_DOKTL              = ' '
       X_DOKOB              = ' '
       X_OBZAE              = ' '
       X_OBJKY              = ' '
       _SCOPE               = '2'
       _WAIT                = 'X'
       _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.
    ZDRAD table is locked.
        P_L_LOCK_STAT = 'X'.
        EXIT.
      ELSE.
    ZDRAD table is not locked
        CLEAR P_L_LOCK_STAT .
      ENDIF.

    Hi Kanthimathi
    That is numeric field . Please suggest me how can i check the lock.

  • How to verify the status of lock object???

    Hello,
    How to verify the status of lock object???
    I need to know the status of the lock object and put the user in list.
    Exists a FM for this?
    Thanks!

    You can check the list of lock objects for the ztable by this way....
    Go to SE11, click the radibutton for lock object, then do F4 on the field. Click the "All Selections" icon, in the "Basis Table" field, put the table that you want the lock object for. click green check.
    Regards.

  • What are the lock modes in Lock object

    What are the lock modes in Lock object ?
    what are the divfferences between
    Exclusive , cumulative
    Shared
    Exclusive , not cumulative
    Could any body explain what happens in each table lock ?
    How the lock consists ?

    HI
    Lock objects are used to synchronize access to the same data by more than one program.
    The lock mode controls whether several users can access data records at the same time. The lock mode can be assigned separately for each table in the lock object. When the lock is set, the corresponding lock entry is stored in the lock table of the system for each table.
    There are three types of lock modes
    1.Exclusive
    2.Shared
    3.Exclusive not cummulative
    Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
    Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
    Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
    please go through these links:
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/a2/3547360f2ea61fe10000009b38f839/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/a2/3547360f2ea61fe10000009b38f839/frameset.htm</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/af/22ab01dd0b11d1952000a0c929b3c3/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/af/22ab01dd0b11d1952000a0c929b3c3/frameset.htm</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eeb2446011d189700000e8322d00/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eeb2446011d189700000e8322d00/frameset.htm</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eebf446011d189700000e8322d00/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eebf446011d189700000e8322d00/frameset.htm</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eed9446011d189700000e8322d00/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eed9446011d189700000e8322d00/frameset.htm</a>
    Regards,
    Gunasree.

  • Re: lock objects

    Hi,
         Iam implementing some screens. I created some lock objects. I could not able to  under these concepts. Even though I studied some documents, i could not get the below concepts. can anybody explain.
    1. what is the enqueue mode
    2. what is the scope
    3.what is the wait parametrs
    rgds
    p.kp

    Hi paluri,
    Info taken from standard sap help.
    1. Enqueu Mode.
    The lock mode controls whether several users can access data records at the same time. The lock mode can be assigned separately for each table in the lock object. When the lock is set, the corresponding lock entry is stored in the lock table of the system for each table.
    Access by more than one user can be synchronized in the following ways:
    Exclusive lock: The locked data can only be displayed or edited by a single user. A request for another exclusive lock or for a shared lock is rejected.
    Shared lock: More than one user can access the locked data at the same time in display mode. A request for another shared lock is accepted, even if it comes from another user. An exclusive lock is rejected.
    Exclusive but not cumulative: Exclusive locks can be requested several times from the same transaction and are processed successively. In contrast, exclusive but not cumulative locks can be called only once from the same transaction. All other lock requests are rejected.
    2. Scope
    Parameter _SCOPE controls how the lock or lock release is passed to the update program (see The Owner Concept for Locks). You have the following options:
    _SCOPE = 1: Locks and lock releases are not passed to the update program. The lock is removed when the transaction is ended.
    _SCOPE = 2: The lock or lock release is passed to the update program. The update program is responsible for removing the lock. The interactive program with which the lock was requested no longer has an influence on the lock behavior. This is the standard setting for the ENQUEUE function module.
    _SCOPE = 3: The lock or lock release is also passed to the update program. The lock must be removed in both the interactive program and in the update program. This is the standard setting for the DEQUEUE function module.
    3. WAIT
    The ENQUEUE function module also has the parameter _WAIT. This parameter determines the lock behavior when there is a lock conflict.
    You have the following options:
    Initial value: If a lock attempt fails because there is a competing lock, the exception FOREIGN_LOCK is triggered.
    X : If a lock attempt fails because there is a competing lock, the lock attempt is repeated after waiting for a certain time. The exception FOREIGN_LOCK is triggered only if a certain time limit has elapsed since the first lock attempt. The waiting time and the time limit are defined by profile parameters.
    regards,
    amit m.

  • Needed information on lock objects

    needed information regarding lock objects

    hi
    The lock mode controls whether several users can access data records at the same time. The
    lock mode can be assigned separately for each table in the lock object. When the lock is set, the
    corresponding lock entry is stored in the lock table of the system for each table.
    Access by more than one user can be synchronized in the following ways:
    <b> Exclusive lock</b>: The locked data can only be displayed or edited by a single user. A
    request for another exclusive lock or for a shared lock is rejected.
      <b>Shared lock</b>: More than one user can access the locked data at the same time in display
    mode. A request for another shared lock is accepted, even if it comes from another user.
    An exclusive lock is rejected.
      <b>Exclusive but not cumulative</b>: Exclusive locks can be requested several times from the
    same transaction and are processed successively. In contrast, exclusive but not
    cumulative locks can be called only once from the same transaction. All other lock
    requests are rejected.
    regards
    Nagesh.Paruchuri

  • Let me know creation of lock object

    let me know creation of lock object

    Hi
    <b>Lock Objects</b>
    Lock object concept
    Lock modes
    Creating a lock object (example)
    Lock object sample code
    SAP data dictionary provides you with a locking mechanism to synchronize simultaneous data access by different users.
    Lock objects are created in SE11.
    Customer lock objects must begin with EY or EZ .
    Three possible lock modes exist for lock objects.
    <b>Lock Mode</b>
    Lock mode E: This sets a lock for changing data for single user. This lock can be accumulated.
    Lock mode X: This mode is used like mode E for changing data. The only technical difference from mode E is that the respective lock does not allow accumulation.
    Lock mode S: This mode ensures that data displayed in your program cannot be changed by other users during the entire display time. Here you do not want to change the data yourself (allows read only access for data).
    <b>Creating Lock object</b>
    SE11
    1)Enter lock object name beginning with EY or EZ
    and hit create.
    2)Enter table names containing data records that should be locked and the lock mode.
    Enter short text /tbale/lockmode.
    3) The primary keys of the specified tables are automatically selected as lock parameters.
    It automatically selects the primary key for the selected table.
    To set a lock in the application program
    call a function module ENQUEUE_<LOCK_OBJECT>.
    For our example, it would be ENQUEUE_EZMARA.
    To release the lock in the application program
    call a function module DEQUEUE_<LOCK_OBJECT>.
    For our example, it would be DEQUEUE_EZMARA.
    Refer the code executed by user (say abap1) for
    matnr = ’000000000000000012’.
    Lock Objects are used to synchronize access to the same data by more than one user. Function modules that can be used in application programs are generated from the definition of a lock object in the ABAP Dictionary.
    The R/3 System synchronizes simultaneous access of several users to the same data records with a lock mechanism. When interactive transactions are programmed, locks are set and released by calling function modules .These function modules are automatically generated from the definition of lock objects in the ABAP Dictionary.
    Structure of a Lock Object
    The tables in which data records should be locked with a lock request are defined in a lock object together with their key fields.
    When tables are selected, one table (the primary table) is first selected. Further tables (secondary tables) can also be added using foreign key relationships.
    Lock Arguments
    The lock argument of a table in the lock object consists of the key fields of the table.
    The lock argument fields of a lock object are used as input parameters in the function modules for setting and removing locks generated from the lock object definition. When these function modules are called, the table rows to be locked or
    unlocked are specified by defining certain values in these fields.These values can also be generic. The lock argument fields therefore define which subset of the table rows should be locked
    Data Dictionary/ Lock Objects
    The simplest case of a lock object consists of exactly one table and the lock argument of the table is the primary key of this table. Several tables can also be included in a lock object. A lock request therefore can lock an entire logical
    object, and not only a record of a table. Such a logical object can be for example a document comprising an entry in a header table and N entries in a positiontable.
    Lock Mode
    The lock mode controls whether several users can access data records at the same time. The lock mode can be assigned separately for each table in the lock object. When the lock is set, the corresponding lock entry is stored in the
    lock table of the system for each table. Access by more than one user can be synchronized in the
    following ways:
    Exclusive lock: The locked data can only be displayed or
    edited by a single user. A request for another exclusive lock
    or for a
    shared lock is rejected.
    Shared lock: More than one user can access the locked data
    at the same time in display mode. A request for another
    shared lock is accepted, even if it comes from another user. An exclusive lock
    is rejected. Exclusive but not cumulative: Exclusive locks can be requested
    several times from the same transaction and are processed
    successively. In contrast, exclusive but not cumulative locks
    can be called only once from the same transaction. All other
    lock requests are rejected.
    1) Select object type Lock object in the initial screen of the ABAP Dictionary, enter an object name and choose Create. The name of a lock object should begin with an E (Enqueue).The maintenance screen for lock objects is displayed.
    2) Enter an explanatory short text in the field Short text. You can then use the short text to find the lock object at a later time, for example with the R/3 Repository Information System.
    3) Enter the name of the primary table of the lock object. All other tables in the lock object must be linked with the primary table using foreign keys.
    4) Select the lock mode of the primary table in the field below it The lock mode is used as the default value for the corresponding parameters of the function modules generated from the lock object.
    5) Choose Add if you want to lock records in more than one
    table with the lock object. A list of all the tables linked with the primary table using valid foreign keys is displayed. Select the appropriate table. The lock
    mode of the primary table is copied as lock mode. You can change this setting as required, for example you can assign the lock mode separately for each table.
    Similarly, you can add a table linked with the secondary table just added with foreign keys. To do this, place the cursor on the name of the secondary table and choose Add.
    If no lock mode is assigned to a table, no lock is set for the
    entries in this table when the generated function modules are
    called. You should not assign a lock mode if a secondary table
    was only used to define a path between the primary table and
    another secondary table with foreign keys.
    6) Save your entries.
    A dialog box appears in which you have to assign the lock
    object a development class.
    7) You can define whether the function modules generated from
    the lock object should be RFC-enabled on the Attributes tab
    page. If you set the Allow RFC flag, the generated function
    modules can be called from within another system with Remote
    Function Call. If you permit Remote Function Calls for an
    existing lock object, you must ensure that the generated
    function modules are called from within an ABAP program with
    parameters appropriate for the type. You should therefore check
    all programs that use the associated function modules before
    activating the lock object with the new option.
    8) Choose Activate
    <b>Reward if u sefull</b>

  • Implementing lock object

    I've a TCode to modify a report. That TCode picks a doc no. from a table & opens up an editable ALV based on that doc. no .That doc. no. is the only primary key.
    I want that if someone is already opened that report, & if someoen else is trying to open that report, it shouldn't open & should show that -"its locked by User  XXX". I've made a lock object for that table. Please advise what to do next. How to populate the User name who has locked the report.

    used ENQUEUE function  and DEQUEUE function
    Function Modules for Lock Requests
    Activating a lock object in the ABAP Dictionary automatically creates function modules for setting (ENQUEUE_<lock object name>) and releasing (DEQUEUE_<lock object name>) locks.
    The generated function modules are automatically assigned to function groups. You should not change these function modules and their assignment to function groups since the function modules are generated again each time the lock object is activated.
    Never transport the function groups, which contain the automatically generated function modules. The generated function modules of a lock object could reside in a different function group in the target system. Always transport the lock objects. When a lock object is activated in the target system, the function modules are generated again and correctly assigned to function groups.
    Parameters of the Function Modules
    Field Names of the Lock Object
    The keys to be locked must be passed here.
    A further parameter X_<field> that defines the lock behavior when the initial value is passed exists for every lock field <field>. If the initial value is assigned to <field> and X_<field>, then a generic lock is initialized with respect to <field>. If <field> is assigned the initial value and X_<field> is defined as X, the lock is set with exactly the initial value of <field>.
    Parameters for Passing Locks to the Update Program
    A lock is generally removed at the end of the transaction or when the corresponding DEQUEUE function module is called. However, this is not the case if the transaction has called update routines. In this case, a parameter must check that the lock has been removed.
    Parameter _SCOPE controls how the lock or lock release is passed to the update program (see The Owner Concept for Locks). You have the following options:
    &#65399;        _SCOPE = 1: Locks or lock releases are not passed to the update program. The lock is removed when the transaction is ended.
    &#65399;        _SCOPE = 2: The lock or lock release is passed to the update program. The update program is responsible for removing the lock. The interactive program with which the lock was requested no longer has an influence on the lock behavior. This is the standard setting for the ENQUEUE function module.
    &#65399;        _SCOPE = 3: The lock or lock release is also passed to the update program. The lock must be removed in both the interactive program and in the update program. This is the standard setting for the DEQUEUE function module.
    Parameters for Lock Mode
    A parameter MODE_<TAB> exists for each base table TAB of the lock object. The lock mode for this base table can be set dynamically with this parameter. The values allowed for this parameter are S (read lock), E (write lock), X (extended write lock), and O (optimistic lock).
    The lock mode specified when the lock object for the table is created is the default value for this parameter. This default value can, however, be overridden as required when the function module is called.
    If a lock set with a lock mode is to be removed by calling the DEQUEUE function module, this call must have the same value for the parameter MODE_<TAB>.
    Controlling Lock Transmission
    Parameter _COLLECT controls whether the lock request or lock release should be performed directly or whether it should first be written to the local lock container. This parameter can have the following values:
    &#65399;        Initial Value: The lock request or lock release is sent directly to the lock server.
    &#65399;        X: The lock request or lock release is placed in the local lock container. The lock requests and lock releases collected in this lock container can then be sent to the lock server at a later time as a group by calling the function module FLUSH_ENQUEUE.
    Whenever you have lock mode X (extended write lock), locks should not be written to the local lock container if very many locks refer to the same lock table. In this case, there will be a considerable loss in performance in comparison with direct transmission of locks.
    Behavior for Lock Conflicts (ENQUEUE only)
    The ENQUEUE function module also has the parameter _WAIT. This parameter determines the lock behavior when there is a lock conflict.
    You have the following options:
    &#65399;        Initial Value: If a lock attempt fails because there is a competing lock, the exception FOREIGN_LOCK is triggered.
    &#65399;        X: If a lock attempt fails because there is a competing lock, the lock attempt is repeated after waiting for a certain time. The exception FOREIGN_LOCK is triggered only if a certain time limit has elapsed since the first lock attempt. The waiting time and the time limit are defined by profile parameters.
    Controlling Deletion of the Lock Entry (DEQUEUE only)
    The DEQUEUE function module also has the parameter _SYNCHRON.
    If X is passed, the DEQUEUE function waits until the entry has been removed from the lock table. Otherwise it is deleted asynchronously, that is, if the lock table of the system is read directly after the lock is removed, the entry in the lock table may still exist.
    Exceptions of the ENQUEUE Function Module
    &#65399;        FOREIGN_LOCK’: A competing lock already exists. You can find out the name of the user holding the lock by looking at system variable SY-MSGV1.
    &#65399;        SYSTEM_FAILURE: This exception is triggered when the lock server reports that a problem occurred while setting the lock. In this case, the lock could not be set.
    If the exceptions are not processed by the calling program itself, appropriate messages are issued for all exceptions.
    Reference Fields for RFC-Enabled Lock Objects
    The type of an RFC-enabled function module must be completely defined. The parameters of the generated function module therefore have the following reference fields for RFC-enabled lock objects:
    Parameters
    Reference fields
    X_<field name>
    DDENQ_LIKE-XPARFLAG
    _WAIT
    DDENQ_LIKE-WAITFLAG
    _SCOPE
    DDENQ_LIKE-SCOPE
    _SYNCHRON
    DDENQ_LIKE-SYNCHRON
    See also:
    Example for Lock Objects
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eebf446011d189700000e8322d00/content.htm

  • 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

Maybe you are looking for

  • How do I fix this run time error crash on start up?

    Whe I start Elements 10, it stops and waits at the "Organize" or "Edit" choice. (normal operation.) I chose edit and it crashes with a C++ run time error.

  • Why i cannot open a PDF file even with abobe 9

    why i cannot open a PDF file even with abobe 9

  • Setting session state post-authentication

    Hi all, This application uses DATABASE ACCOUNT authentication, and has a post-authentication process that sets a few application items using code such as apex_util.set_session_state('F_MY_ITEM', v_my_value);These items are used to secure certain tab

  • Nokia Lumia 822 Issues

    My phone has been acting up since yesterday afternoon.  When I click on phone, email, or texts, it goes to a loading screen and then reverts back to home.  It will let me go on facebook or instagram, strangely.  The back, home, search buttons and all

  • JDBC 4.0 Driver JDeveloper

    Oracle database 11g JDBC drivers support JDBC 4.0. But, JDeveloper does not support the JDBC 4.0 driver. Because JDeveloper is pre-configured with a built-in Oracle JDBC driver and if the ojdbc6.jar is used to connect to Oracle database an error gets