Skip to Content
author's profile photo Former Member
Former Member

Reports - only run from custom transaction

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2008 at 09: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 21, 2008 at 12: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.