Abt Drop Down For ALV Data cells

Hi,
I m unable to create drop down for each cell of ALV table.
Reply me as soon as possible.
Thks.

You need to create an object of type CL_SALV_WD_UIE_DROPDOWN_BY_KEY, which is the UI element for dropdown by key, and set that to be your individual cell editor.
For whichever column you want a dropdown box, use the method set_cell_editor to make the editor as a dropdown box. Hope this helps.
Regards
Nithya

Similar Messages

  • 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

  • Using FormCentral is there a way to create a drop down for a date?

    In using a previous version of Adobe Professional, in designing fillable PDF forms we were able to create a field with a drop-down date.  Is there any way to do this using FormCentral?

    I think want you are asking is if it is possible for to have a Date Field which when the user click on the field a calendar comes up to pick a date?
    If that is the case then the PDF generated by FormsCentral doesn't support this yet.
    I am guessing that you were using LiveCycle Designer to create forms in the past. The some forms generated by LC Designer does support this type of field.
    If you want to see this added in FormsCentral PDF you can submit a idea here : http://forums.adobe.com/community/formscentral?view=idea&ideaView=5515 (click on the "Create an Idea" link on the right)
    Gen

  • Insert data in drop down in alv at run time.

    Hi Gurus,
    I have to insert data in the dropdown wich is in alv at run time.According to my requirement i have i fill my drop down in the init but depend upon some conditions i have to insert one more vaule in the drop down at the run time.
    My problem is that i have filled the drop down with new data but it is not displayed in at the alv output.It is working fine without alv.
    Thanks & Regards.

    Hi,
    As per my understanding you want to update values in the drop down, on enter event of some other field.
    For that you have written the code for drop down twice 1) in the init method 2) in the on enter event of one field, right?
    If the code is not working in the on enter event, I think you can still use 'WDDOMODIFYVIEW' method. Follow the below steps:
    1) create one attribute of type char1 in the attributes tab of the view
    2) Set the value of that attribute to 'X' in the on enter event of other field (where you have written the code for drop down)
    3) In 'WDDOMODIFYVIEW' method, check the value of attribute. If this is 'X' run the code for updating drop down, then clear the value of attribute
    Regards,
    Saket.

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

  • 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

  • Need a drop down for a selection screen

    HI all,
    I need a drop down for a selection screen.
    say for eg: Field is MARA-MTART   (Material Type). The selection is optional and the dropdown should be using check table: T134
    How to get a dropdown? I think a function module is used , but I dont remember the name.
    Kindly reply.
    Thanks in advance.
    Points will be rewarded

    Hi,
    chk the below code...
    TYPE-POOLS: vrm.
    PARAMETER: pr_spart TYPE spart AS LISTBOX VISIBLE LENGTH 7.
    *AT SELECTION-SCREEN ON VALUE-REQUEST FOR pr_spart.
    INITIALIZATION.
    *----Code for Drop down list....
      DATA: lit_spart_list  TYPE vrm_values, "Table for list of Divisions
              lwa_spart_list TYPE vrm_value,
              lw_name  TYPE vrm_id.            "Name of parameter with list-box.
    *---Assign selected values to table that would be passed to FM VRM_SET_VALUES
      CLEAR : lwa_spart_list,
              lw_name.
    *---Pass required values for list-box display.
      lwa_spart_list-key = 'H'.
      lwa_spart_list-text = 'HL'.
      APPEND lwa_spart_list TO lit_spart_list.
      lwa_spart_list-key = 'S'.
      lwa_spart_list-text = 'SL'.
      APPEND lwa_spart_list TO lit_spart_list.
      lwa_spart_list-key = 'P'.
      lwa_spart_list-text = 'PP'.
      APPEND lwa_spart_list TO lit_spart_list.
      lwa_spart_list-key = 'F'.
      lwa_spart_list-text = 'FR'.
      APPEND lwa_spart_list TO lit_spart_list.
    *Name of parameter to which list is to be assigned
      lw_name = 'PR_SPART'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = lw_name
          values          = lit_spart_list
        EXCEPTIONS
          id_illegal_name = 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.
    Reagrds,
    nagaraj

  • SQL function column in drop down list's data provider's query

    Just wondering, if it is somehow possible to use SQL function column for drop down list through data provider.
    At the moment, I am using id column as return value and name as display value from this query through CachedRowSetDataProvider:
    SELECT ALL someTable.Id,
    someTable.Name,
    someTable.Postal_Code,
    FROM someTable
    However, I want to change display to use calculated column as display value, for example Name_PostalCode from below mentioned changed query:
    SELECT ALL someTable.Id,
    CONCAT(someTable.Name, ' - Pin Code: ',someTable.Postal_Code) Name_PostalCode ,
    someTable.Name,
    someTable.Postal_Code,
    FROM someTable
    But JSC doesn't seem to like this.
    Is it someway possible to achieve this?
    Thanks.

    >
    But JSC doesn't seem to like this. Can you explain more. When doesn't it like it, in the design view, in the query editor, when your run it? What is the error you are seeing?
    See http://blogs.sun.com/divas/entry/displaying_multiple_fields_in_a

  • Drop down for a field in a table

    hi friends,
       need a help from u, how to maintain the drop down for a field in a table..
    advance thanks..

    Hi,
    You can use the function module F4IF_INT_TABLE_VALUE_REQUEST
    TABLES: T005T.
    DATA: BEGIN OF t_t005 OCCURS 0,
            land1 TYPE t005-land1,
          END OF t_t005.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(6) v_text FOR FIELD P_LAND1.
    PARAMETERS: p_land1  TYPE t005-land1.
    SELECTION-SCREEN COMMENT 13(35) v_text1.
    SELECTION-SCREEN END OF LINE.
    INITIALIZATION.
      v_text = 'Country'.
      v_text1 = ' '.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_land1.
      REFRESH: t_t005.
      SELECT land1
             INTO TABLE t_t005
             FROM t005.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
    *            DDIC_STRUCTURE   = 'T005'
                PVALKEY          = ' '
                retfield         = 'LAND1'
                dynpprog         = sy-repid
                DYNPNR           = sy-dynnr
                dynprofield      = 'P_LAND1'
                callback_program = sy-repid
                value_org        = 'S'
           TABLES
                value_tab        = t_t005
           EXCEPTIONS
                parameter_error  = 1
                no_values_found  = 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.
    Thanks
    Naren

  • Not able to set values in drop down for a table field

    Hi All,
    I am not able to set values in drop down for a table field. Although I am able to set these values to a stand alone field but its not happening for a particular table field. I am using ABAP web dynpro for coding.
    Pls help.
    Regards,
    Bhaskar

    Hi Otto,
    Here is the code I am using:
    * navigate from <CONTEXT> to <DATASOURCE> via lead selection
      lo_nd_datasource = wd_context->get_child_node( name = wd_this->wdctx_datasource ).
    * navigate from <DATASOURCE> to <CHANGING_PARAM> via lead selection
      lo_nd_changing_param = lo_nd_datasource->get_child_node( name = wd_this->wdctx_changing_param ).
    * navigate from <CHANGING_PARAM> to <EDUCATION_TAB> via lead selection
      lo_nd_education_tab = lo_nd_changing_param->get_child_node( name = wd_this->wdctx_education_tab ).
      node_info = lo_nd_education_tab->get_node_info( ).
      REFRESH ddlb_value_set.
      DATA: wa_edu_est TYPE t517t.
      SELECT * FROM t517t INTO wa_edu_est WHERE sprsL = 'EN'.
        s_element-text = wa_edu_est-stext.
        s_element-value = wa_edu_est-slart.
        APPEND s_element TO ddlb_value_set.
      ENDSELECT.
      SORT ddlb_value_set BY text.
    *    Set Value_sets to node_info
      node_info->set_attribute_value_set(
         name      = 'EDU_EST'
         value_set = ddlb_value_set ).
    Regards,
    Bhaskar

  • HT1349 How can I set up drop down menu in a cell of ipad2 numbers?

    I want to set up drop down menu in a cell in numbers spreadsheet. Data validation in excel provides that. But what formula should I use in iPad2 numbers?
    Thanks!

    I dont think it can be done. This thing has been discussed somewhere and so far, no solution yet.

  • In logic X I am trying to normalize but the track and file option in the edit window is not there at all just the drop down for pointer eraser etc. Any ideas? Thanks!..

    In logic X I am trying to normalize but the track and file option in the edit window is not there at all just the drop down for pointer eraser etc. Any ideas? Thanks!..

    Total life saver. Thank you

  • Datatable with drop down list in a cell

    Does anyone know the existing example of datatable against certain memory structure with possibility to have drop down list in a cell ( I mean after switching to editing mode some columns become drop down lists , otherwise just value ).
    TIA
    Michael

    Not possible. InDesign isn't designed to be form-filling software. At best, it can create fields which can be passed on to a PDF file, which usually further has to be edited in Acrobat Pro.

  • Create a drop down list in a cell within a table ?

    Is there a way to create a drop down list in a cell within a table ? Like the way it can be done in ms word or excell ? I dont mean an interactive pdf/form. I want to create a table in indesign which has drop down lists other people can use to populate a table quickly.

    Not possible. InDesign isn't designed to be form-filling software. At best, it can create fields which can be passed on to a PDF file, which usually further has to be edited in Acrobat Pro.

  • Please tell me how to adjust field width for alv data .

    Hi,
          Please tell me how to adjust field width for alv data . Also i want to remove zeros after decimal coming in field.
    Regards,
    Ranu

    Hello Ranu,
    You need to set OUTPUTLEN field from field catalog table for every column.
    DATA lt_fieldcat TYPE lvc_t_fcat
    DATA lw_fcat type lvc_s_fcat .
    lw_fcat-fieldname = 'BNAME' .
    lw_fcat-inttype = 'C' .
    lw_fcat-outputlen = '12' .  -----> for e.g. set width of column BNAME
    lw_fcat-coltext = 'User Name' .
    lw_fcat-seltext = 'User Name' .
    APPEND lw_fcat to lt_fieldcat .
    Hope this resolves your issue!
    Thanks,
    Augustin.

Maybe you are looking for

  • I can't update my iPhoto.

    I want to update iPhoto, but I am told "Update Unavailable with This Apple ID."  I don't understand how this one app has another apple ID, and I can't figure out what that ID is.  I tried to just start over and repurchace the app with my ID, but I ca

  • Same Group UUID On Two Systems?

    I sync files between an iMac and a MacBook both running 10.5.4. The source files are accessible by group "abc" on the iMac. The same group "abc" is defined on the MacBook. When these files are copied to the MacBook the group "abc" is shown as "Unknow

  • Where do I find the wi-fi security type again?

    I want to extend my AirPort Extreme wifi network using an airport express.  I know my own network name and password (:-) but where do I find the security type again?

  • Tplink722n error

    i have a problem with my tplink 722n adapter.after awhile it stops working but it freezes in the wireless icon and when i click the wireless icon nothing happens. here is the info below,im using windows 7 pro 64bit Log Name:      System Source:      

  • 2 CD's stuck!

    Hi everyone, A friend of mine was using a CD rom on her P.Book 15" when the drive suddenly made some kind of unfriendly noise and quit the programme, reverting to the desktop with no cd icon appearing on it. Someone else came in and seeing that there