How to select drop down based on country selected in one field

Dear Experts,
I am facing a problem,
I have a table in webdynpro, where there are two columns namely Country and its Subtype.
here both the fields are drop down by key type.
when i am selecting Country field from drop down. I am getting its subtype correctly populated in other column.
But when i am selecting the country in next row, It is removing the subtype text of 1st row and giving its code.
Also Now In Column Subtype, It is Showing the dropdown related to the current selected country.
Kindly help.
Regards
Sushil

Hi Sushil,
I guess the value for subtype is depending on the country value, which is fetch from the static value( Usually lead selected value). To avoid this we can either set the current row as lead selected row before populating subtype value or with the following code which will give the element value for the row which is selected rather than the lead selected row and then pass the value for fetching country type.
data: lr_element type ref to if_wd_context_element.
lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ). " Wdevent is the paramter in the                                                                                                              "event handler
Regards,
Harsha

Similar Messages

  • How to get value in Second Drop Down based on selection made in first dropd

    Hi All,
    I have a table with first two columns as dropdown.
    The values in first drop down are fixed. However the value in second dropdown should be populated based on selection made in first .
    e.g
    First Column had different departments say IT, SALES, HR.
    Based on department selected I have to populate employee of that department.
    For first dropdown I have taken Drop down by index.
    What should I select for second drop down and achieve desired functionality? Please guide.
    Regards,
    Madhvika

    Hi
    Use drop down by key for fixed values IT, SALES, HR. create on_select action for that drop down.
    in on_select method code like this..
      DATA lo_nd_segment1 TYPE REF TO if_wd_context_node.
      DATA lo_el_segment1 TYPE REF TO if_wd_context_element.
      DATA ls_segment1 TYPE wd_this->Element_segment1.
      data lt_segment1 type wd_this->elements_segment1.
      DATA lv_segment TYPE wd_this->Element_segment1-segment.
      data lr_column type ref to cl_wd_table_column.
    navigate from <CONTEXT> to <SEGMENT1> via lead selection
      lo_nd_segment1 = wd_context->get_child_node( name = wd_this->wdctx_segment1 ).
    get element via lead selection
      lo_el_segment1 = lo_nd_segment1->get_element( ).
      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 contains your first drop down selection value.
      DATA : lv_dropdown type string .
      lv_dropdown =  ls_segment1-segment.
      if lv_dropdown = 'IT'.
    // here fill your second drop down based on IT value.
    endif.
    Hope it solves.
    Cheers,
    Kris.

  • How to create Drop down menu in the selection screen

    Hi all,
    How to create Drop down menu in the selection screen.
    Fast answer will be highly rewarded
    Regards
    Bikas

    hi ,
    TYPE-POOLS : vrm.
    TABLES:vbak,vbap.
    DATA : v(80) TYPE c.
    DATA: wa_vbak TYPE vbak,
          it_vbak TYPE vbak OCCURS 0 WITH HEADER LINE,
          wa_vbap TYPE vbap,
          it_vbap TYPE vbap OCCURS 0 WITH HEADER LINE.
      DATA: l_name TYPE vrm_id,
            li_list TYPE vrm_values ,
            v_count  TYPE i,
            l_value LIKE LINE OF li_list.
    PARAMETERS: p_test(20) AS LISTBOX VISIBLE LENGTH 60 MODIF ID DAT.
    INITIALIZATION.
    AT SELECTION-SCREEN OUTPUT.
      PERFORM get_data.
      LOOP AT it_vbak.
        l_value-key =  it_vbak-vbeln .
        l_value-text = it_vbak-vbeln .
        APPEND l_value TO li_list.
      ENDLOOP.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = 'P_TEST'
          values          = li_list
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
    AT SELECTION-SCREEN ON P_TEST.
      clear : li_list , li_list[].
      SELECT vbeln
             matnr
             meins
             FROM vbap
             INTO CORRESPONDING FIELDS OF TABLE it_vbap
             WHERE vbeln = p_test.
    START-OF-SELECTION.
      SELECT vbeln
             matnr
             meins
             FROM vbap
             INTO CORRESPONDING FIELDS OF TABLE it_vbap
             WHERE vbeln = p_test.
      LOOP AT it_vbap.
        WRITE :/ it_vbap-vbeln, it_vbap-matnr,it_vbap-meins.
      ENDLOOP.
    *&      Form  get_Data
          text
    -->  p1        text
    <--  p2        text
    FORM get_data .
      SELECT  vbeln
              FROM vbak
              INTO  CORRESPONDING FIELDS OF TABLE it_vbak.
    ENDFORM.                    " get_Data
    regards,
    venkat.

  • How to populate Second drop down based on the first drop down value

    Hi Experts,
    i have a HTML BSP page. with 2 drop down with SELECT and OPTION tags. i need to populate the second drop down based on the first drop down value.
    i tried HTMLB script they work good as stand alone when i try to embed the HTMLB with HTML it does not work.
    Please can you give me a solution only with ABAP script and HTML.
    please clearly let me know on what event i should implement it. sample code is really appreciated .
    With regards,
    Chella

    You can have event handler for first drop down . Then populate the data for 2nd field when the event triggers on first field.

  • How to put drop down in table control ?

    Hi All,
    I m writing one module pool program to edit table.
    I want dropdown to one field so that user can select the appropriate value. And also I want to save that record.
    So how to get the dropdown list and after editing that record how to save that in the database?
    Thanx in advance.
    -Umesh

    Hi Umesh,
    Please check this demo program RSDEMO_TABLE_CONTROL on how to add drop down list in table control. Also check this program DEMO_DYNPRO_TABCONT_LOOP_AT as well.
    To save to database you can code something like this in PAI.
    MODULE USER_COMMAND_0100 INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      CASE SAVE_OK.
        WHEN 'SAVE'.
          MODIFY <database table> FROM TABLE <table control>.
          IF SY-SUBRC = 0.
          ELSE.
          ENDIF.
        WHEN OTHERS.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Hope this will help.
    Regards,
    Ferry Lianto

  • How to configure drop-down that change dynamically in Call Scripts

    Hi,
    Would like to know as how to configure drop-down choices that change dynamically based on customer response in Call Scripts / Assessment Scripts of type "Service Request - Survey".
    I've read the following from CRM OnDemand pdf but was not able to figure out how to do that.
    Call Scripting:
    • Reduces agent training time
    • Provides drop-down choices that change dynamically based on customer response
    • Supports personalized interactions based on existing record data
    • Facilitates up-selling and cross-selling
    • Does not require third-party software
    I don't have a concrete requirement as of now, but was trying to check as how it works. Please guide me if any one has implemented the same.
    Thanks in Advance,
    Cheers!!!
    Deepak Veeravalli.

    Arun,
    If you plan to implement the "Querying the Active Directory" based on my code snippet,
    and if you do not have permission [your account must be the part of domain admin] to do so,
    Then still you can do it in least effort through code,
    string usersInXml = SPContext.Current.Web.AllUsers.Xml;your xml string look like this.
    <Users><User ID="2" Sid="" Name="Administrator"
    LoginName="i:0#.w|murugesan\administrator" Email="" Notes="" IsSiteAdmin="True" IsDomainGroup="False" Flags="0" /><User ID="1" Sid="" Name="Murugesa Pandian" LoginName="i:0#.w|murugesan\murugesan" Email="" Notes="" IsSiteAdmin="True" IsDomainGroup="False" Flags="0" /><User ID="1073741823" Sid="S-1-0-0" Name="System Account" LoginName="SHAREPOINT\system" Email="" Notes="" IsSiteAdmin="False" IsDomainGroup="False" Flags="0" /></Users>
    You can user Linq to XML to filter the "LoginName,Name and Email and then populate your drop down list.
    * User must be logged into the site at least once.
    Murugesa Pandian.,MCTS|App.Devleopment|Configure

  • Want to hide the drop down based on text field value

    Hi,
    I want to hide some of the values in drop down based on one text field value.
    I have the field called name which has the value A, B, C, D and also one drop down list which has the values 1,2,3,4,5,6. I want to hide the some of the values in drop down based on A or B or C. Let say, If it is A, drop down value should be 1,3,5. If it is B, Drop down value should be 1,2,3,4. Like this for every record.
    Can you please help me out.
    Thanks
    Ram

    Hi Robert,
    I am trying it in two different way. Please suggest which is the right one and feasible.
    1) I have the drop down list which has all the status. I am trying to hide the drop down values based on one text field value for all records.
    2) I have collected all the drop down values into table in webdynpro method. Rightnow I have two tables.
      one has line items details and another one have drop down values. both tables having common fields.
      I have to show second table values for that particular key, move all of them to drop down.
    Which is the best and feasible option.
    Thanks
    Ram

  • How to create drop down option in service manager 2012 incident portal

    Hii,,
    Please assist how to create drop down option in service manager 2012 SP1 default incident portal. We would like to provide the drop down option in "Please enter the title for the Issue" to our users.
    Regards, Syed Fahad Ali

    As was already referenced, you could use a Simple List for the prompt, however if you are referring to the default General Incident that is available out-of-the-box, you might be limited in what you can modify. 
    I did some work for a client, that wanted to have a list and other options for the General Incident through the Portal. So, I ended up having to create a custom General Incident instead of using the default one, which will then allow you to add any type
    of prompts, and configure them as you want (i.e. with a simple list). 

  • How to add drop down in SAP screen module pool

    Hi,
    Can you please advise me on how to add drop down in SAP module pool screen (a drop down with fixed set of values).
    Thanks
    Mohit

    Hi,
    Hope it helpful.
    Refer the Program : rsdemo_dropdown_listbox
    Regards,
    Venkat.

  • How to stop drop down when trying to open file?

    how to stop drop down when trying to open file?

    Offer more details and you ay get an answer.
    What files/type, applications, what exacttly you are doing?

  • How to make drop down menu

    Hi,
    Iam just wondering if somebody can tell me how to make drop down menus....or direct me to a URL so that i can get some sample code for how to make drop down menus like this:
    + drop down
    abc
    + first
    + second
    - third
       third-des
       third-des2
    i would really appreciate it.
    thanks all.
    -sangita

    Hi,
    something is working .....thanks.
    I have created a java class file as shown below and i did able to run it.........:)
    here is my code:
    package AppMirror;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class MenuLookDemo {
        public JMenuBar createMenuBar() {
            JMenuBar menuBar;
            JMenu menu;
            JMenuItem menuItem;
            //Create the menu bar.
            menuBar = new JMenuBar();
            //Build the first menu.
            menu = new JMenu("Menu Label");
            menuBar.add(menu);
            //a group of JMenuItems
            menuItem = new JMenuItem("Item Label");
            //menuItem.addActionListener(actionListener);
            menu.add(menuItem);
            return menuBar;
        public static void main(String[] args) {
            //Create and set up the window.
            JFrame frame = new JFrame("MenuLookDemo");
            //Create/set menu bar and content pane.
            MenuLookDemo demo = new MenuLookDemo();
            frame.setJMenuBar(demo.createMenuBar());
            //Display the window.
            frame.setSize(450, 260);
            frame.setVisible(true);
    but when i see the applet, it doesn't look the one i wanted to see......
    this shows the top menu bar ....but not the + drop-down.
    any ideas ???
    sorry, i don't know anything about swings, applets.....

  • How To Create Drop Down Menu With Tab

    hi
    How To create Drop Down Menu with tab in Header of application like website Horizontal Dropdown Menu In html.
    Thanks
    Manoj
    Edited by: Manoj Kaushik on Dec 30, 2009 4:16 AM

    Try the Apex forum {forum:id=137} someone there may have an answer.
    Which version, that could be important, XE out-of-the-box has apex 2.1 if it hasn't been upgraded to 3.x

  • How to disable drop down of Report Server

    Hi,
    i had install Report server 2012 and want to move form 2008 to 2012 .
    1) how to disable drop down that show on folder and report level for end user (as shown in following screen shot).
    2) report name coming on report server are not full name how to show full name of report like we have in 2008. Following is screen shot

    Hi Mujahid,
    1.) For migrating from Sql server 2008 to 2012, please follow this links
    Migrating the whole Instance from 2008 to 2012 - > http://msdn.microsoft.com/en-us/library/ms143747.aspx
    Migrating the rdl defination to 2008 to 2012 - > http://msdn.microsoft.com/en-us/library/a1a10c67-7462-4562-9b07-a8822188a161
    2.) We can't disable the drop down box for the reporting services per user basic(end user), If you really want to do it, you
    need to edit the ReportingServices.js file (This will effect all the user including admins) located at C:\Program Files\Microsoft SQL Server\<<SSRS Instance>>\Reporting Services\ReportManager\js\ReportingServices.js
    If you want the end user not to perform certain action, you set appropriated permission for the report.
    Managing Permissions and Security for Reporting Services
    http://technet.microsoft.com/en-us/library/ms156014.aspx
    3.)  When report name is too long it truncated and dot dot are shown in the end. User always have a option to move from Title View to Details View
         You need click on the right side of the report manager preview and click on the detail view to change between detail view and title view
    Regards Harsh

  • Adobe Form... Is there a way to use a drop down menu to highlight or note other fields...

    I am working on a simple Adobe form.  I am currently trying to figure out if there is a way to use the answers of a drop down menu to either mark, note or highlight 14 other fields.  There are 9 possibilities in the drop down menu, include a blank and NONE.
    For example if the drop down menu is set to 1, then field 9, 10 and 14 are marked, noted or highlighted. 
    Is this possible with a script?
    Thank you in advance for any help! 

    Have you looked at the properties that are available to form fields. I would look at setting the fill color or border color for a form field. Either of these can be done with Acrobat JavaScript.

  • Cond display of drop down based on value selected in another drop down form

    Hi,
    I have a requirement in my app in which I need to be able to conditionally display the values in the drop down down list based on the values selected in another drop down list...
    Currently I have 2 drop downs.
    First drop down is a list of Jacks from 2000 to 4999...
    Second Drop down consists Chassis ranging from 1 to 900..
    So when a user selects any jack between 2000 - 2999, in the second drop down only Chassis ranging from 1 to 300 should appear.
    when anything between 3000 - 3999 is selected, Chassis ranging from 301 to 600 should appear..
    and for jacks between 4000 - 4999, Chassis ranging from 601 to 900 should appear in the second drop down.
    Can someone please provide me pointers on how to do this..
    Thanks,
    Nehal

    Hi Larry,
    Thanks for your response..
    Here are the queries for my select lists.
    P62_JACK
    select list query for Jacks:
    select JACK_NUM display_value, JACK_NUM return_value
    from CTS_LIST_OF_JACKS
    order by 1
    P62_CHASSIS_BLADE_PORT
    select NETWORKPORT display_value, NETWORKPORT return_value
    from CTS_LIST_OF_NETWORKPORTS
    order by NETWORKPORT_ID
    jacks range from 2000 to 4000
    chassis_blade_port ranges from 100 to 900...
    Can you please let me know how to do it..
    Thanks,
    Nehal

Maybe you are looking for