on 01-04-2011 4:08 AM
Hi SAP Experts,
I am new to webdynpro.......................plz help me how to get values or data into drop down by key with help of coding............
Thanks a lot in advance...................................
you need to create one UI element dropdownby key and bind its seledted key property to one attribute inside the node.
then you need to fill the valueset for the attribute in the wddoinit.
DATA lo_nd_dealer TYPE REF TO if_wd_context_node.
lo_nd_dealer = wd_context->get_child_node( name = wd_this->wdctx_dealer ).
Data : lt_valueset type table of wdr_context_attr_value,
ls_valueset type wdr_context_attr_value,
lr_node_info type ref to if_wd_context_node_info,
wa_dealr type zdealer.
lr_node_info = lo_nd_dealer->get_node_info( ).
Do 5 times.
ls_valueset-value = sy-index.
ls_valueset-text = sy-index.
append ls_valueset to lt_valueset.
enddo.
lr_node_info->set_attribute_value_set(
name = 'NAME'
value_set = lt_valueset ).
this will fill the value set of the attribute with number 1 to 5.
you can fill acording to the requirement like reading it from internal table and tehn fiiling it etc.
let me know if you need more help.
Thanks
Sarbjeet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Context
|_Book(1..1)
|__bookname
Insert a dropdownbykey UI element in view and bind the selected key
property to bookname attribute.
In WDDoInit method write the below code to populate the dropdown
Data: lo_nd_book type ref to if_wd_context_node,
lr_node_info type ref to if_wd_context_node_info,
ls_valueset type wdr_context_attr_value,
lt_valueset type table of wdr_context_attr_value.
lo_nd_book = wd_context->get_child_node( name = 'BOOK' ).
lr_node_info = lo_nd_book->get_node_info( ).
ls_valueset-value = 'WDABAP'.
ls_valueset-text = 'Net310'.
append ls_valueset into lt_valueset.
call method lr_node_info->set_attribute_value_set
Exporting
Name = 'BOOKNAME'
value_set = lt_valueset.
Regards,
Bala Baskaran.S
Edited by: Bala Baskaran on Jan 4, 2011 12:18 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi alagappan,
Please have look on the below link:-
[ Drop down|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c03227f9-e48f-2c10-4bad-8ebdec704f3d?quicklink=index&overridelayout=true]
Thanks & Regards,
Monishankar Chatterjee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
just search SDN or google
Thanks
Bala Duvvuri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.