Drop Down in ALV Flashes and Disappears.

Hi All,
I have a strange issue going on. In an ALV (built on CL_GUI_ALV_GRID) I have got an editable field with a drop down option.Now lets say I have 10 rows in an ALV. I chose an entry from the drop down in one of the rows (this happens OK) and immediately after that I go on a click on drop down for any other row. What happens is that the drop down for the new row that I am in flashes and disappears. Now if I click for the drop down again the drop down appears. Basically whenever an entry is selected in one of the rows, drop down function immediately after that does not work. I have a feeling that it has something to do with the data _changed event but I am not sure how to handle that event.
I saw a similar thread  [ALV Menu Flash|ALV HANDLE_DATA_CHANGED_FINISHED; but could not figure it out.
Any suggestions ?
Thanks
Anuj

Hi,
Let us see the code and check it
Make the necessary changes at the fieldcatalog
clear ls_fcat.
ls_fcat-fieldname = 'COURSE'.
ls_fcat-col_pos = 5.
ls_fcat-coltext = 'Course'.
ls_fcat-outputlen = 10.
ls_fcat-DRDN_HNDL = 25.
ls_fcat-edit = 'X'.
APPEND ls_fcat to lt_fcat.
and in the class cl_gui_alv_grid we have one method  SET_DROP_DOWN_TABLE
and it is having one parameter called  iT_DROPDOWN of type  LVC_T_DROP
generate the internal table and call the method set_drop_down_table
clear ls_drop.
ls_drop-handle = '25'.
ls_drop-value = 'ABAP'.
append ls_drop to lt_drop.
clear ls_drop.
ls_drop-handle = '25'.
ls_drop-value = 'CRM'.
append ls_drop to lt_drop.
clear ls_drop.
ls_drop-handle = '25'.
ls_drop-value = 'WEBDYNPRO'.
append ls_drop to lt_drop.
  CALL METHOD o_grid->set_drop_down_table
    EXPORTING
      it_drop_down       = lt_drop.
Thanks & Regards.
Raghunadh.K

Similar Messages

  • Drop Down in ALV  ABAP and NOT in OO - ABAP

    Hello Everyone....
    I m workin on an ALV which is in simple ABAP and not in OO-ABAP. There is some selection criteria on the first screen , as soon as the user fulfills the requirement an ALV GRID is displayed in which the last column is editable.
      But the Problem is that i wanna make that editable field in ALV as drop down which would contain values from the database table.
      Suggest me some method , so that i dont have to do much changes in my code .
      A Sample code will be very benificial .
    Thanx n Regards,
    Harpreet.

    Hi Harpreet,
    [compiled from sap online help - always a good chice]
    To make an input/output field into a list box, you must set the value L or LISTBOX in the Dropdown attribute in the Screen Painter. The visLg attribute determines the output width of the list box and the field. You can assign a function code to a list box field. In this case, the PAI event is triggered as soon as the user chooses a value from the list, and the function code is placed in the SY-UCOMM and OK_CODE fields. If you do not assign a function code, the PAI event must be triggered in the usual way – that is, when the user chooses a pushbutton or an element from the GUI status.
    If you have assigned a list box to an input/output field, you can use the Value list attribute of the screen element to determine how the value list should be compiled. There are two options:
    Value list from input help (recommended)
    If you do not enter anything in the value list attribute, the text field uses the first column displayed in the input help assigned to the screen field. The input help can be defined in the ABAP Dictionary, the screen, or a POV dialog module. It should be laid out in two columns. The key is automatically filled.
    Value list from PBO modules (not recommended).
    If you enter A in the value list attribute, you must fill the value list yourself before the screen is sent (for example, in the PBO event) using the function module VRM_SET_VALUES. When you do this, you must pass an internal table with the type VRM_VALUES to the import parameter VALUES of the function module. VRM_VALUES belongs to the type group VRM. The line type is a structure consisting of the two text fields KEY (length 40) and TEXT (length 80). In the table, you can combine possible user entries from the KEY field with any texts from the TEXT component. You specify the corresponding input/output field in the import parameter ID.
    Examples
    Example
    Dropdown box with a value list from input help (recommended)
    *& Report DEMO_DROPDOWN_LIST_BOX                                 *
    REPORT demo_dropdown_list_box.
    *& Global Declarations                                           *
    * Screen Interfaces
    TABLES sdyn_conn.
    DATA   ok_code TYPE sy-ucomm.
    * Global data
    TYPES: BEGIN OF type_carrid,
             carrid type spfli-carrid,
             carrname type scarr-carrname,
           END OF type_carrid.
    DATA itab_carrid TYPE STANDARD TABLE
         OF type_carrid WITH HEADER LINE.
    *& Processing Blocks called by the Runtime Environment           *
    * Event Block START-OF-SELECTION
    START-OF-SELECTION.
    CALL SCREEN 100.
    * Dialog Module PBO
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    ENDMODULE.
    * Dialog Modules PAI
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'SELECTED'.
          MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
    ENDCASE.
    ENDMODULE.
    * Dialog Module POV
    MODULE create_dropdown_box INPUT.
      SELECT carrid carrname
                    FROM scarr
                    INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'CARRID'
                value_org       = 'S'
           TABLES
                value_tab       = itab_carrid
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
    ENDIF.
    ENDMODULE.
    The next screen (statically defined) for screen 100 is 100. The only input field on the screen is the component SDYN_CONN-CARRID. Its Dropdown attribute is set to L, and it has the output length 20. The Value list attribute is empty, and it has the function code SELECTED. The function codes of the buttons EXECUTE and CANCEL. CANCEL are defined in the GUI status as having the function type E.
    The screen flow logic is as follows:
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
    PROCESS AFTER INPUT.
      MODULE cancel AT EXIT-COMMAND.
      MODULE user_command_0100.
    PROCESS ON VALUE-REQUEST.
      FIELD sdyn_conn-carrid MODULE create_dropdown_box.
    Users cannot enter any values into the screen fields. When they choose the input field on screen 100, the system displays a list box. The Value list attribute is empty, so the system launches the input mechanism. In this case, the event block PROCESS ON VALUE-REQUEST is created in the screen flow logic. This event block controls all other mechanisms. A two-column internal table is filled in the appropriate dialog module and passed to the input help using the F4IF_INT_TABLE_VALUE_REQUEST function module. The system inserts the two columns of the table into the list box.
    When the user chooses a line in the list box, the PAI event is triggered using the function code SELECTED and the value in the first column of the internal table is copied to the input field.
    Regards,
    Clemens

  • How does one come to know this..drop down in ALV in WD

    Hello Friends,
                          I had a requirement of adding a drop down in ALV, i eventually got it but I have some questions about it
    I used the following code and got the drop down
    lr_column = lr_column_settings->get_column( 'BWART' ).
      CREATE OBJECT lr_input_field
        EXPORTING
          value_fieldname = 'BWART'.
      lr_column->set_cell_editor( lr_input_field ).
    DATA : LR_DROPDOWN TYPE REF TO CL_SALV_WD_UIE_DROPDOWN_BY_KEY.
    CREATE OBJECT LR_DROPDOWN EXPORTING SELECTED_KEY_FIELDNAME = 'BWART'.
    LR_COLUMN->SET_CELL_EDITOR( LR_DROPDOWN ).
    DATA: LT_VALUESET TYPE TABLE OF WDR_CONTEXT_ATTR_VALUE,
    LS_VALUESET TYPE WDR_CONTEXT_ATTR_VALUE,
    LR_NODE TYPE REF TO IF_WD_CONTEXT_NODE,
    LR_NODEINFO TYPE REF TO IF_WD_CONTEXT_NODE_INFO.
    LR_NODE = WD_CONTEXT->GET_CHILD_NODE( 'RETURN_NODE' ).
    LR_NODEINFO = LR_NODE->GET_NODE_INFO( ).
    LS_VALUESET-VALUE = '973'.
    LS_VALUESET-TEXT = '973'.
    APPEND LS_VALUESET TO LT_VALUESET.
    LS_VALUESET-VALUE = '222'.
    LS_VALUESET-TEXT = '222'.
    APPEND LS_VALUESET TO LT_VALUESET.
    LR_NODEINFO->SET_ATTRIBUTE_VALUE_SET( EXPORTING NAME = 'BWART' VALUE_SET = LT_VALUESET ).
    My question is ... how does 1 know which class to use? how to use that class... most of concepts about OOPS are clear.. but i still cant figure out how does 1 find out which class to use.. is it all by expericence..

    In short: Yes, by experience. Then again, for WD4A there is a class for each UI-Element available. Once you know this, you can easily search se24 for CLWD<UI-NAME>* or the like.

  • Made a drop down menu. How can I get the drop down to fade in and out? !

    Hi guys!
    I've created a drop down menu (with the help of you legends on here! )...Now I just need it to animate so when the user hovers over the main menu item, the drop down fades in.
    Here's the HTML I have...
        <ul id="nav">
            <li><a href="#">Nav 1</a></li>
            <li><a href="#">Nav 2</a></li>
            <li><a href="#">Nav 3</a>
                <ul>
                    <li><a href="#">&raquo; Sub Menu 1</a></li>
                    <li><a href="#">&raquo; Sub Menu 2</a></li>
                    <li><a href="#">&raquo; Sub Menu 3</a></li>
                    <li><a href="#">&raquo; Sub Menu 4</a></li>
                </ul>
            </li>
            <li><a href="#">Nav 5</a></li>
            <li><a href="#">Nav 6</a></li>
        </ul>
    ...and here's my CSS...
    ul#nav {width:920px; height:35px; list-style:none; padding:0; margin:0; background:url(navBg.jpg) repeat-x; z-index:999;}
    ul#nav li a:hover, #nav li a:active {background:url(navOn.jpg) repeat-x; text-decoration:none;}
    ul#nav li a {color:#E0E2E7; display:inline-block; float:left; margin:0; padding:10px 19px; width:auto; text-decoration:none;}
    * html #nav li {display:inline; float:left; }  /* for IE 6 */
    * + html #nav li {display:inline; float:left; }  /* for IE 7 */
    #nav ul {width:208px; left:-9999em; list-style:none; margin:35px 0; padding:0; position:absolute; z-index:999;}
    #nav li:hover ul {left:auto;}
    #nav li {float:left;}
    #nav li li a {width:190px; background-color:#efefef; color:#2e2e2e; padding:8px; margin:0; }
    #nav li li a:hover {background-color:#000; background-image:none; color:#FFF;}
    #nav li:hover {background:url(assets/images/frame/navOn.jpg);}
    From what I can make out, I assume I need either Javascript or JQuery...
    Does anyone know how I can get the drop down to fade in and out?
    Thank you very much and I hope to hear from you.
    SM

    Yes, you'll need a client-side script to do fade-in/fade-out fx.  Look at jQuery Superfish.
    http://users.tpg.com.au/j_birch/plugins/superfish/#examples
    Nancy O.

  • In develop "mode" and I can't locate my "Basic" slider that opens up my "Treatment" sliders. There's not even a drop down arrow to Minimize and open. I was working in it and the next moment it was gone. I'm in Lr 5 using a trackpad. Seems like the issue c

    In develop "mode" and I can't locate my "Basic" slider that opens up my "Treatment" sliders. There's not even a drop down arrow to Minimize and open. I was working in it and the next moment it was gone. I'm in Lr 5 using a trackpad. Seems like the issue came up while using my trackpad. Any thoughts?

    In the Develop Module, you right-click on one of the other Panel Headers (for example, Tone Curve) and then place a check next to Basic

  • Why the painted content flash and disappear?

    I try to run a simple code example from java almanac site but the painted content just flash and disappear. Can any people help to find the reason? Thanks in advance.
    Below are the code:
    package font;
    import java.text.AttributedString;
    import java.awt.*;
    import java.awt.font.LineBreakMeasurer;
    import java.awt.font.TextLayout;
    import javax.swing.*;
    public class DrawParagraphDemo extends JPanel {
        public DrawParagraphDemo() {
            this.setPreferredSize(new Dimension(500,500));
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Make sure we have nice window decorations.
            JFrame.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
            JFrame frame = new JFrame("Demo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            DrawParagraphDemo demo = new DrawParagraphDemo();
            frame.setContentPane(demo);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
            demo.drawParagraph((Graphics2D) demo.getGraphics(), "One line of test string", 400);
        public void drawParagraph(Graphics2D g, String paragraph, float width) {
            LineBreakMeasurer linebreaker = new LineBreakMeasurer(
                new AttributedString(paragraph).getIterator(), g.getFontRenderContext());
            float y = 0.0f;
            while (linebreaker.getPosition() < paragraph.length()) {
                TextLayout tl = linebreaker.nextLayout(width);
                System.out.println(tl);
                y += tl.getAscent();
                tl.draw(g, 0, y);
                y += tl.getDescent() + tl.getLeading();
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

    Hi i have similar problem and i have followed Camickr's suggestion but it looks like my image was still being painted over here's my code
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    * FileChooserDemo2.java is a 1.4 application that requires these files:
    *   ImageFileView.java
    *   ImageFilter.java
    *   ImagePreview.java
    *   Utils.java
    *   images/jpgIcon.gif (required by ImageFileView.java)
    *   images/gifIcon.gif (required by ImageFileView.java)
    *   images/tiffIcon.gif (required by ImageFileView.java)
    *   images/pngIcon.png (required by ImageFileView.java)
    public class Asst4 extends JPanel
                                  implements ActionListener {
        static private String newline = "\n";
        private JTextArea log;
        private JFileChooser fc;
         private JPanel display,button;
         JButton load,grey,color;
         private Image image;
         static JComponent newContentPane;
        public Asst4() {
            super(new BorderLayout());
            //Create the log first, because the action listener
            //needs to refer to it.
              display=new JPanel();
              display.setOpaque(true);
              button=new JPanel();
              load=new JButton("Load Image");
              grey=new JButton("Greyscale Image");
              color=new JButton("Color Image");
              load.addActionListener(this);
              //display.setBackground(Color.BLACK);
              //System.out.println("displayable: "+isDisplayable()+" visible: "+isVisible()+" valid: "+isValid());
              //System.out.println("displayable: "+display.isDisplayable()+" visible: "+display.isVisible()+" valid: "+display.isValid());
              display.setSize(500,500);
              button.add(load, BorderLayout.WEST);
              button.add(grey, BorderLayout.CENTER);
              button.add(color, BorderLayout.EAST);
              add(button,BorderLayout.NORTH);
              add(display,BorderLayout.CENTER);
              setVisible(true);
        public void actionPerformed(ActionEvent e) {
                   //Set up the file chooser.
                   if (fc == null) {
                        fc = new JFileChooser();
                        //Add a custom file filter and disable the default
                        //(Accept All) file filter.
                        fc.addChoosableFileFilter(new ImageFilter());
                        fc.setAcceptAllFileFilterUsed(false);
                        //Add custom icons for file types.
                        fc.setFileView(new ImageFileView());
                        //Add the preview pane.
                        fc.setAccessory(new ImagePreview(fc));
                        //Show it.
                   int returnVal = fc.showDialog(Asst4.this,"Load Image");
                   //Process the results.
                   if (returnVal == JFileChooser.APPROVE_OPTION) {
                        File file = fc.getSelectedFile();
                        Toolkit toolkit = Toolkit.getDefaultToolkit();
                        image = toolkit.getImage(file.getAbsolutePath());
                        MediaTracker mediaTracker = new MediaTracker(this);
                        mediaTracker.addImage(image,0);
                        try {
                           mediaTracker.waitForID(0);
                        } catch (InterruptedException ie) {
                           System.err.println(ie);
                           System.exit(1);
                   } else {
                        System.out.println("Loading cancelled by user." );
                   fc.setSelectedFile(null);
        protected void paintComponent(Graphics g)
              super.paintComponent(g); // this paints the background
              if(image!=null)
              drawImage(image);
        private void drawImage(Image image){
              Graphics2D g=(Graphics2D)display.getGraphics();
              g.drawImage(image,0,0,null);
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Make sure we have nice window decorations.
            JFrame.setDefaultLookAndFeelDecorated(true);
            JDialog.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
            JFrame frame = new JFrame("Compsci_375_Assignment_4");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            newContentPane = new Asst4();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.setBounds(50,50,500,500);
               //frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }Can anyone tell me what's going on and also why if i pack the frame my display panel is disappear?
    Thanks a lot

  • Itunes not showing elements 11 drop down list of albums and won't sync, says ïtunes cannot sync, required folder cannot be found. ï have tried re installing both but no success. pls help!!!

    Hi, Itunes won't sync my photos to ipad from elements 11. itunes doesn't show drop down list of albums and says Ipad "......cannot be synced, required folder cannot be found" i have tried re installing both programs but no luck. pls help!!!

    I managed to finally fix the problem in a relatively painless way. It turned out that the problem wasn't on my phone, the problem was with iTunes. I completely uninstalled iTunes from my PC and then reinstalled it and everything was fine.
    In order to completely uninstall iTunes, I did two things:
    Used RevoUninstaller to uninstall iTunes. This cleans out a bunch of extra things that the normal iTunes uninstaller misses.
    Searched for any iTunes folders/files on my computer (using the freeware utility called Everything) and deleted them manually.
    I hope that works for you.

  • Creating a drop down menu in Flash

    Dear People
    Pleasee could you advise me on how I can design a drop down
    menu in Flash to then export into Dreamweaver. I would be really
    grateful as I desperately need to do this by tomorrow!
    Look forward to hearing from you with tips, suggestions,
    compnent websites etc.
    Chandni

    Here is a sample tutorial:
    http://www.flashkit.com/movies/Interfaces/Menus/Drop_Men-Digital_-72/index.php
    Good luck

  • Drop Down Menus in flash

    Can someone show  me how to create drop down on Flash cs5

    http://www.google.co.in/#hl=en&biw=1024&bih=625&q=drop+down+tutorial+in+flash&oq=drop+down +tutorial+in+&aq=0j&aqi=g-j1&aql=&gs_sm=e&gs_upl=329502l336435l1l28l21l2l1l2l2l655l5484l3. 5.1.2.3.4&fp=45a9c84331d9a0fc

  • Wanting to make a Drop Down Menu in Flash CS3

    I'd like to build a drop down menu in Flash CS3. The web is awash in terrible tutorials. Would anyone have a decent tutorial they could refer me to?
    Thank you-

    I'd like to build a drop down menu in Flash CS3. The web is awash in terrible tutorials. Would anyone have a decent tutorial they could refer me to?
    Thank you-

  • Audio MIDI Setup - drop-down menu of mfrs. and devices empty?

    As the subject says, I'm trying to set up my small arsenal of MIDI gear, and the drop-down lists of manufacturer and device names in the Audio MIDI Setup->MIDI window are empty (there are supposed to be dozens of items to choose from). I've just recently performed a new installation of Snow Leopard, and everything is up to date. I even installed Garage Band, thinking that its installation might fix the missing MIDI device list, but no luck. Another odd thing is that my MOTU MTP AV is recognized by name within System Profiler (as an attached USB device), but I had to install drivers for it to appear in the MIDI Setup window.
    Anyone experience this and/or have a solution? I own Pacifist, and if someone knows where the missing files are located within the SL installer disc I could try a custom installation. Help...

    same problem here, no more device manufacturers and names, but a bigger problem to me is that I see no way of reorganizing the view in the MIDI window anymore, it puts all my devices next to each other, with 30 devices that makes it totally unusable.

  • Screen starts flashes and disappears

    Hello I need help. I am using dazzle to
    broadcast a Sony camera live. Every time I start adobe media live the screen flashes and disappears. It is not running in the back ground either. If i use my webcam it work fine.can some one please help.

    It seems FMLE and Dazzle card are not that friendly to work with each other.
    can you please give us complete details about the card you are using. we can consider this card for certification if it will become popular among FMLE users.

  • Check box and Drop down in ALV

    Hi all ,
    I am using ALV to display my output . I am narrating my question in a example ,
    For eg :  In my ALV in 1st column i am getting check boxes in all the rows but i want the check boxes oly in specific line no's and in the 3rd column i want to use dropdown list , so user can select some datas from the list , Depend upon the user selection in the drop down list i want to display the values in the 4th column .For every  selection in a drop down list
    4th column should refresh and give the values . So kindly provide some inputs to finish this task .
    Note : I am using set table for 1st display and Function Module  LVC_FIELDCATALOG_MERGE .

    Hi Saravanan.
    FOLLOW THIS .
    data    :   gd_layout    TYPE lvc_s_layo,     "slis_layout_alv,
                 gd_repid     LIKE sy-repid.
    TYPES:  BEGIN OF TY_ITAB,,
                   LINE TYPE CHAR10,
                   CHECK TYPE CHAR1,
                    .....................................END OF TY_ITAB..
    DATA: ITAB TYPE TABLE OF TY_ITAB,
                WA TYPE TY_ITAB.
      wa_fieldcat-fieldname   = 'CHECK'.
      wa_fieldcat-scrtext_m   = 'CHECK BOX'.
      wa_fieldcat-col_pos     = 8.
       wa_fieldcat-edit     = 'X'.
      wa_fieldcat-checkbox = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
    loop at itab into wa.
         if  wa-line <> 3 or  6 or 7.
          ls_stylerow-fieldname = 'CHECK' .
          ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
                                                 "set field to disabled
          APPEND ls_stylerow  TO wa-field_style.
          MODIFY itAB FROM wa.
         ENDIF.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
           EXPORTING
                i_callback_program      = gd_repid
                i_callback_user_command =  USER_COMMAND
                is_layout_lvc               = gd_layout                              " Use this Parameter
                it_fieldcat_lvc             = it_fieldcat
                i_save                  = 'X'
           TABLES
                t_outtab                = ITAB
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
    REGARDS
    MURTHY.

  • Drop down in ALV with key and description

    I want to show drop down in my ALV.
    I am able to show description by setting the handle and value fields.
    But I want to set like VRM_SET_VALUES -> That is user sees description, but internally I get key.
    Is it possible?

    <<Please don't just post links>>
    Hi,
    Refer:
    Re: alv input feild drop down
    alv input feild drop down
    Hope this helps you.
    Regards,
    Tarun
    Edited by: Matt on Mar 20, 2009 10:15 AM

  • Issue in value set Drop down for ALV in Webdynpro with Index

    Hi Experts,
    We are unable to get the Drop down values in the ALV Table as shown below.
    Code:
       DATA lo_nd_table TYPE REF TO if_wd_context_node.
        DATA lt_table TYPE wd_this->elements_table.
       DATA ls_table TYPE wd_this->element_table.
       DATA: lr_input TYPE REF TO cl_salv_wd_uie_input_field,
             lr_column TYPE REF TO cl_salv_wd_column,
             lt_node_info TYPE wdr_context_attr_info_map,
             ls_node_info TYPE wdr_context_attribute_info,
             lr_dropdown TYPE REF TO cl_salv_wd_uie_dropdown_by_idx,
             lr_info TYPE REF TO if_wd_context_node_info.
       DATA:lt_columns TYPE salv_wd_t_column_ref,
             ls_columns TYPE salv_wd_s_column_ref,
             lv_tabix TYPE sy-tabix,
             lv_count TYPE c.
       DATA: ls_valueset TYPE wdr_context_attr_value,
             lt_valueset TYPE wdr_context_attr_value_list.
       TYPES:BEGIN OF ty_name,
       name TYPE string,
       END OF ty_name.
       DATA: lt_name TYPE TABLE OF ty_name,
       ls_name TYPE ty_name.
    *   navigate from <CONTEXT> to <TABLE> via lead selection
       lo_nd_table = wd_context->get_child_node( name = wd_this->wdctx_table ).
       SELECT * FROM zemp_table INTO CORRESPONDING FIELDS OF TABLE lt_table UP TO 10 ROWS.
       LOOP AT lt_table INTO ls_table.
         lv_tabix = sy-tabix.
         CLEAR: ls_table-leave_values.
         DO 1 TIMES.
           lv_count = lv_count + 1.
           CONCATENATE 'Open' lv_count INTO ls_valueset-value.
           CONCATENATE 'Open' lv_count INTO ls_valueset-text.
           APPEND ls_valueset TO ls_table-leave_values.
           CLEAR ls_valueset.
           CONCATENATE 'Approved' lv_count INTO ls_valueset-value.
           CONCATENATE 'Approved' lv_count INTO ls_valueset-text.
           APPEND ls_valueset TO ls_table-leave_values.
           CLEAR ls_valueset.
           CONCATENATE 'Rejected' lv_count INTO ls_valueset-value.
           CONCATENATE 'Rejected' lv_count INTO ls_valueset-text.
           APPEND ls_valueset TO ls_table-leave_values.
           CLEAR ls_valueset.
         ENDDO.
         MODIFY lt_table FROM ls_table INDEX lv_tabix TRANSPORTING leave_status leave_values.
       ENDLOOP.
       DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
       lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
       IF lo_cmp_usage->has_active_component( ) IS INITIAL.
         lo_cmp_usage->create_component( ).
       ENDIF.
       DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
       lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).
       DATA lo_value TYPE REF TO cl_salv_wd_config_table.
       lo_value = lo_interfacecontroller->get_model(
    *  lo_interfacecontroller->set_data( r_node_data = lo_nd_value_set ).
    **Get the context node information
       lr_info = lo_nd_table->get_node_info( ).
       lt_node_info = lr_info->get_attributes( ).
       LOOP AT lt_node_info INTO ls_node_info.
         ls_name-name = ls_node_info-name.
         APPEND ls_name TO lt_name.
       ENDLOOP.
    *Get all the columns to make row editable
       CALL METHOD lo_value->if_salv_wd_column_settings~get_columns
         RECEIVING
           value = lt_columns.
    * Make the field dropdown
       CALL METHOD lo_value->if_salv_wd_column_settings~get_column
         EXPORTING
           id    = 'LEAVE_STATUS'
         RECEIVING
           value = lr_column.
    * Create Object for dropdown
       CREATE OBJECT lr_dropdown
         EXPORTING
           selected_key_fieldname = 'LEAVE_STATUS'.
       CALL METHOD lr_dropdown->set_valueset_fieldname
         EXPORTING
           value = 'LEAVE_VALUES'.
       CALL METHOD lr_dropdown->set_type
         EXPORTING
           value = if_salv_wd_c_uie_drdn_by_index=>type_key_convert_to_value.
       CALL METHOD lr_column->set_cell_editor
         EXPORTING
           value = lr_dropdown.
    *Set the table Editable
       lo_value->if_salv_wd_table_settings~set_read_only( value = abap_false ).
       lo_nd_table->bind_table( new_items = lt_table ).
    Please suggest me where we are going wrong.
    Thanks in advance...!!!
    Best Regard's,
    Shashi Kanth

    Hi Shashi,
    Your code looks okay.  Debug & check if everything goes fine and all the required list of values getting bound to node.
    Is any code after this logic, which sets data to table ? if so, that logic is wiping out the drop down list values from context node.
    Final check point:
    Read the context node 'TABLE' and fetch records into internal table in WDDOMODIFYVIEW( ) method to make sure that, every row of your table contains the drop down list entries in "LEAVE_VALUES" attribute
    Hope this helps you.
    Regards,
    Rama

Maybe you are looking for

  • Can't open songs into iTunes

    Just got a new Dell 13" laptop, transferred all my iTunes songs to HD but iTunes doesn't recognize any of them. I can click on the file and then it plays in iTunes but I have 900 songs which would take me awhile. Is there any simple solution?

  • HT4850 i want to export security settings..how to do that?

    Hi, I am having MAC OS Xlion. I want to export it's security settings. Can anyone help me upon this? upon checking some of the options, somehow i find out export items under shell tab....but now both are not visible? Urgent help required

  • C++ and GTKMM Problem using function set_resizable()

    When I set the function set_resizable to false, the window open too small and only shows the label . What am I making wrong ? The code: #include <gtkmm/window.h> #include <gtkmm/main.h> #include <gtkmm/layout.h> #include <gtkmm/button.h> #include <gt

  • Dynamic JSF Content

    i need to write an html output stream to a JSF page and then include that page in another JSF page which will be the root page. Is this possible, and if so what can I attach links to these pages so that they can be viewed independently from the main/

  • AppletSupport on PC-NT lack ?

    Trying to compile the partition fails as the compielr tries to include '.h' files from $FORTE_ROOT/userapp/appletsu/cl0/inc/apltsupt.h which is not on my nt node. is there a way to fix ? thanks j-p