cancel
Showing results for 
Search instead for 
Did you mean: 

Creation of value set table for Dropdownbox in Webdynpro-abap

YogSSohanee
Participant
0 Kudos

hello,

I want to know about the creation of Value set table for Dropdownbox by key.

Please provide your inputs on the same.

Thanks,

Yogesh

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Refer this code :

DATA : node_info TYPE REF TO if_wd_context_node_info,
         value1 TYPE wdy_key_value,
         set TYPE wdy_key_value_table,
         k1 type string value 'M',
         v1 type string value 'MAGO',
         k2 type string value 'S',
         v2 type string value 'Saurav'.
*
  value1-key = k1.
  value1-value = v1.
  APPEND value1 to set.


  value1-key = k2.
  value1-value = v2.
   APPEND value1 to set.

node_info = wd_context->get_node_info( ).
node_info = node_info->get_child_node('FOR_DROP').
node_info->set_attribute_value_set( name = 'DROP_KEY'   value_set = set ).

Here FOR_DROP is my context node and DROP_KEY is context attribute under the node which is binded to Drop down by key.

Former Member
0 Kudos

HI ,

Define the context for example CARRID. bind this to UI element, while creating the container form slect the property as dropdown.

IN the wddoint method

Declare the variable forexmple data:lt_value_set TYPE TABLE OF wdr_context_attr_value.

fill the lt_value_set with carrid values and set the attributes using the following method

CALL METHOD node_info_xxxxx->SET_ATTRIBUTE_VALUE_SET

EXPORTING

NAME = 'CARRID'

VALUE_SET = lt_value_set

Former Member
0 Kudos

Hi,

Check the followin pdf file

http://www.sap-press.de/download/dateien/1079/sappress_web_dynpro_for_abap.pdf

Here in page 117 you would find help related to DD By Key and creation of key value table.

Regards

Manas Dua