Ze

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

*&---------------------------------------------------------------------*

*& Report ZE
*&
*&---------------------------------------------------------------------*
*& XMYILMAZ
*&
*&---------------------------------------------------------------------*

REPORT zrgt_list.

TABLES: trdir.
DATA : wid TYPE i,
itab TYPE STANDARD TABLE OF string,
mess TYPE string,
lin TYPE i,
wrd TYPE string,
dir TYPE trdir.
DATA : terminal TYPE text50.
FIELD-SYMBOLS <line> TYPE string.

PARAMETERS: prog LIKE trdir-name VALUE CHECK,


func LIKE tfdir-funcname VALUE CHECK,
class TYPE char100,
no_rc TYPE xfeld DEFAULT 'X'.

INITIALIZATION.
AUTHORITY-CHECK OBJECT 'S_TCODE'
ID 'TCD' FIELD 'SE38'.
IF sy-subrc NE 0.
MESSAGE e077(s#) WITH 'SE38'.
ENDIF.

START-OF-SELECTION.
IF ( prog IS INITIAL AND func IS INITIAL AND class IS INITIAL ) OR
( prog IS NOT INITIAL AND func IS NOT INITIAL ) OR
( func IS NOT INITIAL AND class IS NOT INITIAL ) OR
( class IS NOT INITIAL AND prog IS NOT INITIAL ) .
MESSAGE 'Fonksiyon veya Program Adı Giriniz'
TYPE 'S' DISPLAY LIKE 'E'.
LEAVE LIST-PROCESSING.
ENDIF.

CALL FUNCTION 'TH_USER_INFO'


IMPORTING
terminal = terminal.

SELECT SINGLE * INTO dir FROM trdir WHERE name EQ prog.


CHECK sy-subrc EQ 0.
AUTHORITY-CHECK OBJECT 'S_DEVELOP'
ID 'DEVCLASS' DUMMY
ID 'OBJTYPE' FIELD 'PROG'
ID 'OBJNAME' FIELD dir-name
ID 'P_GROUP' DUMMY
ID 'ACTVT' FIELD '03'.
IF sy-subrc NE 0.
MESSAGE e077(s#) WITH 'SE38'.
ENDIF.

END-OF-SELECTION.
IF func IS NOT INITIAL.
DATA: ls_tfdir LIKE tfdir,
l_namespace LIKE rs38l-namespace,
l_area LIKE rs38l-area.
SELECT SINGLE * FROM tfdir INTO ls_tfdir WHERE funcname = func.

CALL FUNCTION 'FUNCTION_INCLUDE_SPLIT'


EXPORTING
program = ls_tfdir-pname
IMPORTING
namespace = l_namespace
group = l_area
EXCEPTIONS
OTHERS = 6.

CONCATENATE l_namespace 'L' l_area 'U' ls_tfdir-include INTO prog.


ELSEIF class IS NOT INITIAL.
TYPES: seop.
DATA: clskey LIKE seoclskey,
inclds TYPE seop_methods_w_include,
wa_inc TYPE seop_method_w_include,
lv_module TYPE string.

SPLIT class AT '~' INTO clskey-clsname lv_module.

CALL FUNCTION 'SEO_CLASS_GET_METHOD_INCLUDES'


EXPORTING
clskey = clskey
IMPORTING
includes = inclds
EXCEPTIONS
_internal_class_not_existing = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.

CONCATENATE '*' lv_module INTO lv_module.

LOOP AT inclds INTO wa_inc WHERE cpdkey CP lv_module.


prog = wa_inc-incname.
ENDLOOP.
IF sy-subrc NE 0.
MESSAGE 'Class Module include u bulunamadı!' TYPE 'S' DISPLAY LIKE 'E'.
EXIT.
ENDIF.
ENDIF.

READ REPORT prog INTO itab MAXIMUM WIDTH INTO wid.

EDITOR-CALL FOR itab.

CHECK sy-subrc EQ 0.
CHECK sy-ucomm EQ 'WB_SAVE'.

SYNTAX-CHECK FOR itab MESSAGE mess LINE lin WORD wrd PROGRAM dir-name.
IF sy-subrc NE 0.
MESSAGE mess TYPE 'I'.
WRITE: / mess,
/ lin,
/ wrd.
IF no_rc EQ space.
CHECK sy-subrc NE 0.
ENDIF.
ENDIF.

INSERT REPORT prog FROM itab UNICODE ENABLING dir-uccheck.

You might also like