Drop Down List in ALV with Event handler

Hi All ,
I have created an ALV grid with a dropdown as one of the columns. This all works fine, except that I want to be able to react to a change in the value of each line's dropdown the next column values should change according to the user selection in the 1st column .
Is this possible?
As an example, I have a table of records with one column as a dropdown called " Replace Function Module "   and in 2nd column i have call function of that Replace Function Module , If a  change in " Replace Function Module " should change the call function of in the 2nd column .
I am using these objects lvc_t_drop , lvc_s_drop and  the method  " set_drop_down_table ",
Please Can any 1 tel me how to do this with any event handler ar any other way !

Hi,
You need to use event handler for this. Check if the below link gives some direction.
[http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01]
I guess you should create a method inside which you call the FM using the FM name from the selected cell in ALV.
I have not tried it out, but its worth a try.
Hope this helps!
Regards,
Saumya

Similar Messages

  • Drop down list in ALV grid

    Dear Expert,
    I am new to OOPS ,
    I want to display drop down list for a particular field in my output, so I am using OOPS but in my below code
    I am facing problem in displaying the output as I am getting the error message
    Field catalog not found...
    Also advice me how to display drop down list in a particular field.
    Please advice
    MODULE pbo OUTPUT.
      SET PF-STATUS 'ZTEST'.
      IF g_custom_container IS INITIAL.
        DATA: lt_exclude TYPE ui_functions,
              lt_f4 TYPE lvc_t_f4 WITH HEADER LINE.
        CREATE OBJECT g_custom_container
          EXPORTING
            container_name = g_container.
        CREATE OBJECT g_grid
          EXPORTING
            i_parent = g_custom_container.
        PERFORM field_catalog TABLES it_lvc_t_fcat
           USING: 'S_FINAL' 'MATNR' ' ' 'Part Number' ' ' ' ',
                       'S_FINAL' 'MAKTX' ' ' 'Part Description' ' ' ' ',
                       'S_FINAL' 'MBLNR' ' ' 'Document No' ' ' ' ',
                       'S_FINAL' 'BLDAT' ' ' 'Document date' ' ' ' ',
                       'S_FINAL' 'LIFNR' ' ' 'Vendor Number' ' ' ' ',
                       'S_FINAL' 'STATUS' ' ' 'Acknowledgement' ' ' 'X',
                       'S_FINAL' 'REMARKS' ' ' 'Remarks' ' ' 'X'.
        CALL METHOD g_grid->set_table_for_first_display
           EXPORTING
    *    I_STRUCTURE_NAME              =
         is_layout                                =   it_lvc_s_layo
           CHANGING
             it_outtab                        =   i_final
         it_fieldcatalog                =   it_lvc_t_fcat
      ENDIF.
    ENDMODULE.                 " PBO  OUTPUT
    FORM field_catalog  TABLES t_field_catalog STRUCTURE wt_lvc_s_fcat
    USING fp_tabname TYPE any
    fp_fieldname TYPE any
    fp_key TYPE any
    fp_text TYPE any
    fp_do_sum TYPE any
    fp_edit TYPE any.
      t_field_catalog-tabname = fp_tabname.
      t_field_catalog-fieldname = fp_fieldname.
      t_field_catalog-key = fp_key.
      t_field_catalog-seltext = fp_text.
      t_field_catalog-do_sum = fp_do_sum .
      t_field_catalog-edit = fp_edit .
    ENDFORM.                    "field_catalog
    Edited by: Karthik R on Mar 15, 2010 6:11 PM

    Hi Karthik,
    Below mentioned  is a Simple code for creating dropdown lists for columns in ALV grid output
    REPORT z_alv_dropdown.
    *Type pools declarations for ALV
    TYPE-POOLS : slis.
    *data declarations for ALV container, ALV grid,  Field catalogues & layout
    DATA: g_grid  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container,
          gt_fieldcat TYPE lvc_t_fcat,
          gs_layout TYPE lvc_s_layo.
    *INTERNAL TABLE AND WA DECLARATIONS FOR t517 A table
    DATA: gt_outtab TYPE STANDARD TABLE OF t517a INITIAL SIZE 0,
          wa_outtab TYPE t517a.
    *initialisation event
    INITIALIZATION.
    *Start of selection event
    START-OF-SELECTION.
    *Call to ALV
      CALL SCREEN 600.
    *On this statement double click  it takes you to the screen painter SE51.
    *Create a Custom container and name it CCONT and OK code as OK_CODE.
    *Save check and Activate the screen painter.
    *Now a normal screen with number 600 is created which holds the ALV grid.
    PBO of the actual screen , Here we can give a title and customized menus
    Here we also call the subroutine for ALV output.
          MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
    set pf-status 'xxx'.
    set titlebar 'MAIN100'.
    Subroutine to display the output in alv
      PERFORM alv_output.
    ENDMODULE.                    "pbo OUTPUT
    PAI module of the screen created. In case we use an interactive ALV or
    *for additional functionalities we can create OK codes and
    based on the user command we can do the coding.
          MODULE PAI INPUT                                              *
    MODULE pai INPUT.
    ENDMODULE.                    "pai INPUT
    *&      Form  BUILD_FIELDCAT
    FORM build_fieldcat.
      DATA ls_fcat TYPE lvc_s_fcat.
    *Build the field catalogue
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'T517A'
        CHANGING
          ct_fieldcat      = gt_fieldcat.
    To assign dropdown in the fieldcataogue
      LOOP AT gt_fieldcat INTO ls_fcat.
        CASE ls_fcat-fieldname.
          WHEN 'SLART'.
    *drdn-hndl = '1' is the first list box
            ls_fcat-drdn_hndl = '1'.
            ls_fcat-outputlen = 15.
            MODIFY gt_fieldcat FROM ls_fcat.
    *drdn-hndl = '2' is the second list box
          WHEN 'ABART'.
            ls_fcat-drdn_hndl = '2'.
            ls_fcat-outputlen = 15.
            MODIFY gt_fieldcat FROM ls_fcat.
        ENDCASE.
      ENDLOOP.
    ENDFORM.                    "build_fieldcat
    *&      Form  ALV_OUTPUT
    FORM alv_output .
    *Create object for container
      CREATE OBJECT g_custom_container
             EXPORTING container_name = 'CCONT'.
    *create object for grid
      CREATE OBJECT g_grid
             EXPORTING i_parent = g_custom_container.
    Build fieldcat and set column
    *Assign a handle for the dropdown listbox.
      PERFORM build_fieldcat.
    *Build layout
      PERFORM build_layout.
    Define a drop down table.
      PERFORM dropdown_table.
    *fetch values from the T517A table
      SELECT * FROM t517a INTO TABLE gt_outtab.
    *Display ALV output
      CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          is_layout       = gs_layout
        CHANGING
          it_fieldcatalog = gt_fieldcat
          it_outtab       = gt_outtab.
    ENDFORM.                               "ALV_OUTPUT
    *&      Form  dropdown_table
          text
    -->  p1        text
    <--  p2        text
    FORM dropdown_table.
    *Declarations for drop down lists in ALV.
      DATA: lt_dropdown TYPE lvc_t_drop,
            ls_dropdown TYPE lvc_s_drop.
    First SLART listbox (handle '1').
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '01 Pink'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '02 Yellow'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '03 Green'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '04 Black'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '05 White'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '06 Blue'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '09 Other Colors'.
      APPEND ls_dropdown TO lt_dropdown.
    *method to display the dropdown in ALV
      CALL METHOD g_grid->set_drop_down_table
        EXPORTING
          it_drop_down = lt_dropdown.
    ENDFORM.                               " dropdown_table
    *&      Form  build_layout
          text
    *layout for ALV output
    FORM build_layout .
      gs_layout-cwidth_opt = 'X'.
      gs_layout-grid_title = 'ALV DROPDOWN LISTS'.
      gs_layout-no_toolbar = 'X'.
    ENDFORM.                    " build_layout
    Hope it is helpful,
    Regards,
    Soundarya.

  • Drop down list in alv tree

    Hi,
    I am developing an ALV TREE. I need help Its really urgent. In the output screen there will be 2 level nodes. in the item line 1 field should be input enabled using which the database table is to be modified.when user left clicks on this field a drop down list will appear from which he selects his choice.
    I looked into BCALV_TREE_SIMPLE_DEMO reports available in SAP.
    I would also like to know what is register_events, what is an handler.
    help me.
    Edited by: Sudipa Das on Oct 4, 2008 11:53 AM
    Edited by: Sudipa Das on Oct 4, 2008 11:53 AM
    Edited by: Sudipa Das on Oct 4, 2008 11:54 AM

    Hello Sudipa
    I do not think you can have editable fields other than checkboxes in ALV trees. In sample report ZUS_SDN_ALV_TREE_DEMO_1 I have set the fieldcatalog property LS_FCAT-EDIT = 'X' for all fields yet only LOEVM is editable because it is defined as checkbox, too.
    However, you may use the LINK_CLICK of the ALV tree (set LS_FCAT-HOTSPOT = 'X' in fieldcatalog) to trigger e.g. a seach help for input.
    *& Report  ZUS_SDN_ALV_TREE_DEMO
    *& Thread: drop down list in alv tree
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1074082"></a>
    *& Thread: alv tree checbox problem when attempt to get the selected checjboxes
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1050473"></a>
    *& Thread: alv tree checkbox problem
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1046535"></a>
    *& Thread: double click in ALV tree output????
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="742412"></a>
    *& Flow logic of screen '0100' (contains no screen elements):
    **  PROCESS BEFORE OUTPUT.
    **    MODULE STATUS_0100.
    **  PROCESS AFTER INPUT.
    **    MODULE USER_COMMAND_0100.
    *& user-command (for command window): DISPLAY, SELECTED_NODES
    REPORT  zus_sdn_alv_tree_demo_1.
    CLASS cl_gui_column_tree DEFINITION LOAD.
    CLASS cl_gui_cfw DEFINITION LOAD.
    TYPE-POOLS: abap, shlp.
    TYPES: BEGIN OF ty_s_key.
    TYPES: nkey       TYPE lvc_nkey.
    TYPES: parent_key TYPE lvc_nkey.
    TYPES: END OF ty_s_key.
    TYPES: BEGIN OF ty_s_outtab.
    INCLUDE TYPE knvv AS data.
    INCLUDE TYPE ty_s_key AS key.
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab    TYPE STANDARD TABLE OF ty_s_outtab
                          WITH DEFAULT KEY.
    DATA: gt_outtab    TYPE ty_t_outtab.
    DATA:
      gd_okcode        TYPE ui_func,
      gd_repid         TYPE syst-repid,
      gt_fcat          TYPE lvc_t_fcat,
      gs_layout        TYPE lvc_s_layo,
      gs_variant       TYPE disvariant,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_tree          TYPE REF TO cl_gui_alv_tree.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
        handle_node_double_click
          FOR EVENT node_double_click OF cl_gui_alv_tree
          IMPORTING node_key,
        handle_item_double_click
          FOR EVENT item_double_click OF cl_gui_alv_tree
          IMPORTING node_key
                    fieldname,
        handle_checkbox_change
          FOR EVENT checkbox_change OF cl_gui_alv_tree
          IMPORTING checked
                    fieldname
                    node_key,
        handle_link_click
          FOR EVENT link_click OF cl_gui_alv_tree
          IMPORTING fieldname
                    node_key.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_node_double_click.
        MESSAGE 'Event=Double-Click on Node' TYPE 'I'.
        CALL TRANSACTION 'XD03'.
      ENDMETHOD.                    "handle_node_double_click
      METHOD handle_item_double_click.
        MESSAGE 'Event=Double-Click on Item' TYPE 'I'.
        CALL TRANSACTION 'VA03'.
      ENDMETHOD.                    "handle_item_double_click
      METHOD handle_checkbox_change.
        DATA: ls_outtab     TYPE ty_s_outtab.
        BREAK-POINT.
        IF ( fieldname = 'LOEVM' ).
          CALL METHOD go_tree->get_outtab_line
            EXPORTING
              i_node_key     = node_key
            IMPORTING
              e_outtab_line  = ls_outtab
    *          e_node_text    =
    *          et_item_layout =
    *          es_node_layout =
            EXCEPTIONS
              node_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.
          ls_outtab-loevm = checked.
          MODIFY gt_outtab FROM ls_outtab
            TRANSPORTING loevm
            WHERE ( nkey = node_key ).
        ENDIF.
        " Trigger PAI
        CALL METHOD cl_gui_cfw=>set_new_ok_code
          EXPORTING
            new_code = 'REFRESH'
    *        IMPORTING
    *          rc       =
      ENDMETHOD.                    "handle_checkbox_change
      METHOD handle_link_click.
        data: ls_shlp         type SHLP_DESCR,
              lt_retvalues    type STANDARD TABLE OF DDSHRETVAL.
        BREAK-POINT.
        CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
          EXPORTING
            shlpname       = 'USER_COMP'
    *       SHLPTYPE       = 'SH'
          IMPORTING
            SHLP           = ls_shlp.
        CALL FUNCTION 'F4IF_START_VALUE_REQUEST'
          EXPORTING
            shlp                = ls_shlp
    *       DISPONLY            = ' '
    *       MAXRECORDS          = 500
    *       MULTISEL            = ' '
    *       CUCOL               = SY-CUCOL
    *       CUROW               = SY-CUROW
    *     IMPORTING
    *       RC                  =
          tables
            return_values       = lt_retvalues.
      ENDMETHOD.                    "handle_link_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      PERFORM init_controls.
      gd_repid = syst-repid.
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = gd_repid
          dynnr                       = '0100'
    *      container                   =
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          lifetime_dynpro_dynpro_link = 3
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL SCREEN '0100'.
    ** NOTE: no elements on screen
    **  PROCESS BEFORE OUTPUT.
    **    MODULE STATUS_0100.
    **  PROCESS AFTER INPUT.
    **    MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      TRANSLATE gd_okcode TO UPPER CASE.
      CASE gd_okcode.
        WHEN 'BACK'  OR
             'EXIT'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN 'REFRESH'.
          CALL METHOD go_tree->update_calculations
    *        EXPORTING
    *          no_frontend_update =
        WHEN 'SELECTED_NODES'.
          PERFORM get_selected_nodes.
        WHEN 'DISPLAY'.
          PERFORM display.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  init_controls
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM init_controls .
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent = cl_gui_container=>screen0
          ratio  = 90
        EXCEPTIONS
          OTHERS = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * create tree control
      CREATE OBJECT go_tree
        EXPORTING
          parent                      = go_docking
          node_selection_mode         = cl_gui_column_tree=>node_sel_mode_multiple
          item_selection              = 'X'  " required for double-click event on item
          no_html_header              = ''
          no_toolbar                  = ''
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          illegal_node_selection_mode = 5
          failed                      = 6
          illegal_column_name         = 7.
      IF sy-subrc <> 0.
        MESSAGE x208(00) WITH 'ERROR'.                          "#EC NOTEXT
      ENDIF.
    * create Hierarchy-header
      DATA ls_hierarchy_header TYPE treev_hhdr.
      PERFORM build_hierarchy_header CHANGING ls_hierarchy_header.
      PERFORM build_fieldcatalog.
      PERFORM set_layout_and_variant.
    * create emty tree-control
      CALL METHOD go_tree->set_table_for_first_display
        EXPORTING
    **      i_structure_name     = 'KNVV'
          is_variant           = gs_variant
          i_save               = 'A'
    *      i_default            = 'X'
          is_hierarchy_header  = ls_hierarchy_header
    *      is_exception_field   =
    *      it_special_groups    =
    *      it_list_commentary   =
    *      i_logo               =
    *      i_background_id      =
    *      it_toolbar_excluding =
    *      it_except_qinfo      =
        CHANGING
          it_outtab            = gt_outtab
    *      it_filter            =
          it_fieldcatalog      = gt_fcat.
    * create hierarchy
      PERFORM create_hierarchy.
    * register events
      PERFORM register_events.
    * adjust column_width
      CALL METHOD go_tree->column_optimize.
    ENDFORM.                    " init_controls
    *&      Form  build_hierarchy_header
    *       build hierarchy-header-information
    *      -->P_L_HIERARCHY_HEADER  strucxture for hierarchy-header
    FORM build_hierarchy_header CHANGING
                                   p_hierarchy_header TYPE treev_hhdr.
      p_hierarchy_header-heading = 'Hierarchy Header'.          "#EC NOTEXT
      p_hierarchy_header-tooltip =
                             'This is the Hierarchy Header !'.  "#EC NOTEXT
      p_hierarchy_header-width = 30.
      p_hierarchy_header-width_pix = ''.
    ENDFORM.                               " build_hierarchy_header
    *&      Form  BUILD_FIELDCATALOG
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_fieldcatalog .
      DATA: ls_fcat   TYPE lvc_s_fcat.
      REFRESH: gt_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'KNVV'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
          i_bypassing_buffer           = 'X'
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_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 gt_fcat FROM 10.
      ls_fcat-tech = 'X'.
      MODIFY gt_fcat FROM ls_fcat
        TRANSPORTING tech
        WHERE ( key = 'X' ).
      ls_fcat-edit = 'X'.
      MODIFY gt_fcat FROM ls_fcat
        TRANSPORTING edit
        WHERE ( key NE 'X' ).
      READ TABLE gt_fcat INTO ls_fcat
           WITH KEY fieldname = 'LOEVM'.
      IF ( syst-subrc = 0 ).
        ls_fcat-checkbox = 'X'.
        ls_fcat-edit     = 'X'.
    **    ls_fcat-hotspot  = 'X'.
        MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
      ENDIF.
      READ TABLE gt_fcat INTO ls_fcat
           WITH KEY fieldname = 'ERNAM'.
      IF ( syst-subrc = 0 ).
        ls_fcat-hotspot  = 'X'.
        MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
      ENDIF.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  SET_LAYOUT_AND_VARIANT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM set_layout_and_variant .
      CLEAR: gs_layout,
             gs_variant.
      gs_variant-report = syst-repid.
      gs_variant-handle = 'TREE'.
    ENDFORM.                    " SET_LAYOUT_AND_VARIANT
    *&      Form  create_hierarchy
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM create_hierarchy .
      DATA: ls_knvv     TYPE sflight,
            ld_idx      TYPE i,
            ls_outtab   TYPE ty_s_outtab,
            lt_outtab   TYPE ty_t_outtab.
    * get data
      SELECT * FROM knvv INTO CORRESPONDING FIELDS OF TABLE lt_outtab
                            UP TO 20 ROWS .                 "#EC CI_NOWHERE
      SORT lt_outtab BY kunnr vkorg.
    * add data to tree
      DATA: ld_root_key  TYPE lvc_nkey,
            ld_kunnr_key TYPE lvc_nkey,
            ld_vkorg_key TYPE lvc_nkey,
            ld_last_key  TYPE lvc_nkey.
      ld_idx = 0.
      LOOP AT lt_outtab INTO ls_outtab.
        AT FIRST.
          PERFORM add_root_line USING    ls_outtab-data
                                  CHANGING ld_root_key.
          ADD 1 TO ld_idx.
          ls_outtab-nkey       = ld_root_key.
          ls_outtab-parent_key = space.
          MODIFY gt_outtab FROM ls_outtab INDEX ld_idx
            TRANSPORTING key.
        ENDAT.
        ON CHANGE OF ls_outtab-kunnr.
          PERFORM add_customer_line USING    ls_outtab-data
                                             ld_root_key
                                  CHANGING ld_kunnr_key.
          ADD 1 TO ld_idx.
          ls_outtab-nkey       = ld_kunnr_key.
          ls_outtab-parent_key = ld_root_key.
          MODIFY gt_outtab FROM ls_outtab INDEX ld_idx
            TRANSPORTING key.
        ENDON.
        ON CHANGE OF ls_outtab-vkorg.
          PERFORM add_salesorg_line USING    ls_outtab-data
                                             ld_kunnr_key
                                  CHANGING ld_vkorg_key.
          ADD 1 TO ld_idx.
          ls_outtab-nkey       = ld_vkorg_key.
          ls_outtab-parent_key = ld_kunnr_key.
          MODIFY gt_outtab FROM ls_outtab INDEX ld_idx
            TRANSPORTING key.
        ENDON.
        PERFORM add_complete_line USING  ls_outtab-data
                                         ld_vkorg_key
                                CHANGING ld_last_key.
        ADD 1 TO ld_idx.
        ls_outtab-nkey       = ld_last_key.
        ls_outtab-parent_key = ld_vkorg_key.
        MODIFY gt_outtab FROM ls_outtab INDEX ld_idx
          TRANSPORTING key.
      ENDLOOP.
    * calculate totals
      CALL METHOD go_tree->update_calculations.
    * this method must be called to send the data to the frontend
      CALL METHOD go_tree->frontend_update.
    ENDFORM.                    " create_hierarchy
    *&      Form  add_customer_line
    *       add hierarchy-level 1 to tree
    *      -->P_LS_SFLIGHT  sflight
    *      -->P_RELEATKEY   relatkey
    *     <-->p_node_key    new node-key
    FORM add_root_line USING     us_data TYPE ty_s_outtab-data
                                 ud_relat_key TYPE lvc_nkey
                         CHANGING  cd_node_key TYPE lvc_nkey.
      DATA: l_node_text TYPE lvc_value,
            ls_data TYPE ty_s_outtab-data.
    * set item-layout
      DATA: lt_item_layout TYPE lvc_t_layi,
            ls_item_layout TYPE lvc_s_layi.
      ls_item_layout-t_image = '@3Q@'.  " icon_overview
      ls_item_layout-fieldname = go_tree->c_hierarchy_column_name.
      ls_item_layout-style   =
                            cl_gui_column_tree=>style_intensifd_critical.
      APPEND ls_item_layout TO lt_item_layout.
    * add node
      l_node_text =  'Overview: Sales Areas'.
      DATA: ls_node TYPE lvc_s_layn.
      ls_node-n_image   = space.
      ls_node-exp_image = space.
      CALL METHOD go_tree->add_node
        EXPORTING
          i_relat_node_key = ud_relat_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = l_node_text
          is_outtab_line   = ls_data
          is_node_layout   = ls_node
          it_item_layout   = lt_item_layout
        IMPORTING
          e_new_node_key   = cd_node_key.
    ENDFORM.                               " add_root_line
    *&      Form  add_customer_line
    *       add hierarchy-level 1 to tree
    *      -->P_LS_SFLIGHT  sflight
    *      -->P_RELEATKEY   relatkey
    *     <-->p_node_key    new node-key
    FORM add_customer_line USING     us_data TYPE ty_s_outtab-data
                                     ud_relat_key TYPE lvc_nkey
                         CHANGING  cd_node_key TYPE lvc_nkey.
      DATA: l_node_text TYPE lvc_value,
            ls_data TYPE ty_s_outtab-data.
    * set item-layout
      DATA: lt_item_layout TYPE lvc_t_layi,
            ls_item_layout TYPE lvc_s_layi.
      ls_item_layout-t_image = '@A0@'.  " icon_customer.
      ls_item_layout-fieldname = go_tree->c_hierarchy_column_name.
      ls_item_layout-style   =
                            cl_gui_column_tree=>style_intensifd_critical.
      APPEND ls_item_layout TO lt_item_layout.
    * add node
      l_node_text =  us_data-kunnr.
      DATA: ls_node TYPE lvc_s_layn.
      ls_node-n_image   = space.
      ls_node-exp_image = space.
      CALL METHOD go_tree->add_node
        EXPORTING
          i_relat_node_key = ud_relat_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = l_node_text
          is_outtab_line   = ls_data
          is_node_layout   = ls_node
          it_item_layout   = lt_item_layout
        IMPORTING
          e_new_node_key   = cd_node_key.
    ENDFORM.                               " add_customer_line
    *&      Form  add_salesorg_line
    *       add hierarchy-level 1 to tree
    *      -->P_LS_SFLIGHT  sflight
    *      -->P_RELEATKEY   relatkey
    *     <-->p_node_key    new node-key
    FORM add_salesorg_line USING     us_data TYPE ty_s_outtab-data
                                     ud_relat_key TYPE lvc_nkey
                         CHANGING  cd_node_key TYPE lvc_nkey.
      DATA: l_node_text TYPE lvc_value,
            ls_data TYPE ty_s_outtab-data.
    * set item-layout
      DATA: lt_item_layout TYPE lvc_t_layi,
            ls_item_layout TYPE lvc_s_layi.
      ls_item_layout-t_image = '@DS@'.  " ICON_PARTNER_SALES_ACTIVITY
      ls_item_layout-fieldname = go_tree->c_hierarchy_column_name.
      ls_item_layout-style   =
                            cl_gui_column_tree=>style_intensifd_critical.
      APPEND ls_item_layout TO lt_item_layout.
    * add node
      l_node_text =  us_data-vkorg.
      DATA: ls_node TYPE lvc_s_layn.
      ls_node-n_image   = space.
      ls_node-exp_image = space.
      CALL METHOD go_tree->add_node
        EXPORTING
          i_relat_node_key = ud_relat_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = l_node_text
          is_outtab_line   = ls_data
          is_node_layout   = ls_node
          it_item_layout   = lt_item_layout
        IMPORTING
          e_new_node_key   = cd_node_key.
    ENDFORM.                               " add_salesorg_line
    *&      Form  add_cmplete_line
    *       add hierarchy-level 3 to tree
    *      -->P_LS_SFLIGHT  sflight
    *      -->P_RELEATKEY   relatkey
    *     <-->p_node_key    new node-key
    FORM add_complete_line USING     us_data TYPE ty_s_outtab-data
                                     ud_relat_key TYPE lvc_nkey
                         CHANGING  cd_node_key TYPE lvc_nkey.
      DATA: l_node_text TYPE lvc_value.
    * set item-layout
      DATA: lt_item_layout TYPE lvc_t_layi,
            ls_item_layout TYPE lvc_s_layi.
      ls_item_layout-fieldname = go_tree->c_hierarchy_column_name.
      ls_item_layout-class   = cl_gui_column_tree=>item_class_checkbox.
      ls_item_layout-editable = 'X'.
      APPEND ls_item_layout TO lt_item_layout.
    **  clear: ls_item_layout.
    **  ls_item_layout-fieldname = 'BEGRU'.
    **  ls_item_layout-class   = cl_gui_column_tree=>ITEM_CLASS_CHECKBOX.
    **  ls_item_layout-editable = 'X'.
    **  APPEND ls_item_layout TO lt_item_layout.
    **  CLEAR ls_item_layout.
    **  ls_item_layout-fieldname = 'PLANETYPE'.
    **  ls_item_layout-alignment = cl_gui_column_tree=>align_right.
    **  APPEND ls_item_layout TO lt_item_layout.
      l_node_text =  us_data-vtweg.
      DATA: ls_node TYPE lvc_s_layn.
      ls_node-n_image   = space.
      ls_node-exp_image = space.
      CALL METHOD go_tree->add_node
        EXPORTING
          i_relat_node_key = ud_relat_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          is_outtab_line   = us_data
          i_node_text      = l_node_text
          is_node_layout   = ls_node
          it_item_layout   = lt_item_layout
        IMPORTING
          e_new_node_key   = cd_node_key.
    ENDFORM.                               " add_complete_line
    *&      Form  register_events
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM register_events.
    * define the events which will be passed to the backend
      DATA: lt_events TYPE cntl_simple_events,
            l_event TYPE cntl_simple_event.
    * define the events which will be passed to the backend
      l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_checkbox_change.
      APPEND l_event TO lt_events.
    **  l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
    **  APPEND l_event TO lt_events.
    **  l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
    **  APPEND l_event TO lt_events.
    **  l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
    **  APPEND l_event TO lt_events.
    **  l_event-eventid = cl_gui_column_tree=>eventid_header_click.
    **  APPEND l_event TO lt_events.
    **  l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
    **  APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_node_double_click.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_double_click.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_link_click.
      APPEND l_event TO lt_events.
      CALL METHOD go_tree->set_registered_events
        EXPORTING
          events                    = lt_events
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      IF sy-subrc <> 0.
        MESSAGE x208(00) WITH 'ERROR'.                          "#EC NOTEXT
      ENDIF.
    * set Handler
      SET HANDLER:
        lcl_eventhandler=>handle_node_double_click FOR go_tree,
        lcl_eventhandler=>handle_item_double_click FOR go_tree,
        lcl_eventhandler=>handle_checkbox_change   FOR go_tree,
        lcl_eventhandler=>handle_link_click        FOR go_tree.
    **  DATA: l_event_receiver TYPE REF TO lcl_tree_event_receiver.
    **  CREATE OBJECT l_event_receiver.
    **  SET HANDLER l_event_receiver->handle_node_ctmenu_request
    **                                                        FOR tree1.
    **  SET HANDLER l_event_receiver->handle_node_ctmenu_selected
    **                                                        FOR tree1.
    **  SET HANDLER l_event_receiver->handle_item_ctmenu_request
    **                                                        FOR tree1.
    **  SET HANDLER l_event_receiver->handle_item_ctmenu_selected
    **                                                        FOR tree1.
    **  SET HANDLER l_event_receiver->handle_checkbox_change FOR tree1.
    ENDFORM.                               " register_events
    *&      Form  DISPLAY
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM display .
      DATA: ls_outtab   TYPE ty_s_outtab,
            ls_line     TYPE ty_s_outtab,
            ld_msg      TYPE bapi_msg.
      BREAK-POINT.
      LOOP AT gt_outtab INTO ls_outtab
              WHERE ( loevm = 'X' ).
        CONCATENATE 'Checkbox:'
                    ls_outtab-kunnr
                    ls_outtab-vkorg
                    ls_outtab-vtweg
                    ls_outtab-spart
                    ls_outtab-loevm
          INTO ld_msg SEPARATED BY space.
        MESSAGE ld_msg TYPE 'I'.
      ENDLOOP.
      IF ( syst-subrc NE 0 ).
        MESSAGE 'No marked checkboxes found' TYPE 'I'.
      ENDIF.
      PERFORM get_selected_nodes.
    ENDFORM.                    " DISPLAY
    *&      Form  GET_SELECTED_NODES
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM get_selected_nodes.
    * define local data
      DATA: ld_msg        TYPE bapi_msg,
            lt_nodes      TYPE lvc_t_nkey,
            ls_outtab     TYPE ty_s_outtab,
            ld_nkey       TYPE lvc_nkey,
            lt_items      TYPE lvc_t_layi,
            ls_item       TYPE lvc_s_layi.
      CALL METHOD go_tree->get_selected_nodes
        CHANGING
          ct_selected_nodes = lt_nodes
        EXCEPTIONS
          cntl_system_error = 1
          dp_error          = 2
          failed            = 3
          OTHERS            = 4.
      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 ( lt_nodes IS NOT INITIAL ).
      BREAK-POINT.
      LOOP AT lt_nodes INTO ld_nkey.
        CALL METHOD go_tree->get_outtab_line
          EXPORTING
            i_node_key     = ld_nkey
          IMPORTING
            e_outtab_line  = ls_outtab-data
    *        e_node_text    =
            et_item_layout = lt_items
    *        es_node_layout =
          EXCEPTIONS
            node_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.
        LOOP AT lt_items INTO ls_item
                         WHERE ( chosen = 'X' ).
          CONCATENATE 'Item:'
                      ls_outtab-kunnr
                      ls_outtab-vkorg
                      ls_outtab-vtweg
                      ls_outtab-spart
                      ls_outtab-loevm
            INTO ld_msg SEPARATED BY space.
          MESSAGE ld_msg TYPE 'I'.
        ENDLOOP.
      ENDLOOP.
    ENDFORM.                    " GET_SELECTED_NODES
    Regards
      Uwe

  • Getting the rawValue of a Drop-Down list on the "change" event

    I am having problems getting the rawValue of a Drop-Down list on the "change" event. It seems that you have to select the same item twice in a row to get the rawValue to be the value of the selected item.
    ::dropdownlist onChange event::
    xfa.host.messageBox(this.rawValue);
    On the first time a value is selected you get 'null'. The second time the same value is selected, you get the selected value.
    Does anyone have any thoughts on why this is happening? Also, I CANNOT use xfa.event.newText, I need to use the rawValue of the dropdownlist.
    Thanks

    The change event occurs before the rawValue is changed. If you NEED to use the rawValue you'll need to use a later event. Perhaps you could use exit so that it gets triggered when the field loses focus?
    Chris
    Adobe Enterprise Developer Support

  • How to open the Drop Down List on the "enter" event?

    I am trying to find a way for the users to see the expanded drop down list options without using their mouse to click on the down-arrow.
    I am able to add script to the "enter" event so when user key-broad-tabbed into the drop down field, the first items of the list shows up:
    dropdown1.selectedIndex = 0
    However, it would be nice if at the same time, they can also see the rest of the options within the drop down expanded.
    Any help/hints would be appreciated
    Thanks in advance
    p

    It would even be nice if the PDF could default with the small arrow already displaying instead of having having to click the field, then click the arrow. I'm just hoping adobe would add this in a future version.

  • Drop Down Lists that connect with eachother

    I'm trying to make a form in which I have the following fields:
    To:
    Company:
    Email:
    Fax:
    Now I want to do a drop down list because I have several contacts, but I want it so that when I chose the person in the "To:" field, it will put the company, email and fax for that person in the rest of the fields. I put the details into drop down menus for the rest of the fields but I can't get it to relate joe shmoe to his email [email protected] and so on.
    HELP!

    Launch Designer and open your form. Once it comes up Click on the Windows menu and ensure the Scripting Editor is enabled. Below the toolbars but above the form display is a blank area that is the scripting editor. At the top of that area are dropdowns that allow you to pick events as well as scripting language and location. Click on the dropdown that you want to code. Make sure the language in the script editor is set to Javascript and it is set to run at Client. In the event dropdown, choose Change. In the blank area you can add your code. Note that the script editor will show you the code that is associated with the object that has focus.

  • Drop Down Lists and Value Change Events

    I have 4 drop down lists each with a set of values from the database.
    Based on the value of the first list(ValueChangeEvent only for list1) , I fetch data from the database and set the 'selected value' in the other lists.
    I have a Submit button which takes values from these 4 lists and puts it in the database.
    Problem:
    I change list 2 through list 4 and hit a Submit button which inserts all the values in the database.
    However,on Clicking the Submit button I never get the new selected values, it always refers to the previously fetched values.
    I tried to recreate this case in a Sandbox without a database , Here is the code:
    Page1.jsp
    <h:selectOneMenu id="list1" value="#{SessionBean1.selectedList1}" valueChangeListener="#{SessionBean1.list1ValueChangeListener}"  onchange="this.form.submit();" >
                   <f:selectItems id="dropdown1SelectItems" value="#{SessionBean1.list1}"/>
    </h:selectOneMenu>
      <h:selectOneMenu id="list2" value="#{SessionBean1.selectedList2}" >                           
                  <f:selectItems id="dropdown2SelectItems" value="#{SessionBean1.list2}"/>
       </h:selectOneMenu>
       <h:commandButton id="add" actionListener="#{SessionBean1.addActionListener}" value="Add"/>
        <h:inputText id="result" value="#{SessionBean1.result}" />SessionBean1
       public SessionBean1() {
            list1.add(new SelectItem("0","0"));
            list1.add(new SelectItem("1","1"));
            list1.add(new SelectItem("2","2"));
            list1.add(new SelectItem("3","3"));
            list2.add(new SelectItem("a","a"));
            list2.add(new SelectItem("b","b"));
            list2.add(new SelectItem("c","c"));
            list2.add(new SelectItem("d","d"));
            map.put("0", "a");
            map.put("1", "b");
            map.put("2", "c");
            map.put("3", "d");
        private void fetch_data(String value){
             selectedList2=map.get(value);
        public void list1ValueChangeListener(ValueChangeEvent vce){
                fetch_data(vce.getNewValue().toString());
        public void addActionListener(ActionEvent event){
            result=selectedList2;
        }I tried debugging and found that after the Value Change Event is fired only selectedList1 gets a new value during Update Model Values Phase and selectedList2 still has the old value.
    With this sand box project I cannot even get the second list to show the corresponding value.
    Any insight on this would be helpful

    Thank You Balus C,
    I just realized the reason why this is not working, I found the reason in your article Populating Child Menu's article, I am just
    putting it as a reference here.
    One concern is that the skipping of the UPDATE_MODEL_VALUES will also cause that the new values of the menu's which have immediate="true" set won't be set in the backing bean. This can partly be fixed by getting the new value from the ValueChangeEvent inside the valueChangeListener method and assign it to the appropriate property. But this won't work for other menu's of which the valueChangeListener isn't been invoked. This would cause problems if you select a child menu value and then select the parent menu back to null and then reselect it to same value again, the child menu which will show up again would remain the same selection instead of null while its child will not be rendered! To solve this we need to bind the menu's to the backing bean so that we can use UIInput#setValue() and UIInput#getValue() to set and get the actual values.+ The JSF lifecycle will set and get them in the RESTORE_VIEW and RENDER_RESPONSE phases respectively.+
    I am not sure I understand whether or not it is a limitation but the reason above is valid and I rolled back to binding my menus and getting to work with that.
    Is Binding UI components a wise idea because most of the attributes can be programmed using properties in Backing Beans unless you have to build new components?
    Thanks Again

  • How to use value in a drop-down list box as "With these Values" parameter?

    Hello, new user.
    I have a drop-down list box on Page 1, upon which the user can choose a study number. The List Box is named "P1_STUDY_NBR".
    Then I have a list, one entry of which goes to my master-detail form, which is Page 6. I would like it to go to the study number that the user choose on Page 1.
    In my target on the create/edit list entry, I put in "Page in this Application", "Page 6", then in Set these items, I put in
    P6_STUDY_NBR
    My question is what to use in With these values, where I want the contents of the P1_STUDY_NBR. I tried:
    &P1_STUDY_NBR
    and that does not work. If I put in one of the study numbers, like 336-00, then it does work, but I want it to pass the study number the user chooses in the list box. How do I refer to the contents of P1_STUDY_NBR?
    -Mary

    Yes, that does work, thanks. I'm now getting the default value I was putting in yesterday rather than an error message, so there must be something loading it, but I'll hunt around for what process might be doing that, or try re-creating the master-detail form again.

  • Drop Down list in table with data from database table

    Hi,
    I have created an interactive form in WD ABAP.
    In Context tab I have created the nodes as follows:
    ZSOHEADER node with cardinality 1..1
    |-> MATERIAL node with cardinality 0..n. Under MATERIAL node there are 2 attrib. MAKTX and MATNR.
    I am fetching data from MARA table into an internal table IT_MARA.
    The node MATERIAL is bound to internal table IT_MARA.
    I have created a table with property ' Body rows vary depending on data ' .
    I have only one row in table. The first cell of the row is a drop down field.
    I have bind the field to the node MATERIAL->DATA->MAKTX.
    Now the issue is even though I have created only one row in my table, in preview it is creating as many rows in the table as the no.of records in the internal table.
    I want only one row with the drop down list containing all values of the internal table.
    Kindly suggest what to do.
    Regards,
    Vinod

    Hi,
    In the WebDynpro Context, in the main node create another node like A1 with cardinality 0..n and in this node create attributes TEXT and VALUE.
    Now goto method and in that method using code wizard read the node A1.
    And use the below code snippet sample in your program, i.e. code this under respective method of the webdynpro.
    *Declare the TYPES
    TYPES : BEGIN OF TY_TABLE,
    TEXT TYPE SOMETYPE,
    VALUE TYPE SOMETYPE,
    END OF TY_UOM.
    *Define Internal Table and work area.
    DATA : IT_TABLE TYPE STANDARD TABLE OF TY_TABLE INITIAL SIZE 0,
    WA_TABLE TYPE TY_TABLE.
    SELECT TEXT VALUE FROM TABLENAME INTO TABLE IT_TABLE.
    lr_node_info->bind_table( IT_TABLE ).
    And in the Adobe Form Layout
    Go to Menu of the Adobe LiveCycle Designer:
    Tools>Options..>DataBinding
    In that window you just check the Show Dynamic properties Check Box.
    Now for the Drop Down go the binding tab in object palette and click on the list items and there specify the Internal Table and specify the text as the internal table text field and value as internal table value field.
    OR
    From the WebDynpro Native Library Palette use the Value Help Drop Down and in object pallette goto binding tab and provide the form interface binding. Before this in the WebDynpro goto Context and for the particular field under the properties provide the search help as dictionary search help and specify the name of the dictionary search help.
    OR
    We have another method of setting the Text and Value to the DDL directly in the WebDynpro by coding in the methods, I dont have much knowledge on this.
    Regards
    Pradeep Goli

  • Drop Down List functionailty changes with EHP4 / NW EP1

    Since applying ERP Enhancement Pack 4 and NW EP1 we are having a number of issues with the rendering of our Web Dynpro ABAP Applications. The main problem that users are complaining about is the drop down functionality. Previously users could tab into a drop down list and start typing and the list would display starting at the letter they had first typed in. This no longer happens. You have to have either mouse clicked into the field and then start typing or you can tab and press f4 and then start typing. The users are finding this very annoying. Does anyone know how this can be fixed or do we just have to live with it now??
    Thanks in advance.

    I searched for the note that Thomas suggested and found note 1467003 - Corrections for unified rendering up to SAP_BASIS 701/6 XIII. However, it wasn't realeased for download. So our basis team had to apply each note seperately. Here are the notes they applied:
    0001411235 Unified rendering corrections up to SAP_BASIS 701/06 I       
    0001424635 Corrections for unified rendering up to SAP_BASIS 701/06 II  
    0001428005 Corrections for unified rendering up to SAP_BASIS 701/06 III 
    0001435762 Corrections for unified rendering for SAP_BASIS 701/06 IV    
    0001439402 Corrections for unified rendering up to SAP_BASIS 701/06 V   
    0001446829 Corrections for unified rendering up to SAP_BASIS 701/06 VI  
    0001447383 Corrections for unified rendering up to SAP_BASIS 701/06 VII 
    0001454806 Corrs for unified rendering up to SAP_BASIS 701/06 VIII      
    0001458400 Corrections for unified rendering up to SAP_BASIS 701/06 IX  
    0001460168 Corrections for unified rendering up to SAP_BASIS 701/06 X   
    0001461842 Corrections for unified rendering up to SAP_BASIS 701/6 XI   
    0001464613 Corrections for unified rendering up to SAP_BASIS 701/6 XII  
    0001467003 Corrections for unified rendering up to SAP_BASIS 701/6 XIII 
    Unfortunately these notes did not fix our problem with the drop downs and it still remains. Unless there is another patch, I am probably going to have to raise an OSS note with SAP or wait until Enhancement Pack 2!

  • Drop Down List - Setting the Default Selected Item

    I have a drop down list in my application that gets populated by a remote database.  When you select an item from the list, a screen full of thumbnails is populated based on the selection.  We have decided that when the user gets to this component in our air application, that it looks too empty and barren.  All that displays is a drop down list with an empty screen.  So we would like to set a default setting for the drop down list so that when the user gets to this component, a screen full of thumbnails is awaiting them and they can change it if they want.  My first instinct was just to set the selectedIndex property of the drop down list to the value that we want as the default, and that works, but it only changes the label in the dropdownlist, it doesn't actually populate the screen with the thumbnails.  That is because when an item is selected, it has to be commited to the drop down list by a CLOSE event that then sets off the close handler that populates the screen with thumbnails.  So after looking at the documentation, I found that there is a method called closeDropDown that states the following:
    closeDropDown
    method
    public function closeDropDown(commit:Boolean):void
    Close the drop-down list and dispatch a DropDownEvent.CLOSE event.
    Parameters
    commit:Boolean — If true, commit the selected data item.
    When I use this method, nothing happens.  In fact if I add a listener for the CLOSE event, the close event isn't getting fired.  So I am a little befuddled.  The only thing that I can figure is that I am setting the selectedIndex and not the selectedItem before I call the closeDropDown method, and if you look above, the documentation vaguely states that that "If true, commit the selected data item".  Do I need to set the selectedItem and not the selectedIndex?  If so, I am not exactly sure how to do this since I am using a service to populate my drop down list which kind of makes the dataprovider a little unclear to me in the code because it gets replaced by an AsyncListView.  Here is what I have.
    <fx:Script>
         <![CDATA[
            protected function dropDownList_creationCompleteHandler(event:FlexEvent):void{
              getAllAudio_descriptionsResult.token = audiodescriptionsService.getAllAudio_descriptions();
              getAllAudioResult.token = audioService.getAllAudio();
         private function audioDescriptionsCallResponderHandler(event:ResultEvent):void {
              audioDesc = event.result as ArrayCollection;
         private function audioCallResponderHandler(event:ResultEvent):void {
              audio = event.result as ArrayCollection;
              audioDescDropDown.selectedIndex = 2;
              audioDescDropDown.closeDropDown(true);
         ]]>
    </fx:Script>
    <fx:Declarations>
         <s:CallResponder id="getAllAudio_descriptionsResult" result="audioDescriptionsCallResponderHandler(event)"/>
         <audiodescriptionsservice:AudiodescriptionsService id="audiodescriptionsService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
         <s:CallResponder id="getAllAudioResult" result="audioCallResponderHandler(event)"/>
         <audioservice:AudioService id="audioService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
    </fx:Declarations>
    <s:DropDownList id="audioDescDropDown" x="43" y="65" width="185" height="34" fontFamily="MyriadProSemiBold"
                        fontSize="15" skinClass="skins.VideoSkins.Video.DropDownSkin"
                        color="0xE6E6E6" selectionColor="0x054F7C" rollOverColor="0x007CBA"
                        creationComplete="dropDownList_creationCompleteHandler(event)" labelField="audioCatName"
                        itemRenderer="renderers.DropDownList3" close="DDLAudioCloseHandler(event)">
         <s:AsyncListView list="{getAllAudio_descriptionsResult.lastResult}"/>
    </s:DropDownList>
    I would really appreciated hearing from anyone who has experience or insight into setting a default for a drop down list and actually forcing it to execute that default selection.  Any thoughts at all would be helpful.  Thanks!

    I don't see your close handler in the code you posted, so if you provided it and I missed seeing it, please forgive me.  I'm a bit unclear on why the open and close of your dropdown list is so critical to your functionality.  It seems to me that the page of data would be tied to the item selected in the drop down (which to my mind is the only purpose for the drop down to be there).  So why do you first need to open and close the drop down, rather than just taking the selected value and doing whatever you'd normally do with it to populate that page?
    What I'm getting at is that I'd expect that page to be a separate component that would just have a property for the selected "thing", and that you could populate it either manually, as I suggested, or through the close handler on your drop down--I wouldn't think that there should be a need to go through the close handler every time.  Even if you don't have it implemented the way I'm thinking, you may want to think about whether you need to go through the close handler every time, or whether you could break it out so that the close handler simply determines which item to select, then jumps to another function that actually does something with the selected value.  That way, you don't have to go through the overhead of opening and closing the drop down if you need to change its value programmatically.
    HTH;
    Amy

  • Purchase order sample - drop down list populating another drop down list

    hello, when i use this sample script, it works fine. but when i add additional arrays to it, it doesn't work at all. please let me know what i need to change in this script in order to add additional items into the drop down lists. here is the script that works (displays 3 options in first drop down list (blank, option, another option)):
    // This script object controls the interaction between the carrier and plan Drop-down lists.
    // The array contains the carriers and the corresponding plans.
    var myCarriers = new Array(new Array(2), new Array(14), new Array(17)); // Create a two-dimensional array.
    // For each carrier, add a 'new Array(number of plan +1)'.
    // Define the carrier and the corresponding plans.
    // The array syntax is arrayName[index][index].
    // The first index number represents the carrier,
    // the second index number is the actual data value.
    myCarriers[0][0] = " "; // The first items in the Drop-dowm Lists should be blank.
    myCarriers[0][1] = " ";
    myCarriers[1][0] = "ANERT"; // The first data value is the carrier name,
    myCarriers[1][1] = "MC250"; // the rest are plans.
    myCarriers[1][2] = "MC2501";
    myCarriers[1][3] = "MC5002";
    myCarriers[1][4] = "MC5003";
    myCarriers[1][5] = "MC1000";
    myCarriers[1][6] = "MC2000";
    myCarriers[1][7] = "MCHC2300";
    myCarriers[1][8] = "MCHC3000";
    myCarriers[1][9] = "MC2500";
    myCarriers[1][10] = "MB";
    myCarriers[1][11] = "P500";
    myCarriers[1][12] = "MHH3000";
    myCarriers[1][13] = "MHH5000";
    myCarriers[2][0] = "BCCA"; // This is a new carrier, see how the first number is now [1].
    myCarriers[2][1] = "S Plan";
    myCarriers[2][2] = "BPlan";
    myCarriers[2][3] = "P40";
    myCarriers[2][4] = "P30";
    myCarriers[2][5] = "P35*";
    myCarriers[2][6] = "P45*";
    myCarriers[2][7] = "Ad25*";
    myCarriers[2][8] = "Pr20";
    myCarriers[2][9] = "Pr10";
    myCarriers[2][10] = "PH750*";
    myCarriers[2][11] = "PH500*";
    myCarriers[2][12] = "2400HD";
    myCarriers[2][13] = "3500HD";
    myCarriers[2][14] = "2000HD";
    myCarriers[2][15] = "LH1500";
    myCarriers[2][16] = "LH3000";
    // This function will populate the carrier Drop-down List.
    // This function is called from the initialize event of the carrier Drop-down List.
    function getCarriers(dropdownField)
    dropdownField.clearItems();
    for (var i=0; i < myCarriers.length; i++)
    dropdownField.addItem(myCarriers[i][0]);
    // This function will populate the plans Drop-down List for any event EXCEPT the change event.
    // This function is called by the initialize event of the plan Drop-down List.
    function getPlans(carrierField, dropdownField)
    dropdownField.clearItems(); // Clear the items of the Drop-down List.
    for (var i=0; i < myCarriers.length; i++) // Look through all the carriers until we find the one that matches the carrier selected.
    if(myCarriers[i][0] == carrierField.rawValue) // Check to see if they match.
    for (var j=1; j < myCarriers[i].length; j++) // When they match, add the plans to the Drop-down List.
    dropdownField.addItem(myCarriers[i][j]);
    dropdownField.rawValue = myCarriers[i][1]; // Display the first item in the list.
    // This function will populate the plans Drop-down List for the change event.
    // This function is called by the change event of the carrier Drop-down List.
    // The first parameter is simply a pointer to the xfa object model.
    function getPlansOther(myXfa, dropdownField)
    dropdownField.clearItems(); // Clear the items of the Drop-down list.
    for (var i=0; i < myCarriers.length; i++) // Look through all the carriers until we find the one that matches the carrier selected.
    if(myCarriers[i][0] == myXfa.event.newText) // Check to see if they match. Note: we have to use the event.newText in this case because
    { // the ch

    continued...
    change hasn't been committed yet.
    for (var j=1; j < myCarriers[i].length; j++) // When they match, add the states/provinces to the Drop-down List.
    dropdownField.addItem(myCarriers[i][j]);
    dropdownField.rawValue = myCarriers[i][1]; // Display the first item in the list.
    when i try to add 4 more arrays (add items to first drop down list and second drop down list), nothing displays in either drop down lists. please let me know the items that need to be changed - besides these items (i know i need to add arrays and add myCarriers[1][0],[2][0],[3][0] to [6][0] --- for 4 additional items in the first drop down):
    var myCarriers = new Array(new Array(2), new Array(14), new Array(17)); // Create a two-dimensional array.
    // For each carrier, add a 'new Array(number of plan +1)'.
    // Define the carrier and the corresponding plans.
    // The array syntax is arrayName[index][index].
    // The first index number represents the carrier,
    // the second index number is the actual data value.
    myCarriers[0][0] = " "; // The first items in the Drop-dowm Lists should be blank.
    myCarriers[0][1] = " ";
    myCarriers[1][0] = "ANERT"; // The first data value is the carrier name,
    myCarriers[1][1] = "MC250"; // the rest are plans.
    myCarriers[1][2] = "MC2501";
    myCarriers[1][3] = "MC5002";
    any help would be greatly appreciated. thank you!

  • Event handling to the drop down list in the WEB DYNPRO ALV.

    Hi Experts,
    I posted same thing in the UI programing in the morning
    For better Visiblity(as i didnt get any replies) of my issue i am posting the same thing in the ABAP General as well.
    In my dynpro ALV i have 5 fields. in that 2ed field has the drop down list.
    if i select any of from the list, based on the particular selected value, some value should be reflect in the 3rd field of the ALV.
    Ex:
    dropdown list of  2ed fields inclued like below
    AUXILIARY CONTROLLER
    AXLE ASSEMBLY, NON-OSCILLATING
    ACTUATOR, LINEAR
    AIR CONDITIONER
    BLADE, EARTHMOVING
    if i select ACTUATOR, LINEAR the value ( ACT - first three letters ) should automaticaly reflects in the 3rd field of the ALV like below
    Filed 2                Field 3
    ACTUATOR, LINEAR       ACT
    I thnk we have to do the some Event handling for that dropdown.
    I checkd in the SCN but i didnt find any solution to my issue.
    Any solutions/sample code is appriciated.
    Regards!

    Make sure that the Location Bar is not set to "Nothing": Tools > Options > Privacy > Location Bar: When using the location bar, suggest: History, Bookmarks, History and Bookmarks
    See [[Smart Location Bar]]

  • Event handling to the drop down list in the web dypro ALV.

    Hi Experts,
    In my dynpro ALV i have 5 fields. in that 2ed field has the drop down list.
    if i select any of from the list, based on the particular selected value, some value should be reflect in the 3rd field of the ALV.
    Ex:
    dropdown list of  2ed fields inclued like below
    AUXILIARY CONTROLLER
    AXLE ASSEMBLY, NON-OSCILLATING
    ACTUATOR, LINEAR
    AIR CONDITIONER
    BLADE, EARTHMOVING
    if i select ACTUATOR, LINEAR the value ( ACT - first three letters ) should automaticaly reflects in the 3rd field of the ALV like below
    Filed 2                Field 3
    ACTUATOR, LINEAR       ACT
    I thnk we have to do the some Event handling for that dropdown.
    I checkd in the SCN but i didnt find any solution to my issue.
    Any solutions/sample code is appriciated.
    For better visiblity( as i didn't get any replies ) I posted same thing in the ABAP Programing
    Regards!
    Edited by: Prasanth M on Feb 20, 2009 2:54 PM

    Make sure that the Location Bar is not set to "Nothing": Tools > Options > Privacy > Location Bar: When using the location bar, suggest: History, Bookmarks, History and Bookmarks
    See [[Smart Location Bar]]

  • MVC Drop Down List Event Handler

    Hello,
    I am trying to create a bsp page using MVC design pattern. I have 3 drop down list fields which are dependent on each other. Example: When you select a value in list 1, drop down list 2 becomes enabled for selection with values based on list 1. At this point of time list 3 should be disabled. Once you select value from 2, list 3 becomes enabled with values based on list 2 selection.
    I have seen a webblog on this topic from Raja but it was designed for bsp page flow design. Could you please guide how do I achieve this in MVC?
    Please help.
    This is what I did:
    I have 1 controller and 1 view.
    In my view:
    =========================================================
    <htmlb:gridLayoutCell columnIndex="2" rowIndex="1">
    <htmlb:dropdownListBox id = "DDLB_PLANT"
             tooltip          = "Plant"
             table            = "<%= v_plants %>"
             onSelect         = "DDLB_PLANTEvent"
             selection        = "<%= v_plantsel %>">
             nameOfKeyColumn  = "WERKS"
             nameOfValueColumn= "DESC_TEXT">
    </htmlb:dropdownListBox>
    </htmlb:gridLayoutCell>
    <htmlb:gridLayoutCell columnIndex="2" rowIndex="2">
    <htmlb:dropdownListBox id = "DDLB_SHIFT"
             tooltip          = "Shift"
             table            = "<%= v_shifts %>"
             onSelect         = "DDLB_SHIFTEvent"
             selection        = "<%= v_shiftsel %>">
             nameOfKeyColumn  = "SHIFT"
             nameOfValueColumn= "SDESC">
    </htmlb:dropdownListBox>
    </htmlb:gridLayoutCell>
    where v_plants and v_shifts are page attributes (table) that is being populated in DO_REQUEST method of controller. v_plantsel and v_shiftsel are type string (page attribute).
    In DO_HANDLE_EVENT (controller)
    DATA: event_id   TYPE REF TO if_htmlb_data,
          ddlb_event TYPE REF TO cl_htmlb_event_selection,
          data       TYPE REF TO cl_htmlb_dropdownlistbox.
    event_id = cl_htmlb_manager=>get_event( request ).
    IF event_id IS NOT INITIAL.
       ddlb_event ?= event_id.
       IF ddlb_event->id EQ 'DDLB_PLANTEvent'.
          c_plantsel = ddlb_event->selection.
       ELSEIF ddlb_event->id EQ 'DDLB_SHIFTEvent'.
          c_shiftsel = ddlb_event->selection.
          CLEAR data.
          data ?= cl_htmlb_manager=>get_data( request      = runtime->server->request
    name         = 'dropdownListBox'
    id           = 'DDLB_PLANTEvent'
    IF data IS NOT INITIAL.
      c_plantsel = data->selection.
    ENDIF.
    ENDIF.
    ENDIF.
    =========================================================
    Thanks,
    Partho

    I though I was able to bind my dropdown return value but this is the error I am getting:
    "Field symbol has not yet been assigned"
    Here is what I am doing:
    Model
    =====
    populate plants
      SELECT werks name1
      FROM   T001W
      INTO   TABLE M_PLANTS
      order by name1.
      where m_plants & m_plantcode has been defined as model attributes.
    Controller
    ==========
    DO_INIT
    *create model instance
    cmodelsetup ?= create_model( model_id   = 'm'
                                 class_name = 'ZPES_SETUP_MODEL' ).
    if cmodelsetup is bound.
       cmodelsetup->getplants( ).
    endif.
    DO_REQUEST
    data: v_setupreview type ref to if_bsp_page.
    dispatch_input( ).
    if is_navigation_requested( ) is not initial.
       return.
    endif.
    create view instance
    v_setupreview = create_view( view_name = 'zsetupreview.htm').
    v_setupreview->set_attribute( name = 'vmodelsetup'      value = cmodelsetup ).
    call_view( v_setupreview ).
    View
    ====
                  <htmlb:gridLayoutCell columnIndex="1" rowIndex="1">
                     <htmlb:label for = "plant" text="Plant" />
                  </htmlb:gridLayoutCell>
                  <htmlb:gridLayoutCell columnIndex="2" rowIndex="1">
                      <htmlb:dropdownListBox id        = "DDLB_PLANT"
                                      tooltip          = "Plant"
                                      table            = "//vmodelsetup/m_plants"
                                      onSelect         = "DDLB_PLANT"
                                      selection        = "//vmodelsetup/m_plantcode"
                                      nameOfKeyColumn  = "WERKS"
                                      nameOfValueColumn= "DESC_TEXT">
                      </htmlb:dropdownListBox>
                  </htmlb:gridLayoutCell>
    PLEASE HELP!!!
    Thanks,
    Partho

Maybe you are looking for

  • Missing fonts in Java

    Reformated my XP SP3 computer and loaded Firefox 13.0.1 and Java from Oracle. When I open any pages that have javascripted close X's on them I receive a square box with 27 over 16 in it instead of the X. On one site the code reads: font-family: "Helv

  • MOVE statement

    Hi all,             I added one more extra word to move statement and it is not cming in the final report . when i put it in the second line it is giving error like two lines not permitted. I am using this in a Report where page width is fixed.. Than

  • HACMP Clustering Script for SAP ECC 6.0 (SR1) - Automatic Failover-Oracle10

    Hello, I have installed the SAP ECC 6.0 (SR1) under AIX 5.3 / Oracle 10g with HACMP Clustering environment. Manual Failover is working fine. ASCS and Database instances are loaded in share drive with Virtual IP and Virtual name. Central Instance and

  • Actions and mnemonic keys

    Hi all I have a JToolBar with some Actions (classes that extend AbstractAction) and I would like to associate shortcut keys to those Actions, something like ctrl + n to open a new window. How can I do that? Any pointers or ideas would be welcome.

  • Error to install adobe Photoshop elements 13

    Hi, I am from the UK and have an HP laptop with the intel core i3 processor, I am able to download the package adobe Photoshop elements 13- I get to the 2nd stage of adding the 13 digit registration but once this is accepted and installed it then sho