cancel
Showing results for 
Search instead for 
Did you mean: 

Drop down by key

Former Member
0 Kudos

Hi,

i am using drop down by key in my aplication and writeen the following code in wdinit method:

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( 'SCARR_NODE' ).

DATA: element TYPE REF TO if_wd_context_element.

data : context_node type ref to if_wd_context_node.

context_node = wd_context->get_child_node( 'SCARR_NODE' ).

TYPES: BEGIN OF str_roles,

carrname TYPE scarr-carrname,

END OF str_roles.

DATA : itab TYPE TABLE OF str_roles,

wa_itab TYPE str_roles .

DATA : carrname TYPE scarr-carrname.

DATA : value1 TYPE wdy_key_value,

set TYPE wdy_key_value_table.

SELECT carrname FROM scarr INTO TABLE itab.

SORT itab.

  • DESCENDING BY carrname.

LOOP AT itab INTO wa_itab.

value1-key = sy-tabix.

value1-value = wa_itab-carrname.

  • APPEND value1 TO set.

INSERT value1 INTO TABLE set.

  • modify itab from wa_itab..

ENDLOOP.

node_info->set_attribute_value_set( name = 'CARRNAME' value_set = set

).

while running the application i am getting the following error :

The lead selection has not been set. FLIGHTDROPDOWN

Your help is appreciated .

Regards,

Pavani

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

What is the cardinality and selection property set for node : 'SCARR_NODE'

Former Member
0 Kudos

cardinality is 0..n

selection is 0..1

initialization by leadselection is selected by default,

Former Member
0 Kudos

Set node cardinality to 1..1.

Former Member
0 Kudos

thnx , it is working now ..