on 07-09-2008 5:48 AM
Hi experts,
Can anyone give me the step by step procedure to create dropdown list box?
I hav to create a dropdown box, it ll display some details in a table while selecting an element from that list.
Regards
Raaam's...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you checked out the online help links on the subject:
DropDownByIndex:
http://help.sap.com/saphelp_nw70/helpdata/EN/dd/b0884118aa1709e10000000a155106/frameset.htm
DropDownByKey:
http://help.sap.com/saphelp_nw70/helpdata/EN/c5/e4884180951809e10000000a155106/frameset.htm
DataBinding for the DDLB in general:
http://help.sap.com/saphelp_nw70/helpdata/EN/bb/69b441b0133531e10000000a155106/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you are talking about Combo Box, where you can see all the options available not like dropdown.
you don't have such control in Web Dynpro ABAP, you have to make use of Drop Down by Index or Drop down by Key if you want select a single option, see satandard component WDR_TEST_EVENTS to know how to use these UI elements
OR
you have to use Table control with single column ( selection mode : Multiple )
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Take a look at this code... assuming you have got an context node called DD and one attribute caled DDLIST in it.
DATA:
lo_nd_dd TYPE REF TO if_wd_context_node,
lo_ndinfo_dd TYPE REF TO if_wd_context_node_info,
ls_value_set TYPE wdr_context_attr_value,
int_value_set TYPE wdr_context_attr_value_list.
ls_value_set-value = 'A'.
ls_value_set-text = 'Text for A'.
APPEND ls_value_set TO int_value_set.
CLEAR ls_value_set.
ls_value_set-value = 'B'.
ls_value_set-text = 'Text for B'.
APPEND ls_value_set TO int_value_set.
CLEAR ls_value_set.
lo_nd_dd = wd_context->get_child_node( name = wd_this->wdctx_dd ).
lo_ndinfo_dd = lo_nd_dd->get_node_info( ).
lo_ndinfo_dd->set_attribute_value_set(
name = 'DDLIST'
value_set = int_value_set ).
you can write this code in WDDOINIT of the view in which this dropdownlist element is shown.
Hope this will help you.
-Haresh
You have 2 controls DropDownByIndex and DropDownByKey
For DropDownByIndex the properties of the UI control which shows the options is TEXTS
You have to create a Context Node of Cardinality 0..n or 1..n and add a context attribute to the newly created Context Node
Now bind the context attribute to the TEXTS property of the UI element
If you run the DropDown will be empty, because there are no elements in the Context Node
To fill the drop down you have to add elements to the Context Node using
node->bind_elements( ). see the method FILLDROPDOWN1 in the methods tab of WDR_TEST_EVENTS
For DropDownByKey the property is SelectedKey, bind it to a Cotnext Attribute of type any data elment whose domain has some Value Range - see the properties of the selectedKey1 context attribute in WDR_TEST_EVENTS
Abhi
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.