‎2009 Jan 15 6:34 AM
Hi folks,
I need to display a push button the selection screen.its not on the application tool bar..but in one of the selection block in the selection screen..could anybody guide how to do this...
Thanks in advance,
shyam.
Edited by: shyam prasad on Jan 15, 2009 7:34 AM
‎2009 Jan 15 6:37 AM
Hi Shyam,
Try the following code..
TABLES sscrfields.
TYPE-POOLS icon.
*SELECTION-SCREEN:
BEGIN OF SCREEN 500 AS WINDOW TITLE title,
PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
PUSHBUTTON 28(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.
Hope it will be useful..
Regards,
Lakshman.
Edited by: Lakshman N on Jan 15, 2009 7:39 AM
‎2009 Jan 15 6:37 AM
Try this
SELECTION-SCREEN BEGIN OF SCREEN 1111.
SELECTION-SCREEN BEGIN OF BLOCK BL1.
SELECT-OPTIONS SEL0 FOR SY-REPID.
PARAMETERS PAR0.
SELECTION-SCREEN END OF BLOCK BL1.
SELECT-OPTIONS SEL1 FOR SY-REPID.
PARAMETERS PAR1.
SELECTION-SCREEN PUSHBUTTON /10(30) PUBU USER-COMMAND US03.
SELECTION-SCREEN END OF SCREEN 1111.
Hope this helps...
‎2009 Jan 15 6:41 AM
Detailed documentation with examples are available in SAP help.
Write Selection-screen in your ABAP editer and press F1 and look for Selection-screen Pushbutton.
Murthy.
‎2009 Jan 15 6:53 AM
Hi Shyam,
Please try to search SDN before posting for basic questions, Anyways for bush button on selection screen do it this way:
SELECTION-SCREEN:
BEGIN OF BLOCK B1 WITH FRAME TITLE text-000,
PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
PUSHBUTTON 20(10) but2 USER-COMMAND cli2,
END OF BLOCK B1.
INITIALIZATION.
but1 = 'BUTTON1'.
but2 = 'BUTTON2'.
AT SELECTION-SCREEN.
CASE SY-UCOMM.
WHEN 'CLI1'.
MESSAGE 'You have clicked button1' type 'I'.
WHEN 'CLI2'.
MESSAGE 'You have clicked button2' type 'I'.
ENDCASE.With luck,
Pritam.