How to create a Dropdown in webdynpro

Hi ,
I am a beginner in Webdynpro , Java . Request you to plz help me ..
My requirements -
1. How to create a dropdownbyindex in a view and populate it with some static values passed to the Context .
2. Upon selection of a value from the dropdown and clicking on the Submit button , how to save the value?
Context -
Node - Season
Attribute  - Seasonofyear
Kindly Reply
Thanks in Advance!!
Regards
Smita

Hi smitha,
I had checked out.. this is working fine for ur requirement
public void wdDoInit()
IPrivateSamView.ISeasonNode snode = wdContext.nodeSeason();
IPrivateSamView.ISeasonElement sele = snode.createSeasonElement();
snode.addElement(sele);
IWDAttributeInfo attributeInfo  = wdContext.nodeseason().getNodeInfo().getAttribute(IPrivateMain.IseasonElement.season);
ISimpleTypeModifiable sea = attributeInfo.getModifiableSimpleType();
sea.setFieldLabel("SEASON");
IModifiableSimpleValueSet valueSet =sea.getSVServices().getModifiableSimpleValueSet();
valueSet.put("0"," AAA");
valueSet.put("1","BBB");
valueSet.put("2","CCC");
i had created a attribute called copy under the node "season". Now i copied from the season attribute to copy attribute.
then onaction save
IModifiableSimpleValueSet rea = wdThis.wdGetContext().getContext().getModifiableTypeOf("season.season").getSVServices().getModifiableSimpleValueSet();
    wdContext.currentSeasonElement().setCopy(rea.getText(wdContext.currentSeasonElement().getSeason()));

Similar Messages

  • How to create a dropdown in Web Dynpro

    Hi,
        I just wanted to know how to create a dropdown box.
        Actually I am using a webservice and on the view I have to create a dropdown box with 4 values inside it.Also I have to map dat same field with one of the fields in the webservices request node.Is this possible???

    Hi,
    You can create Dropdown in two ways,
    1. Create a simpleType.(DictionariesLocal dictonarysimpleTypes)
    2. Go to enumeration , and add the data.
    3. Create a context and in the property of the context , choose select and select the local dictionary and select the one which you have created.
    4. You can create a DropDownKey and map to the context.
    Dropdown by Index.
    1.) Take DropDownByIndex UI Element in the Layout Tab.
    2.) Take One ValueNode Named "Employee" in the Context.
    3.) Take One Value Attribute Named "Id" for the Node "Employee".
    4.) Bind "Employee.Id" to the texts Property of the DropDownByIndex.
    5.) Set the "Employee" Node Properties in the Context Tab as
    a.) Cardinality --> 0..n
    b.) Selection --> 1..1
    c.) Singleton --> True
    6.) Write the Below Code in the Implementation Tab.
    IPrivate<View Name>.IEmployeeElement empEle;
    for(int i=0;i<3;i++)
    empEle = wdContext.createEmployeeElement();
    empEle.setId("Emp Id "+i);
    wdContext.nodeEmployee().addElement(empEle);

  • How to create popup in ABAP webdynpro.

    Hi,
    I found lot of examples to create a popup/ model window for java webdynpro.
    Could anyone give a pointer to an example which explains how to create popup in ABAP webdynpro??
    Kind Regards
    Shahul

    Hi Thomas:
    It worked fine the 1st time. Second time when the user clicks on the button to open up the popup it dumps.
    Here is the code in the action for popup:
    data: l_cmp_api type ref to if_wd_Component,
            l_window_manager type ref to if_wd_window_manager,
            l_api type ref to if_wd_View_controller,
            l_text type string_table.
      l_cmp_api = wd_comp_controller->wd_get_api( ).
      l_window_manager = l_cmp_api->get_window_manager( ).
      if wd_this->m_popup is initial.
        wd_this->m_popup = l_window_manager->create_window(
                 window_name = 'DOCQSOW'
                 button_kind = if_wd_window=>co_buttons_ok
                 message_type = if_wd_window=>co_msg_type_none ).
               component_usage_name = 'DOCQUERY_USAGE_1'
        l_api = wd_this->wd_get_api( ).
        wd_this->m_popup->subscribe_to_button_event(
              button = if_wd_window=>co_button_ok
              button_text = 'Transfer'
              action_name = 'POPUP_CLOSED'
              action_view = l_api  ) .
        wd_this->m_popup->SET_REMOVE_ON_CLOSE( abap_true ).
       endif.
      wd_this->m_popup->open( ).
    Second time when the popup tries to open, I get the following error:
    Method: RENDER_WINDOW of program CL_WDR_WINDOW_RENDERER========CP
    Method: RENDER_WINDOW of program CL_WDR_CLIENT_SSR=============CP
    Method: RENDER_POPUP_WINDOWS of program CL_WDR_CLIENT_SSR=============CP
    Method: RENDER_WINDOWS of program CL_WDR_CLIENT_SSR=============CP
    Method: IF_WDR_RESPONSE_RENDERER~RENDER_VIEWS of program CL_WDR_CLIENT_SSR=============CP
    Method: IF_WDR_RESPONSE_RENDERER~RENDER_USER_INTERFACE_UPDATES of program CL_WDR_CLIENT_SSR=============CP
    Method: IF_WDR_CLIENT~SEND_RESPONSE of program CL_WDR_CLIENT_ABSTRACT_HTTP===CP
    Method: IF_WDR_CLIENT~SEND_RESPONSE of program CL_WDR_CLIENT_SSR=============CP
    Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
    Is there a way to destroy the instance of the m_popup?
    Any help is appreciated!
    Thanks

  • How to Create a DropDown Box in a Selection Screen.

    Hi,
    I have a question. i.e, How to create a dropdown box in a Selection Screen. Could you please assist me.
    Thanks & Regards
    Sathish Kumar

    hi satish,
    The following can assist u to create a drop down ....
    Drop down list box can be created in a dialog screen(SE51) as well as selection screen.
      The sap list box allows to select a value from the list but we cannot enter our own value in the list box .The value list that will be displayed consists of two
    fields TEXT field of TYPE 80(C) and internal KEY field of TYPE 40(C).
    In screen painter to create a input/output field into list box we use
    'L" as a value for dropdown attribute for the i/o field.
    In screen painter to determine the type of method that will be used to fill the value
    list we use the attribute value list.
    If it is blank  the value list will be filled by the first column of the input help assigned to the screen field.This input help can be defined in the ABAP Dictionary, on screen using SELECT,VALUES screen statements or in event POV (PROCESS ON VALUE-REQUEST ) and the input help that will be passed to the field should consists of 2 columns ,the key column is filled automatically by the system.SAP recommends value list field should be blank.
    or
    The value  can be 'A' meaning that the value list will be filled in the event PBO(PROCESS BEFORE OUTPUT) or before the screen is displayed.In this method we use function module VRM_SET_VALUES to fill the values and pass it to the i/o field.
    If a function code is attached to the list box the selection of a value triggers a PAI
    otherwise PAI will not trigger.
    Example
    Dropdown list boxes
    REPORT DEMO_DYNPRO_DROPDOWN_LISTBOX.
    TYPE-POOLS VRM.
    DATA: NAME  TYPE VRM_ID,
          LIST  TYPE VRM_VALUES,
          VALUE LIKE LINE OF LIST.
    DATA: WA_SPFLI TYPE SPFLI,
          OK_CODE LIKE SY-UCOMM,
          SAVE_OK LIKE SY-UCOMM.
    TABLES DEMOF4HELP.
    NAME = 'DEMOF4HELP-CONNID'.
    CALL SCREEN 100.
    MODULE CANCEL INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE INIT_LISTBOX OUTPUT.
      CLEAR DEMOF4HELP-CONNID.
      SELECT  CONNID CITYFROM CITYTO DEPTIME
        FROM  SPFLI
        INTO  CORRESPONDING FIELDS OF WA_SPFLI
       WHERE  CARRID = DEMOF4HELP-CARRIER2.
        VALUE-KEY  = WA_SPFLI-CONNID.
        WRITE WA_SPFLI-DEPTIME TO VALUE-TEXT
                               USING EDIT MASK '__:__:__'.
        CONCATENATE VALUE-TEXT
                    WA_SPFLI-CITYFROM
                    WA_SPFLI-CITYTO
                    INTO VALUE-TEXT SEPARATED BY SPACE.
        APPEND VALUE TO LIST.
      ENDSELECT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                ID              = NAME
                VALUES          = LIST.
    ENDMODULE.
    MODULE USER_COMMAND_100.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'CARRIER'
         AND NOT DEMOF4HELP-CARRIER2 IS INITIAL.
        LEAVE TO SCREEN 200.
      ELSE.
        SET SCREEN 100.
      ENDIF.
    ENDMODULE.
    MODULE USER_COMMAND_200.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'SELECTED'.
        MESSAGE I888(BCTRAIN) WITH TEXT-001 DEMOF4HELP-CARRIER2
                                            DEMOF4HELP-CONNID.
      ENDIF.
    ENDMODULE.
    Reward if useful.
    Thank you,
    Regards.

  • How to create custom calendar in webdynpro ABAP.....(WDA)

    Hi,
    How to create custom calendar in Webdynpro Abap ?.
    Regards,
    Narasimha

    The best way I see here is to develop your custom calender in any of the UI technologies supported like Flash (flex) or HTML5 (or maybe even SilverLight? not sure) and embed it in your WD view. You can also handle interactions between the embedded component and the WD controller.
    Regards,
    Raghavendra

  • How to create interrelated dropdowns in java webdynpro

    In my screen i have to populate some values in the 1st dropdown once after selecting item from this dropdown i have to populate values in 2nd dropdown
    how can i do it  in webdynpro?

    hi,
    refer the following thread which is similar to your query.
    Dependable Dropdown boxes
    Re: Dependable Dropdown boxes.
    selected option of a dropdown list to avtive another dropdown list?
    Get selected value in Dropdown list
    Dropdown list
    Thanks
    Abhilasha

  • How to create a dropdown list to list the values from two different tables?

    Hi,
    I have the following requirement:
    1. I have to create a dropdown list to display all the values from the second column of  a table.
    2. Another dropdown list to display all the values from the second column of another table.
    3. A text box should help me to add the selected values.
    How to get this done in a PDF? Please help.
    Regards,
    Latha

    Is this a LC form? Because Acrobat forms have no concept of tables, just
    individual fields...

  • How to create a dropdown menu with sub buttons that link back to the labels on click.

    im trying to create a dropdown menu buttons that when you rollover to the top central button the button it opens up like a drop down menu would containg two other subsectional buttons. This makes the sub sectional buttons seperate from the main stage making it difficult to simply give them a on click,  sym.play("label") function.
    the buttons work like this in symbols or sections stage/panel/homebutton inside home button is group dev containg another group dev containg the button which I need to link back to a "label" in the /panel/ symbol or section. Thank you very much.

    pdp_1 wrote:
    Hi!
    I would like to create a DVD menu that offers two languages. So the first page gives two options: Language 1 and Language 2. Then depending on which language you choose, you go to a menu that proposes different videos and a photo slideshow.
    Regardless on which language button you click on initially, you get the same content but in different languages.
    I've been looking at Premiere's templates, which I can certainly customize, but I really don't see how to create the double menu. Does anybody have an idea?
    Put the video with the first language on the timeline followed by the video with the second language.  Use chapter markers so you can have each video as a chapter in the menu.
    I use Premiere Pro, so I can't give more specific directions. Perhaps somebody like ATR will chime in.
    Also, I have another question: can I put videos from different projects in the same DVD with Premiere or must all of the videos that go into the DVD be in the same project?
    Thank you very much!!!
    pdp1
    They must be in the same project.

  • How to create objects in ABAP Webdynpro?

    Hi,
    I want to create the object for the class: <b>CL_GUI_FRONTEND_SERVICES.</b>
    then i want to call file_save_dialog method.
    how shoud i write the code, plz?

    I have written this code:
    v_guiobj TYPE REF TO cl_gui_frontend_services.
    <u> ?????????????</u>
    v_guiobj->file_save_dialog( ...).
    How to create object in the place of ?????????????.
    Bcoz, when i run this i am getting:
    <b>Access via Null object reference not possible.</b>

  • How to create a dropdown box in free hand sql??

    Post Author: nalinipers
    CA Forum: Desktop Intelligence Reporting
    Hi every body,I have created a report by using free hand sql. My client wants to create a drop down box in that report.I do not know how to create the drop down box as i know how to create prompts in free hand sql.can you please help me to create the drop down box by using free hand sql. Periyasamy.

    Post Author: jsanzone
    CA Forum: Desktop Intelligence Reporting
    Hi Periyasamy,
    A drop down box is the same as a prompt that you would build when working in Designer.  If you already have the prompt in mind that you want to use and it exists in your universe, then the easiest way to make it work in free hand SQL is to first build your query in the normal fashion that you would for any other report and include that prompt.  Once you've got the objects and filters pretty much set, then capture the SQL, and modify it now as free hand SQL for your own situation.  You will notice that there may be some "@prompt" stuff scattered in your SQL, which will now run as a drop down box when you go to run your free hand SQL.  You can take note of how things were constructed and the next time you have to build your own free hand SQL you can either do it again the way just described, or build it totally on your own.

  • How to create popup Windows in WebDynpro

    I am learning WebDynpro and have developed a sample application where i ask the user to login. In case of incorrect login I want to display a popup window which shows an error message and has an ok button on it. On click of the OK button i want to close the Window.
    I have created a view for this popup... called errorView
    On click of login button i perform validations n incase the validatins fail i have put in the following code
    IWDWindowInfo myWinInfo = wdComponentAPI.getComponentInfo().findInWindows("Ra_ErrorView");
    myPopupWindow = wdComponentAPI.getWindowManager().createWindow(myWinInfo,true);
    myPopupWindow.setWindowPosition(300,150);
    myPopupWindow.open();     
    How should i proceed?
    Where should i write the myPopupWindow.close()
    Kindly give a step-by-step solution.

    Hi Reema,
    You want to close a window say window1 which you opened from a view.
    create an attribute. select its type from java native settings to IWDWindow
    wdContext.currentcontextElement().setWindowInstance(window);
    1.create an event in component controller say event1
    2.In order to trigger the event in component controller create a method in it
    write this code in implementation of controller to trigger the event
    wdThis.wdFireEventAddressSelectedEvent();
    3.For catching whatever event that is responsible for closing the window create an event handler in view1 say eventhandler1.Choose the subscibed event to be event1
    4.In that eventhandler1 write the code in implementation
    IWDWindow window =
    wdContext.currentcontextElement().getWindowInstance();
    window.close();
    Hope this helps you.Do revert back if you have more doubts
    Regards
    Rohit
    Message was edited by: Rohit Radhakrishnan

  • How to Create a Variant in WebDynpro Java apllication

    Hello-
    we have a requirement where we require to create a Variant for some of the Webdynpro application.
    Now that is there any functionality which allows to do so , there are various reports and how will i populate the variant data , does it require backend table and FM for pulling those data..
    How will I save the variant data and access them.
    Regards,
    Raj

    Hi Raj,
             I don't think there is a ready made variant functionality in WD Java like in SAP R/3.  But we can have a work around. As you thought, we have to create a BAPI/RFC and custom table(s) to store the data. So initially, you have to call this RFC and get the data from the tables and then you have to set main RFC/BAPI and   then execute it. Add an additional button to save the variant, onAction of the button update the execute the variant RFC and save the current data in custom table.
    Regards,
    Siva

  • How to create interactive forms using Webdynpro for ABAP

    Hi All,
             I have worked on Webdynpro for ABAP, and now I want to start creating adobe interactive forms using Webdynpro for ABAP. Please provide me with basic examples to start.
    Also Please provide me introduction as how interactive forms are related to ISR senarios.
    Thanks in Advance.
    Phani

    Hi Varun!,
    Can you please send me also the above said step by step tutorial on [email protected]
    and can you please also guide me any configurations to be done on Sneak Preview SP12 before developing the interactive forms.
    Thank you in advance.
    regards
    Ravi

  • How to create Flahs dropdown menus

    How do you create an animated Flash drop down menu using
    Action Script 2.0?
    Look at www.arkdesigns.ca/zvp

    Look in the Components window. There are a bunch of built in
    components
    that will serve that purpose.
    Rob
    Rob Dillon
    Adobe Community Expert
    http://www.ddg-designs.com
    412.243.9119

  • Robohelp 10: how to create a dropdown menu as an index?

    I currently have several standard links to other robohelp pages in my main index page.  I would like to change this to a dropdown menu, but when I add a dropdown menu (Insert -> HTML -> Form -> Drop-down Menu) It doesn't have any option to link to other pages.
    Is there an easy way to do this?

    Jeff, long ago I stopped adding a sig line.
    cnwinger, the wish form is below:
    http://www.adobe.com/go/wish
    A "standard drop-down menu" is a form element. RoboHelp does offer form elements but does nothing in the way of assisting with the scripting needed to make the form elements work.
    Cheers... Rick

Maybe you are looking for

  • IMac G5 Screen Burn In??

    Hey Folks... I've had my iMac G5 20" for about 5 months now. It's used A LOT for my business; it's easily on 5-6 hours a day or more. Lately, I've noticed that whenever the screen is a solid color (blue or white), after-images/shadows of the desktop

  • My magic mouse wont scroll after downloading mountain lion

    i downloaded the new mountain lion software to my iMac 27" but now my mouse wont scroll, the batterys are 100% and i have tried in the menus to turn it off and on and also tried disconnecting my mouse then repairing but no luck!

  • Cannot Log In After Update to 10.6.6

    Title says it all. After the update to 10.6.6, I now get a log in box which reverts back to the log in box after I choose my user id and type in the password. There are only two users on the laptop - a guest account and my account. Any ideas? Thanks

  • Page has expired message on clickiong the "Back" button on Browser

    Hi , I get Page has expired message on clicking the "Back" button in the browser. I want the user to get directed to the previous page with out viewing this message. I am using tomcat 5.0 web server and struts framework for my application. Kindly hel

  • Mail Stationery Fail

    What have I done wrong so as to be unable to see the stationery right? i see the corrupt files. Email will be seen well in gmail webpage, but inside Mail it's a kind of a mess. picture: http://bit.ly/issue-stationery-thank-you thank you very much for