on 06-02-2011 8:02 AM
Hi experts ,
Difference between Dropdown by key and dropdown by index ?
I think feteching values from " Dropdown by key" is through values and in case of index fetching through index of the value in it? i am doubt in this.
Thanks
Aisurya.
hi surya,
in simple DDBK is used to fetch static values, DDBI used to fectch dynamic values.
For displaying static values in DDBK there are two techniques
1) by directly binding with dataelement
2) with hardcoding
1)Bind an attribute to SELECTED KEY property of DDBK . And attribute should be type of DATA ELEMENT.
That Dataelement should contain fixed values in corresponding domain, then automatically all those fixed values wil be displayed in DDBK
2) with hardcoding
creat a node and an attribute with string data type and assign that attribute to selected key property of DDBK / RGBK / inputfield
goto wddoinit() and implement code like below
data: lt_valueset type wdr_context_attr_value_list,
ls_value type wdr_context_attr_value.
data:
node_info type ref to if_wd_context_node_info.
node_info = wd_context->get_node_info( ).
node_info = node_info->get_child_node( ' DDBK Node' ). '' this should be in capital letters
ls_value_value = 'value1''
ls_value_text = 'text1'.
insert ks_value into table lt_valueset.
ls_value_value = 'value2''
ls_value_text = 'text2'.
insert ks_value into table lt_valueset.
like above you can pass as many values as you want
node_info->set_attribute_value_set( name = 'DDBK ATTRIBUTE NAME''
value_set = lt_valueset ).
Hope above code will be useful.
Regards
Srinivas
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.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.