ABAP Program to List Programs without T-Codes

0
486

The following program lists the ABAP programs with out any transaction code (or not assigned to a transaction code).

Program List without T-Code
Program List without T-Code

The source code:

Report Z_NO_TCODE.

DATA: t_trdir TYPE STANDARD TABLE OF trdir,
t_tstc TYPE STANDARD TABLE OF tstc,
s_trdir TYPE trdir.

SELECT * FROM trdir INTO TABLE t_trdir
WHERE ( name LIKE ‘Z%’ OR name LIKE ‘Y%’ )
AND subc = ‘1’.

SELECT * FROM tstc INTO TABLE t_tstc
WHERE tcode LIKE ‘Z%’ OR tcode LIKE ‘Y%’.

SORT t_tstc BY pgmna.

WRITE: / ‘List of programs with no tcodes’.
SKIP 1.

LOOP AT t_trdir INTO s_trdir.
READ TABLE t_tstc TRANSPORTING NO FIELDS
WITH KEY pgmna = s_trdir-name.

IF sy-subrc ne 0.
WRITE: / s_trdir-name.
ENDIF.

ENDLOOP.

 

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here