Application Development and Automation 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: 
Read only

Pushbutton Icon in Table Control

Former Member
0 Likes
839

Hi Guys,

I have a table control that contains a push button in each row. How can I place and remove an icon for a specific row?

Thanks.

1 REPLY 1
Read only

SimoneMilesi
Active Contributor
0 Likes
409

Try something like this


* In your dynpro, after PBO
 LOOP AT t_output WITH CONTROL itab_ctrl
                              CURSOR  itab_ctrl-current_line.

    MODULE screen.
  ENDLOOP.
.....
.....
.....
MODULE screen OUTPUT.

  base = itab_ctrl-current_line.
loop at screen.
icon_name = 'ICON_RED_LIGHT'. "This is an example: use your icon
 CALL FUNCTION 'ICON_CREATE'
      EXPORTING
        name                  = icon_name
        add_stdinf            = ' '
      IMPORTING
        RESULT                = t_output-icon "This is the field you use as pushbutton
      EXCEPTIONS
        icon_not_found        = 1
        outputfield_too_short = 2
        OTHERS                = 3.
modify screen.
endloop.
ENDMODULE.

Edited by: Simone Milesi on May 4, 2010 2:40 PM