Continue to lock after COMMIT

Hi all,
I need help on locking module. I have a program that does many update and commit (some using BAPI_TRANSACTION_COMMIT). How I continue to lock the record after the commit? From what I understand commit will release all locks. I wish to continue locking even after commit. What are the possible ways to do it?
The locking logic:
    CALL FUNCTION 'ENQUEUE_ECKSSKXE'
      EXPORTING
        MODE_KSSKX           = 'E'
      MANDT                = SY-MANDT
        KLART                = '300'
        CLASS                = GT_ZMM_DEPOT-CLASS
      MAFID                =
      OBJEK                =
      X_KLART              = ' '
      X_CLASS              = ' '
      X_MAFID              = ' '
      X_OBJEK              = ' '
        _SCOPE               = '1'
      _WAIT                = ' '
      _COLLECT             = ' '
      EXCEPTIONS
        FOREIGN_LOCK         = 1
        SYSTEM_FAILURE       = 2
        OTHERS               = 3
Thanks thanks.

1) First u create a Lock object in SE11, for the required field/fields that u want to lock.
2) It generates to FMs -- one is for locking and the other is for unlocking.
3)use these FMs in ur program.
Check the below link for the procedure how to create lock object.
http://help.sap.com/saphelp_nw70/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm

Similar Messages

  • CRM_ORDER_SAVE. how to identify the lock after commit work and save

    I am updating a status, using crm_order_save , then commit work and wait and crm_order_initialize before i update the status to next status for the same item.
    I am facing an error when i change the same item status to another status i get error some times cannot change the error.. if i keep commit work an save and wait up to 20 seconds it works ..
    Is there any way to look for the lock object for the header guid.. instead of putting wait up to 20 secs.
    what is the FM or lock object to check the order is not committed or still system is updating or its in middleware processing.

    hi,  I remeber the there is a function name like  CRMXXDocumentXXlock  which is be called in standard program to maintain order.
    I can't login a crm server, can't offer you the accurate name, you can do a search in system.

  • Data lock even after commit work and wait

    Hi Experts,
    Data is still locked even after commit work and wait step has run, which made me very confusing.
    The following are the details:
    These steps are in a FOP.
    Step1: Change Move-in Date of a move-in document in background after get the new move-date from user.
    Step2: Run BAPI_TRANSACTION_COMMIT and pass the wait parameter.
    Step3: Bring move-in document transaction to the user for other information changes.
               After the user confirms the changes and presses SAVE button, error message shows that the move-in document is still locked. But no other transaction is opened for the specified move-doc changing.
    Does any1 have any idea on this? How can I solve this issue?
    Thanks in advance and points will be rewarded.
    Vincent

    Hi,
    Normally every BAPI will work on Update task so that the data will be updated once the commit work is done. For the commit work, we will normally call the bapi function module - BAPI_TRANSACTION_COMMIT. It should work.
    In your case, just try the below option:
    Please call the bapi - BAPI_ACC_DOCUMENT_POST & BAPI_TRANSACTION_COMMIT in a seperate function module and call this function module in your program (just pass the import / export / table parameters accordingly).
    For the information, I had once a similar type of issue and it got solved once I did like the above.
    Regards,
    Selva K.

  • Lock and Commit work in INBOUND IDOC

    Hi Experts,
    Problem is about lock and commit work
    i need to receive idoc for Good receipt for purchase order.
    For one Purchase Order i can receive many good receipt Idoc at the same time and when first came in Lock the Purchase Order and further idoc came after give Errors becouse purchase Order is lock.
    Problem is not the serialization (the sequence is correct), but is the lock.
    Any idea on how to fix this issue? (maybe there is some std settings??)
    Cheers
    Boris

    Hello Guys
    the packetsize is already set to 1 but the problem still again..... and where i can find this setting   "in Customizing choose Engineering Change Management ® Define statuses for master record". ?
    Any way i try in function module in inbound to check the lock object with this sample code:
          DO 30 TIMES.
            CALL FUNCTION 'ENQUEUE_EMEKKOS'
             EXPORTING
               mode_ekko            = 'S'
               mandt                = sy-mandt
               ebeln                = goodsmvt_item-po_number
               _scope               = '2'
             EXCEPTIONS
               foreign_lock         = 1
               system_failure       = 2
               OTHERS               = 3.
            IF sy-subrc <> 0.
              WAIT UP TO 1 SECONDS.
            ELSE.
              EXIT.
            ENDIF.
          ENDDO.
    but also with this....problem syill again...
    thanks
    Boris

  • Iphone 5 (6.1.3 and 6.1.4) locked after talk screen and button

    Have you Iphone 5 ? if you have iphone 5 (6.1.3. or 6.1.4). you can try.first close the screen (locked) after open the camera, call to the iphone5 other phone. switch on after switch off. you'll see. Screen and button loced.not available in any way. you won't use screen and button. you can open iphone5 only with power button. you'll push the power button and select don't close phone. you'll see every thing normal again. I thing so, iphone5 should continue take photo. What do you think this problem.

    I tried that guide but unfortunatly it didn't work =\
    @JWPNJ
    I ended up going into my local apple store and they managed to reset it with their software - it'll save you mucking around for ages if you tried everything like I did. Good luck.

  • IPAD Mini Locked after iOS upgrade, tried reset on iPAD did not work, plugged in and device not appearing in iTUNEs for reset/restore

    PAD Mini Locked after iOS upgrade, tried reset on iPAD did not work, plugged in and device not appearing in iTUNEs for reset/restore.  Just get an Apple Logo then a flashing blue screen as if it is caught booting up.   This has happened twice before and iTunes restore fixed it.  But this time device not appearing in iTunes.
    Running iTunes for PC.  But as stated restore has worked before!  Any help greatly appreciated!!

    Place the device in DFU mode and let iTunes restore the device to factory condition.

  • After commit current row is no longer highlighted

    JDeveloper 11.1.1.20.
    Scenario: a master detail page where master and detail are both ordinary ADF table ( NOT read-only).
    If I place the cursor on a master row and do a click the row is highlighted.
    If I do a createInsert operation (with a button) a new row is created above the previous mentioned row.
    Problem:
    If I do a commit after the new row is filled with data sometimes the newly made row is now longer highlighted after the commit.
    The newly created row is stil active. This is seen by the fact that if I subsequently creates a new deatil row it is correctly connected to the newly created master row.
    And - after the newly created detail row is created the master row is again highligted.
    Any ideas?
    Best regards
    Erik

    Hi,
    To keep highlight the selected row do some operation in bean ,Get selected row and set that row again after commit
    Check
    http://jobinesh.blogspot.com/2011/01/declaratively-setting-current-row-key.html

  • Windows 7 desktop locks after 10 minutes idle - Policy setting?

    Is there a policy setting to lock the desktop after a certain amount of idle time?  I can't seem to find one, and searches on the web only seem to uncover lock up issues with software, rather than security policy settings.
    Right now our Win 7 desktops lock after 10 minutes of inactivity (set by old IT staffer who is no longer here).  This is way too short and we need to change it.  However, I can't find where the setting is.  The screensaver is disabled and the power settings are set to maximum.  The only policy setting that looks like it could be what I'm looking for is "Microsoft network server: Amount of idle time required before suspending session", but that wasn't set to 10.  I went and set it to 0 anyway and the desktop still locks after 10 mins.
    Can someone point me in the right direction for this setting?
    Thanks!

    When you leave your computer, it’s best to start a screensaver that can only be turned off with a password.
    On the Start menu, click Control
    Panel.
    Click Personalization, and then click Screen
    Saver.
    In the Wait box, choose 15 minutes
    (or less)
    Click On resume, display logon screen, and then click OK.
     just try reverse , it may work !!!!!!!!!!!!! :)

  • Sender agreement not updated in XI cache after commit

    Hi all,
    somehow none of my created sender agreements appears in the XI cache after commit. I also did a complete refresh of the XI chache.
    Any ideas?
    Thanks!
    Denis

    Hmm,
    I have created sender agreements for SOAP channels, this would explain why I could not see the agreements...
    Actually I am wondering why the 'test configuration' tool in the ID brings up an 'java.io.IOException' in the receiver determination. Prior to that the sender agreement lookup fails. So I thought it's the XI Cache...
    I restarted the J2EE engine but the problem remains.
    Any other ideas?
    Thanks so far!

  • Time Machine Locked after MacBook Air reformatted. My MacBook Air was overfull due to an Address book issue (duplication) so after many attempts to clear space, I ended up wiping out the system and reloading Lion.

    Time Machine Locked after MacBook Air reformatted. My MacBook Air was overfull due to an Address book issue (duplication) so after many attempts to clear space, I ended up wiping out the system and reloading Lion. This resulted in the Time Machine thinking that it was now connected to a different computer. Apparently this diables the existing information. 
    Now I can see that the back-ups exist (back to Sept 2012) but they are greyed out, therefore unavailale to restore. Again, this seems like an issue that shouldn't be happening. The whole point of the Time Machine is to enable reinstatement of data after catastrophic failure. What if my computer actually had to be replaced due to a hardware issue? How would I beableto restore anything?
    The path already (unsuccessfully) taken;
    Open Library on the computer, Open Time Machine, Select Correct date, drill down to correct data you wish to restore, click "Restore".
    This did not work because the correct date was greyed out. Restore key was greyed out.

    Time Machine Locked after MacBook Air reformatted. My MacBook Air was overfull due to an Address book issue (duplication) so after many attempts to clear space, I ended up wiping out the system and reloading Lion. This resulted in the Time Machine thinking that it was now connected to a different computer. Apparently this diables the existing information. 
    Now I can see that the back-ups exist (back to Sept 2012) but they are greyed out, therefore unavailale to restore. Again, this seems like an issue that shouldn't be happening. The whole point of the Time Machine is to enable reinstatement of data after catastrophic failure. What if my computer actually had to be replaced due to a hardware issue? How would I beableto restore anything?
    The path already (unsuccessfully) taken;
    Open Library on the computer, Open Time Machine, Select Correct date, drill down to correct data you wish to restore, click "Restore".
    This did not work because the correct date was greyed out. Restore key was greyed out.

  • Windows 7 locking after 1 minute

    OK, so starting off, i have read over all of the other posts and have found none of them work.
    My computer locks after 1 minute, this started today, i have not changed any settings, nor have I recently as I have had this computer for a while.  I have looked at all of the settings and i have all of the sleep/hibernation functions turned off. 
    I have the "lock screen on wake up" function also turned off.  I do however have it set to dim, and then turn off the display after 1 minute, but this has nothing to do with the sleep function.  It does not dim the display before locking, only after,
    as if it wasnt locked, please give me anything you can to help as this randomness is very irritating.

    I don't think Arthur Xie's response should be marked as the answer.  This doesn't sound like it has any relevance to Craig's original question, and hasn't been corroborated by anyone.  It threw me off the scent when I encountered the exact same
    problem - Windows 7 locking me out after 1 minute and requiring password re-entry
    It turns out that Ramesh's answer was the one that worked for me.  Somehow my machine got set to wait 1 minute and "on resume, display logon screen" was ticked.  Don't know how this happened.
    I initially missed this, because the selected screensaver was "(none)", so I assumed all the settings on this page were irrelevant.  It does raise the interesting usability point that a screen saver of "(none)" can still blank the screen, even
    though the user hasn't purposely selected the "Blank" screensaver.

  • My iPhoto 11, V 9.4.2, locks up/freezes when I attempt to empty the iPhoto trash bin.  Originally, I thought it was due to 800  files in the trash, however, I removed ALL but 5 photos from the trash and it continues to lock up.

    My iPhoto 11, V 9.4.2, locks up/freezes when I attempt to empty the iPhoto trash bin. 
    Originally, I thought it was due to 800+ files in the trash, however, I removed all but 5 photo files from the trash and it continues to lock up.  Inititally the "progress" bar would get to about 1/2 way and then it would stop and stall.  However, now the progress bar no longer shows a progress line it immediately freezes and locks up. Can anyone help? 

    You may have damaged the library - Back up your iPhoto library, Depress and hold the option (alt) and command keys and launch iPhoto - rebuild your iPhoto library
    LN

  • How can I allow the application to line through a field that has been locked after being digitally signed?  We have multiple sections on a form with some fields being proposed information and other in another section having the approved information. once

    How can I allow the application to line through a field that has been locked after being digitally signed?
    We have multiple sections on a form with some fields being proposed information and other in another section having the approved information. once the approved information is entered we line through the proposed field so the data entry clerk won't pick up the wrong information.  However we are receiving an error when attempting to enter data  in the field which we have this edit.  Error property: line through cannot be set because doing so would violate the document permission setting.  any idea how we can get around this issue?

    You can control which fields are locked down after signing by setting up a collection. Then those that are not locked can be changed after signing. If this is not possible, then the line outs must occur prior to signing.

  • FPGA Module: Global Clusters become Locked after Compile?

    It seems as if, on some occasions, global clusters become locked after a successful compile of a project - you can't enter edit mode in order to add new elements to the cluster. I haven't been able to lock down the circumstances under which this occurs, but it has happened to at least two projects I've designed.
    This is a major heartache, as the only solution I can come up with to add new elements is the following:
    1. Create a new cluster.
    2. Include all existing elements of the locked cluster as well as your new element.
    3. Reset all Variable Representations and Data Ranges.
    4. Replace the locked one with your new cluster for all instances in the code.
    Is this a bug, or is this simply a limitation in the program? Does anyone know of a simpler way to solve this issue than my solution above?
    Thanks,
    Dan Price

    Hello Dan,
    I was not able to replicate the issue. Here is what I tried
    1. Created a Global variable
    2. Used the global variable in my FPGA program.
    3. Compiled the program
    4. Added elements to the global variable and saved it.
    5. Updated my program and compiled it again.
    If you can suggest another way to replicate the issue or attach your VI's I will try replicating it. If you think it happens occasionally then we should be able to narrow it down to specific circumstances to troubleshoot.
    Thank you and have a good day
    RMM

  • When I use dynamic link how do I continue using it after closing and reopening a project?

    Hi
    Im very new to AF
    I cant seem to find the answer to this in any tutorials.
    When I using dynamic link, how do I continue using it after closing and reopening a perm pro project?
    Thanks
    Philip

    Hi Kevin
    Thank you very much for such a quick reply.
    I actually figured it out. As usual it was fairly obvious solution.
    I opened both project at the same time.
    Thanks again and sorry for waisting your time.
    R
    Philip

Maybe you are looking for

  • Decode Function issue

    Hi all, i want compare two rows in a table. so i used decode function to compare the values, whether its matched or not. One of my table column has Long data type. Decode(a.col1,b.col1,'Match','NotMatch') col1 - is long data type. when i use long dat

  • Is there a way to make the clock show when the phone is plugged into the charger, rather than have the screen go blank?

    Hey guys, I just finally got my first smart phone (I know), an iPhone 4S. I was wondering if there was a way to make it so when the phone is plugged in, the screen stays on but is dimly lit or something, just so I can see the clock without having to

  • Third party dropshipment process and system setup

    Hi gentlemen, I have a few question to check with you. 1 - What is the difference between Third Party Shipment, and Third Party Drop Shipment in term of process? 2 - What is the system setup requirement for Third Party Drop shipment (I know TAS is re

  • Aperture Metadata and Bridge Metadata

    I am a photographer and my workflow is to import all my images into Aperture library and add metadata. When exporting an image is it possible to integrate Apertures metadata with Bridge metadata? This is important feature as most people do not import

  • Ipod works but is slow to react sometimes...

    i recently got the INVISIBLE SHIELD and applied it yesterday at around 3:00...since there was a lot of water involved i made sure i was going to wait the full 24 hrs that are recommended. later i found out that just 3 hrs after being applied, my brot