2006 Nov 17 9:10 AM
Hi Friends,
I need to have a pushbutton in the output screen,how can i display it ? and if that push button is pressed ,it should perform an operation and display the output in next screen.
I have a condition that the select-option should act as parameter,How can I get it.
Thank you.
I Promise to Reward.
2006 Nov 17 9:21 AM
Hi
See this code.
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.
Hi Friends,
I need to have a pushbutton in the output screen,how can i display it ? and if that push button is pressed ,it should perform an operation and display the output in next screen.
I have a condition that the select-option should act as parameter,How can I get it.
Thank you.
I Promise to Reward.
2006 Nov 17 9:14 AM
Hi Geeta,
1. Refer std programs:
DEMO_SEL_SCREEN_FUNCTION_KEY
DEMO_SEL_SCREEN_PUSHBUTTON
2. For Select-option use No_interval and No extionsion option.
Reward points if this helps.
Manish
2006 Nov 17 9:17 AM
1)
select-options: s_vbeln for vbak-vbeln no-intervals.
for selet options to work as parameters.
SELECTION-SCREEN PUSHBUTTON USER-COMMAND fcode.
you have to give the fcode as 'prin' onli if u have to go to start-of-selection.
else write all ur screen in at selection-screen.
santhosh.
2006 Nov 17 9:21 AM
Hi
See this code.
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.
2006 Nov 17 9:22 AM
To have a Pushbutton on the output screen.. all u need to do is create a GUI Status and set that status in ur report.
The command is -- set pf-status 'MY_STATUS'.
You can create as many buttons as u want.
Then you need to handle the user-command event in ur report.
Reg the select option - you can add the no-intervals and no-extension .
by the way if you just enter one single value in select options.. it behaves like a parameter.
Refer this code for push button
*************
REPORT Z_TEST_GUI.
write 😕 'this is the 1st line'.
set pf-status 'MY_PF_STATUS'.
at user-command.
case sy-ucomm.
when 'BACK'.
leave program.
when 'NEW'.
sy-lsind = sy-lsind - 1.
write 😕 'This is a new Line'.
when others.
leave program.
endcase.
*******************
Please mark all helpful answers...
Message was edited by:
Varun Verma
2006 Nov 17 9:23 AM
Hello,
U need to set the PF status for the output screen.
AS an example u could check the sample report demo_list_menu_painter.
If useulö reward.
Vasanth
2006 Nov 17 9:24 AM
hi,
For Select-option use No_interval and No extionsion option, so that it will act as a Parameter.
if you want to display push button on the output report, u need to use menupainter (SE41). in the menu painter you needs to Design one Custom screen with Push button.
and call this screen in program under START-OF-SLECTION EVENT write SET PF-STATUS ' (screen number)'.
under AT USER-COMMAND event write logic by checking the Sy-Ucomm variable.
Thanks,
Murali.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |