cancel
Showing results for 
Search instead for 
Did you mean: 

dropdown by key problem

Former Member
0 Kudos

Hi

I am using drop down by key UI element in my WD4A application . When I run it a <b>short dump</b> occur stating that "<b>The lead selection has not been set</b>".

I have created a contect in ComponentController and written following code in INIT method of component controller.

The node name is TEST and it has a attribute "Value", which is binded with UI element. The lead selection property od context node is checked.

DATA:

node_test TYPE REF TO if_wd_context_node,

ls_node TYPE REF TO if_wd_context_node_info,

ls_value TYPE wdr_context_attr_value,

lt_value TYPE TABLE OF wdr_context_attr_value.

  • navigate from <CONTEXT> to <TEST> via lead selection

node_test = wd_context->get_child_node( 'TEST' ).

ls_node = node_test->get_node_info( ).

ls_value-value = '1'.

ls_value-text = 'Testig'.

INSERT ls_value inTO TABLE lt_value.

CALL METHOD ls_node->set_attribute_value_set

EXPORTING

name = 'VALUE'

value_set = lt_value.

Regards

Vishal kapoor

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vishal,

Change your TEST node properties like below.

Cardinality : 1 to 1

Selection : 0 to 1

Initialization Lead Selection : X

Singleton : X

I hope it will help you.

Thanks & Regards,

Anil

Answers (1)

Answers (1)

Former Member
0 Kudos

Try this:

ls_node = wd_context->get_node_info( ).

ls_node = node_test->get_child_node( 'TEST' ).

instead of:

node_test = wd_context->get_child_node( 'TEST' ).

ls_node = node_test->get_node_info( ).

Also, you may remove the node_test declaration since you won't need it.