on 2025 Jan 03 2:28 PM
Hi!
I included a column to display icon but I have a problem with the presentation. The icons are not displayed correctly.
Thanks!
The attached shows the logic used.
Class ITERATOR
Method : IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START
WHEN 'CONTROL'.
ASSIGN COMPONENT p_column_key OF STRUCTURE <fs> TO <l_field>.
if <l_field> is assigned .
wf_text = <l_field> .
endif .
if wf_text eq '@0A@'.
figure_ctrl = 'Triste.png'.
elseif wf_text eq '@09@'.
figure_ctrl = 'Media.png'.
elseif wf_text eq '@08@'.
figure_ctrl = 'Feliz.png'.
endif.
icon_ctrl = CL_BSP_MIMES=>SAP_ICON( id = figure_ctrl ).
p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY( id = p_cell_id src = icon_ctrl ).
BSP (Layout and MIMEs)
(Print 1)
Icons:
Feliz.png
Triste.png
Screen. It does not show the correct icon.
(Print 2)
Request clarification before answering.
HI!
I found the solution to the problem.
I changed the code shown above.
WHEN 'CONTROL'.
ASSIGN COMPONENT p_column_key OF STRUCTURE <fs> TO <l_field>.
if <l_field> is assigned .
wf_text = <l_field> .
endif .
if wf_text eq '@0A@'.
figure_ctrl = 'Triste.png'.
elseif wf_text eq '@09@'.
figure_ctrl = 'Media.png'.
elseif wf_text eq '@08@'.
figure_ctrl = 'Feliz.png'.
endif.
icon_ctrl = CL_BSP_MIMES=>SAP_ICON( id = figure_ctrl ).
p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY( src = figure_ctrl width = '20' height = '20' ).
* p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY( id = p_cell_id src = icon_ctrl ).
New Screen :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.