Skip to Content
author's profile photo Former Member
Former Member

ALV OM checkbox_hotspot in container not an actual checkbox?

Good day!

I have a question I hope the community can help me to get an answer....

I have a report that uses ALV OM to display a alv inside a container (classic dynpro).

The requirement is to conditionally display a checkbox in a cell depending on some rules for every row.

For this I'm using the method

lr_columns->set_cell_type_column( value = 'IT_CELL_TYPES' ).

of the cl_salv_columns_table to set a control table IT_CELL_TYPES to specify how to display the checkbox. The column that will display a checbox (or not) is called "IS_SELECTED". And I'm using a checkbox_hotspot so I can handle user interaction.

ls_cell_types-columnname = 'IS_SELECTED'.

ls_cell_types-value = if_salv_c_cell_type=>checkbox_hotspot.

APPEND ls_cell_types TO <ls_row>-it_cell_types.

So far, the code is working with one big weird exception:

If I use if_salv_c_cell_type=>checkbox_hotspot the checkboxes inside the cell do not look like a checkbox, instead they look like a simple hotspot. In the following screenshot you can see that the column "S" (IS_SELECTED) is used to show the checkboxes for some rows.

Here it is the strange part... if I change the cell type to if_salv_c_cell_type=>checkbox, which it is a diabled checkbox, they actually show like it is supposed to be:

Am I doing something wrong? Is this a limitation of the ALV OM or is it a bug?

Thanks for your help in advanced!

- Mario

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on May 26, 2016 at 12:21 PM

    old question but I've posted the exact solution in that thread: http://scn.sap.com/thread/3910179

    Add a comment
    10|10000 characters needed characters exceeded

    • Sorry to have posted on this old thread, I should not have done it (and especially without giving details). Well I just did the test, it's okay with a container too. Your issue happens exactly when the cell has value 'X' and the column was not set by "lo_column->set_cell_type( if_salv_c_cell_type=>checkbox )" (I could test it by adapting the code I had posted in the thread I mentioned).

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.