DTEL: REF TO DATA for DDIC element support (#5350)

This commit is contained in:
Alexandr Razinkin 2022-02-15 09:39:27 +03:00 committed by GitHub
parent 1246e2718f
commit 256007685e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,6 +21,11 @@ CLASS zcl_abapgit_object_dtel DEFINITION PUBLIC INHERITING FROM zcl_abapgit_obje
CONSTANTS c_longtext_id_dtel TYPE dokil-id VALUE 'DE' ##NO_TEXT.
METHODS is_abapclass_or_abapinterface
IMPORTING
!iv_reference_name TYPE clike
RETURNING
VALUE(rv_abapclass_or_abapinterface) TYPE abap_bool .
METHODS serialize_texts
IMPORTING
!ii_xml TYPE REF TO zif_abapgit_xml_output
@ -89,6 +94,27 @@ CLASS zcl_abapgit_object_dtel IMPLEMENTATION.
ENDMETHOD.
METHOD is_abapclass_or_abapinterface.
DATA ls_cifkey TYPE seoclskey.
ls_cifkey-clsname = iv_reference_name.
CALL FUNCTION 'SEO_CLIF_GET'
EXPORTING
cifkey = ls_cifkey
EXCEPTIONS
not_existing = 1
deleted = 2
model_only = 3
OTHERS = 4.
IF sy-subrc = 0.
rv_abapclass_or_abapinterface = abap_true.
ENDIF.
ENDMETHOD.
METHOD serialize_texts.
DATA: lv_name TYPE ddobjname,
@ -183,7 +209,9 @@ CLASS zcl_abapgit_object_dtel IMPLEMENTATION.
CHANGING cg_data = ls_dd04v ).
" DDIC Step: Replace REF TO class/interface with generic reference to avoid cyclic dependency
IF iv_step = zif_abapgit_object=>gc_step_id-ddic AND ls_dd04v-datatype = 'REF'.
IF iv_step = zif_abapgit_object=>gc_step_id-ddic AND ls_dd04v-datatype = 'REF'
AND is_abapclass_or_abapinterface( ls_dd04v-domname ) = abap_true.
ls_dd04v-rollname = 'OBJECT'.
ELSEIF iv_step = zif_abapgit_object=>gc_step_id-late AND ls_dd04v-datatype <> 'REF'.
RETURN. " already active