‎2007 Oct 04 6:37 PM
‎2007 Oct 04 6:40 PM
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.
check this link
http://www.planetsap.com/howdo_a.htm#PBUTTON
Reward all helpfull answers
Regards,
‎2007 Oct 04 6:40 PM
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.
check this link
http://www.planetsap.com/howdo_a.htm#PBUTTON
Reward all helpfull answers
Regards,
‎2007 Oct 04 6:40 PM
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.
check this link
http://www.planetsap.com/howdo_a.htm#PBUTTON
ashish
‎2007 Oct 04 6:40 PM
Hi,
Please check these demo program (SE38).
DEMO_SEL_SCREEN_PUSHBUTTON
DEMO_SEL_SCREEN_FUNCTION_KEY
Regards,
Ferry Lianto
‎2007 Oct 04 6:57 PM
Hi Avi,
You can create Push Buttons in the Slection Screen by assigning a User commnand to it.
Below is the stynax
SELECTION-SCREEN BEGIN OF SCREEN 1000.
SELECTION-SCREEN PUSHBUTTON 15(25) PUBU
USER-COMMAND CODE1.
SELECT-OPTIONS SEL2 FOR SPFLI_WA-CONNID.
PARAMETERS PAR2 TYPE I.
SELECTION-SCREEN END OF SCREEN 1000.
then you need to write the code for the User command ( here CODE1) at the Selection screen event.
You can also check the Program demo_sel_screen_pushbutton in any Sap Server. this is a demo program.
Reward if helpful.
Regards,
Harini.S