Loop - checking for lock to clear

My application uses tables that are refreshed from their sources. I have a table with a field in it that if set to "locked" (by an external process or another user of the application).
I set an item (P1_LOCK_STATUS) to the results of the select statement on the column. On pages where I am accessesing data, I redirect to a page that explains that the application is "locked".
This all seems to work.
What I want to do (and my reason for this thread) is to:
1) get the page go into some sort of a loop that reads the column to determine if it has changed to "unlocked".
2) While it's detecting whether the lock has changed, I'd like to have some movement on the screen to show that it is doing something.
Something graphical might be nice...
3) When it detects that it is unlocked, I'd like it to branch to the calling page or some other page.
Yep... I'm a newbie ;-) and this may be a stupid question, but I can't think of how to do this...
-Scott

Just replace???
I'm writing an example code
char myArray[10] = {....}; //array populated;
char userItem = .....; //any character typed by the user
for (int i = 0; i < myArray.length; i++) {
  if (myArray[i] == userItem) {
    myArray[i] = userItem; //here occurs the replace
}I hope to help you
Junior

Similar Messages

  • Can't get Firefox to load at all after trying fixes from support web site. Have checked for lock file, processes running, reboot, reinstall. NO JOY.

    I'm running Vista for operating system on an HP laptop that's about 2 years old. I've installed all current updates.
    I've always used Firefox. It started crashing and creating processes but not launching. Went to support and scoped it out -- there was a lock file my profile directory. I deleted it, and Firefox started loading.
    Used it a few times -- closed the app each time on exist as per suggestions on support site info. One time -- back to square one, wouldn't load, just created a process. Reboot, ending process, checking for lock file, reinstalling -- all unsucessful.

    Brian
    Below is from using a SIP build.  It does offer G722, but it's way down on the list so it's never used...
    m=audio 32678 RTP/AVP 0 8 18 102 9 116 101
    a=rtpmap:0 PCMU/8000
    a=rtpmap:8 PCMA/8000
    a=rtpmap:18 G729/8000
    a=fmtp:18 annexb=no
    a=rtpmap:102 L16/16000
    a=rtpmap:9 G722/8000
    a=rtpmap:116 iLBC/8000
    a=fmtp:116 mode=20
    a=rtpmap:101 telephone-event/8000
    Taking Sreekanth's suggestion to try a Skinny build, I get the following when I make a call.  It offers codecs in the order I SET THEM AND ONLY THE CODECS I SET!  YAY!
    m=audio 19374 RTP/AVP 9 0 101
    a=rtpmap:9 G722/8000
    a=fmtp:9 bitrate=64
    a=rtpmap:0 PCMU/8000
    a=rtpmap:101 telephone-event/8000
    Using a Skinny build on the phones also solved other issues.  The phones use G711 when the whole path supports G711 and G722 when the whole path supports G722.  It doesn't always use G722 and rely on transcoding for the call paths that can't use it.  It's fantastic..  The phones also receive the QoS tagging that I set and that seems to result in better audio quality than on the SIP builds, which never did get those settings.  Finally, it even solved a slow Exchange 2013 answer issue I have been experiencing for quite some time.  I practically fell out of my chair when I saw everything that was fixed just by switching...
    Cisco, PLEASE FIX YOUR SIP BUILDS!  It's insane how the SCCP builds work perfectly and the SIP builds don't, especially with how much these phones cost..  I was thinking of possibly acquiring some 9951s, which are SIP only.  I'm a little leery about that at this point.  If they have the same kinds of issues as the SIP builds for the 7975g, there's no SCCP alternative to use..
    Sreekanth
    Thank you for suggesting a Skinny build..  That was about the only thing I didn't try.  I am happy beyond belief that this is working so well now, even though the SIP builds should be just as well developed as the SCCP ones.

  • How to check for locks on a table inside a program?

    Hi Gurus,
    Kindly let me know how to check for a lock on a particular table inside a program.I know that we can see locks on table held by a user from transaction SM12 but my requirement is to check for lock on MARA/MARC/MARV if lock exist then bypass my code else do the code.
    Kindly suggest or give code to check for a lock on a particular table.
    Thanks in advance
    Sudipto

    FAQ.  Locked.

  • Check for locks thru OEM

    Hi,
    Is there any way to find out locks thru OEM.
    Regards

    Yeah. Once you're in your main database page, scroll to the bottom, or search in the page for "Metric and Policy Settings". That page has a metric "Blocking Session". You can set a number against that and modify how often to check for it.
    For me however it was more critical to find out "Blocked Sessions" rather than "blocking session" (1 session can block 10, or 20 other sessions). So I created a user-defined metric:
    select count(*) from (select /*+ ORDERED */ blocked.inst_id ||'-'||blocked.sid blocked_sid , TRUNC(blocked.ctime/60) min_blocked from (select * from gv$lock where block != 0) blocker , gv$lock blocked where blocked.block = 0 and blocked.id1 = blocker.id1);
    Hope it helps.

  • How to check for locks on a material - without using Enqueue function

    Hi
        We have a requirement in which - we need to check the lock ( exclusive ) on a material before we call the BAPI to update the material.
    I don't want to actually lock the material before calling the BAPI - the BAPI itself acquires the lock as a part of its processing. All I want to do is to check whether lock on a material exists before calling the BAPI - thus avoiding any lock related issues on the material in the BAPI call.
    How do we just merely check whether material is locked - any standard function module /SAP tables where in material lock is stored that we use/interrogate ?
    Correct answers will be promptly rewarded.

    Hi ,
          There is standard function enqueue_read ,based on material number .
    Pass the material number to FM ENQUEUE_READ if sy-subrc = 0 then material is locked otherwise not .
    Please reward if useful.

  • Stuck in endless loop checking for IMAP mail

    My ISP that I have my domain name on for some reason is having real problems with Mac OS X 10.8.0 that weren't there before:
    Dovecot Exim version 4.80 is my server.
    My Drafts, Drafts Cache, and a subfolder of Drafts all are checking messages through IMAP with no end in sight after 10 minutes on the Activity dialog. Safari, Chrome, and Mail are all that are open.  They claim the server load is all of 5% load.  Would upgrading to 10.8.1, 10.8.2, or 10.8.3 help (after of course backing up)?

    Sure, just as soon as you come round to my house and do the laundry for me ;)
    Alternatively, you could put a bit of effort in and fix the basic errors. You say that you are stuck in an endless loop. That is not possible from the code that you have supplied, there are therefore two possibilities.
    1. You lied i.e. you are actually trying to run the above code, it errors and you want someone to fix it, but thou8ght that somehow implying a different error in the code would get someone to do your work for you.
    2. You Poste d code different to that which you are actuially running and your code does indeed have an infinite loop. In which case, post the code that actually runs but drops into an endless loop.
    GL

  • Checking for kernel lock contention in OEL 5.5

    Is there a lockstat utility for Enterprise Linux 5? Or how could I check for kernel lock contention?
    I found a lockstat rpm for RHEL and Centos 4 at http://packages.sw.be/lockstat/, but I could not find it in the distribution of version 5?
    The rpm package installs, but the command "lockstat on" shows /proc/lockmeter: No such file or directory
    I found an interesting document named "Linux Kernel Lock Profiling with LockStat" at:
    http://dolavim.us/blog/2007/11/06/linux-kernel-lock-profiling-with-lockstat/
    The document outlines the use of /proc/lock_stat, which is a text file - not using a "lockstat" utility.
    From what I understand, I have to rebuild the kernel with "CONFIG_LOCK_STAT=y", or wait for kernel 2.6.24 to be released?
    Do I have to build a custom kernel to check for lock contention, or are there perhaps other options?
    Thanks!
    Edited by: Markus Waldorf on Aug 28, 2010 8:55 PM

    SQL> SELECT INDEX_NAME,INDEX_TYPE,UNIQUENESS FROM DBA_INDEXES WHERE TABLE_NAME='DATA_DATA';
    INDEX_NAME INDEX_TYPE UNIQUENES
    CIDX BITMAP NONUNIQUE
    VIDX BITMAP NONUNIQUEYou have bitmap indexes here on a table being inserted into. Bitmap Indexes are another source of lock(and deadlock) in OLTP application. You said that the SQLloader was the unique active program but may be you are also triggering another procedure after the load. Procedure in which you might be using also automomous transactions and so on...
    Check first if your table is subject to DML operation in a a multi-user concurrent accesss and in which case you have to get rid of those bitmap indexes
    http://hourim.wordpress.com/2011/03/14/deadlock-%e2%80%93-part-1-bitmap-index/
    Best regards
    Mohamed Houri
    www.hourim.wordpress.com

  • How to check the Lock Entries Dynamically

    Hi
    I have a list of Objects in an internal table and i want to know which one of these objects are locked by another users.
    I am using SAP standard Lock object 'EPNODE' and its FM 'ENQUEUE_EPNODE ' to Lock the entries.
    Please suggest how i can find among a list of objects, which one are locked.
    Please suggest any transparent table which hold lock entries or any Function Module which check for lock entries.
    Thanks in adavance

    Hi
    Just double click on the FM, it will take you to SE37
    click on IMPORT tab there you find import parameters against which there is the associated type
    you need to declare your variables(parameteres) according to these associated types
    whatever the FM it may be, the process is same
    Hope this would solve your problem
    Regards
    Ramchander Rao.k

  • Check for required fields before locking subforms and submitting

    Hello,
    I have a 5-page form with many questions, to be completed by the original requestor and multiple approvers.  What I'm trying to do is have the original requestor's Submit button on p. 3 lock the input on the first three pages, but first check if all those fields have some content.  I currently have all the fields on pp. 1-3 set to "Required" in the object properties, but my script still locks them when there's is one empty one.  Here's what I have:
    //Lock portions of form
    Page1.access = "readOnly"
    Page2.access = "readOnly"
    Page3.access = "readOnly"
    //Save document, allow user to change name
    app.execMenuItem("SaveAs");
    //Submit via e-mail
    Submit_REAL.event__click.submit.target = "mailto:[email protected]" +
    "?subject=Subject text" +
    "&body=Message";
    Submit_REAL.execEvent("click");
    The automatic check for required fields happens after the pages get locked.  I would like the check to stop the process before it locks the pages.  Is there any way to check all at once that all "Required" fields on those pages have some content before allowing the script to proceed?  I know how to script it to manually check the 50 or so questions on those pages, but I would like to avoid that.  Thanks for any help.

    There are a few problems that I can see from the start. First, your code is going to pick up EVERY node that exists on these pages. Some of those nodes will not have a rawValue, and some will not have an actual name. As an example, you can take your code and create a text field to dump all of the names of the nodes that you get when you pull in all of the nodes this way. Here's an example:
    The result:
    Now, the question is, do you have a consistent naming convention for your fields that might be empty? That could be text fields, radio button lists, etc. For instance, I always prefix the names of objects in order to more easily keep track of what they are in scripts. Since I'm doing that, I can check the name of the field for tf, nf, rbl, cb, or whatever I have included to make sure that I'm checking an actual field before I check for things like rawValue.
    var nodeName = oNodes.item(nNodeCount).name;
    if (nodeName.indexOf("tf")>-1 || nodeName.indexOf("rbl") > -1 || /*check other field types*/) {
      //insert your code to check for empty answers here
    As for your line 7 issue. The syntax problem is that you've put extra parentheses in your if statement. Take out the parentheses that are just before and after the or "||".
    *This is my fourth attempt to reply. Something was going on with Adobe/Jive earlier, I suppose.

  • I received a phishing email supposedly from my bank and clicked on url - didn't enter any data though.Bank says to get ipad checked for viruses,but I understood ipad has built in security.I've cleared cookies in safari via settings.  Anything else to do?

    I received a phishing email supposedly from my bank and clicked on url - didn't enter any data though.Bank says to get ipad checked for viruses,but I understood ipad has built in security.I've cleared cookies in safari via settings.  Anything else to do?

    I know this has been solved as you reported, but I think you need to check with your e-mail provider. Did you also get this same e-mail on your computer? If you use the same ID for e-mail on computer and ipad, it should have appeared on both. It's very common spam. Check your computer to see if on it, the e-mail is in spam, or, if you deleted it on your ipad, check your recently deleted e-mails.
    You might want to consider changing your password, though people sending spam, don't need it. My e-mail provider had me change my password, not because I was getting spam, but unknown to me, I was sending it!  (You'll still get some spam, though.) It's when you learn that you're unknowingly sending spam...that you must change your password.
    Hope this helps.
    (Ss I was sending this, I just got an e-mail notification from the Nigerian... it got to my e-mail instead of going to spam.)

  • On update to 4.0 Firefox locked up while checking for compatability of applications and will not load.

    I have HP a6620f, Vista, 64 bit, 2.5 GHz 4.0 GB RAM. Firefox worked great until I upgraded to 4.0 when it locked up while checking for compatability of applications. I have the desktop ikon but firefox will not come up. Task manager shows firefox.exe using 50% of CPU when terying to come up.

    I've since updated manually to 4.0.1, but haven't yet tried the full uninstall version, because I have to export plenty of settings first (and/or manually copy them). Also means I'd have to start from scratch with many customizations in No Script.
    That said, I'll try the 'Safe Mode' option tonight, thank you :-)!
    If I have to uninstall the whole shebang, I'd be more tempted to go back to 3.6.x until a few more of 4's teething problems (e.g. the messy print dialogues, particularly preview, which regularly doesn't even work) have been tackled.
    Thanks-1M! for now - keep you posted.

  • I'm trying to update my software to iTunes 10.5.2.  I click on the install button, click the Accept button, the software checks for updates, and then I am back at the original download screen.  I can't seem to get past this loop.  Any suggestions?

    I'm trying to update my software to iTunes 10.5.2.  I click on the install button, click the Accept button, the software checks for updates, and then I am back at the original download screen.  I can't seem to get past this loop.  Any suggestions?

    If I go through the setup that you suggested, won't I screw up the existing software on my system?
    No. The iTunes installer will first uninstall the existing version of iTunes and then put in the new one. (That's actually also what happens when you use Apple Software Update to install a new version ... it just doesn't show the uninstall phase like the iTunes64Setup.exe or iTunesSetup.exe does.)

  • When trying to update to 4.0.1 it locks up when checking for updates do plug-in. This causing Firefox not to work. Why?

    When trying to update to 4.0.1 it locks up when checking for updates to plug-in. This causing Firefox not to work. Why?
    I am running windows 7. I have tryed uninstalling and reinstalling and every time it locks up at the same point, when it is checking for updates to plug-ins. I have run troublt shooting and it tels me :Incompatible Application. Why??

    Create a new profile as a test to check if your current profile is causing the problems.
    See:
    * [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting&#58; Make a new profile]]
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins"
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
    See:
    * http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • How do I get out of an iphone restoration loop, itunes keeps saying it has detected an iphone in restore mode and that it must check for software updates and reinstall the ios, it completes this process and then says: detected iphone in restore mode etc.,

    Background: my iphone 3gs was running wonderfully - no issues at all, as normal.
    I let the power run down to critical and got the empty battery screen - plugged it in and when it had enuf juice it displayed the cord-to-itunes-of-death-screen...
    I had just backed up the previous to icloud so no worries... I just plugged in and thought ok this will just take a second...it completed the restore then said with a glazed amnesic font "Itunes has detected an iPhone in recovery mode, and has never seen or restored this iphone ever before, since this is a stranger iphone, itunes does not trust it and must call the ipolice to check for contraban in its orifices and cavities, you must restore"... kidding of course... but
    OMG at home I did the whole restore process no less than 20 times while optimizing and accounting for different variables each time (restoring on a new system with a fresh OS, trying to restore and a mac, restoring then restarting empty cache, restart unistall itunes then restore restart restore, installing an older version of Itunes and restoring. going back to Vista and restoring), and every single time it would complete the check, the update/check, the ios reinstall, and then whatever else and say "complete"... and then no icon menu would appear for the device in itunes so unplug the phone and replug and get the whole "Itunes must render restore aid" message. SO I went to the genuis bar at my local iBoutique thrice - each time the bewildered but very courteous and knowledgable genuis wanted to keep trying ... since I had been on this treadmill for about two weeks I decided each time to respect my fellow appletonians and not suck up genius time... but I really want my old 3gs back... why - I like that it amazes the youth who occaisonal are puzzled by seeing something apple that they don't recognize and in wonder and amazement at its age they learn that even though its no longer invited to iOS family gatherings that it still can call home and ask why Apple waited so long when it was a kid to give it copy-paste ability like all the other kids, then ask for money for the shrink bill.. ... . . ..

    Soooooooo.... You obviously need to restore the device
    It seems that you have tried several options to restore it. What I would do is leave it plugged it and hold down the Home button AND the Power button together till you see the white apple appears. Then let go of the Power button but continue to hold the home button. You should get the message in iTunes again saying that the iPhone needs to be restored. Hit OK then RESTORE.
    Hope this helps!!

  • Regarding Function Module for Locking ( enque)

    Hi,
    I am facing a Problem that is when iam running Call transaction one popup is coming because some other user currently editing that Tcode at that time i need to lock tcode using enque specially for table . If suppose some other user editing at that time it will shoe that popup and it will exit from their with out doing any other process For that i need Function module for Lock and Delock.
    thanks in advance,
    murali krishna.

    So in this example, I am doing a loop and check for a lock, if I don't get one, I wait for 5 seconds, this loop continues untill 30 seconds, no lock then it quits and gives message.
    report zrich_0001.
    data: counter type i.
    parameters: p_equnr type equi-equnr.
    start-of-selection.
      clear counter.
      do.
    Exhausted,  no luch in getting a lock, get of of DO loop.
        if counter > 6.
          sy-subrc = 1.
          exit.
        endif.
    Try for lock
        call function 'ENQUEUE_EIEQUI'
          exporting
            mode_equi            = 'E'
            mandt                = sy-mandt
            equnr                = p_equnr
       _wait                = 'X'
          exceptions
            foreign_lock         = 1
            system_failure       = 2
            others               = 3.
    Got a lock, get out of DO loop.
       if sy-subrc  = 0.
          exit.
        endif.
    Still here?  Then wait another 5 seconds
        wait up to 5 seconds.
        counter = counter  + 1.
      enddo.
    Report status
      case sy-subrc.
        when  0.
          message s001(00) with 'Lock could not be established'.
        when  1.
          message i001(00) with 'Lock could not be established'.
      endcase.
    Regards,
    rewards point

Maybe you are looking for

  • Clean install on Mac ... what happens to iPhone syncing?

    I want to do a clean install of Snow Leopard on my Mac, and obviously this means getting rid of the 'computer' which my iPhone syncs with. I have Time Machine back ups so can restore my User account to the laptop after the new install is done. If I d

  • PO header attachment download and upload

    Hi All, I have requirement to download the attachments attached at Purchase Orders(PO) header level . And then from the downloaded file , I further want to upload it to another target system. I have already uploaded the PO at target system but header

  • Performance issues in million records table

    I Have a scenario wherein have some 20 tables each with a million and more records. [ Historical ] On an average I do add 1500 - 2500 records a day... i.e would add a million records every year on an average Am looking for archival solutions for thes

  • Using same cell twice in one formula

    Example: (B2+B3)*(B2/B4) If I want to use B2 twice in the same formula, numbers does not accept the second entry of B2. Any solution to this irritating problem?

  • How to implement expand/collapse property for custome components

    can any one tell me how to implement the expand/collapse property for the custom components in flex. i need something like hierarchy of custom components which on the expand should be able to show the children of the corresponding component and a lin