cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdown by key and dropdown by index

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member199125
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Kumar,

This has been discussed many times, please do search before posting...

Cheers,

Kris.