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
Error rendering macro 'code': Invalid value specified for parameter 'lang'
 ************************************************************************
REPORT  ZTL_REMOTECOMPARISON.
* include ztl_bce017l_global.
*&---------------------------------------------------------------------*
*&  Include           ZTL_BCE017L_GLOBAL
*&---------------------------------------------------------------------*
************************************************************************
************************************************************************
*                        TYPES
************************************************************************
TYPE-POOLS: SLIS, VRM, TUMLS.
TYPES: BEGIN OF TY_INCLUDE_TAB,
        INCL_NAME LIKE RS38M-PROGRAMM,
       END   OF TY_INCLUDE_TAB.
************************************************************************
*                       INTERNAL TABLES & Tables
************************************************************************
TABLES: TADIR, TRDIR, ENLFDIR.                              "#EC NEEDED
DATA: T_LIST            TYPE VRM_VALUES,
      T_OBJECT          TYPE STANDARD TABLE OF TADIR,
      T_CUR_SYS_VER     TYPE VRSD OCCURS 0 WITH HEADER LINE,
      T_TARGET_SYS_VER  TYPE VRSD OCCURS 0 WITH HEADER LINE,
      T_FINAL_LOG       TYPE ZVERSION_CHECK OCCURS 0 WITH HEADER LINE,
      T_FUNC_MODULE     TYPE RS38L_INCL OCCURS 0 WITH HEADER LINE,
      T_INCLUDE_TAB      TYPE TRDIR OCCURS 0 WITH HEADER LINE.
************************************************************************
*                        WORK AREA
************************************************************************
DATA: WA_NAME         TYPE VRM_ID,
      WA_OBJECT       TYPE TADIR,
      WA_CURR_VERSION TYPE VRSD,
      WA_TRGT_VERSION TYPE VRSD,
      WA_FINAL_LOG    TYPE ZVERSION_CHECK,
      WA_FUNC_MODULE  TYPE RS38L_INCL,
      WA_VALUE        LIKE LINE OF T_LIST,
      WA_INCLUDE_TAB  TYPE TRDIR.
************************************************************************
*                       CONSTANTS
************************************************************************
CONSTANTS: C_X         TYPE C         VALUE 'X',
           C_SUCC      TYPE ICONNAME  VALUE '<at:var at:name="01" />',"#EC *
           C_FAIL      TYPE ICONNAME  VALUE '<at:var at:name="02" />',
           C_FINAL_LOG TYPE TABNAME  VALUE 'ZVERSION_CHECK',
           C_FUGR      TYPE CHAR4         VALUE 'FUGR',
           C_PROG      TYPE CHAR4         VALUE 'PROG'.     "#EC NEEDED
************************************************************************
*                       VARIABLES
************************************************************************
DATA: V_INFO_OBJECT     LIKE EUOBJ-ID,
      V_FIELD           TYPE DYNFNAM,
      V_DEVCLASS        LIKE TADIR-DEVCLASS,
      V_EXECUTE         TYPE C,
      V_DESTINATION     TYPE RFCDES-RFCDEST,
      V_RFCDES          TYPE RFCDES-RFCDEST,
      V_CURR_SYSTEM     TYPE RFCDES-RFCDEST,
      V_OBJECT          TYPE TROBJTYPE,
      V_OBJECT_NAME     TYPE SOBJ_NAME,
      V_PRG_NAME        TYPE TFDIR-PNAME,
      V_FLAG_FIRST      TYPE C,
      V_CURSOR          TYPE CHAR20.
************************************************************************
*                           ALV Variables                              *
************************************************************************
DATA:  T_FIELD_CAT_1        TYPE SLIS_T_FIELDCAT_ALV,
       T_EVENTS_1           TYPE SLIS_T_EVENT,              "#EC NEEDED
       WA_LAY_OUT_1         TYPE SLIS_LAYOUT_ALV,
       WA_FIELD_CAT         TYPE SLIS_FIELDCAT_ALV,
       WA_EVENT             TYPE SLIS_ALV_EVENT,
       WA_PRINT             TYPE SLIS_PRINT_ALV.

DATA : T_FIELDCAT          TYPE LVC_T_FCAT,
       WA_FIELDCAT         TYPE LVC_S_FCAT.
CONSTANTS : C_FUN  TYPE CHAR3 VALUE 'FUN',
            C_PRG  TYPE CHAR3 VALUE 'PRG',
            C_STR  TYPE CHAR3 VALUE 'STR',
            C_DEV  TYPE CHAR3 VALUE 'DEV',
            C_TAB  TYPE CHAR3 VALUE 'TAB',
            C_STU  TYPE CHAR3 VALUE 'STU',
            C_VIE  TYPE CHAR3 VALUE 'VIE',
            C_DAT  TYPE CHAR3 VALUE 'DAT',
            C_TYP  TYPE CHAR3 VALUE 'TYP',
            C_CLS  TYPE CHAR3 VALUE 'CLS',
            C_GRP  TYPE CHAR3 VALUE 'GRP',
            C_DOM  TYPE CHAR3 VALUE 'DOM',
            C_SCR  TYPE CHAR3 VALUE 'SCR',
            C_LCK  TYPE CHAR3 VALUE 'LCK',
            C_ZERO TYPE CHAR1 VALUE '0',
            C_ONE  TYPE CHAR1 VALUE '1',
            C_DYN  TYPE CHAR4 VALUE 'DYNP',
            C_S    TYPE CHAR1 VALUE 'S',
            C_C    TYPE CHAR1 VALUE 'C',
            C_CUAD TYPE CHAR4 VALUE 'CUAD',
            C_FB   TYPE CHAR2 VALUE 'FB',
            C_PF   TYPE CHAR5 VALUE 'P_FUN'.
***********************************************************************
*             SELECTION SCREEN
***********************************************************************
SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_OBJECT  TYPE CHAR30 AS LISTBOX
                                 VISIBLE LENGTH 30 OBLIGATORY
                                 USER-COMMAND STATUS.
SELECTION-SCREEN END OF BLOCK BLK1.
*Development Class*
SELECTION-SCREEN BEGIN OF BLOCK BLK2 WITH FRAME TITLE TEXT-002.
PARAMETER: P_DEVCLS TYPE DEVCLASS MODIF ID DEV.
SELECTION-SCREEN END OF BLOCK BLK2.
*Program*
SELECTION-SCREEN BEGIN OF BLOCK BLK3 WITH FRAME TITLE TEXT-003.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_ALPRG TYPE C RADIOBUTTON GROUP GRP2 MODIF ID PRG.
SELECTION-SCREEN COMMENT 12(25) TEXT-007 FOR FIELD RD_ALPRG
MODIF ID PRG.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_PROG TYPE C RADIOBUTTON GROUP GRP2 MODIF ID PRG.
SELECTION-SCREEN COMMENT 12(20) TEXT-008 FOR FIELD RD_PROG MODIF ID PRG.
PARAMETER: P_PRG  TYPE RS38M-PROGRAMM MODIF ID PRG.
SELECTION-SCREEN END OF LINE.
*Function Module*
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_ALFUN TYPE C RADIOBUTTON GROUP GRP2 MODIF ID FUN.
SELECTION-SCREEN COMMENT 12(27) TEXT-011 FOR FIELD RD_ALFUN
MODIF ID FUN.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_FUNC TYPE C RADIOBUTTON GROUP GRP2 MODIF ID FUN.
SELECTION-SCREEN COMMENT 12(20) TEXT-009 FOR FIELD RD_FUNC MODIF ID FUN.
PARAMETER: P_FUN  TYPE RS38L-NAME MODIF ID FUN.
SELECTION-SCREEN END OF LINE.
*Function Group*
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_FUGR TYPE C RADIOBUTTON GROUP GRP2 MODIF ID FUN.
SELECTION-SCREEN COMMENT 12(20) TEXT-013 FOR FIELD RD_FUGR MODIF ID FUN.
PARAMETER: P_FUNG  TYPE RS38L-NAME MODIF ID FUN.
SELECTION-SCREEN END OF LINE.

*Database table*
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_ALTAB TYPE C RADIOBUTTON GROUP GRP2 MODIF ID TAB.
SELECTION-SCREEN COMMENT 12(27) TEXT-012 FOR FIELD RD_ALTAB
MODIF ID TAB.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_TABL TYPE C RADIOBUTTON GROUP GRP2 MODIF ID TAB.
SELECTION-SCREEN COMMENT 12(20) TEXT-010 FOR FIELD RD_TABL MODIF ID TAB.
PARAMETER: P_TAB  TYPE RSRD1-TBMA_VAL MODIF ID TAB.
SELECTION-SCREEN END OF LINE.
*Structure*
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_ALSTR TYPE C RADIOBUTTON GROUP GRP2 MODIF ID STU.
SELECTION-SCREEN COMMENT 12(27) TEXT-014 FOR FIELD RD_ALSTR
MODIF ID STU.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_STRU TYPE C RADIOBUTTON GROUP GRP2 MODIF ID STU.
SELECTION-SCREEN COMMENT 12(20) TEXT-015 FOR FIELD RD_STRU MODIF ID STU.
PARAMETER: P_STR  TYPE RSRD1-DDTYPE_VAL MODIF ID STU.
SELECTION-SCREEN END OF LINE.
*View*
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_ALVIE TYPE C RADIOBUTTON GROUP GRP2 MODIF ID VIE.
SELECTION-SCREEN COMMENT 12(27) TEXT-016 FOR FIELD RD_ALVIE
MODIF ID VIE.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_VIE TYPE C RADIOBUTTON GROUP GRP2 MODIF ID VIE.
SELECTION-SCREEN COMMENT 12(20) TEXT-017 FOR FIELD RD_VIE MODIF ID VIE.
PARAMETER: P_VIEW  TYPE RSRD1-VIMA_VAL MODIF ID VIE.
SELECTION-SCREEN END OF LINE.
*Data Element*
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_ALDAT TYPE C RADIOBUTTON GROUP GRP2 MODIF ID DAT.
SELECTION-SCREEN COMMENT 12(27) TEXT-018 FOR FIELD RD_ALDAT
MODIF ID DAT.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_DAT TYPE C RADIOBUTTON GROUP GRP2 MODIF ID DAT.
SELECTION-SCREEN COMMENT 12(20) TEXT-019 FOR FIELD RD_DAT MODIF ID DAT.
PARAMETER: P_DATA  TYPE RSRD1-DDTYPE_VAL MODIF ID DAT.
SELECTION-SCREEN END OF LINE.
*Table Type*
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_ALTYP TYPE C RADIOBUTTON GROUP GRP2 MODIF ID TYP.
SELECTION-SCREEN COMMENT 12(27) TEXT-020 FOR FIELD RD_ALTYP
MODIF ID TYP.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_TYPE TYPE C RADIOBUTTON GROUP GRP2 MODIF ID TYP.
SELECTION-SCREEN COMMENT 12(20) TEXT-021 FOR FIELD RD_TYPE MODIF ID TYP.
PARAMETER: P_TTYPE  TYPE RSRD1-DDTYPE_VAL MODIF ID TYP.
SELECTION-SCREEN END OF LINE.
*Class/Interface*
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_ALCLS TYPE C RADIOBUTTON GROUP GRP2 MODIF ID CLS.
SELECTION-SCREEN COMMENT 12(27) TEXT-022 FOR FIELD RD_ALCLS
MODIF ID CLS.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_CLS TYPE C RADIOBUTTON GROUP GRP2 MODIF ID CLS.
SELECTION-SCREEN COMMENT 12(20) TEXT-023 FOR FIELD RD_CLS MODIF ID CLS.
PARAMETER: P_CLASS TYPE RSRD1-DDTYPE_VAL MODIF ID CLS.
SELECTION-SCREEN END OF LINE.
*Type Group*
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_ALGRP TYPE C RADIOBUTTON GROUP GRP2 MODIF ID GRP.
SELECTION-SCREEN COMMENT 12(27) TEXT-024 FOR FIELD RD_ALGRP
MODIF ID GRP.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_GRP TYPE C RADIOBUTTON GROUP GRP2 MODIF ID GRP.
SELECTION-SCREEN COMMENT 12(20) TEXT-025 FOR FIELD RD_GRP MODIF ID GRP.
PARAMETER: P_TYGRP TYPE RSRD1-TYMA_VAL MODIF ID GRP.
SELECTION-SCREEN END OF LINE.
*Domain*
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_ALDOM TYPE C RADIOBUTTON GROUP GRP2 MODIF ID DOM.
SELECTION-SCREEN COMMENT 12(27) TEXT-026 FOR FIELD RD_ALDOM
MODIF ID DOM.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_DOM TYPE C RADIOBUTTON GROUP GRP2 MODIF ID DOM.
SELECTION-SCREEN COMMENT 12(20) TEXT-027 FOR FIELD RD_DOM MODIF ID DOM.
PARAMETER: P_DOMAIN TYPE RSRD1-DOMA_VAL MODIF ID DOM.
SELECTION-SCREEN END OF LINE.
*Search Help*
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_ALSCR TYPE C RADIOBUTTON GROUP GRP2 MODIF ID SCR.
SELECTION-SCREEN COMMENT 12(27) TEXT-028 FOR FIELD RD_ALSCR
MODIF ID SCR.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_SCR TYPE C RADIOBUTTON GROUP GRP2 MODIF ID SCR.
SELECTION-SCREEN COMMENT 12(20) TEXT-029 FOR FIELD RD_SCR MODIF ID SCR.
PARAMETER: P_SCRHLP TYPE RSRD1-SHMA_VAL MODIF ID SCR.
SELECTION-SCREEN END OF LINE.
*Lock Object*
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_ALCK TYPE C RADIOBUTTON GROUP GRP2 MODIF ID LCK.
SELECTION-SCREEN COMMENT 12(27) TEXT-030 FOR FIELD RD_ALCK
MODIF ID LCK.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_LCK TYPE C RADIOBUTTON GROUP GRP2 MODIF ID LCK.
SELECTION-SCREEN COMMENT 12(20) TEXT-031 FOR FIELD RD_LCK MODIF ID LCK.
PARAMETER: P_LCKOBJ TYPE RSRD1-ENQU_VAL MODIF ID LCK.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK BLK3.
*Target system*
SELECTION-SCREEN BEGIN OF BLOCK BLK4 WITH FRAME TITLE TEXT-004.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_TAR TYPE C RADIOBUTTON GROUP GRP1.
SELECTION-SCREEN COMMENT 12(20) TEXT-005 FOR FIELD RD_TAR.
PARAMETER: P_TARGET TYPE VERS_DEST-SYSNAME.
SELECTION-SCREEN END OF LINE.
*RFC destination*
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER: RD_RFC TYPE C RADIOBUTTON GROUP GRP1.
SELECTION-SCREEN COMMENT 12(20) TEXT-006 FOR FIELD RD_RFC.
PARAMETER: P_RFCDES TYPE VERS_DEST-RFCDEST.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK BLK4.

* include ztl_bce017l_forms.
***********************************************************************
*            INITIALIZATION
***********************************************************************
INITIALIZATION.
  PERFORM DISABLE_ALL_OPTIONS.
***********************************************************************
*            AT SELECTION SCREEN OUTPUT
***********************************************************************
AT SELECTION-SCREEN OUTPUT.
  PERFORM SEL_SCREEN_OUTPUT.
***********************************************************************
*            AT SELECTION SCREEN
***********************************************************************
AT SELECTION-SCREEN.
  PERFORM CHECK_INPUT_DATA.
***********************************************************************
*             START OF SELECTION
***********************************************************************
START-OF-SELECTION.
  CHECK V_EXECUTE EQ C_X.
  PERFORM SELECT_DATA_TADIR.
  IF NOT T_OBJECT[] IS INITIAL.
*Get Current system*
    PERFORM READ_SYSTEM USING SY-SYSID CHANGING V_CURR_SYSTEM.
*Check for Request mismatch (Tables and Programs)*
    LOOP AT T_OBJECT INTO WA_OBJECT WHERE OBJECT NE C_FUGR.
      PERFORM CHECK_REQUEST_MISMATCH.
*Programs Text & screen's
      IF WA_OBJECT-OBJECT = 'PROG'.
        PERFORM CHECK_PROG_TEXTS_SCREEN_GUI.
      ENDIF.
      CLEAR: WA_OBJECT.
    ENDLOOP.

*Check for Request mismatch (Function Group)*
    LOOP AT T_OBJECT INTO WA_OBJECT WHERE OBJECT EQ C_FUGR.
*Get Function module under the Function group*
      PERFORM GET_FUNC_MODULE TABLES T_FUNC_MODULE USING
WA_OBJECT-OBJ_NAME.
*Check for Request mismatch (Function Modules)*
      IF NOT T_FUNC_MODULE[] IS INITIAL.
        LOOP AT T_FUNC_MODULE INTO WA_FUNC_MODULE.
          WA_OBJECT-OBJ_NAME = WA_FUNC_MODULE-FUNCNAME.
          PERFORM CHECK_REQUEST_MISMATCH.
          CLEAR: WA_FUNC_MODULE.
        ENDLOOP.
*Check for Request mismatch (Includes under the Function Modules)*
        PERFORM CHECK_PROG_FUNC_MOD.
      ENDIF.
      CLEAR: T_FUNC_MODULE, WA_OBJECT.
      REFRESH: T_FUNC_MODULE.
    ENDLOOP.
  ENDIF.
***********************************************************************
*             END OF SELECTION
***********************************************************************
END-OF-SELECTION.
*Display ALV List*
  IF NOT T_FINAL_LOG[] IS INITIAL.
    SORT T_FINAL_LOG DESCENDING BY STATUS OBJ_TYPE ASCENDING.
    PERFORM CREATE_STATUS_LIST.
  ENDIF.
***********************************************************************
*            AT SELECTION SCREEN ON VALUE REQUEST
***********************************************************************
* F4 help for Target System
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_TARGET.
  PERFORM F4_HELP__TARGET.
* F4 help for Program name
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PRG.
  CLEAR: V_FIELD, V_INFO_OBJECT.
  V_FIELD  = 'P_PRG'.
  V_INFO_OBJECT = 'PROG'.
  PERFORM HELP_PROG_DICT USING P_PRG V_INFO_OBJECT V_FIELD.
*F4 help for Database Table*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_TAB.
  CLEAR: V_FIELD, V_INFO_OBJECT.
  V_FIELD  = 'P_TAB'.
  V_INFO_OBJECT = 'TABL'.
  PERFORM HELP_PROG_DICT USING P_TAB V_INFO_OBJECT V_FIELD.
*F4 Help for Structure*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_STR.
  CLEAR: V_FIELD, V_INFO_OBJECT.
  V_FIELD  = 'P_STR'.
  V_INFO_OBJECT = 'STRU'.
  PERFORM HELP_PROG_DICT USING P_STR V_INFO_OBJECT V_FIELD.
*F4 help for View*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VIEW.
  CLEAR: V_FIELD, V_INFO_OBJECT.
  V_FIELD  = 'P_VIEW'.
  V_INFO_OBJECT = 'VIEW'.
  PERFORM HELP_PROG_DICT USING P_VIEW V_INFO_OBJECT V_FIELD.
*F4 help for Data Element*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_DATA.
  CLEAR: V_FIELD, V_INFO_OBJECT.
  V_FIELD  = 'P_DATA'.
  V_INFO_OBJECT = 'DTEL'.
  PERFORM HELP_PROG_DICT USING P_DATA V_INFO_OBJECT V_FIELD.
*F4 help for Table Type*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_TTYPE.
  CLEAR: V_FIELD, V_INFO_OBJECT.
  V_FIELD  = 'P_TTYPE'.
  V_INFO_OBJECT = 'TTYP'.
  PERFORM HELP_PROG_DICT USING P_TTYPE V_INFO_OBJECT V_FIELD.
*F4 help for Class/Interface*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_CLASS.
  CLEAR: V_FIELD, V_INFO_OBJECT.
  V_FIELD  = 'P_CLASS'.
  V_INFO_OBJECT = 'CLAS'.
  PERFORM HELP_PROG_DICT USING P_CLASS V_INFO_OBJECT V_FIELD.
*F4 help for Type Group*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_TYGRP.
  CLEAR: V_FIELD, V_INFO_OBJECT.
  V_FIELD  = 'P_TYGRP'.
  V_INFO_OBJECT = 'TYPE'.
  PERFORM HELP_PROG_DICT USING P_TYGRP V_INFO_OBJECT V_FIELD.
*F4 help for Domain*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_DOMAIN.
  CLEAR: V_FIELD, V_INFO_OBJECT.
  V_FIELD  = 'P_DOMAIN'.
  V_INFO_OBJECT = 'DOMA'.
  PERFORM HELP_PROG_DICT USING P_DOMAIN V_INFO_OBJECT V_FIELD.
*F4 help for Search Help*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SCRHLP.
  CLEAR: V_FIELD, V_INFO_OBJECT.
  V_FIELD  = 'P_SCRHLP'.
  V_INFO_OBJECT = 'SHLP'.
  PERFORM HELP_PROG_DICT USING P_SCRHLP V_INFO_OBJECT V_FIELD.
*F4 help for Lock Object*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_LCKOBJ.
  CLEAR: V_FIELD, V_INFO_OBJECT.
  V_FIELD  = 'P_LCKOBJ'.
  V_INFO_OBJECT = 'ENQU'.
  PERFORM HELP_PROG_DICT USING P_LCKOBJ V_INFO_OBJECT V_FIELD.
*F4 help for Function Module name*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FUN.
  PERFORM F4_HELP_FM.

*F4 help for Function Group*
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FUNG.
  PERFORM F4_HELP_FGROUP.

*&---------------------------------------------------------------------*
*&  Include           ZTL_BCE017L_FORMS
*&---------------------------------------------------------------------*
************************************************************************
*&---------------------------------------------------------------------*
*&      Form  sel_screen_output
*&---------------------------------------------------------------------*
*       Dynamic Selection screen
*----------------------------------------------------------------------*
FORM SEL_SCREEN_OUTPUT.
  IF T_LIST[] IS INITIAL.
    PERFORM POPULATE_OBJECT.
  ENDIF.
  CASE P_OBJECT.
    WHEN '1'.
      V_FLAG_FIRST = C_X.
*For displaying Development Class*
      PERFORM SCREEN_CHANGE USING C_STR C_PRG C_FUN C_TAB C_STU C_VIE
                                  C_DAT C_TYP C_CLS C_GRP C_DOM C_SCR
                                  C_LCK C_DEV.
      CLEAR: RD_ALPRG, RD_PROG, P_PRG, RD_ALFUN, RD_FUNC, P_FUN,
             RD_FUGR, P_FUNG, RD_ALTAB, RD_TABL, P_TAB, RD_ALSTR,
             RD_STRU, P_STR, RD_ALVIE, RD_VIE, P_VIEW, RD_ALDAT, RD_DAT,
             P_DATA, RD_ALTYP, RD_TYPE, P_TTYPE, RD_ALCLS, RD_CLS,
             P_CLASS, RD_ALGRP, RD_GRP, P_TYGRP, RD_ALDOM, RD_DOM,
             P_DOMAIN, RD_ALSCR, RD_SCR, P_SCRHLP, RD_ALCK, RD_LCK,
             P_LCKOBJ.
    WHEN '2'.
*For displaying Program*
      PERFORM SCREEN_CHANGE USING C_STR C_DEV C_FUN C_TAB C_STU C_VIE
                                  C_DAT C_TYP C_CLS C_GRP C_DOM C_SCR
                                  C_LCK C_PRG.
      CLEAR: P_DEVCLS, RD_ALFUN, RD_FUNC, P_FUN, RD_FUGR, P_FUNG,
RD_ALTAB,
             RD_TABL, P_TAB, RD_ALSTR, RD_STRU, P_STR, RD_ALVIE, RD_VIE,
             P_VIEW, RD_ALDAT, RD_DAT, P_DATA, RD_ALTYP, RD_TYPE,
P_TTYPE,
             RD_ALCLS, RD_CLS, P_CLASS, RD_ALGRP, RD_GRP, P_TYGRP,
             RD_ALDOM, RD_DOM, P_DOMAIN, RD_ALSCR, RD_SCR, P_SCRHLP,
             RD_ALCK, RD_LCK, P_LCKOBJ.
    WHEN '3'.
*For displaying Function module / Function Group*
      PERFORM SCREEN_CHANGE USING C_PRG C_STR C_DEV C_TAB C_STU C_VIE
                                  C_DAT C_TYP C_CLS C_GRP C_DOM C_SCR
                                  C_LCK C_FUN.
      CLEAR: P_DEVCLS, RD_ALPRG, RD_PROG, P_PRG, RD_ALTAB, RD_TABL,
P_TAB,
             RD_ALSTR, RD_STRU, P_STR, RD_ALVIE, RD_VIE, P_VIEW,
RD_ALDAT,
             RD_DAT, P_DATA, RD_ALTYP, RD_TYPE, P_TTYPE, RD_ALCLS,
RD_CLS,
             P_CLASS, RD_ALGRP, RD_GRP, P_TYGRP, RD_ALDOM, RD_DOM,
             P_DOMAIN, RD_ALSCR, RD_SCR, P_SCRHLP,
             RD_ALCK, RD_LCK, P_LCKOBJ.
    WHEN '4'.
*For displaying Database Table*
      PERFORM SCREEN_CHANGE USING C_STR C_PRG C_FUN C_DEV C_STU C_VIE
                                  C_DAT C_TYP C_CLS C_GRP C_DOM C_SCR
                                  C_LCK C_TAB.
      CLEAR: P_DEVCLS, RD_ALPRG, RD_PROG, P_PRG, RD_ALFUN, RD_FUNC,
P_FUN,
             RD_FUGR, P_FUNG, RD_ALSTR, RD_STRU, P_STR, RD_ALVIE, RD_VIE
,
             P_VIEW, RD_ALDAT, RD_DAT, P_DATA, RD_ALTYP, RD_TYPE,
P_TTYPE,
             RD_ALCLS, RD_CLS, P_CLASS, RD_ALGRP, RD_GRP, P_TYGRP,
             RD_ALDOM, RD_DOM, P_DOMAIN, RD_ALSCR, RD_SCR, P_SCRHLP,
             RD_ALCK, RD_LCK, P_LCKOBJ.
    WHEN '5'.
*For displaying Structure*
      PERFORM SCREEN_CHANGE USING C_STR C_PRG C_FUN C_TAB C_DEV C_VIE
                                  C_DAT C_TYP C_CLS C_GRP C_DOM C_SCR
                                  C_LCK C_STU.
      CLEAR: P_DEVCLS, RD_ALPRG, RD_PROG, P_PRG, RD_ALFUN, RD_FUNC,
P_FUN,
             RD_FUGR, P_FUNG, RD_ALTAB, RD_TABL, P_TAB, RD_ALVIE, RD_VIE
,
             P_VIEW, RD_ALDAT, RD_DAT, P_DATA, RD_ALTYP, RD_TYPE,
P_TTYPE,
             RD_ALCLS, RD_CLS, P_CLASS, RD_ALGRP, RD_GRP, P_TYGRP,
             RD_ALDOM, RD_DOM, P_DOMAIN, RD_ALSCR, RD_SCR, P_SCRHLP,
             RD_ALCK, RD_LCK, P_LCKOBJ.
    WHEN '6'.
*For displaying View*
      PERFORM SCREEN_CHANGE USING C_STR C_PRG C_FUN C_TAB C_DEV C_STU
                                  C_DAT C_TYP C_CLS C_GRP C_DOM C_SCR
                                  C_LCK C_VIE.
      CLEAR: P_DEVCLS, RD_ALPRG, RD_PROG, P_PRG, RD_ALFUN, RD_FUNC,
P_FUN,
             RD_FUGR, P_FUNG, RD_ALTAB, RD_TABL, P_TAB, RD_ALSTR,
RD_STRU,
             P_STR, RD_ALDAT, RD_DAT, P_DATA, RD_ALTYP, RD_TYPE, P_TTYPE
,
             RD_ALCLS, RD_CLS, P_CLASS, RD_ALGRP, RD_GRP, P_TYGRP,
             RD_ALDOM, RD_DOM, P_DOMAIN, RD_ALSCR, RD_SCR, P_SCRHLP,
             RD_ALCK, RD_LCK, P_LCKOBJ.
    WHEN '7'.
*For displaying Data Element*
      PERFORM SCREEN_CHANGE USING C_STR C_PRG C_FUN C_TAB C_DEV C_STU
                                  C_VIE C_TYP C_CLS C_GRP C_DOM C_SCR
                                  C_LCK C_DAT.
      CLEAR: P_DEVCLS, RD_ALPRG, RD_PROG, P_PRG, RD_ALFUN, RD_FUNC,
P_FUN,
             RD_FUGR, P_FUNG, RD_ALTAB, RD_TABL, P_TAB, RD_ALSTR,
RD_STRU,
             P_STR, RD_ALVIE, RD_VIE, P_VIEW, RD_ALTYP, RD_TYPE, P_TTYPE
,
             RD_ALCLS, RD_CLS, P_CLASS, RD_ALGRP, RD_GRP, P_TYGRP,
             RD_ALDOM, RD_DOM, P_DOMAIN, RD_ALSCR, RD_SCR,
             P_SCRHLP, RD_ALCK, RD_LCK, P_LCKOBJ.
    WHEN '8'.
*For displaying Table Type*
      PERFORM SCREEN_CHANGE USING C_STR C_PRG C_FUN C_TAB C_DEV C_STU
                                  C_VIE C_DAT C_CLS C_GRP C_DOM C_SCR
                                  C_LCK C_TYP.
      CLEAR: P_DEVCLS, RD_ALPRG, RD_PROG, P_PRG, RD_ALFUN, RD_FUNC,
P_FUN,
             RD_FUGR, P_FUNG, RD_ALTAB, RD_TABL, P_TAB, RD_ALSTR,
RD_STRU,
             P_STR, RD_ALVIE, RD_VIE, P_VIEW, RD_ALDAT, RD_DAT, P_DATA,
             RD_ALCLS, RD_CLS, P_CLASS, RD_ALGRP, RD_GRP, P_TYGRP,
             RD_ALDOM, RD_DOM, P_DOMAIN, RD_ALSCR, RD_SCR, P_SCRHLP,
             RD_ALCK, RD_LCK, P_LCKOBJ.
    WHEN '9'.
*For displaying Class/Interface*
      PERFORM SCREEN_CHANGE USING C_STR C_PRG C_FUN C_TAB C_DEV C_STU
                                  C_VIE C_DAT C_TYP C_GRP C_DOM C_SCR
                                  C_LCK C_CLS.
      CLEAR: P_DEVCLS, RD_ALPRG, RD_PROG, P_PRG, RD_ALFUN, RD_FUNC,
P_FUN,
             RD_FUGR, P_FUNG, RD_ALTAB, RD_TABL, P_TAB, RD_ALSTR,
RD_STRU,
             P_STR, RD_ALVIE, RD_VIE, P_VIEW, RD_ALDAT, RD_DAT, P_DATA,
             RD_ALTYP, RD_TYPE, P_TTYPE, RD_ALGRP, RD_GRP, P_TYGRP,
             RD_ALDOM, RD_DOM, P_DOMAIN, RD_ALSCR, RD_SCR, P_SCRHLP,
             RD_ALCK, RD_LCK, P_LCKOBJ.
    WHEN '10'.
*For displaying Type Group*
      PERFORM SCREEN_CHANGE USING C_STR C_PRG C_FUN C_TAB C_DEV C_STU
                                  C_VIE C_DAT C_CLS C_TYP C_DOM C_SCR
                                  C_LCK C_GRP.
      CLEAR: P_DEVCLS, RD_ALPRG, RD_PROG, P_PRG, RD_ALFUN, RD_FUNC,
P_FUN,
             RD_FUGR, P_FUNG, RD_ALTAB, RD_TABL, P_TAB, RD_ALSTR,
RD_STRU,
             P_STR, RD_ALVIE, RD_VIE, P_VIEW, RD_ALDAT, RD_DAT, P_DATA,
             RD_ALTYP, RD_TYPE, P_TTYPE, RD_ALCLS, RD_CLS, P_CLASS,
             RD_ALDOM, RD_DOM, P_DOMAIN, RD_ALSCR, RD_SCR, P_SCRHLP,
             RD_ALCK, RD_LCK, P_LCKOBJ.
    WHEN '11'.
*For displaying Domain*
      PERFORM SCREEN_CHANGE USING C_STR C_PRG C_FUN C_TAB C_DEV C_STU
                                  C_VIE C_DAT C_CLS C_GRP C_TYP C_SCR
                                  C_LCK C_DOM.
      CLEAR: P_DEVCLS, RD_ALPRG, RD_PROG, P_PRG, RD_ALFUN, RD_FUNC,
P_FUN,
             RD_FUGR, P_FUNG, RD_ALTAB, RD_TABL, P_TAB, RD_ALSTR,
RD_STRU,
             P_STR, RD_ALVIE, RD_VIE, P_VIEW, RD_ALDAT, RD_DAT, P_DATA,
             RD_ALTYP, RD_TYPE, P_TTYPE, RD_ALCLS, RD_CLS, P_CLASS,
             RD_ALGRP, RD_GRP, P_TYGRP, RD_ALSCR, RD_SCR, P_SCRHLP,
             RD_ALCK, RD_LCK, P_LCKOBJ.
    WHEN '12'.
*For displaying Search Help*
      PERFORM SCREEN_CHANGE USING C_STR C_PRG C_FUN C_TAB C_DEV C_STU
                                  C_VIE C_DAT C_CLS C_GRP C_TYP C_DOM
                                  C_LCK C_SCR.
      CLEAR: P_DEVCLS, RD_ALPRG, RD_PROG, P_PRG, RD_ALFUN, RD_FUNC,
P_FUN,
             RD_FUGR, P_FUNG, RD_ALTAB, RD_TABL, P_TAB, RD_ALSTR,
RD_STRU,
             P_STR, RD_ALVIE, RD_VIE, P_VIEW, RD_ALDAT, RD_DAT, P_DATA,
             RD_ALTYP, RD_TYPE, P_TTYPE, RD_ALCLS, RD_CLS, P_CLASS,
             RD_ALGRP, RD_GRP, P_TYGRP, RD_ALDOM, RD_DOM, P_DOMAIN,
             RD_ALCK, RD_LCK, P_LCKOBJ.
    WHEN '13'.
*For displaying Lock Object*
      PERFORM SCREEN_CHANGE USING C_STR  C_PRG C_FUN C_TAB C_DEV C_STU
                                  C_VIE C_DAT C_CLS C_GRP C_TYP C_DOM
                                  C_SCR C_LCK.
      CLEAR: P_DEVCLS, RD_ALPRG, RD_PROG, P_PRG, RD_ALFUN, RD_FUNC,
P_FUN,
             RD_FUGR, P_FUNG, RD_ALTAB, RD_TABL, P_TAB, RD_ALSTR,
RD_STRU,
             P_STR, RD_ALVIE, RD_VIE, P_VIEW, RD_ALDAT, RD_DAT, P_DATA,
             RD_ALTYP, RD_TYPE, P_TTYPE, RD_ALCLS, RD_CLS, P_CLASS,
             RD_ALGRP, RD_GRP, P_TYGRP, RD_ALDOM, RD_DOM, P_DOMAIN,
             RD_ALSCR, RD_SCR, P_SCRHLP.
  ENDCASE.
ENDFORM.                    " sel_screen_output
*&---------------------------------------------------------------------*
*&      Form  populate_object
*&---------------------------------------------------------------------*
*       Populate List values for Object
*----------------------------------------------------------------------*
FORM POPULATE_OBJECT.
  WA_NAME = 'P_OBJECT'.
  CLEAR T_LIST.
  REFRESH T_LIST.
  CLEAR WA_VALUE.
  WA_VALUE-KEY = '1'.
  WA_VALUE-TEXT = TEXT-069.
  APPEND WA_VALUE TO T_LIST.
  CLEAR WA_VALUE.
  WA_VALUE-KEY = '2'.
  WA_VALUE-TEXT = TEXT-070.
  APPEND WA_VALUE TO T_LIST.
  CLEAR WA_VALUE.
  WA_VALUE-KEY = '3'.
  WA_VALUE-TEXT = TEXT-071.
  APPEND WA_VALUE TO T_LIST.
  CLEAR WA_VALUE.
  WA_VALUE-KEY = '4'.
  WA_VALUE-TEXT = TEXT-072.
  APPEND WA_VALUE TO T_LIST.
  CLEAR WA_VALUE.
  WA_VALUE-KEY = '5'.
  WA_VALUE-TEXT = TEXT-073.
  APPEND WA_VALUE TO T_LIST.
  CLEAR WA_VALUE.
  WA_VALUE-KEY = '6'.
  WA_VALUE-TEXT = TEXT-074.
  APPEND WA_VALUE TO T_LIST.
  CLEAR WA_VALUE.
  WA_VALUE-KEY = '7'.
  WA_VALUE-TEXT = TEXT-075.
  APPEND WA_VALUE TO T_LIST.
  CLEAR WA_VALUE.
  WA_VALUE-KEY = '8'.
  WA_VALUE-TEXT = TEXT-076.
  APPEND WA_VALUE TO T_LIST.
  CLEAR WA_VALUE.
  WA_VALUE-KEY = '9'.
  WA_VALUE-TEXT = TEXT-077.
  APPEND WA_VALUE TO T_LIST.
  CLEAR WA_VALUE.
  WA_VALUE-KEY = '10'.
  WA_VALUE-TEXT = TEXT-078.
  APPEND WA_VALUE TO T_LIST.
  CLEAR WA_VALUE.
  WA_VALUE-KEY = '11'.
  WA_VALUE-TEXT = TEXT-079.
  APPEND WA_VALUE TO T_LIST.
  CLEAR WA_VALUE.
  WA_VALUE-KEY = '12'.
  WA_VALUE-TEXT = TEXT-080.
  APPEND WA_VALUE TO T_LIST.
  CLEAR WA_VALUE.
  WA_VALUE-KEY = '13'.
  WA_VALUE-TEXT = TEXT-081.
  APPEND WA_VALUE TO T_LIST.
  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      ID              = WA_NAME
      VALUES          = T_LIST
    EXCEPTIONS
      ID_ILLEGAL_NAME = 1
      OTHERS          = 2.
  IF SY-SUBRC %LT%GT 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " populate_object
*&---------------------------------------------------------------------*
*       DISABLE_ALL_OPTIONS
*----------------------------------------------------------------------*
*  Disable all Options
*----------------------------------------------------------------------*
FORM DISABLE_ALL_OPTIONS.
  CLEAR: P_OBJECT.
  LOOP AT SCREEN.
    IF SCREEN-GROUP1 EQ C_FUN OR
       SCREEN-GROUP1 EQ C_PRG OR
       SCREEN-GROUP1 EQ C_STR OR
       SCREEN-GROUP1 EQ C_DEV OR
       SCREEN-GROUP1 EQ C_TAB OR
       SCREEN-GROUP1 EQ C_STU OR
       SCREEN-GROUP1 EQ C_VIE OR
       SCREEN-GROUP1 EQ C_DAT OR
       SCREEN-GROUP1 EQ C_TYP OR
       SCREEN-GROUP1 EQ C_CLS OR
       SCREEN-GROUP1 EQ C_GRP OR
       SCREEN-GROUP1 EQ C_DOM OR
       SCREEN-GROUP1 EQ C_SCR OR
       SCREEN-GROUP1 EQ C_LCK.
      SCREEN-OUTPUT = C_ZERO.
      SCREEN-ACTIVE = C_ZERO.
      SCREEN-INVISIBLE = C_ONE.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
ENDFORM.                    " disable_all_options
*---------------------------------------------------------------------*
*       FORM PROGRAM_DIRECTORY                                        *
*---------------------------------------------------------------------*
*       Help for Program and Dictionary
*----------------------------------------------------------------------*
FORM HELP_PROG_DICT USING P_OBJECT TYPE ANY
                          P_OBJTYPE TYPE ANY
                          P_FIELD TYPE ANY.
  DATA  BEGIN OF LT_DYNPFIELDS OCCURS 1.
          INCLUDE STRUCTURE DYNPREAD.
  DATA  END   OF LT_DYNPFIELDS.
  DATA: L_OBJECT_NAME TYPE CHAR100.
  DATA: L_REPID TYPE SY-REPID.
  LT_DYNPFIELDS-FIELDNAME  = P_FIELD.
  APPEND LT_DYNPFIELDS.
  L_REPID = SY-REPID.
  CALL FUNCTION 'DYNP_VALUES_READ'                          "#EC *
       EXPORTING
            DYNAME     = L_REPID
            DYNUMB     = SY-DYNNR
       TABLES
            DYNPFIELDS = LT_DYNPFIELDS
       EXCEPTIONS
            OTHERS.
  READ TABLE LT_DYNPFIELDS INDEX 1.
  L_OBJECT_NAME = LT_DYNPFIELDS-FIELDVALUE.
  CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'                 "#EC *
    EXPORTING
      OBJECT_TYPE          = P_OBJTYPE
      OBJECT_NAME          = L_OBJECT_NAME
      SUPPRESS_SELECTION   = 'X'
    IMPORTING
      OBJECT_NAME_SELECTED = P_OBJECT
    EXCEPTIONS
      CANCEL               = 01.
ENDFORM.                    "program_directory
*&---------------------------------------------------------------------*
*&      Form  help_func
*&---------------------------------------------------------------------*
*       Help for Function module and Function Group.
*----------------------------------------------------------------------*
FORM HELP_FUNC  USING P_OBJECT TYPE ANY
                      P_DYNFLD TYPE ANY.
  CALL FUNCTION 'RS_HELP_HANDLING'
    EXPORTING
      DYNPFIELD                 = P_DYNFLD
      DYNPNAME                  = SY-DYNNR
      OBJECT                    = P_OBJECT
      PROGNAME                  = SY-REPID
      SUPPRESS_SELECTION_SCREEN = SY-INPUT.

ENDFORM.                    " help_func
*&---------------------------------------------------------------------*
*&      Form  read_system
*&---------------------------------------------------------------------*
*       Read System - Current system / Target system
*----------------------------------------------------------------------*
FORM READ_SYSTEM USING P_IP TYPE ANY
              CHANGING P_OP TYPE ANY.
  DATA: LWA_SYSTEM TYPE TMSCSYS-SYSNAM,
        LT_SYSTEM TYPE TMSCSYS OCCURS 0 WITH HEADER LINE.
  LWA_SYSTEM = P_IP.
  CALL FUNCTION 'TMS_CI_READ_CONFIGURATION'
    EXPORTING
      IV_SYSTEM                   = LWA_SYSTEM
    TABLES
      TT_SYSTEM                   = LT_SYSTEM
    EXCEPTIONS
      INVALID_CI_CONF_WITH_SYSTEM = 1
      INVALID_CI_CONF_WITH_DOMAIN = 2
      INVALID_CI_CONF_WITH_GROUP  = 3
      INVALID_CI_CONF_WITH_DEST   = 4
      NO_SYSTEMS                  = 5
      OTHERS                      = 6.
  IF SY-SUBRC %LT%GT 0.
    SET CURSOR FIELD 'P_TARGET'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ELSE.
    READ TABLE LT_SYSTEM INDEX 1.
    P_OP = LT_SYSTEM-DESADM.
  ENDIF.
ENDFORM.                    " read_system
*&---------------------------------------------------------------------*
*&      Form  check_dic_data
*&---------------------------------------------------------------------*
*       Check for the Given Dic Data
*----------------------------------------------------------------------*
FORM CHECK_DIC_DATA  USING    P_OBJECT TYPE ANY
                              P_OBJECT_NAME TYPE ANY
                              P_CURSOR TYPE ANY
                              P_TEXT TYPE ANY.
  SELECT SINGLE * FROM TADIR WHERE PGMID = 'R3TR'
                             AND   OBJECT = P_OBJECT
                             AND   OBJ_NAME = P_OBJECT_NAME.
  IF SY-SUBRC %LT%GT 0.
    SET CURSOR FIELD P_CURSOR.
    MESSAGE E039(ZTL) WITH P_TEXT.
    EXIT.
  ELSE.
    CLEAR TADIR.
  ENDIF.
ENDFORM.                    " check_dic_data
*&---------------------------------------------------------------------*
*&      Form  check_input_data
*&---------------------------------------------------------------------*
*       Check for Input data
*----------------------------------------------------------------------*
FORM CHECK_INPUT_DATA.
  CLEAR: TADIR, V_OBJECT, V_OBJECT_NAME, V_CURSOR, ENLFDIR.
*Check for the given Development class*
  IF P_OBJECT EQ '1' AND NOT P_DEVCLS IS INITIAL.
    SELECT SINGLE DEVCLASS FROM TADIR INTO V_DEVCLASS
                  WHERE DEVCLASS = P_DEVCLS.                "#EC *
    IF SY-SUBRC %LT%GT 0.
      SET CURSOR FIELD 'P_DEVCLS'.
      MESSAGE E039(ZTL) WITH TEXT-035.
    ENDIF.
  ENDIF.
  IF P_OBJECT EQ '1' AND SY-UCOMM EQ 'ONLI'.
    IF P_DEVCLS IS INITIAL AND V_FLAG_FIRST EQ C_X.
      SET CURSOR FIELD 'P_DEVCLS'.
      MESSAGE E039(ZTL) WITH TEXT-040.
    ENDIF.
  ENDIF.
*Check for Program*
  IF P_OBJECT EQ '2' AND NOT P_PRG IS INITIAL.
    V_OBJECT = 'PROG'.
    V_OBJECT_NAME = P_PRG.
    V_CURSOR = 'P_PRG'.
    PERFORM CHECK_DIC_DATA USING V_OBJECT V_OBJECT_NAME
                                 V_CURSOR TEXT-036.
    CLEAR: V_OBJECT, V_OBJECT_NAME.
  ENDIF.
  IF P_OBJECT EQ '2' AND SY-UCOMM EQ 'ONLI'.
    IF RD_PROG EQ C_X AND P_PRG IS INITIAL.
      SET CURSOR FIELD 'P_PRG'.
      MESSAGE E039(ZTL) WITH TEXT-037.
    ENDIF.
  ENDIF.
*Check for Function Module*
  IF P_OBJECT EQ '3' AND NOT P_FUN IS INITIAL.
    SELECT SINGLE * FROM ENLFDIR WHERE FUNCNAME = P_FUN.
    IF SY-SUBRC %LT%GT 0.
      SET CURSOR FIELD 'P_FUN'.
      MESSAGE E039(ZTL) WITH TEXT-061.
    ENDIF.
  ENDIF.
  IF P_OBJECT EQ '3' AND SY-UCOMM EQ 'ONLI'.
    IF RD_FUNC EQ C_X AND P_FUN IS INITIAL.
      SET CURSOR FIELD 'P_FUN'.
      MESSAGE E039(ZTL) WITH TEXT-062.
    ENDIF.
  ENDIF.
*Check for Function Group*
  IF P_OBJECT EQ '3' AND NOT P_FUNG IS INITIAL.
    V_OBJECT = 'FUGR'.
    V_OBJECT_NAME = P_FUNG.
    V_CURSOR = 'P_FUNG'.
    PERFORM CHECK_DIC_DATA USING V_OBJECT V_OBJECT_NAME
                                 V_CURSOR TEXT-063.
    CLEAR: V_OBJECT, V_OBJECT_NAME, V_CURSOR.
  ENDIF.
  IF P_OBJECT EQ '3' AND SY-UCOMM EQ 'ONLI'.
    IF RD_FUGR EQ C_X AND P_FUNG IS INITIAL.
      SET CURSOR FIELD 'P_FUNG'.
      MESSAGE E039(ZTL) WITH TEXT-064.
    ENDIF.
  ENDIF.

*Check for Database Table*
  IF P_OBJECT EQ '4' AND NOT P_TAB IS INITIAL.
    V_OBJECT = 'TABL'.
    V_OBJECT_NAME = P_TAB.
    V_CURSOR = 'P_TAB'.
    PERFORM CHECK_DIC_DATA USING V_OBJECT V_OBJECT_NAME
                                 V_CURSOR TEXT-038.
    CLEAR: V_OBJECT, V_OBJECT_NAME, V_CURSOR.
  ENDIF.
  IF P_OBJECT EQ '4' AND SY-UCOMM EQ 'ONLI'.
    IF RD_TABL EQ C_X AND P_TAB IS INITIAL.
      SET CURSOR FIELD 'P_PRG'.
      MESSAGE E039(ZTL) WITH TEXT-039.
    ENDIF.
  ENDIF.
*Check for Structure*
  IF P_OBJECT EQ '5' AND NOT P_STR IS INITIAL.
    V_OBJECT = 'TABL'.
    V_OBJECT_NAME = P_STR.
    V_CURSOR = 'P_STR'.
    PERFORM CHECK_DIC_DATA USING V_OBJECT V_OBJECT_NAME
                                 V_CURSOR TEXT-042.
    CLEAR: V_OBJECT, V_OBJECT_NAME, V_CURSOR.
  ENDIF.
  IF P_OBJECT EQ '5' AND SY-UCOMM EQ 'ONLI'.
    IF RD_STRU EQ C_X AND P_STR IS INITIAL.
      SET CURSOR FIELD 'P_STR'.
      MESSAGE E039(ZTL) WITH TEXT-043.
    ENDIF.
  ENDIF.
*Check for View*
  IF P_OBJECT EQ '6' AND NOT RD_VIE IS INITIAL.
    V_OBJECT = 'VIEW'.
    V_OBJECT_NAME = P_VIEW.
    V_CURSOR = 'P_VIEW'.
    PERFORM CHECK_DIC_DATA USING V_OBJECT V_OBJECT_NAME
                                 V_CURSOR TEXT-044.
    CLEAR: V_OBJECT, V_OBJECT_NAME, V_CURSOR.
  ENDIF.
  IF P_OBJECT EQ '6' AND SY-UCOMM EQ 'ONLI'.
    IF RD_VIE EQ C_X AND P_VIEW IS INITIAL.
      SET CURSOR FIELD 'P_VIEW'.
      MESSAGE E039(ZTL) WITH TEXT-045.
    ENDIF.
  ENDIF.
*Check for Data Element*
  IF P_OBJECT EQ '7' AND NOT P_DATA IS INITIAL.
    V_OBJECT = 'DTEL'.
    V_OBJECT_NAME = P_DATA.
    V_CURSOR = 'P_DATA'.
    PERFORM CHECK_DIC_DATA USING V_OBJECT V_OBJECT_NAME
                                 V_CURSOR TEXT-046.
    CLEAR: V_OBJECT, V_OBJECT_NAME, V_CURSOR.
  ENDIF.
  IF P_OBJECT EQ '7' AND SY-UCOMM EQ 'ONLI'.
    IF RD_DAT EQ C_X AND P_DATA IS INITIAL.
      SET CURSOR FIELD 'P_DATA'.
      MESSAGE E039(ZTL) WITH TEXT-047.
    ENDIF.
  ENDIF.
*Check for Table Type*
  IF P_OBJECT EQ '8' AND NOT P_TTYPE IS INITIAL.
    V_OBJECT = 'TTYP'.
    V_OBJECT_NAME = P_TTYPE.
    V_CURSOR = 'P_TTYPE'.
    PERFORM CHECK_DIC_DATA USING V_OBJECT V_OBJECT_NAME
                                 V_CURSOR TEXT-048.
    CLEAR: V_OBJECT, V_OBJECT_NAME, V_CURSOR.
  ENDIF.
  IF P_OBJECT EQ '8' AND SY-UCOMM EQ 'ONLI'.
    IF RD_TYPE EQ C_X AND P_TTYPE IS INITIAL.
      SET CURSOR FIELD 'P_TTYPE'.
      MESSAGE E039(ZTL) WITH TEXT-049.
    ENDIF.
  ENDIF.
*Check for Class/Interface*
  IF P_OBJECT EQ '9' AND NOT P_CLASS IS INITIAL.
    V_OBJECT = 'CLAS'.
    V_OBJECT_NAME = P_CLASS.
    V_CURSOR = 'P_CLASS'.
    PERFORM CHECK_DIC_DATA USING V_OBJECT V_OBJECT_NAME
                                 V_CURSOR TEXT-050.
    CLEAR: V_OBJECT, V_OBJECT_NAME, V_CURSOR.
  ENDIF.
  IF P_OBJECT EQ '9' AND SY-UCOMM EQ 'ONLI'.
    IF RD_CLS EQ C_X AND P_CLASS IS INITIAL.
      SET CURSOR FIELD 'P_CLASS'.
      MESSAGE E039(ZTL) WITH TEXT-051.
    ENDIF.
  ENDIF.
*Check for Type Group*
  IF P_OBJECT EQ '10' AND NOT P_TYGRP IS INITIAL.
    V_OBJECT = 'TYPE'.
    V_OBJECT_NAME = P_TYGRP.
    V_CURSOR = 'P_TYGRP'.
    PERFORM CHECK_DIC_DATA USING V_OBJECT V_OBJECT_NAME
                                 V_CURSOR TEXT-052.
    CLEAR: V_OBJECT, V_OBJECT_NAME, V_CURSOR.
  ENDIF.
  IF P_OBJECT EQ '10' AND SY-UCOMM EQ 'ONLI'.
    IF RD_GRP EQ C_X AND P_TYGRP IS INITIAL.
      SET CURSOR FIELD 'P_TYGRP'.
      MESSAGE E039(ZTL) WITH TEXT-053.
    ENDIF.
  ENDIF.
*Check for Domain*
  IF P_OBJECT EQ '11' AND NOT P_DOMAIN IS INITIAL.
    V_OBJECT = 'DOMA'.
    V_OBJECT_NAME = P_DOMAIN.
    V_CURSOR = 'P_DOMAIN'.
    PERFORM CHECK_DIC_DATA USING V_OBJECT V_OBJECT_NAME
                                 V_CURSOR TEXT-054.
    CLEAR: V_OBJECT, V_OBJECT_NAME, V_CURSOR.
  ENDIF.
  IF P_OBJECT EQ '11' AND SY-UCOMM EQ 'ONLI'.
    IF RD_DOM EQ C_X AND P_DOMAIN IS INITIAL.
      SET CURSOR FIELD 'P_DOMAIN'.
      MESSAGE E039(ZTL) WITH TEXT-055.
    ENDIF.
  ENDIF.
*Check for Search Help*
  IF P_OBJECT EQ '12' AND NOT P_SCRHLP IS INITIAL.
    V_OBJECT = 'SHLP'.
    V_OBJECT_NAME = P_SCRHLP.
    V_CURSOR = 'P_SCRHLP'.
    PERFORM CHECK_DIC_DATA USING V_OBJECT V_OBJECT_NAME
                                 V_CURSOR TEXT-056.
    CLEAR: V_OBJECT, V_OBJECT_NAME, V_CURSOR.
  ENDIF.
  IF P_OBJECT EQ '12' AND SY-UCOMM EQ 'ONLI'.
    IF RD_SCR EQ C_X AND P_SCRHLP IS INITIAL.
      SET CURSOR FIELD 'P_SCRHLP'.
      MESSAGE E039(ZTL) WITH TEXT-057.
      EXIT.
    ENDIF.
  ENDIF.
*Check for Lock Object*
  IF P_OBJECT EQ '13' AND NOT P_LCKOBJ IS INITIAL.
    V_OBJECT = 'ENQU'.
    V_OBJECT_NAME = P_LCKOBJ.
    V_CURSOR = 'P_LCKOBJ'.
    PERFORM CHECK_DIC_DATA USING V_OBJECT V_OBJECT_NAME
                                 V_CURSOR TEXT-058.
    CLEAR: V_OBJECT, V_OBJECT_NAME, V_CURSOR.
  ENDIF.
  IF P_OBJECT EQ '13' AND SY-UCOMM EQ 'ONLI'.
    IF RD_LCK EQ C_X AND P_LCKOBJ IS INITIAL.
      SET CURSOR FIELD 'P_LCKOBJ'.
      MESSAGE E039(ZTL) WITH TEXT-059.
    ENDIF.
  ENDIF.
  IF SY-UCOMM EQ 'ONLI'.
*Check for the given Target system*
    IF RD_TAR EQ C_X AND NOT P_TARGET IS INITIAL.
      PERFORM READ_SYSTEM USING P_TARGET CHANGING V_DESTINATION.
    ENDIF.
*Check for the given RFC destination*
    IF RD_RFC EQ C_X AND NOT P_RFCDES IS INITIAL.
      SELECT SINGLE RFCDEST
                    FROM RFCDES
                    INTO V_RFCDES
                    WHERE RFCDEST EQ P_RFCDES.
      IF SY-SUBRC NE 0.
        SET CURSOR FIELD 'P_RFCDES'.
        MESSAGE E039(ZTL) WITH TEXT-032.
      ELSE.
        V_DESTINATION = P_RFCDES.
      ENDIF.
    ENDIF.
*If Target system not provided- Message*
    IF RD_TAR EQ C_X AND P_TARGET IS INITIAL.
      SET CURSOR FIELD 'P_TARGET'.
      MESSAGE E039(ZTL) WITH TEXT-033.
      EXIT.
    ENDIF.
*If RFC Destination not provided - Message*
    IF RD_RFC EQ C_X AND P_RFCDES IS INITIAL.
      SET CURSOR FIELD 'P_RFCDES'.
      MESSAGE E039(ZTL) WITH TEXT-034.
      EXIT.
    ENDIF.
  ENDIF.
  CHECK SY-UCOMM EQ 'ONLI'.
  V_EXECUTE = C_X.
ENDFORM.                    " check_input_data
*&---------------------------------------------------------------------*
*&      Form  select_data_tadir
*&---------------------------------------------------------------------*
*       Select Data from TADIR table for the selected data
*----------------------------------------------------------------------*
FORM SELECT_DATA_TADIR .
*For Development Class*
  IF P_OBJECT = '1'.
    SELECT * FROM TADIR INTO TABLE T_OBJECT WHERE DEVCLASS = P_DEVCLS.
                                                            "#EC *
    IF SY-SUBRC NE 0.
      MESSAGE E039(ZTL) WITH TEXT-060.
    ENDIF.
    IF NOT T_OBJECT[] IS INITIAL.
      SORT T_OBJECT BY OBJECT.
*Deleting the entries - other than Tables, Program and Function group*
      DELETE T_OBJECT WHERE OBJECT NE 'TTYP' AND OBJECT NE 'DOMA' AND
                            OBJECT NE 'DTEL' AND OBJECT NE 'TYPE' AND
                            OBJECT NE 'SHLP' AND OBJECT NE 'MCID' AND
                            OBJECT NE 'ENQU' AND OBJECT NE 'MCOB' AND
                            OBJECT NE 'INDX' AND OBJECT NE 'SQLT' AND
                            OBJECT NE 'TABL' AND OBJECT NE 'VIEW' AND
                            OBJECT NE 'PROG' AND OBJECT NE 'FUGR' AND
                            OBJECT NE 'CLAS'.
    ENDIF.
  ENDIF.
*For Program*
  IF P_OBJECT = '2'.
    IF RD_ALPRG EQ C_X.
      PERFORM SELECT_DATA_PRG_DIC_Z USING SPACE 'PROG' SPACE.
    ELSE.
      PERFORM SELECT_DATA_PRG_DIC_Z USING P_PRG 'PROG' C_X.
      PERFORM GET_INCLUDE_PROG.
    ENDIF.
  ENDIF.
*For Function Module*
  IF P_OBJECT = '3'.
    IF RD_ALFUN EQ C_X.
      PERFORM SELECT_DATA_PRG_DIC_Z USING SPACE 'FUGR' SPACE.
    ELSEIF RD_FUNC EQ C_X AND NOT RD_FUNC IS INITIAL.
      PERFORM SELECT_FUN_MOD_OBJECT.
    ELSEIF RD_FUGR EQ C_X AND NOT P_FUNG IS INITIAL.
      PERFORM SELECT_DATA_PRG_DIC_Z USING P_FUNG 'FUGR' C_X.
    ENDIF.
  ENDIF.
*For Database Tables*
  IF P_OBJECT = '4'.
    IF RD_ALTAB EQ C_X.
      PERFORM SELECT_DATA_PRG_DIC_Z USING SPACE 'TABL' SPACE.
    ELSE.
      PERFORM SELECT_DATA_PRG_DIC_Z USING P_TAB 'TABL' C_X.
    ENDIF.
  ENDIF.
*For Structure*
  IF P_OBJECT = '5'.
    IF RD_ALSTR EQ C_X.
      PERFORM SELECT_DATA_PRG_DIC_Z USING SPACE 'TABL' SPACE.
    ELSE.
      PERFORM SELECT_DATA_PRG_DIC_Z USING P_STR 'TABL' C_X.
    ENDIF.
  ENDIF.
*For View*
  IF P_OBJECT = '6'.
    IF RD_ALVIE EQ C_X.
      PERFORM SELECT_DATA_PRG_DIC_Z USING SPACE 'VIEW' SPACE.
    ELSE.
      PERFORM SELECT_DATA_PRG_DIC_Z USING P_VIEW 'VIEW' C_X.
    ENDIF.
  ENDIF.
*For Data Element*
  IF P_OBJECT = '7'.
    IF RD_ALDAT EQ C_X.
      PERFORM SELECT_DATA_PRG_DIC_Z USING SPACE 'DTEL' SPACE.
    ELSE.
      PERFORM SELECT_DATA_PRG_DIC_Z USING P_DATA 'DTEL' C_X.
    ENDIF.
  ENDIF.
*For Table Type*
  IF P_OBJECT = '8'.
    IF RD_ALTYP EQ C_X.
      PERFORM SELECT_DATA_PRG_DIC_Z USING SPACE 'TTYP' SPACE.
    ELSE.
      PERFORM SELECT_DATA_PRG_DIC_Z USING P_TTYPE 'TTYP' C_X.
    ENDIF.
  ENDIF.
*For Class/Interface*
  IF P_OBJECT = '9'.
    IF RD_ALCLS EQ C_X.
      PERFORM SELECT_DATA_PRG_DIC_Z USING SPACE 'CLAS' SPACE.
    ELSE.
      PERFORM SELECT_DATA_PRG_DIC_Z USING P_CLASS 'CLAS' C_X.
    ENDIF.
  ENDIF.
*For Type Group*
  IF P_OBJECT = '10'.
    IF RD_ALGRP EQ C_X.
      PERFORM SELECT_DATA_PRG_DIC_Z USING SPACE 'TYPE' SPACE.
    ELSE.
      PERFORM SELECT_DATA_PRG_DIC_Z USING P_TYGRP 'TYPE' C_X.
    ENDIF.
  ENDIF.
*For Type Group*
  IF P_OBJECT = '11'.
    IF RD_ALDOM EQ C_X.
      PERFORM SELECT_DATA_PRG_DIC_Z USING SPACE 'DOMA' SPACE.
    ELSE.
      PERFORM SELECT_DATA_PRG_DIC_Z USING P_DOMAIN 'DOMA' C_X.
    ENDIF.
  ENDIF.
*For Search Help*
  IF P_OBJECT = '12'.
    IF RD_ALSCR EQ C_X.
      PERFORM SELECT_DATA_PRG_DIC_Z USING SPACE 'SHLP' SPACE.
    ELSE.
      PERFORM SELECT_DATA_PRG_DIC_Z USING P_SCRHLP 'SHLP' C_X.
    ENDIF.
  ENDIF.
*For Lock Object*
  IF P_OBJECT = '13'.
    IF RD_ALCK EQ C_X.
      PERFORM SELECT_DATA_LOCK_OBJ USING SPACE 'ENQU' SPACE.
    ELSE.
      PERFORM SELECT_DATA_LOCK_OBJ USING P_LCKOBJ 'ENQU' C_X.
    ENDIF.
  ENDIF.
ENDFORM.                    " select_data_tadir
*&---------------------------------------------------------------------*
*&      Form  select_data_prg_dic_z
*&---------------------------------------------------------------------*
*       Select all Z data for the given Object, When P_X = ''
*       Select the Particular object when, P_X = 'X'.
*----------------------------------------------------------------------*
FORM SELECT_DATA_PRG_DIC_Z USING P_OBJECT_NAME TYPE ANY
                                 P_OBJECT      TYPE ANY
                                 P_X           TYPE ANY.
  IF P_X EQ SPACE.
    SELECT * FROM TADIR INTO TABLE T_OBJECT
                  WHERE PGMID = 'R3TR'
                  AND   OBJECT = P_OBJECT
                  AND   ( OBJ_NAME LIKE 'Z%' OR OBJ_NAME LIKE 'Y%').
    IF SY-SUBRC NE 0.
      MESSAGE E039(ZTL) WITH TEXT-060.
    ENDIF.
  ELSEIF P_X EQ C_X.
    SELECT * FROM TADIR INTO TABLE T_OBJECT
                  WHERE PGMID = 'R3TR'
                  AND   OBJECT = P_OBJECT
                  AND   OBJ_NAME EQ P_OBJECT_NAME.          "#EC *
    IF SY-SUBRC NE 0.
      MESSAGE E039(ZTL) WITH TEXT-060.
    ENDIF.
  ENDIF.
ENDFORM.                    " select_data_prg_dic_z
*&---------------------------------------------------------------------*
*&      Form  get_object_type
*&---------------------------------------------------------------------*
*       Get Object type - Example (Giving PROG will return REPS)
*----------------------------------------------------------------------*
FORM GET_OBJECT_TYPE  USING    P_IP TYPE ANY
                    CHANGING   P_OP TYPE ANY.
  CALL FUNCTION 'ZTL_R3TR_TO_LIMU'
    EXPORTING
      R3TR_TYPE = P_IP
    IMPORTING
      LIMU_TYPE = P_OP.

ENDFORM.                    " get_object_type
*&---------------------------------------------------------------------*
*&      Form  get_version
*&---------------------------------------------------------------------*
*      Get Version from Current system and target system
*----------------------------------------------------------------------*
FORM GET_VERSION  TABLES  P_VERSION STRUCTURE VRSD
                  USING   P_SYSTEM TYPE ANY
                          P_OBJ_NAME TYPE ANY
                          P_OBJECT TYPE ANY.
  DATA: LWA_DEST     TYPE RFCDES-RFCDEST,
        LWA_OBJ_NAME TYPE VRSD-OBJNAME,
        LWA_OBJ_TYPE TYPE VRSD-OBJTYPE,
        LT_VERNO     TYPE VRSN OCCURS 0 WITH HEADER LINE,
        LT_VERLIST   TYPE VRSD OCCURS 0 WITH HEADER LINE.
  LWA_DEST     = P_SYSTEM.
  LWA_OBJ_NAME = P_OBJ_NAME.
  LWA_OBJ_TYPE = P_OBJECT.
  CALL FUNCTION 'SVRS_GET_VERSION_DIRECTORY_46'
    EXPORTING
      DESTINATION            = LWA_DEST
      OBJNAME                = LWA_OBJ_NAME
      OBJTYPE                = LWA_OBJ_TYPE
    TABLES
      LVERSNO_LIST           = LT_VERNO
      VERSION_LIST           = LT_VERLIST
    EXCEPTIONS
      NO_ENTRY               = 1
      COMMUNICATION_FAILURE_ = 2
      SYSTEM_FAILURE         = 3
      OTHERS                 = 4.
  IF SY-SUBRC %LT%GT 0.
  ELSE.
    IF NOT LT_VERLIST[] IS INITIAL.
      P_VERSION[] = LT_VERLIST[].
    ENDIF.
  ENDIF.
  CLEAR: LWA_DEST, LWA_OBJ_NAME, LWA_OBJ_TYPE, LT_VERNO, LT_VERLIST .
  REFRESH: LT_VERNO, LT_VERLIST .
ENDFORM.                    " get_version
*&--------------------------------------------------------------------*
*&      Form  create_status_list
*&--------------------------------------------------------------------*
*       Create List
*---------------------------------------------------------------------*
FORM CREATE_STATUS_LIST.
  PERFORM CREATE_FLD_CATALOG.
  PERFORM CREATE_LAYOUT.
  PERFORM GET_EVENTS.
  PERFORM CREATE_LIST.
ENDFORM.                    " create_status_list
*&--------------------------------------------------------------------*
*&      Form  create_fld_catalog
*&--------------------------------------------------------------------*
*       Field Catalog
*---------------------------------------------------------------------*
FORM CREATE_FLD_CATALOG.
  DATA: L_CURRENT_SYS TYPE CHAR40,
        L_TARGET_SYS  TYPE CHAR40,
        L_RFC_SYS     TYPE SYSYSID.
  CONCATENATE TEXT-082 '(' SY-SYSID ')' INTO
              L_CURRENT_SYS SEPARATED BY SPACE.
  IF NOT RD_TAR IS INITIAL.
    CONCATENATE TEXT-083 '(' P_TARGET ')' INTO
                L_TARGET_SYS SEPARATED BY SPACE.
  ELSE.
    PERFORM GET_RFC_SYSTEM USING P_RFCDES CHANGING L_RFC_SYS.
    CONCATENATE TEXT-083 '(' L_RFC_SYS ')' INTO
                L_TARGET_SYS SEPARATED BY SPACE.
  ENDIF.
*-- Create Field catalog
  PERFORM FIELD_CATALOG
                    TABLES T_FIELDCAT
                    USING  C_FINAL_LOG.
  LOOP AT T_FIELDCAT INTO WA_FIELDCAT.
    MOVE-CORRESPONDING WA_FIELDCAT TO WA_FIELD_CAT.
    IF WA_FIELDCAT-FIELDNAME = 'OBJ_TYPE'.
      WA_FIELD_CAT-SELTEXT_L  = TEXT-084.
      WA_FIELD_CAT-OUTPUTLEN  = '12'.
    ELSEIF WA_FIELDCAT-FIELDNAME = 'OBJ_NAME'.
      WA_FIELD_CAT-SELTEXT_L = TEXT-085.
      WA_FIELD_CAT-OUTPUTLEN  = '44'.
    ELSEIF WA_FIELDCAT-FIELDNAME = 'VER_CURR_SYS'.
      WA_FIELD_CAT-SELTEXT_L = L_CURRENT_SYS.
      WA_FIELD_CAT-OUTPUTLEN = '35'.
    ELSEIF WA_FIELDCAT-FIELDNAME = 'VER_TARG_SYS'.
      WA_FIELD_CAT-SELTEXT_L = L_TARGET_SYS.
      WA_FIELD_CAT-OUTPUTLEN = '35'.
    ELSEIF WA_FIELDCAT-FIELDNAME = 'STATUS'.
      WA_FIELD_CAT-SELTEXT_L = TEXT-086.
      WA_FIELD_CAT-OUTPUTLEN = '7'.
    ENDIF.
    APPEND WA_FIELD_CAT TO T_FIELD_CAT_1.
    CLEAR WA_FIELD_CAT.
  ENDLOOP.
ENDFORM.                    " create_fld_catalog
*&--------------------------------------------------------------------*
*&      Form  create_layout
*&--------------------------------------------------------------------*
*       Layout
*---------------------------------------------------------------------*
FORM CREATE_LAYOUT .
  WA_LAY_OUT_1-ZEBRA       = C_X.
ENDFORM.                    " create_layout
*&--------------------------------------------------------------------*
*&      Form  get_events
*&--------------------------------------------------------------------*
*       Events
*---------------------------------------------------------------------*
FORM GET_EVENTS .
  CLEAR WA_EVENT.
  WA_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
  WA_EVENT-FORM = 'TOP_OF_PAGE'.
  APPEND WA_EVENT TO T_EVENTS_1.
ENDFORM.                    " get_even
*&--------------------------------------------------------------------*
*&      Form  create_list
*&--------------------------------------------------------------------*
*       Create List
*---------------------------------------------------------------------*
FORM CREATE_LIST .
  DATA:  L_REPID  LIKE SY-REPID,
         LWA_VARIANT TYPE DISVARIANT.
  L_REPID = SY-REPID.
  WA_PRINT-RESERVE_LINES = 2.
  WA_PRINT-NO_PRINT_LISTINFOS = C_X.
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_CALLBACK_PROGRAM      = L_REPID
      IS_LAYOUT               = WA_LAY_OUT_1
      IT_FIELDCAT             = T_FIELD_CAT_1
      I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
      I_SAVE                  = 'A'
      IS_VARIANT              = LWA_VARIANT
      IS_PRINT                = WA_PRINT
    TABLES
      T_OUTTAB                = T_FINAL_LOG
    EXCEPTIONS
      PROGRAM_ERROR           = 1
      OTHERS                  = 2.
  IF SY-SUBRC %LT%GT 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " create_list
*&--------------------------------------------------------------------*
*&      Form  field_catalog
*&--------------------------------------------------------------------*
*       Field Catalog
*---------------------------------------------------------------------*
FORM FIELD_CATALOG  TABLES P_FIELDCAT STRUCTURE LVC_S_FCAT
                     USING VALUE(P_STRUCTURE).              "#EC *
  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      I_STRUCTURE_NAME       = P_STRUCTURE
    CHANGING
      CT_FIELDCAT            = P_FIELDCAT[]
    EXCEPTIONS
      INCONSISTENT_INTERFACE = 1
      PROGRAM_ERROR          = 2
      OTHERS                 = 3.
  IF SY-SUBRC %LT%GT 0.
    MESSAGE I000(ZTL) WITH TEXT-015.
    LEAVE LIST-PROCESSING.
  ENDIF.
ENDFORM.                    " field_catalog
*&---------------------------------------------------------------------*
*&      Form  check_request_mismatch
*&---------------------------------------------------------------------*
*      Check for Request Mismatch
*----------------------------------------------------------------------*
FORM CHECK_REQUEST_MISMATCH .
*Get Object*
  PERFORM GET_OBJECT_TYPE USING WA_OBJECT-OBJECT CHANGING V_OBJECT.
*Get the Transport Request's of Current system*
  PERFORM GET_VERSION TABLES T_CUR_SYS_VER USING V_CURR_SYSTEM
                                                 WA_OBJECT-OBJ_NAME
                                                 V_OBJECT.
*Get the Transport Request's of Target system*
  PERFORM GET_VERSION TABLES T_TARGET_SYS_VER USING V_DESTINATION
                                                 WA_OBJECT-OBJ_NAME
                                                 V_OBJECT.
*Final Request Mismatch Check to the final internal table
  PERFORM FINAL_REQUEST_MISMATCH USING WA_OBJECT-OBJECT
                                       WA_OBJECT-OBJ_NAME.
ENDFORM.                    " check_request_mismatch
*&---------------------------------------------------------------------*
*&      Form  CHECK_PROG_FUNC_MOD
*&---------------------------------------------------------------------*
*      Check for the Includes in the Function Module
*----------------------------------------------------------------------*
FORM CHECK_PROG_FUNC_MOD.
  READ TABLE T_FUNC_MODULE INTO WA_FUNC_MODULE INDEX 1.
*Selecting the main program of the Function Module*
  SELECT SINGLE PNAME INTO V_PRG_NAME FROM TFDIR
         WHERE FUNCNAME = WA_FUNC_MODULE-FUNCNAME.
  IF SY-SUBRC = 0.
*Get all the includes for the selected main program*
    PERFORM GET_INCLUDES TABLES T_INCLUDE_TAB  USING V_PRG_NAME.
  ENDIF.
  LOOP AT T_FUNC_MODULE INTO WA_FUNC_MODULE.
    DELETE T_INCLUDE_TAB  WHERE NAME = WA_FUNC_MODULE-INCLUDE.
    CLEAR WA_FUNC_MODULE.
  ENDLOOP.
  LOOP AT T_INCLUDE_TAB  INTO WA_INCLUDE_TAB.
    CLEAR: WA_OBJECT.
    WA_OBJECT-OBJECT = 'PROG'.
    WA_OBJECT-OBJ_NAME = WA_INCLUDE_TAB-NAME.
*Check for request mismatch*
    PERFORM CHECK_REQUEST_MISMATCH.
*Programs Text, screen's & GUI*
    IF WA_OBJECT-OBJECT = 'PROG'.
      PERFORM CHECK_PROG_TEXTS_SCREEN_GUI.
    ENDIF.
  ENDLOOP.
  CLEAR: T_INCLUDE_TAB, WA_INCLUDE_TAB, WA_OBJECT, WA_FUNC_MODULE,
         V_PRG_NAME.
  REFRESH: T_INCLUDE_TAB.
ENDFORM.                    " CHECK_PROG_FUNC_MOD
*&---------------------------------------------------------------------*
*&      Form  get_includes
*&---------------------------------------------------------------------*
*       Get Includes for a Program
*----------------------------------------------------------------------*
FORM GET_INCLUDES  TABLES   P_INCLUDE USING    P_PRG_NAME TYPE ANY.
  DATA: LT_INCLUDE_TAB TYPE TY_INCLUDE_TAB OCCURS 0 WITH HEADER LINE,
        LT_INCLUDES    TYPE TRDIR OCCURS 0 WITH HEADER LINE,
        LWA_PROG       TYPE TY_INCLUDE_TAB.
  CALL FUNCTION 'GET_INCLUDETAB'
    EXPORTING
      PROGNAME = P_PRG_NAME
    TABLES
      INCLTAB  = LT_INCLUDE_TAB.
  IF NOT LT_INCLUDE_TAB[] IS INITIAL.
    SELECT * FROM TRDIR INTO TABLE LT_INCLUDES
             FOR ALL ENTRIES IN LT_INCLUDE_TAB
             WHERE NAME = LT_INCLUDE_TAB-INCL_NAME.
    IF SY-SUBRC = 0.
*Delete the includes which are created by SAP*
      DELETE LT_INCLUDES WHERE UNAM = 'SAP' OR UNAM = 'SAP*'.
      IF NOT LT_INCLUDES[] IS INITIAL.
        P_INCLUDE[] = LT_INCLUDES[].
*Adding the main programs name into includes list*
        LWA_PROG-INCL_NAME = P_PRG_NAME.
        APPEND LWA_PROG TO P_INCLUDE.
      ENDIF.
    ENDIF.
  ENDIF.
  CLEAR: LT_INCLUDES, LT_INCLUDE_TAB, LWA_PROG.
  REFRESH: LT_INCLUDES, LT_INCLUDE_TAB.
ENDFORM.                    " get_includes
*&---------------------------------------------------------------------*
*&      Form  get_func_module
*&---------------------------------------------------------------------*
*       Get Functioon module from a Function Group
*----------------------------------------------------------------------*
FORM GET_FUNC_MODULE TABLES P_FUNC_MOD USING P_OBJECT TYPE ANY.
  DATA: LWA_FUNC_POOL TYPE TLIBG-AREA,
        LT_FUNCTAB TYPE RS38L_INCL OCCURS 0 WITH HEADER LINE.
  LWA_FUNC_POOL = P_OBJECT.
  CALL FUNCTION 'RS_FUNCTION_POOL_CONTENTS'
    EXPORTING
      FUNCTION_POOL           = LWA_FUNC_POOL
    TABLES
      FUNCTAB                 = LT_FUNCTAB
    EXCEPTIONS
      FUNCTION_POOL_NOT_FOUND = 1
      OTHERS                  = 2.
  IF SY-SUBRC %LT%GT 0.
  ELSE.
    P_FUNC_MOD[] = LT_FUNCTAB[].
  ENDIF.
ENDFORM.                    " get_func_module
*&--------------------------------------------------------------------*
*&      Form  user_command
*&--------------------------------------------------------------------*
*       Handle User Command
*---------------------------------------------------------------------*
FORM USER_COMMAND USING  WS_UCOMM LIKE SY-UCOMM
                         SELFIELD TYPE SLIS_SELFIELD.       "#EC CALLED
  DATA: LWA_VERS_1 TYPE VRSD,
        LWA_VERS_2 TYPE VRSD,
        LWA_INFOLINE1A TYPE VRSINFOLNA,
        LWA_INFOLINE1B TYPE VRSINFOLNB,
        LWA_INFOLINE2A TYPE VRSINFOLNA,
        LWA_INFOLINE2B TYPE VRSINFOLNB,
        L_OBJNAME1_L  TYPE VRSD-OBJNAME,
        L_OBJNAME2_L  TYPE VRSD-OBJNAME,
        L_DESTINATION   TYPE RFCDES-RFCDEST,
        L_REMOTE_SYSTEM TYPE TADIR-SRCSYSTEM,
        L_REPORT TYPE TRDIR-NAME,
        L_OBJECT TYPE VRSD-OBJTYPE,
        LWA_RFC_SYS TYPE  RFCSI.
  CLEAR: WA_FINAL_LOG,  LWA_VERS_1, LWA_VERS_2, LWA_INFOLINE1A,
         LWA_INFOLINE1B, LWA_INFOLINE2A, LWA_INFOLINE2B, L_OBJNAME1_L,
         L_OBJNAME2_L, L_DESTINATION, L_REMOTE_SYSTEM, L_REPORT,
         V_OBJECT, L_OBJECT, L_REPORT, WA_CURR_VERSION,
         WA_TRGT_VERSION.
  REFRESH: T_CUR_SYS_VER, T_TARGET_SYS_VER.
  CASE WS_UCOMM.
    WHEN '&IC1'.
      IF SELFIELD-FIELDNAME = 'OBJ_TYPE' OR
         SELFIELD-FIELDNAME = 'OBJ_NAME' OR
         SELFIELD-FIELDNAME = 'VER_CURR_SYS' OR
         SELFIELD-FIELDNAME = 'VER_TARG_SYS' OR
         SELFIELD-FIELDNAME = 'STATUS'.
        READ TABLE T_FINAL_LOG INTO WA_FINAL_LOG INDEX SELFIELD-TABINDEX
.
        IF SY-SUBRC = 0.
          IF WA_FINAL_LOG-VER_CURR_SYS = '-' AND
             WA_FINAL_LOG-VER_TARG_SYS %LT%GT '-'.
            MESSAGE I039(ZTL) WITH TEXT-066.
            EXIT.
          ENDIF.
          IF WA_FINAL_LOG-VER_CURR_SYS %LT%GT '-' AND
             WA_FINAL_LOG-VER_TARG_SYS = '-'.
            MESSAGE I039(ZTL) WITH TEXT-067.
            EXIT.
          ENDIF.
          IF WA_FINAL_LOG-VER_CURR_SYS = '-' AND
             WA_FINAL_LOG-VER_TARG_SYS = '-'.
            MESSAGE I039(ZTL) WITH TEXT-068.
            EXIT.
          ENDIF.
          IF WA_FINAL_LOG-VER_CURR_SYS %LT%GT '-' AND
             WA_FINAL_LOG-VER_TARG_SYS %LT%GT '-'.
*Get Object Type*
            PERFORM GET_OBJECT_TYPE USING    WA_FINAL_LOG-OBJ_TYPE
                                    CHANGING V_OBJECT.
*Get the versions of Current system*
            PERFORM GET_VERSION TABLES T_CUR_SYS_VER USING
                                                    V_CURR_SYSTEM
                                                  WA_FINAL_LOG-OBJ_NAME
                                                    V_OBJECT.
*Get the versions of target system*
            PERFORM GET_VERSION TABLES T_TARGET_SYS_VER USING
                                                    V_DESTINATION
                                                  WA_FINAL_LOG-OBJ_NAME
                                                    V_OBJECT.
            L_OBJECT = V_OBJECT.
*Get the Report name for the corresponding Object*
            PERFORM GET_RM_REPORT USING L_OBJECT CHANGING L_REPORT.
            IF NOT L_REPORT IS INITIAL.
              READ TABLE T_CUR_SYS_VER INTO WA_CURR_VERSION INDEX 1.
              READ TABLE T_TARGET_SYS_VER INTO WA_TRGT_VERSION INDEX 1.
*Object Name*
              L_OBJNAME1_L = WA_CURR_VERSION-OBJNAME.
              L_OBJNAME2_L = WA_TRGT_VERSION-OBJNAME.
*Version No*
              LWA_VERS_1-VERSNO = WA_CURR_VERSION-VERSNO.
              LWA_VERS_2-VERSNO = WA_TRGT_VERSION-VERSNO.
*Object Type*
              LWA_VERS_1-OBJTYPE = WA_CURR_VERSION-OBJTYPE.
              LWA_VERS_2-OBJTYPE = WA_TRGT_VERSION-OBJTYPE.
*Line Information*
              LWA_INFOLINE1A = WA_CURR_VERSION-OBJNAME.
              LWA_INFOLINE2A = WA_TRGT_VERSION-OBJNAME.
*Request ID - Current System*
              LWA_INFOLINE1B-KORRNUM = WA_CURR_VERSION-KORRNUM.
*Date of creation in Current system*
              PERFORM DATE_CONVERT USING    WA_CURR_VERSION-DATUM
                                   CHANGING LWA_INFOLINE1B-DATUM.
*Request ID - Target System*
              LWA_INFOLINE2B-KORRNUM = WA_TRGT_VERSION-KORRNUM.
*Date of creation in Target system*
              PERFORM DATE_CONVERT USING    WA_TRGT_VERSION-DATUM
                                   CHANGING LWA_INFOLINE2B-DATUM.
*Author in Current system*
              LWA_INFOLINE1B-AUTHOR  = WA_CURR_VERSION-AUTHOR.
*Author in target system*
              LWA_INFOLINE2B-AUTHOR  = WA_TRGT_VERSION-AUTHOR.
*Target System*
              IF NOT P_TARGET IS INITIAL AND NOT RD_TAR IS INITIAL.
                L_DESTINATION = V_DESTINATION.
                L_REMOTE_SYSTEM = P_TARGET.
              ENDIF.
*Check for the given RFC destination*
              IF RD_RFC EQ C_X AND NOT P_RFCDES IS INITIAL.
                L_DESTINATION = P_RFCDES.
                CALL FUNCTION 'SVRS_RFC_SYSTEM_INFO'
                  EXPORTING
                    IV_DESTINATION = L_DESTINATION
                  IMPORTING
                    ES_RFCSI       = LWA_RFC_SYS
                  EXCEPTIONS
                    RFC_ERROR      = 1
                    OTHERS         = 2.
                IF SY-SUBRC %LT%GT 0.
                ELSE.
                  L_REMOTE_SYSTEM = LWA_RFC_SYS-RFCSYSID.
                ENDIF.
              ENDIF.
*Report to show the Difference between the Curr sys. & Tgt Sys.
              SUBMIT  (L_REPORT) AND RETURN
                      WITH OBJNAME  = L_OBJNAME1_L
                      WITH OBJNAM2  = L_OBJNAME2_L
                      WITH VERSNO1  = LWA_VERS_1-VERSNO
                      WITH VERSNO2  = LWA_VERS_2-VERSNO
                      WITH OBJTYP1  = LWA_VERS_1-OBJTYPE
                      WITH OBJTYP2  = LWA_VERS_2-OBJTYPE
                      WITH INFOLN1A = LWA_INFOLINE1A
                      WITH INFOLN1B = LWA_INFOLINE1B
                      WITH INFOLN2A = LWA_INFOLINE2A
                      WITH INFOLN2B = LWA_INFOLINE2B
                      WITH LOG_DEST = L_DESTINATION
                      WITH REM_SYST = L_REMOTE_SYSTEM.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
  ENDCASE.
ENDFORM.                    "user_command
*&---------------------------------------------------------------------*
*&      Form  get_rm_report
*&---------------------------------------------------------------------*
*       Get Report
*----------------------------------------------------------------------*
FORM GET_RM_REPORT  USING    P_OBJECT TYPE ANY
                    CHANGING P_REPORT TYPE ANY.
  CALL FUNCTION 'SVRS_GET_OBJECT_REPORTS'
    EXPORTING
      OBJTYPE  = P_OBJECT
    IMPORTING
      REP_COMP = P_REPORT.
ENDFORM.                    " get_rm_report
*&---------------------------------------------------------------------*
*&      Form  get_include_prog
*&---------------------------------------------------------------------*
*       Get the Include for the selected Program
*----------------------------------------------------------------------*
FORM GET_INCLUDE_PROG.
  DATA: LI_INCLUDE_TAB  TYPE TRDIR OCCURS 0 WITH HEADER LINE,
        LI_OBJECT       TYPE STANDARD TABLE OF TADIR,
        LWA_OBJECT      TYPE TADIR,
        LV_PRG_NAME    TYPE TFDIR-PNAME.
  LV_PRG_NAME = P_PRG.
  IF NOT T_OBJECT[] IS INITIAL.
*Get the includes for the given program*
    PERFORM GET_INCLUDES TABLES LI_INCLUDE_TAB USING LV_PRG_NAME.
  ENDIF.
  IF NOT LI_INCLUDE_TAB[] IS INITIAL.
*Deleting the main programs name from the includes list*
    DELETE LI_INCLUDE_TAB WHERE NAME = LV_PRG_NAME.
    SELECT * FROM TADIR INTO TABLE LI_OBJECT
             FOR ALL ENTRIES IN LI_INCLUDE_TAB
             WHERE PGMID = 'R3TR'
             AND   OBJECT = 'PROG'
             AND   OBJ_NAME = LI_INCLUDE_TAB-NAME.          "#EC *
  ENDIF.
  IF NOT LI_OBJECT[] IS INITIAL.
    LOOP AT LI_OBJECT INTO LWA_OBJECT.
      APPEND LWA_OBJECT TO T_OBJECT.
    ENDLOOP.
  ENDIF.
  CLEAR: LI_INCLUDE_TAB, LI_OBJECT, LWA_OBJECT, LV_PRG_NAME.
  REFRESH: LI_INCLUDE_TAB, LI_OBJECT.
ENDFORM.                    " get_include_prog
*&---------------------------------------------------------------------*
*&      Form  select_fun_mod_object
*&---------------------------------------------------------------------*
*       Select Object related to the given Function Module
*----------------------------------------------------------------------*
FORM SELECT_FUN_MOD_OBJECT.
  DATA: LWS_AREA TYPE ENLFDIR-AREA.
  IF NOT P_FUN IS INITIAL.
    SELECT SINGLE AREA FROM ENLFDIR INTO LWS_AREA
                       WHERE FUNCNAME = P_FUN.
    IF SY-SUBRC = 0.
      PERFORM SELECT_DATA_PRG_DIC_Z USING LWS_AREA 'FUGR' C_X.
    ENDIF.
  ENDIF.
  CLEAR: LWS_AREA.
ENDFORM.                    " select_fun_mod_object
*&---------------------------------------------------------------------*
*&      Form  screen_change
*&---------------------------------------------------------------------*
*       Screen Changes
*----------------------------------------------------------------------*
FORM SCREEN_CHANGE  USING P_1  TYPE ANY
                          P_2  TYPE ANY
                          P_3  TYPE ANY
                          P_4  TYPE ANY
                          P_5  TYPE ANY
                          P_6  TYPE ANY
                          P_7  TYPE ANY
                          P_8  TYPE ANY
                          P_9  TYPE ANY
                          P_10 TYPE ANY
                          P_11 TYPE ANY
                          P_12 TYPE ANY
                          P_13 TYPE ANY
                          P_14 TYPE ANY.
  LOOP AT SCREEN.
    IF SCREEN-GROUP1 EQ P_1 OR
       SCREEN-GROUP1 EQ P_2 OR
       SCREEN-GROUP1 EQ P_3 OR
       SCREEN-GROUP1 EQ P_4 OR
       SCREEN-GROUP1 EQ P_5 OR
       SCREEN-GROUP1 EQ P_6 OR
       SCREEN-GROUP1 EQ P_7 OR
       SCREEN-GROUP1 EQ P_8 OR
       SCREEN-GROUP1 EQ P_9 OR
       SCREEN-GROUP1 EQ P_10 OR
       SCREEN-GROUP1 EQ P_11 OR
       SCREEN-GROUP1 EQ P_12 OR
       SCREEN-GROUP1 EQ P_13.
      SCREEN-OUTPUT = '0'.
      SCREEN-ACTIVE = '0'.
      SCREEN-INVISIBLE = '1'.
      MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 EQ P_14.
      SCREEN-OUTPUT = '1'.
      SCREEN-INPUT  = '1'.
      SCREEN-ACTIVE = '1'.
      SCREEN-INVISIBLE = '0'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

ENDFORM.                    " screen_change
*&---------------------------------------------------------------------*
*&      Form  date_convert
*&---------------------------------------------------------------------*
*       Date Convert to DD.MM.YYYY
*----------------------------------------------------------------------*
FORM DATE_CONVERT  USING    P_IP TYPE ANY
                   CHANGING P_OP TYPE ANY.
  DATA: LWS_DATE TYPE TUMLS_DATE.
  LWS_DATE = P_IP.
  CALL FUNCTION '/SAPDMC/LSM_DATE_CONVERT'                  "#EC *
    EXPORTING
      DATE_IN             = LWS_DATE
      DATE_FORMAT_IN      = 'DYMD'
    IMPORTING
      DATE_OUT            = P_OP
    EXCEPTIONS
      ILLEGAL_DATE        = 1
      ILLEGAL_DATE_FORMAT = 2
      NO_USER_DATE_FORMAT = 3
      OTHERS              = 4.
ENDFORM.                    " date_convert
*&---------------------------------------------------------------------*
*&      Form  get_rfc_system
*&---------------------------------------------------------------------*
*       Getting RFC system from RFC Destination
*----------------------------------------------------------------------*
FORM GET_RFC_SYSTEM  USING    P_RFC_DEST TYPE ANY
                     CHANGING P_RFC_SYS  TYPE ANY.
  DATA: L_RFCSI TYPE RFCSI,
        L_DEST  TYPE  STRING.
  L_DEST = P_RFC_DEST.
  CALL FUNCTION 'RFC_GET_SYSTEM_INFO'
    EXPORTING
      DESTINATION  = L_DEST
    IMPORTING
      RFCSI_EXPORT = L_RFCSI.
  P_RFC_SYS = L_RFCSI-RFCSYSID.
ENDFORM.                    " get_rfc_system
*&---------------------------------------------------------------------*
*&      Form  select_data_lock_obj
*&---------------------------------------------------------------------*
*       Select Data for Lock Object
*----------------------------------------------------------------------*
FORM SELECT_DATA_LOCK_OBJ USING P_OBJECT_NAME TYPE ANY
                                P_OBJECT      TYPE ANY
                                P_X           TYPE ANY.
  IF P_X EQ SPACE.
    SELECT * FROM TADIR INTO TABLE T_OBJECT
                  WHERE PGMID = 'R3TR'
                  AND   OBJECT = P_OBJECT
                  AND   OBJ_NAME LIKE 'EZ%'.                "#EC *
    IF SY-SUBRC NE 0.
      MESSAGE E039(ZTL) WITH TEXT-060.
    ENDIF.
  ELSEIF P_X EQ C_X.
    SELECT * FROM TADIR INTO TABLE T_OBJECT
                  WHERE PGMID = 'R3TR'
                  AND   OBJECT = P_OBJECT
                  AND   OBJ_NAME EQ P_OBJECT_NAME.          "#EC *
    IF SY-SUBRC NE 0.
      MESSAGE E039(ZTL) WITH TEXT-060.
    ENDIF.
  ENDIF.
ENDFORM.                    " select_data_lock_obj
*&---------------------------------------------------------------------*
*&      Form  check_prog_texts
*&---------------------------------------------------------------------*
*       Check for Programs text elements
*----------------------------------------------------------------------*
FORM CHECK_PROG_TEXTS_SCREEN_GUI.
  WA_OBJECT-OBJECT = 'REPT'.
  CLEAR: TRDIR.
*Check the program is not a include*
  SELECT SINGLE * FROM TRDIR INTO TRDIR
                WHERE NAME = WA_OBJECT-OBJ_NAME
                AND   SUBC %LT%GT 'I'.
  IF SY-SUBRC = 0.
*Check For Programs text element*
    PERFORM CHECK_REQUEST_MISMATCH.
*Check for GUI Status*
    PERFORM CHECK_GUI_STATUS.
*Check for Programs Screens*
    PERFORM CHECK_SCREEN.
  ENDIF.
ENDFORM.                    " check_prog_texts
*&---------------------------------------------------------------------*
*&      Form  check_screen
*&---------------------------------------------------------------------*
*       Check for Screen of a Program
*----------------------------------------------------------------------*
FORM CHECK_SCREEN .
  DATA: LT_SCREENS TYPE D020S OCCURS 0 WITH HEADER LINE,
        LWA_SCREENS TYPE D020S,
        BEGIN OF LTY_OBJ_NAME,
        OBJNAME TYPE D020S-PROG,
        DYNPRO  TYPE D020S-DNUM,
        END OF LTY_OBJ_NAME.
*Get all the screens for a program - excluding selection screen*
  SELECT * FROM D020S INTO TABLE LT_SCREENS
                WHERE PROG =  WA_OBJECT-OBJ_NAME
                AND   TYPE %LT%GT C_S.
  IF SY-SUBRC = 0.
    LOOP AT LT_SCREENS INTO LWA_SCREENS.
      LTY_OBJ_NAME-OBJNAME = LWA_SCREENS-PROG.
      LTY_OBJ_NAME-DYNPRO  = LWA_SCREENS-DNUM.
      V_OBJECT = C_DYN.
      WA_OBJECT-OBJECT = C_DYN.
*Get the Transport Request's of Current system*
      PERFORM GET_VERSION TABLES T_CUR_SYS_VER USING V_CURR_SYSTEM
                                                     LTY_OBJ_NAME
                                                     V_OBJECT.
*Get the Transport Request's of Target system*
      PERFORM GET_VERSION TABLES T_TARGET_SYS_VER USING V_DESTINATION
                                                     LTY_OBJ_NAME
                                                     V_OBJECT.
*Final Request Mismatch Check to the final internal table
      PERFORM FINAL_REQUEST_MISMATCH USING WA_OBJECT-OBJECT
                                           LTY_OBJ_NAME.
      CLEAR:LTY_OBJ_NAME.
    ENDLOOP.
    CLEAR: LT_SCREENS.
    REFRESH: LT_SCREENS.
  ENDIF.
ENDFORM.                    " check_screen
*&---------------------------------------------------------------------*
*&      Form  final_request_mismatch
*&---------------------------------------------------------------------*
*       Final Request Mismatch Check
*----------------------------------------------------------------------*
FORM FINAL_REQUEST_MISMATCH USING P_OBJTYP TYPE ANY
                                  P_OBJNAME TYPE ANY.
  DATA: L_OBJTYP  TYPE TROBJTYPE,
        L_OBJNAME TYPE VERSOBJNAM.
  L_OBJTYP = P_OBJTYP.
  L_OBJNAME = P_OBJNAME.
  READ TABLE T_CUR_SYS_VER INTO WA_CURR_VERSION INDEX 1.
  IF SY-SUBRC = 0.
    IF WA_CURR_VERSION-KORRNUM IS INITIAL.
      CLEAR WA_CURR_VERSION.
      READ TABLE T_CUR_SYS_VER INTO WA_CURR_VERSION INDEX 2.
    ENDIF.
  ENDIF.
  READ TABLE T_TARGET_SYS_VER INTO WA_TRGT_VERSION INDEX 1.
  IF SY-SUBRC = 0.
    IF WA_TRGT_VERSION-KORRNUM IS INITIAL.
      CLEAR WA_TRGT_VERSION.
      READ TABLE T_TARGET_SYS_VER INTO WA_TRGT_VERSION INDEX 2.
    ENDIF.
  ENDIF.
*Comparing the Transport Request of Current & Target system*
  IF NOT WA_CURR_VERSION-KORRNUM IS INITIAL AND
     NOT WA_TRGT_VERSION-KORRNUM IS INITIAL.
    IF WA_CURR_VERSION-KORRNUM EQ WA_TRGT_VERSION-KORRNUM.
      PERFORM POPULATE_FINAL_TABLE USING L_OBJTYP
                                         L_OBJNAME
                                         WA_CURR_VERSION-KORRNUM
                                         WA_TRGT_VERSION-KORRNUM
                                         C_SUCC.
    ELSE.
      PERFORM POPULATE_FINAL_TABLE USING L_OBJTYP
                                         L_OBJNAME
                                         WA_CURR_VERSION-KORRNUM
                                         WA_TRGT_VERSION-KORRNUM
                                         C_FAIL.
    ENDIF.
  ELSEIF NOT WA_CURR_VERSION-KORRNUM IS INITIAL.
    WA_TRGT_VERSION-KORRNUM = '-'.
    PERFORM POPULATE_FINAL_TABLE USING L_OBJTYP
                                       L_OBJNAME
                                       WA_CURR_VERSION-KORRNUM
                                       WA_TRGT_VERSION-KORRNUM
                                       C_FAIL.
  ELSEIF NOT WA_TRGT_VERSION-KORRNUM IS INITIAL.
    WA_CURR_VERSION-KORRNUM = '-'.
    PERFORM POPULATE_FINAL_TABLE USING L_OBJTYP
                                       L_OBJNAME
                                       WA_CURR_VERSION-KORRNUM
                                       WA_TRGT_VERSION-KORRNUM
                                       C_FAIL.
  ELSE.
    IF NOT T_CUR_SYS_VER[] IS INITIAL AND
       NOT T_TARGET_SYS_VER[] IS INITIAL.
      WA_CURR_VERSION-KORRNUM = ''.
      WA_TRGT_VERSION-KORRNUM = ''.
      PERFORM POPULATE_FINAL_TABLE USING L_OBJTYP
                                         L_OBJNAME
                                         WA_CURR_VERSION-KORRNUM
                                         WA_TRGT_VERSION-KORRNUM
                                         C_SUCC.
    ELSEIF NOT T_CUR_SYS_VER[] IS INITIAL AND
               T_TARGET_SYS_VER[] IS INITIAL.
      WA_CURR_VERSION-KORRNUM = ''.
      WA_TRGT_VERSION-KORRNUM = '-'.
      PERFORM POPULATE_FINAL_TABLE USING L_OBJTYP
                                         L_OBJNAME
                                         WA_CURR_VERSION-KORRNUM
                                         WA_TRGT_VERSION-KORRNUM
                                         C_FAIL.
    ELSEIF      T_CUR_SYS_VER[] IS INITIAL AND
           NOT  T_TARGET_SYS_VER[] IS INITIAL.
      WA_CURR_VERSION-KORRNUM = '-'.
      WA_TRGT_VERSION-KORRNUM = ''.
      PERFORM POPULATE_FINAL_TABLE USING L_OBJTYP
                                         L_OBJNAME
                                         WA_CURR_VERSION-KORRNUM
                                         WA_TRGT_VERSION-KORRNUM
                                         C_FAIL.
    ELSE.
      WA_CURR_VERSION-KORRNUM = '-'.
      WA_TRGT_VERSION-KORRNUM = '-'.
      PERFORM POPULATE_FINAL_TABLE USING L_OBJTYP
                                         L_OBJNAME
                                         WA_CURR_VERSION-KORRNUM
                                         WA_TRGT_VERSION-KORRNUM
                                         C_FAIL.
    ENDIF.
  ENDIF.
  CLEAR: V_OBJECT, T_TARGET_SYS_VER, T_CUR_SYS_VER, WA_CURR_VERSION,
         WA_TRGT_VERSION, L_OBJTYP, L_OBJNAME.
  REFRESH:  T_CUR_SYS_VER, T_TARGET_SYS_VER.
ENDFORM.                    " final_request_mismatch
*&---------------------------------------------------------------------*
*&      Form  populate_final_table
*&---------------------------------------------------------------------*
*       Populate Internal table
*----------------------------------------------------------------------*
FORM POPULATE_FINAL_TABLE  USING    P_OBJECT TYPE ANY
                                    P_OBJ_NAME TYPE ANY
                                    P_CURR_VERSION_NO TYPE ANY
                                    P_TRGT_VERSION_NO TYPE ANY
                                    P_STATUS TYPE ANY.
  WA_FINAL_LOG-OBJ_TYPE     = P_OBJECT.
  WA_FINAL_LOG-OBJ_NAME     = P_OBJ_NAME.
  WA_FINAL_LOG-VER_CURR_SYS = P_CURR_VERSION_NO.
  WA_FINAL_LOG-VER_TARG_SYS = P_TRGT_VERSION_NO.
  WA_FINAL_LOG-STATUS       = P_STATUS.
  APPEND WA_FINAL_LOG TO T_FINAL_LOG.
  CLEAR: WA_FINAL_LOG, T_FINAL_LOG.
ENDFORM.                    " populate_final_table
*&---------------------------------------------------------------------*
*&      Form  check_gui_status
*&---------------------------------------------------------------------*
*       Check for GUI status
*----------------------------------------------------------------------*
FORM CHECK_GUI_STATUS .
  DATA: LT_GUI TYPE RSMPTEXTS OCCURS 0 WITH HEADER LINE.    "#EC NEEDED
  SELECT *
    FROM RSMPTEXTS
    INTO TABLE LT_GUI
    WHERE SPRSL = SY-LANGU
    AND   OBJ_TYPE = C_C
    AND   PROGNAME = WA_OBJECT-OBJ_NAME.                    "#EC *
  IF SY-SUBRC = 0.
    WA_OBJECT-OBJECT = C_CUAD.
    PERFORM CHECK_REQUEST_MISMATCH.
  ENDIF.
ENDFORM.                    " check_gui_status
*&---------------------------------------------------------------------*
*&      Form  F4_HELP__TARGET
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --%GT  p1        text
*  %LT--  p2        text
*----------------------------------------------------------------------*
FORM F4_HELP__TARGET .
  DATA: LT_SYSTEMS     LIKE TMSCSYS OCCURS 0,
        L_TARGET_SYS LIKE VERS_DEST-SYSNAME.
  CALL FUNCTION 'TMS_UI_F4_SYSTEMS'
    EXPORTING
      IV_PLUS_VIRTUAL  = ''
      IV_PLUS_EXTERNAL = ''
      IV_ONLY_ACTIVE   = C_X
      IV_TITLE         = TEXT-065
    TABLES
      TT_EXCLUDE       = LT_SYSTEMS
    CHANGING
      CV_SYSTEM        = L_TARGET_SYS.
  IF SY-SUBRC %LT%GT 0.                                     "#EC *
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ELSE.
    P_TARGET = L_TARGET_SYS.
  ENDIF.
ENDFORM.                    " F4_HELP__TARGET
*&---------------------------------------------------------------------*
*&      Form  F4_HELP_FM
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --%GT  p1        text
*  %LT--  p2        text
*----------------------------------------------------------------------*
FORM F4_HELP_FM.
  DATA: L_OBJECT  TYPE CHAR2,
        L_DYNPFLD LIKE  DYNPREAD-FIELDNAME.
  CLEAR: L_OBJECT, L_DYNPFLD.
  SY-INPUT = C_X.                                         "#EC WRITE_OK
  L_OBJECT = C_FB.
  L_DYNPFLD = C_PF.
  PERFORM HELP_FUNC USING L_OBJECT L_DYNPFLD.
ENDFORM.                    " F4_HELP_FM
*&---------------------------------------------------------------------*
*&      Form  F4_HELP_FGROUP
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --%GT  p1        text
*  %LT--  p2        text
*----------------------------------------------------------------------*
FORM F4_HELP_FGROUP .
  DATA: L_OBJECT  TYPE CHAR2,
        L_DYNPFLD LIKE  DYNPREAD-FIELDNAME.
  CLEAR: L_OBJECT, L_DYNPFLD.
  SY-INPUT = 'X'.                                         "#EC WRITE_OK
  L_OBJECT = 'FG'.
  L_DYNPFLD = 'P_FUNG'.
  PERFORM HELP_FUNC USING L_OBJECT L_DYNPFLD.
ENDFORM.                    " F4_HELP_FGROUP
*Text elements
*----------------------------------------------------------
* 001 Object List
* 002 Development Class
* 003 Object
* 004 Remote System Selection
* 005 Target system
* 006 RFC Destination
* 007 All Custom Programs
* 008 Program Name
* 009 Function Module
* 010 Table Name
* 011 All Custom Function Modules
* 012 All Custom Tables
* 013 Function Group
* 014 All Custom Structure
* 015 Structure
* 016 All Custom View
* 017 View
* 018 All Custom Data Element
* 019 Data Element
* 020 All Custom Table type
* 021 Table type
* 022  All Custom Class/Interface
* 023 Class/Interface
* 024 All Custom Type group
* 025 Type Group
* 026 All Custom Domain
* 027 Domain
* 028 All Custom Search Help
* 029 Search Help
* 030 All Custom Lock Object
* 031 Lock Object
* 032 Please enter a Valid RFC Destination
* 033 Please enter a Target System
* 034 Please enter a RFC Destination
* 035 Please enter a Valid Development Class
* 036 Please enter a Valid Program name
* 037 Please enter a Program name
* 038 Please enter a Valid Database table
* 039 Please enter a Database table
* 040 Please enter a Development Class
* 042 Please enter a Valid Structure
* 043 Please enter a Structure
* 044 Please enter a Valid View
* 045 Please enter a View
* 046 Please enter a valid Data Element
* 047 Please enter a Data Element
* 048 Please enter a valid Table Type
* 049 Please enter a Table Type
* 050 Please enter a valid Class / Interface
* 051 Please enter a Class / Interface
* 052 Please enter a valid Type group
* 053 Please enter a Type group
* 054 Please enter a valid Domain
* 055 Please enter a Domain
* 056 Please enter a valid Search Help
* 057 Please enter a Search Help
* 058 Please enter a valid Lock Object
* 059 Please enter a Lock Object
* 060 No Data Found for the given Selection
* 061 Please enter a valid Function module
* 062 Please enter a Function module
* 063 Please enter a valid Function Group
* 064 Please enter a Function Group
* 065 Directly selectable systems
* 066 The object does not exist in the Current system
* 067 The object does not exist in the target system
* 068 The object does not exist in the system
* 069 Development Class
* 070 Program
* 071 Function Module
* 072 Database Table
* 073 Structure
* 074 View
* 075 Data Element
* 076 Table Type
* 077 Class / Interface
* 078 Type Group
* 079 Domain
* 080 Search Help
* 081 Lock Object
* 082 Request in Current System
* 083 Request in Target System
* 084 Object Type
* 085 Object Name
* 086 Status

*Selection texts
*----------------------------------------------------------
* P_CLASS         --
* P_DATA         --
* P_DEVCLS         Development Class
* P_DOMAIN         --
* P_FUN         --
* P_FUNG         --
* P_LCKOBJ         --
* P_OBJECT         Object
* P_PRG         --
* P_RFCDES         Destination
* P_SCRHLP         --
* P_STR         --
* P_TAB         --
* P_TARGET         Target system
* P_TTYPE         --
* P_TYGRP         --
* P_VIEW         --
* RD_ALCK         --
* RD_ALCLS         --
* RD_ALDAT         --
* RD_ALDOM         --
* RD_ALFUN         --
* RD_ALGRP         --
* RD_ALPRG         --
* RD_ALSCR         --
* RD_ALSTR         --
* RD_ALTAB         --
* RD_ALTYP         --
* RD_ALVIE         --
* RD_CLS         --
* RD_DAT         --
* RD_DOM         --
* RD_FUGR         --
* RD_FUNC         --
* RD_GRP         --
* RD_LCK         --
* RD_PROG         --
* RD_RFC         --
* RD_SCR         --
* RD_STRU         --
* RD_TABL         --
* RD_TAR         --
* RD_TYPE         --
* RD_VIE         --

*Messages
*----------------------------------------------------------
*
* Message class: ZTL
*000   & & & &
*039   &
*Text elements
*----------------------------------------------------------
* 001 Object List
* 002 Development Class
* 003 Object
* 004 Remote System Selection
* 005 Target system
* 006 RFC Destination
* 007 All Custom Programs
* 008 Program Name
* 009 Function Module
* 010 Table Name
* 011 All Custom Function Modules
* 012 All Custom Tables
* 013 Function Group
* 014 All Custom Structure
* 015 Structure
* 016 All Custom View
* 017 View
* 018 All Custom Data Element
* 019 Data Element
* 020 All Custom Table type
* 021 Table type
* 022 All Custom Class/Interface
* 023 Class/Interface
* 024 All Custom Type group
* 025 Type Group
* 026 All Custom Domain
* 027 Domain
* 028 All Custom Search Help
* 029 Search Help
* 030 All Custom Lock Object
* 031 Lock Object
* 032 Please enter a Valid RFC Destination
* 033 Please enter a Target System
* 034 Please enter a RFC Destination
* 035 Please enter a Valid Development Class
* 036 Please enter a Valid Program name
* 037 Please enter a Program name
* 038 Please enter a Valid Database table
* 039 Please enter a Database table
* 040 Please enter a Development Class
* 041 Please enter a Valid Structure
* 042 Please enter a Structure
* 043 Please enter a Valid View
* 044 Please enter a View
* 045 Please enter a valid Data Element
* 046 Please enter a Data Element
* 047 Please enter a valid Table Type
* 048 Please enter a Table Type
* 049 Please enter a valid Class / Interface
* 050 Please enter a Class / Interface
* 051 Please enter a valid Type group
* 052 Please enter a Type group
* 053 Please enter a valid Domain
* 054 Please enter a Domain
* 055 Please enter a valid Search Help
* 056 Please enter a Search Help
* 057 Please enter a valid Lock Object
* 058 Please enter a Lock Object
* 059 No Data Found for the given Selection
* 060 Please enter a valid Function module
* 061 Please enter a Function module
* 062 Please enter a valid Function Group
* 063 Please enter a Function Group
* 064 Directly selectable systems
* 065 The object does not exist in the Current system
* 066 The object does not exist in the target system
* 067 The object does not exist in the system
* 068 Development Class
* 069 Program
* 070 Function Module
* 071 Database Table
* 072 Structure
* 073 View
* 074 Data Element
* 075 Table Type
* 076 Class / Interface
* 077 Type Group
* 078 Domain
* 079 Search Help
* 080 Lock Object
* 081 Request in Current System
* 082 Request in Target System
* 083 Object Type
* 084 Object Name
* 085 Status

*Selection texts
*----------------------------------------------------------
* P_DEVCLS         Development Class
* P_OBJECT         Object
* P_RFCDES         RFC Destination
* P_TARGET         Target System

*Messages
*----------------------------------------------------------
*
* Message class: ZTL
*000
*039
*Text elements
*----------------------------------------------------------
* 001 Object List
* 002 Development Class
* 003 Object
* 004 Remote System Selection
* 005 Target system
* 006 RFC Destination
* 007 All Custom Programs
* 008 Program Name
* 009 Function Module
* 010 Table Name
* 011 All Custom Function Modules
* 012 All Custom Tables
* 013 Function Group
* 014 All Custom Structure
* 015 Structure
* 016 All Custom View
* 017 View
* 018 All Custom Data Element
* 019 Data Element
* 020 All Custom Table type
* 021 Table type
* 022 All Custom Class/Interface
* 023 Class/Interface
* 024 All Custom Type group
* 025 Type Group
* 026 All Custom Domain
* 027 Domain
* 028 All Custom Search Help
* 029 Search Help
* 030 All Custom Lock Object
* 031 Lock Object
* 032 Please enter a Valid RFC Destination
* 033 Please enter a Target System
* 034 Please enter a RFC Destination
* 035 Please enter a Valid Development Class
* 036 Please enter a Valid Program name
* 037 Please enter a Program name
* 038 Please enter a Valid Database table
* 039 Please enter a Database table
* 040 Please enter a Development Class
* 041 Please enter a Valid Structure
* 042 Please enter a Structure
* 043 Please enter a Valid View
* 044 Please enter a View
* 045 Please enter a valid Data Element
* 046 Please enter a Data Element
* 047 Please enter a valid Table Type
* 048 Please enter a Table Type
* 049 Please enter a valid Class / Interface
* 050 Please enter a Class / Interface
* 051 Please enter a valid Type group
* 052 Please enter a Type group
* 053 Please enter a valid Domain
* 054 Please enter a Domain
* 055 Please enter a valid Search Help
* 056 Please enter a Search Help
* 057 Please enter a valid Lock Object
* 058 Please enter a Lock Object
* 059 No Data Found for the given Selection
* 060 Please enter a Function module
* 061 Please enter a valid Function Group
* 062 Please enter a Function Group
* 063 Directly selectable systems
* 064 The object does not exist in the Current system
* 065 The object does not exist in the target system
* 066 The object does not exist in the system
* 067
* 068 Develop
* 069 Program
* 070 Function Modul
* 071 Database
* 072 Stru
* 073 View
* 074 Data Eleme
* 075 Table Type
* 076 Class / In
* 077 Type G
* 078 Domain
* 079 Search Help
* 080 Request in Current System
* 081 Request in Target System
* 082 Object Type
* 083 Status

*Selection texts
*----------------------------------------------------------
* P_CLASS         Development Class
* P_DATA
* P_DEVCLS
* P_DOMAIN
* P_OBJECT         Object
* P_RFCDES         RFC Destination
* P_TARGET         Target System

*Messages
*----------------------------------------------------------
*
* Message class: ZTL
*000
*039
  • No labels

1 Comment

  1. Former Member

    Hello Aveek,

    This seems to be a mighty tool but unfortunately it doesn't get started. What type is ZVERSION_CHECK?

    What about providing a complete transport? ...what made life much easier ;-)

    Thank you and best regards,

    Oliver