Dropdown in WDA

Hi all,
Can anyone send me the step by step procudre or tutorial for developing application using dropdown in Webdynpro ABAP?.
Regards,
Shanthi

for drop down by key , proceed like above ;
except mantain the cardinlaity as 0..1 . Here is a code for your refernce :
-> TYPES: BEGIN OF str_roles,
  ->  role TYPE z0cz_roles-role_id,
->  END OF str_roles.
  ->DATA: it_role TYPE TABLE OF str_roles,
   ->    wa_role TYPE str_roles.
  ->DATA:          value1 TYPE wdy_key_value,
    ->       set TYPE wdy_key_value_table.
-> SELECT role_id FROM z0cz_roles INTO TABLE it_role.
->SORT IT_ROLE DESCENDING BY ROLE.
->  LOOP AT it_role INTO wa_role.
  ->  value1-key = sy-tabix.
  ->  value1-value = wa_role-role.
  ->  APPEND value1 TO set.
   ->  ENDLOOP.
->  DATA : node_info TYPE REF TO if_wd_context_node_info.
-> node_info = wd_context->get_node_info( ).
->  node_info = node_info->get_child_node('CN_DROPDOWN').
  ->node_info->set_attribute_value_set( name = 'CA_ROLE'   value_set = set ).
regards,
amit

Similar Messages

  • Webdynpro - Dropdown UI Elements

    Which webdynpro dropdown UI element is better in terms of performance: dropdown by key, or, dropdown by index?

    Check out the threads[Difference between dropdowns |Difference between dropdown index;
    [Thread|Re: dropdown in WDA]

  • Create/Change/Delete for material

    Hi Experts.
    I have to create an application is which i have to create new material, change existing SAP materials & delete sap existing materials.
    I am not sure which approach is good:-
    1. 1 view for create / change / delete
    2. saperate view for create change & delete.
    If i go with the first case how do to perform it (how to use create view as change & delete view) I created a view for create materials. For change & delete i created a search view which gives a list of SAP existing materials based on selection criteria. Now how to pass selected materials data to the create view so that i can see it in edit mode (in Create view) if user presses change. or how to display the selected material data in display mode (in create view) for deletion.
    If i go with the 2nd option then also how to pass Selected material from the search to change & delete view.
    Not sure where do i have to create context methods etc for such functionalities.
    Regards,
    Nik

    hi
    Can you tell me how can i display SAP existing materials data if i use only 1 create view
    which is used to create materials. At initial its haveing input fields.
    Now i want to see data in create view for the seleted material.
    do u mean , u have the records in ur data base table and u want ur records to be listed down in a drop down , in ur create view
    if so , u can use dropdown by index ..
    if u wish to use drop down by index , thn proceed like this :
    1 declare a context node of cardinality 0..n
    2 declare attribute of type string under it . The attribute name should be exactly the same as that in database table '
    eg if u want to poulate values for a field ' SYS' from table , than giv the attribute name as 'SYS' in context attribute
    3 declare internal table of type standard table
    4 populate internal table with values
    5 take the refernce of the node , u have created
    6 bind it with the internal table
    the dropdown by index wud nw contain app values
    Re: dropdown in WDA
    cn u pls explain more about ur requirement ?
    Edited by: amit saini on Oct 14, 2009 12:29 PM

  • E-recruitment: Defaulting select options in the Dropdowns (WDA Cand, Rec)

    Question: Using COnfigurations ID's, is there an option to default values for the fileds with drop downs. EX: Country filed shows several entries in candidate and recruiter applications. would it be possible to  default USA in the country drop down filed using configuration ID's. If yes, please explain.
    Version - E-rec 604 support pack 5. Webdynpro Interface, seperate front end and back end - candidate Scenerios #3 as per Note 1017866.
    Request e-rec Pro's to post the solution, if they have faced this issue in there e-rec implementation exp.
    Thanks & Regards,
    David.,...

    Hi,
    preselecting values is not possible via configuration. You can only solve that by programming, thus creating enhancements to the WDA components.
    Best regards
    Sebastian

  • WDA - dropdowns not working in Properties section of my fields

    In my layout, I have created a selection screen with 5 input fields. However, I can't set the properties such as Layout Data, textDirection, visible, etc... - none of those allows me to push the dropdown to retrieve values.
    I can overwrite values by typing in, but the dropdowns don't work.
    anyone experience that before?

    OK, i think i finally figured it out.
    I have dual screens & when my layout is spread across both screens, the dropdowns don't work. However, when I shrink the layout down to 1 screen, the dropdowns now work.. weird.

  • How to have multi select dropdowns for web request and adobe forms

    Hi All,
    I am working on interactive forms for CRM 7.0 using web request and ZCI layout.
    When I say web request we define the fields required for the form in CRM that becomes the context for WDA and passed onto Adobe form.
    This web request is a flat structure which mean if I have a node and attributes with in that you cant have multiple values to wards this node as in WDA.
    Now My query:
      I have a field called "xyz" since web request is a flat structure i just defined it as a string.
      In WDA I made it a enumrated field and added key value pairs to it.
      In Adobe form I binded this field to a WD native enum dropdown list every thing is fine untill here.
      Now in the form I need this as a multiple select, so i changed the dropdown field to list box it works.
      The form has to be submitted as a draft version when did so, it will not execute any APIs but saves the data to the web request.
      When the same form is opened for the next time, with the data in web request it should reopen this field with the multiple seleced values high lighted.
      since the field xyz is a single filed of string, how can i maintain multiple values in that...?
      if there is a form status auto save function in Adobe form this might solve a bit but not sure when the form is opened 2nd time from web reqest view does it consider it as a new one or open the same form...?
    I have such dropdown fields and problems including ones with depenedt values on one another.
    I tried my best to explain the problem, if somebody can help me with this its much appriciated.
    Note: Since this is dependent on CRM web request I am posting the same query in that block also apologies if this mean a duplicacy.
    Thanks & Regards,
    Sai

    I got the solution and problem is solved.
    Iterating & processing a enumrated dropdown is like any other dropdown /list box in adobe forms.
    Regards,
    Sai Krishna

  • Possible to default the value displayed in a dropdown?

    My form has several drop down list boxes which I prefill in WDA with values - specifically, Project Manager name.
    When I go in to my form, I can select any one and Submit back to the backend. the data is saved appropriately.
    When I go in Change Mode, I select the data from the backend to display in my form, but those names do not populate in my drop down fields.
    I know this is possible, because there are a few other drop down boxes that do come back pre-filled.
    The only difference between the dropdown boxes that do work and those that don't is that the ones that do work have static values defined in the form while the others have values populated dynamically from the web dynpro and passed in to the form.
    any ideas?
    thanks,
    rp.
    Edited by: robert phelan on Jun 9, 2009 3:48 PM

    EDIT.. I fixed this by passing the drop down VALUE to the form instead of the actual TEXT.
    for instance, my manager's id was 12345 but I passed John Doe.
    passing 12345 chose the correct TEXT to display.
    Edited by: robert phelan on Jun 9, 2009 8:37 PM
    Edited by: robert phelan on Jun 9, 2009 8:39 PM

  • Best possible approach to add fields in an FPM WDA application

    Hi guys,
    Our SRM 7 has FPM based WDA views. Extending the customer include by appending fields alone will not work for us as some fields are dropdowns that will perform actions and display/hide other custom fields.
    I can think of the enhancement framework to enhance the views. Since i am knew to WDA and FPM I am thinking there is another easier way to do this.
    What is the best possible approach to fulfil this requirement?
    Regards
    Ali

    Thanks to responses from Chaitanya and Thomas.
    I managed to create additional fields(with action assigned) in the standard shopping cart screens.
    I extended the SRM header structure, added the custom fields of this structure in the header node of the context, and by binding the property of these fileds to the attributes, I don't have to code for the fields enable/disable when the transation is called in edit/create/display mode.
    However, I am still struggling with the dropdown(with action). They remain enabled, even when the data has been saved or the transaction is in display mode. Hints?
    Regards, Ali

  • HRASR_FORM_WINDOW causes dropdowns to show key or blank

    Hello,
    ECC 6.0, EHP 4, Adobe Livecycle Designer 8.1
    I am utilizing the HRASR_FORM_WINDOW to call a custom WDA component in my form.  The problem is that when my popup opens, the values for dropdown fields are doing one of 2 things:-
    ISR Native Controls -> ISR DDL 1st Element Preselect -> shows key
    ISR Native Controls -> ISR DDL No Element Preselect -> goes blank
    When I close the popup, the dropdowns return to their text values. However, when I check and send the same thing occurs as when popup is open and if I return to form with previous step, dropdowns are now inactive and showing either key or blank.  This does not happen if I check and send without calling the popup. So in some way, the popup is corrupting those fields?
    Thanks in advance for your help. 
    Regards, Piers

    Hi,
    There is a SAP note on this. Please search in market place, search by HRASR_FORM_WINDOW.
    Regards,
    Raghavendra

  • Table with a dropdown field with values.....

    Friends, I opened this new thread with my good explanation whatim looking for . sorry for this.
    I have a table:
                        col1            col2               col3
    row1              r1c1           r1c2               r1c3
    row2              r2c1           r2c2               r2c3
    row3              r3c1           r3c2               r3c3.
    I need col2 to be dropdown. Here when doinit default data is being passed to this table. Now when the WDA loads, i want col2 to be dropdown, but with only one value. whatever i have in backend.Here intially i want to disable col2. User should not hcange it.
    But when i hit ADDNEWROW button, it shoudl create row4,  with some (i m writing a query to fetch col2 values) values in the dropdown. User should be able to select any value here.
    The r1c2 and r2c2, r3c2, should not change on ADDNEWROW.  they should remain the same.
    Hope this time i explained you correctly, and im expecting ur replies friends...
    Kindly respondg back to me. thanks to all in advance,
    Niraja

    Hi Niraja,
    Please refer the code below for filling drop down in table.... this is hard coding i.e. i m filling value directly with out using database table .now wht u have to do is that you have to create an internal table with two column one key and one value. select data from database into internal table. thn just replace hard coding with the value and key column of internal table
    Please note SAP doesnt recommend usage of select query in WD abap. use any FM instead.
    DATA LR_NODE_INFO TYPE REF TO if_wd_context_node_info.
    data ls_value type wdy_key_value.
    data lt_value_set type wdy_key_value_table.
    ls_value-key = 'a'.
    ls_value-value = 'APPLE'.
    append ls_value to lt_value_set.
    ls_value-key = 'b'.
    ls_value-value = 'BANANA'.
    append ls_value to lt_value_set.
    ls_value-key = 'c'.
    ls_value-value = 'GRAPES'.
    append ls_value to lt_value_set.
    ls_value-key = 'd'.
    ls_value-value = 'MANGO'.
    append ls_value to lt_value_set.
    lr_node_info = wd_context->get_node_info( ).
    lr_node_info = lr_node_info->get_child_node( 'CN_UITABLE' ).
    lr_node_info->set_attribute_value_set( name = 'CA_COLUMN2' value_set = lt_value_set ).
    As suggested by Stefan you can make the read only field by using enable property.
    regards Pranav
    Edited by: Pranav Nagpal on Nov 21, 2008 5:55 AM

  • Creating dropdown by coding in Webdynpro ABAP

    Hi experts,
    I have a requirement to display a dropdown in the portal. But I cannot add it directly in the webdynpro layout as I am using standard WD component. So only through enhancement, it can be achieved. I am not sure how to create a dropdown by coding in the WD component.
    Kindly throw your valuable inputs here.
    Thanks in advance!!!
    Regards
    Raaam's

    Hi.,
    You have to enhance your standard WDA component.
    Check this wiki: [Create UI Elements Dynamically in WDA|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=141263105]
    also check : [Dynamic Binding , Dynamic Mapping|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/201ddd3b-b4ce-2b10-8883-880ae8147f89]
    and DEMODYNAMIC WDA Standard Component
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • Forbidden Statements in Web dynpro ABAP( WDA Framework )

    Hi,
    do we have documentation on what statements should not be used WDA Framework, like we have forbidden statements for ABAP Objects???

    Hi ,
    i am not aware of any such document but I can share some of them:
    Call Screen
    Call Transaction
    Leave to Transaction
    Perform
    Form
    Endform
    Include
    Report
    Module
    Endmodule
    Chain
    Endchain
    No macros are allowed
    Any FM, Search help or method involving screen call
    Get
    Get Late
    Put
    Definition
    End of Definition
    Select-Option
    parameter
    Any statement associated with selection screen / Screen or its component like, box, dropdown, checkbox, radiobutton, tab strip, table control etc.
    Write ( including any formatting tags )
    ABAP events ( start of selection, top of page, end of selection etc )
    I will share more on remembering them
    Regards
    Vishal Kapoor

  • Authorization in dropdowns

    Hi Gurus,
    I'm creating an applicaton in WDA which will eventually be configured in SAP portal. I have a dropdown in my first view with 2 values. Based on user's authorizatoin they can see and select the value from dropdown. (Ex. user type A can see dropdown value1 only, usr type B can see dropdown value 2 only ). In order to achieve this, do I need to create a custom authorization object. Or portal team can acheive this? Basically my question is as a developer do I need to worry about this? If yes, what is the procedure to achieve this.
    Thanks,
    David.

    HI,
    Yes you have to write code in your WDA methods to separate the drop down values based on your users.
    You have to check from the backend authorization objects based on your sy-uname like which user should see which values and populate value in dropdown accordingly.
    Or else you can define a user parameter in uyor application and populate the values based on the url parameter.
    Thanks
    Pradeep

  • Dropdowns with multiple selection functionality

    Hi Gurus,
    How can I achieve dropdowns with range and multiple selection functionality in WDA?
    Your help will be highly appreciated.
    Regards,
    David.

    Look at JList.
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JList.html
    � {�                                                                                                                                                                           

  • WDA error in changing read only property of fields at runtime

    Hello Friends,
    I am creating a custom Web Dynpro ABAP Application for FI module in ECC 6.0
    I need to make a set of fields uneditable/grayed out based on a value in a dropdown list. If the user chooses the other value (out of the 2 values provided) in the dropdown list, the set of fields need to made editable.
    I created a context attribute of type WDY_BOOLEAN and bound this attribute to the "readOnly" property of the aforementioned fields. When defining context binding, I chose the option "Bind Directly to the Selected Attribute".
    I have written the following code in the OnSelect event handler method for the dropdown:
    I read the value in the dropdown which is stored in the variable "lv_payment_instrument". Based on this value, I am changing the value of the context attribute:
    if lv_payment_instrument = 'X'.
      DATA lo_nd_check_fields1 TYPE REF TO if_wd_context_node.
      DATA lo_el_check_fields1 TYPE REF TO if_wd_context_element.
      DATA ls_check_fields1 TYPE wd_this->Element_check_fields.
      DATA lv_editable1 TYPE wd_this->Element_check_fields-editable.
    navigate from <CONTEXT> to <CHECK_FIELDS> via lead selection
      lo_nd_check_fields1 = wd_context->get_child_node( name = wd_this->wdctx_check_fields ).
    @TODO handle non existant child
    IF lo_nd_check_fields IS INITIAL.
    ENDIF.
    get element via lead selection
      lo_el_check_fields1 = lo_nd_check_fields1->get_element( ).
    @TODO handle not set lead selection
      IF lo_el_check_fields1 IS INITIAL.
      ENDIF.
    @TODO fill attribute
    lv_editable = 1.
    set single attribute
      lo_el_check_fields1->set_attribute(
        name =  `EDITABLE`
        value = 'ABAP_FALSE' ).
    elseif lv_payment_instrument = 'Q'.
      DATA lo_nd_check_fields TYPE REF TO if_wd_context_node.
        DATA lo_el_check_fields TYPE REF TO if_wd_context_element.
        DATA ls_check_fields TYPE wd_this->Element_check_fields.
        DATA lv_editable TYPE wd_this->Element_check_fields-editable.
    *navigate from <CONTEXT> to <CHECK_FIELDS> via lead selection
        lo_nd_check_fields = wd_context->get_child_node( name = wd_this->wdctx_check_fields ).
    *@TODO handle non existant child
       IF lo_nd_check_fields IS INITIAL.
       ENDIF.
    *get element via lead selection
        lo_el_check_fields = lo_nd_check_fields->get_element( ).
    *@TODO handle not set lead selection
        IF lo_el_check_fields IS INITIAL.
        ENDIF.
    *@TODO fill attribute
       lv_editable = 1.
    *set single attribute
        lo_el_check_fields->set_attribute(
          name =  `EDITABLE`
          value =  'ABAP_TRUE' ).
    endif.
    When the user chooses either of the 2 values in the dropdown, the set of fields are made uneditable. I am unable to make them editable again.
    I would greatly appreciate your inputs/thoughts on how to rectify this error.
    Regards,
    Arun.

    Hi,
    Create one attribute of type WDY_BOOLEAN , i think u already done.
    First get selected dropdown value into one variable.
    For example  :
    lo_el_segment1 = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).
    get all declared attributes
    lo_el_segment1->get_static_attributes(
    IMPORTING
    static_attributes = ls_segment1 ).
    now ls_segment1 has selected drop down value.
    DATA : lv_dropdown type string .
    lv_dropdown = ls_segment1-segment.
    If lv_dropdown = 'X'.
    set single attribute
    lo_el_check_fields1->set_attribute(
    name = `EDITABLE`
    value = ABAP_FALSE ). // No Quotes, ABAP_TRUE or false not works use 1 0r 2 or ' ' 'X' .
    elseif lv_dropdown = 'Q'.
    set single attribute
    lo_el_check_fields1->set_attribute(
    name = `EDITABLE`
    value = ABAP_FALSE ).
    else.
    set single attribute
    lo_el_check_fields1->set_attribute(
    name = `EDITABLE`
    value = ABAP_TRUE ).
    Hope it solves..
    cheers,
    Kris.

Maybe you are looking for

  • Report web out put problem

    Hi: I used 10g forms and reports for my application. When I run a report .rdf file in form used web.show_document(v_parameter_string ,'_blank'); build in function, the v_parameter_string include all parameter for server and application. Everything is

  • AIR won't install after Yosemite with Error "Installer Damaged"

    Error message ""Adobe AIR Application Installer" is damaged and can't be opened" I've uninstalled previous versions,using uninstaller, removed all incidents of AIR files, and my computer is not connected to another Hard Drive or Time Machine. Does an

  • Different cpuspeednw on two different hosts with same cpu config. Why?

    Hi, there are two hosts. They are different, but have same CPU configuration (I guess it from the output below). Host1: Solaris 10, 4 cpu, 4 core in each cpu. psrinfo -v Status of virtual processor 0 as of: 03/04/2010 08:57:45 on-line since 12/25/200

  • The ABAP/4 Open SQL array insert results in duplicate database records

    Hi, Iam getting following error : The ABAP/4 Open SQL array insert results in duplicate database records. Error in ABAP application program. The current ABAP program "SAPLV60U" had to be terminated because one of the statements could not be executed.

  • Bulk form creation, merge, and retrieve form data

    I am new to acrobat, and can't even find a place to start for what I want to accomplish.  I have a directory with 1000 single page pdfs (filenames are data_0001.pdf, data_0002.pdf, etc.). For every single page pdf, I want to embed a form with a radio