on 09-09-2014 1:36 PM
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 had a similar requirement in my previous project and as stated by Rama, we need to use dropdownbyIndex to implement the second dropdown.
In dropdown by index,we can use context to dynamically load the data depending on your first dropdown list selection.
Regards,
Tashi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sushil,
You need to go for DropDownByIndex for column "Subtype", to hold different set of values based on the value of country value per row.
DropDownByKey ui element holds only one set of value at any given point of time per attribute in whole context. So you cannot use it in your case.
Please refer the below document which suits your requirement.
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sushil,
I've seen this happen when the key value you set for a dropdown is not actually defined as part of its value set, so the framework isn't able to select a corresponding text for the key. When you set value ABC as the selected Subtype, make sure that key is defined in its value set.
Can you share with us your code for the Country column's onSelect event?
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.