Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Report ZBC_CHANGE_SOURCE_SYSTEM
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZBC_CHANGE_SOURCE_SYSTEM.
data ls type tadir.
data lt type TABLE OF tadir.
data ltxt type string.
data nl(6).
select * from tadir into TABLE lt where DEVCLASS = 'ZODATA' and SRCSYSTEM = <<OLDSystemID>>.
nl = lines( lt ).
concatenate nl ' lines found.' into ltxt.
cl_demo_output=>write_text( ltxt ).
cl_demo_output=>display( lt ).
loop at lt into ls.
CALL FUNCTION 'TR_TADIR_INTERFACE'
EXPORTING
* WI_DELETE_TADIR_ENTRY = ' '
* WI_REMOVE_REPAIR_FLAG = ' '
* WI_SET_REPAIR_FLAG = ' '
WI_TEST_MODUS = ' '
WI_TADIR_PGMID = ls-PGMID
WI_TADIR_OBJECT = ls-OBJECT
WI_TADIR_OBJ_NAME = ls-OBJ_NAME
* WI_TADIR_KORRNUM = ' '
WI_TADIR_SRCSYSTEM = sy-sysid
* WI_TADIR_AUTHOR = ' '
* WI_TADIR_DEVCLASS = ' '
* WI_TADIR_MASTERLANG = ' '
* WI_TADIR_CPROJECT = ' '
* WI_TADIR_VERSID = ' '
* WI_REMOVE_GENFLAG = ' '
* WI_SET_GENFLAG = ' '
* WI_READ_ONLY = ' '
* IV_SET_EDTFLAG = ' '
* IV_TRANSL_TECH_TEXT = ' '
* IV_DELFLAG = ' '
* IV_NO_PAK_CHECK = ' '
* IV_OBJ_STABILITY = ' '
* WI_TADIR_CHECK_DATE = ''
* WI_TADIR_CHECK_CFG = ' '
* IMPORTING
* NEW_GTADIR_ENTRY =
* NEW_TADIR_ENTRY =
EXCEPTIONS
TADIR_ENTRY_NOT_EXISTING = 1
TADIR_ENTRY_ILL_TYPE = 2
NO_SYSTEMNAME = 3
NO_SYSTEMTYPE = 4
ORIGINAL_SYSTEM_CONFLICT = 5
OBJECT_RESERVED_FOR_DEVCLASS = 6
OBJECT_EXISTS_GLOBAL = 7
OBJECT_EXISTS_LOCAL = 8
OBJECT_IS_DISTRIBUTED = 9
OBJ_SPECIFICATION_NOT_UNIQUE = 10
NO_AUTHORIZATION_TO_DELETE = 11
DEVCLASS_NOT_EXISTING = 12
SIMULTANIOUS_SET_REMOVE_REPAIR = 13
ORDER_MISSING = 14
NO_MODIFICATION_OF_HEAD_SYST = 15
PGMID_OBJECT_NOT_ALLOWED = 16
MASTERLANGUAGE_NOT_SPECIFIED = 17
DEVCLASS_NOT_SPECIFIED = 18
SPECIFY_OWNER_UNIQUE = 19
LOC_PRIV_OBJS_NO_REPAIR = 20
GTADIR_NOT_REACHED = 21
OBJECT_LOCKED_FOR_ORDER = 22
CHANGE_OF_CLASS_NOT_ALLOWED = 23
NO_CHANGE_FROM_SAP_TO_TMP = 24
OTHERS = 25
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
ENDLOOP.
clear: nl,ltxt.
refresh lt.
select * from tadir into TABLE lt where
DEVCLASS = 'ZODATA' and SRCSYSTEM = <<OLDSystemID>>.
nl = lines( lt ).
concatenate nl ' lines found.' into ltxt.
cl_demo_output=>write_text( ltxt ).
cl_demo_output=>display( lt ).