diff --git a/src/core/#mbtools#mbt_installer.prog.abap b/src/core/#mbtools#mbt_installer.prog.abap index d7844b7..64dea74 100644 --- a/src/core/#mbtools#mbt_installer.prog.abap +++ b/src/core/#mbtools#mbt_installer.prog.abap @@ -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, @@ -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 @@ -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 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 + 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 = -supported. ENDMETHOD. @@ -34656,16 +34687,23 @@ 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 LIKE LINE OF lt_objects. + FIELD-SYMBOLS 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 WHERE supported = abap_true. + INSERT -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 @@ -34673,13 +34711,21 @@ CLASS zcl_abapinst_objects IMPLEMENTATION. OTHERS = 1 ##FM_SUBRC_OK. LOOP AT lt_objects ASSIGNING WHERE pgmid = 'R3TR'. + ls_item-obj_type = -object. - IF is_supported( ls_item ) = abap_true. - INSERT -object INTO TABLE rt_types. + ls_supported_obj_type-obj_type = -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.