on 12-13-2007 5:21 PM
Can I show an icon and a textview in the same cell in an ALV?
(in other words: can there be two cell editors for a ALV column?).
What about an editable input field and an icon in the same cell?
Hi Daniel,
Unfortunately SAP has only foreseen one celleditor per cell.
So you will need two cells, one for the icon and one for the textview or inputfield.
If this would have been possible, i think the method to set the cell editor would have had the option to provide more than one cell editor.
Regards,
Jos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the CL_SALV_WD_UIE_CAPTION cell editor, which allows you to show an icon and a text in one cell.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mayank,
Its easy. Once you obtain the reference of your desired column create an instance of the & then set it to the cell editor. Check the code fragment below:
data: lr_caption TYPE REF TO cl_salv_wd_uie_caption.
LOOP AT lt_columns ASSIGNING <fs_column>.
CASE <fs_column>-id.
WHEN 'CHECK'.
CREATE OBJECT lr_caption.
lr_caption->set_image_source( value = '~Pictogram/3People' ).
lr_caption->SET_TEXT( value = 'My Text!' ).
<fs_column>-r_column->set_cell_editor( lr_caption ).
ENDCASE.
ENDLOOP.
In the snippet above am changing the cell editors of column by name CHECK to contain a pictogram by name "People" & a static text "My Text". So now all my cells under the CHECK column would contain both the pictogram & the text.
Regards,
Uday
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.