Want to lock objects in a particular devlopment class

Hi Experts,
I have a scenario where we are moving certain objects to a new development class - 'NEW_DEVCLS", and we have to make sure that these objects are not allowed to be edited..
That is, it should throw a lock or not authorised message to developers if they try to edit the objects in development class -'NEW_DEVCLS",
Can u pls help me on this,
Thanks in advance,
Regards,
Kalpana

i think  this is more a question for the abap forum
M.

Similar Messages

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

  • Saving a lock object

    hi every body,
    I am trying to creat a lock object in se11, but after i gave the respective primary and secondry table , when i am trying to save the lock object to the user defined package , it is saying that "ENQU E_LOCK" can not be assigned to package "ZMOUNI".
    Please help me out.
    Thanks in advance,
    regards,
    mouni.

    Hi,
    You can assign a development class/package to save your lock objects.
    I think in this case , you are trying to assign the lock objects to a local dev. class which will not work.
    Hope this helps!
    Sandeep

  • Lock Object. Want to see if it's locked.

    Hello to everyone.
    I have got a question about lock objects.
    There is a Z-table in abap dictionary. During the processing of my report some strings from this Z-table are selected. To select strings i use the SELECT statement. But there can appear the situation when two users ( or more)  run my transaction, so the same strings can be selected and then processed. To avoid this situation i've created the lock object with cumulative lock mode ( 'X' ) for this Z-table and put the calling of ENQUEUE function into the code. To test the locking i' ve run my report under two different accounts in the debugging mode. And found that when the  enqueue function is finished , and the current string should be locked in theory, this string can be easily selected with help of select-statement under another account. (Even when the transactions start with delay.)
    How can i lock the string in the Z-table so that it could be selected only once during the earlier  launched transaction?
    Regards,
    alex karpo.

    Ho alex,
    SAP locking is a cooperative locking model. That means that you have to care for what is possible and what is not possible. You may use enqeue module to set lock for key of every object selected.
    If there is already a foreign lock, you should delete the entry from the list or table of selected objects (in memory, not in database).
    Or do it as SAP does: If there is a foreign lock, the user is informed and the data can be displayed, not changed.
    You can always check the lock by trying to set a lock.
    Regards,
    Clemens

  • Lock object is not working automatically

    Hi experts,
    i have a problem , A table is updated by a program which is used by multiple user . I have used lock function module 'ENQUEUE_E_TABLE ' and 'DEQUEUE_E_TABLE' for that . when updation section occurs first user which come first go through it and for rest users amessage cones 'table is locked by XYZ user' . When first completes the updation resr users is not updating automatically they stand at that position where message comes. How to solve this issue?
    Avadhesh Chandra

    Hi,
    We can lock the table before updating the entries. Two types of locks are there.
    1. To lock the entire table. Here when the table is locked by one program, another program will not be able to modify it.
    2. To lock the particular record only. Here when the record is locked by one program, the other program can modify records other than the one locked.
    For option 1
    Use the FM ENQUEUE_E_TABLEE to lock the table and FM DEQUEUE_E_TABLEE to unlock table.
    For option 2
    Go to SE11. There enter the name of your lock object and create it. Next screen you have to mention which field you want to lock.
    For more info. on LOCK OBJECTS go to
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    If you want to lock the entire table, then use the FM said in option 1 in DO-ENDDO loop. 
    Run the loop till it gets successful (sy-subrc = 0)
    DO.
    *Call the FM.
    IF sy-subrc = 0.
        EXIT.
    ENDIF.
    ENDDO.
    If you want to just try some number of times rather than keep on looping then can use for eg: DO 100 TIMES.

  • How to use lock object? what we lock either total ztable or only record?

    Hi
    How to use lock object? what we lock either total ztable or only particular record?
    Don't tell create lock object on se11 with E letter & acll it in program with eENQUEUE & DEQUEUE.
    just tell me we will lock only particular record or total ztable?
    specify with example.
    Thanks.

    Hi
      Go to SE11, in the option 'Lock object' enter the name of your lock,
    begin with 'E', suppose 'EXXXX' And create. In tab 'Tables' fill the
    table name where the record you want to lock exist and select the
    lock mode. Lock mode can be shared and exclusive. If 'shared',
    when you lock the record, other can also read data, but can not
    modify. If 'exclusive', when you lock the record, other can neither
    read nor modify the record. After save and activate, you will get two
    function module.'ENQUEUE_EXXXX' to lock record,
    'DEQUEUE_EXXXX' to release lock on one record.
    When use this function module it only lock one record at a time. It
    does not lock the table.

  • How to create a lock object in se11

    hi all,
    Can anyone tell me the step by step procedure to lock as well as unlock a particular object in se11 trns code. with an real time example.
    thanxs in advance
    hari

    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.
    Creating Lock Objects
    Procedure
    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. There are also some restrictions on the valid foreign key relationships.
    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.
    6.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.
    7.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.
    8.Save your entries.
    A dialog box appears in which you have to assign the lock object a development class.
    9.You can (optionally) exclude lock parameters (see lock objects) from the function module generation on the Lock parameter tab page. This makes sense for example if you always want to lock a parameter generically.
    To do this, simply deselect the Weight flag for the parameter. The parameter is not taken into consideration in the generated function modules. This parameter is then always locked generically.
    9.The name of a lock parameter is usually the name of the corresponding table field. If two fields with the same name are used as lock parameters in the lock object from different tables, you must choose a new name for one of the fields in field Lock parameter.
    10.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.
    11.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.
    12 .Choose Activate .
    Result
    When you activate the lock object, the two function modules ENQUEUE_<lockobjectname> and DEQUEUE_<lockobjectname> are generated from its definition to set and release locks.
    You can find information about the activation flow in the activation log, which you can display with Utilities Activation log. If errors occurred during activation, the activation log is displayed immediately.
    Pls reward points.
    Regards,
    Ameet
    Message was edited by:
            Ameet Jassani

  • Locked Objects

    Hi,
    I want to ask is that if i can find any objects in the V$locked_Object then do i need to kill those sessions always????
    The thing is when i see some objects in the locked_objects i am looking for the query which is locking the object. But after some that that sesssion removed from V$locked_Object
    Sometimes if i track any locked object and find the query related to it that time query is normal query of SELECT.
    1. So do i need to worry about it to resolve lock? And always i need to kill that session which is in V$Locked_Object.
    2. Also please let me know how can i check which SQL statements in a day locking objects in the database Can we check this one?
    Please give any idea about.

    DBA_BLOCKERS lists the sessions that hold a lock that another session is blocked on a request for. DBA_WAITERS lists the sessions that are blocked requesting a lock that some other session holds. Are you seeing any rows in these tables? If we're talking about a bunch of sessions that are taking out row share locks, for example, there's nothing to be concerned about because those aren't (generally) going to block anyone else.
    If you are, are the blocks resolving themselves? A session that takes out a lock might block another session temporarily, but as long as the blocker finishes its processing and releases the lock within a reasonable time frame, the waiter should be able to continue after the lock is released. There may be options to redesign the application so that the blocker locks fewer objects/ fewer rows/ holds the lock for less time in order to decrease contention, but certainly nothing that would require DBA intervention.
    The case where a DBA needs to be involved is when
    - A session takes out a lock that is capable of blocking other sessions
    - For whatever reason, that session fails to release the lock
    - One (or more) other sessions are blocked waiting for the lock to be released
    The classic example of this would be an application that was poorly designed to do pessimistic locking and to hold locks across user interactions. So if an application does a SELECT FOR UPDATE to lock a particular row and holds that row while waiting for a human to do something, but the human decides to go to lunch/ work in a different application/ go on vacation, every other user that tries to lock that same row is going to block, which can be highly unpleasant.
    Justin

  • How to get the connected Adapter Object for a particular BDoc Type?

    Hi All,
    I have a scenario in which CRM system is connected to ERP system.
    In SMW01 transaction, I can see one BDoc with BUS_TRANS_MSG as the BDoc Type in CRM.
    Now, how do I get to know if this one BDoc is a SALESDOCUMENT or SALESCONTRACT.
    Is there any way thorough which I can get to know the Adapter Object for this particular BDoc.
    Regards,
    Madhuri

    Hi Madhuri,
               Happy new year.
    In Transaction : R3AC1.
    You can observe the Linked BDOC for the adaptor objects. For example Sales docuemnt and Sales contrcat will have the same linked BDOC as "BUS_TRANS_MSG".
    If you see an error in SMW01, you want to find whether it is salesdocument or contract.
    1. Please take the Queue name from SMW01.
    from the queue name you can find whether it is sales contract or sales document.
    Queue name is customized in tables: SMOFQFIND.
    I hope this helps you.
    regards,
    Sri...

  • Report to find Locked objects in sap system

    Hi All,
    does anyone know the report to find out the locked objects in an sap system?
              or
    name of the table that stores locked objects ?
    or any other way through which we can find the number of locked objects ?
    Thanks and regards
    Abdul Hadi

    Hi,
    You can unlock locked objects in transaction SE03.
    Click on Display Repaired objects.
    You can see all the objects that are locked.
    To unlock you can select the particular object and click on Unlock.
    Do reward points if the answer to your question is met.
    Regards
    Suhas

  • Lock objects to text

    Does anyone know of a way to lock floating objects to text in a Pages09 document? I love the way Pages deals with floating objects, so much better than Word, but I'd like to be able to lock individual or grouped objects (images, text boxes) to a specific paragraph, so they move together during editing. I see how to lock objects to a specific location on a page, but this is not what I want.

    What you are requesting is called an anchor and it is a feature that I too wish Pages had. For now, if you want an object to flow with our edited text, the only choice is an inline object. However I have found that either Pages 09 has better inline text wrapping or I totally missed that Pages 08 got it. Try placing an object inline, setting its text wrapping to on, and then play with the options. You might find that you can get what you want this way.
    I'm in the midst of creating a large set of tutorials with lots of pictures of menus, palettes, and the like. Each tutorial is from 5 to 12 pages long. Even though I'm not getting the exact placement I want using this method, it is close enough for me to use while I'm writing and editing. When I'm finished with a tutorial I've been going back and making some of them floating objects again and tweaking their locations a bit. A bit of a kludge but we work with what we've got, eh?

  • Any way to lock objects in stateless app?

    Hi Guys
    Firstly: I know... I know... Once the stateless request has completed, the "session" is destroyed along with any locks etc. But how do you handle situations where you need to keep a more persistent lock on an object across stateless invocations?
    For example: Our stateless app allows you to update a customer record. I want to prevent someone from going into XD02 (or use our BSP app) to update the same record...
    Any thoughts greatly appreciated!

    I had a little bit of time so I tried my shared memory idea and unfortunetely it didn't work. I can lock from within my shared memory class, however the locks are released as soon as the detatch_commit() of the area is called.  When I look in the debugger I see something even more interesting.  If I look at references to my object while my write program is running I see that the object is of my class type: ZCL_SDN_SHARED_ROOT and that it is referenced by the running program and also referenced as the following: KERNEL=
    Now if I follow the debugger out of the execution of my program into the calling stack, I can see that my object reference still exists.  If I look at the references, I still have two of them.  One is the Kernel still, but the program's reference is gone.  Now I have the following reference as well:
    .  This must be the reference to my Root instance in my shared memory area. 
    This is the really interesting part.  If I drill into the object display of my root class instance it no longer displays as type CLASS=ZCL_SDN_SHARED_ROOT.  It is now as follows:  .  It is as though the root instance isn't actually stored in Shared memory, just some meta model description of the object instance.  This could very well explain why you can't persist locks or other ABAP Object References inside a shared memory class.

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

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

Maybe you are looking for