Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Strange ALV behaviour with dropdowns

Former Member
0 Kudos

Hello,

I've got an ALV grid control (cl_gui_alv_grid) that displays dropdowns (not F4 but a dropdown set via the set_drop_down_table method) in one column.

It works fine in many cases but now I noticed the following:

first I pass a table filled with 3 values as parameter for the set_drop_down_table method

then some time later I pass an <i>initial</i> table as parameter for the set_drop_down_table method

I would have expected the dropdown menu to show no values but somehow the 3 values from before are still selectable.

Any suggestions on how to 'clear' the dropdown table of the ALV ?

Best regards,

Patrick Baer

7 REPLIES 7

athavanraja
Active Contributor
0 Kudos

i havent tried it myself, but can you try refreshing after clearing the drop down table.

grid->REFRESH_TABLE_DISPLAY .

Regards

Raja

0 Kudos

Raja,

I am doing a refresh everytime the dropdown table changes. This does not work.

Also flushing (cl_gui_cfw=>flush( ) ) does not work.

If I set a table with 3 entries as dropdown and afterwards a table with - let's say 1 entry - then it works and only the one entry is displayed.

So an intial - or zero entry table - seems to be the only non-working case.

Regards,

Patrick

SandeepJha
Product and Topic Expert
Product and Topic Expert
0 Kudos

Rather than passing the initial table, try passing the table with once record (handle = 'specified by you' ; value = initial)

0 Kudos

Hi Patrick

You can clear the field content (at the field catalog) holding dropdown list handle.

Or do you re-register the table after (using the method "set_drop_down_table") deleting its content?

Regards

*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

0 Kudos

Sandeep,

I will try out your suggestion tomorrow.

Maybe it works.

Regards and thanks,

Patrick Baer

0 Kudos

Serdar,

first of all thanks for your reply.

> Or do you re-register the table after (using the

> method "set_drop_down_table") deleting its content?

Yes that is correct, I am calling "set_drop_down_table" method again passing an initial table. The field catalog is unchanged (and buffered by the way). If possible I would like to keep the field catalog untouched.

Regards,

Patrick

Former Member
0 Kudos

Hello.

Have anyone found solution to this problem?

I just exprienced it myself.

And i can't pass a table with 1 empty record, cause I shouldn't let user to chose an empty entry.

Is there any another way?