Code: Alles auswählen.
clkey = 'ZCL_TEST_01'.
clkey_new = 'ZCL_TEST_03'.
devclass = '$Z_ROOT'.
devclass_new = '$Z_SUB'.
CALL FUNCTION 'SEO_CLASS_EXISTENCE_CHECK'
EXPORTING
clskey = clkey_new
EXCEPTIONS
not_specified = 1
not_existing = 2
is_interface = 3
no_text = 4
inconsistent = 5
others = 6.
IF sy-subrc = 0.
CALL FUNCTION 'SEO_CLASS_DELETE'
EXPORTING
clskeys = VALUE seoc_class_keys( ( clkey_new ) )
EXCEPTIONS
not_specified = 1
not_existing = 2
others = 3.
IF sy-subrc = 3.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'SEO_CLASS_DELETE_GARBAGE'
EXPORTING
clskey = clkey_new.
COMMIT WORK AND WAIT.
ENDIF.
CALL FUNCTION 'SEO_CLASS_COPY'
EXPORTING
clskey = clkey
new_clskey = clkey_new
* access_permission = " Access Permission wird aufgerufen
* save =
* suppress_corr =
suppress_dialog = abap_false
* authority_check =
* lifecycle_manager =
* lock_handle =
* suppress_commit =
* IMPORTING
* new_class =
CHANGING
* corrnr = " Auftrag/Aufgabe
devclass = devclass_new " Paket
EXCEPTIONS
not_existing = 1
deleted = 2
is_interface = 3
not_copied = 4
db_error = 5
no_access = 6
others = 7
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ROLLBACK WORK.
RETURN.
ENDIF.
CALL FUNCTION 'SEO_CLASS_ACTIVATE'
EXPORTING
clskeys = VALUE seoc_class_keys( ( clkey_new ) )
EXCEPTIONS
not_specified = 1
not_existing = 2
inconsistent = 3
others = 4
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Folgende Benutzer bedankten sich beim Autor ewx für den Beitrag:
der_neuling
Danke für den Tipp! Die FuBas 'XXX_OBJECT_ACTICVATE' funktionieren ohne Probleme