‎2007 Mar 15 7:30 AM
How to get apush buttons in the selection screen level that before displaying a report
‎2007 Mar 15 7:33 AM
Hi,
You can use:
<b>selection-screen PUSHBUTTON 2(10) BUT1 USER-COMMAND CLI1.</b>
INITIALIZATION.
MOVE 'PUSH' to BUT1.
Reward if helpful.
Regards,
Sandhya
‎2007 Mar 15 7:36 AM
Hi,
Check this example..
TABLES SSCRFIELDS.
SELECTION-SCREEN PUSHBUTTON /10(20) PUSH1 USER-COMMAND ABCD.
INITIALIZATION.
MOVE 'My Button' TO PUSH1.
AT SELECTION-SCREEN.
IF SSCRFIELDS-UCOMM = 'ABCD'.
Add your code here when the button is pressed.
ENDIF.
Cheers,
Simha.
Reward all the helpful answers..
‎2007 Mar 15 7:37 AM
Hi,
Check this link to learn how to add a pushbutton on the selection screen, there is an example as well...
http://help.sap.com/saphelp_erp2004/helpdata/en/9f/dba81635c111d1829f0000e829fbfe/content.htm
‎2007 Mar 15 7:39 AM
HI,
Here it is.
REPORT zgt_maintain_config_tables.
INCLUDE <list>.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 01(35) garment
USER-COMMAND garment.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 01(35) locker
USER-COMMAND locker.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 01(35) route
USER-COMMAND route.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 01(35) stop
USER-COMMAND stop.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 01(35) dupgar
USER-COMMAND dupgar.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 01(35) message
USER-COMMAND message.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
PERFORM f_setup_pushbutton_text USING icon_execute_object text-s01
CHANGING garment.
PERFORM f_setup_pushbutton_text USING icon_execute_object text-s02
CHANGING locker.
PERFORM f_setup_pushbutton_text USING icon_execute_object text-s03
CHANGING route.
PERFORM f_setup_pushbutton_text USING icon_execute_object text-s04
CHANGING stop.
PERFORM f_setup_pushbutton_text USING icon_execute_object text-s05
CHANGING dupgar.
PERFORM f_setup_pushbutton_text USING icon_execute_object text-s06
CHANGING message.
START-OF-SELECTION.
END-OF-SELECTION.
AT SELECTION-SCREEN.
CASE sy-ucomm.
WHEN 'GARMENT'.
CALL TRANSACTION 'ZJAMGT_GARMENT_SEND'.
WHEN 'LOCKER'.
CALL TRANSACTION 'ZJAMGT_LOCKER_SEND'.
WHEN 'ROUTE'.
CALL TRANSACTION 'ZJAMGT_ROUTE_SEND'.
WHEN 'STOP'.
CALL TRANSACTION 'ZJAMGT_STOP_SEND'.
WHEN 'DUPGAR'.
CALL TRANSACTION 'ZJAMGT_DUP_GAR_SEND'.
WHEN 'MESSAGE'.
CALL TRANSACTION 'ZJAMGT_MESSAGE_SEND'.
ENDCASE.
&----
*& Form F_SETUP_PUSHBUTTON_TEXT
&----
This form will set up text for the pushbutton
----
FORM f_setup_pushbutton_text USING p_icon
p_text
CHANGING p_result.
DATA: l_result(50).
CALL FUNCTION 'ICON_CREATE'
EXPORTING
name = p_icon
text = p_text
add_stdinf = space
IMPORTING
RESULT = l_result
EXCEPTIONS
EXCEPTIONS
icon_not_found = 1
outputfield_too_short = 2
OTHERS = 3.
IF sy-subrc EQ 0. ENDIF.
p_result = l_result.
ENDFORM. " F_SETUP_PUSHBUTTON_TEXT
kishore.
‎2007 Mar 15 7:41 AM
Hi...
Where do u want to have the push button??
Is it on the Selection Screen or Application toolbar ??
‎2007 Mar 15 7:48 AM
Hi....
Go through this program....it will help you....
You can place a maximum of 5 user defined Push Buttons on the Application Toolbar......
Report Ztest.
TABLES SSCRFIELDS.
PARAMETERS: p_carrid TYPE s_carr_id,
p_cityfr TYPE s_from_cit.
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
INITIALIZATION.
sscrfields-functxt_01 = 'LH'.
sscrfields-functxt_02 = 'UA'.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
WHEN'FC01'.
p_carrid = 'LH'.
p_cityfr = 'Frankfurt'.
WHEN 'FC02'.
p_carrid = 'UA'.
p_cityfr = 'Chicago'.
ENDCASE.
START-OF-SELECTION.
WRITE / 'START-OF-SELECTION'.
Reward if it helps u.....
Kimi
‎2007 Mar 15 7:57 AM
hi
good
use the menu painter to to get a push button in the selection screen.
Thanks
mrutyun^