Skip to Content

Button with Icon in TableControl


in my ModulePool I have a TableControl which contents in each line FileNames with FileExtensions.

I have created a Icon-Field in each line which displays the correct Icon (if it exists) for the FileExtension (e.g. ICON_PDF, ICON_BMP ...).

Then I created a button in each line to open the file.

What I want now is that the button changes its icon.

How can I achieve this?

In my PBO for this Dynpro I have the following code but this doesn't work:

LOOP AT gt_zdrud INTO gr_zdrud.
* FuBa zur Ermittlung der Dateierweiterung
      iv_filename_with_ext = gr_zdrud-zzdoc
      ev_filename          = lf_filename
      ev_extension         = lf_extension.

  CASE lf_extension.
    WHEN 'PDF'. MOVE icon_pdf TO gr_zdrud-icon.
      MOVE icon_display TO gr_zdrud-icon.

  MODIFY gt_zdrud FROM gr_zdrud.


The table GT_ZDRUD is the table which fills the TableControl.

The field GR_ZDRUD-ICON is the field which holds the name of the icon and is defined in the dynpro as PUSH(button).

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Dec 04, 2007 at 09:24 AM

    No solution.

    Closing this.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.