mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 04:08:27 +08:00
Update CLAS ZCL_ABAPGIT_OBJECT_PINF (#3455)
Fixes the dump and import error for package interfaces. Even if the package interface is in a different package than the referencedpackage itself. Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
parent
14b9c7d864
commit
b45a51eedf
|
@ -55,7 +55,7 @@ ENDCLASS.
|
|||
|
||||
|
||||
|
||||
CLASS zcl_abapgit_object_pinf IMPLEMENTATION.
|
||||
CLASS ZCL_ABAPGIT_OBJECT_PINF IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD create_facade.
|
||||
|
@ -69,13 +69,25 @@ CLASS zcl_abapgit_object_pinf IMPLEMENTATION.
|
|||
|
||||
METHOD create_or_load.
|
||||
|
||||
DATA: li_interface TYPE REF TO if_package_interface.
|
||||
DATA: li_interface TYPE REF TO if_package_interface,
|
||||
lv_pkg_interface_data TYPE scompidtln.
|
||||
|
||||
lv_pkg_interface_data-default_if = is_pinf-attributes-default_if.
|
||||
lv_pkg_interface_data-tadir_devc = iv_package.
|
||||
|
||||
"Important if the package name comes from another package
|
||||
IF is_pinf-attributes-pack_name IS INITIAL.
|
||||
lv_pkg_interface_data-pack_name = iv_package.
|
||||
ELSE.
|
||||
lv_pkg_interface_data-pack_name = is_pinf-attributes-pack_name.
|
||||
ENDIF.
|
||||
|
||||
IF zif_abapgit_object~exists( ) = abap_false.
|
||||
cl_package_interface=>create_new_package_interface(
|
||||
EXPORTING
|
||||
i_pkg_interface_name = is_pinf-attributes-intf_name
|
||||
i_publisher_pkg_name = iv_package
|
||||
i_publisher_pkg_name = lv_pkg_interface_data-pack_name
|
||||
i_pkg_interface_data = lv_pkg_interface_data
|
||||
IMPORTING
|
||||
e_package_interface = li_interface
|
||||
EXCEPTIONS
|
||||
|
@ -253,6 +265,9 @@ CLASS zcl_abapgit_object_pinf IMPLEMENTATION.
|
|||
io_xml->read( EXPORTING iv_name = 'PINF'
|
||||
CHANGING cg_data = ls_pinf ).
|
||||
|
||||
"needed for update_attributes
|
||||
ls_pinf-attributes-tadir_devc = iv_package.
|
||||
|
||||
li_interface = create_or_load(
|
||||
is_pinf = ls_pinf
|
||||
iv_package = iv_package ).
|
||||
|
@ -347,8 +362,12 @@ CLASS zcl_abapgit_object_pinf IMPLEMENTATION.
|
|||
|
||||
ls_pinf-attributes = li_interface->get_all_attributes( ).
|
||||
|
||||
CLEAR: ls_pinf-attributes-pack_name,
|
||||
ls_pinf-attributes-author,
|
||||
"Delete the package name if it comes from the same package
|
||||
IF ls_pinf-attributes-tadir_devc = ls_pinf-attributes-pack_name.
|
||||
CLEAR ls_pinf-attributes-pack_name.
|
||||
ENDIF.
|
||||
|
||||
CLEAR: ls_pinf-attributes-author,
|
||||
ls_pinf-attributes-created_by,
|
||||
ls_pinf-attributes-created_on,
|
||||
ls_pinf-attributes-changed_by,
|
||||
|
|
Loading…
Reference in New Issue
Block a user