cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdown getting deleted , when called in popup

Former Member
0 Kudos

Hi All,

When i press a button on my main view i call a popup view.

In the popup view i need to add dropdowns on "Add dropdown Button"

When i press the button once the dropdown is created.

When i press the button for second time the second dropdown doesnt gets created.

In debugging i can just see that the navigation goes to onaction of the add button and then modify view.

and then nothing happens.

Can some one please help me with this?

Edited by: Bhanu Malik on Mar 21, 2011 4:02 AM

Edited by: Bhanu Malik on Mar 21, 2011 5:55 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI ,

COuld you please post the code of the event handler of the button?

Thanks,

Aditya.

Former Member
0 Kudos

On Add dropdown

lo_nd_cn_rulehead_edit2->bind_table( new_items = lt_cn_rulehead_edit2 set_initial_elements = abap_true ).

cl_wd_dropdown_by_idx=>new_dropdown_by_idx(

EXPORTING

bind_texts = 'CN_RULEHEAD_EDIT2.CA_RULEHEAD_EDIT2'

id = 'EDIT_DROP2'

RECEIVING

control = lr_input1 ).

when i press the button again (this dropdown doesnt gets created)

cl_wd_dropdown_by_idx=>new_dropdown_by_idx(

EXPORTING

bind_texts = 'CN_RULEHEAD_EDIT3.CA_RULEHEAD_EDIT3'

id = 'EDIT_DROP3'

RECEIVING

control = lr_input2 ).

lr_matrix = cl_wd_matrix_head_data=>new_matrix_head_data( lr_input2 ).

  • lr_input2->set_layout_data( lr_matrix ).

wd_comp_controller->lr_container->add_child(

the_child = lr_input2

I think there is some other problem of modify view because when first dropdown is created it works fine

and when second dropdown is created it gives problem

Former Member
0 Kudos

Hi Bhanu,

Try by setting set_initial_elements = abap_false.

Cheers,

Kris.

Former Member
0 Kudos

hi,

i think the problem is you bind the table with new data. You are not adding new dropdown element.

lo_nd_cn_rulehead_edit2->bind_table( new_items = lt_cn_rulehead_edit2 set_initial_elements = abap_true ).

when you make set_initial_elements = abap_false then it will not delete the existing elements from the node.