How to access a TCODE without authorization?

Its weekend again and time to share all knowledge I learned over the week. I know this topic that I will discuss today would be beneficial to my fellow ABAP developers specially when they dont have the SAP_ALL authorizations. For the sake of everyone, SAP_ALL authorizations is an authorization provided to a user in which he can access all standard tcodes of SAP system. So whether this is a functional or technical tcode, it is possible to access. 

However, in an environment of a multinational company, this authorization is NOT permitted. As a developer, you are only given the access of all tcodes related to development like, SE38 (ABAP Editor), SE24 (Class Editor), SE37 (Function Module Editor) and other tcode related to development.

Now the issue is, how about if I want to access a particular tcode which is not related to ABAP Development? Let say, SU01, User Maintenance? But when I access it, I got this message "You are not authorized to access"? So in case you encounter it, what will you do?
Do you have any idea to by-pass the authorization set to your user account? Or will you ask your Basis people to grant you an access to this transaction code? How about if they denied your request? 

Dont worry now as the pain is over. Well, in this tutorial, I will discuss with you on how to access any SAP Tcodes even you don't have any authorizations.Yes, you are right. We will by-pass the that authorization limiting you to access a particular tcode. The only requirement here is you must have an access to SE38 and you have the role S_DEVELOP. Since you will be creating a new program which we will call, ZTCODE. :)

First thing, create an ABAP program. Then copy this program below. It is just a 12 liner program. A simple one.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
DATA: l_tcode TYPE sytcode.
PARAMETERS: p_tcode TYPE sy-tcode.
START-OF-SELECTION.

  SELECT SINGLE tcode FROM tstc
    INTO l_tcode
    WHERE tcode = p_tcode.
  IF sy-subrc = 0.
    CALL TRANSACTION p_tcode.
  ELSE.
    MESSAGE 'TCODE not found.' TYPE 'I'.
  ENDIF. 
Once you are done, save and activate your program. The secret here is be sure to create a customized transaction code for this program. Let say, ZTCODE. Otherwise, you can't access that particular tcode you want to view. Clear? 


Result:
Initially, I can't access SU01.



But after I created this program, I activated and ran it.



And voila, I can now access SU01 without the BASIS people. :)

How to download the data structure of tables in SE11?

Good morning people around the world. Its me again doing some blogs. Sharing to you some tips and tricks in the SAP world. Well, before I s...