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

Quick Info a ICON

rohit_trivedi
Product and Topic Expert
Product and Topic Expert
0 Likes
1,440

Hi,

I'm using a ICON, which is displayed as a column value.

It is defined in table icon and also has a defined

quickinfo.

I want to change this quickinfo at runtime, without changing

in database.

How can i achieve this?

Regards,

Rohit.

1 ACCEPTED SOLUTION
Read only

LeonardoAraujo
SAP Mentor
SAP Mentor
0 Likes
1,230

If you use function module ICON_CREATE, you can do it.

Example:


  CALL FUNCTION 'ICON_CREATE'
    EXPORTING
      NAME                  = 'ICON_CREATE_TEXT'
      INFO                  = 'Your new Quick Info!'
    IMPORTING
      RESULT                = but1
    EXCEPTIONS
      ICON_NOT_FOUND        = 1
      OUTPUTFIELD_TOO_SHORT = 2
      OTHERS                = 3.

Hope it helps,

Leonardo De Araujo

Hi,

I'm using a ICON, which is displayed as a column value.

It is defined in table icon and also has a defined

quickinfo.

I want to change this quickinfo at runtime, without changing

in database.

How can i achieve this?

Regards,

Rohit.

6 REPLIES 6
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,230

I pretty sure that you will not be able to change this at runtime.

Regards,

Rich Heilman

Read only

LeonardoAraujo
SAP Mentor
SAP Mentor
0 Likes
1,231

If you use function module ICON_CREATE, you can do it.

Example:


  CALL FUNCTION 'ICON_CREATE'
    EXPORTING
      NAME                  = 'ICON_CREATE_TEXT'
      INFO                  = 'Your new Quick Info!'
    IMPORTING
      RESULT                = but1
    EXCEPTIONS
      ICON_NOT_FOUND        = 1
      OUTPUTFIELD_TOO_SHORT = 2
      OTHERS                = 3.

Hope it helps,

Leonardo De Araujo

Read only

0 Likes
1,230

You need to excute like this:


  CALL FUNCTION 'ICON_CREATE'
    EXPORTING
      NAME                  = '@D6@'
      TEXT                  = 'ICON_CREATE_TEXT'
      INFO                  = 'Your new Quick Info!'
    IMPORTING
      RESULT                = but1
    EXCEPTIONS
      ICON_NOT_FOUND        = 1
      OUTPUTFIELD_TOO_SHORT = 2
      OTHERS                = 3.

Regards.

Read only

Former Member
0 Likes
1,230

Hi Rohit,

Can you explain indetial. what type of output is it either list or ALV or module pool.

Regards,

Kiran i

Read only

rohit_trivedi
Product and Topic Expert
Product and Topic Expert
0 Likes
1,230

Hi,

It ALV layout.

Regarding the FM:

CALL FUNCTION 'ICON_CREATE'

EXPORTING

NAME = 'ICON_CREATE_TEXT'

INFO = 'Your new Quick Info!'

IMPORTING

RESULT = but1

EXCEPTIONS

ICON_NOT_FOUND = 1

OUTPUTFIELD_TOO_SHORT = 2

OTHERS = 3.

Which ICON does it create?

I've to create a specific icon :

sls TYPE v_icon-id VALUE '@D6@'.

can this FM help?

Thanks,

Rohit

Read only

rohit_trivedi
Product and Topic Expert
Product and Topic Expert
0 Likes
1,230

Hey Peluka,

You solved my problem!

Thanks a lot.

regards,

Rohit.