Translate

Thursday, 6 December 2012

Program for List of programs with no tcodes



Program for List of Programs with no tcode



REPORT  PRG1.

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.

No comments: