I want to stop loop through push button forms 10g

I want to stop looping through push button forms 10g it is like (SwingWorker() in java) (DoEvent() in .net)
The problem in forms 10g that when you start looping the form will freeze and you can't push any button on form, I found solution for that in form 6i through package d2kwutil **WIN_API_UTILITY.InterruptCheck(hButton)**
But in 10g I can't find solution, Please help>>>>>
declare
     hButton          PLS_INTEGER;
begin
:interruptcheck.counter := 0;
hButton := get_item_property('INTERRUPTCHECK.PB_OFF',WINDOW_HANDLE);
go_item('interruptcheck.loopcount');
set_item_property('INTERRUPTCHECK.PB_OFF',ENABLED,PROPERTY_TRUE);
set_item_property('INTERRUPTCHECK.PB',ENABLED,PROPERTY_FALSE);
set_application_property(CURSOR_STYLE,'HELP');
set_application_property(CURSOR_STYLE,'<d2kwut60>WAIT');
for i in 1..:interruptcheck.loopcount LOOP
     if WIN_API_UTILITY.InterruptCheck(hButton) then
          exit;
     end if;
     :interruptcheck.counter := i;
     synchronize;
end loop;
set_item_property('INTERRUPTCHECK.PB_OFF',ENABLED,PROPERTY_FALSE);
set_item_property('INTERRUPTCHECK.PB',ENABLED,PROPERTY_TRUE);
set_application_property(CURSOR_STYLE,'DEFAULT');
end;
Edited by: wael amar on May 1, 2010 11:03 PM

Ok, here's a working testcase.
The idea is taken from an article from an oracle magazine (i don't have it at hand, , so i tried to rebuild it by "memory". As far as i remember the original was from the german doag-magazine and was written by Gerd Volberg).
Procedure to do the looping:
PROCEDURE PR_DO_THE_LOOP IS
  nNumberInOneStep NUMBER:=2;
  tm               TIMER;
BEGIN
     DEFAULT_VALUE(0, 'GLOBAL.INDEX');
  IF :GLOBAL.INDEX=0 THEN
       -- Didn't run yet, determine the max count
       :GLOBAL.MAX:=10000;
  END IF;
  LOOP
       -- Do the looping stuff
       -- Decrease counter
       nNumberInOneStep:=nNumberInOneStep-1;
       -- Increase globale counter
       :GLOBAL.INDEX:=:GLOBAL.INDEX+1;
       -- Exit conditions
       EXIT WHEN nNumberInOneStep=0;
       EXIT WHEN TO_NUMBER(:GLOBAL.INDEX)>=TO_NUMBER(:GLOBAL.MAX);
  END LOOP;
  -- reset index at end
  IF TO_NUMBER(:GLOBAL.INDEX)>=TO_NUMBER(:GLOBAL.MAX) THEN
       :GLOBAL.INDEX:=0;
  ELSE
       -- start timer for next iteration
       tm:=CREATE_TIMER('TM', 10, NO_REPEAT);
  END IF;
END;The WHEN-TIMER-EXPIRED-trigger
IF :GLOBAL.INTERRUPTED='Y' THEN
     MESSAGE('Interrupted at index ' || :GLOBAL.INDEX);
ELSE
     PR_DO_THE_LOOP;
END IF;The WHEN-BUTTOn-PRESSED-trigger on the interrupt-button
:GLOBAL.INTERRUPTED:='Y';The WHEN-BUTTOn-PRESSED-trigger on the "start"-button
:GLOBAL.INTERRUPTED:='N';
PR_DO_THE_LOOP;

Similar Messages

  • How Do I get SSIS To Stop Looping Through Excel Rows After Last Populated Record?

    I have a package that loops through many excel files. Each Excel File has about 5000 rows. My problem is that after the 5000th row SSIS keeps looping through all the rows after the last row. There are nothing in these rows. This is a complete bottleneck
    of my package because it takes forever when doing this. How do I stop this?
    Thanks

    Another way is to specify the range in select statement which can be done in two ways
    http://getsetsql.blogspot.in/2012/01/using-ssis-load-data-to-excel-sheet-at.html
    http://sqlserversolutions.blogspot.in/2009/02/selecting-excel-range-in-ssis.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How To Sort the Table Through Push Buttons (ASC & Desc)???

    Hi,
    I am facing a problem with regard to 'Push Buttons' that I have created on
    my Form. I want the 'Push Button' to sort the table with respect to a
    specific column in 'Ascending order' on first push and then in 'Descending
    order' on second push and then again in 'Ascending order' on third push and so
    on...
    please help me to achieve this
    regards,
    .

    Hello,
    You could try something like this:
    Declare
         LC$Order Varchar2(128) := Get_Block_Property( 'EMP', ORDER_BY ) ;
    Begin
         If Instr( LC$Order, 'DESC' ) > 1 Then
               Set_Block_Property( 'EMP', ORDER_BY, 'EMPNO ASC' ) ;
         Else
               Set_Block_Property( 'EMP', ORDER_BY, 'EMPNO DESC' ) ;
         End if ;
         Execute_Query ;
    End ;     Francois

  • Select current line through push button in module pool

    Hi,
    I have created one module pool program with table control. There I have inserted on push button where some logic is deployed.
    Logic :-
    If I push button on current line or any line, that line should be selected in the program. So that I can move that line to next internal table.
    But, it always shows first line.
    Please suggest the same.

    hi amol,
    GET CURSOR only works on the number of table control lines that can be displayed on screen at any one time.  So, if your screen can display only 4 lines, all you'll ever get from GET CURSOR is a number 1 to 4.  
    But your screen also knows which of your table control records is currently displayed as the top line of your table control.  This information is held in field TC_ITEMS-TOP_LINE (where TC_ITEMS is the name of your table control).  By combining these two bits of information, you can find the correct line number of your selected record. 
    For example in the case you describe where you are clicking on line 5 but GET CURSOR thinks it is line 4 because your screen has moved down a record, I would think that TC_ITEMS-TOP_LINE would be 2.  Add 4 and 2 together, subtract 1 and you'll get your correct line number.
    hope it helps,
    vikas

  • Sending Print through Push Button in report...

    I'm running report with 'DISABLEPRINT=Yes' and 'DisableFile=Yes' parameters. Now can I send the print of currently displaying report to a printer without rerunning the report...I mean is there any print command in reports???

    Dear Pusa
    I'm using Reports 6i. My report layout style is Group Above. I've adopted this technique coz in this report I'm generating an important document which should be printed only once in normal conditions. So to avoid multiple printing of this report I've disabled File menu(to prohibit generation of PDF etc) and Print Button. Now the report will generate only thru a button I've placed into the report and it'll check there whether user is printing for the First time or more.....Ok??? is it enough???

  • Push button details in web ui of crm 6.0

    Hi All,
    I would like to view and know the details of existing push buttion function in web ui crm screen. 
    Though clicking F2 on the push button, i am able to see the technical details of Component, View, Context Node and role key. 
    I need to add the same existing functionality in a differenct view for which i am not able to find the details in the Structurte of Component IUICMDC.  Please help us.
    Thanks and Regards to all
    P.Raj

    Hi,
    You need to know wich view you want to add the new push button.
    In trx. BSP_WD_CMPWB select the view and enhance it. Go to the view layout and check if you see something like this
            <uhtmlb:toolbar id              = "Toolbar"
                            buttons         = "<%= controller->get_buttons( ) %>"
                            maxButtonNumber = "3" />
    If yes, and I think you will find enhance the method get_BUTTONS OF _impl class
    Add the code
      CLEAR ls_button.
      ls_button-id       = 'New Button'.
      ls_button-text     = 'New text'.
      ls_button-on_click = 'NEWMETH'.
      ls_button-enabled  = 'X'
      APPEND ls_button TO rt_buttons.
    Create a method with name you used in on_click property.
    Best regards,
    Caíque Escaler

  • How to loop through a collection of records which is return value of func.

    Hi all.
    Have this situation:
    - Stored function (member of pkg procedure) that returns a collection of records.
    Package Spec:
    =========
    type tipo_pvt is table of s08_plan_venta_totalizado_r % rowtype;
    rc_pvt tipo_pvt;
    (s08_plan_venta_totalizado_r is a view).
    Package Body:
    =========
    select col1
    ,col2
    ,etc
    bulk collect into rc_pvt
    from s08_lista_precio_producto_r lpp
    ,s03_producto_r prd
    where condition;
    return rc_pvt;
    Once collection is loaded and returned (i know it loads records). I just want to loop through every record on a pl/sql procedure on the client (forms6i procedure), but it gives me the error: ORA-06531 Reference to uninitialized collection:
    On the forms6i client procedure i have something like:
    procedure p_carga_plan_venta_inv (p_id_plan_venta in number) is
    v_contador integer;
    v_mensaje varchar2(10);
    rc_pvt sk08_gestiona_plan_venta.tipo_pvt; (sk08_gestiona_plan_venta is package name)
    begin
         rc_pvt := sk08_gestiona_plan_venta.tipo_pvt();
         rc_pvt := sk08_gestiona_plan_venta.f_genera_plan_venta_inv (:pvv.lip_id_lista_precio
    ,:pvv.ems_id_sucursal
                                            ,:control4.v_metodo_calculo
    ,:pvv.unm_co_unidad_monetaria
    ,:pvp.fe_fin_periodo) ;
    -- previous statement dos not fail BUT THIS:
    message('rc_pvt.count= '||rc_pvt.count);pause;
    DOES FAIL
    end;
    So my question is : since i have already returned the collection, how come is not initialized....?
    Do i have to extend it first? In this case i have to return the number of records in the collection.....
    Look what happen when done from sqlplus:
    declare
    rc_pvt sk08_gestiona_plan_venta.tipo_pvt;
    begin
    rc_pvt := sk08_gestiona_plan_venta.tipo_pvt();
    rc_pvt :=
    sk08_gestiona_plan_venta.f_genera_plan_venta_inv (8713171
    ,null
    ,'m'
    ,'BS.F'
    ,to_date('28/02/2001','dd/mm/yyyy'));
    end;
    SQL> /
    Registros en la coleccion =6
    Procedimiento PL/SQL finalizado con éxito.
    SQL>
    I put a dbms_output.put_line on stored function .....
    Please help ....!
    Apparently it fails when calling the stored function:
    rc_pvt := sk08_gestiona_plan_venta.f_genera_plan_venta_inv (:pvv.lip_id_lista_precio
    ,:pvv.ems_id_sucursal
    ,:control4.v_metodo_calculo
    ,:pvv.unm_co_unidad_monetaria
    ,:pvp.fe_fin_periodo) ;
    I don't undestand since this function return the appropiate type. It seems the collection is empty, although having test that on sqlplus works ...
    rc_pvt := sk08_gestiona_plan_venta.f_genera_plan_venta_inv (:pvv.lip_id_lista_precio
    ,:pvv.ems_id_sucursal
    ,:control4.v_metodo_calculo
    ,:pvv.unm_co_unidad_monetaria
    ,:pvp.fe_fin_periodo) ;
    function f_genera_plan_venta_inv (p_id_lista_precio in number
    ,p_id_sucursal in number
    ,p_tipo_nivel_inv in varchar2
    ,p_co_unidad_monetaria in varchar2
    ,p_fe_fin_periodo in date) return tipo_pvt;
    for some reason it works on plus:
    SQL> declare
    2 rc_pvt sk08_gestiona_plan_venta.tipo_pvt;
    3 begin
    4 rc_pvt := sk08_gestiona_plan_venta.tipo_pvt();
    5 rc_pvt :=
    6 sk08_gestiona_plan_venta.f_genera_plan_venta_inv (8713171
    7 ,null
    8 ,'m'
    9 ,'BS.F'
    10 ,to_date('28/02/2001','dd/mm/yyyy'));
    11 --
    12 dbms_output.put_line('Registros en la coleccion = '||rc_pvt.count);
    13 for i in 1 .. rc_pvt.count loop
    14 --
    15 dbms_output.put_line('En '||i||rc_pvt(i).prd_co_producto);
    16 end loop;
    17 end;
    18 /
    Registros en la coleccion =6
    Registros en la coleccion = 6
    En 1PT.REF.PET.KO05
    En 2PT.REF.PET.LM15
    En 3PT.ALM.VDR.001
    En 4PT.REF.GRN.CN
    En 5PT.REF.GRN.KO
    En 6PT.REF.GRN.LM
    Procedimiento PL/SQL finalizado con éxito.
    Don't understand why it works on plus8 (same version that comes with 6i).
    Can't loop through records on forms...? WHY ...?
    Edited by: myluism on 02-abr-2012 14:40

    Forms 6i is an antique ... write your code to run on the server.
    Multiple examples of how to loop through an array loaded with bulk collect can be found here.
    http://www.morganslibrary.org/reference/array_processing.html
    The main library page is:
    http://www.morganslibrary.org/library.html

  • Push Button , Label and combo box

    Hi Experts,
    Currently facing a problem , please guide.
    I have two push buttons say A and B and one combo box.
    I am using Combo box with source data as filtered row options.
    What I want to accomplish is when push button A is clicked then my combo box should have different souce of data say sheet 1 in excel and when Push button B is clicked then the same combo box should have source data from sheet 2 from the same excel.
    I mean dynamic selection of source data and then destination data by using combo boxed.
    is it possible ?
    Thanks in advance.
    Thanks & Regards,
    Anjna

    Hi,
    Use 2 combo boxs CB1 n CB 2.
    CB1 : source form sheet1
    CB2:Source from sheet 2
    when push button  A is selected  set dynamic visibility such that u get combo box 1
    when push button  B is selected  set dynamic visibility such that u get combo box 2.
    Case 2:
    Insted of using 2 push buttons you can use a radio butoon and select the lables A or B so that these two combo box components dnt appear at once
    Take a radio button component and map lables as A and B
    under behaviour tab: >Insert selected item:>mapp it with a blank cell say Sheet3!$G$4
    if radio button selection is A then set dynamic visibility such that u get combo box 1
    if radio button selection is b then set dynamic visibility such that u get combo box 2
    formula cells:
    take a blak cell say Sheet3!$H$7 and write formula =IF(Sheet3!$G$4="A","",first label of combo box 2)
    take a blak cell say Sheet3!$H$8 and write formula =IF(Sheet3!$G$4="B","",first label of combo box 1)
    Combo box 1 :Behaviour tab-->Selected item :Sheet3!$H$7
    Combo box 1 :Behaviour tab-->Selected item :Sheet3!$H$8
    check if this suits ur req ...
    @Sri
    Edited by: Sri kamesh on Jun 21, 2011 11:00 AM

  • I want cRIO to start and stop acquisition with push of physical button on cRIO, is that possible?

    When using my cRIO 9024 on the field, I prefer  to be able to start and stop acquisition with push of a physical button on cRIO. 
    I mean I don't want it to be "as start-up," I don't want cRIO to start acquisition as soon as the power is supplied. 
    Is that possible?
    Solved!
    Go to Solution.

    Hi Cashany,
    you surely can read that switch status. But there are easier (but more expensive) ways to switch a button. Fiddling with a pen or small screwdriver to switch USER1 isn't what I call "user friendly"...
    - You have atleast 2 voltage inputs on your module available. Use a switch to supply voltage to those inputs. Use a "real" button!
    - You have a serial port available. You could set some pins to GND or voltage and check their status inside cRIO/RT target...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Before the selector value reach a Case structure I need to stop it until a push button is pressed. How to do?

    Before the selector value reach a Case structure I need to stop it until a push button is pressed. How to do?

    altenbach wrote:
    UliB wrote:
    simply wire your selector value through a while loop. Stop the loop with your button. After the loop stops, the value will go on to the case structure.
    Hmmmm.....
    Hello altenbach,
    roflol .
    Thank you for the link to 'A Field Guide To LabVIEW Objects - Selfish Loop'. I'll keep that in mind, when answering other questions with while loops.
    Uli

  • The hold button on my ipod touch 3rd generation does not work and ipod randomly flashes on and off, asking if i want to restart it when no button has been pushed, any suggestions?

    the hold button on my ipod touch 3rd generation does not work and ipod randomly flashes on and off, asking if i want to restart it when no button has been pushed, any suggestions?

    it might be a malfunction in your device. you might ave to send it to repairation
    1.ave you try resetting it or restoring it?
    2. did your hold boutons whas working beffor?

  • I want a push button for line items in my sales order entry screen.

    Hi,
    I want a push button for line items in my sales order entry screen.
    How can I do so?
    Thanks.

    Hi Kumar ,
    To have a push buttons you need to first assign a pf-status .
    here a sample code for a push button and its handling :
      set pf-status 'SELECT' .
    at user-command .
      describe table t_lpr lines w_lines .
      case sy-ucomm .
        when 'SELECTALL' .
          set pf-status 'SELECT' excluding 'SELECTALL' immediately.
          do w_lines times .
            read line w_line field value w_check . " INTO W_CHECK .
            if w_check = space .
              w_check = 'X' .
              modify line w_line field value w_check.    "INTO W_CHECK .
              add 1 to w_line .
            endif .                        " IF W_CHECK = ' '
          enddo .
    Thus when you say pf-status say 'select' , Double click on that and you find a screen eher you can select icons and assign a function code to it!
    Hope it helps!
    Much Regards,
    Amuktha .

  • I want a stop button for disabling JavaScript only in the current tab

    I want a 'Stop' button for disabling JavaScript only in the current tab.
    I searched for a feature like this but couldn't find it. It would be a great new feature.

    Tab Permissions: https://addons.mozilla.org/firefox/addon/4757

  • I want push button on output screen

    Hi friends,
                   I want push button on toolbar output screen. After choosing this push button it will display one screen it having data below like this.
              .Division channel
              .Division
              .Sales organization
              .Sales Document
              .Sales Document Type
              .Sales Group
              .Sales office
              .Month
    Plz help me

    hi sreerama,
    to have a push button in ur report, u have to create a GUI status with command.
    u can create gui status using command SET PF-STATUS 'XXXX'.
    Create a button in GUI status, assign the function code for that button. Example FCODE.
    After creating GUI status, u have to use AT USER-COMMAND event for button of GUI status in report program.
    Then in ur report program, write like this.
    AT USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'FCODE'.
    ........................... " Your Logic to display what ever u want
    ENDCASE.
    sy-ucomm catches all the function codes of the system.
    For further reference, check these links.
    To create GUI status:
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/801d43454211d189710000e8322d00/frameset.htm
    For List Events:
    http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba3ae35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba2c435c111d1829f0000e829fbfe/frameset.htm
    <b><REMOVED BY MODERATOR></b>
    Harimanjesh AN
    Message was edited by:
            Alvaro Tejada Galindo

  • Looping through an array, i dont want duplicates

    hello,
    I am wondering if anyone can help me please, I have an array
    containing numbers, these numbers are attached to movie clips to
    determine where they are on the stage, and they are generated
    randomly, so the movie clips are always in a new place when a
    certain button is pressed.
    My problem is that I dont know how to avoid duplicates. The
    way I have done it is I have put the values in an array, and I loop
    through this with a for loop, from here I take the values and link
    them to another array that contains the movie clips, this all works
    well but some of the movie clips are stacked on top of one another
    because the same array values are coming up :S I have attached the
    code, so any suggestions would be gratefully recieved, I just
    havent a clue on this one :S
    Many thanks any help is gratefully recieved :D

    Hi. You were wise to trace the value of n. Your problem seems
    to be that the tests succeed (almost always) in the very first
    iteration because they truly don't match (where n = 0) and
    execution breaks out. You need to adjust the logic. As one
    approach, while sticking with your code and not changing it too
    much (such as using more efficient int vs Number):
    at the very top, define a counter var ct:int = 0;
    before the testing loop, define a flag, such as var
    flag:boolean = false;
    you could then invert the logic in the loop and test for ==
    rather than for !=
    if you find a match, do--> flag = true;
    and break
    at the end of testing, use the flag to decide whether to
    store the new value
    if (!flag) {
    // add to array
    ct++;
    also, use a while loop for controlling the whole thing-->
    while(ct < max) { }
    to know when you're done
    You can also check out the Array functions indexOf() and
    some(), to make things more efficient and faster/easier
    when you're all done, you can also look into using if (a != b
    && c != d)
    for efficiency, instead of nesting them separately
    good luck :)

Maybe you are looking for

  • How do I get my galaxy s4 to work again?

    A Week ago I dropped my galaxy s4 in the toilet on accident. I let it air out and it seemed it work fine and charged that night but since then It hasn't been charging. I couldn't use it for a couple days because once it died it wouldn't charge again.

  • Deleted files on external hard drive...but space isn't opening up!

    Hi all, I do my Time Machine backups to an external hd. I recently tried to do a backup and it failed, telling me there was not enough space. It told me I needed 12.something GB and I only had 10.something GB available. I checked the amount of availa

  • Adobe Flash Player, version 10.1.102.64 installed, but I cannot access FP dependent applications

    Adobe Flash Player, version 10.1.102.64 is installed, but I cannot access FP dependent applications (such as those on Facebook.) I used the link you previously  provided  http://www.adobe.com/products/flashplayer/fp_distribution3.html to  download th

  • PrE 11 will not import .jpg files from organizer

    Hi, I just upgraded from PS & PrE 8 to the lastest version 11. I'm running on a Windows 7 pc.  My catalog was successfully converted and new pictures were added.  I now want to create a dvd with both pictures and videos.  I tried various ways to impo

  • Urxvt non-latin copy-paste

    Hello. I've used tutorial from Archlinux wiki to get easy copy (ctrl+c) and paste (ctrl+v) in urxvt. The problem now is that urxvt can't paste non-latin characters correctly. For example, I need to paste this to terminal: Région parisienne Guake term