Doubt in dialog progms

hi experts,
   if any one knows plz give me reply.
1. Why we are using atleast empty loop in PBO,PAI while usign Table control in Screen painter. wht's the correct reason?
2. Wht is the difference between call screen, set screen, leave screen?
3. How the chain and end chain concept works in SE51.
plz give some solutn, point will be sure.
Gowri

Hi
Since Table control always holds a Range of records we use Loop..endloop..
both in PBO and PAI
see the doc for table control
syntax:
CONTROLS  ON CHAIN-INPUT|CHAIN-REQUEST.
ENDCHAIN.
Check this out
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabbd35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_47x200/helpdata/en/d1/801ca2454211d189710000e8322d00/frameset.htm
Set screen and Leave Screen are used to leave the current screen
SET SCREEN 100.LEAVE SCREEN.
It is similar to LEAVE TO SCREEN 100.
Reward points for useful Answers
Regards
Anji

Similar Messages

  • Doubt on dialog

    hi experts
          I am new to the dialog programming.
         My requirement is 
        1) I have Sales document as Input in the Screen (vbeln)
        2) After enter vbeln then I press enter key, then i need to display the Sales
           document details like Material and its Description Order qty in the table
           control tc1.
        3) I have ztable also called zctlp but not having details of vbeln,material and all.
        4) These details i need to pick from vbap or some other tables.
          How to do this, pls help me on the same.
    Thanks in advance
    Regards
    Rajaram

    1. you can by naming the screen input as vbak-vbeln and check the "From dict" on tab "Dict" in the property.
    2.,3. you need to code the program to select the data from vbak and vbap and move the data to your work area  (zctlp) in the table control .
    4.you can code anytthing that you want in your program but if you want to assign value to the screen you need to set the name of variable and the name in the screen is the same.
    you can use the wizard to generate table control also.
    Regards
    Wiboon

  • Hi friends i have doubt in dialog programming.

    i am desiging the screen using table control. which is suppose to accept unit of measure as 'car' means carton, kg, and so on. so if i enter numerics it should not accept. can anybody tell me how  can i restrict the user to enter only alphanumerics. thanks in advance.

    Hello,
    U can use the system table field ABCDE for checking if it has only alphabets.
    system field == SY-ABCDE
    Regards
    Anurag

  • Regarding dialog progmming

    hi frnds,
    How to display the internal table value in screen.
    eg.
    TYPES: BEGIN OF ST_VBKD,
            BSTKD TYPE VBKD-BSTKD,
            BSTDK TYPE VBKD-BSTDK,
           END OF ST_VBKD.
    DATA: IT_VBKD TYPE STANDARD TABLE OF ST_VBKD,
            WA_VBKD TYPE ST_VBKD.
    SELECT VBKDBSTKD VBKDBSTDK
        INTO TABLE IT_VBKD
        FROM VBRK
        INNER JOIN VBRP ON VBRKMANDT = VBRPMANDT
                       AND VBRKVBELN = VBRPVBELN
        INNER JOIN VBKD ON VBRPMANDT = VBKDMANDT
                       AND VBRPAUBEL = VBKDVBELN
           WHERE VBRK~VBELN = VBRK-VBELN.
      if sy-subrc = 0.
      endif.
    but the problem is the the values nt displaying in my screen.

    Hi,
    Check if data is fetched into internal table or not i.e check wheather sy-subrc is zero.
    if it is zero and still the values are not display on screen use the following statement.
    Loop at it_vbkd into wa_vbkd.
    endloop.
    and make sure that the fields which you are using on your screen are selected from work area wa_vbkd,
    not from internal table it_vbkd.
    hope this will help you.
    Thanks & Regards,
    Rajesh Kumar.

  • Regarding Dialog Boxes

    hi, I am a novice in Labview. I have a doubt regarding dialog boxes. can i make a VI as a dialog without running the VI.
    Thanks in Advance
    Regards
    Soundarya

    Soundarya wrote:
    hi, I am a novice in Labview. I have a doubt regarding dialog boxes. can i make a VI as a dialog without running the VI.
    Thanks in Advance
    Regards
    Soundarya
    Hi Soundarya,
    what do you mean? You can make a vi and use it as a dialog, but why should the vi not run?
    Mike
    Message Edited by MikeS81 on 07-07-2009 09:03 AM

  • Regarding Dialog Box

    hi, This is Akhila.
    I am a novice in Laview. I have a small doubt regarding Dialog Boxes
    Can I add a dialog box in the project same like adding a VI
                                       Thanks in Advance
    Regards,
    Akhila

    You can create a VI that works like a dialog box. See the shipping examples for some examples on dialog boxes. You can also convert an Express VI dialog to a regular VI and save it as your own. See the Help on converting Express VIs to regular VIs.

  • Subscreen selection screen for function pool program

    Hi,
    I have a requirement wherein i need to make the parameter field flexible( meaning can exclude, include values etc). Same function as select-options. The parameter was created in a dialog progmming.
    The problem here is that i am using function pool. I have tried to use subscreen but it is only applicable on report program. Is anyone knows if this is possible. Or is there any way to make the field as select-option without using call subscreen?
    Please help!
    Thanks in advance!

    Hi,
    No need to create separate Fields ,only create as parameter.
    for your Reference check below code.
    DATA : lv_title             TYPE sy-title,
                ls_description TYPE rsfldesc,
                lt_selopt          TYPE STANDARD TABLE OF rsdsselopt.
    PARAMETER : p_field TYPE ausp-atwrt .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field.
      lv_title = 'TEST'.
      ls_description-type    = 'C'.
      ls_description-length  = '30'.
      ls_description-olength = '30'.
      CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
        EXPORTING
          title                    = lv_title
          description       = ls_description
          help_field         = 'AUSP-ATWRT'
        TABLES
          range               = lt_selopt
        EXCEPTIONS
          no_range_tab      = 1
          cancelled         = 2
          internal_error    = 3
          invalid_fieldname = 4
          OTHERS            = 5.
      IF sy-subrc NE 2.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

  • Doubt in Progms

    Hi experts,
            i have some doubt in progms... any one plz help.... point will be sure.
            1. How to select internal table records with select statement.
            2. In reports when Top of page will triger? in report which event will triger 1st.
            3. In interactive report how the user knows which area he going to click? ( In my basic list i have purchase order, qty, price ) if the user clicks one purchase order in my second list it going to give there respective value... in that time wht type of syntax will be ok for that?
            4. In menu painter if i click any menu wht event will be triger?
    plz give some idea i will try here...
    Gowri

    Hi Gowri,
    1. How to select internal table records with select statement.
    Ans : We Can't use Select Statement in Internal tables. But We can use Read statement          for retrieve the datas from IT.
    2. In interactive report how the user knows which area he going to click?
        Try this Fallowing code,                                    
    TYPE-POOLS : SLIS,
                 ICON.
    TABLES : ZEMPLOYEEALV,ZEMPLOYEEALV2.
    DATA : BEGIN OF WA_EMP1,
              NAME TYPE ZEMPLOYEEALV-NAME,
              SALARY TYPE ZEMPLOYEEALV-SALARY,
              EXPERIENCE TYPE ZEMPLOYEEALV-EXPERIENCE,
              DESIGNATION TYPE ZEMPLOYEEALV-DESIGNATION,
              EXPAND,
              BOX,
           END OF WA_EMP1.
    DATA: BEGIN OF WA_EMP2,
            NAME TYPE ZEMPLOYEEALV2-NAME,
            CITY TYPE ZEMPLOYEEALV2-CITY,
            ADDRESS TYPE ZEMPLOYEEALV2-ADDRESS,
            INCENTIVE TYPE ZEMPLOYEEALV2-INCENTIVE,
             LIGHT,
          END OF WA_EMP2.
    DATA : IT_EMP1 LIKE TABLE OF WA_EMP1 WITH HEADER LINE,  "Header Table
           IT_EMP2 LIKE TABLE OF WA_EMP2 WITH HEADER LINE,  "Item Table
           IT_FCAT TYPE SLIS_T_FIELDCAT_ALV,                "Fieldcat Table
           WA_FIELDCAT LIKE LINE OF IT_FCAT.             "Fieldcat Workarea
    DATA IT_FCAT1 TYPE SLIS_T_FIELDCAT_ALV.
    DATA WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA WA_KEYINFO TYPE SLIS_KEYINFO_ALV.
    DATA: IT_EVENTS TYPE SLIS_T_EVENT,
          WA_EVENTS LIKE LINE OF IT_EVENTS.
    DATA WA_REPID TYPE SY-REPID.
    WA_KEYINFO-HEADER01 = 'NAME'.
    WA_KEYINFO-ITEM01   = 'NAME'.
    PERFORM FILL_TABLES.
    PERFORM LAYOUT.
    PERFORM FIELDCAT.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
      I_LIST_TYPE           = 0
    IMPORTING
       ET_EVENTS             = IT_EVENTS
    EXCEPTIONS
      LIST_TYPE_WRONG       = 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.
    BREAK-POINT.
    READ TABLE IT_EVENTS INTO WA_EVENTS WITH KEY NAME = 'USER_COMMAND'.
    IF SY-SUBRC = 0.
    WA_EVENTS-FORM = 'FORM1'.
    MODIFY IT_EVENTS FROM WA_EVENTS INDEX SY-TABIX.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
      EXPORTING
      I_INTERFACE_CHECK              = ' '
       I_CALLBACK_PROGRAM             = 'Z0255ALV_HIERARCHIALLIST'
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
       IS_LAYOUT                      = WA_LAYOUT
       IT_FIELDCAT                    = IT_FCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
       IT_EVENTS                      = IT_EVENTS
      IT_EVENT_EXIT                  =
        i_tabname_header               = 'IT_EMP1'
        i_tabname_item                 = 'IT_EMP2'
      I_STRUCTURE_NAME_HEADER        =
      I_STRUCTURE_NAME_ITEM          =
        is_keyinfo                     = WA_KEYINFO
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                =
      IR_SALV_HIERSEQ_ADAPTER        =
      IT_EXCEPT_QINFO                =
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      tables
        t_outtab_header                = IT_EMP1
        t_outtab_item                  = IT_EMP2
    EXCEPTIONS
      PROGRAM_ERROR                  = 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.
    *&      Form  FILL_TABLES
    form FILL_TABLES .
      SELECT NAME
             SALARY
             EXPERIENCE
             DESIGNATION
             INTO TABLE IT_EMP1
            FROM ZEMPLOYEEALV
            UP TO 8 ROWS.
      SELECT NAME
             CITY
             ADDRESS
             INCENTIVE
            INTO TABLE IT_EMP2
            FROM ZEMPLOYEEALV2.
           FOR ALL ENTRIES IN IT_EMP1 WHERE
           NAME = IT_EMP1-NAME.
            LOOP AT IT_EMP2.
             IF IT_EMP2-INCENTIVE = 221.
              IT_EMP2-LIGHT = '2'.
              ELSEIF IT_EMP2-INCENTIVE = 255.
              IT_EMP2-LIGHT = '1'.
              ELSE.
               IT_EMP2-LIGHT = '3'.
             ENDIF.
             MODIFY IT_EMP2 INDEX SY-TABIX.
            ENDLOOP.
       LOOP AT IT_EMP1.
         IF IT_EMP1-SALARY = '100'.
            IT_EMP1-BOX = 'X'.
         ENDIF.
          MODIFY IT_EMP1 INDEX SY-TABIX.
       ENDLOOP.
    endform.                    " FILL_TABLES
    *&      Form  LAYOUT
    form LAYOUT .
      WA_LAYOUT-ZEBRA             = 'X'.
      WA_LAYOUT-EXPAND_FIELDNAME = 'EXPAND'. "FOR EXPANDING
      WA_LAYOUT-EXPAND_ALL = 'X'.
      WA_LAYOUT-LIGHTS_FIELDNAME = 'LIGHT'. " FOR LIGHT
      WA_LAYOUT-LIGHTS_TABNAME = 'IT_EMP2'.
      WA_LAYOUT-BOX_FIELDNAME  = 'BOX'.   " FOR CHECKBOX
      WA_LAYOUT-BOX_TABNAME = 'IT_EMP1'.
    endform.                    " LAYOUT
    *&      Form  FIELDCAT
    form FIELDCAT .
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         I_PROGRAM_NAME               = WA_REPID
         I_INTERNAL_TABNAME           = 'IT_EMP1'
         I_STRUCTURE_NAME             = 'ZEMPLOYEEALV'
        I_CLIENT_NEVER_DISPLAY       = 'X'
        I_INCLNAME                   = WA_REPID
        I_BYPASSING_BUFFER           =
        I_BUFFER_ACTIVE              =
        CHANGING
          CT_FIELDCAT                  = IT_FCAT
      EXCEPTIONS
        INCONSISTENT_INTERFACE       = 1
        PROGRAM_ERROR                = 2
        OTHERS                       = 3
      IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      DELETE IT_FCAT WHERE FIELDNAME <> 'NAME' AND
                           FIELDNAME <> 'SALARY' AND
                           FIELDNAME <> 'EXPERIENCE' AND
                           FIELDNAME <> 'DESIGNATION'.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
       EXPORTING
         I_PROGRAM_NAME               = WA_REPID
         I_INTERNAL_TABNAME           = 'IT_EMP2'
         I_STRUCTURE_NAME             = 'ZEMPLOYEEALV2'
        I_CLIENT_NEVER_DISPLAY       = 'X'
        I_INCLNAME                   =
        I_BYPASSING_BUFFER           =
        I_BUFFER_ACTIVE              =
        CHANGING
          CT_FIELDCAT                  = IT_FCAT1
      EXCEPTIONS
        INCONSISTENT_INTERFACE       = 1
        PROGRAM_ERROR                = 2
        OTHERS                       = 3
      IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      DELETE IT_FCAT1 WHERE FIELDNAME <> 'NAME' AND
                           FIELDNAME <> 'CITY' AND
                           FIELDNAME <> 'ADDRESS' AND
                           FIELDNAME <> 'INCENTIVE'.
    APPEND LINES OF IT_FCAT1 TO IT_FCAT.
                        " FIELDCAT
    ENDFORM.
    FORM FORM1 USING UCOMM LIKE SY-UCOMM SEL_FIELD TYPE SLIS_SELFIELD.
    BREAK-POINT.
    WRITE: SEL_FIELD-FIELDNAME.
    WRITE: SEL_FIELD-VALUE.
    BREAK-POINT.
    *IF SEL_FIELD-FIELDNAME = 'NAME'.
    *SELECT * FROM ZEMPLO
    ENDFORM.
    Thanks.

  • Dialog prog. doubt

    hi alll,
    i've created one dialog prog. in that prog. i created inserted table control. in that control i placed two TXTNAME and TXTAGE (input/output field). BUT I activated, the folllowing error occurs during runtime :
    The txtname is not assigned to a loop "LOOP ... ENDLOOP" muthu appear in "PBO" and "PAI".
    pls solove my problem

    Hi,
    While defining a table control on a screen, the following statements are mandatory :
    1. CONTROLS : <TABLECONTROL> TYPE TABLEVIEW USING SCREEN <SCREENNO.>
    2. In the Flow Logic,
      a. In the PBO.
        Loop at itab with <tablecontrol>.
        endloop.
      b. In the PAI,
        loop at itab.
        endloop.
    In your case, ensure that the Statement 2 is present.
    Reward if helpful.
    Regards

  • Doubt about constructor and show.Input dialog

    Hi everybody!
    I wrote this program in java. It works, but I have some doubts. The points that are not clear to me are in comments. Thanks in advance:
    import javax.swing.JOptionPane;
    public class Bicicleta extends JOptionPane{
         int velocidad;
         int cambios;
         String color;
    public Bicicleta(){// Why we have to make a constructor without procedures, if we have the constructor public Bicicleta(values) down?
                             //I mean, if we delete this constructor,
                             // the program will not work.
    public Bicicleta(int cambiarVelocidad, int cambiarCambios, String cambiarColor){ //without the constructor bicicleta
         velocidad = cambiarVelocidad;                                                            // that is up of this procedure,     
         cambios = cambiarCambios;                                                                 // the program will not work, Why?
         color = cambiarColor;
    public int getVelocidad(){
         return velocidad;
    public int getCambios(){
         return cambios;
    public String getColor(){
         return color;
    public void setVelocidad(int nuevaVelocidad){
         velocidad = nuevaVelocidad;
    public void setCambios(int nuevoCambio){
         cambios = nuevoCambio;
    public void setColor(String nuevoColor){
         color = nuevoColor;
    public void showBici(){
         this.showMessageDialog(null, "Los valores de la nueva bicicleta son: Velocidad de "+velocidad+" tiene "
         cambios" cambios y es de color "+color);
    public Bicicleta getBici(){
         return (new Bicicleta(this.getVelocidad(),this.getCambios(),this.getColor()));
    public void setBicicleta(){
         velocidad = Integer.parseInt(this.showInputDialog("Inserte la velocidad de la bicicleta"));
         cambios = Integer.parseInt(this.showInputDialog("Inserte la cantidad de cambios de la bicicleta"));
         color = (this.showInputDialog ("Inserte el color de la bicicleta"));
    public static void main(String[] args){
         Bicicleta bike = new Bicicleta();
         bike.setBicicleta();
         Bicicleta nuevaBici; // I copy this segment of code form anyone else, but I dont understand it.
         nuevaBici = bike.getBici();          // Can someone explain it please?
         nuevaBici.showBici(); //
    }

    The program is supposed to recollect the data with:
    public void setBicicleta(){
    velocidad =
    = Integer.parseInt(this.showInputDialog("Inserte la
    velocidad de la bicicleta"));
    cambios =
    = Integer.parseInt(this.showInputDialog("Inserte la
    cantidad de cambios de la bicicleta"));
    color = (this.showInputDialog ("Inserte el color de
    e la bicicleta"));
    So, I think that the values of variables are defined
    by the user. So, we dont have to define any previous
    data, because it is a input of the program user.
    Maybe I?m wrong, so what is my error in this case?Not thinking about responsibilities? So when I go and create a new Bicycle, I have a bicycle with no color and no top speed. Have you ewver seen a bicycle like that? A bycicle that asks you about what color it should have? Shouldn't rather the one creating the bicycle be the one to ask you for the values, and then apply them to the bicycle he creates?
    Do the asking first, then call
    bike = new Bicicleta(theColor, theSpeed, theGears, whatever);That way you can also get rid of that c'tor you don't want, since it makes no sense anyway.

  • Dialog Box doubt

    Is there a way to get values from the YES_NO_CANCEL \ OK_CANCEL options in the standard dialog boxes, i.e, attaching actions to be performed when YES or NO is clicked?
    Thanks

    Just doswitch (JOptionPane.showConfirmDialog (...)) {
        case JOptionPane.YES_OPTION:
            break;
        case JOptionPane.NO_OPTION:
            break;
        default:
            break;
    }Kind regards,
      Levi

  • Doubt in skinning of dialog property

    Hi
    I have applied global skinning for dialog property, i have applied new close icon for dialog proprty
    whenever i hover/click that close icon  it is showing the default close icon even i have applied new image for that
    what can be applied in css file to change this
    currently am using the below code in css file
    af|dialog::close-icon-style,
    af|dialog::close-icon,
    af|dialog::focus,
    af|dialog::click,
    af|dialog::hover,
    af|dialog::close-icon-style-region{
    background-image: url("../images/btn_close_popup.png");
    width:13px;
    height:20px;  
    Help me in this ASAP
    Thanks

    Hi pavan.
    something is definitely wrong with your code: You have an internal table for display with fields from rpca 2 and additional some more fields. I do not see a field ORT01 for CITY or PSTLZ for POSTAL CODE, at least to in table GLPCA from where the data are extracted.
    You must fill PSTLZ and ORT01 (if it is for the supplier):
         SELECT SINGLE * FROM LFA1
             WHERE LIFNR = <glpca>-LIFNR AND
             SPRAS = SY-LANGU.
         IF SY-SUBRC eq 0.
            <glpca>-name1 = lfa1-name1.
            <glpca>-adrnr = lfa1-adrnr.
            <glpca>-stras = lfa1-stras.
    **** add here: ***
      select single ort01 pstlz
        into corresponding fields of <glpca>
        from adrc
        where adrnr = <glpca>-adrnr.
         ENDIF.
    Make sure that fields ORT01 and PSTLZ are defined for internal table i_glpca.
    Regards,
    Clemens

  • How can a JTextField in a Dialog gain focus while mainframe is clicked

    Hi
    I have been trying to develop a 3d application. I have some shapes on a Canvas3D laid on a JFrame.
    I open a new shape dialog after pressing the appropriate button.
    Once the dialog is open I need to select two shapes on canvas for reference hence there are two text fields to show the name of each.
    when I select the first shape the corresponding textfield is being updated.
    Now the Problem
    I place the cursor in the second tex field and click on second shape on canvas.
    I lose focus from text field to canvas.
    Now I am unsure if the second textfield has the focus or is the focus with the first text field. Based on this focus info I can update the text fields.
    I understand that only one field can have focus at a time.
    My doubt is How can the JTextField retain its focus while the components on main window are being clicked.
    The following code is enclosed in a listener that responds to picked shapes.
    if(gooi.getSketchDialog() != null && gooi.getSketchDialog().isShowing()){
                gooi.getPick1().getCanvas().setFocusable(false);
                if(gooi.getSketchDialog().getSelectedPlaneTextField().isFocusOwner()){
                        if( pickResult != null)
                            gooi.getSketchDialog().getSelectedPlaneTextField().setText(pickResult.getNode(PickResult.SHAPE3D).getUserData().toString());
                        else if (pickResult == null){
                            gooi.getSketchDialog().getSelectedPlaneTextField().setText("");
            }Any help is appreciated.
    Thanks in Advance
    Venkat
    Edited by: pushinglimits on Oct 31, 2008 6:52 AM

    Michael
    The text field still loses focus when its containing window is no longer focused.import java.awt.FlowLayout;
    import java.awt.event.FocusEvent;
    import java.awt.event.FocusListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JTextField;
    import javax.swing.SwingUtilities;
    public class NoFocusTransfer implements FocusListener {
       public static void main(String[] args) {
          SwingUtilities.invokeLater(new Runnable() {
             @Override
             public void run() {
                new NoFocusTransfer().makeUI();
       public void makeUI() {
          JTextField one = new JTextField(20);
          one.addFocusListener(this);
          JTextField two = new JTextField(20);
          two.addFocusListener(this);
          JFrame frameOne = new JFrame("");
          frameOne.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frameOne.setSize(400, 400);
          frameOne.setLocationRelativeTo(null);
          frameOne.setLayout(new FlowLayout());
          frameOne.add(one);
          frameOne.add(two);
          JButton button = new JButton("Click");
          button.setFocusable(false);
          JFrame frameTwo = new JFrame();
          frameTwo.add(button);
          frameTwo.pack();
          frameTwo.setFocusable(false);
          frameOne.setVisible(true);
          frameTwo.setVisible(true);
       public void focusGained(FocusEvent e) {
          try {
             System.out.println("Focus from: " +
                     e.getOppositeComponent().getClass().getName());
             System.out.println("Focus to: " +
                     e.getComponent().getClass().getName());
          } catch (NullPointerException npe) {
       public void focusLost(FocusEvent e) {
          try {
             System.out.println("Focus from: " +
                     e.getComponent().getClass().getName());
             System.out.println("Focus to: " +
                     e.getOppositeComponent().getClass().getName());
          } catch (NullPointerException npe) {
    }db

  • Doubt in user exit for transaction MM03

    Hi Friends,
        I have a doubt in user-exits. I have to add a button in MM03 which when clicked should open a particular URL taking material no. as the parameter.I have got the function for opening the URL, I just want to know which user exit should I be calling and in what way?Can anyone please give me step by step procedure as I am new in user exits.Thanks in advance....

    VA01 is a dialog program.  The use of WRITE statements in dialog program is really not done.
    You will need output your values to existing screen fields or create new ones in SE51.
    Sounds like you might want to review dialog prog in general.
    Also - the TABLES statement is for database tables.  It has nothing to do with internal tables.

  • Open/Save Dialogs: How to Set Min. Sidebar Width?

    I am now running Lion.  I cannot remember if I had this problem under Snow Leopard, but I certainly have it now.  Whenever I bring up the Open/Save dialog within some apps (for example, Illustrator CS5.0), no matter how large I've made that dialog overall, the sidebar width is always too narrow such that all the names inside the sidebar aren't perfectly visible horizontally.  Yes, I can make the sidebar wider by hand for a single session.  But if I close the dialog and open it again, the sidebar becomes narrow again.
    How can I define a minimum width for the Open/Save dialog sidebar, that all apps will obey perpetually?

    Perhaps, but in my many years of online forum participation, I've found that people are lazy (myself included at times). And unless we exert ourselves, we often don't post something for the benefit of others, even though we may have the answer.  As such, a somewhat provocative follow-up post, while having the potential to upset some, is usually sufficient to encourage at least one person to stand up and post a potential solution.  It got you to post a response (even though it was not the answer I sought), which I appreciate.  Hopefully, someone with the answer will be able to post back here.  I am a believer of "where there's a will there's a way," so no doubt someone out there far more clever than I has discovered a fix for it.
    I therefore look forward to hearing the thoughts of others on this issue.

Maybe you are looking for

  • Browser view in Dreamweaver different than IE view on other PCS

    I'm setting up a new webpage.  The page layout, fonts, etc. look great on my page in Dreamweaver CS4 and also when I use the preview in browser tool. I then publish my page out to our Intranet - still looks good to me.  However, everyone else in our

  • Blocked pop up window

    Hi, Could someone help me with a pop up window problem. I'm new to dreamweaver, and am currently trying to build my own site. On my home page, i have a link which visitors click on to 'open up a new window' which contains my main Flash site. I've cre

  • Bi general settings and img or spro settings

    Hi experts, I am working in bi for preparing bex reports in previous projects. Now, I am woking in new implementation project. I have blank server. What are the steps to start the new server settings in bi 7.0? I know the connection settings for sap

  • Insert the row in "navigatedOutRow" event method...

    Hi guys, I want to insert the row to the database when user drop down to another row in Grid Control. I added myNavBar.doClick(NavigationBar.BUTTON_INSERT); to the detailGrid_navigatedOutRow even method. but it doesn't work for me. Do i am wrong way?

  • Problem with processCopy

    Hi, I am using Jdeveloper 10.1.3 and hence the intermedia and jdbc libraries that ship with that. I am trying to write a thumbnail image to the database but when I try and do this the following error occurs when I invoke processCopy : java.sql.SQLExc