Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Reports - only run from custom transaction

Former Member
0 Kudos

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

5 REPLIES 5

Former Member
0 Kudos

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.

0 Kudos

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.

0 Kudos

> 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

0 Kudos

Kick-started my day, that did.

pk

Former Member
0 Kudos

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