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

SELECTION-SCREEN PUSHBUTTON 0(20) name USER-COMMAND FILE.

Former Member
0 Likes
625

Hi,

I'm trying to put a button on a selection-screen!

I'd like this button to be Icon + text! Text is ook, how do I add an icon ?

regards,

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
526

Hi stephan,

1. simple

2. like this (just copy paste in new program)

report abc.

SELECTION-SCREEN PUSHBUTTON /1(35) showlist USER-COMMAND showlist.

INITIALIZATION.

MOVE '<b>@5W\QE@</b>Show Emp List From 9002' TO showlist.

where

@5W\QE@ = icon code (we can get from icon type-group)

Show Emp List From 9002 = the TEXT u want to show in button

3. For getting the CODe for icon,

goto se11,

and check out ICON (in type group)

4.

eg. from ICON

ICON_2 ICON_DUMMY '@00@'." ICON_2 ICON_CHECKED '@01@'." Checked; OK

ICON_2 ICON_INCOMPLETE '@02@'." Incomplete

ICON_2 ICON_FAILURE '@03@'." Failed

ICON_2 ICON_POSITIVE '@04@'." Positive

ICON_2 ICON_NEGATIVE '@05@'." Negative

regards,

amit m.

3 REPLIES 3
Read only

Former Member
0 Likes
527

Hi stephan,

1. simple

2. like this (just copy paste in new program)

report abc.

SELECTION-SCREEN PUSHBUTTON /1(35) showlist USER-COMMAND showlist.

INITIALIZATION.

MOVE '<b>@5W\QE@</b>Show Emp List From 9002' TO showlist.

where

@5W\QE@ = icon code (we can get from icon type-group)

Show Emp List From 9002 = the TEXT u want to show in button

3. For getting the CODe for icon,

goto se11,

and check out ICON (in type group)

4.

eg. from ICON

ICON_2 ICON_DUMMY '@00@'." ICON_2 ICON_CHECKED '@01@'." Checked; OK

ICON_2 ICON_INCOMPLETE '@02@'." Incomplete

ICON_2 ICON_FAILURE '@03@'." Failed

ICON_2 ICON_POSITIVE '@04@'." Positive

ICON_2 ICON_NEGATIVE '@05@'." Negative

regards,

amit m.

Read only

Former Member
0 Likes
526

If you want to create pushbuttons with tool tips on a selection screen or you want to assign a tooltip to the pushbuttons created with SLECTION-SCREEN FUCTIONKEY in the GUI status of a selection screen, the correction instructions contain a sample program which demonstrates how you can assign tool tips to pushbuttons or application toolbars in a selection screen.

Code

REPORT ZZTOOLTIPDEMO.

TYPE-POOLS icon.

DATA: funckey TYPE smp_dyntxt.

TABLES: sscrfields.

SELECTION-SCREEN PUSHBUTTON 1(40) pushbutt USER-COMMAND

com VISIBLE LENGTH 12.

SELECTION-SCREEN FUNCTION KEY 1.

INITIALIZATION.

CALL FUNCTION 'ICON_CREATE'

EXPORTING

name = icon_information

text = 'My Text'

info = 'My Quickinfo'

  • ADD_STDINF = 'X'

IMPORTING

RESULT = pushbutt

EXCEPTIONS

OTHERS = 1.

IF sy-subrc <> 0.

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

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

ENDIF.

MOVE icon_information TO funckey-icon_id.

MOVE 'My text' TO funckey-icon_text.

MOVE 'My quickinfo' TO funckey-quickinfo.

MOVE funckey TO sscrfields-functxt_01.

Read only

Former Member
0 Likes
526

Hi Stephan,

You can create your own screen and call it as selection screen in that case you have freedom to design it according to your choice.

Regards

vijay