‎2007 Dec 18 8:18 AM
Hi,
How to create pushbuttons on application tool bar and on selection screen?
‎2007 Dec 18 8:24 AM
Hi,
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 1'.
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.
Regards,
Prashant
‎2007 Dec 18 8:23 AM
Hi Vasanth,
Check this link..
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba81635c111d1829f0000e829fbfe/content.htm
‎2007 Dec 18 8:24 AM
Hi,
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 1'.
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.
Regards,
Prashant
‎2007 Dec 18 8:27 AM
add a single line set pf-status '100'.
100 is the title of the pf status
when you create pf-status by double cdlicking on it
a new window will open
in the application toolbar menu
add the name of the pushbutton you want
press enter
select static text
add function text the name you want to be displayed
add an icon by selecting F4
add an info text any of your choice which will be shown on cusrsor placed on the push button
activate the pf-status and your work is done
add the aboce set pf-status statement in the pbo module of the screen, if in a particular screen
reward if useful
‎2007 Dec 18 8:50 AM
in selection screen you can easily ad a pushbutton in the layout editor of that screen
do remember to add a function code to that button