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

Similar Messages

  • 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

  • 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

  • Dashboard prompt issue  (Restricting Values in drop down) ????

    Hi Friends,
    In my report I have "days to start" column which list almost 10,000 values ranging from -1000 to 5000.
    I need to create a prompt for this report on "Days to Start" column.
    When I create a prompt on Days to start with Operator "Greater than" and Control "Drop Down List" it shows me all the values in Drop down.
    I need only specific Values like 30, 60, 90, 180 which might not be in the "days to start" column.
    If I select "SQL Result" what should be the SQL for that??
    Is there any other way to solve this problem
    Aprreciate your help on this
    Thanks

    You could make a table VALUES with 1 column and fill it with values like 30,60,90....then in sql you'd write SELECT * FROM VALUES....as simple as that
    (of course, it'd have to be in RPD, and you'd need to expose it in Presentation layer)
    Edited by: wildmight on Feb 19, 2009 8:18 AM
    Also, you could try this - it works for me - but it could be slower and you might want to figure out how to round it - also, it has to be a number or cast to number format
    SELECT Table."Column"/30 saw_0 FROM "Subj Area" ORDER BY saw_0
    Edited by: wildmight on Feb 19, 2009 8:29 AM

  • How to set a default value in a Value Help Drop Down List

    Hi,
    I used an age Range field in my adobe form, the control  is a Value Help Drop Down List. i am populating the drop down using following code.
    IWDAttributeInfo ageInfo = wdContext.nodePersonalData().getNodeInfo().getAttribute("CTAgeRange");
         ISimpleTypeModifiable ageType = ageInfo.getModifiableSimpleType();     
         IModifiableSimpleValueSet ageValueSet =  ageType.getSVServices().getModifiableSimpleValueSet();
         ageValueSet.put("1","21-29");
         ageValueSet.put("2","30-34");
         ageValueSet.put("3","35 or Above");
    My requirement is to set a default value e.g. 30-34 in the age range field.
    I want to give input to iform from my Implementation code only.
    Please help.
    Thanks in advance

    hi Ranjan,
    that means you have to set at design time,
    to set default drop down value you will have to set the value for particular attribute (which is linked to the dropdown element) in the context
    like
    wdContext.currentContext<nodeName>Element.set<FieldName>(<default value>)
    This generally done in Initialization method of the controller.

  • Rule Policies:  Value drop down for category blank

    Hello,
    We have implemented Rule Policies in CRM 7.0.  When entering a condition for attribute "ICWC_Category" the drop down for "Value" is blank.  We have checked the following:  Categorization schemas are active and user has access to display categorization schemas.  When checking in all other systems, this is working with no issue, but in the productioin system, the value drop down is blank.
    If you have any ideas to trouble shoot or recreate the issue, it would be appreciated.
    Regards,
    E. Simpson

    Hi Anil,
    There is a SAP note availble for this problem.Please check.
    Thanks,
    Ashish

  • 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

  • SQL 2000 Database Maintenance Plan drop downs for days, weeks, months, not displaying

    When setting up a SQL 2000 Database Maintenance Plan the drop down for Remove files older than is not populating with hours, days, weeks, or months. It is just blank. The version is  Microsoft SQL Server  2000 - 8.00.2039 (Intel X86)  
    May  3 2005 23:18:38   Copyright (c) 1988-2003 Microsoft Corporation  Desktop Engine on Windows NT 5.2 (Build 3790: Service Pack 2). Is there a fix for this issue?

    This also works. All the credit goes to a user named eyechart.  Great directions provided as well.
    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=47575
    sqlmaint.exe
    was missing from MSDE 2000, but that was fixed in SP1 I think. Since this is SP3
    you probably have a missing registry value for the backup directory.
    I
    had to fix a similar problem last year on a bunch of laptops. They were all
    missing a registry value. Anyway, here is the fix:
    1. Fire up regedit and
    look under HKLM\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer
    2. Ensure you have
    a string value called BackupDirectory. The value for this should be the path to
    your backup dir. The default value is C:\Program Files\Microsoft SQL
    Server\MSSQL\BACKUP
    btw, this fix assumes you have a default instance
    installed. A named instance will have slightly different registry location and
    filesystem path.
    -ec
    Edited by -
    eyechart on 03/25/2005 21:04:27

  • How to get the values of drop downs, which are gonna create at run time.

    As per my design requirement, I have to create drop downs in an ADF display table.
    The no# of rows of the table are gonna decide the no# of the drop downs. User can select the values from drop downs. My issue is, how can I capture the selected values of those drop downs as those are gonna created run time.

    Hi
    ohh ,ok ,then as u said that u r storing twenty values ,thats y i aksed earlier ,are these form values part of tbale ,or as u said 20 values are there ,for these u r creating 20 form values ???.
    My suggestion would be ,u do four calculation and put all your results in a hashmap ,and keep this hash map in to sesion ,using the following method
    pageContext.putTransactionTransientValue("HashMapName",myHashMap);
    and inside the PFR method when u want to display these values ,u can loop through your hashmap and can display these values.
    like this
    HasMap hm=pageContext.getTransactionTransientValue("HashMapName");
    thanx
    Pratap

  • 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

    Hi,
    i have a problem to insert value in drop down list in ALV. (I want to use  this call function CALLFUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC' or 'REUSE_ALV_GRID_DISPLAY)
    How can i  insert directly in ABAP 3 value. Example of code you can test this :
    report ZCO_AFFACT_TEST.
    * type pools
    TYPE-POOLS: SLIS.
    * declarations for alv and internal tables
    DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
    WA_FIELDCAT TYPE LVC_S_FCAT,
    WA_LAYOUT TYPE LVC_S_LAYO,
    V_POSITION TYPE I ,
    LS_CELLCOLOR TYPE LVC_S_SCOL,
    L_INDEX TYPE SY-TABIX.
    DATA: BEGIN OF IT_VBAP OCCURS 0,
    VBELN LIKE VBAP-VBELN,
    POSNR LIKE VBAP-POSNR,
    flag  LIKE ztypfac-flag,
    CELLCOLOR TYPE LVC_T_SCOL,
    END OF IT_VBAP.
    * start of selection
    start-of-selection .
    *---get data from db table
    perform get_data .
    *---build layout for alv
    perform build_layout .
    *---build fieldcat for alv
    perform build_fieldcat .
    *---modify fieldcat for colors in alv
    Perform modify_fieldcat .
    *---display alv
    perform display_alv .
    *& Form get_data
    FORM get_data .
    SELECT VBELN
    POSNR
    UP TO 25 ROWS
    INTO CORRESPONDING FIELDS OF TABLE IT_VBAP
    FROM VBAP.
    ENDFORM. " get_data
    *& Form build_fieldcat
    FORM build_fieldcat .
    WA_FIELDCAT-FIELDNAME = 'VBELN'.
    WA_FIELDCAT-REPTEXT   = 'VBELN'.
    WA_FIELDCAT-edit      = 'X'.
    WA_FIELDCAT-drdn_hndl = '1'. "I have had
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'POSNR'.
    WA_FIELDCAT-REPTEXT = 'POSNR'.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'FLAG'.
    WA_FIELDCAT-REPTEXT = 'FLAG'.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    ENDFORM. " build_fieldcat
    *& Form build_layout
    FORM build_layout .
    WA_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
    WA_LAYOUT-ZEBRA = 'X'.
    ENDFORM. " build_layout
    *& Form modify_fieldcat
    FORM modify_fieldcat .
    LOOP AT IT_VBAP.
    L_INDEX = SY-TABIX.
    if l_index = 5 or l_index = 15.
    LS_CELLCOLOR-FNAME = 'VBELN'.
    LS_CELLCOLOR-COLOR-COL = '6'.
    LS_CELLCOLOR-COLOR-INT = '1'.
    APPEND LS_CELLCOLOR TO IT_VBAP-CELLCOLOR.
    MODIFY IT_VBAP INDEX L_INDEX TRANSPORTING CELLCOLOR.
    endif.
    if l_index = 10 or l_index = 20.
    LS_CELLCOLOR-FNAME = 'VBELN'.
    LS_CELLCOLOR-COLOR-COL = '4'.
    LS_CELLCOLOR-COLOR-INT = '1'.
    APPEND LS_CELLCOLOR TO IT_VBAP-CELLCOLOR.
    MODIFY IT_VBAP INDEX L_INDEX TRANSPORTING CELLCOLOR.
    endif.
    if it_vbap-VBELN is initial .
    delete it_vbap.
    endif.
    ENDLOOP.
    ENDFORM. " modify_fieldcat
    *& Form display_alv
    FORM display_alv .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
    I_CALLBACK_PROGRAM  = SY-REPID
    IS_LAYOUT_LVC       = WA_LAYOUT
    IT_FIELDCAT_LVC     = IT_FIELDCAT
    TABLES
    T_OUTTAB = IT_VBAP .
    ENDFORM. " display_alv
    Thank you for your answers!
    Edited by: Emilien P. on Jun 30, 2010 10:42 AM

    Finaly i have user OO because all the example use the Object...
    With my old ALV i have used User command and Hotspot, it is very easy to use.
    Now with the OO i have a problem to manage the hot spot and a cell, when i am in mode debug /h when i click on the cell with the hotspot nothing happen !!! I don't undertand what is missing
    report ZCO_AFFACT_TEST.
    Tables : VBRK, VBRP,ZTYPFAC.
    *-- Global data definitions for ALV
    *--- ALV Grid instance reference
    DATA gr_alvgrid TYPE REF TO cl_gui_alv_grid .
    *--- Name of the custom control added on the screen
    DATA gc_custom_control_name TYPE scrfname VALUE 'CC_ALV' .
    *--- Custom container instance reference
    DATA gr_ccontainer TYPE REF TO cl_gui_custom_container .
    *--- Field catalog table
    DATA gt_fieldcat TYPE lvc_t_fcat .
    *--- Layout structure
    DATA gs_layout TYPE lvc_s_layo.
    types : begin of wls_facture,
           ...        END OF wls_facture.
    types : begin of wls_resultat,
          ...        END OF wls_resultat.
    data : wlt_facture type TABLE OF wls_facture,
           wls_facture type          wls_facture,
           wlt_final   type TABLE OF wls_resultat,
           wls_final   type          wls_resultat.
    PERFORM BUILD_DATA.
    PERFORM display_alv.
    end-of-selection.
    call SCREEN 1000.
    "display_alv OUTPUT
    *&      Form  display_alv
    *       text
    FORM display_alv .
      IF gr_alvgrid IS INITIAL .
    *----Creating custom container instance
        CREATE OBJECT gr_ccontainer
          EXPORTING
            container_name              = gc_custom_control_name
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            others                      = 6.
        IF sy-subrc <> 0.
    *--Exception handling
        ENDIF.
    *----Creating ALV Grid instance
        CREATE OBJECT gr_alvgrid
          EXPORTING
            i_parent          = gr_ccontainer
          EXCEPTIONS
            error_cntl_create = 1
            error_cntl_init   = 2
            error_cntl_link   = 3
            error_dp_create   = 4
            others            = 5.
        IF sy-subrc <> 0.
    *--Exception handling
        ENDIF.
    *----Preparing field catalog.
        PERFORM prepare_field_catalog CHANGING gt_fieldcat .
    *----Preparing layout structure
        PERFORM prepare_layout CHANGING gs_layout .
        PERFORM prepare_drilldown_values.
    *----Here will be additional preparations
    *--e.g. initial sorting criteria, initial filtering criteria, excluding
    *--functions
        CALL METHOD gr_alvgrid->set_table_for_first_display
            EXPORTING
         is_layout                     = gs_layout
            CHANGING
          it_outtab                    = wlt_final
          it_fieldcatalog              = gt_fieldcat
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4 .
        IF sy-subrc <> 0.
    *--Exception handling
        ENDIF.
      ELSE .
        CALL METHOD gr_alvgrid->refresh_table_display
          EXCEPTIONS
            finished       = 1
            OTHERS         = 2 .
      ENDIF .
    ENDFORM .                    "display_alv
    If anybody  have an idea Thanks a lot !
    Emilien
    Edited by: Emilien P. on Jul 1, 2010 4:21 PM

  • How to capture selected value from drop down by index

    Dear friends,
    i want to capture the value of select value from drop down by index, for eg if  select air france, how to capture , could any one please let me know
    Thanks
    Vijaya

    Hi Vijaya,
    You can get the value of selected from drop down as below
    Check out the event handler method attached to Onselect event of the ui element drop down by index , if no event is associated, then create an event and attach to the drop down list
    Now you will be having the CONTEXT_ELEMENT in the WDEVENT parameter
                   data lo_element type ref to if_wd_context_element.
                   lo_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT').
    Now, you can get the static attribute value of selected  drop down value & let us say your drop down list values are populated from context node 'ND_DRP_DOWN'
                   data ls_data type wd_this->element_nd_drp_down.
                             lo_element->get_static_attributes(
                                       importing
                                       static_attributes = ls_data ).
    Hope this helps you.
    Regards,
    Rama

  • 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

  • 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

  • External XML data files to add values to drop down lists

    I would like to have external XML data files to add values to drop down lists in my form.. But when i create a data connection it is working properly only in the Preview in Livecycle Designer.. but not in the PDF form(Adobe Reader). Moreover im not sure whether it will work in the form manager..!plzz help me!
    Raghava Kumar V.S.S.

    Hi,
    For the case of raghavakumar, Is it really that I need to have LiveCycle Reader Extensions? Is there any other way that could do the same?
    Thank you

Maybe you are looking for

  • One POP account no longer collecting new mail

    I'm having a very strange problem with Mail 3.6 on my MacBook2,1 running OS 10.5.8.  I currently have three POP account set up to be automatically checked every 15 minutes.  I have not changed settings for any of them in over a year.  Yesterday aroun

  • Creation of New T Code for Material Master

    HI, I have to create a new T Code for Material Master Change i.e. for MM02, with writing restrictions to few fields. How to achieve this?  Thanks and Regards, Hari Prasad.

  • Connecting a SATA disk to my iMac

    I had my 250GB LaCie d2 SATA disk connected to my G3 using the Serial ATA PCI card which came with the disk.It worked fine. Recently I replaced the G3 by an iMac; it has no SATA connection and no room to add the Serial ATA PCI card. However, I also b

  • Report bursting sends empty reports

    I am trying to use Business Objects Enterprise with Crystal Reports to send suppliers reminders by email. BOE should burst the reminder report into the parts relevant to each supplier, but the reports are always empty. Can anyone give me some help? I

  • I have 1 song credit, but i don't know how to use it XD

    as some people saw, i lost my money, but the story had a happy ending well, i won a song credit so now it says 46,25 + 1 credit, well, i bought a song ( that i wanted so till now ok) and it charged, it was supposed to use the credit? or i just can us