‎2010 May 04 10:42 AM
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.
‎2010 May 04 1:40 PM
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