Skip to content

Commit

Permalink
Update installer
Browse files Browse the repository at this point in the history
  • Loading branch information
mbtools committed Dec 9, 2021
1 parent 1cd1801 commit 33dfe96
Showing 1 changed file with 59 additions and 13 deletions.
72 changes: 59 additions & 13 deletions src/core/#mbtools#mbt_installer.prog.abap
Original file line number Diff line number Diff line change
Expand Up @@ -7570,6 +7570,14 @@ CLASS zcl_abapinst_objects DEFINITION

PRIVATE SECTION.

TYPES:
BEGIN OF ty_supported_types,
obj_type TYPE tadir-object,
supported TYPE abap_bool,
END OF ty_supported_types.

TYPES: ty_supported_types_tt TYPE SORTED TABLE OF ty_supported_types WITH UNIQUE KEY obj_type.

TYPES:
BEGIN OF ty_obj_serializer_item,
item TYPE zif_abapgit_definitions=>ty_item,
Expand All @@ -7580,7 +7588,8 @@ CLASS zcl_abapinst_objects DEFINITION
TYPE SORTED TABLE OF ty_obj_serializer_item WITH UNIQUE KEY item .

CLASS-DATA gt_obj_serializer_map TYPE ty_obj_serializer_map .
CLASS-DATA gt_supported_obj_types TYPE ty_types_tt .
CLASS-DATA gt_supported_obj_types TYPE ty_supported_types_tt .
CLASS-DATA gv_supported_obj_types_loaded TYPE abap_bool .

CLASS-METHODS files_to_deserialize
IMPORTING
Expand Down Expand Up @@ -34511,13 +34520,35 @@ CLASS zcl_abapinst_objects IMPLEMENTATION.

METHOD is_type_supported.

" If necessary, initialize list
IF gt_supported_obj_types IS INITIAL.
supported_list( ).
DATA: ls_item TYPE zif_abapgit_definitions=>ty_item,
ls_supported_obj_type TYPE ty_supported_types.

FIELD-SYMBOLS <ls_supported_obj_type> TYPE ty_supported_types.

IF iv_obj_type IS INITIAL.
" empty object type should never exist
RETURN.
ENDIF.

READ TABLE gt_supported_obj_types TRANSPORTING NO FIELDS WITH TABLE KEY table_line = iv_obj_type.
rv_bool = boolc( sy-subrc = 0 ).
READ TABLE gt_supported_obj_types
ASSIGNING <ls_supported_obj_type>
WITH KEY obj_type = iv_obj_type.

IF sy-subrc <> 0.

ls_item-obj_type = iv_obj_type.

ls_supported_obj_type-obj_type = iv_obj_type.
ls_supported_obj_type-supported = is_supported( ls_item ).

INSERT ls_supported_obj_type INTO TABLE gt_supported_obj_types.

rv_bool = ls_supported_obj_type-supported.
RETURN.

ENDIF.

rv_bool = <ls_supported_obj_type>-supported.

ENDMETHOD.

Expand Down Expand Up @@ -34656,30 +34687,45 @@ CLASS zcl_abapinst_objects IMPLEMENTATION.

METHOD supported_list.

DATA: lt_objects TYPE STANDARD TABLE OF ko100,
ls_item TYPE zif_abapgit_definitions=>ty_item.
DATA: lt_objects TYPE STANDARD TABLE OF ko100,
ls_item TYPE zif_abapgit_definitions=>ty_item,
ls_supported_obj_type TYPE ty_supported_types.

FIELD-SYMBOLS <ls_object> LIKE LINE OF lt_objects.
FIELD-SYMBOLS <ls_supported_obj_type> TYPE ty_supported_types.

IF gt_supported_obj_types IS NOT INITIAL.
rt_types = gt_supported_obj_types.
IF gv_supported_obj_types_loaded = abap_true.
LOOP AT gt_supported_obj_types ASSIGNING <ls_supported_obj_type> WHERE supported = abap_true.
INSERT <ls_supported_obj_type>-obj_type INTO TABLE rt_types.
ENDLOOP.
RETURN.
ENDIF.

" delete content because it might be filled already by method IS_TYPE_SUPPORTED
CLEAR gt_supported_obj_types.

CALL FUNCTION 'TR_OBJECT_TABLE'
TABLES
wt_object_text = lt_objects
EXCEPTIONS
OTHERS = 1 ##FM_SUBRC_OK.

LOOP AT lt_objects ASSIGNING <ls_object> WHERE pgmid = 'R3TR'.

ls_item-obj_type = <ls_object>-object.

IF is_supported( ls_item ) = abap_true.
INSERT <ls_object>-object INTO TABLE rt_types.
ls_supported_obj_type-obj_type = <ls_object>-object.
ls_supported_obj_type-supported = is_supported( ls_item ).

INSERT ls_supported_obj_type INTO TABLE gt_supported_obj_types.

IF ls_supported_obj_type-supported = abap_true.
INSERT ls_supported_obj_type-obj_type INTO TABLE rt_types.
ENDIF.

ENDLOOP.
gt_supported_obj_types = rt_types.

gv_supported_obj_types_loaded = abap_true.

ENDMETHOD.

Expand Down

0 comments on commit 33dfe96

Please sign in to comment.