Google Search - Blog...........

Program To Find Out Type Of A Program.

REPORT ztest.

TABLES: TRDIR.

TYPES: BEGIN OF ty_prog,
prog TYPE d010sinf-prog,
r3state TYPE d010sinf-r3state,
subc TYPE d010sinf-subc,
END OF ty_prog.

DATA: v_desc TYPE char40.

DATA: it_prog TYPE STANDARD TABLE OF ty_prog WITH HEADER LINE.

SELECT-OPTIONS: s_prog FOR TRDIR-NAME .

START-OF-SELECTION.
SELECT prog
r3state
subc
FROM d010sinf
INTO TABLE it_prog
WHERE prog in s_prog
AND r3state EQ 'A'.

IF sy-subrc EQ 0.
LOOP AT it_prog.
CASE: it_prog-subc .
WHEN '1'.
v_desc = 'Executable program'.
WHEN 'I'.
v_desc = 'INCLUDE program'.
WHEN 'M'.
v_desc = 'Module pool'.
WHEN 'F'.
v_desc = 'Function group'.
WHEN 'S'.
v_desc = 'Subroutine pool'.
WHEN 'J'.
v_desc = 'Interface pool'.
WHEN 'K'.
v_desc = 'Class pool'.
ENDCASE.

write:/ it_prog-prog,
v_desc.
clear: v_desc.
ENDLOOP.
ENDIF.

No comments:

Post a Comment