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

Tooltip for button with dynamic function text containing an icon

Former Member
0 Likes
3,241

Hi all,

we had a development containing some functions with dynamic function text in the status and these dynamic function texts contain an icon. The tooltip of the buttons in release 4.6 ignored that icon. The system has been upgraded into 6.0. Now the tooltip for the buttons contains the icon as text. Though the tooltip starts with a sequence embedded in '@'.

I could provide a separate tooltip for the icon where I am not sure if it is really used when the cursor hits the button with the icon and the dynamic function text anywhere. I do not see any chance to provide a tooltip for the function itself. It seems to be allways identically with the dynamic function text.

How to avoid displaying the technical representation of the buttons icon within the tooltip? What has changed with release beyond 4.6 here?

Thanks in advance for your hints.

Axel

4 REPLIES 4
Read only

Former Member
0 Likes
2,281

This is how it looks (screenshot):

Read only

0 Likes
2,280

When using ICON_CREATE, put a text in INFO or set ADD_STDINF on.

With INFO text

With ADD_STDINF

Regards,

Raymond

Read only

0 Likes
2,280

Hi,

I think the right method to add a dynamic button with icon is to use structure SMP_DYNTXT to define the variable used in the Status.

This way you can define different texts for the Button and the Quick Info.

This information is taken from SAP help,

Menu Painter: Field name for dynamic texts

You want to change the function or menu text at runtime. Regardless of the PF-STATUS, the content of the ABAP or ABAP Dictionary field specified is merged into the relvant menus and function keys at the end of the PBO.

Field structure

You should create the field with the structure  SMP_DYNTEXT:

TEXT: Function or menu text. This text is displayed in the menu bar, menus and in the possible functions list. It also appears in the application toolbar wherever the ICON_ID component is empty.

ICON_ID and ICON_TEXT: If you want an icon to appear on the pushbutton, you must fill ICON_ID. You can enter an additional icon text in ICON_TEXT. You fill the ICON_ID field by assigning an icon to it (for example, F-ICON_ID = ICON_CANCEL). You cannot use the ICON_CREATE function module here.

If the ICON_ID component contains a value, you must also fill in the TEXT component, since its contents appear in the list of possible functions.

QUICKINFO: This text is used as quickinfo in the status line.

Using reference techniques

If you want to refer to GUI defintions from other programs or work with dynamic texts, you must remember that the fields are assigned to the program in which the status is defined.

If you define a status which is used by several programs through a function module call, you must create the fields for dynamic texts in the same function group in which the status was created. Do not create the fields in the program calling the function module. In this case you can use a field name - field contents assignment table to allow the caller to define dynamic texts in the interface.

If the call takes place using SET PF-STATUS ... OF PROGRAM, there is not reasonable interface for text transfer. Hpwever, fields must also be created and filled in called program prog.

If you are working with include menus, you msut create the fields for dynamic texts in the program for which the status was originally created, and not in the program containing the included menu.

Regards.

Read only

cesarscheck
Participant
0 Likes
2,280

Hi Axel,

I checked the answers posted by the other members and they seems to be good answers.

I faced a similar issue and tried to solve using function module ICON_CREATE.

However I didn't get a satisfactory result: sometimes the icon appeared without the text, another times the text appeared without the icon.

I could solve it through David Diaz's answer and also through this post:

http://scn.sap.com/message/13738850#13738850

Hope it can help you.

Kind regards,

César Scheck