POP up cancel button coding

Hi,
I have coded for a pop up for the transaction va02 in the user exit MV45AFZZ.
This will trigger while saving.
It has two buttons "Cancel" and "Exit".
Exit - if you press Exit, it will go to easy access screen.
Cancel - It should remain in the same screen.
Exit works fine...But for cancel, i written the below code,
Leave to screen 4001.
It also works, but when you move to other screen in VA02 and try to save, while this pop up comes, and press Cancel, it gives dump.
What code should be written so it will work for all screen? What ever the screen, it should remain in the same screen while cancel button is pressed.
Thanks,
Ezhil.

Hi,
Thanks All..
This issue is solved by putting the below coding for cancel button
if l_answer = '1'.        "Cancel Button
    set screen sy-dynnr. 
    leave screen.
elseif l_answer = '2'.     "Exit Button
   leave to screen 0.
endif.

Similar Messages

  • Yes, No and Cancel Buttons on Pop-Up for BACK or NEW button

    Hi Experts,
    First scenario:
    We have crated few mandatory fields in incident when ever we are not filling the mandatory fields and try to SAVE (Incident Tool bar button) the Incident, it will Check for any Error Messages, before saving the Document,
    If entries not found in mandatory fields record will not get saved.
    This functionality we are controlling in EH_ONSAVE method of the SRQM_INCIDENT_H/IncidentOV.
    Second scenario:
    But After filling few fields in Incident screen, If I click on NEW button for a new incident or BACK button ,  it give one popup with message Do you want to  save the changes ? With Buttons Yes, No and Cancel. If I click on the Yes button Incident gets saved with an IRN number without entry of any mandatory data.
    How can I control the second scenario as first scenario? Please suggest how to controll Yes, No and Cancel Buttons on Pop-Up for BACK or NEW button as SAVE button.
    Thanks in advance
    Chand

    hi,
    you can control  the pop-up SAVE button without saving your details or write your ownlogic on pop-up save.
    please refer to this post.
    Re: Suppress POP-UP
    regards
    Ismail

  • How to use a cancel button........

    hello everyone,
                  i have a selection screen, from where i am calling a selection-screen as a pop-up screen. the fields i am checking on the pop-up screen will get append on the previous screen. now the problem i am facing with the cancel button.
        if i am pressing the cancel button still the checked fields are getting appended.
    i want to exit from the screen and want to keep the previous screen as it is. it is a simple report program.
    please help me out.
    thanks i advance.

    I am using set screen 0. and leave screen.
    but still the problem persists.
    let me tell you in detail.
    i am going to pop-up screen to get the fields appended on my previous screen.
    if i check some checkboxes on it and click ok then according to those checked fields the corresponding select-options should come on previous screen. 
    because i have added set screen 0. to 'OK'.
    now what i am facing is if i check some checkboxes on the pop-up and say 'CANCEL' still the program is appending the those checkboxes and appending them on the previous screen.
    what i am expecting is, it should exit the pop-up screen and should maintain the previous screen as it is.
    thanks

  • How to change the text in the Cancel button of JFileChooser ?

    Hello,
    In french the standart text in the Cancel button of the JFileChooser class is "Annuler". For a good reason which will be too long to explain, I need to change it by another term.
    I tried to create a super class and redefine the CANCEL_SELECTION string, but this does not work. I can't either change it directly because it has the final attribute.
    Where does JFileChooser get this word from ? ( I guess it is not hard coded for multilanguage support purpose).
    Any help would be appreciated
    Gege

    I believe the standard Look and feel implementations look in UIManager for a string called FileChooser.cancelButtonText.
    Therefore you might be able to change it after you've loaded your LnF by using the following code:
    UIManager.put("FileChooser.cancelButtonText", "---change me---");Note that this would change all file choosers in your application.
    If you only want to update one type of file chooser you could extend, for example, MetalFileChooserUI and set its cancel button text by overriding installStrings. You'd then need to install this UI on the file chooser you want to change.
    There may be an easier way to do this!
    Hope this helps.

  • Creating a dialog box with OK and Cancel buttons without OADialogPage

    Hi Experts,
    i want to create a dialog box for Delete Confirmation means after clicking on delete it should pop up a small dialog box with OK/Cancel buttons
    and need code for the same to handle the buttons.
    i have created with OADialogPage but its showing in a complete page but i want to show those buttons in a small box.
    Plz help.
    THANKS IN ADVANCE.
    Thanks
    Raja.

    Hi,
    I have not tried using javascript in destination URI as suggested by Mukul.
    I have tried the below code for opening a page as dialog box.
    You can try it for your requirement by creating a dialog page of your own, say XXDialogPage (with OK and Cancel button)
    StringBuffer l_buffer = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    String url = "/OA_HTML/OA.jsp?page=/xx/oracle/apps/fnd/dialog/webui/OADialogPG";
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:500, height:500},false,'dialog',null);");
    pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
    In dialog page's controller, you can forward it to the page onc ethe user selects OK or Cancel.
    Pass the selected value back to the main page and further you can use it for deleting.
    Regards.

  • Popup- ok and cancel button

    Hello,
    The popup 'X' has nested view 'Y' and Ok, Cancel buttons. Nested View 'Y' has a start point, a Data service, a table with single column 'Z' and a out-port (configured to event Select), from the out-port, close pop-up endpoint is connected which is mapped to store the value of column 'Z'.  The value of column Z, should be send out only on the click of OK button of the pop-up and not when Cancel is clicked, is there a way to validate that? At this moment, it is sent regardless of which button is clicked.
    Thanks much,
    Dharmi

    Hi Kobi,
    I understood what you said but how do you do "that can be set to TRUE in the popup OK button." ?? The popup at [design time|http://img145.imageshack.us/img145/8789/popupdesigntimeks2.jpg] and [layout|http://img371.imageshack.us/img371/750/popuplayoutgs4.jpg].
    If it is a normal form which has button you can store anything with that to data store, here how would I link that "OK" (close window) action of popup?
    Best regards,
    Dharmi

  • LOV cancel button displays 'No Data Found'

    I have 5 fields on a form where the users can search different information based on what they type into the search fields. Once they have their search criteria they hit a 'Search' button, I have a when_button_pressed button trigger on the search button. On this trigger I have logic to build a record group dynamically, after the RG gets populated dynamically I am using the SHOW_LOV bulit-in to present my LOV to the end user. All this works well, however, there is a new requirement in where the client wants a 'no data found' message displayed on the screen when users type arbitrary/invalid information on any of the search fields. I was able to accomplish this by simply putting the following code in the ELSE part of my main IF statement for my LOV.
    ELSE
         IF NOT SHOW_LOV('LIAB_LST_LOV')THEN
              display_message('No Data Found');
              END IF;
    END;
    The code above displays the message they want to see when search users search on invalid criteria. So finally, here is the issue, when they search on VALID criteria the LOV obviously pops up without any issues but if users click the 'Cancel' button in the LOV window they get the 'No Data Found' message above too. They only want to see the message if there is invalid data searched.
    How can I make sure that after the LOV gets populated my code doesn't return the No Data Found message when they press Cancel on the LOV?
    Thanks,
    Adrian

    Hi Francois,
    I used the get_group_row_count you suggested and I was able to incorporate it into my code without any issues and more importantly it is working now! This is what I did, after populating the record group, I checked to see if the row count was greater than 0 for the RG if it was not then I’m displaying the message. It is working correctly.
    Thank you!
    Adrian

  • NO data change message during CANCEL button of ME52N

    Hi Gurus,
    When i do changes in ME52n then press save button i get error message. Then i press CANCEL button, instead of going to screen 0 it gives an information message ''No Data Change' which i dont want.
    Please give your suggestions.
    Regards,
    Milind

    has someone added an enhancement or exit coding?  Doesn't sound like standard SAP....sounds like error in someone's PF Status handling code.

  • Cancel button help

    hi
    im still fairly new to java and i was just wondering how i would go about making a cancel button for my JOptionPane boxes
    also i have an array that when its searched it displays the result in JOptionPane windows, but if there are more than one result it will show it up in one then another one comes up after and displays in there to. i want them both displayed in the same box
    part of my coding is here:
    if (inputbox == 1){
    String input2 = JOptionPane.showInputDialog("Please enter a flight number eg QF5");
    for (int row = 0; row < 21; row++) {
      if (Flights[row][0].equals(input2)){
              JOptionPane.showMessageDialog(null,"flight " + Flights[row][0] + '\n'  + "Will be leaving from " + Flights[row][3] + " and going to " + Flights[row][4] + '\n' + "Departing at: " + Flights[row][1] + " And will arrive at: " + Flights[row][2]);
    }code]
    i use a menu system at the start which they press a number, in this example its 1, it will take them to another box that askes them to enter a flight number which it then searches the array for. it works ok if there is only one answer but if there is more than 1 then it shows them in seperate boxes, i want them in the same box.
    thank you for your time
    cheers                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    no offence but I have great difficulty reading your posts they contain very little punctuation making them hard to read were you to take a little more care I'd help but I can't be arsed to read it six times to figure out what you're on about thanks have a nice day

  • CR Parameter Cancel Button

    Hi Experts,
    while trying to refresh the Crystal report from Launchpad, when the parameter screen pops up isn't there a way that i can cancel or close the prompt screen? I only see OK which triggers the refresh again once i click on OK. Can't i just cancel/close the parameters pop up?
    I can see a cancel button in the CR Designer but not in Launchpad. I am using CR 2013 and BI 4.1.
    Regards,
    Raja

    Web Applications using the CR SDKs have the same issue. And BI being a web app, you see the same thing. This is by design. See KBA 1697935 - In a Crystal Reports .NET SDK web application, parameter prompt of the report does not have a 'Cancel' button for more details.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Multithreaded Swing and a "Cancel Button"

    I have a Swing-based app that runs some lengthy JDBC queries. Currently when the user hits the "Run Query" button a small dialog pops up to say that the process is running, please wait, etc. I'd like to add a working Cancel button to that dialog that will allow the user to stop that query before it finnishes.
    From what I've been able to learn so far it seems I should use one of the SwingUtilities methods such as invokeAndWait or invokeLater. I'm not sure which one would be more appropriate for my situation though.
    I'm also having trouble thinking of an elegant way (or not-so elegant if that's the only way) to have the cancel button event communicate with the DB Query thread to let it know that the process should be stopped. Detailed explanations or examples would be welcome.
    Mike

    You will not need to use the SwingUtilities methods. Those are when you want to update the GUI from a different thread. In your case, you want to update a class running in a non-gui thread from the GUI thread. Not a problem.
    You will want to create a Runnable class that runs your query. Run that class on another thread when the query is executed. There will need to be some public 'cancel' method in that class that can be called when you want that object to cancel whatever operation it is doing. Simply call that 'cancel' method from your dialog button's action when the user hits the cancel button.
    Now, how your query class handles the cancel method is the main problem. The api way of doing this would be to call the Statement.cancel() method on the statement object that is performing the query. But how (or if) that method works depends on the jdbc driver & database, hopefully yours supports it. :-)

  • How to add Ok & Cancel Button--- [solved]

    Hi,
    i have two data blocks,M is master and D is detail
    if the user checks the check box in M and D,i want the user to have option of canceling the process by clicking cancel button or processed by clicking ok .
    i was able to create alert message for the user , but the user does not have the option of canceling the process when the message pop ups
              IF :M .CHECKBOX = 1 and D.CHECKBOX = 1 THEN
              message_handler_pkg.display_error('display message '||:M.dataitem,v_alert_response);
    thanks in advance
    Message was edited by:
    Rowdheer
    Message was edited by:
    Rowdheer

    Create an alert in your form with required no of buttons, u will have an option of upto 3 buttons . Use this alert along with your messaging options ..
    Provided your messaging package has options to include the alerts
    try this procedure !
    PROCEDURE disp_alert
              ( ALERT_NAME               IN     VARCHAR2,
              ALERT_MESSAGE          IN     VARCHAR2,
              ALERT_RETURN_VAL          OUT     NUMBER ) IS
         AL_ID ALERT;
         BEGIN
         AL_ID := FIND_ALERT(ALERT_NAME);
         SET_ALERT_PROPERTY(AL_ID,ALERT_MESSAGE_TEXT,ALERT_MESSAGE);
         ALERT_RETURN_VAL := SHOW_ALERT(AL_ID);
         IF IV_N_ALERT_RETURN_VAL = ALERT_BUTTON1 THEN
              ALERT_RETURN_VAL := 1;
         ELSIF IV_N_ALERT_RETURN_VAL = ALERT_BUTTON2 THEN
              ALERT_RETURN_VAL := 2;
         ELSIF IV_N_ALERT_RETURN_VAL = ALERT_BUTTON3 THEN
              ALERT_RETURN_VAL := 3;
         END IF;
    END;
    ssr

  • "Cancel" button is clicked stop app activating

    Hi
    I found a hole in my script which lets the user when clicking "Cancel" from the
    authentication dialog have immediate access to the application "TEST".
    How do I when the "Cancel" button is clicked stop the above from happening and not let the application activate?
    try
    set my_Allow to {" ether 00:00:00:00:00:00 ", " ether 00:00:00:00:00:00 ", " ether 00:00:00:00:00:00 "}
    set myCompID to do shell script "ifconfig | grep ether"
    if my_Allow does not contain myCompID then
    display dialog "You do not have permission to have or use this application" buttons {"OK"}
    quit
    else
    set pass_me to "/Applications/TEST.app/"
    set app_POSIX to POSIX path of pass_me
    do shell script "/usr/bin/open " & quoted form of (app_POSIX) with administrator privileges
    end if
    end try
    cheers
    Budgie

    Sorry, forgot to mention that this is going in AS Studio, the "Cancel" button is on the
    "Authenticate" window, which pops up, not on the "display dialog "You do not have permission blah blah blah", also when the "Cancel" button is clicked it says: Apple Script Error -1708
    on will open theObject
    try
    set my_Allow to {" ether 00:00:00:00:00:00 ", " ether 00:00:00:00:00:00 ", " ether 00:00:00:00:00:00 "}
    set myCompID to do shell script "ifconfig | grep ether"
    if my_Allow does not contain myCompID then
    display dialog "You do not have permission to have or use this application" buttons {"OK"}
    quit
    else
    set pass_me to "/Applications/TEST.app/"
    set app_POSIX to POSIX path of pass_me
    do shell script "/usr/bin/open " & quoted form of (app_POSIX) with administrator privileges
    end if
    end try
    end will open
    Budgie

  • InputListofValue PopUp window CANCEL button event capture ?

    HI All ,
    Jdeveloper version 11.X.6.
    i have explained the outline of issue below:
    User enter some data on InpuLIstOfValue text field and click on the maginfied Glass, the pop opens and selects some data and click 'OK' ,it will display appropriately on below fields.
    but if user enters the wrong data on InpuLIstOfValue text field and clicks on maginfier Glass,no results found on the popup window, so upon click of "CANCEL" button on popup window ,
    is there any way to remove the old data on InpuLIstOfValue Filed ?
    Basicaly i am looking for the capturing the CANCEL button event on the popUpwindow ,based on event status .
    PLase let us know if any hints ?
    Thanks

    Step by step:
    1. Create the converter class:
    package view.converters;
    import java.util.Collection;
    import java.util.Collections;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.convert.Converter;
    import org.apache.myfaces.trinidad.convert.ClientConverter;
    import org.apache.commons.lang.StringUtils;
    public class LOVConverter implements Converter, ClientConverter {
      public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String value) {
        if (StringUtils.isBlank(value)) {
          // cancel event was triggered, so do something
        return value; // if value is not an instance of String you need to convert it to its primary type (Number, Date, String, etc)
      public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object value)
        if (value == null || /* value is empty in its primary type */) {
          // cancel event was triggered, so do something
        return value.toString();
      public String getClientLibrarySource(FacesContext facesContext)
        return null;
      public Collection<String> getClientImportNames()
        return Collections.emptySet();
      public String getClientScript(FacesContext facesContext, UIComponent uiComponent)
        return null;
      public String getClientConversion(FacesContext facesContext, UIComponent uiComponent)
        return null;
    }2. Declare the converter in faces-config.xml:
    <converter>
      <converter-id>LOVConverter</converter-id>
      <converter-class>view.converters.LOVConverter</converter-class>
    </converter>3. Your inputListOfValues should look like this (see the property converter="LOVConverter"):
    <af:inputListOfValues popupTitle="Search"
                          value="#{row.bindings.DepartmentId.inputValue}"
                          model="#{row.bindings.DepartmentId.listOfValuesModel}"
                          required="#{bindings.EmployeesView1.hints.DepartmentId.mandatory}"
                          columns="#{bindings.EmployeesView1.hints.DepartmentId.displayWidth}"
                          shortDesc="#{bindings.EmployeesView1.hints.DepartmentId.tooltip}"
                          converter="LOVConverter"
                          id="ilov1">After that, when the user clicks the Cancel button, both methods (getAsObject and getAsString) should be invoked, and then you would be able to reset the component value (using uiComponent parameter).
    AP

  • Js Confirm function : possible to change default [cancel] button

    Hi,
    Confirm function of java Script:
    Since we know that the confirm function was foucs on the OK button. can we change the focus to Cancel button after popup?
    Appreciate your help if this is possible by java script ...
    Thx...

    Can you suggest how to acheive this by minimum code.
    Coz I want to display the pop-up same as confirm function. The only difference is it should be focus on Cancel button instead.

Maybe you are looking for

  • How do I read a txt file and keep only IP addresses based on the first 2 or 3 octets of the IP?

    Hello, I have a text file and each line contains random text followed by an IP address as follows. some text....172.30.25.30 some text.....172.30.85.10 some text..172.30.25.35 some text.......172.30.85.11 some text....172.30.15.1 some text...172.30.1

  • Updating Acrobat 9.0 Pro on Win 7 laptop

    Installed Acrobat 9.0 on Win 7 laptop from old company CD.  Installed fine but updater won't run.  Can I just load the latest Acrobat update (10.1.4) to bring my verion up to date or do I need to load all of the update available since 9.0?

  • Currency field to be displayed with commas and asterisks(formatting)

    I have a field REGUH-RWBTR in my sap script code. I need to have the currency displayed with commas. And also if the digits are less, then left pad it with asterisks for remaining spaces. For eg, If the Digit is 12345678912.23 (max value), it should

  • Is it possible to make a hierarchy of application ...

    I can add a new folder to the root folder but it doesn't seem possible to move an application folder to the new folder. One can only move applications to the new folder. What I want to do is to create a folder in the Main/Root menu called something l

  • Charter & msn live search hijacking safari

    so recently i've noticed that some websites will redirect to a 'search page' from charter. and just randomly, if i reload the address it will go to the site directly, sometimes it's not redirected it just goes directly. (sites like 'daringfireball.ne