LOCKING HELP

PLZ GIMME A PROG WHICH EXPLAINS D LOCKING TECHNIQUE USED IN ABAP
PLZ ALSO PROVIDE A DETAILED EXPLANATION.

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
Regards,
Sruthi

Similar Messages

  • Hi. Does using the cover lock help battery life?

    Hi. Does using the cover lock help battery life?

    The quickest way (and really the only way) to charge your iPad is with the included 10W USB Power Adapter. iPad will also charge, although more slowly, when attached to a computer with a high-power USB port (many recent Mac computers) or with an iPhone Power Adapter (5W). When attached to a computer via a standard USB port (most PCs or older Mac computers) iPad will charge very slowly (but iPad indicates not charging). Make sure your computer is on while charging iPad via USB. If iPad is connected to a computer that’s turned off or is in sleep or standby mode, the iPad battery will continue to drain.
    Apple recommends that once a month you let the iPad fully discharge & then recharge to 100%.
    How to Calibrate Your Mac, iPhone, or iPad Battery
    http://www.macblend.com/how-to-calibrate-your-mac-iphone-or-ipad-battery/
    At this link http://www.tomshardware.com/reviews/galaxy-tab-android-tablet,3014-11.html , tests show that the iPad 2 battery (25 watt-hours) will charge to 90% in 3 hours 1 minute. It will charge to 100% in 4 hours 2 minutes. The new iPad has a larger capacity battery (42 watt-hours), so using the 10W charger will obviously take longer. If you are using your iPad while charging, it will take even longer. It's best to turn your new iPad OFF and charge over night. Also look at The iPad's charging challenge explained http://www.macworld.com/article/1150356/ipadcharging.html
    Also, if you have a 3rd generation iPad, look at
    Apple: iPad Battery Nothing to Get Charged Up About
    http://allthingsd.com/20120327/apple-ipad-battery-nothing-to-get-charged-up-abou t/
    Apple Explains New iPad's Continued Charging Beyond 100% Battery Level
    http://www.macrumors.com/2012/03/27/apple-explains-new-ipads-continued-charging- beyond-100-battery-level/
    New iPad Takes Much Longer to Charge Than iPad 2
    http://www.iphonehacks.com/2012/03/new-ipad-takes-much-longer-to-charge-than-ipa d-2.html
    Apple Batteries - iPad http://www.apple.com/batteries/ipad.html
    Extend iPad Battery Life (Look at pjl123 comment)
    https://discussions.apple.com/thread/3921324?tstart=30
    New iPad Slow to Recharge, Barely Charges During Use
    http://www.pcworld.com/article/252326/new_ipad_slow_to_recharge_barely_charges_d uring_use.html
    Tips About Charging for New iPad 3
    http://goodscool-electronics.blogspot.com/2012/04/tips-about-charging-for-new-ip ad-3.html
    Prolong battery lifespan for iPad / iPad 2 / iPad 3: charging tips
    http://thehowto.wikidot.com/prolong-battery-lifespan-for-ipad
    iPhone, iPod, Using the iPad Charger
    http://support.apple.com/kb/HT4327
    Install and use Battery Doctor HD
    http://itunes.apple.com/tw/app/battery-doctor-hd/id459702901?mt=8
    In rare instances when using the Camera Connection Kit, you may notice that iPad does not charge after using the Camera Connection Kit. Disconnecting and reconnecting the iPad from the charger will resolve this issue.
     Cheers, Tom

  • Our students have entered passcodes when downloading ios 7 update and now ipads are locked, help!

    Our students have entered passcodes when downloading ios 7 update and now ipads are locked, help!

    If the iPad is running iOS 7 and the kid set up Find My IPad, then you can't restore it without the kid's Apple ID and password. The Activation Lock is a feature that people whined and whined to get, and is causing exactly the sort of problems many of us predicted when people were clamoring for it. If you can't get the kid's Apple ID, you'll have to call Apple Support and ask if they have any sort of workaround. My guess is that they'll have to replace the iPad, but they may have a solution they don't talk about publicly.
    This won't help for iPads currently locked for which you can't get the Apple ID, but if before you give out iPads to your students you go into the Restrictions and disallow changes to the accounts, they can't then turn in Find My iPad. Or you can set up Find My iPad yourselves to your own accounts and then lock the Restrictions so they can't set iCloud up to an account to which you don't have the Apple ID.
    Regards.

  • Cannot install lion. "The Disk is Locked" help please!

    I was hoping someone could help me.  I just downloaded the Mac OS X Lion and when trying to install, it says there is an error with the disk and that it is locked and cannot install.  Does someone know how I can fix this?  Now I am also worried that I have lost my files.  PLEASE HELP!  Thank you!

    Try to Repair it, per #6 in  Using Disk Utility.
    If it's still locked, this might help: https://discussions.apple.com/message/11044944?messageID=11044944#11044944?messa geID=11044944

  • CAF Entity locking HELP

    hello
    I am doing some tests in WebDynpro and CAF Core services.
    I have a piece of code as below that retrieves an entity from CAF Core for update. I need this entity to be locked during the update but the two methods lock() and unlock() do nothing. I can still access for update the same entity instance from another user.
    This probably works if the transaction is happening within CAF service but I also need to lock entities from webdynpro when doing complex updates. In other words I am not willing to create a custom method in CAF service for each update I need to implement in webdynpro.
    Any advice ? How are we supposed to use the class com.sap.tc.col.client.generic.api.LockStrategy ? I did not find much about this api.
    Thanks in advance
    Vitaliano
      public void UpdateKAMInTransaction( )
        //@@begin UpdateKAMInTransaction()
         IServiceFacade serviceFacade = CAFServiceFactory.getServiceFacade(cplxmdlDefinition.class);
        String guid = wdContext.currentAKamElement().getGuid();
         AKam akam = MyAppProxy.readKam(guid);
         //locking is not working at all. concurrent changes are lost
         akam.lock(LockStrategy.EXCLUSIVE);
         //update a value here
         akam.setVersion(akam.getVersion() + 1);
         akam.getAspect().sendChanges();
         serviceFacade.save();
         //locking is not working at all. concurrent changes are lost
         akam.unlock();
         wdThis.wdGetAPI().getMessageManager().reportSuccess("done update AKAM=" + akam);
        //@@end

    Now I feel lost. Please keep helping a newby.
    I have implemented my custom method in CAF Services. Here I lock the entity, make all my chanegs, then update and return. I call this custom CAF Application Service method from WebDynpro.
    Nevertheless I noticed that concurrency can still happen. If more than one user updates the same entity at the same time, and exception is thrown in the log files but no exception is thrown. I.e. I cannot intercept the collision.
    in the log file a huge stacktrace is written, while the most interesting message is "javax.jdo.JDOUserException: optimistic transaction failed".
    So... what am I doing wrong here? Should'nt new locking just hold until the existing one is released?
    HELP!
    Vitaliano
         public java.lang.String myUpdateKam(java.lang.String guid, long newVersion) throws com.sap.caf.rt.exception.ServiceException
              // logging
              java.lang.String CAF_user = sessionContext.getCallerPrincipal().getName();
              java.lang.String CAF_methodHeader = MyAppBean.JARM_REQUEST + ":" + "myUpdateKam(java.lang.String, long)";
              Object[] CAF_parameters = new Object[] { guid, new java.lang.Long(newVersion)};
              com.sap.caf.rt.util.CAFPublicLogger.entering(CAF_user, MyAppBean.JARM_REQUEST, CAF_methodHeader, MyAppBean.location, CAF_parameters);
              java.lang.String retValue;
              try
                   //@@custom code start - myUpdateKam(java.lang.String, long)
                   //Read the BO and prepare for changes
                   retValue = "";
                   Kam kam = getKamService().read(guid);
                   char modeLock = IBusinessEntityService.MODE_WRITE;
                   try
                        //Lock BO before updating
                        try
                             getKamService().lock(kam.getKey(), modeLock, 3000);
                             retValue += "-lock-";
                        catch (CAFLockException e)
                             retValue += e.getMessage();
                        //Now do the update and commit
                        // =====> NOTE: regardelss if there is another update in progress,
                        // a concurrent update still gets down to here. WHY ?
                        long counter = kam.getVersion();
                        kam.setVersion(++counter);
                        getKamService().update(kam);
                        retValue += "-update-";
                   catch (CAFUpdateException e)
                        //This case is when concurrent update occurs
                        retValue += e.getMessage();
                   catch (Exception e)
                        //any other exception thrown?
                        retValue += e.getMessage();
                   finally
                        //Make sure we always leave our BO unlocked
                        try
                             getKamService().unlock(kam.getKey(), modeLock);
                             retValue += "-unlock-";
                        catch (CAFLockException e)
                             retValue += e.getMessage();
                   //@@custom code end - myUpdateKam(java.lang.String, long)
                   return retValue;
              finally
                   com.sap.caf.rt.util.CAFPublicLogger.exiting(CAF_user, MyAppBean.JARM_REQUEST, CAF_methodHeader, MyAppBean.location, CAF_parameters);
    This is the code in WebDynpro to invoke CAF custom method.
      public void UpdateKAMRemotely( )
        //@@begin UpdateKAMRemotely()
         IServiceFacade serviceFacade = CAFServiceFactory.getServiceFacade(cplxmdlDefinition.class);
         IAspect retValue = null;
         for (int i = 1; i < 101; i++)
              long newLong = wdContext.currentAKamElement().getVersion() +i;
              retValue = MyAppProxy.myUpdateKam(wdContext.currentAKamElement().getGuid(),newLong);
              IAspectRow row = retValue.getAspectRow(0);
              String retMsg = row.getAttributeAsString("value");
              wdThis.wdGetAPI().getMessageManager().reportSuccess("IAspectRow=" + row + "index="+i);
              serviceFacade.save();
        //@@end
    Message was edited by:
            Vitaliano Trecca

  • IPhone 5 from CPW LOCKED : HELP?

    I purchased an iPhone 5 from Carphone Warehouse on the second day of its release in the UK, as it was advertised as "SIM-free". I thought this meant that the phone was unlocked, because I paid £529 for the 16GB iPhone 5, which is the same price at which Apple sells its iPhone. Subsequent to this, I purchased an Orange 12-month contract for my iPhone, and everything was fine, until I started encountering problems with my Orange SIM card. I decided to purchase a Three SIM to use, at least until the problems with Orange were sorted out. When I inserted it into the phone, however, I was met with absolute horror - my iPhone did not accept this new SIM, saying something along the lines of it needing to be activated by the "original carrier".
    Upon further inspection, I discovered Carphone Warehouse had a hidden caveat - SIM-free simply meant it did not come with a SIM when sold. However, it did not mean the phone was unlocked, as it would lock itself to the first UK SIM placed inside it. Furthermore, the phone would cease to function with a non-UK SIM.
    This was absolutely ridiculous, and the aforementioned have caused me many problems of late. How should I go about unlocking my phone, so that I will be able to use it with any carriers, as well as outside the UK?
    Kind regards.

    Carphonewarehouse can't do anything about it.  Orange is the carrier that your phone is locked to and they are the only ones that can unlock your phone for you, so you'll have to wait 3 months and then pay them £20 to unlock it for you.
    The only thing that you can do is return the phone to Carephonewarehouse for a full refund if you are within the return period?  This would also mean that you would have to cancel your contract with Orange, but if you cancel a contract, you end up having to pay because effectively, if you cancel before your 12 months is up, you are buying yourself out of the contract.
    Carphonewarehouse can't really do anything to help you in this instance because they can't unlock the phone for you either, only Orange can do that.  They have not mis-sold you a phone either because they will say that you purchased the phone SIM free which is not the same as unlocked.
    You have 2 choices here:-
    1.  Keep the phone and keep your contract with Orange and stay with them for the required 3 month period and then pay them £20 to unlock the phone for you and then you can use it however you want.
    2.  Go back to Carphonwarehouse and if your phone is still within the return period, return it to them for a full refund and cancel your contract with Orange.  Then start again and purchase a new and fully unlocked iPhone 5 from Apple directly and away you go.
    Of those 2 options though, number 1. would probably be the most sensible now.

  • Error message: "The iTunes Music Library file is locked" Help?

    I made the stupid mistake of disconnecting my iPod nano when it said "Don't Disconnect". Now when I try to open iTunes, it says that the Music Library file is locked. How am I supposed to unlock it?

    I had a similar problem when iTunes froze up on me. It seems like the solution to the problem changes every time. Anyways, another way to solve it, is instead of changing the permissions on the library files, select "get info" on the application icon itself, and then modify the permissions. Even though it may say that you have "read and write" permission, just reselecting it should do the job.
    Hope this helps,
    Stephen

  • **Required File is Locked** - help!

    Hello everyone!
    Help needed please!
    Have a new laptop and have installed the new Itunes. However i cant use my ipod as everytime i connect it says the following:
    "cant update JP tunes - the required file is locked"
    Nitemare!!
    Other ipods work on my computer fine. Also i have used my ipod on different computers over the years - but that has never been an issue!
    I have checked my settings etc but cant find anywhere to 'unlock' a file!
    Its really annoying coz i cant play my music or update anything new on my ipod!!!
    Any ideas anyone!!!??
    Cheers!
    JP

    As a side note -- it appears that it may be an issue because my music and photo files are all saved on an external hard drive.
    I copied a photo file and put it on my desktop - and the photos synced.
    However -- the music files were on the external hard drive and those synced fine with no errors. Pictures on the external hard drive, did not.
    Prior to the iTunes upgrade, everything synced fine from my external hard drive.
    Anyone?

  • Mega Player 515 - LOCKED - HELP

    Wow, back after 4+ years. Hilarious (and awesome) to see my solution is still sticky up there:P
    Anyway...
    A couple of weeks ago, my ancient (but beautiful) 515 started locking up whenever I turn it on.
    Meaning, regardless of whether the actual LOCK is in place, regardless of number of songs, FAT/FAT32.
    It locks up like 99/100 times and then it turns on like nothing happened. I can't isolate the reason... Any ideas?
    It shouldn't be due to the LOCK key as it's not loose at all, and when the player is actually on it can stay on for hours/days with all the keys perfectly usable. It helped me a couple of times to do a full format, recopy all of my songs and disconnecting it first using the XP "removable hardware" interface and then unplugging it. Obviously I can't do a reformat and recopy every time I want to use it, and even that only helps about 1/10 times.
    Also, I don't want to keep it on and plugged in the whole time so as not to wreck the battery/OLED, and even then we're ignoring the times when I have to actually copy new stuff to it (which turns it off upon unplugging).
    Any ideas? Thanks a bunch.

    OK, I just reverted back to 2.000.008 firmware and everything appears to be working as normal. I tried turning it off/on several times and no LOCKED message.
    Maybe after all the shaking while running, the firmware gets shaken and stirred? 
    Later I'm gonna try getting the newest firmware back and see if the issue was with that, maybe the player can't handle the new firmware anymore due to its age:P
    In any case, maybe this helps other people with the LOCKED issue.
    I'll do an update when/if problems start occuring again.

  • Keyboard Lock help

    It's a little thing... however... I recently got a Curve 8900, and I can only lock/unlock it by pressing the top button.  On my brother's Curve... he's able to lock/unlock by pressing A+Send.  For the life of me I can't figure out how to get mine to do the same thing.  I went to the "Tips and Tricks" section for my phone, and it actually says that the A+Send option is the standard way to lock/unlock.  Now I'm confused.... Please help.

    michelleloraine wrote:
     The keyboard lock's missing. Is it part of all the changes?
    Yes, it is.
    You can set a password on the device, and the lock icon will return.
    Or, you can use the K key to press to lock the device if your Call Log > Options > Dial for Homescreen >  set to no.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • My iPod is locked help

    My iPod is locked and I can't remember the password, it won't restore on the computer and won't connect to WiFi any other ideas? Please help.

    If you haven't already done so, try resetting it by holding the power and home buttons at the same time until you see the Apple logo, then releasing.

  • Sim lock help me

    Dear Customer Sevice,
    My iphone 4 model A1387
    EMC2430 FCC ID:BCG-E2430A IC:579C-E2430A
    Please my phone unlock ?
    Thanks for your helps.
    Regards,
    Mustafa
    <Personal Information Edited by Host>

    ONLY the carrier it's locked to can authorize unlocking it. No one else.
    You can request an unlock from AT&T here: https://www.att.com/deviceunlock/?#/
    If you do not meet their requirements, they will not unlock it.

  • Sound Lock--HELP!

    Unfortunately, my iMac is in a "sound lock." The volume cannot be adjusted in any way. It's at max right now, but nothing is actually coming out. HELP ME PLEASE!

    The previous poster is 100% correct. GarageBand is one of the applications that will reset your default sound settings when launched.
    As this appears to be your 1st visit to Apple Discussions and perhaps your first Macintosh computer, I thought that you might appreciate a better understanding of the inner workings of your new iMac, than a quick and dirty fix, that leaves you in the dark about what was going on.

  • HELP! Bootcamp "Num Lock" help needed.

    I've been searching all around Google for my problem, which is being unable to find out which keys are used for "Num Lock" IN BOOTCAMP.
    I tried Fn+F6, no help at all...
    I am using Windows 7 Home Premium, and my early Macbook white(?)
    Just in case, it looks like this:
    http://www.mac-forums.com/forums/attachments/buy-sell-trade/9109d1217425905-wts- used-macbook-white-dsc-july303008-3-.jpg
    Any help appreciated

    Hi @treismine2,
    Welcome to the HP Forums!
    It is a dynamite place to find answers and tips!
    For you to have the best experience in the HP forum I would like to direct your attention to the HP Forums Guide Learn How to Post and More
    I grasp that you have the Lenovo  w FLEX 2-15 laptop.  You may wish to  post in the Lenovo community for assistance with their products.
    Lenovo Community
    Regards
    Sparkles1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!

  • HT1688 Amazon sold me UNLOCKED iPhone and delivered it LOCKED HELP

    I am an old APPLE customer, I had and have Ipods, Iphone, Ipads etc.
    I recently bought through Amazon a 1 of: Apple iPhone 4S 16GB - AT&T - Black [Unlocked Phone] Condition: New Sold by: WorldWide Distributors
    To my surprise this phone was delivered LOCKED, in spite the Amazon offer was UNLOCKED as above.
    I did complain to Amazon, which denied help also in appeal, saying that I complained late.
    I did talk and write to AT&T to help me unlocked the Iphone, and they finally said they do not unlock phones sold by Amazon
    So Apple is the maker of the iPhone and I am the customer, but between us there is Amazon and AT&T doing what I call non-ethical distribution of Apple’s product (selling UNLOCKED and delivering LOCKED phones).
    I have all documents (invoices, orders, e-mails with me)
    My last hope is that APPLE can do something for me.
    Best regards
    Paulo Gurgel Valente
    Rio de Janeiro Brazil
    <Personal Information Edited By Host>

    Michael Black wrote:
    Try and return it through Amazon if you can.
    From the OP's post:
    I did complain to Amazon, which denied help also in appeal, saying that I complained late.

Maybe you are looking for