‎2008 Jul 25 10:19 AM
Hi i have created application tool bar as follows.
at selection-screen output.
set pf-status '1000'.
set titlebar '1000'.
in the application tool bar ,Three buttons are there like report,edit,exit .i need to call ALV if user press button REPORT,i need leave from selection screen if user press EXIT,
how can i do it? please he
Regards.
Anil.
‎2008 Jul 25 10:22 AM
Hi
CASE SY-UCOMM
when 'REPORT'
submit program '<<prog name'.
when 'EDIT'.
do your action here
when 'EXIT'.
leave program. or exit.
ENDCASE
Thanks & Regards,
Chandralekha.
‎2008 Jul 25 10:23 AM
hi
in the event
Start of selection
use case on SY-ucomm like this
CASE SY-ucomm.
when 'REPORT'
write ur alve related coding here .
When 'EXIT'.
use EXIT statement to dome out of program .
ENdcase .
HOpe it will lead u to solution
Cheers
Snehi
‎2008 Jul 25 10:28 AM
this is how you should use the pf-status.
REPORT ZTEST_VB.
TABLES sscrfields.
parameters: p_matnr type mara-matnr.
initialization.
set pf-status '1000'.
set titlebar '1000'.
at selection-screen.
CASE sscrfields-ucomm.
WHEN 'ALV'.
WHEN 'EXIT'.
ENDCASE.
‎2008 Jul 25 11:50 AM
HI.
I have done it as your advice.
but the screen come out if i press the button REPORT.iam not getting output.
my code as follows
INITIALIZATION.
set pf-status '1000'.
set titlebar '1000'.
AT SELECTION-SCREEN.
CASE sscrfields-ucomm.
when 'PB_REPORT'.
PERFORM select_records.
PERFORM alv_report.
when 'PB_CLEAR'.
when 'PB_BACK'.
leave screen.
endcase.
pls help me to resove this problem,
Regards.
Anil.
Edited by: sutharapu anilkumar on Jul 25, 2008 12:55 PM
‎2008 Jul 25 12:03 PM
Hi,
Check The FCODE of Button Report is PB_REPORT or not.
Thanks,
Kishore
‎2008 Jul 25 10:30 AM
hi,
as we know if we press execute button (F8) on application toolbar we will get the list. so what i understood from ur query is similar funcitonallity should be provided by ur program if u press on report button right.....
if so then give the function code of execute button to report button in se41.i think this resolves ur problem as per my understanding.
Rgds.,
subash
‎2008 Jul 25 10:31 AM
‎2008 Jul 25 10:33 AM
Hi
Try the following code...
DATA: OK_CODE TYPE SY-UCOMM.
CASE OK-CODE.
when 'REP'
submit '<prog name>'.
when 'EDIT'.
..............
..............
when 'EXIT'.
leave program.
ENDCASE
( * Here REP, EDIT & EXIT are Function Codes of the buttons in application toolbar).
Hope this would help you.
Murthy
Edited by: Kalyanam Seetha Rama Murthy on Jul 25, 2008 11:35 AM
‎2008 Jul 25 10:35 AM
Hi,
At selection-screen.
case sy-ucomm.
when 'REPORT'.
<ALV related code>
when 'EXIT'.
.....
when 'EDIT'.
.....
endcase.
Regards,
Rajitha.
‎2008 Jul 25 12:01 PM
Hi,
the SELECTION-SCREEN status can be changed with the function moduls described on [Changing the Standard GUI Status|http://help.sap.com/saphelp_nw70/helpdata/EN/e7/0eb237e29bc368e10000009b38f8cf/frameset.htm].
Regards Rudi
‎2008 Jul 25 12:04 PM
Hi all,
u need to do coding in PAI of the screen
module exit input.
case ok_code.
when 'EXIT' .
clear ok_code.
leave to screen 0.
endcase.
endmodule. " EXIT INPUT
in the same way u can define for all the functionality..
Thanks & Regards
Ashu Singh
‎2008 Jul 25 12:24 PM
hi Anil,
Please Check with the Function codes.If u give Fcode as pb_report in the screen layout and in the Program if u declare as PB_REPORT then report wont trigger.