Select single for update not creating lock on entry

Hi All,
I want to update an entry from MARA table so what ii did is
select single for update *   from mara where matnr = 'ZYS'.
The for update is supposed to create a lock  for me and the the lock is released after the commit or roll back.
I'm running this prg in debug mode and after the statment
select single for update *   from mara where matnr = 'ZYS''.
I opened MM02 for this material and could change the data which i'm not supposed to be as there is lock on this particular mater from single for update statemnt
or
I even tried from other program
select single  *   from mara where matnr = 'ZYS'. in debug mode and it returned a sy-subrc eq 0.
and i don't see a lock in SM12 FOR SELECT * FOR UPDATE.....
Can anyone clarify on this
Thanks
David

Hi All,
I knew we can create a lock object but thought to give a shot without creating lock object.
So i'm just curious to know when we can use select * for update
F1 Help says select * for update creates an E type lock- which will prevent other locks(X AND S type locks) overwriting or even reading that entry
Also ,
can someone throw some light DB lock and SAP Lock ( is this same as SAP LUW and DB LUW)
Thanks
David

Similar Messages

  • Use of SELECT SINGLE FOR UPDATE

    Hello,
    Am I missing something with FOR UPDATE addition in Open SQL? When I use it I can't get a lock to appear to SM12. For example, if I select a single record for update from table EKKO it's still possible to effect a normal MEPO update of the releavnt purchase order even before a COMMIT WORK command in my code.
    Any ideas?
    Thanks,
    Chris.

    Hello Chris
    FOR UPDATE command creates only a database lock,
    you can't see database locks in sm12.
    You should use related "lock object"  to lock entries in table EKKO with sm12
    For finding the lock object follow steps below :
    - Go to transaction se11
    - Write your table EKKO
    - Click button : Where Used List
    - Choose only "Lock object" in the next popup screen
    Every lock object has two function module ENQUEUE_<LOCK OBJ NAME> and DEQUEUE_<LOCK OBJ NAME>
    enqueue function creates lock in sm12 and dequeue deletes lock entry from sm12.
    And you can display parameters from se37 and use it.
    I hope it helps.

  • Oracle select for update: not releasing lock

    My JDBC code uses "select for update" to modify record in Oracle database. I tried to simulate network connection down situation.
    After my JDBC code locked on a record using "select for update", I unplugged the network cable. I then tried to run the same code on another computer, but it could not accquire the lock, because the previous lock was not released. I tried sqlplus to lock the record, but failed also. The lock has been there for at least an hour now. I guess it may finally be released, but is there a way for oracle to release the lock as soon as the connection is down? Not know if it is a JDBC setting or oracle setting.

    Dear Friend,
    What you are trying to do is not correct way of checking the concurrency and transaction.
    The reason is as listed below.
    01.Always remember http is a stateless protocol and removing the connection or just closing the browser will never be informed to the database or to the application server thus the transaction monitor (TM)or processor will never release the lock as it will deem that the actor is manipulating the data.
    02.As per locking goes every database is having a �TM� and the default isolation level setting is different like oracle uses serializable DB2udb 7.0 or db2/As400 uses repeatable read. You can change this setting by editing the default setting in the database but be very sure before touching it.
    03.     You can also transpose this with your Application server setting for that piece of code or Globally but again be very sure about it as it will change the entire gamete.
    04.     For releasing lock you have to manually do it or you can change the settings of App server or the Database to release the connection after some wait time.
    Regards,
    Ruchir

  • SINGLE FOR UPDATE

    Hi,
    can anybody tell me the user of "SINGLE FOR UPDATE" keywords in SELECT statement?
    Priya

    As given by SAP -
    ... SINGLE [FOR UPDATE]
    If SINGLE is specified, the resulting set has a single line. If the remaining additions to the SELECT command select more than one line from the database, the first line that is found is entered into the resulting set. The data objects specified after INTO may not be internal tables, and the APPENDING addition may not be used. The addition ORDER BY can also not be used.
    An exclusive <b>LOCK</b> can be set for this line using the FOR UPDATE addition when a single line is being read with SINGLE. The SELECT command is used in this case only if all primary key fields in logical expressions linked by AND are checked to make sure they are the same in the WHERE condition. Otherwise, the resulting set is empty and sy-subrc is set to 8. If the lock causes a deadlock, an exception occurs. If the FOR UPDATE addition is used, the SELECT command circumvents SAP buffering.
    LOCK - Lock protected data from being accessed by several users at the same time as a shared lock or as exclusive locks
    Regards,
    Amit
    Reward all helpful replies.

  • When should SELECT ..FOR UPDATE be used?

    DB Version:10gR2
    This is what 10gR2 PL/SQL documentation says about SELECT...FOR UPDATE
    With the SELECT FOR UPDATE statement, you can explicitly lock specific rows of a
    table to make sure they do not change after you have read them. That way, you
    can check which or how many rows will be affected by an UPDATE or DELETE
    statement before issuing the statement, and no other application can change the
    rows in the meantime
    But i don't see SELECT...FOR UPDATE much in our production codes. Is SELECT ..FOR UPDATE used when huge amount of rows need to be updated?

    Its maily used for locking table with differnt node , commely this concpet where used in
    ERP products, bcoz different user can acces same table at time and do some DML
    operation, using FOR UPDATE will protected ,
    before that read this
    hb venki

  • Parent could not create lock ???

    Hi,
    Please Im testing the Apache plug-in mod_wl_20.so from Weblogic9.1.<br>
    <br>
    I've followed the instructions very carefully but still can not run it with an Apache2 server.<br>
    <br>
    I have tried for about 10 hours! <br>
    <br>
    I allways hit on this error in my apache log, when it loads the weblogic module:<br>
    <br>
    [Tue Dec 27 03:12:10 2005] [crit] (2)No such file or directory: mod_weblogic: Parent could not create lock
    Configuration Failed<br>
    <br>
    <br>
    Now, I dont know what this means?<br>
    <br>
    <br>
    Is it the LOCKFILE ?? as in:
    # ./apachectl -V<br>
    Server version: Apache/2.0.52<br>
    Server built: Jan 8 2005 01:51:11<br>
    Server's Module Magic Number: 20020903:9<br>
    Architecture: 32-bit<br>
    Server compiled with....<br>
    -D APACHE_MPM_DIR="server/mpm/prefork"<br>
    -D APR_HAS_SENDFILE<br>
    -D APR_HAS_MMAP<br>
    -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)<br>
    -D APR_USE_FCNTL_SERIALIZE<br>
    -D APR_USE_PTHREAD_SERIALIZE<br>
    -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT<br>
    -D APR_HAS_OTHER_CHILD<br>
    -D AP_HAVE_RELIABLE_PIPED_LOGS<br>
    -D HTTPD_ROOT="/usr/apache2"<br>
    -D SUEXEC_BIN="/usr/apache2/bin/suexec"<br>
    -D DEFAULT_PIDLOG="/var/run/apache2/httpd.pid"<br>
    -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"<br>
    <b> -D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"</b><br>
    -D DEFAULT_ERRORLOG="logs/error_log"<br>
    -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"<br>
    -D SERVER_CONFIG_FILE="/etc/apache2/httpd.conf"<br>
    <br>
    Also my httpd.conf specify the:<br>
    <b>LockFile /var/apache2/logs/accept.lock</b><br>
    <br>
    But in both cases, the directory exists and the user has write permission (Ive set the entire directory as 777 permission).<br>
    <br>
    I dont think it is the problem in it, but in weblogic_mod as it stops there. Everything run fine without the wls mod.
    <br>
    <br>
    Please ADVICE.
    <br>
    Great thanks.<br>

    <p>Hello,</p>
    <p>Make that you remove any existing var/run/apache2/accept.lock file before restarting Apache.</p>
    <p>If var/run/apache2/accept.lock is not created after you start Apache, then experiment with different locations for this file.</p>
    <p>Make sure you do not give the location of an NFS share.</p>
    <p>
    Hussein Badakhchani</br>
    </p>

  • WL Server & apache 2 integration: mod_weblogic: could not create lock

    Hi,
    we're running Apache 2.0.50 as a front-end for WL Server 8.1 using mod_weblogic as the proxy.
    We have to run Apache as a different user than the default LocalSystem account to be able to access a windows share. But when we set up Apache to run as a user (in the windows domain) the server will not start up. Looking at the error log I can see the following message:
    [Wed Jan 26 16:10:37 2005] [crit] (OS 5)Access is denied. : mod_weblogic: could not create lock
    The user has administrative rights on the server so I'm not really sure why mod_weblogic can not obtain a lock.
    What is the lock it's trying to obtain?
    Thanks.
    Ruairi

    Hello,
    has this been resolved by anyone in the meantime? I'm running into the same kind of problem. Here's my setup:
    Apache 2.0.55, on Solaris 8
    mod_wl_20.so, from Bea Weblogic Server 8.1 SP 2
    When I have the following line in my httpd.conf file:
    LoadModule weblogic_module modules/mod_wl_20.so
    I receive the following error in Apache's error log file:
    [timestamp] [crit] (13)Permission denied: mod_weblogic: could not create lock
    I am currently not running Apache as root. Without the weblogic module, it works fine.
    I guess my main question is: what kind of lock is it trying to obtain? Changing the AcceptMutex parameter in Apache does not seem to help.
    Regards,
    Ralf

  • When I select "Check for updates..."

    Dear Firefox,
    When I select "Check for Updates" the pop up screen simply notes that my system is "Downloading update" but nothing ever happens.
    Please let me know what I can do to fix this.
    Thank you,
    Lee

    You can download the latest Firefox 4 beta version from http://www.mozilla.com/firefox/all-beta.html
    Trash the current Firefox 4.0b7 version and install the latest beta.

  • CJ36 -BP - 164 - Capital investment budget exists for & - update not allowe

    Hello Friends,
    We are trying to post supplements using CJ36 for a WBS,but the system giving the error message saying that
    " BP - 164 - Capital investment budget exists for & - update not allowed"
    Please give some idea on this.
    Thanks IN Advance
    Best Reagdrs
    Trupthi

    Hi,
    Even though CJ35 and CJ38 are both transactions to perform budget returns, it is important to know that they are working slightly different:
    a) via txn CJ38 you return money exactly for the WBS elements you indicate an amount for. So if you indicate 1 COP for
       WBS element XX alone, the return is only being carried out for this WBS element. Since this WBS element is
       not (directly) attached to an investment program position, this is not a problem.
    b) via txn CJ35, however, as per system design you return money for the WBS element you indicate  p l u s  for all WBS elements lying on the hierarchical path above, in order to guarantee that the budget remains consistent (= check error free).
       So by indicating 1 COP for WBS element XX, the system  also  tries to return the same amount from the overlying WBS element YYY.
    Since this WBS element, however, i s  attached to investment program position of investment program, the system blocks this posting because this program position forsees budget distribution and thus budgeting is allowed via budget distribution  o n l y  (txn IM52) -  see e.g. F1 help for indicator 'Budg.dist. ovrl' in the master of the investment program position.
    So basically you can say that txns CJ35 and CJ36 are not suitable for projects attached to investment program positions that forsee budget distribution. Please check your transaction IM52.
    Please check if this fits with your scenario.
    Best Regards,
    Vanessa.

  • Error occuring in SELECT statement FOR UPDATE when using WITH cluase

    Hi,
    Iam using oracle 11g version
    Iam having a query with fetch records for update insid with cluase as
    cursor c1 is
    With abc as (
    SELECT col1,col2 from table1, table2 where < condition>
    for update of <col1> skip locked
    select * from abc,table3 where <condition>
    union all
    select * from table4 where id not in (select * from abc)
    if i add "for update of <col1> skip locked" this cluase
    iam getting error ORA-00907: missing right parenthesis
    when i remove "for update of <col1> skip locked" the block is working fine..
    can i know why error is occuring i

    Hi, first of all, your placing of "for update" clause is wrong. It should be at the end like:
    With abc as (
    SELECT col1,col2 from table1, table2 where < condition>
    select * from abc,table3 where <condition>
    union all
    select * from table4 where id not in (select * from abc)
    for update of <col1> skip locked;Second, if you try to compile it with this syntax then you will get a new error.
    ORA-01786:     FOR UPDATE of this query expression is not allowed
    Cause:     An attempt was made to use a FOR UPDATE clause on the result of a set expression involving GROUP BY, DISTINCT, UNION, INTERSECT, or MINUS.
    Action:     Check the syntax, remove the FOR UPDATE clause, and retry the statement.So, you will not be successful with the union clause in your query.

  • 'Missing select' error for update statement using WITH clause

    Hi,
    I am getting the below error for update statement using WITH clause
    SQL Error: ORA-00928: missing SELECT keyword
      UPDATE A
      set A.col1 = 'val1'
         where
      A.col2 IN (
      WITH D AS
      SELECT col2 FROM
      (SELECT col2, MIN(datecol) col3 FROM DS
      WHERE <conditions>
        GROUP BY PATIENT) D2
      WHERE
      <conditions on A.col4 and D2.col3>

    Hi,
    The format of a query using WITH is:
    WITH  d  AS
        SELECT  ...  -- sub_query
    SELECT  ...   -- main query
    You don't have a main query.  The keyword FROM has to come immediately after the right ')' that ends the last WITH clause sub-query.
    That explains the problem based on what you posted.  I can't tell if the real problem is in the conditions that you didn't post.
    I hope this answers your question.
    If not, post a complete test script that people can run to re-create the problem and test their ideas.  Include a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    In the case of a DML operation (such as UPDATE) the sample data should show what the tables are like before the DML, and the results will be the contents of the changed table(s) after the DML.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Check for Update not finding 1.2.1 patch

    Hi,
    I am trying to understand why my "Check For Update" doesn't appear to be able to find the latest patch 1.2.1 update.
    I completed the upgrade to 1.2 via the "Check for Updates" screen which installed and then restarted on XP Pro.
    In Help->About I now see Version 1.2.0 Build Main 29.98
    When trying "Check for Updates" with the following checked :
    - Official Oracle Extension and Updates
    - Oracle SQL Developer (URL pointing to p=38606:2 not raptor:updates)
    It returns with "No Updates available".
    Interestingly if I de-select Official Oracle Extension and Updates, then it returns with the Oracle Data Mining PL/SQL package (which didn't appear with both selected) but still no update.
    I've tried restarting and still get the same result.
    Is it possible to download just the zipped patch file and perform "Install from local File"? I couldn't find a link to this on the Developer download URL- just links to seemingly full versions (i.e. a large Mb file).
    Kind regards,
    Andrew

    thanks k - that worked a treat
    I guess the clue was in the 1.5.1 part of the directory name - now I see it I would have chosen the 1.5.0 directory to migrate from. Duh!
    It was early in the morning when I upgraded :)
    /excuse

  • Check for updates not working in 9 pro

    I am running Acrobat 9 pro on a Vista machine. Acrobat appears to have been malfunctioning (bates numbering is not working properly), and I uninstalled (and deactivated) Acrobat, and then reinstalled it.
    After reinstallation, I used the check for updates feature in the help menu to update from 9.0 to 9.2. But now every time I run Check for updates from Help, nothing updates. I get a dialog that there is an available update, and then an icon System Tray appears and a process is active for AdobeARM.exe. But nothing ever happens-no update. I then force close the process from the task manager, and still no success in getting Acrobat to update.
    What can I do? Thanks very much.

    LeoAdobeX:
    Thank you for your rely. Here is the more detrailed info:
    1. I pulled down the Help menu and chose Check for Updates.
    2. A dialog appeared that said an update was available; I clicked on the button that indicated I wanted to download and install the update
    3. Nothing further appeared onscreengiving my information or choice, but an incon then appeared in the system tray for the installer.
    4. Hovering over the icon does not pop up any status information. If I click, double click, or right click on the incon in the system tray nothing pops up, and nothing appears. At that point I get absolutely no response.
    5. If I go to task manager at that point it shows the active process AdobeARM.exe and gives no indication of it malfunctioning. But nothing installs and nothing downloads and nothing happens.
    6. If I then pull down the Help menu and chose Check forUpdates again, I get a dialog that says the updater is already running.
    7. All of this occured immedaitely after I reinstalled 9 pro.
    I hope this additional info helps. Thanks very much.

  • Com.bea.xml.XmlException error for "could not create child element"

    In Workshop 9.2, after I created a project with XMLBeans Builder Builder against the xsd's and created a web service control against a wsdl, I inserted the control in a client project for consumption. However, when calling into a method of the control, I got a com.bea.xml.XmlException, saying "could not create child element" for an object parameter passed in the call to the method. The relevant info in the server console looks like this:
    Caused by: com.bea.xml.XmlException: could not create child element 'wirelessPhoneNumber' for Wrapped XMLBean operation on '<?xml version="1.0" encoding="UTF-8
    "?><m:sendSMSMessage xmlns:m="http://service.xyz.com/provider/mobile/abc/sendSMSMessage/200701/"><ns:behaviorVersion xmlns:ns="http://service.xyz.com/entity/message/2003/">0</ns:behaviorVersion><ns:custNbr xmlns:ns="http
    ://service.xyz.com/entity/party/2003/">Hello</ns:custNbr></m:sendSMSMessage>'
    Does any have an idea what this is trying to tell me?
    Thanks in advance for any help,
    Jason

    Looking into it further, I think it's the parameter wirelessPhoneNumber, which is a complex type from xsd and a java object passed to the call sendSMSMessage, that is having a namespace problem, or other problem.
    This parameter object was from XMLBeans java binding. I created and set it up like this before passing it to the call:
    PhoneNumberType phoneNumberType = phoneNumberType.Factory.newInstance();
    phoneNumberType.setFormat(PhoneNumberFormatEnum.FREEFORM);
    phoneNumberType.setFullNumber(phoneNumber);
    Obviously, com.bea.xbeanmarshal.buildtime.internal.util.XmlBeanUtil.createWrappedXBeanTopElement of XmlBeanUtil.java had a problem creating a wrapper element for it.
    Any clue from anyone?
    Jason

  • When I try to select "Check for update" (iPhone 4s - iOS 5.0.1), Error message 1630 appear. What is wrong with my iphone or itune?

    I am using iPhone 4s with iOS 5.0.2.
    Just updated to the lastest iTune 10.5.1.
    When i click Check for Update on the iTune, the above error shown:
    "iTunes could not check for an update to the carier settings for your iphone. Unknow error occured (1630)"

    Also, Settings > General > About > Diagnostics & Usage is FULL of error reports relating to Twitter. :/

Maybe you are looking for

  • Can I use my icloud email address as my Apple ID?

    Hi, I have tried searching for an answer to this but couldn't find one.  To me, it would seem like the logical thing to do.  The reason I ask, however, is that when you go to create an Apple ID it states the two criteria are (1) it has to be a verifi

  • ID3 tags - I can't be the only one

    iTunes 7.7.0.43, fully patched XP Pro SP3. "M:" drive on file server contains 4500 songs. Full read/write access. ID3 tags simply do not work in iTunes. I have "Convert ID3 Tags..."'d to "None" dozens of times for the whole library and have attempted

  • HTML viewer component based on Java AWT ?

    Who knows about projects/sourcecode/etc. for a browser component based on only AWT and NO SWING ? I only need a simple HTMLViewer which does not use Swing (restriction because I want to run it on PDA with PersonalJava). I do not necessarily need a fu

  • My iPad will mirror music through my Apple TV but not my keynote presentations

    My iPad will only airplay music through my apple tv keynote will not mirror. I'm kind of confused because I just mirrored in our classroom at work Friday with no issues at all. Any suggestions.

  • Charging a Shuffle on a PC without iTunes/iPod software???

    Can i charge my iPod Shuffle on a Windows PC/Notebook, that does NOT have iPod Software or iTunes installed on it???