Get inheritance relationships of SAP system integration classes

xiaoxiao2021-03-06  42

-------------------------------------------------- ------------------ ** & report zgetControllist ** & ** & --------------------- ------------------------------------------------ ** & ** & ** & ------------------------------------------- -------------------------- *

REPORT zget_class_list LINE-SIZE 132 NO STANDARD PAGE HEADING .type-pools: slis.TABLES: vseoextend.TYPES: BEGIN OF tyclass, clsname LIKE vseoextend-clsname, refclsname LIKE vseoextend-refclsname, descript LIKE seoclasstx-descript, END OF tyclass, BEGIN OF twclass.INCLUDE TYPE tyclass.TYPES: (20) TYPE c, END OF twclass parentnum, ttwclass TYPE TABLE OF twclass.DATA: fieldtab TYPE slis_t_fieldcat_alv.DATA: twclass1 TYPE ttwclass.DATA: twclass2 LIKE twclass1.DATA: twclass3 LIKE twclass1. Data: twclass1_wa like line of twclass1.data: twclass2_wa like twclass1_wa.

Data: Yclass Type Tyclass.Data: x Type I, Y Type I, L Type I, N Type I.Data: ISUB TYPE I.DATA: iParentnum (2) Type C.

Parameters p_cname like vseoExtend-clsname obligatory default 'cl_gui_object'.Parameters P_check Type C as Checkbox.

Define new_grid. Y = SY-Linno. Y = Y 2. Skip to line y. X = SY-colno. Position X. Write '|' .end-of-definition.

Define Write_Grid. X = Sy-colno. Y = SY-Linno. Position X. Write: & 1, '|'. L = SY-COLNO - X 1. X = X - 2. Y = Y 1. Skip to Line y. Position X. Uline AT X (L). Y = Y - 1. x = Sy-Colno. Skip to line y. position x.end-of-definition.start-of-selection. SELECT A ~ CLSNAME B ~ descript INTO CORRESPONDING FIELDS OF yclass FROM seoclass AS a INNER JOIN seoclasstx AS b ON a ~ clsname = b ~ clsname AND b ~ langu = sy-langu WHERE a ~ clsname = p_cname. isub = isub 1. IF isub> 99. Continue. Endif. Move-Corresponding Yclass to twclass1_wa. Perform get_parentnum using isub Changing iParentnum. Twclass1_wa-parentnum = iParentnum. Append TWClass1_wa to twclass1. Endselect.

twclass2 [] = twclass1 []. DESCRIBE TABLE twclass2 LINES n. WHILE n> 0. LOOP AT twclass2 into twclass2_wa. isub = 0. SELECT a ~ clsname a ~ refclsname b ~ descript INTO CORRESPONDING FIELDS OF yclass FROM vseoextend AS a INNER JOIN seoclasstx AS b ON a ~ clsname = b ~ clsname AND b ~ langu = sy-langu WHERE a ~ refclsname = twclass2_wa-clsname. isub = isub 1. IF isub> 99. CONTINUE. ENDIF. MOVE-CORRESPONDING yclass TO twclass1_wa. PERFORM get_parentnum USING isub CHANGING iparentnum. CONCATENATE twclass2_wa-parentnum iparentnum into twclass1_wa-parentnum. APPEND twclass1_wa TO twclass1. APPEND twclass1_wa TO twclass3. ENDSELECT. ENDLOOP. refresh twclass2. twclass2 [] = twclass3 []. refresh twclass3. DESCRIBE TABLE twclass2 LINES n Endwhile.

. SORT twclass1 BY parentnum PERFORM initialize_fieldcat USING fieldtab [] CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING it_fieldcat = fieldtab TABLES t_outtab = twclass1 * LOOP AT twclass1 INTO twclass1_wa * new_grid * write_grid:.... Twclass1_wa-clsname, * twclass1_wa-parentnum, * twclass1_wa -descript. * Y = SY-Linno. * y = y 2. * Skip to line y. * x = SY-colno. * Position X. * Write: / SY-DBCNT.

Top-of-page. Format Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color Color # w p. | |. | | | | | | | | | | | | | | | | | | | | '. Write:' Reference Class Name '. Uline. Y = SY-Linno. Skip to line y. * & ----------------------------------------------------------------------------------------------- -------------------------------------------- ** & form get_parentnum * & ------------------------------------- -------------------- ** Text * ---------------------------------------------------------------------------------------------------------------- -------------------------------------------- ** -> p_isub TEXT * <- p_iparentnum text * ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------- * form get_parentnum using p_isub Changing p_iparentnum. Data: iParentnum (2) Type C. Write P_isub to iParentnum. Call function 'conversion_exit_alpha_INPUT' Exporting Input = iParentnum Importing Output = P_iparentnum.Endform. "Get_Parentnum

转载请注明原文地址:https://www.9cbs.com/read-60143.html

New Post(0)