CHAR: fix package popup during pull #1661 (#1689)

* CHAR: fix package popup during pull

* Remove superfluous ABAP memory clearance

memory is already cleared in RS_CORR_INSERT

* Introduce objects_super set_default_package

Refactor set default package logic to super class
zcl_abapgit_objects_super method set_default_package.
This commit is contained in:
Christian Günter 2018-07-25 15:00:52 +02:00 committed by Lars Hvam
parent 335759f741
commit 8572013c7e
2 changed files with 23 additions and 7 deletions

View File

@ -173,13 +173,10 @@ CLASS ZCL_ABAPGIT_OBJECT_CHAR IMPLEMENTATION.
im_values = ls_char-cls_attr_value
im_values_t = ls_char-cls_attr_valuet ).
* set default package, see function module RS_CORR_INSERT
SET PARAMETER ID 'EUK' FIELD iv_package.
set_default_package( iv_package ).
lo_char->if_pak_wb_object~save( ).
SET PARAMETER ID 'EUK' FIELD ''.
lo_char->if_pak_wb_object~activate( ).
lo_char->if_pak_wb_object_internal~unlock( ).

View File

@ -45,7 +45,10 @@ CLASS zcl_abapgit_objects_super DEFINITION PUBLIC ABSTRACT.
IMPORTING iv_lock_object TYPE string
iv_argument TYPE seqg3-garg OPTIONAL
RETURNING VALUE(rv_exists_a_lock_entry) TYPE abap_bool
RAISING zcx_abapgit_exception.
RAISING zcx_abapgit_exception,
set_default_package
IMPORTING
iv_package TYPE devclass.
PRIVATE SECTION.
@ -62,6 +65,22 @@ ENDCLASS.
CLASS zcl_abapgit_objects_super IMPLEMENTATION.
METHOD set_default_package.
" In certain cases we need to set the package package via ABAP memory
" because we can't supply it via the APIs.
"
" Set default package, see function module RS_CORR_INSERT FORM get_current_devclass.
"
" We use ABAP memory instead the SET parameter because it is
" more reliable. SET parameter doesn't work when multiple objects
" are deserialized which uses the ABAP memory mechanism.
" We don't need to reset the memory as it is done in above mentioned form routine.
EXPORT current_devclass FROM iv_package TO MEMORY ID 'EUK'.
ENDMETHOD.
METHOD check_timestamp.