Skip to Content
author's profile photo Former Member
Former Member

Table control in custom infotypes

Hi,

I have a requirement to add table control in a custom defined infotype. The fields include two date fields, one icon field, number and name fields. I also need to populate my icon field with three different icons according to the modification in the records of the table control fields.

Please suggest regarding adding icons as a field of the table control and any suggestions about this are welcome.

Thanks in advance,

Saipriya

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Jan 25, 2008 at 08:52 AM

    Hi,

    Use FM 'ICON_CREATE' to add the icon to your table control field. (Give your table control field in Result parameter). Check the demo program DEMO_DYNPRO_STATUS_ICONS to display icon in the screen field.

    Hope this helps,

    Shrinivas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 03:50 AM

    Hi Saipriya,

    Use FM 'ICON_CREATE' to add the icon to your table control field. (Give your table control field in Result parameter). Check the demo program DEMO_DYNPRO_STATUS_ICONS to display icon in the screen field.

    This may be helpful,

    thanks,

    swaroop

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I tried out as u said but am gettin a run time error. I had created a tablecontrol and a field by the name of icon1. when i call the function module icon_create am getting a runtime error. please help me.

      This is my coding.

      tables: icon.

      DATA : icon_name(20) TYPE c,

      icon_text(10) TYPE c.

      DATA : flag TYPE i.

      DATA : icon1 TYPE icon_text.

      in flow logic,

      PROCESS BEFORE OUTPUT.

      MODULE STATUS_0100.

      LOOP AT WI_TABLE1 WITH CONTROL TABLE1.

      ENDLOOP.

      PROCESS AFTER INPUT.

      MODULE USER_COMMAND_0100.

      LOOP AT WI_TABLE1.

      ENDLOOP.

      module icon_pai.

      module icon_pai input.

      if flag = 1.

      icon_name = 'ICON_GREEN_LIGHT'.

      icon_text = 'green'.

      CALL FUNCTION 'ICON_CREATE'

      EXPORTING

      name = icon_name

      TEXT = icon_text

      INFO = 'Status'

      ADD_STDINF = 'X'

      IMPORTING

      RESULT = icon1

      EXCEPTIONS

      ICON_NOT_FOUND = 1

      OUTPUTFIELD_TOO_SHORT = 2

      OTHERS = 3

      .

      IF sy-subrc <> 0.

      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

      WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

      ENDIF.

      endif.

      endmodule. " icon_pai INPUT

      Please help me out....

  • author's profile photo Former Member
    Former Member
    Posted on Jan 25, 2008 at 08:57 AM

    add this include <icon>.

    we have a standard table called icon

    go to that table and check which icon u want to display and directly give that icon_name in the table control so that i will display the icon.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I tried out as u said.. using the function module icon_create. The function module works if the field is a input/output field. But I want to create icons in a input/output field in the table control. I tried the same way but a runtime error is coming. Please help me.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 08:36 AM

    Hi

    we have a standard table ICON

    In the program use this as an include.

    In the data browser go to that particular table and check which icon best suits ur requirement and use it.

    In ur program give the relevant icon name in the table control u are using so that the icon will be displayed.

    Hope this helps you.

    reward if useful.

    regs

    krish

    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.