WD ABAP : dropdown

Hi,
I have made a drop down in my screen. But it has to be of "read-only" type.
When i set it to read only.... it display only the value while the selection list is lost.
The requirement is that it needs of be read only and also the selection list should be available... just for the user to know what other options were...
Can some help me how i could get the selection list when the dropdown is readonly?
points will be rewarded for all helpful answers
regards,
raksha

Hi,
I had to show a list of Vendors in an uneditable select-options - the code was like this -
SELECT-OPTIONS : s_lifnr FOR  bsik-lifnr MODIF ID dis.
*&      Form  SUB_DISABLE_FIELDS
      Disable Company Code and Payment block options.
FORM sub_disable_fields.
  CONSTANTS : const_lov TYPE char30 VALUE '%_S_LIFNR_%_APP_%-VALU_PUSH'.
Make sure we dont deactivate the List of Values button.
  LOOP AT SCREEN.
    IF screen-group1 = 'DIS' AND
    Disable everything except the button to view the list.
       screen-name NE const_lov.
      screen-input = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
ENDFORM.
In the debug, put a break-point on the Loop at screen , you will find the appropriate name of the button. Normally it ends with the 'VALU_PUSH'.

Similar Messages

  • How to set a default value in dropdown list in Wendynpro ABAP? Help!

    Hi Experts,
           I have Webdynpro for ABAP application that shows a DropdownwithKey UI element.
    1. I am able to populate the dropdown list. But by default the list is not showing any value. Only when I select a value from the list then it shows it.
    So how to set the default value to the first value in the list? Any code sample will be really helpfull.
    I have written the following code:
    method WDDOINIT .
      DATA:
        node_category TYPE REF TO if_wd_context_node_info.
      node_category = WD_CONTEXT->GET_NODE_INFO( ).
      node_category = node_category->GET_CHILD_NODE( 'CATEGORY' ).
      data:    LT_VALUESET type WDR_CONTEXT_ATTR_VALUE_LIST,
               L_VALUE type WDR_CONTEXT_ATTR_VALUE.
    L_VALUE-VALUE      = 'V1'.
    L_VALUE-TEXT    = 'yesterday'.
    INSERT L_VALUE into table LT_VALUESET.
    L_VALUE-VALUE      = 'V2'.
    L_VALUE-TEXT    = 'today'.
    INSERT L_VALUE into table LT_VALUESET.
    L_VALUE-VALUE      = 'V3'.
    L_VALUE-TEXT    = 'tomorrow'.
    INSERT L_VALUE into table LT_VALUESET.
    node_category->SET_ATTRIBUTE_VALUE_SET(
                 NAME = 'CAT_VALUE'
                 VALUE_SET = LT_VALUESET ).
    endmethod.
    Note that: I am using webdynpro for ABAP.
    Thanks
    Gopal

    I am not sure how it works in Web Dynpro for ABAP, but in Web Dynpro for Java 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>(<defalut value>)
    This generally done in Initialization method of the controller.

  • Dropdown list in WD-ABAP.

    hi gurus,
                I'm doing WD for ABAP and I'm trying to get contents into a dropdown list. I'm using DropDownListByKey. The contents come from a customizing table. I'm not sure where exactly I should add my coding: does it go into a supply function for my context attribute? Or in the method WDDOINIT? Basically, if you could point me towards some sample code, it would very user
    Thanks in Advance,
    Regards,
    Ravi.

    Hi,
         As per your suggestion,i implemented the following code in the doinit Method,
    but there is no value is populated in my dropdownlist box.
    I check the code by debugging, <b><i>i am not getting  any value in the following area
    ( ls_valueset-value = wa_kna1-kunnr.
       ls_valueset-text = wa_kna1-kunnr. )</i>   </b>
        kindly check the following code. 
           data: lt_valueset  type standard table of wdr_context_attr_value,
                   ls_valueset  type wdr_context_attr_value,
                 lr_node_info type ref to if_wd_context_node_info,
                 lr_node type ref to if_wd_context_node,
                 wa_kna1 type kna1,
                 lt_kna1 like table of wa_kna1.
          lr_node = wd_context->get_child_node( 'NODE_KNA1MOD' ).
          lr_node_info = lr_node->get_node_info( ).
          loop at lt_kna1 into wa_kna1.
             ls_valueset-value = wa_kna1-kunnr. "this will be the selected value
             ls_valueset-text = wa_kna1-kunnr.   "this will be the displayed value in the UI
              append ls_valueset to lt_valueset.
          endloop.
        lr_node_info->set_attribute_value_set(
                                exporting
                                  name       = 'KUNNR'
                                  value_set  = lt_valueset ).
    In the LAYOUT: i binded the selected key properties as kunnr.
       properties
             selectedkey = kunnr.
            kindly give me some suggestion,to come out of this problem.
    Thanks in advance,
    Regards,
    Ravi.

  • Dropdown in Abap Webdynpro

    Hi friends,
    How to have custom dropdown list for field in abap webdynpro.
    It is possible in general abap with FM 'VRM_SET_VALUES' how it's possible in abap webdynpro.
    Please reply.....
    Thanks in advance.

    Hi,
    Create a context node having attribute field whose values  you want to see in the dropdown.
    i you are using ui element as dropdownby key then follow the following code.
      DATA : node_info TYPE REF TO if_wd_context_node_info.
      DATA : it_zinsp TYPE TABLE OF zinsp. " here zinsp is the name of table
      FIELD-SYMBOLS : <tablezinsp> TYPE zinsp.
      DATA : value TYPE wdy_key_value,
             value_set TYPE wdy_key_value_table.
      DATA : zlandx TYPE string.
    Inserting the countries into the destination drop down
      value-key = lc_key.
      value-value = lc_select.
      INSERT value INTO TABLE value_set.
      node_info = wd_context->get_node_info( ).
      node_info = node_info->get_child_node( 'CN_DESTINATION' ). " CN_DESTINATION is name of node
      CALL METHOD cl_wd_dynamic_tool=>get_table_data
        EXPORTING
          tab_name  = 'ZINSP'
          row_count = 0
        IMPORTING
          data      = it_zinsp.
      LOOP AT it_zinsp ASSIGNING <tablezinsp> .
        SELECT landx FROM t005t INTO zlandx
          WHERE land1 EQ <tablezinsp>-zland1
            AND spras = sy-langu.
        ENDSELECT.
        value-key = <tablezinsp>-zland1.
        value-value = zlandx.
        INSERT value INTO TABLE value_set.
      ENDLOOP.
      node_info->set_attribute_value_set( name = 'CA_DESTINATION'
                                          value_set = value_set ). " CA_DESTINATION is the name of attribute.
    I hope it helps.
    Regards,
    Rohit

  • Change dropdown values for a field in webdynpro abap

    Hi All ,
    I need to change dropdown values for a particular field ( Tax code ) in webdynpro component (FITE_VC_RECEIPTS) when selecting expense type.  Right now Tax code values are coming with respect to a company code but i need tax code with respect to other company code for two personel numbers .
    How can i change dropdown values for this taxcode in webdynpro abap . Please suggest.
    Thanks in advance.
    Regards,
    Sijin K P.

    Hi All ,
    Thanks for reply .
    In production taxcodes are coming fine but wrong in dev and quality . ( Australian taxcodes are coming in production for dropdown values but new zealand tax codes in dev and quality )
    I have not started doing any changes . Is there any configuration part to change tax codes that can reflect in expense claim portal . Please help ..
    Thanks in advance.
    Regards ,
    Sijin K P.

  • Dropdown code in ABAP adobe form

    Hi All,
    I am trying to desing a dropdown can any one help in writing code for it.
    1) I designed ABAP Adobe form with ZCI layout & display type as activeX
    2) In layout editor I tried to use Standard->Drop-down list or
        WebDynpro ActiveX->Value Help->drop down list or
        WebDynpro native->Value Help->drop down list.
    3) I bind drop down with context element ($record.NODE1.DATA[*].PERNR)
        contect structure is as:
    ---Node1
    Pernr
    3) Then I tried to write code in 'WDDOINIT', but it is giving error
    >>>>Access via 'NULL' object reference not possible
    Please guide me in completing code for dropdown value help.I want to fill itab-a into node1-pernr:
    method WDDOINIT .
      DATA lo_nd_node1 TYPE REF TO if_wd_context_node.
      DATA lo_el_node1 TYPE REF TO if_wd_context_element.
      DATA ls_node1 TYPE wd_this->element_node1.
    * navigate from <CONTEXT> to <NODE1> via lead selection
      lo_nd_node1 = wd_context->get_child_node( name = wd_this->wdctx_node1 ).
    * @TODO handle not set lead selection
      IF lo_nd_node1 IS INITIAL.
      ENDIF.
    * get element via lead selection
      lo_el_node1 = lo_nd_node1->get_element(  ).
    * @TODO handle not set lead selection
      IF lo_el_node1 IS INITIAL.
      ENDIF.
    * get all declared attributes
      lo_el_node1->get_static_attributes(
        IMPORTING
          static_attributes = ls_node1 ).
    DATA: BEGIN OF itab,
           a TYPE persno,
          END OF itab.
    DATA: wa_itab LIKE itab.
    DATA: t_itab TYPE STANDARD TABLE OF itab.
          wa_itab-a = '1'.
          APPEND wa_itab TO t_itab.
          wa_itab-a = '2'.
          APPEND wa_itab TO t_itab.
          wa_itab-a = '3'.
          APPEND wa_itab TO t_itab.
          wa_itab-a = '4'.
          APPEND wa_itab TO t_itab.
    ******--pernr
    *****  ls_node1-pernr = '80000086'.
    ******--Send the values back to the node
      lo_el_node1->set_static_attributes(
       EXPORTING
        static_attributes = ls_node1 ).
    endmethod.

    }

  • Handling Dropdown values in Webdynpro ABAP

    Hello All,
    i have a Dropdown list in my screen which is having values
    SAP
    ABAP
    WebDynpro.
    am able to display these three values on the drop down using a method POPULATE_DROPDOWN.
    Code i have used here:
    method POPULATE_DROPDOWN .
      DATA: it_value_set_reports    TYPE TABLE OF wdr_context_attr_value,
            wa_value_set_reports    TYPE wdr_context_attr_value,
            lr_node_info_reports    TYPE REF TO if_wd_context_node_info.
        wa_value_set_reports-value = '01'.
        wa_value_set_reports-text = 'SAP'.
        APPEND wa_value_set_reports TO it_value_set_reports.
        wa_value_set_reports-value = '02'.
        wa_value_set_reports-text = 'ABAP'.
        APPEND wa_value_set_reports TO it_value_set_reports.
        wa_value_set_reports-value = '03'.
        wa_value_set_reports-text = 'WebDynpro'.
        APPEND wa_value_set_reports TO it_value_set_reports.
      APPEND INITIAL LINE TO it_value_set_reports.
      IF NOT it_value_set_reports IS  INITIAL.
        lr_node_info_reports = wd_context->get_node_info( ).
        lr_node_info_reports->set_attribute_value_set( name = 'REPORTS'
        value_set = it_value_set_reports ).
      ENDIF.
    endmethod.
    This is working fine.
    there is an action ONACTIONDISPLAY is associated with it.
    once we select a value from the dropdown the above method triggers. here i have to capture the value which is selected from the dropdown.
    Eg: Suppose if i select SAP then in the output it has to display data associated with SAP.
    Could anyone suggest how to do that step by step.
    Thanks,
    Sree.

    data: lv_value type < type of REPORTS attribute>.
    wd_context->get_attribuet( name = 'REPORTS' value = lv_value ).
    Abhi

  • Populating values in a dropdown field on the interactive form using WD ABAP

    Hi All,
        I want to populate values in a dropdown field( of cardinality 0:n ) on interactive form,The values which i want to populate is from a 'z' table which i have created.I used a select query to fetch the entries but on my interactive form the values are flowing in many rows and not in the drop down.I want all the values to be in the dropdown.The dropdown is not showin even one value under it.I am using webdynpro abap and controls from webdynpro native.Can anyone guide me on this with a step by step procedure.
    Useful suggestions will be rewarded.
    Thanks and Regards,
    Srividya.

    You mean in PFR of controller , ie after user selects a record from LOV window and after its populated back into to the textItem on the main entry form ??
    The value is displayed correctly in the intended textItem which has viewInstance and viewValue attached to it .
    so this is what setup looks like
    Entry form
    Customer Name - lov
    Customer Number(d) - Display Only - Populated by Lovmappings from LOV - mapped to Customer Number attribute on LOV window. It also has viewInstance and ViewAttrib assigned to it .
    Save Action
    At this point of time , i am assuming i already have value in Customer Number(d)since its displayed on the screen,rite ??
    or Do i have to take the value in formValue and then explicitly do a setAttribute to set that value to view object /Customer Number(d)
    hope this helps to understand the scenario

  • Web Dynpro ABAP: How do I fill dropdown lists?

    Hi,
    I'm doing WD for ABAP and I'm trying to get contents into a dropdown list. I'm using DropDownListByKey. The contents come from a customizing table. I'm not sure where exactly I should add my coding: does it go into a supply function for my context attribute? Or in the method WDDOINIT? Basically, if you could point me towards some sample code, it would make me very happy!
    Thanks, Ira

    Hi,
    see http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4884180951809e10000000a155106/frameset.htm and the examples in the system in WDR_TEST_EVENTS and WDR_TEST_UI_ELEMENTS.
    Regards, Heidi

  • SAPWebConsole - dropdown field works in ABAP but does not work on Web

    Hi All,
    I am writing an RF transaction in ABAP using regular dialog programming. My transaction works fine in the GUI. But it does not work OK when I access the transaction over the web (using IE) via SAPWebConsole.
    My issue is that on the SAPGUI I have a dropdown box that is populated with entries and I can choose an entry but on the same transaction on IE I cannot choose any entries in the same field as it does not have a dropdown option.
    Am I doing something wrong here in the ABAP? Am I assuming incorrectly that SAPWebConsole can have dropdown lists?
    Thanks,
    N.
    I know that this is stictlynotan ABAP issue but it does have possible overlap.

    Hi Niall!
    WebSAPConsole has in it's own limitations with regards to Dialog Programming Development, but a much better version than SAPConsole(Text Based).You cannot have drop down on WebSAPConsole on RF Transaction,pl suppress it in you dialog programming, both F1 & F4.Pl look at the Supported Features in the WebSAPConsole USers Guide.
    Let me know if you have any additional questions regarding this?
    Thanks
    Gisk
    Message was edited by: Sivakumar Ganesan(Gisk)

  • Pre fill Dropdown in adobe form using WD ABAP

    Hi Experts,
    I am creating an adobe form and I want to prefill the dropdown in the form with data while downloading it from web dynpro abap component. Once the form is downloaded I also want these selected values from dropdown to map in database in offline scenario.
    Please suggest.
    Warm Regards,
    Sushant Singh

    Hi Sai,
    I have similar kind of issue here for dropdown list . I have tried to populate the values in drop down list by binding the field-text and value properties witht he internal table where the internal table has all the values required for the dd list . I have concatenated the value and the text in one field of the internal table so that both of them would be displayed when the user cliclk the dropdown field on the PDF form . but whent he user selects a value , I need to take only the value but not the text . for ex: drop down list for company code -shows 1000  company 1
                2000 company2 , then if the user selects 2nd vaue , the value in the company code field should display 2000 only similar to the SAP standard F4 help. Please tell me how to achieve this . I have searched for this kind of issue in the forum but couldn't find any. 
    Iam using Standrd Drop down list  and I have intergrated the form with Webdynpro ABAP . is there a way for the issue or if there is any possibility at the first instance to populate the drop down with both ID and text ( like EN  English )as per SAP standard for language  so that I could avoid the use of internal table for concatenating both value and text . otherwise it only dislays either value or the text on drop down.
    Appreciate your help asap.
    Regards,
    Soha

  • PA40 & Personnel Area Dropdown ABAP

    Hi,
    I'm trying to find out how personnel area dropdown list is built ( the data extracted when the dropdown button is clicked on the PA40 screen). I could see that the PA40 transaction calls HELP_START function module. But not sure how the data is read from table T500p.
    Is there any ABAPer or technical expert who can assist me with the program/function name and the section of the code that fills the internal table to display the dropdown values.
    Thank you.

    Hi,
    Getting personnel area dropdown list values in PA40
    For PA40 the structure is RP50G - Input Fields for HR Master Data Transactions
    In this above structure for the field WERKS - Personnel Area, the value list is provided through search help H_T500P from the table T500P.
    The drop down value list can be restricted through enhancing the infotype, that to not for all infotypes. For example we can't enhance the 0000 - Action infotype (SAP won't allow to enhance the infotype).
    So for SAP allowed infotypes we can enhance and restrict the values coming from T500P or else we should delete the entries from master data.
    Regards,
    Magesh

  • Dropdown list in WebDynpro for ABAP

    Hello,
    I develop programs by using WebDynopro for ABAP and Interactive Forms.
    I'd llike to use Drop-downs UI elements on Interactive Forms.
    SAP material says
    "The WebDynpro Drop downs UI elements in the LiveCycle designer do not work in ABAP WD"
    see followings ( page 21)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20029530-54ef-2910-1b93-c41608ae0c90
    I don't know what to do.
    Does any one give me alternatives ?
    Best regards.
    Koji.

    Can you please let me know the scenario you are looking for?
    Is it static dropdownlist or you want to get the data from bacend?
    Cheers
    Satya

  • Dropdown in table element using webDynpro for ABAP

    Hi All,
    My requirement is:
    i have a dropdown in table ui element . before i do a bind_table with context , my dropdown should be loaded.
    how to do this ??
    pls help me with sample code.
    thanks,
    Hema.

    Hi Hema Sundar,
    You just need to create an Attribute in your context node and bind it to the
    SelectedKey property of the dropdown.
    Populate the value of the attribute when you are fetching data to fill in
    your internal table.
    Also If you want to populate data into the dropdown on your own
    you can refer to the below code
      data:
        lr_node type ref to if_wd_context_node,
        lr_node_info type ref to if_wd_context_node_info,
        lt_nv type wdr_context_attr_value_list,
        ls_nv type wdr_context_attr_value.
      lr_node = wd_context->get_child_node( if_componentcontroller=>wdctx_element ).
      lr_node_info = lr_node->get_node_info( ).
    build lt_nv ...
      lr_node_info->set_attribute_value_set(
          name = 'ATTRIBUTE'
          value_set = lt_nv ).
    Hope this helps.
    Regards,
    Ismail.

  • Only one value shown in dropdown list of ISR form using pure ABAP

    Hi all,
      We are trying to create a Adobe form using ISR library controls. We want to populate a dropdown list with all the values from  the table T001 dynamically. We have implemented the BAdi QISR1 & populated the ADDITIONAL_DATA. The BAdi is executing & populating the value correctly.
      In the we have created a control using the ISR Dropdown & mapped to the Context BUKRS from the interface created. When we execute the form, only the first value is getting filled.
      Can anyone help us in this ??? Its very urgent....
    Thanx,
    Sivagami.R

    Hi,
    I am just giving the solution what I have done in my project. Hope this will help:
         DATA: BEGIN OF it_ccode OCCURS 0,
                   bukrs TYPE t001-bukrs,
                   butxt TYPE t001-butxt,
                     END OF it_ccode.
    DATA: wa_ccode like line of it_ccode.
    Select Company Code (bukrs) and Text (butxt) from table T001.
    SELECT bukrs butxt
    from t001
    into table it_ccode.
    LOOP AT it_t001.
        ADD 1 TO lv_index.
        ls_additional_data-fieldindex = lv_index.
        ls_additional_data-fieldname  = 'FIELDNAME_KEY'.
        ls_additional_data-fieldvalue = it_t001-bukrs.
        APPEND ls_additional_data TO additional_data.
        ls_additional_data-fieldname  = 'FIELDNAME_LABEL'.
        CONCATENATE it_t001-bukrs '-' it_t001-butxt
        INTO ls_additional_data-fieldvalue.
        APPEND ls_additional_data TO additional_data.
      ENDLOOP.
    And the form my fields binding is:
    $record.FIELDNAME.DATA[*].FIELD
    Try this out. Hope this will help.
    Regards,
    Amit

Maybe you are looking for