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

Similar Messages

  • 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

  • Get / Put commands in site drop down menu greyed out and not working

    Re: Dreamweaver CS4
    About a year ago my get and put commands greyed out and stopped working.  I called my webhost and they were no help, they did say that they moved my site to a new (linux) server about the same time.  I have applied all the correct settings on my configure server window and when I hit test it connects successfully.
    I have been posting over the last year using Firefox FTP but am making quite a few changes and it's making me crazy going back and forth.  Anyone have any ideas?

    Closing this question out, the MacBook reverted to normal behavior sometime since I posted the problem and this post. No clue why.

  • 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

  • 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.

  • Adobe Form... Is there a way to use a drop down menu to highlight or note other fields...

    I am working on a simple Adobe form.  I am currently trying to figure out if there is a way to use the answers of a drop down menu to either mark, note or highlight 14 other fields.  There are 9 possibilities in the drop down menu, include a blank and NONE.
    For example if the drop down menu is set to 1, then field 9, 10 and 14 are marked, noted or highlighted. 
    Is this possible with a script?
    Thank you in advance for any help! 

    Have you looked at the properties that are available to form fields. I would look at setting the fill color or border color for a form field. Either of these can be done with Acrobat JavaScript.

  • I am trying to complete a form but can't get to the final drop down question as it is not displayed because it falls below where my screen ends.  i have tried changing the resolution but that doesn't work.  any suggestions?

    i am trying to complete a form but can't get to the final drop down question as it is not displayed because it falls below where my screen ends.  i have tried changing the resolution but that doesn't work.  any suggestions?

    brilliant
    google chrome works where safari doesn't on my macbook air.  many thanks
    i now have an embarrassing qu.  have dowloaded spider solitaire (sad!) and i can't add cards at the bottom of a column for the same reason - the display cuts short.  i have tried to extend it with the arrows in the bottom corners but it makes no difference.  any ideas?

  • 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.

  • ITunes opens but without any text showing.  Drop down menus have text but not the app itself. I have a Mac Powerbook Pro running Windows XP under Boot Camp.

    Running under Windows XP,  a few upgrades ago iTunes started opening without any text showing in the application.  Clicking on PLAY will play music but no text shows to indicate what's playing and no text to show music library. Drop down windows show text but not the app itself.
    Subsequent upgrades and reinstalls have not corrected the problem, When I run under iOS (Snow Leopard), iTunes opens with text and runs correctly.
    Help!

    Because I created FAT32 partition using Boot Camp tool few days ago I installed my custom copy of Windows XP with SP3, IE7 and WMP10 integrated using nLite (for WMP10 integration use RVM Integrator). I did not use Boot Camp tool this time - I just booted CD using Option key. Then I installed Boot Camp 2.0 drivers you can find on Mac Disk 1. After this I installed Boot Camp drivers 2.1 update. In Add or remove Programs I checked drivers - I uninstalled old drivers which call identical, but you can skip this. Everything works fine BTW it is better to format your partition to NTFS - you have much less disk errors, you do not waste time for disk errors scans during Windows startup, your data are much more safe. If you need NTFS write permissions use great tool Paragon NTFS for Mac OSX or open source NTFS driver.
    Message was edited by: limo79

  • Why is "erase junk mail" de-highlighted in the drop down menus.  I'm not able to delete my junk mail box without doing each one individually.  Simple, but please someone help with an answer.  Thanks.

    why is "erase junk mail" de-highlighted in the drop down menus.  I'm not able to delete my junk mail box without doing each one individually.  Simple, but please someone help with an answer.  Thanks.

    My daughter has had her Razr for about 9 months now.  About two weeks ago she picked up her phone in the morning on her way to school when she noticed two cracks, both starting at the camera lens. One goes completely to the bottom and the other goes sharply to the side. She has never dropped it and me and my husband went over it with a fine tooth comb. We looked under a magnifying glass and could no find any reason for the glass to crack. Not one ding, scratch or bang. Our daughter really takes good care of her stuff, but we still wanted to make sure before we sent it in for repairs. Well we did and we got a reply from Motorola with a picture of the cracks saying this was customer abuse and that it is not covered under warranty. Even though they did not find any physical damage to back it up. Well I e-mailed them back and told them I did a little research and found pages of people having the same problems. Well I did not hear from them until I received a notice from Fed Ex that they were sending the phone back. NOT FIXED!!! I went to look up why and guess what there is no case open any more for the phone. It has been wiped clean. I put in the RMA # it comes back not found, I put in the ID #, the SN# and all comes back not found. Yet a day earlier all the info was there. I know there is a lot more people like me and all of you, but they just don't want to be bothered so they pay to have it fix, just to have it do it again. Unless they have found the problem and only fixing it on a customer pay only set up. I am furious and will not be recommending this phone to anyone. And to think I was considering this phone for my next up grade! NOT!!!!

  • 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.

  • My iPhone 4 fell down on my bed and not starting (stopped working)

    My iPhone 4 fell down on my bed and not starting (stopped working)

    Thank you RAZMEE209, i tried in the same way but could not worked out, than i put on Charging. Automatically asekd me to connect to iTunes and than restored all new software. thnx again

  • 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.

  • My 3g is getting shut down on 40 percent and not turning on until plunged in

    my 3g is getting shut down on 40 percent and not turning on until plunged in

    Hi S,
    Did they have you try an SMC Reset: http://support.apple.com/kb/HT3964?

  • Drop down in ALV for Webdynpro ABAP

    Hi Experts,
    I was trying to implement one Web dynpro ABAP application that will show one ALV and ALV will content one dropdown so that user can select data from the drop down. Addtion to that, my dropdown should have data based on another column of ALV.
    I have followed one article which is available in Net.
    At the end of development, ALV is displayed with dropdown. Also dropdown has data binded. However, no data is visible in dropdown.
    I have created one context node having four dictionary element and one elemt for dispplaying the dropdown.
    In the DoInit method of view, i have written below code:
    Data Declaration
      DATA:
            lo_node_cskt  TYPE REF TO if_wd_context_node,
            lo_el_cskt    TYPE REF TO if_wd_context_element,
            ls_cskt       TYPE wd_this->element_cskt,
            lt_cskt       TYPE wd_this->elements_cskt,
            lo_cmp_usage  TYPE REF TO if_wd_component_usage,
            lv_value      TYPE REF TO cl_salv_wd_config_table,
            lr_column     TYPE REF TO cl_salv_wd_column,
            lr_drdn       TYPE REF TO cl_salv_wd_uie_dropdown_by_idx,
            ls_value_set  TYPE wdr_context_attr_value,
            lv_tabix      TYPE sy-tabix,
            lv_count(2)  TYPE c,
            lo_interfacecontroller TYPE REF TO iwci_salv_wd_table.
    Navigate from <CONTEXT> to <CSKT> via lead selection:
      lo_node_cskt = wd_context->get_child_node( name = wd_this->wdctx_cskt ).
    get element via lead selection
      lo_el_cskt = lo_node_cskt->get_element( ).
    Get Data:
      SELECT kokrs kostl datbi ktext FROM cskt  INTO CORRESPONDING FIELDS OF TABLE lt_cskt.
      lv_count = 0.
    Populate value set
      LOOP AT lt_cskt INTO ls_cskt.
        lv_tabix = sy-tabix.
        CLEAR ls_cskt-ktext.
        DO 3 TIMES.
          lv_count = lv_count + 1.
          CONCATENATE 'TEST' lv_count INTO ls_value_set-text.
          CONCATENATE 'TEST' lv_count INTO ls_value_set-value.
          if lv_tabix = 2.
           if sy-index = 2.
             EXIT.
           endif.
          endif.
          APPEND ls_value_set TO ls_cskt-valueset.
        ENDDO.
        MODIFY lt_cskt FROM ls_cskt INDEX lv_tabix TRANSPORTING ktext valueset.
      ENDLOOP.
    Bind data
      lo_node_cskt->bind_table( lt_cskt ).
    Instantiate ALV
      lo_cmp_usage = wd_this->wd_cpuse_alv( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
      lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
    Bind Data to Interface Controller Node
       lo_interfacecontroller->set_data(
            r_node_data = lo_node_cskt
    Get ALV reference table
       lv_value = lo_interfacecontroller->get_model( ).
    Make KTEXT column as drop down
       CALL METHOD lv_value->if_salv_wd_column_settings~get_column
       EXPORTING
         id = 'KTEXT'
       RECEIVING
         value = lr_column.
    Create Object for Drop down
      CREATE OBJECT lr_drdn
       EXPORTING
         selected_key_fieldname = 'KTEXT'.
      CALL METHOD lr_drdn->set_valueset_fieldname
      EXPORTING
        value = 'VALUESET'.
      CALL METHOD lr_drdn->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_drdn.
      CALL METHOD  lv_value->if_salv_wd_table_settings~set_read_only
      EXPORTING
        value = abap_false.
    I am still finding the answer why data in drop down is not visible. However, I can select by clicking dropdown and blank elements (since data is not visible) can be selected.

    Hey
    i am using  the same code except i have just modified little bit the select statement to restrict the number of entries.
    and also besides writing the code in wddoinit i have added the compenent usage of alv component and added the node
    having the structure ckst and after that deleting the dictionary reference to add the attribute valueset in both places
    component controller and view controller and mapped them and mapped the data node of interface controller of comp
    usage to this node in comp contrlr.
    and adding the view container and embeding table view of alv comp there.
    that's it
    and here is the code which is almost same as yours except small change in select statement.
    method WDDOINIT .
      DATA:
    lo_node_cskt TYPE REF TO if_wd_context_node,
    lo_el_cskt TYPE REF TO if_wd_context_element,
    ls_cskt TYPE wd_this->element_cskt,
    lt_cskt TYPE wd_this->elements_cskt,
    lo_cmp_usage TYPE REF TO if_wd_component_usage,
    lv_value TYPE REF TO cl_salv_wd_config_table,
    lr_column TYPE REF TO cl_salv_wd_column,
    lr_drdn TYPE REF TO cl_salv_wd_uie_dropdown_by_idx,
    ls_value_set TYPE wdr_context_attr_value,
    lv_tabix TYPE sy-tabix,
    lv_count(2) TYPE c,
    lo_interfacecontroller TYPE REF TO iwci_salv_wd_table.
    * Navigate from <CONTEXT> to <CSKT> via lead selection:
    lo_node_cskt = wd_context->get_child_node( name = wd_this->wdctx_cskt ).
    * get element via lead selection
    lo_el_cskt = lo_node_cskt->get_element( ).
    * Get Data:
    SELECT kokrs kostl datbi ktext FROM cskt INTO CORRESPONDING FIELDS OF TABLE lt_cskt up to 10 rows .
    lv_count = 0.
    * Populate value set
    LOOP AT lt_cskt INTO ls_cskt.
    lv_tabix = sy-tabix.
    CLEAR ls_cskt-ktext.
    DO 3 TIMES.
    lv_count = lv_count + 1.
    CONCATENATE 'TEST' lv_count INTO ls_value_set-text.
    CONCATENATE 'TEST' lv_count INTO ls_value_set-value.
    if lv_tabix = 2.
    if sy-index = 2.
    EXIT.
    endif.
    endif.
    APPEND ls_value_set TO ls_cskt-valueset.
    ENDDO.
    MODIFY lt_cskt FROM ls_cskt INDEX lv_tabix TRANSPORTING ktext valueset.
    ENDLOOP.
    * Bind data
    lo_node_cskt->bind_table( lt_cskt ).
    * Instantiate ALV
    lo_cmp_usage = wd_this->wd_cpuse_alv( ).
    IF lo_cmp_usage->has_active_component( ) IS INITIAL.
    lo_cmp_usage->create_component( ).
    ENDIF.
    lo_interfacecontroller = wd_this->wd_cpifc_alv( ).
    * Bind Data to Interface Controller Node
    lo_interfacecontroller->set_data(
    r_node_data = lo_node_cskt
    * Get ALV reference table
    lv_value = lo_interfacecontroller->get_model( ).
    * Make KTEXT column as drop down
    CALL METHOD lv_value->if_salv_wd_column_settings~get_column
    EXPORTING
    id = 'KTEXT'
    RECEIVING
    value = lr_column.
    * Create Object for Drop down
    CREATE OBJECT lr_drdn
    EXPORTING
    selected_key_fieldname = 'KTEXT'.
    CALL METHOD lr_drdn->set_valueset_fieldname
    EXPORTING
    value = 'VALUESET'.
    CALL METHOD lr_drdn->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_drdn.
    CALL METHOD lv_value->if_salv_wd_table_settings~set_read_only
    EXPORTING
    value = abap_false.
    endmethod.
    thanks
    sarbjeet

Maybe you are looking for

  • My import system is no longer accessible on firefox.

    I am using the apsona import tool in both my zen and open carts. After upgrading firefox, the referenced import tool is no longer accessible although I can log into zen-cart and open-cart. The toolbar is accessible in zen but when I click the button

  • Saving forms with interactive fields.

    I am using Adobe Reader XI.  I am filling out a form with interactive fields and the purple bar at the top which states "data typed into this form can be saved".  However, when I save the form and then reopen it, the form is blank.  Is there anything

  • Title screens in slide shows

    How do I make the titles bigger in the slideshow? Can I set it up so that the titles appear on top of the photo? I only see them come up in the upper left corner very small.

  • LR catalogue and updating to Snow leopard

    Hei, I am about to update my my OS X (Leopard) to Snowleopard and was thinking of doing a complete update, since my mac has become quite slow, so I'd like to use this opportunity. My question is concerning my LR (v. 2.4) catalogue. I don't store my p

  • Incorrect query generation in AggregateCollectionMapping

    Hello! We have replaced some of OneToMany mappings with AggregateCollection. Despite of our expectations, some of these mappings are not working. When inserting some objects using AggregateCollection mapping, we get the following exception: INTERNAL