Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

************************************************************************

* Program Name : ZSROSI00_NEW *

* Object ID : ZSROSI00_NEW *

* Title : Upgrade Evaluator - Collector Program

* Author : *

* Country : *

* Creation Date : *

* Logical DB : *

* Reference : *

* Scheduling : *

* Description : *

************************************************************************

* INPUTS : *

* Variants : *

* Input file name : *

************************************************************************

* OUTPUTS : *

* Files : *

* Errors : *

************************************************************************ 

REPORT ZSROSI01 MESSAGE-ID ZX

LINE-SIZE 132 LINE-COUNT 65(2)

NO STANDARD PAGE HEADING.

TABLES: BHDGD, "#EC * " Batch Heading

D020T, "#EC * " Dynpro Text

DD01T, "#EC * " Domain Text

DD02T, "#EC * " Table Text

DD04T, "#EC * " Data Element Text

DD20T, "#EC * " Matchcode Text

DD25T, "#EC * " View Text

DD30T, "#EC * " Search Help Text

E070, "#EC * " Transport Header

E071, "#EC * " Transport Objects

EDBAST, "#EC * " IDOC Text

EDCIMT, "#EC * " IDOC Extension Text

SSCRFIELDS, "#EC * " Selection-screen

T100A, "#EC * " Message Area Text

TADIR, "#EC * " Repository Objects

TFTIT, "#EC * " Function Text

TLIBT, "#EC * " Function Group Text

TRDIR, "#EC * " System Table

TSTCT, "#EC * " Transaction Text

ZOSIECTL, "#EC * " OSI Control

ZOSIECOL. "#EC * " OSI Collect

SELECTION-SCREEN BEGIN OF BLOCK A.

SELECT-OPTIONS: S_TRKORR FOR E070-TRKORR, " Transport Number

S_CATEG FOR E070-KORRDEV, " Category

S_OBJNM FOR E071-OBJ_NAME. " Object Name

SELECTION-SCREEN END OF BLOCK A.

SELECTION-SCREEN BEGIN OF SCREEN 001.

SELECTION-SCREEN BEGIN OF BLOCK B WITH FRAME TITLE TEXT-000.

* Line 1

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: P_PROG AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 5(20) TEXT-001 FOR FIELD P_PROG.

SELECTION-SCREEN POSITION 30.

PARAMETERS: P_REPS AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 35(20) TEXT-002 FOR FIELD P_REPS.

SELECTION-SCREEN POSITION 60.

PARAMETERS: P_FUGR AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 65(20) TEXT-003 FOR FIELD P_FUGR.

SELECTION-SCREEN END OF LINE.

* Line 2

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: P_FUNC AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 5(20) TEXT-004 FOR FIELD P_FUNC.

SELECTION-SCREEN POSITION 30.

PARAMETERS: P_LDBA AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 35(20) TEXT-005 FOR FIELD P_LDBA.

SELECTION-SCREEN POSITION 60.

PARAMETERS: P_TRAN AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 65(20) TEXT-006 FOR FIELD P_TRAN.

SELECTION-SCREEN END OF LINE.

* Line 3

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: P_MSAG AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 5(20) TEXT-007 FOR FIELD P_MSAG.

SELECTION-SCREEN POSITION 30.

PARAMETERS: P_DOMA AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 35(20) TEXT-008 FOR FIELD P_DOMA.

SELECTION-SCREEN POSITION 60.

PARAMETERS: P_DTEL AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 65(20) TEXT-009 FOR FIELD P_DTEL.

SELECTION-SCREEN END OF LINE.

* Line 4

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: P_TABL AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 5(20) TEXT-010 FOR FIELD P_TABL.

SELECTION-SCREEN POSITION 30.

PARAMETERS: P_VIEW AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 35(20) TEXT-011 FOR FIELD P_VIEW.

SELECTION-SCREEN POSITION 60.

PARAMETERS: P_MCOB AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 65(20) TEXT-012 FOR FIELD P_MCOB.

SELECTION-SCREEN END OF LINE.

* Line 5

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: P_SHLP AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 5(20) TEXT-013 FOR FIELD P_SHLP.

SELECTION-SCREEN POSITION 30.

PARAMETERS: P_F21R AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 35(20) TEXT-014 FOR FIELD P_F21R.

SELECTION-SCREEN POSITION 60.

PARAMETERS: P_FORM AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 65(20) TEXT-015 FOR FIELD P_FORM.

SELECTION-SCREEN END OF LINE.

* Line 6

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: P_SSFO AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 5(20) TEXT-016 FOR FIELD P_SSFO.

SELECTION-SCREEN POSITION 30.

PARAMETERS: P_IDOC AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 35(20) TEXT-017 FOR FIELD P_IDOC.

SELECTION-SCREEN POSITION 60.

PARAMETERS: P_IEXT AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 65(20) TEXT-018 FOR FIELD P_IEXT.

SELECTION-SCREEN END OF LINE.

* Line 7

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: P_DYNP AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 5(20) TEXT-019 FOR FIELD P_DYNP.

SELECTION-SCREEN POSITION 30.

PARAMETERS: P_XDYN AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 35(20) TEXT-020 FOR FIELD P_XDYN.

SELECTION-SCREEN POSITION 60.

PARAMETERS: P_ENQU AS CHECKBOX DEFAULT 'X'.

SELECTION-SCREEN COMMENT 65(20) TEXT-021 FOR FIELD P_ENQU.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK B.

*selection-screen pushbutton /10(30) pubu user-command us03.

SELECTION-SCREEN END OF SCREEN 001.

SELECTION-SCREEN FUNCTION KEY 1.

TYPES: BEGIN OF T_E070,

TRKORR TYPE E070-TRKORR, " Transport Number "#EC *

TRFUNCTION TYPE E070-TRFUNCTION, " Request Type "#EC *

TRSTATUS TYPE E070-TRSTATUS, " Request Status "#EC *

KORRDEV TYPE E070-KORRDEV, " Request Category "#EC *

AS4USER TYPE E070-AS4USER, " Request Owner "#EC *

AS4DATE TYPE E070-AS4DATE, " Date of Transport "#EC *

STRKORR TYPE E070-STRKORR, " High-level Transp. "#EC *

END OF T_E070. "#EC *

TYPES: BEGIN OF T_EXTRACT. "#EC *

INCLUDE STRUCTURE ZOSIECOL. "#EC *

TYPES: END OF T_EXTRACT. "#EC *

TYPES: BEGIN OF TY_SUM, "#EC *

OBJTYPE TYPE E071-OBJECT, "#EC *

REPAIR TYPE I, "#EC *

CUST TYPE I, "#EC *

TOTAL TYPE I, "#EC *

END OF TY_SUM. "#EC *

DATA: I_E070 TYPE STANDARD TABLE OF T_E070. "#EC *

DATA: WA_E070 TYPE T_E070. "#EC *

DATA: I_EXTRACT TYPE STANDARD TABLE OF T_EXTRACT. "#EC *

DATA: WA_EXTRACT TYPE T_EXTRACT. "#EC *

DATA: I_TAB TYPE STANDARD TABLE OF TEXTPOOL. "#EC *

DATA: WA_TAB TYPE TEXTPOOL. "#EC *

DATA: I_SUM TYPE STANDARD TABLE OF TY_SUM. "#EC *

DATA: WA_SUM TYPE TY_SUM. "#EC *

DATA: W_TEXT TYPE SY-UCOMM. "#EC *

DATA: W_OBJ_NAME TYPE TRDIR-NAME. "#EC *

DATA: W_TIME1 TYPE I. "#EC *

DATA: W_TIME2 TYPE I. "#EC *

DATA: W_TIME_DIFF TYPE I. "#EC *

DATA: W_SAVE_COUNT TYPE I. "#EC *

DATA: W_EXT_COUNT TYPE I. "#EC *

DATA: W_COUNT TYPE I. "#EC *

DATA: W_TITLE1(21) VALUE 'OSI Upgrade Evaluator'. "#EC NOTEXT

DATA: W_TITLE2(22) VALUE 'Collect Custom Objects'. "#EC NOTEXT

*ranges: r_object for e071-object.

DATA: R_OBJECT LIKE RANGE OF E071-OBJECT.

DATA: WA_OBJECT TYPE RANGE OF E071-OBJECT WITH HEADER LINE. "#EC *

DATA: WA_BHDGD TYPE BHDGD, "#EC *

WA_D020T TYPE D020T, "#EC *

WA_DD01T TYPE DD01T, "#EC *

WA_DD02T TYPE DD02T, "#EC *

WA_DD04T TYPE DD04T, "#EC *

WA_DD20T TYPE DD20T, "#EC *

WA_DD25T TYPE DD25T, "#EC *

WA_DD30T TYPE DD30T, "#EC *

WA_E071 TYPE E071, "#EC *

WA_EDBAST TYPE EDBAST, "#EC *

WA_EDCIMT TYPE EDCIMT, "#EC *

WA_SSCRFIELDS TYPE SSCRFIELDS, "#EC *

WA_T100A TYPE T100A, "#EC *

WA_TADIR TYPE TADIR, "#EC *

WA_TFTIT TYPE TFTIT, "#EC *

WA_TLIBT TYPE TLIBT, "#EC *

WA_TRDIR TYPE TRDIR, "#EC *

WA_TSTCT TYPE TSTCT, "#EC *

WA_ZOSIECTL TYPE ZOSIECTL, "#EC *

WA_ZOSIECOL TYPE ZOSIECOL. "#EC *

AT SELECTION-SCREEN.

CASE SSCRFIELDS-UCOMM.

WHEN 'FC01'.

CALL SELECTION-SCREEN 001 STARTING AT 1 1.

ENDCASE.

AT SELECTION-SCREEN ON BLOCK B.

* perform load_object_types.

INITIALIZATION.

SELECT SINGLE *

INTO WA_ZOSIECTL

FROM ZOSIECTL WHERE OSITOOL = 'EVALUATOR'(022).

IF SY-SUBRC = 0.

S_TRKORR-SIGN = 'I'.

S_TRKORR-OPTION = 'BT'.

S_TRKORR-LOW = WA_ZOSIECTL-FROMREQNO.

S_TRKORR-HIGH = WA_ZOSIECTL-TOREQNO.

APPEND S_TRKORR. "#EC *

ENDIF.

SSCRFIELDS-FUNCTXT_01 = 'Object Type'(023).

TOP-OF-PAGE.

* perform batch-heading(rsbtchh0).

PERFORM BATCH-HEADING IN PROGRAM RSBTCHH0.

ULINE.

WRITE: / 'Object Types'(000),

41 'Repair'(046),

53 'Custom'(047),

66 'Total'(048).

ULINE.

END-OF-PAGE.

ULINE.

WRITE: / 'Copyright 2002 - Optimal Solutions Integration, Inc.'(024).

START-OF-SELECTION.

PERFORM INITIALIZATION.

PERFORM LOAD_OBJECT_TYPES.

PERFORM EXTRACT_DATA.

PERFORM SAVE_DATA.

PERFORM PRINT_SUMMARY.

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

*& Form extract_data

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM EXTRACT_DATA.

MOVE 'Extracting E070...'(049) TO W_TEXT.

PERFORM DISPLAY_STATUS USING W_TEXT.

PERFORM EXTRACT_E070.

MOVE 'Extracting E071...'(050) TO W_TEXT.

PERFORM DISPLAY_STATUS USING W_TEXT.

PERFORM EXTRACT_E071.

ENDFORM. " extract_data

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

*& Form display_status

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

* text

*----------------------------------------------------------------------*

* -->P_W_TEXT text

*----------------------------------------------------------------------*

FORM DISPLAY_STATUS USING P_W_TEXT. "#EC *

CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'

EXPORTING

* PERCENTAGE = 0

TEXT = P_W_TEXT.

IF SY-BATCH = 'X'.

MESSAGE I000 WITH P_W_TEXT.

ELSE.

* do commit work every so often to avoid time out if run online

GET TIME FIELD W_TIME2.

W_TIME_DIFF = W_TIME2 - W_TIME1.

IF W_TIME_DIFF > 45 OR W_TIME_DIFF < 0.

COMMIT WORK.

GET TIME FIELD W_TIME1.

ENDIF.

ENDIF.

ENDFORM. " display_status

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

*& Form extract_e070

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM EXTRACT_E070.

SELECT TRKORR

TRFUNCTION

TRSTATUS

KORRDEV

AS4USER

AS4DATE

STRKORR

FROM E070

INTO TABLE I_E070

WHERE TRKORR IN S_TRKORR

* and trstatus = 'R' "Uncomment this line for real run

AND ( KORRDEV IN S_CATEG ).

ENDFORM. " extract_e070

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

*& Form extract_e071

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM EXTRACT_E071.

SELECT PGMID

OBJECT

OBJ_NAME

TRKORR

AS4POS

FROM E071

INTO TABLE I_EXTRACT

FOR ALL ENTRIES IN I_E070

WHERE TRKORR = I_E070-TRKORR

AND OBJECT IN R_OBJECT

AND OBJ_NAME IN S_OBJNM

AND OBJFUNC = SPACE.

IF SY-SUBRC = 0.

LOOP AT I_EXTRACT INTO WA_EXTRACT WHERE PGMID = 'LIMU'(025).

IF WA_EXTRACT-OBJTYPE = 'REPS'(026).

WA_EXTRACT-PGMID = 'R3TR'(027).

WA_EXTRACT-OBJTYPE = 'PROG'(028).

MODIFY I_EXTRACT FROM WA_EXTRACT.

ENDIF.

ENDLOOP.

SORT I_EXTRACT BY OBJTYPE OBJECT TASKNO DESCENDING.

DELETE ADJACENT DUPLICATES FROM I_EXTRACT COMPARING OBJTYPE

OBJECT.

MOVE 'Collecting object characteristics...'(051) TO W_TEXT.

PERFORM DISPLAY_STATUS USING W_TEXT.

LOOP AT I_EXTRACT INTO WA_EXTRACT.

ADD 1 TO W_COUNT.

IF W_COUNT > 99.

MOVE 'Collecting object characteristics...'(051) TO W_TEXT.

PERFORM DISPLAY_STATUS USING W_TEXT.

CLEAR W_COUNT.

ENDIF.

READ TABLE I_E070 INTO WA_E070

WITH KEY TRKORR = WA_EXTRACT-TASKNO

BINARY SEARCH.

IF SY-SUBRC = 0.

WA_EXTRACT-REQTYPE = WA_E070-TRFUNCTION.

WA_EXTRACT-REQSTATUS = WA_E070-TRSTATUS.

WA_EXTRACT-REQNO = WA_E070-KORRDEV.

WA_EXTRACT-CHGUSER = WA_E070-AS4USER.

WA_EXTRACT-CHGDATE = WA_E070-AS4DATE.

ENDIF.

CASE WA_EXTRACT-OBJTYPE.

WHEN 'PROG'(028).

PERFORM GET_PROGRAM_TYPE.

IF SY-SUBRC <> 0.

DELETE TABLE I_EXTRACT FROM WA_EXTRACT.

CONTINUE.

ENDIF.

PERFORM GET_PROGRAM_DESC.

WHEN 'TABL'(029).

PERFORM GET_TABLE_DESC.

WHEN 'FUGR'(030).

PERFORM GET_FUNCGROUP_DESC.

WHEN 'MSAG'(031).

PERFORM GET_MSGAREA_DESC.

WHEN 'DOMA'(032).

PERFORM GET_DOMAIN_DESC.

WHEN 'DTEL'(033).

PERFORM GET_ROLLNAME_DESC.

WHEN 'TRAN'(034).

PERFORM GET_TRANSACTION_DESC.

WHEN 'SHLP'(035).

PERFORM GET_SEARCHHELP_DESC.

WHEN 'VIEW'(036).

PERFORM GET_VIEW_DESC.

WHEN 'MCOB'(037).

PERFORM GET_MATCHCODE_DESC.

WHEN 'FUNC'(038).

PERFORM GET_FUNCTION_DESC.

WHEN 'DYNP'(039).

PERFORM GET_DYNPRO_DESC.

WHEN 'IDOC'(017).

PERFORM GET_IDOC_DESC.

WHEN 'IEXT'(040).

PERFORM GET_IDOCEXT_DESC.

ENDCASE.

PERFORM GET_DEVELOPMENT_CLASS.

MODIFY I_EXTRACT FROM WA_EXTRACT.

ENDLOOP.

ENDIF.

ENDFORM. " extract_e071

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

*& Form get_program_desc

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

* text

*----------------------------------------------------------------------*

* -->P_I_EXTRACT_OBJ_NAME text

*----------------------------------------------------------------------*

FORM GET_PROGRAM_DESC.

READ TEXTPOOL WA_EXTRACT-OBJECT INTO I_TAB LANGUAGE SY-LANGU.

IF SY-SUBRC = 0.

READ TABLE I_TAB INTO WA_TAB WITH KEY ID = 'R'.

IF SY-SUBRC = 0.

WA_EXTRACT-OBJ_DESC = WA_TAB-ENTRY(60).

ENDIF.

ENDIF.

ENDFORM. " get_program_desc

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

*& Form get_program_type

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

* text

*----------------------------------------------------------------------*

* -->P_I_EXTRACT_OBJ_NAME text

*----------------------------------------------------------------------*

FORM GET_PROGRAM_TYPE.

SELECT SINGLE SUBC INTO WA_EXTRACT-PROGTYPE

FROM TRDIR

WHERE NAME = WA_EXTRACT-OBJECT.

ENDFORM. " get_program_type

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

*& Form save_data

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM SAVE_DATA.

DESCRIBE TABLE I_EXTRACT LINES W_SAVE_COUNT.

IF W_SAVE_COUNT > 0.

MOVE 'Deleting old data...'(052) TO W_TEXT.

PERFORM DISPLAY_STATUS USING W_TEXT.

DELETE FROM ZOSIECOL WHERE PGMID LIKE '%'.

COMMIT WORK.

MOVE 'Saving data...'(053) TO W_TEXT.

PERFORM DISPLAY_STATUS USING W_TEXT.

INSERT ZOSIECOL FROM TABLE I_EXTRACT ACCEPTING DUPLICATE KEYS."#EC *

SELECT SINGLE * "#EC *

FROM ZOSIECTL

WHERE OSITOOL = 'EVALUATOR'(022).

IF SY-SUBRC = 0.

UPDATE ZOSIECTL SET RUNDATE = SY-DATUM

RUNTIME = SY-UZEIT

FROMREQNO = S_TRKORR-LOW

TOREQNO = S_TRKORR-HIGH

WHERE OSITOOL = 'EVALUATOR'(022).

ELSE.

WA_ZOSIECTL-OSITOOL = 'EVALUATOR'(022).

WA_ZOSIECTL-RUNDATE = SY-DATUM.

WA_ZOSIECTL-RUNTIME = SY-UZEIT.

WA_ZOSIECTL-FROMREQNO = S_TRKORR-LOW.

WA_ZOSIECTL-TOREQNO = S_TRKORR-HIGH.

INSERT ZOSIECTL FROM WA_ZOSIECTL.

ENDIF.

COMMIT WORK.

ELSE.

MESSAGE I004.

ENDIF.

ENDFORM. " save_data

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

*& Form get_development_class

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM GET_DEVELOPMENT_CLASS.

CASE WA_EXTRACT-OBJECT.

WHEN 'PROG'(028).

W_OBJ_NAME = WA_EXTRACT-OBJECT.

CALL FUNCTION 'RS_PROGRAM_GET_DEVCLASS'

EXPORTING

PROGNAME = W_OBJ_NAME

IMPORTING

* ADIR =

DEVCLASS = WA_EXTRACT-DEVCLASS.

WHEN OTHERS.

SELECT SINGLE DEVCLASS INTO WA_EXTRACT-DEVCLASS

FROM TADIR

WHERE PGMID = WA_EXTRACT-PGMID

AND OBJECT = WA_EXTRACT-OBJTYPE

AND OBJ_NAME = WA_EXTRACT-OBJECT.

ENDCASE.

ENDFORM. " get_development_class

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

*& Form get_table_desc

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM GET_TABLE_DESC.

SELECT DDTEXT INTO WA_EXTRACT-OBJ_DESC

FROM DD02T UP TO 1 ROWS

WHERE TABNAME = WA_EXTRACT-OBJECT

AND DDLANGUAGE = SY-LANGU

AND AS4LOCAL = 'A'.

ENDSELECT.

ENDFORM. " get_table_desc

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

*& Form get_funcgroup_desc

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM GET_FUNCGROUP_DESC.

SELECT SINGLE AREAT INTO WA_EXTRACT-OBJ_DESC

FROM TLIBT

WHERE SPRAS = SY-LANGU

AND AREA = WA_EXTRACT-OBJECT.

ENDFORM. " get_funcgroup_desc

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

*& Form get_msgarea_desc

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM GET_MSGAREA_DESC.

SELECT SINGLE STEXT INTO WA_EXTRACT-OBJ_DESC

FROM T100A

WHERE ARBGB = WA_EXTRACT-OBJECT.

ENDFORM. " get_msgarea_desc

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

*& Form get_domain_desc

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM GET_DOMAIN_DESC.

SELECT DDTEXT INTO WA_EXTRACT-OBJ_DESC

FROM DD01T UP TO 1 ROWS

WHERE DOMNAME = WA_EXTRACT-OBJECT

AND DDLANGUAGE = SY-LANGU

AND AS4LOCAL = 'A'(041).

ENDSELECT.

ENDFORM. " get_domain_desc

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

*& Form get_rollname_desc

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM GET_ROLLNAME_DESC.

SELECT DDTEXT INTO WA_EXTRACT-OBJ_DESC

FROM DD04T UP TO 1 ROWS

WHERE ROLLNAME = WA_EXTRACT-OBJECT

AND DDLANGUAGE = SY-LANGU

AND AS4LOCAL = 'A'(041).

ENDSELECT.

ENDFORM. " get_rollname_desc

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

*& Form load_object_types

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM LOAD_OBJECT_TYPES.

IF P_PROG IS INITIAL AND

P_REPS IS INITIAL AND

P_FUGR IS INITIAL AND

P_FUNC IS INITIAL AND

P_LDBA IS INITIAL AND

P_TRAN IS INITIAL AND

P_MSAG IS INITIAL AND

P_DOMA IS INITIAL AND

P_DTEL IS INITIAL AND

P_TABL IS INITIAL AND

P_VIEW IS INITIAL AND

P_MCOB IS INITIAL AND

P_SHLP IS INITIAL AND

P_F21R IS INITIAL AND

P_FORM IS INITIAL AND

P_SSFO IS INITIAL AND

P_IDOC IS INITIAL AND

P_IEXT IS INITIAL AND

P_DYNP IS INITIAL AND

P_XDYN IS INITIAL AND

P_ENQU IS INITIAL.

MESSAGE E007.

ENDIF.

CLEAR WA_OBJECT.

WA_OBJECT-SIGN = 'I'.

WA_OBJECT-OPTION = 'EQ'.

IF P_PROG = 'X'.

WA_OBJECT-LOW = 'PROG'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_REPS = 'X'.

WA_OBJECT-LOW = 'REPS'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_FUGR = 'X'.

WA_OBJECT-LOW = 'FUGR'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_FUNC = 'X'.

WA_OBJECT-LOW = 'FUNC'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_LDBA = 'X'.

WA_OBJECT-LOW = 'LDBA'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_TRAN = 'X'.

WA_OBJECT-LOW = 'TRAN'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_MSAG = 'X'.

WA_OBJECT-LOW = 'MSAG'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_DOMA = 'X'.

WA_OBJECT-LOW = 'DOMA'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_DTEL = 'X'.

WA_OBJECT-LOW = 'DTEL'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_TABL = 'X'.

WA_OBJECT-LOW = 'TABL'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_VIEW = 'X'.

WA_OBJECT-LOW = 'VIEW'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_MCOB = 'X'.

WA_OBJECT-LOW = 'MCOB'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_SHLP = 'X'.

WA_OBJECT-LOW = 'SHLP'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_F21R = 'X'.

WA_OBJECT-LOW = 'F21R'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_FORM = 'X'.

WA_OBJECT-LOW = 'FORM'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_SSFO = 'X'.

WA_OBJECT-LOW = 'SSFO'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_IDOC = 'X'.

WA_OBJECT-LOW = 'IDOC'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_IEXT = 'X'.

WA_OBJECT-LOW = 'IEXT'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_DYNP = 'X'.

WA_OBJECT-LOW = 'DYNP'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_XDYN = 'X'.

WA_OBJECT-LOW = 'XDYN'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

IF P_ENQU = 'X'.

WA_OBJECT-LOW = 'ENQU'.

APPEND WA_OBJECT TO R_OBJECT.

ENDIF.

ENDFORM. " load_object_types

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

*& Form get_transaction_desc

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM GET_TRANSACTION_DESC.

SELECT SINGLE TTEXT INTO WA_EXTRACT-OBJ_DESC

FROM TSTCT

WHERE SPRSL = SY-LANGU

AND TCODE = WA_EXTRACT-OBJECT.

ENDFORM. " get_transaction_desc

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

*& Form get_searchhelp_desc

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM GET_SEARCHHELP_DESC.

SELECT DDTEXT INTO WA_EXTRACT-OBJ_DESC

FROM DD30T UP TO 1 ROWS

WHERE SHLPNAME = WA_EXTRACT-OBJECT

AND DDLANGUAGE = SY-LANGU

AND AS4LOCAL = 'A'(041).

ENDSELECT.

ENDFORM. " get_searchhelp_desc

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

*& Form get_view_desc

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM GET_VIEW_DESC.

SELECT DDTEXT INTO WA_EXTRACT-OBJ_DESC

FROM DD25T UP TO 1 ROWS

WHERE DDLANGUAGE = SY-LANGU

AND VIEWNAME = WA_EXTRACT-OBJECT

AND AS4LOCAL = 'A'(041).

ENDSELECT.

ENDFORM. " get_view_desc

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

*& Form get_matchcode_desc

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM GET_MATCHCODE_DESC.

SELECT MCTEXT INTO WA_EXTRACT-OBJ_DESC

FROM DD20T UP TO 1 ROWS

WHERE DDLANGUAGE = SY-LANGU

AND MCONAME = WA_EXTRACT-OBJECT

AND AS4LOCAL = 'A'(041).

ENDSELECT.

ENDFORM. " get_matchcode_desc

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

*& Form get_function_desc

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM GET_FUNCTION_DESC.

SELECT SINGLE STEXT INTO WA_EXTRACT-OBJ_DESC

FROM TFTIT

WHERE SPRAS = SY-LANGU

AND FUNCNAME = WA_EXTRACT-OBJECT.

ENDFORM. " get_function_desc

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

*& Form get_dynpro_desc

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM GET_DYNPRO_DESC. "#EC NEEDED

* select single dtxt into i_extract-obj_desc

* from d020t

* where prog = i_extract-object

* and dynr = ???

* and lang = sy-langu.

ENDFORM. " get_dynpro_desc

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

*& Form get_idoc_desc

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM GET_IDOC_DESC.

SELECT SINGLE DESCRP INTO WA_EXTRACT-OBJ_DESC

FROM EDBAST

WHERE IDOCTYP = WA_EXTRACT-OBJECT

AND LANGUA = SY-LANGU.

ENDFORM. " get_idoc_desc

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

*& Form get_idocext_desc

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM GET_IDOCEXT_DESC.

SELECT SINGLE DESCRP INTO WA_EXTRACT-OBJ_DESC

FROM EDCIMT

WHERE CIMTYP = WA_EXTRACT-OBJECT

AND LANGUA = SY-LANGU.

ENDFORM. " get_idocext_desc

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

*& Form initialization

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM INITIALIZATION.

MOVE: ' ' TO BHDGD-BUKRS,

' ' TO BHDGD-MANDT,

'0' TO BHDGD-INIFL,

SY-LINSZ TO BHDGD-LINES,

SY-UNAME TO BHDGD-UNAME,

SY-REPID TO BHDGD-REPID,

W_TITLE1 TO BHDGD-LINE1,

W_TITLE2 TO BHDGD-LINE2,

SPACE TO BHDGD-SEPAR.

ENDFORM. " initialization

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

*& Form print_summary

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

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM PRINT_SUMMARY.

DATA: L_DESC(30).

LOOP AT I_EXTRACT INTO WA_EXTRACT.

CLEAR I_SUM.

WA_SUM-OBJTYPE = WA_EXTRACT-OBJTYPE.

IF WA_EXTRACT-REQTYPE = 'R'(042).

WA_SUM-REPAIR = 1.

ELSE.

WA_SUM-CUST = 1.

ENDIF.

WA_SUM-TOTAL = 1.

COLLECT WA_SUM INTO I_SUM.

ENDLOOP.

SORT I_SUM.

LOOP AT I_SUM INTO WA_SUM.

CLEAR L_DESC.

CASE WA_SUM-OBJTYPE.

WHEN 'PROG'. L_DESC = 'Program'(001).

WHEN 'LDBA'. L_DESC = 'Logical Database'(005).

WHEN 'ENQU'. L_DESC = 'Lock Object'(021).

WHEN 'MSAG'. L_DESC = 'Message Class'(043).

WHEN 'TRAN'. L_DESC = 'Transaction'(006).

WHEN 'FUGR'. L_DESC = 'Function Group'(003).

WHEN 'DOMA'. L_DESC = 'Domain'(008).

WHEN 'DTEL'. L_DESC = 'Data Element'(009).

WHEN 'TABL'. L_DESC = 'Table'(010).

WHEN 'VIEW'. L_DESC = 'View'(011).

WHEN 'MCOB'. L_DESC = 'Matchcode Object'(012).

WHEN 'SHLP'. L_DESC = 'Search Help'(013).

WHEN 'IDOC'. L_DESC = 'IDOC'(017).

WHEN 'IEXT'. L_DESC = 'IDOC Extension'(018).

WHEN 'DYNP'. L_DESC = 'Screen'(019).

WHEN 'XDYN'. L_DESC = 'Screen w/ Field-Exit'(044).

ENDCASE.

WRITE: / WA_SUM-OBJTYPE,

L_DESC,

WA_SUM-REPAIR,

WA_SUM-CUST,

WA_SUM-TOTAL.

AT LAST.

SUM.

SKIP 1.

CLEAR WA_SUM-OBJTYPE.

L_DESC = '*** Total'(045).

WRITE: / WA_SUM-OBJTYPE,

L_DESC,

WA_SUM-REPAIR,

WA_SUM-CUST,

WA_SUM-TOTAL.

ENDAT.

ENDLOOP.

W_COUNT = 64 - SY-LINNO.

IF W_COUNT > 2.

DO W_COUNT TIMES.

SKIP 1.

ENDDO.

ENDIF.

ENDFORM. " print_summary

*Text elements

*----------------------------------------------------------

* 000 Object Types

* 001 Program

* 002 Report

* 003 Function Group

* 004 Function

* 005 Logical Database

* 006 Transaction

* 007 Message Area

* 008 Domain

* 009 Data Element

* 010 Table

* 011 View

* 012 Matchcode Object

* 013 Search Help

* 014 Field Selection

* 015 Layout Set

* 016 Smart Form

* 017 IDOC

* 018 IDOC Extension

* 019 Screen

* 020 Screen w/ field-exit

* 021 Lock Object

* 022 EVALUATOR

* 023 Object Type

* 025 LIMU

* 026 REPS

* 027 R3TR

* 028 PROG

* 029 TABL

* 030 FUGR

* 031 MSAG

* 032 DOMA

* 033 DTEL

* 034 TRAN

* 035 SHLP

* 036 VIEW

* 037 MCOB

* 038 FUNC

* 039 DYNP

* 040 IEXT

* 041 A

* 042 R

* 043 Message Class

* 044 Screen w/ Field-Exit

* 045 *** Total

* 046 Repair

* 047 Custom

* 048 Total

* 049 Extracting E070...

* 050 Extracting E071...

* 051 Collecting object characteristics...

* 052 Deleting old data...

* 053 Saving data...

*Selection texts

*----------------------------------------------------------

* P_DOMA Domain

* P_DTEL Data Element

* P_DYNP Dynpro

* P_ENQU Enquiry

* P_F21R Field Selection

* P_FORM Form

* P_FUGR Function Group

* P_FUNC Function.

* P_IDOC IDOC

* P_IEXT Text

* P_LDBA Logical Database

* P_MCOB Match Code Object

* P_MSAG Message Area

* P_PROG Program

* P_REPS Report

* P_SHLP Search Help

* P_SSFO Smartform

* P_TABL Table

* P_TRAN Transaction

* P_VIEW View

* P_XDYN Screen Dynrpro

* S_CATEG Category

* S_OBJNM Object Name

* S_TRKORR Transport Number

*Messages

*----------------------------------------------------------

*

* Message class: ZX

*000 & & & &

*004 No modifications have occurred

*007 Must select at least one object type