Exit from loop by user

Hi every body
i have a procedure that execute a loop.What i want that to allow user to exit from loop before it finished(by using keyboard), i do that by pressing ctrl+alt+del which end the program it self.

One could try putting the call to the procedure in a loop on the front end. Then check within the loop (in the front end ) whether the user has pressed a pre-defined button. If pressed, one could disconnect the connection or take some similar action that would stop processing the call to the stored procedure.
May be something like this is workable ... ?
Narayan.
null

Similar Messages

  • How to exit from loop after 3  time

    hi
    how to exit from loop after 3  time
    loop at itab.
    <exit after 3 time>
    endloop.
    thanks

    Hi,
    You can check the value of SY_TABIX inside loop,
    For Example:
    Loop at itab.
    if sy-tabix  = 3.
    Exit.
    endif.
    Endloop.
    Hope it helps
    Regrds
    Mansi

  • EXITING FROM LOOP

    if in a loop iam checkin a condition n if the condition satisfies then which is the best way to exit the loop.

    Hi Sushant,
    Use EXIT in the LOOP after the condition .If u use STOP it will exit from the Program.
    Try this example creating a Program by uncommending EXIT and STOP.
    DATA: t_mara TYPE STANDARD TABLE OF mara.
    DATA: w_mara TYPE mara,
              sum     TYPE i.
    SELECT matnr mtart FROM mara INTO CORRESPONDING FIELDS OF TABLE t_mara
    WHERE mtart EQ 'KMAT' OR mtart EQ 'FERT' OR mtart EQ 'LGUT'.
    sum = 0.
    IF sy-subrc EQ 0.
      SORT t_mara BY mtart.
      LOOP AT t_mara INTO w_mara.
        IF w_mara-mtart EQ 'LGUT'.
          sum = sum + 1.
    EXIT.
          *STOP.
        ENDIF.
      ENDLOOP.
    ENDIF.
    WRITE : sum.
    Reward Points if useful.
    Regards
    Avi...

  • How to exit from a loop on 2 different conditions

    Hello Experts
    I’m trying to write a procedure in which I’m taking PROVINCE as an input parameter. All the provinces are stores in a table. I’m using a cursor and rowtype variable to check the province. After I finds province I displays province and its code. Everything works fine expect when I don’t find the province. I’m not sure how to exit from loop if I don’t find the province. I already uses exit when condition. I was expecting else condition should work and should exit from the loop but it doesn’t. Can please somebody show me how to exit if I don’t find province in the table through cursor.
    Here is my code
    set serveroutput on
    variable G_TAX varchar2(10)
    CREATE OR REPLACE PROCEDURE p_create(i_state VARCHAR2)is
    CURSOR cur_bb_tax is
    select * from bb_tax;
    bb_tax_details bb_tax%rowtype;
    begin
    if not cur_bb_tax%isopen then
    open cur_bb_tax;
    end if;
    loop
    fetch cur_bb_tax into bb_tax_details;
    if (bb_tax_details.state = i_state) then
    dbms_output.put_line(bb_tax_details.state || bb_tax_details.idstate);
    end if;
    exit when bb_tax_details.state = i_state;
    end loop;
    close cur_bb_tax;
    exception
    when others then
    dbms_output.put_line(SQLERRM);
    end;
    Thanks in advance

    Hello,
    Why don't you use dbms_output.Put_line and print output to find why logic is not able to execute? Maybe upper case/lower case/whitespace. *Also put your code between \ to preserve formatting*.
    Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to exit from while loop

    Hi
        I want to exit from loop if error is encountered.
    THanks

    Hi Sonu,
    This is not a question related to the SDK. This is more of a coding question you should probably try something like StackOverflow or MSDN forums for that next time.
    Regarding your question it depends on the language you are using. If you are using c# you can use the keyword "break;" inside an if that checks for the error. In VB you can use "Exit For" or "Exit While".
    Best regards,
    Pedro Magueija

  • Stop Video Clip From Looping

    After creating an iDVD movie containing multiple video clips and slideshows, one of the video clips Loops (but only once) before proceeding to the following slide show. I don't want it to loop but don't know how to stop it. Because it only loops once then proceeds, I have a strange feeling that this is a strange quirk rather than an errant iDVD setting. Also, none of the other videos loop.

    Setting movies and slideshows to loop
    You can set slideshows, autoplay movies (which start to play immediately when a DVD is inserted into a player, before the DVD menu appears), and movies to repeat continuously, or “loop.” This means they begin replaying immediately after they end. If they include audio, the audio also loops.
    Looping an autoplay movie is especially useful for creating self-playing presentations, such as those used in tradeshow kiosks. For more information, see Related Topics below.
    In map view you can see at a glance which slideshows and movies are set to loop. A circular arrow symbol appears in the bottom-right corner of the icon.
    Here are ways to turn looping on or off:

    Double-click a slideshow button on the DVD menu to open the slideshow editor. Click the Settings button and select the “Loop slideshow” checkbox.

    Select a slideshow icon in map view, and then press Command-I to open the Slideshow Info window. Select the “Loop Slideshow” checkbox, and then close the window.

    Click a movie or slideshow button on the DVD menu, or a movie, slideshow, or autoplay movie icon in map view, to select it, and then choose Advanced > Loop Movie or Loop Slideshow.
    When looping is turned on, a checkmark appears next to the command in the menu. To turn off looping, select it again to remove the checkmark.

    To turn looping off for a background movie on a menu, open the Menu Info window. With your pointer over the menu (but with no buttons or text items selected), press Command-I. Move the Loop Duration slider to zero.
    When you’re viewing the burned DVD, you can press the Menu button on the DVD remote control to exit from looping.
    Click Here

  • User exit from ABAP workbench

    Hello Gurus,
           How can I get  user exit from ABAP workbench ?
    thanks very much!

    here is the program for the user exits..
    REPORT z_find_userexit NO STANDARD PAGE HEADING.
    TABLES : tstc,     "SAP Transaction Codes
             tadir,    "Directory of Repository Objects
             modsapt,  "SAP Enhancements - Short Texts
             modact,   "Modifications
             trdir,    "System table TRDIR
             tfdir,    "Function Module
             enlfdir,  "Additional Attributes for Function Modules
             tstct.    "Transaction Code Texts
    *& Variables
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    *& Selection Screen Parameters
    SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK a01.
    *& Start of main program
    START-OF-SELECTION.
    Validate Transaction Code
      SELECT SINGLE * FROM tstc
        WHERE tcode EQ p_tcode.
    Find Repository Objects for transaction code
      IF sy-subrc EQ 0.
        SELECT SINGLE * FROM tadir
           WHERE pgmid    = 'R3TR'
             AND object   = 'PROG'
             AND obj_name = tstc-pgmna.
        MOVE : tadir-devclass TO v_devclass.
        IF sy-subrc NE 0.
          SELECT SINGLE * FROM trdir
             WHERE name = tstc-pgmna.
          IF trdir-subc EQ 'F'.
            SELECT SINGLE * FROM tfdir
              WHERE pname = tstc-pgmna.
            SELECT SINGLE * FROM enlfdir
              WHERE funcname = tfdir-funcname.
            SELECT SINGLE * FROM tadir
              WHERE pgmid    = 'R3TR'
                AND object   = 'FUGR'
                AND obj_name = enlfdir-area.
            MOVE : tadir-devclass TO v_devclass.
          ENDIF.
        ENDIF.
    Find SAP Modifactions
        SELECT * FROM tadir
          INTO TABLE jtab
          WHERE pgmid    = 'R3TR'
            AND object   = 'SMOD'
            AND devclass = v_devclass.
        SELECT SINGLE * FROM tstct
          WHERE sprsl EQ sy-langu
            AND tcode EQ p_tcode.
        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
        WRITE:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        SKIP.
        IF NOT jtab[] IS INITIAL.
          WRITE:/(95) sy-uline.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
          WRITE:/1 sy-vline,
          2 'Exit Name',
          21 sy-vline ,
          22 'Description',
          95 sy-vline.
          WRITE:/(95) sy-uline.
          LOOP AT jtab.
            SELECT SINGLE * FROM modsapt
            WHERE sprsl = sy-langu AND
            name = jtab-obj_name.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
            WRITE:/1 sy-vline,
            2 jtab-obj_name HOTSPOT ON,
            21 sy-vline ,
            22 modsapt-modtext,
            95 sy-vline.
          ENDLOOP.
          WRITE:/(95) sy-uline.
          DESCRIBE TABLE jtab.
          SKIP.
          FORMAT COLOR COL_TOTAL INTENSIFIED ON.
          WRITE:/ 'No of Exits:' , sy-tfill.
        ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(95) 'No User Exit exists'.
        ENDIF.
      ELSE.
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        WRITE:/(95) 'Transaction Code Does Not Exist'.
      ENDIF.
    Take the user to SMOD for the Exit that was selected.
    AT LINE-SELECTION.
      GET CURSOR FIELD field1.
      CHECK field1(4) EQ 'JTAB'.
      SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
      CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    give the tcode it will show the user exit and if u click on the user exit it will takes to the code..
    regards,
    venkat

  • To find an user exit from a FM

    Hi All,
    Suppose I have a function module , which corresponds to a particular exit(which I do not know). How do I back trace the user exit from the FM ?
    Plz help.

    Hi Pradipta,
    Please check this code.
    REPORT  y_rtest                                 .
    TABLES : tstc, "SAP Transaction Codes
    tadir, "Directory of Repository Objects
    modsapt, "SAP Enhancements - Short Texts
    modact, "Modifications
    trdir, "System table TRDIR
    tfdir, "Function Module
    enlfdir, "Additional Attributes for Function Modules
    tstct. "Transaction Code Texts
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : FIELD1(30).
    DATA : v_devclass LIKE tadir-devclass.
    SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS : p_funam LIKE enlfdir-funcname OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK a01.
    SELECT SINGLE * FROM enlfdir
    WHERE funcname = p_funam.
    SELECT SINGLE * FROM tadir
    WHERE pgmid = 'R3TR'
    AND object = 'FUGS'
    AND obj_name = enlfdir-area.
    MOVE : tadir-devclass TO v_devclass.
    * Find SAP Modifactions
    SELECT * FROM tadir
    INTO TABLE jtab
    WHERE pgmid = 'R3TR'
    AND object = 'SMOD'
    AND devclass = v_devclass.
    BREAK-POINT.
    IF NOT JTAB[] IS INITIAL.
    WRITE:/(95) SY-ULINE.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 SY-VLINE,
    2 'Exit Name',
    21 SY-VLINE ,
    22 'Description',
    95 SY-VLINE.
    WRITE:/(95) SY-ULINE.
    LOOP AT JTAB.
    SELECT SINGLE * FROM MODSAPT
    WHERE SPRSL = SY-LANGU AND
    NAME = JTAB-OBJ_NAME.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    WRITE:/1 SY-VLINE,
    2 JTAB-OBJ_NAME HOTSPOT ON,
    21 SY-VLINE ,
    22 MODSAPT-MODTEXT,
    95 SY-VLINE.
    ENDLOOP.
    WRITE:/(95) SY-ULINE.
    DESCRIBE TABLE JTAB.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No of Exits:' , SY-TFILL.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(95) 'No User Exit exists'.
    ENDIF.
    * Take the user to SMOD for the Exit that was selected.
    AT LINE-SELECTION.
    GET CURSOR FIELD FIELD1.
    CHECK FIELD1(4) EQ 'JTAB'.
    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
    Regards ,
    Ranjit Thakur.
    Please Mark the Helpful Answer.
    Message was edited by: Ranjit Thakur
    Message was edited by: Ranjit Thakur

  • Call an applications 'user exit' from a PL/SQL procedure

    My question is a technical PL/SQL question related to Oracle Applications. I need to call a standard applications 'user exit' from a stored PL/SQL procedure. Can anyone tell me if this is possible and how to do it?
    (i.e. I am attempting to call the AR user exit SALESTAX)
    Thanks,
    Michelle Dodge

    Hi,
    Read this thread, perhaps is there your response :
    Host...
    Nicolas.

  • PO Creation from Sales Order User Exit

    Hi,
    I have a business requirement where I need to  create a Stock Transport Order (STO) for a particular kind of sales order. I outlined different options for achieving this functionality.
    1. Trigger a workflow for creating STO.
    2. Configure it an EDI output for sales orders. Using the EDI document, create STO in the same system.
    3. Create STO using BAPI from the sales order exit 'USEREXIT_SAVE_DOCUMENT'.
    I am trying to understand the issues if I go with option of creating STO from sales order user-exit. I tested it and it is working fine. But what concerns is me transaction integrity. In other words I am trying to  execute another transaction within a transaction. Both Transactions (VA01 and ME21N/BAPI) may be trying to access same tables. Anyways I havent see any potential overlap.
    I would like to know anybody implemented such a solution?
    What could be the potential issues? Does it really affect transaction integrity?
    Thanks A Lot
    Anil

    I would also be concerned with the possibility of the order failing to update AFTER you call the BAPI.  You could create a custom output type that processes on order create for that order type.  You could add your BAPI call to the processing routine of the output type.

  • To exit from the while(1) loop

    Hi all ,
    I have a simple question that if in a callback function of a command button, i use a While(bLoop)
    loop , where bLoop is a boolean variable initially set to TRUE, then how can i break or exit from this while Loop by using a control on the front panel  , which exits the while loop by setting     bLoop = FALSE .
    I have tried it but it is not exiting  
    Solved!
    Go to Solution.

    The problem here is that CVI normally only executes one callback at a time. While you are in one control callback, no GUI processing and subsequent calls to other callbacks normally occurs.
    You can try the following approach - but it is not really the best method:
        while (b_loop) {              // Inside a callback
            ...                       // Perform your tight program loop
            ProcessSystemEvents ();   // Force CVI to see if any GUI controls need servicing
    If you have a different control callback to clear the global b_loop, this quick-and-dirty approach might work for you.
    You should only use this technique for very simple programs - it can rapidly spiral out of control and end up in a mess if you're not careful. NI recommends that you do not use ProcessSystemEvents() inside a control callback.
    JR

  • Accessing the Logon User Exit from the Internet using an ITS Service

    I can access the Logon User Exit (EXIT_SAPLSUSF_001) from R/3, but not from the Web using an ITS service. What am I missing in order to access the Logon User Exit from the Web. The ITS service was created from an ABAP screen program.
    Thanks
    david yee

    The SAPGui logon exit is called after successfull authentication has been completed and after a SAPGui session has been attached.
    If you logon via RFC, WebGui, ICM or the Wgate then this exit does not trigger.
    What are you wanting to add to your code after the logon ?
    An solution I have used is to create a wrapper RFC for a BAPI and create a webservice for the wrapper. Before calling the BAPI you can do whatever you want to from a security perspective.
    But for that you need to have an appropriate BAPI...
    Please explain what you want to do and what you would have wanted in the exit. Often there is a better way.
    Cheers,
    Julius
    ps: I moved this to the security forum.

  • How to exit from the loop

    loop at itab.
    if <CONDITION>
    <EXIT LOOP>
    endif
    endloop.
    this ths condition , pz tel how to exit from loop

    Hi
    Loop
       statements
    EXIT
    Endloop.
    Will comes out of the loop.
    Regards,
    Sreeram Kumar.Madisetty

  • EXIT from a user exit to intial screen of MM01

    hi friends,
    I am working on MM01 user exit..after saving user exit ll trigger..and in one scenerio we need to come back to screen MM01 with message at task bar..
    Please give some idea ..
    regards

    well to come back to your initial screen is quite easy.
    goto mm01 on your initial screen and hit F1.
    in the help hit the button technical information.
    there you get some information. amongst them your dynpro number of the screen you are on. (ahhh BTW make sure you place you cursor on the main screen before doing above steps, otherwise you get the dynpro-number of the subscreen your cursor is placed on.)
    Then at the end of your user-exit write: leave to screen (your dynpro number you identified with the steps above).
    to place a status message i believe you already have to be on the dynpro on which you want it to display. this would mean you had to modify the PBO event of that dypro, and i dont think you want that.
    but i dont see any other solution. maybe some other dude will post something about that

  • How to exit from the DO-while loop in the event structure

    Hi all
    I am just a beginner for Labview
    I want to build a loop in the event structure, but when I enter in the loop, it seems the system is dead, and I can't exit the loop.
    here I attached a simple sample.
     In the sample.  when I press the start_calculation button , the calculation start, but the system is dead, and I can't exit calculation loop.
     actually, i just want switch the different operation by changing the event action.
    anybody has a good idea about it??
    thanks so lot
    Attachments:
    event_problem.vi ‏17 KB

    Your problem is that you are trapped inside an event case. It is not a good idea to run extended code inside event cases, else the event structure cannot service other events.
    Why don't you use the outer loop for everything? Now things don't step on each others toes. What good is an event structure if it cannot react at all times???
    Message Edited by altenbach on 07-25-2008 12:26 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    event_problemMOD.vi ‏17 KB

Maybe you are looking for

  • How do I set default colors for XY chart series (lines and legend)

    I am implementing a line chart and need to override the default (caspian style) colors for the line colors and the legend symbols. I'm not displaying the chart symbols themselves as that would make the chart look bad. I've been able to successfully s

  • Error message: Cannot be validated

    I am a university lecturer and my university has an agreement with Adobe that allows academics to download Adobe suite for teaching purposes but when I enter the serial number I was given I get an error message saying that it cannot be validated. Any

  • Cisco CP-8961 MIC certificates

    Hi Everybody, we want to configure 802.1X eap-tls authentication on our CP-8961 phones. Following the steps in this documentation http://www.cisco.com/en/US/docs/solutions/Enterprise/Security/TrustSec_1.99/IP_Tele/IP_Telephony_DIG.html#wp390292 I was

  • Camera connection kit, to much power problem

    I have the iPad 4 but I cannot connect my camera using the USB connection kit. It says accessory use to much power. Will a powered USB hub work and if so which one do I need.

  • Can't see movie on Apple TV, but iTunes does - why?

    I have MANY movies on iTunes, and with a couple of exceptions, am able to view them all on TV via Apple TV. The exceptions are movies that look great on my mac, but do not show up on the movie list via the Apple TV. I have deleted them and moved them