09-21-2008 10:32 AM
hello all,
i have developed one report,for that i created one tr.code(ZTRN). my requirement is when ever end user or developer run the same report by SE38 tr.code, the message (pls run the report by ZTRN transaction) has to display. for this on which event i need to provide coding
Edited by: Julius Bussche on Sep 21, 2008 2:25 PM
09-21-2008 10:39 AM
I think as it was a report it may be having the selection screen. and for your selection screen there may be some mandatory fields. While validating that mandatory field in at selection on field event you can write the validation for the tcode as well.
If sy-tcode = se38.
Message e001. " Please run through tcode
Endif.
You can write this at any at selection screen event or at the beginning of the start of selection as well.
09-21-2008 10:48 AM
Hi Swamy,
U write in at selection screen event
if sy-tcode = 'se38'.
message i000. i.e. please run the report witn 'zXXXX' trancation code.
endif.
09-21-2008 1:37 PM
> If sy-tcode = se38.
> Message e001. " Please run through tcode
> Endif.
And what about SA38? And SE80? And SE84? And SE15? And SM37? And START_REPORT? And a report-tree? And a menu-report? And on and on it goes.......
Cheers,
Julius
09-22-2008 4:29 AM
09-21-2008 1:31 PM
Please use meaningfull subject titles...
Another option (which I would recommend) is to call FM AUTHORITY_CHECK_TCODE upfront in your report and import 'ZTRN' as the tcode to be checked. That way the report cannot be run from anywhere unless the user is authorized for transaction 'ZTRN', but if they are authorized for S_TCODE = 'ZTRN' then they can run it from anywhere that ZTRN is used or reports can be started.
This is in my opinion a better option, as there are many places from which reports can be started.
Cheers,
Julius