Skip to Content
0
Former Member
Mar 30, 2011 at 01:41 PM

[Resolved] Get element from DropDownByIndex when onSelect event trigger

14 Views

Hi,

Im having issues to retrieve the right index of the selected item in the DropDownBoxByIndex when onSelect event is trigger.

Without the event this code works well to retrieve the index ...

DATA : v_Element TYPE REF TO if_wd_context_element,

lo_contracttype TYPE REF TO if_wd_context_node,

lo_visibility TYPE REF TO if_wd_context_node,

v_Index TYPE I,

lv_contracttype TYPE ZCUSTCONTRACTTYPE,

itemList TYPE STANDARD TABLE OF IF_CUSTCREATEVIEW=>ELEMENT_contracttype,

w_list LIKE LINE OF itemList.

"retrieve contract type

lo_contracttype = wd_Context->get_Child_Node( wd_this->wdctx_contracttype ).

lo_contracttype->GET_STATIC_ATTRIBUTES_TABLE( IMPORTING TABLE = itemList ).

v_Index = lo_contracttype->GET_LEAD_SELECTION_INDEX( ).

CLEAR w_list.

READ TABLE itemList INTO w_list INDEX v_Index.

lv_contracttype = w_list-contracttype.

lv_contracttype always contain the default selected value at each onSelect...

I have a dropdownbyindex with only 2 values.

Thanks for your help !

Found ...

Edited by: Benjamin Art on Mar 30, 2011 4:08 PM