I need exit command in Jdeveloper

Hi all
I want command that exit or close the internet explorer in jdeveloper.
For example, when user press the button the explorer will terminate or exit.
Pls help me in this issue.
Best Regards;
HABIB

Hi,
try
FacesContext facesContext = FacesContext.getCurrentInstance();
org.apache.myfaces.trinidad.render.ExtendedRenderKitService service = org.apache.myfaces.trinidad.util.Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
service.addScript(facesContext, "window.close();window.opener.location.href = window.opener.location.href;");
See following will helpful
Java code for closing browser window

Similar Messages

  • AT EXIT-COMMAND in ABAP OO

    Hi everyone!
    I need to execute some instructions when user exit from the program.
    Something like AT EXIT-COMMAND in PAI.
    But i dont have any PAI module or declared flow logic in my screen definition,
    becouse screen is calling automaticly by abap, i cant change anything there.
    Structure of my program is similiar to this: [http://help-abap.blogspot.com/2008/10/dispaly-alv-report-output-in-same.html|http://help-abap.blogspot.com/2008/10/dispaly-alv-report-output-in-same.html]
    How i should run some code when user leave the program?
    EDIT:
    ok, i got solved it
    i needed this one:
    AT SELECTION-SCREEN ON EXIT-COMMAND .
    PERFORM EXIT_PRG.
    Best regards,
    Przemek
    Edited by: hamsterman on Jul 26, 2010 11:15 AM

    Try the event:
    AT SELECTION-SCREEN ON EXIT-COMMAND .

  • Is it possible to add the exit command to a button in ALV OO toolbar

    Hi ABAP folks,
    is there are a way to add the exit command to a button of an ALV toolbar (like in the GUI status)?
    I want to prevent the field validations of a dynpro field at PAI.
    Thanks and regards,
    Martin

    Manage the event [TOOLBAR|http://help.sap.com/saphelp_erp2004/helpdata/en/ee/c8e07dd52611d2b468006094192fe3/frameset.htm] of CL_GUI_ALV_GRID.
    This event is triggered by the ALV each time the toolbar of the control needs to be regenerated. To add self-defined functions to the toolbar, you trigger the event using method set_toolbar_interactive and write an event handler method ( see also: Defining GUI Elements in the Toolbar).
    Look at demo BCALV_GRID_05.
    Regards,
    Raymond

  • How to capture data at exit command in module pool

    hello all,
    i have a scenario,on screen i enter some data and i press the cancel button a popup should be displayed saying do you want to cancel.if i press on yes then leave to screen 0.but if i press no then the previous data entered should be displayed on the same screen.
    can some body help me on this.
    Thanks,
    Mayank.....

    Hi,
    Create a button with type 'E' and
    call a POP UP FM 'POPUP_TO_CONFIRM' and write the code to return to the place where you want to.
    All the you need to write at at exit command.
    The code is like this:
    REPORT  ztest_at_exit.
    DATA:
      var1(10),
      var2(10),
      var3(10).
    CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'ZTEST_AT_EXIT'.
      SET TITLEBAR 'ZTEST_AT_EXIT'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      DATA:
        w_ucomm LIKE sy-ucomm.
      w_ucomm = sy-ucomm.
      CASE w_ucomm.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'CANCEL'.
          LEAVE TO SCREEN 0.
        WHEN 'ADD'.
          var3 = var1 + var2.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  EXIT_100  INPUT
          text
    MODULE exit_100 INPUT.
      DATA:
        answer.
      w_ucomm = sy-ucomm.
      CASE w_ucomm.
        WHEN 'EXIT2'.
          CALL FUNCTION 'POPUP_TO_CONFIRM'
            EXPORTING
              text_question = 'Do you want to save this ?'
            IMPORTING
              answer        = answer.
              exception
                   text_not_found      = 1
                   OTHERS              = 2.
          IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            IF NOT answer EQ '1'.
              LEAVE TO SCREEN 0.
            ENDIF.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " EXIT_100  INPUT
    Regards,
    Rama Chary.P.

  • Hide Exit Command Button

    Hi! Does anyone know how to hide the exit command button in the nokia series 80 which is automatically inserted by itself? I need to hide the exit command button because if the user select the default button, my application is still running at the background. I have created a new exit command button by using Command.EXIT and it end up there are 2 exit buttons in the device. Please help!
    Thanks in advance.
    YHat

    Please use the search, this has been asked many times before...

  • Data transport at PAI for EXIT-COMMAND

    Hi,
    I'm using module AT EXIT-COMMAND in my dynpro flow logic. As far as I know, data transport doesn't occur when function code of type 'E' is triggered,except for OK code. But I need all the dynpro fields to be transported even for 'E' type function, since I have implemented buttons 'Back', 'Exit', and 'Cancel' as 'E' type function, and I need to propose the save data to the user before exit. Thus, I need the dynpro fields to populate ABAP fields so I can save them. Is there any way how to do this?
    Thanks in advance.
    Best regards,
    Tomas

    Hi Tomas,
    even you can write your own logic Field validation ...
    process after input.
    Chain.
    *                       <<  write your Own logic
    endchain.
    you can write your own logic at at AT EXIT-COMMAND ...
    module user_command_0200 input.
    *                       <<  write your Own logic
    case ok.
    *------Leave screen
        when 'BACK'.
          leave to screen 100.
    *------Leave transaction
        when 'EXIT'.
          leave program.
    *------Select sales item details
       When Others.
      endcase.
    or you can write own logic at ..
    process after input.
    module user_command_0200.
    module user_command_0200 input.
    case ok.
    *------Leave screen
        when 'BACK'.
          leave to screen 100.
    *------Leave transaction
        when 'EXIT'.
          leave program.
    *------Select sales item details
        when 'OTHERS'.
    *       << "Write your own logic
      endcase.
    ENDmodule.
    Regards,
    Prabhudas

  • EXIT command behaviour in ABAP code?

    Hi Experts,
    Pls. let me clarify that, the behaviour of EXIT command, like,
    - in IF statement
    - in LOOP
    - in PERFORM/FORM
    -in DO
    thanq

    to exit out of the event blocks and the loops we will use exit command.
    see these links for more info.
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9af135c111d1829f0000e829fbfe/content.htm
    terminating the loop using exit
    DO 10 TIMES.
      IF sy-index = 3.
        EXIT.
      ENDIF.
      WRITE sy-index.
    ENDDO.
    The list output is:
    1 2
    module exit input.
    if ok_code = 'REFR'.
    call transaction 'ZMEDEMP'.
    elseif ok_code = 'BACK'.
    set screen 0.
    leave to screen 0.
    elseif ok_code = 'EXIT'.
    leave program.
    endif.
    endmodule.
    For E.g
    AT EXIT-COMMAND code.
    In your flow logic, you create a module as so:
    MODULE md_exit_command AT EXIT-COMMAND.
    Then in PF-status, you configure the Cancel (red button on toolbar) as exit button by setting Type of button as 'E'. Put OKCODE as 'CANC'.
    Then, in the module
    MODULE md_xit_command INPUT.
    CASE OKCODE.
    WHEN 'CANC'. LEAVE TO SCREEN 0. ENDCASE.
    ENDMODULE.
    Also refer,
    AT Exit
    Reward points..

  • Table T063O and the PAI delcare "MODULE paimodule AT EXIT-COMMAND.

    I have never declared a PAI module with the addition AT EXIT-COMMAND .
    And I never hope to have to do so.
    But if you want EXIT_SAPLIE01_007 to fire in MB02 like it fires in MIGO, you're gonna have to learn all about the "AT EXIT-COMMAND addition".
    And then, you're gonna have to learn about table T063O.
    And then, you're gonna have to try and remember who your IM configurator was or is.
    Reminds me of the old old big blue joke:
    "It's 10pm - do you know where your JCL is?".
    Anyway, do you think the "AT EXIT-COMMAND addition to PAI module declares is worth a blog?  If so, then I've got two blogs stored up that I can post in the future, because Gareth has already said that the *tablename blog is worth posting.
    djh

    Hi Rich -
    Yes - that's why I gave the flow of control through the various modules.
    You can't get to the user exit call in the lowest module UNLESS you type in a character string starting with "E" in the tcode/fcode box at the top of the screen (it doesn't have to be just an "E" - it can be any character string starting with E.)
    But note that the reason for T063O is to place a little more security on this process in the case of the various MB02 screens that have this feature.  The "E-initial" string that you type in to the tcode/fcode box has to be "pre-registered" in T063O - otherwise you get a message saying "Function Exxx not supported here"  (this is done by the second module down in the flow of control.)
    I can see why SAP did this - if it didn't have some control at the config level, then any consultant could "backdoor" an exit into MBO2 or MB03 and take home some really private data.  I also suspect this is why you can't maintain T063O in SM30 - it's probably a config function - I haven't ascertained this yet for sure.
    Finally, the only reason I happened to discover  what SAP was up to here is because I couldn't figure out why the same exit that's been working fine in MIGO didn't work at all in MB02 - it wasn't even called. And to figure this out I had to trace the flow of control backwards until I discovered the "E-string" logic and the "T0630" pre-registration logic in the top two PAI modules.
    So that's why SAP's use of this feature was a big surprise to me too - I also have never seen it and I've studied a fair amount of SAP standard code looking for exits and BADI interrupts.
    Best
    djh

  • MODULE USER_COMMAND_0200 AT EXIT-COMMAND.

    Hi Experts,
    I knew that the following statements allows user to by pass all the screen validations, so to achieve this we have to declare a function code in SET PF-STATUS of type Exit Command. So, my doubts r,
    1- Anyway, we r adding the AT EXIT-COMMAND as a suffix to to Module statement, so again What is the necessity declaring in the SET PF-STATUS as a function code?
    PROCESS AFTER INPUT.
       MODULE USER_COMMAND_0200 AT EXIT-COMMAND.
    2- What else wuld do the above statement apart from overcoming the validations(coz the author has mentioned this statement - ''An Exit-command allows you to insert functionality into the PAI that by passes all screen validation '', Which is I dont understand!)?
    ThanQ.

    hi Srinivas,
    Let us consider the following example:
    If a user wants to exit a screen, by clicking the BACK button, he should be taken out ..right?
    Instead, should there be a message poping up saying "Mandatory fields are not entered".. or "enter character data in name field"...ect..?
    no...hence, to ignore these validation, we put the code to exit the screen in a module. This module has to be defined with ...AT EXIT-COMMAND extension.
    Hope this answers your question.
    Sajan Joseph.

  • Module exit at exit-command

    Hi all,
        While I am using MODULE EXIT AT EXIT-COMMAND
    its not working properly in module pool in PAI for the main screen.
    code tht  i m using for it is as follows.
    DATA : l_ans TYPE c.
    CLEAR ok_code.
    *ok_code = sy-ucomm.
    CASE ok_code.
       WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.
          CALL FUNCTION 'POPUP_TO_CONFIRM'
            EXPORTING
              text_question  = 'Would you like to Quit ?'(004)
              text_button_1  = 'Yes'(005)
              text_button_2  = 'No'(006)
            IMPORTING
              answer         = l_ans
            EXCEPTIONS
              text_not_found = 1
              OTHERS         = 2.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          CHECK l_ans = '1'.
          LEAVE PROGRAM.

    Hello Amit,
    Please check whether you have assigned Exit Command Type to your buttons or not; in order to do that, go to the specific screen->PF-Status->Choose any standard button(you have assigned)->double-click->Set FUNCTIONAL TYPE.
    E Exit Command (MODULE xxx AT EXIT-COMMAND)
    S System Function
    T Call a Transaction
       Normal Application Function
    P Local GUI Functions
    H Internal Use
    Moreover, Module set for this exit-command with screen, should be;
    In PAI;
    MODULE exit_scr100 AT EXIT-COMMAND.
    MODULE exit_scr100 INPUT.
      CASE ok_code.
        WHEN 'CANCEL'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.                                " CASE OK_CODE
    ENDMODULE.                            
    We use AT EXIT-COMMAND, when we want to cancel out the screen or exit the screen, despite errors. Otherwise, screen would hang-up asking for correcting errors.
    Hope it helps you,
    Zahack.

  • MODULE AT EXIT-COMMAND not triggered

    Hi,
    I have placed module USER_COMMAND_9000 at exit-command in PAI but it will never be called whenever I click on button Entr, Back, Exit and Canc. I have activated the interface and everything else, also set the function key. Below is my code.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_9000.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_9000 AT EXIT-COMMAND.
    MODULE STATUS_9000 OUTPUT.
      SET PF-STATUS 'STATUS_9000'.
      SET TITLEBAR 'TITLE_9000'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    MODULE USER_COMMAND_9000 INPUT.
      CASE sy-ucomm.
        WHEN 'ENTR'.
          PERFORM populate_output.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANC'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT

    Hi,
    Do the following.
    In the screen flow logic.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_1000.
    PROCESS AFTER INPUT.
    MODULE exit AT EXIT-COMMAND.
    MODULE USER_COMMAND_1000.
    Now in F01,
    MODULE exit INPUT.
    CASE sy-ucomm.
         WHEN 'ENTR'.
           PERFORM populate_output.
         WHEN 'BACK'.
           LEAVE TO SCREEN 0.
         WHEN 'EXIT'.
           LEAVE PROGRAM.
         WHEN 'CANC'.
           LEAVE TO SCREEN 0.
      ENDCASE.
    endmodule.                 " exit  INPUT
    Thanks,
    Sri.

  • To perform database update in a module with AT EXIT-COMMAND addition

    Dear All,
    I have a function code 'EXIT' with function type 'E'. When this function code is triggered, my screen should close.
    In the module that handles this function code (defined with AT EXIT-COMMAND addition), I will prompt the user whether he/she want's to save the data before exiting with the POPUP_TO_CONFIRM_STEP function module. The text message in the dialog box is "Do you want to save before exiting?".
    When the user wants to save the data, a simple UPDATE statement will be executed to write the data on screen to database.
    The problem here is since the module is defined with AT EXIT-COMMAND addition, the data on screen won't be copied to their corresponding variable on the code (correct me if I'm wrong). Therefore, even though database update is performed, the data written to database are no different that the original.
    How to perform database update in a module with AT EXIT-COMMAND addition?
    or
    Is it even a "custom" or a "good practice" to prompt user to save data before exiting?
    Thanks in advance,
    Haris

    With an exit command, if there's anything that would be lost, I would prompt "Data will be lost, do you wish to continue?". If they do, the database is not updated, if they don't, they stay in the transaction.
    This is because the exit command runs before validation. So how can you know the data is correct?
    If you have a button to leave the transaction that isn't an exit command, then you could prompt to save instead. There the choices should be - quit without saving, save and quit, don't quit.
    Doing a database update in an exit command is not a good idea.
    matt
    Edited by: Matt on Mar 15, 2011 11:53 AM

  • Wht is EXIT-COMAND in module cancel at exit-command.?

    HI Experts,
    curious to know that,
    code is,
    process after input.
    ***Exit command
      module cancel at exit-command.
    module cancel.
      module user_command_9001.
    module cancel input.
    case: ok_code.
        when wa_con_back.
          clear ok_code.
          set screen 0.
          leave screen.
        when wa_con_exit.
          clear ok_code.
          set screen 0.
          leave screen.
      endcase.
    endmodule.                 " cancel  INPUT
    thanq

    hi check this...
    Calling a Module for Type E Function Codes
    When the user chooses a function with type E, the screen flow logic jumps directly to the following statement:
    MODULE mod AT EXIT-COMMAND.
    Regardless of where it occurs in the screen flow logic, this statement is executed immediately, and before the automatic checks for the field contents on the screen. Before the module mod is executed, only the contents of the OK code field are transported to the ABAP field with the same name. However, no other screen fields are transported. If you have more than one MODULE statement with the AT EXIT-COMMANDaddition, only the first is executed. If there are no MODULE statements with the AT EXIT-COMMAND statement, normal PAI processing resumes.
    If the user chooses a function whose function code does not have type E, the MODULE <mod> AT EXIT-COMMAND statement is not executed.
    regards,
    venkat.

  • At exit-command

    Hi,
       I am using tabstrip scrolling in application server.
    i am using 3 tabs(3 subscreens).
       But When i am using module exit at-exit command. That module is not working.
      So if Click on exit button.it's checking all the validations then only exiting from the transaction..
    Help me to solve this problem.
    With Regards
    Feirthouse K.A

    Hi,
    From sap help:
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa9535c111d1829f0000e829fbfe/content.htm
    <b>If the user chooses a function whose function code does not have type E, the MODULE <mod> AT EXIT-COMMAND statement is not executed.</b>
    sample code:
    This exit-command module looks like below.
    Module exitscreen input.
      Case v_okcode_100.
        When ‘EXIT’.
          Leave to screen 0.
        when ‘BACK’.
          Leave to screen 0.
        when ‘CANCEL’.
          Leave to screen 0.
      Endcase.
    Endmodule
    Hope this will help you.
    Cheers
    Sunny
    Rewrd points, if found helpful
    sorry : i didn't check that the thread is being answered.
    Message was edited by: Sunny

  • AT EXIT-COMMAND doesn't work

    Hi experts,
    In screen painter I use AT EXIT-COMMAND to exit current screen as the following code. But it doesn't exit the screen if ok_code = 'create' while other ok_code work well. Can anyone tell me that's why?
    Thanks!
    module exit.
      if SY-UCOMM = 'EXIT' or SY-UCOMM = 'BACK'.
        LEAVE PROGRAM.
      elseif SY-UCOMM = 'CLEAR' or SY-UCOMM = 'CREATE'.
        CALL SCREEN 100.
    endmodule.

    write this statement  in PAI
    and check weather sy-ucomm capturing the key r not
    MODULE EXIT.
      IF sy-ucomm = 'LEAV'
        SET SCREEN 0.
        LEAVE SCREEN.
      ENDIF.
    ENDMODULE.
    Regards
    Anbu B

Maybe you are looking for

  • Trouble setting up iTunes account with Paypal

    I've been having a really hard time setting an iTunes account. I don't want to use credit cards at all and according to the iTunes customer support, I don't need a credit card: "A credit card is not required. However, if you do not wish to add a cred

  • Windows 8.1 Dell 23" All In One & HP OfficeJet 6500 709a

    When using Adobe Acrobat XI Pro to create a PDF from a scan, my HP OfficeJet 6500 709a opens the HP scanning utility, makes noise and will scan one page and then stop.   I know it scanned a page because one went through the printer and came out but t

  • Browser show Korean Language on its own. Am I being hacked or is it Firefox?

    the tabs at the top of my browser displays in Korean in spurts. when it does it takes up every tab and the browser is slower. Am I being hacked or is this Firefox?

  • Adobe Reader 8 won't start in "hand tool" mode

    I have Adobe Reader 8.1.3 on Vista Home Premium. The program will not start in 'hand tool' reading mode, it always starts in 'select tool' mode and I have to change it manually. If I quit reader after switching it to 'hand tool' mode, it does not rem

  • ORA-31044: Top-level prefix length  exceeds maximum

    Hi, I am trying to migrate the cube and associated view created by view generator from one environment to another environment. The cube is migraed through XML and it is working. But when we compile the view created in one environment in the target en