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

Button in Selection Screen

Former Member
0 Likes
8,642

Hi Gurus,

I have a push button in one block of a selection screen.. i have used that button as an information button.. Since it is a push button i dont have any icon for that button.. I would like to have an info icon for that button... Please help me in how to have an icon for that push button.. Pzzzzzzzzzz help...

Answers will be appreciated...

Thanks,

Sanu Pillai

1 ACCEPTED SOLUTION
Read only

Former Member
3,351

Hi,

You can provide the icon.See the sample:

SELECTION-SCREEN PUSHBUTTON /15(20) button1 USER-COMMAND EXEC1.
SELECTION-SCREEN PUSHBUTTON /15(20) button2 USER-COMMAND EXEC2.


You can initialize the texts for the push-buttons at INITIALIZATION.


CONCATENATE icon_green_light
'Button 1'(029) INTO button1.

Also,

Please check this links for sample code.

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba81635c111d1829f0000e829fbfe/content.htm

http://www.sap-img.com/abap/create-push-buttons-in-application-tool-bar.htm

Hope this will help.

10 REPLIES 10
Read only

Former Member
0 Likes
3,351

Hi,

Check with this but not sure

CALL FUNCTION 'ICON_CREATE'

EXPORTING

name = icon_information

text = 'Button 2'

info = 'My Quickinfo'

IMPORTING

RESULT = but2

EXCEPTIONS

OTHERS = 0.

Regds,

Murali

Read only

Former Member
0 Likes
3,351

hiiii

go to application toolbar for that button.double click on that button name.there you will get a small window ..in that ICON field will be there..enter ICON_INFORMATION

...it will give you information icon on that buttion.save & activate it.your problem wil be solved or just use ICON_CREATE FM..in that also you can enter ICON_INFORMATION as icon.

reward if useful

thx

twinkal

Edited by: twinkal patel on Jun 20, 2008 11:59 AM

Read only

Former Member
0 Likes
3,351

hi sanu,

Please go through the below given links,

[http://www.sapdevelopment.co.uk/reporting/selscr/selscrhome.htm][][]

hope this links will help you,

Reward points if usefull,

Thanks,

Kalyan.

Read only

Former Member
3,352

Hi,

You can provide the icon.See the sample:

SELECTION-SCREEN PUSHBUTTON /15(20) button1 USER-COMMAND EXEC1.
SELECTION-SCREEN PUSHBUTTON /15(20) button2 USER-COMMAND EXEC2.


You can initialize the texts for the push-buttons at INITIALIZATION.


CONCATENATE icon_green_light
'Button 1'(029) INTO button1.

Also,

Please check this links for sample code.

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba81635c111d1829f0000e829fbfe/content.htm

http://www.sap-img.com/abap/create-push-buttons-in-application-tool-bar.htm

Hope this will help.

Read only

Former Member
0 Likes
3,351

Hi sanu,

You can create the following on selection screen:

Example :

TABLES SSCRFIELDS.

...

SELECTION-SCREEN PUSHBUTTON /10(20) CHARLY USER-COMMAND ABCD.

...

INITIALIZATION.

MOVE 'My text' TO CHARLY.

...

AT SELECTION-SCREEN.

IF SSCRFIELDS-UCOMM = 'ABCD'.

...

ENDIF.

A pushbutton appears on the selection screen with the text 'My text'. In the AT SELECTION-SCREEN event, the field SSCRFIELDS-UCOMM has the contents ABCD after the button has been pushed.

For more info refer SAP help(F1):

-Regards.

Read only

Former Member
0 Likes
3,351

Hi,

Try this sort of code.

SELECTION-SCREEN:BEGIN OF BLOCK b2 WITH FRAME TITLE text-011.

SELECTION-SCREEN SKIP 1.

SELECTION-SCREEN PUSHBUTTON 70(4) but1 USER-COMMAND info.

SELECTION-SCREEN END OF BLOCK b2.

INITIALIZATION.
  WRITE ICON_INFORMATION TO but1 AS ICON.
  

Then check the value of pushbutton in sy-ucomm

ie case sy-ucomm.

when 'INFO'.

...........

when...

others...

endcase.

Or.

Even you can goto SE80 then double click screen then in layout for pushbutton attributes we can give icon name (ICON_INFORMATION).

This will surely help you.

Plz reward if useful.

Thanks,

Dhanashri.

Edited by: Dhanashri Pawar on Jun 20, 2008 12:05 PM

Read only

Former Member
0 Likes
3,351

Hi,

Create set pf-status 'ABC', In application tool bar create ur button and double clk , u can set the icon for ur button there.

Regards,

Iyswarya

Read only

Former Member
0 Likes
3,351

Hi Sanu

If you have observed the standard SAP provided icon for Information Sysyems, you can see that find icon is provided.I think you can that icon for your information button.

if you didn't observe

-> open for ex. se38

-> press F4 on the program text box

you will find information system push button and the icon associated with it.

Regards

Lakshman

Read only

Former Member
0 Likes
3,351

check this example program:

demo_sel_screen_pushbutton

Read only

Former Member
0 Likes
3,351

hi check this...here for the button i had given the information

TABLES sscrfields.

TYPE-POOLS icon.

SELECTION-SCREEN:

BEGIN OF SCREEN 500 AS WINDOW TITLE title,

PUSHBUTTON 2(10) but1 USER-COMMAND cli1,

PUSHBUTTON 12(30) but2 USER-COMMAND cli2

VISIBLE LENGTH 10,

END OF SCREEN 500.

AT SELECTION-SCREEN.

CASE sscrfields.

WHEN 'CLI1'.

...

WHEN 'CLI2'.

...

ENDCASE.

START-OF-SELECTION.

title = 'Push button'.

but1 = 'Button 2'.

CALL FUNCTION 'ICON_CREATE'

EXPORTING

name = icon_information

text = 'Button 2'

info = 'My Quickinfo'

IMPORTING

RESULT = but2

EXCEPTIONS

OTHERS = 0.

CALL SELECTION-SCREEN '0500' STARTING AT 10 10.