‎2009 Sep 30 5:47 AM
Hi all,
I have a requirement to customize the selection screen.I have to put a push button in selection.By clicking it a screen or popup should appear from where i could select the the required select options or check boxes or parameters etc.And then the new customised screen should appear to the user.Please guide me how i should approach this problem.
Edited by: prashant05 on Sep 30, 2009 6:47 AM
‎2009 Sep 30 5:51 AM
Hi,
pls refer to the following code:
REPORT zdemo_sel_screen_pushbutton.
TABLES sscrfields.
DATA flag(1) TYPE c.
SELECTION-SCREEN:
BEGIN OF LINE,
PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
PUSHBUTTON 12(10) text-020 USER-COMMAND cli2,
END OF LINE,
BEGIN OF LINE,
PUSHBUTTON 2(10) but3 USER-COMMAND cli3,
PUSHBUTTON 12(10) text-040 USER-COMMAND cli4,
END OF LINE.
AT SELECTION-SCREEN.
MESSAGE i888(sabapdocu) WITH text-001 sscrfields-ucomm.
CASE sscrfields-ucomm.
WHEN 'CLI1'.
flag = '1'.
WHEN 'CLI2'.
flag = '2'.
WHEN 'CLI3'.
flag = '3'.
WHEN 'CLI4'.
flag = '4'.
ENDCASE.
START-OF-SELECTION.
but1 = 'Button 1'.
but3 = 'Button 3'.
CASE flag.
WHEN '1'.
WRITE / 'Button 1 was clicked'.
WHEN '2'.
WRITE / 'Button 2 was clicked'.
WHEN '3'.
WRITE / 'Button 3 was clicked'.
WHEN '4'.
WRITE / 'Button 4 was clicked'.
WHEN OTHERS.
WRITE / 'No Button was clicked'.
ENDCASE.Edited by: Daixiong Jiang on Sep 30, 2009 12:51 PM
‎2009 Sep 30 6:31 AM
TYPE-POOLS icon.
selection-screen:
PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
PUSHBUTTON 20(30) but2 USER-COMMAND cli2 ,
BEGIN OF SCREEN 500 TITLE title.
PARAMETERS : p1 type char10,
p2 type i.
selection-screen: END OF SCREEN 500,
BEGIN OF SCREEN 600 TITLE title1.
PARAMETERS : p3 type char10,
p4 type i.
selection-screen: END OF SCREEN 600.
AT SELECTION-SCREEN OUTPUT.
but1 = 'Button 1'.
but2 = 'Button 2'.
title = 'Push button1'.
title1 = 'Push button2'.
AT SELECTION-SCREEN.
if sy-ucomm = 'CLI1'.
CALL SELECTION-SCREEN 500.
ELSEIF sy-ucomm = 'CLI2'.
CALL SELECTION-SCREEN 600.
endif.if you want the screen 500 and 600 to come as separate popups then
BEGIN OF SCREEN 600 AS WINDOW TITLE title1.