cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BSP: Problem displaying icon using ITERATOR

clayton_barbosa
Participant
0 Likes
583

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_ICONid figure_ctrl ).
              p_replacement_bee CL_HTMLB_IMAGE=>FACTORYid p_cell_id src icon_ctrl ).

BSP (Layout and MIMEs) 

(Print 1)

Icons: 

clayton_barbosa_3-1735913130040.png Feliz.png     clayton_barbosa_4-1735913169630.png Triste.png 

Screen. It does not show the correct icon.

(Print 2)

 

 

 

View Entire Topic
clayton_barbosa
Participant
0 Likes

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_ICONid figure_ctrl ).
              p_replacement_bee CL_HTMLB_IMAGE=>FACTORYsrc figure_ctrl width '20' height '20' ).
*              p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY( id = p_cell_id src = icon_ctrl ).

New Screen :

clayton_barbosa_0-1736005345573.png