on 04-22-2016 10:06 AM
Hello,
how can I change the Text in Dropdown List Box . I want programming this abap in a view method.
Thanks
Kerim
Hi Kerim,
So you want to put values in your dropdown list ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kerim,
To change or populate text in DropDownByKey in view,follow the below steps:
In Layout of the view,for Dropdownbykey UI, bind 'selectedKey' property to the View Context field.
Type of the field 'REASON' in View Context is char 20.
In your view, write the following code:
Data: lt_reason type standard table of CHAR20, (You can give whatever length you want to.)
lv_reason type char20.
lv_reason = 'Departure from First Workplace' .
append lv_reason to lt_reason.
lv_reason = 'Departure from Home' .
append lv_reason to lt_reason.
lv_reason = 'Departure from Workplace' .
append lv_reason to lt_reason.
Now you have all the needed text in lt_reason.
By using Web dynpro code wizard,get the context node and context element and bind the internal to the DropdownbyKey UI.
Use method 'SET_ATTRIBUTE_VALUE_SET'.
lo_node_info->set_attribute_value_set( name = 'REASON' value_set = lt_reason ). "here REASON is the Context field name"
Thanks,
Faraz Khan
Hi Kareem,
It looks to me like you already have other values populate. I suggest that you and check in the INIT method of your view, they might be populated there. Alternatively check on the on
Select event of your dropdown list. Adding the value, you should just do it as the others were done.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.