01-02-2007 8:00 AM
Hi
A selection screen is displayed when a transaction code is run.This is the first selection screen. I want to display one more selection screen when user after giving some input in first screen presses the execute button present on the application toolbar.
I user At pf08 and wrote the code for second selection screen.It doesn't work.
01-02-2007 8:14 AM
see this demo code and reward if it helps -
and also u can refer following demo codes -
DEMO_SEL_SCREEN_FUNCTION_KEY
DEMO_SEL_SCREEN_PUSHBUTTON
**************************************
SELECTION-SCREEN BEGIN OF SCREEN 1001.
SELECTION-SCREEN: BEGIN OF BLOCK BL WITH FRAME TITLE TIT,
COMMENT /30(30) WEL,
SKIP 3.
PARAMETERS : FLIGHTNO LIKE ZFLIGHT-FNO,
FNAME LIKE ZFLIGHT-FNAME.
SELECTION-SCREEN: SKIP 2,
END OF BLOCK BL.
SELECTION-SCREEN : PUSHBUTTON 15(10) SH USER-COMMAND SHOW1,
PUSHBUTTON 30(10) IN USER-COMMAND INS1,
PUSHBUTTON 45(10) CL USER-COMMAND CLR1,
PUSHBUTTON 60(10) EX USER-COMMAND EX1,
PUSHBUTTON 73(10) NE USER-COMMAND NE1,
END OF SCREEN 1001.
INITIALIZATION.
TIT = 'WELCOME TO BLOCK'.
WEL = 'WELCOME TO SELECTION SCREEN'.
SH = 'SHOW'.
IN = 'INSERT'.
CL = 'CLEAR'.
EX = 'EXIT'.
NE = 'NEXT SCREEN'.
NEX = 'NEXT SCREEN1'.
CALL SELECTION-SCREEN 1001.
AT SELECTION-SCREEN.
CASE SY-UCOMM.
WHEN 'SHOW1'.
SELECT * FROM ZFLIGHT WHERE FNO = FLIGHTNO.
FNAME = ZFLIGHT-FNAME.
ENDSELECT.
WHEN 'INS1'.
ZFLIGHT-FNO = FLIGHTNO.
ZFLIGHT-FNAME = FNAME.
INSERT ZFLIGHT.
MESSAGE 'RECORD INSERTED' TYPE 'S'.
WHEN 'CLR1'.
FLIGHTNO = ' '.
FNAME = ' '.
WHEN 'EX1'.
LEAVE PROGRAM.
WHEN 'NE1'.
CALL SELECTION-SCREEN 1002.
WHEN 'NE2'.
CALL SELECTION-SCREEN 1001.
ENDCASE.
amit
Message was edited by:
Amit Tyagi
01-02-2007 8:16 AM
01-02-2007 8:18 AM
i dont know how do you use two selection screens at a time.
but after pressing F8 also at selection-screen will fire you can call any other screen over there by checking the values in your selection screens parameter and select-options.
i.e. if they are not initial then only call the screen..
sorry i am not enough clear about your requirement but it may work.
regards
shiba dutta
01-02-2007 8:24 AM
run this code & see whether it meets ur requirement.
u can create ur own transaction in SE93 .
in that select second radio button (program and selection screen).
tables : mara.
data : it like table of mara with header line.
selection-screen : begin of screen 9000.
parameters: m type mara-matnr .
selection-screen end of screen 9000.
selection-screen : begin of screen 9100.
parameters: d type mara-matnr .
selection-screen end of screen 9100.
call selection-screen 9000.
at selection-screen.
call selection-screen 9100.