How to add a button on the ALV LIST pop up

Hi ,
Can any one help me to add a button on the ALV list which is a pop up using ABAP Objects.
Thanks in advance.
Regards,
Kavya.

HI ,
I want to add a push button on the ALV list out put which is comming as a pop up and I want this using classes and methods.
I have got a method IF_SREL_BROWSER_COMMANDS~ADD_BUTTONS from class cl_gos_attachment_list  but still I am unable to get any additional button on the output ALV popup.
Please help.
Regards,
Kavya.

Similar Messages

  • How to add check box in the ALV list

    dear Experts,
                 i have a requirement.
    i want show the check boxes in my ALV list.
    can u please give the solution.
    thanks

    TYPE-POOLS: slis.
    *---internal tables
    DATA: BEGIN OF it_flight OCCURS 0,
    SEL, " add a single character field in the final output table
    carrid LIKE sflight-carrid,
    connid LIKE sflight-connid,
    fldate LIKE sflight-fldate,
    seatsmax LIKE sflight-seatsmax,
    seatsocc LIKE sflight-seatsocc,
    END OF it_flight,
    *--internal tables for alv
    it_fieldcat TYPE slis_t_fieldcat_alv,
    wa_fcat LIKE LINE OF it_fieldcat,
    layout TYPE slis_layout_alv,
    it_sort type slis_t_sortinfo_alv,
    wa_sort like line of it_sort.
    DATA: BEGIN OF it_flight_sel OCCURS 0,
    SEL,
    carrid LIKE sflight-carrid,
    connid LIKE sflight-connid,
    fldate LIKE sflight-fldate,
    seatsmax LIKE sflight-seatsmax,
    seatsocc LIKE sflight-seatsocc,
    END OF it_flight_sel.
    data: wa_flight like it_flight.
    In the layout set give the name of the field
    whose checkbox will be created ( SEL as it has 1 char only )
    layout-box_fieldname = 'SEL'.
    *---start-of-selection .
    START-OF-SELECTION.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_internal_tabname = 'IT_FLIGHT'
    i_inclname = sy-repid
    CHANGING
    ct_fieldcat = it_fieldcat
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2.
    *----get data
    SELECT carrid
    connid
    fldate
    seatsmax
    seatsocc
    FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE it_flight
    UP TO 20 ROWS.
    wa_fcat-do_sum = 'X'.
    MODIFY it_fieldcat FROM wa_fcat TRANSPORTING do_sum
    WHERE fieldname = 'SEATSOCC' .
    wa_sort-fieldname = 'CARRID'.
    wa_sort-group = 'UL'.
    wa_sort-up = 'X'.
    APPEND wa_sort TO it_sort.
    clear wa_sort.
    wa_sort-fieldname = 'CONNID'.
    wa_sort-subtot = 'X'.
    wa_sort-up = 'X'.
    APPEND wa_sort TO it_sort.
    clear wa_sort.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    is_layout = layout
    it_fieldcat = it_fieldcat
    it_sort = it_sort
    TABLES
    t_outtab = it_flight
    EXCEPTIONS
    program_error = 1.
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    Check function code
    CASE r_ucomm.
    WHEN '&IC1'.
    Check field clicked on within ALVgrid report
    IF rs_selfield-fieldname = 'EBELN'.
    Read data table, using index of row user clicked on
    READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
    Set parameter ID for transaction screen field
    SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
    Sxecute transaction ME23N, and skip initial data entry screen
    CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    ENDIF.
    WHEN '&IC1'. "'&DATA_SAVE'. "user presses SAVE
    loop at it_flight into wa_flight.
    if wa_flight-Sel EQ 'X'.
    collecting records in table it_flight_sel to process further
    append wa_flight to it_flight_sel.
    clear wa_flight.
    TYPE-POOLS: slis.
    *---internal tables
    DATA: BEGIN OF it_flight OCCURS 0,
    SEL, " add a single character field in the final output table
    carrid LIKE sflight-carrid,
    connid LIKE sflight-connid,
    fldate LIKE sflight-fldate,
    seatsmax LIKE sflight-seatsmax,
    seatsocc LIKE sflight-seatsocc,
    END OF it_flight,
    *--internal tables for alv
    it_fieldcat TYPE slis_t_fieldcat_alv,
    wa_fcat LIKE LINE OF it_fieldcat,
    layout TYPE slis_layout_alv,
    it_sort type slis_t_sortinfo_alv,
    wa_sort like line of it_sort.
    DATA: BEGIN OF it_flight_sel OCCURS 0,
    SEL,
    carrid LIKE sflight-carrid,
    connid LIKE sflight-connid,
    fldate LIKE sflight-fldate,
    seatsmax LIKE sflight-seatsmax,
    seatsocc LIKE sflight-seatsocc,
    END OF it_flight_sel.
    data: wa_flight like it_flight.
    In the layout set give the name of the field
    whose checkbox will be created ( SEL as it has 1 char only )
    layout-box_fieldname = 'SEL'.
    *---start-of-selection .
    START-OF-SELECTION.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_internal_tabname = 'IT_FLIGHT'
    i_inclname = sy-repid
    CHANGING
    ct_fieldcat = it_fieldcat
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2.
    *----get data
    SELECT carrid
    connid
    fldate
    seatsmax
    seatsocc
    FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE it_flight
    UP TO 20 ROWS.
    wa_fcat-do_sum = 'X'.
    MODIFY it_fieldcat FROM wa_fcat TRANSPORTING do_sum
    WHERE fieldname = 'SEATSOCC' .
    wa_sort-fieldname = 'CARRID'.
    wa_sort-group = 'UL'.
    wa_sort-up = 'X'.
    APPEND wa_sort TO it_sort.
    clear wa_sort.
    wa_sort-fieldname = 'CONNID'.
    wa_sort-subtot = 'X'.
    wa_sort-up = 'X'.
    APPEND wa_sort TO it_sort.
    clear wa_sort.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    is_layout = layout
    it_fieldcat = it_fieldcat
    it_sort = it_sort
    TABLES
    t_outtab = it_flight
    EXCEPTIONS
    program_error = 1.
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    Check function code
    CASE r_ucomm.
    WHEN '&IC1'.
    Check field clicked on within ALVgrid report
    IF rs_selfield-fieldname = 'EBELN'.
    Read data table, using index of row user clicked on
    READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
    Set parameter ID for transaction screen field
    SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
    Sxecute transaction ME23N, and skip initial data entry screen
    CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    ENDIF.
    WHEN '&IC1'. "'&DATA_SAVE'. "user presses SAVE
    loop at it_flight into wa_flight.
    if wa_flight-Sel EQ 'X'.
    collecting records in table it_flight_sel to process further
    append wa_flight to it_flight_sel.
    clear wa_flight.
    Please follow the code.

  • How to add a button to the grouped data in an AdvancedDataGrid?

    Hi,
    Can anyone please suggest how to add a button to the grouped data in the AdvancedDataGrid?
    I have tried extending the AdvancedDataGridGroupItemRenderer and using it as the groupItemRenderer but its not reflecting.
    For the leaf node the itemRenderer property works just fine.
    Please help!

    HI ,
    I want to add a push button on the ALV list out put which is comming as a pop up and I want this using classes and methods.
    I have got a method IF_SREL_BROWSER_COMMANDS~ADD_BUTTONS from class cl_gos_attachment_list  but still I am unable to get any additional button on the output ALV popup.
    Please help.
    Regards,
    Kavya.

  • How to Add Print Button in the Online Payslip

    Dear Friends,
    How to Add Print Button in the Online Payslip (Employee Self Service). Can anyone pls let me know about this ..
    with regards
    Swpana

    Hi,
    Please review the following documents.
    Note: 332402.1 - Can You Mass Print Of Online Payslips?
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=332402.1
    Note: 256072.1 - Payslip V4.0 Print Button Is Missing
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=256072.1
    For details about Deposit Advise and Checkwriter, please refer to:
    Note: 459306.1 - XML Checkwriter/Deposit Advice
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=459306.1
    Regards,
    Hussein

  • How to add a button to an alv standar report

    Hi all,
    I've got a requiremnt to modify the behaviour of the edit button of the ALV in TX vfx3.
    When the edit button pressed, the requiered behaviour is to navigate to a Z TX. Is it possible to edit the ALV without creating a new Z alv? Just changing the standard?
    Edited by: Iñaki Nolte Usparicha on Dec 29, 2010 12:18 PM

    Hi Iñaki, you have to copy (using transaction SE41) Status-GUI "standard" from program SAPLSALV, with the same name as our program. Delete all unnecessary components and add your custom button.
    In the program you have to add:
    Form F_SET_PF_STATUS USING rt_extab TYPE slis_t_extab.
         SET PF-STATUS 'STANDARD'.
    Endform.
    Form f_user_command USING      r_ucomm LIKE sy-ucomm
                                                                  rs_selfield TYPE slis_selfield.
         CASE r_ucomm.
                  WHEN '%NF'. "NF is the name of the button
                        PERFORM f_do_something.
           ENDCASE.
    Endform.

  • How to add a button to the toolbar of standard transaction

    hi friends
    currently i am working in IS-OIL(DS)-TSW module, in which we need to add a button to the toolbar of standard transaction(O4nm)
    can anybody help me how to proceed with this
    with regards
    s.janagar

    Hi,
    To be able to add a button to the toolbar of a standard transaction, you can use GuiXT which is a bundled solution within SAP R/3 or Netweaver.  With GuiXT, you can create your own pushbuttons within an R/3 screen or within the toolbar. You can make both the menu functions and the navigation to other transactions directly accessible with your own pushbuttons along with a new icon that you wanted to assign to the pushbuttons.
    Also, you can customize the pushbutton's size effortlessly.  And in your situation of adding it to the toolbar, GuiXT can help to set your pushbuttons automatically to fit onto the toolbar with its designer tool.
    For more information about front end changes, you can view more information about GuiXT at http://www.guixt.com/site/solutions.php
    Thank you and hope this helps!

  • How to add a Field to the Result List in Activity

    Hello Experts !
    We are on CRM 7.0. I want to add a field to the Result List of Activity (Component: BT126S_APPT / View: ApptSR). This field is the address of the "Employee Responsible".
    So, how can I add a field to the Result List? AET is not a relevant tool for us because we don't want to create an attribute it already exist in the BOL. We just have to enhance the result list with BOL existing attributes.
    Also, after I add the field, I will need to populate my field with Data via some method.
    Thanks in Advance to all !
    Mariano.-
    SAP.

    Hi Mariano,
    The component was missing some technical data. Implement sap notes 1226612, 1363752, and then follow the manual procedure shown below.
    u2022     Execute transaction SE11.
    u2022     Choose the Radio button "Data Type" and enter value
                  "CRMST_QUERY_R_ACT_BTIL" in the Data Type field.
    u2022     Click on "Change" button.
    u2022     Position the cursor before the Includes added to this structure. Click
                 On the "+" button to add a new attribute.
    u2022     Enter the following details in the newly added blank row.
         Component: PERSON_RESP_LIST
         Component Type: CRMT_PERSON_RESP_LIST.
    u2022     Save the changes and activate the structure.
    u2022     Add the "Employee Responsible" field to the View configuration.
    u2022     Open the BSP application BT126S_APPT.
    u2022     Double-click on the view BT126S_APPT/ApptSR in the left side panel.
    u2022     Choose tab "Configuration" in right side panel.
    u2022     Choose the right configuration by using the "Choose Configuration" button.
    u2022     Click on the Edit button.
    u2022     Add the "Employee Responsible" attribute from the "Available fields" list to "Displayed fields" list.
    u2022     Save the changes
    Regards
    Krishna

  • How  to add a button to the Standard Toolbar in ALV ?

    Hi All,
          If i add a button it should be displayed along with
          the  standard icons of the toolbar.
          Plz guide me.
          Thx in advance.

    Hi Albert.
    You need to do a few things for that :
    - Create your own GUI status by copying STANDARD_FULLSCREEN from function group SLVC_FULLSCREEN.
    - Set your own PF-Status using the Exclude table because otherwise your exclude table would become meaningless.
    - define a subroutine to handle the user commands.
    Sample implementation :
    FORM pf_status USING extab TYPE slis_t_extab.
      extab = pf_exclude.   
      SET PF-STATUS 'STANDARD' EXCLUDING extab.       
    ENDFORM.                    "PF_STATUS
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = repid
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'PF_STATUS'
          is_layout                = layout
          it_fieldcat              = fieldcat
          it_excluding             = pf_exclude
        TABLES
          t_outtab                 = itab
        EXCEPTIONS
          OTHERS                   = 0.
            FORM user_command  USING r_ucomm LIKE sy-ucomm
                                       rs_selfield TYPE slis_selfield.
    ENDFORM.
    Please reward points if found helpful.

  • How to add Custom button to existing ALV toolbar

    Hi,
    I want to add custom buttons for varaints in the existing row PRINT VERSION/EXPORT
    How do we do that?
    Rgds
    Vara

    I have used the standard component u2018salv_wd_tableu2019 in my application and will be able to give example by adding a button named 'NEW__BUTTON' .
    In the WDDOINIT method of the component controller, use the following code to define column name, your own buttons, visible column for the same component usage.
    DATA:
    lr_salv_wd_table_usage TYPE REF TO if_wd_component_usage,
    lr_salv_wd_table TYPE REF TO iwci_salv_wd_table.
    *Check ALV component usage
    lr_salv_wd_table_usage = wd_this->wd_cpuse_alv( ).
    IF lr_salv_wd_table_usage->has_active_component( ) IS INITIAL.
    lr_salv_wd_table_usage->create_component( ).
    ELSE.
    lr_salv_wd_table_usage->delete_component( ).
    lr_salv_wd_table_usage->create_component( ).
    ENDIF.
    *Get ALV component
    lr_salv_wd_table = wd_this->wd_cpifc_alv( ).
    wd_this->mr_table type ref to CL_SALV_WD_CONFIG_TABLE.
    *Get ConfigurationModel from ALV Component
    wd_this->mr_table = lr_salv_wd_table->get_model( ).
    *Set table settings
    DATA:
    lr_table_settings TYPE REF TO if_salv_wd_table_settings.
    lr_table_settings ?= wd_this->mr_table .
    lr_table_settings->set_visible_row_count( '5' ).
    lr_table_settings->set_width( '100%' ).
    DATA:
    lr_header TYPE REF TO cl_salv_wd_header,
    l_header_text TYPE string.
    lr_header = lr_table_settings->get_header( ).
    l_header_text = cl_wd_utilities=>get_otr_text_by_alias( 'NEW__BUTTON' ).
    lr_header->set_text( l_header_text ).
    lr_header->set_tooltip( l_header_text ).
    "lr_table_settings->set_selection_mode( cl_wd_table=>e_selection_mode-multi_no_lead ).
    *Set functions
    IF wd_this->mb_no_maintain NE abap_true.
    DATA:
    lr_function TYPE REF TO cl_salv_wd_function,
    lr_fe_button TYPE REF TO cl_salv_wd_fe_button,
    l_btn_text TYPE string.
    *Add the button here for validation on the top of the ALV
    *This is where you add the buttons on the same ROW.
    lr_function = lr_functions->create_function( 'NEW__BUTTON' ).
    CREATE OBJECT lr_fe_button.
    l_btn_text = cl_wd_utilities=>get_otr_text_by_alias( 'NEW__BUTTON' ).
    lr_fe_button->set_text( l_btn_text ).
    lr_fe_button->set_tooltip( l_btn_text ).
    lr_function->set_editor( lr_fe_button ).
    After defining the buttons 'NEW__BUTTON' , handle the actions for the same using the method u2018LIST_ACTIONu2019 which should have the event as u2018ON_FUNCTIONu2019, controller as u2018interface controlleru2019 and component use as the name you have given say u2018ALVu2019.
    In the method u2018LIST_ACTIONu2019, handle the actions as below. This method will have the following importing parameters.
    WDEVENT Importing CL_WD_CUSTOM_EVENT
    R_PARAM Importing IF_SALV_WD_TABLE_FUNCTION
    method list_action .
    case r_param->id .
    when  'NEW__BUTTON'.
    "Do the validation here-"
    endcase.
    endmethod.
    Thanks,
    Rajkumar.S

  • How to add a button to the toolbar in transaction MIRO

    Hi, I wanna know if some1 could tell me how can I add a custom button in the standard toolbar of transaction MIRO.
    The client have the lastest version of SAP so I have enhancement point to add the functionality of the button, but how can I add the button without registering the object in the OSS.
    Thx.

    Hi Siva,
    Create one custom program Eg:zxyz activate it. Now open se80 give program name:SAPMV50A and open gui status.
    In GUI Status right click on 'W0' copy it to custom 'ZW0' and the custom program name which created first.
    Now goto your custom program and write
    double click on 'ZW0' and create your custom button in application toolbar.
    activate it and activate your program.
    Now come to stander program SAPMV50A open screen 1000.
    in moduel  'initialisieren' double click on perform cua_setzen.
    again double click on module initialisieren and by using enhancement framwork functionality implement the below logic.
    Finally you will get the button in application toolbar.
    Reward if it is help full.
    Regards,
    Quddus.

  • How to add a button in the view at a specific position

    Hi Gurus,
    We have a requirement :
    To add a button or image at a specific position in the view which is like an indicator showing different color
    based on another field .
    Example :
    Adding a button next to a drop down flield and changing the color of the button based on the name of the color choosen in the drop down .
    or Adding an image which can be changed based on the dropdown value or the value entered in the input field .
    Thanks ,
    Naval Bhatt.

    Hi,
    Create an Attribute ZINDICATOR , in the same context node in which the dropdown(picklist) attribute,exists.
    Let it be a CHAR 1 field.
    Implement GET_P and GET_ method.
    Pull this field beside the dropdown fields in view configuration.
    Now the code =>
    Implement the Get_P_ZINDICATOR for this attribute as explained by Robert
    Implement  Get_ZINDICATOR method as follows
      DATA:
         lr_current   TYPE REF TO if_bol_bo_property_access,
         lr_entity TYPE REF TO cl_crm_bol_entity,
         coll      TYPE REF TO if_bol_entity_col.
      lr_current ?= collection_wrapper->get_current( ).
    IF lr_current IS NOT BOUND.
       value = cl_thtmlb_util=>get_icon_url( 'check_empty.gif' ).
       RETURN.
    ELSE.
       dref = lr_current->get_property( 'ZINDICATOR' ) .
    ENDIF.
    IF dref IS NOT BOUND.
        value = cl_thtmlb_util=>get_icon_url( 'check_empty.gif' ).
        RETURN.
    ENDIF.
    TRY.
        value = if_bsp_model_util~convert_to_string( data_ref       = dref
                                                                                attribute_path = attribute_path
          IF value IS INITIAL.
            value = cl_thtmlb_util=>get_icon_url( 'check_empty.gif' ).
    *      ELSEIF  value EQ 'R'
    *        value = cl_thtmlb_util=>get_icon_url( 'check_overdue_status.gif' ). " gives RED LIGHT
          ELSEIF  value EQ 'Y' .
            value = cl_thtmlb_util=>get_icon_url( 'check_due_status.gif' ). " gives YELLOW light
          ELSEIF  value EQ 'G'.
            value = cl_thtmlb_util=>get_icon_url( 'check_nodue_status.gif' ). " gives GREEN light
          ENDIF.
    CATCH cx_bsp_conv_illegal_ref.
          CLEAR value.
          RETURN.
    CATCH cx_root.
          CLEAR value.
          RETURN.
    ENDTRY.
    Generally check_overdue_status.gif and other images are std. and are present in all skins.
    You need more colors then you have to add those images in the MIME repository in the images folder of the SAP SKIN folder.
    You must implement the eventhandler for Dropdown field. For this in the GET_P method of dropdown, use
    CASE iv_property
      WHEN  if_bsp_wd_model_setter_getter=>fp_server_event.
          rv_value = 'COLOUR_SELECTED'.
    ENDCASE.
    and then implement the event handler EH_ONCOLOUR_SELECTED.
    In this event handler, you must set the ZINDICATOR value as ' ' , 'R','G','Y' etc depending upon what is selected in dropdown.
    This ensures that a server roundtrip is triggered and so the GET method of indicator field is called as soon as dropdown value
    is selected.
    Hope this helps.
    Thanks & Regards
    Suchita

  • How to add a button to the home pages of the group wiki and user blog

    On the top of the home page of the group wiki page, there are several buttons/links like "wiki", "blog", "calendar" and "mail". I would like to add a button "svn" linked to "/svn/". Any one can help me? Thanks very much

    Hi Aravindhan,
    Try something like this:
    var ttDesvios = new sap.ui.table.TreeTable();
      var cbDesviacion = new sap.ui.commons.CheckBox();
      ttDesvios.addColumn(new sap.ui.table.Column({
      label: new sap.ui.commons.Label({text: "Col1"}),
      template: new sap.ui.commons.Label({text: "Info"}),
      width: "50px",
      ttDesvios.addColumn(new sap.ui.table.Column({
      label: new sap.ui.commons.Label({text: "Action"}),
      template: new sap.ui.commons.Button({text: "Delete"}).bindProperty("visible", "pathPropertyChild", function(value){
              if(value .............){ return true;} //For child
              else{ return false;} //For parent
      width: "160px",
    Regards
    EDIT: Wrong paste code, that's better!

  • How to add custom buttons in the tool bar of the crystal reports viewer

    Hi,
    I'm using Crystal report viewer (Crystal 2008) in my report and I want to add custom buttons and handle them in the tool bar of the viewer. Is there anyway to achieve this?
    Please help me in this regard.
    Thanks in advance.
    Siva.

    I did this by adding a picturebox to the toolbar, the same size as the buttons, and loading in an image, and putting code into the Click event of the picturebox.
    I also put code into the MouseHover event to change the picture's background color and into the MouseLeave event to change it back.
    I have a couple of these buttons. They work very nicely and really look like part of the toolbar.

  • How to add an item  in the combobox list at runtime

    i want to add an item to the list of items in the combobox. How can I do this? I tried to use the methods getselecteditem() and getitem() from the actionlistener but no success.
    so after i add an item, the next time when i run that frame, that item should be displayed in the list of items in the combobox. Can anybody help me with this?

    Thanks Encephalophathic.
    Let me explain you the whole design -
    I have a frame having textfields and comboboxes. Now in the combobox, i have added some fields during design time and some i want the user to add at runtime. After the user clicks the Save button, i want the new string if entered in the combobox by the user at runtime to be added in the list of items of the combobox. So the next time when that frame is run, the item added by the user at runtime previously should be there in the list of items displayed in the combobox.
    What I am trying to do in this code at the combobox is if the user enters a new string in the combobox, then if he presses enter key, the value entered in the list of the combobox should be entered in the list of items of the combobox. Actually i m just trying to get the item typed in by the user, so just testing with enter key, but really i want it on the button click. I tried to add the code for adding an item to the combobox in the actionperformed, but i m not able to add it so confused what to do. Please help me with this.
    Here's the whole code for that -
    import java.awt.BorderLayout;
    import java.awt.FlowLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    import javax.swing.JCheckBoxMenuItem;
    import javax.swing.JComboBox;
    import java.awt.event.ActionListener;
    import javax.swing.JOptionPane;
    import javax.swing.JDialog.*;
    import javax.swing.JComboBox;
    public  class EnterFD implements ActionListener{
      private JFrame frame;
       private JPanel mainpanel,menupanel,userinputpanel,buttonpanel;
       private JMenuBar menubar;
       private JMenu menu,submenu;
       private JMenuItem menuitem;
       private JCheckBoxMenuItem cbmenuitem;
       private JLabel fdnumber;
       private JLabel bankname;
       private JLabel beneficiaryname;
       private JLabel entereddate;
       private JLabel maturitydate;
       private JLabel rateofinterest;
       private JLabel amount;
       private JLabel maturityamount;
       private JTextField fdnumbertxtfield;
       private JComboBox banknamecombobox;
       private JTextField beneficiarynametxtfield;
       private JComboBox entereddatecombobox;
       private JComboBox maturitydatecombobox;
       private JTextField rateofinteresttxtfield;
       private JTextField amounttxtfield;
       private JTextField maturityamounttxtfield;
       private JButton savebutton;
       private JButton clearbutton;
    public EnterFD() {
            initComponents();}
        private final void initComponents(){
            fdnumber = new JLabel("FD Number:");
            bankname = new JLabel("Bank Name:");
            beneficiaryname = new JLabel("Beneficiary Name:");
            entereddate = new JLabel("Entered Date:");
            maturitydate = new JLabel("Maturity Date:");
            rateofinterest = new JLabel("Rate Of Interest:");
            amount = new JLabel("Amount:");
            maturityamount = new JLabel("Maturity Amount:");
            fdnumbertxtfield = new JTextField();
            banknamecombobox = new JComboBox();
            banknamecombobox.addItem("State Bank Of India");
            banknamecombobox.addItem("Bank Of Baroda");
            banknamecombobox.addItem("IDBI Bank");
            banknamecombobox.addItem("ICICI Bank");
            banknamecombobox.addItem("Punjab National Bank");
            banknamecombobox.setEditable(true);
            banknamecombobox.setSelectedIndex(-1);
            banknamecombobox.addKeyListener(new java.awt.event.KeyAdapter() {
                @Override
                public void keyTyped(java.awt.event.KeyEvent evt) {
                    banknamecomboboxKeyTyped(evt);
            banknamecombobox.addKeyListener(new java.awt.event.KeyAdapter() {
                @Override
                public void keyReleased(java.awt.event.KeyEvent evt) {
                    banknamecomboboxKeyReleased(evt);
            beneficiarynametxtfield = new JTextField();
            entereddatecombobox = new JComboBox();
            maturitydatecombobox = new JComboBox();
            rateofinteresttxtfield = new JTextField();
            amounttxtfield = new JTextField();
            maturityamounttxtfield = new JTextField();
            menubar = new JMenuBar();
             menu = new JMenu("File");
             menubar.add(menu);
             menuitem = new JMenuItem("New");
             menu.add(menuitem);
             menuitem.addActionListener(this);
             menuitem = new JMenuItem("Save");
             menu.add(menuitem);
             menuitem.addActionListener(this);
             menuitem = new JMenuItem("Close");
             menu.add(menuitem);
             menuitem.addActionListener(this);
             menuitem = new JMenuItem("Exit");
             menu.add(menuitem);
             menuitem.addActionListener(this);
             menu = new JMenu("Edit");
             menubar.add(menu);
             menuitem = new JMenuItem("View FD");
             menu.add(menuitem);
             menuitem.addActionListener(this);
            mainpanel = new JPanel(new BorderLayout());
            menupanel = new JPanel(new BorderLayout());
            menupanel.add(menubar);
             userinputpanel = new JPanel(new GridLayout(8,2,5,20));
            userinputpanel.setBorder(BorderFactory.createEmptyBorder(50,50,80,80));
            userinputpanel.add(fdnumber);
            userinputpanel.add(fdnumbertxtfield);
            fdnumbertxtfield.setColumns(50);
            userinputpanel.add(bankname);
            userinputpanel.add(banknamecombobox);
            userinputpanel.add(beneficiaryname);
            userinputpanel.add(beneficiarynametxtfield);
            beneficiarynametxtfield.setColumns(50);
            userinputpanel.add(rateofinterest);
            userinputpanel.add(rateofinteresttxtfield);
            rateofinteresttxtfield.setColumns(50);
            userinputpanel.add(amount);
            userinputpanel.add(amounttxtfield);
            amounttxtfield.setColumns(50);
            userinputpanel.add(maturityamount);
            userinputpanel.add(maturityamounttxtfield);
            maturityamounttxtfield.setColumns(50);
            savebutton = new JButton("Save");
            clearbutton = new JButton("Clear");
            JPanel buttonpanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
            buttonpanel.add(savebutton);
            buttonpanel.add(clearbutton);
            savebutton.addActionListener(this);
            clearbutton.addActionListener(this);
            mainpanel.add(menupanel,BorderLayout.NORTH);
            mainpanel.add(userinputpanel,BorderLayout.CENTER);
            mainpanel.add(buttonpanel,BorderLayout.SOUTH);
            frame = new JFrame("Enter FD");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setSize(3000,3000);
            frame.setContentPane(mainpanel);
            frame.pack();
            frame.setVisible(true); }

  • Disabling sort button on the alv list display

    Hi,
       how to disable sort button on alv list display
    thanks

    Fill an itab
    1- Create an itab type SLIS_T_EXTAB.
    2- Populate it with the Function codes you want to exclude ('&OUP', '&ODN').
    3- Pass it as parameter to IT_EXCLUDING
    Regards
    Edited by: Jordi Escoda Ruiz on Apr 24, 2008 10:39 AM

Maybe you are looking for

  • Multiple apps using same files, how to lock them?

    Hi all, I have a unique situation (or so I think). We are running our apps in Citrix servers, such that many users log in to a single citrix server and run our java apps. The problem is, it will be possible that more than one user might use the same

  • I downloaded a audiobook on one computer how do i get it on my other computer with the same itunes account

    I downloaded an audiobook on my new computer but everything else is on my other computer how do I get it to the other computer?

  • Javaload and grant_permission problems

    c:\Java>loadjava -thin -resolve -verbose -user user/test@test1:1521:orcl EmpInsert.jar error as following: initialization complete loading : EmpInsert_SJProfile0 creating : EmpInsert_SJProfile0 Error while creating class EmpInsert_SJProfile0 ORA-2954

  • Inspection Lot Creation after GR

    Dear PP/QM Masters, I have question regarding inspection lot creation after goods receipt. There will be GR once at the end of the shift with batch number. As batch generated during shift will be different, there will be multiple GR entry. But for ev

  • The bottom half of iphone..

    ok heres my problem.. i accidently dropped my iphone on the ground right? well.. i turned it on and the bottom half of the screenrefuses to work.. i double clicked the button and slid the volume for the music and that works.. but the slide button to