From 27237fa8a49a5cf391bd7de1b414cf11c30e58d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Carrilho?= Date: Wed, 24 Jan 2024 16:17:58 +0000 Subject: [PATCH] Fix #37 --- src/zcl_abapgit_object_zn02.clas.abap | 59 +++++++++++++++++------- src/zcl_abapgit_object_zn03.clas.abap | 60 ++++++++++++++++++------- src/zcl_abapgit_object_zn04.clas.abap | 56 +++++++++++++++++------ src/zcl_abapgit_object_zn05.clas.abap | 64 ++++++++++++++++++++------- src/zcl_abapgit_object_zn06.clas.abap | 60 ++++++++++++++++++------- src/zcl_abapgit_object_zn07.clas.abap | 60 ++++++++++++++++++------- src/zcl_abapgit_object_zn08.clas.abap | 60 ++++++++++++++++++------- src/zcl_abapgit_object_zn09.clas.abap | 60 ++++++++++++++++++------- src/zcl_abapgit_object_zn10.clas.abap | 60 ++++++++++++++++++------- src/zcl_abapgit_object_zn11.clas.abap | 60 ++++++++++++++++++------- src/zcl_abapgit_object_zn12.clas.abap | 60 ++++++++++++++++++------- src/zcl_abapgit_object_zn13.clas.abap | 60 ++++++++++++++++++------- src/zcl_abapgit_object_zn14.clas.abap | 60 ++++++++++++++++++------- src/zcl_abapgit_object_zn15.clas.abap | 60 ++++++++++++++++++------- src/zcl_abapgit_object_zn16.clas.abap | 60 ++++++++++++++++++------- src/zcl_abapgit_object_zn17.clas.abap | 56 +++++++++++++++++------ src/zcl_abapgit_object_zn19.clas.abap | 60 ++++++++++++++++++------- src/zcl_abapgit_object_zn20.clas.abap | 56 +++++++++++++++++------ src/zcl_abapgit_object_zn21.clas.abap | 56 +++++++++++++++++------ src/zcl_abapgit_object_zn22.clas.abap | 60 ++++++++++++++++++------- 20 files changed, 893 insertions(+), 294 deletions(-) diff --git a/src/zcl_abapgit_object_zn02.clas.abap b/src/zcl_abapgit_object_zn02.clas.abap index 7c43ff7..277be44 100644 --- a/src/zcl_abapgit_object_zn02.clas.abap +++ b/src/zcl_abapgit_object_zn02.clas.abap @@ -244,6 +244,13 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN02 IMPLEMENTATION. data ls_api type /neptune/api. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). @@ -251,23 +258,45 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN02 IMPLEMENTATION. lv_key = me->ms_item-obj_name. translate lv_key to lower case. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/API'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_api index 1. - if sy-subrc = 0 and ls_api-updnam is not initial. - rv_user = ls_api-updnam. - else. - rv_user = ls_api-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/API'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_api index 1. + if sy-subrc = 0 and ls_api-updnam is not initial. + rv_user = ls_api-updnam. + else. + rv_user = ls_api-crenam. + endif. + endif. + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn03.clas.abap b/src/zcl_abapgit_object_zn03.clas.abap index d828cfc..139b491 100644 --- a/src/zcl_abapgit_object_zn03.clas.abap +++ b/src/zcl_abapgit_object_zn03.clas.abap @@ -852,28 +852,58 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN03 IMPLEMENTATION. data ls_appcach type /neptune/appcach. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/APPCACH'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_appcach index 1. - if sy-subrc = 0 and ls_appcach-updnam is not initial. - rv_user = ls_appcach-updnam. - else. - rv_user = ls_appcach-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/APPCACH'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_appcach index 1. + if sy-subrc = 0 and ls_appcach-updnam is not initial. + rv_user = ls_appcach-updnam. + else. + rv_user = ls_appcach-crenam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn04.clas.abap b/src/zcl_abapgit_object_zn04.clas.abap index 60f4a35..d19ba02 100644 --- a/src/zcl_abapgit_object_zn04.clas.abap +++ b/src/zcl_abapgit_object_zn04.clas.abap @@ -232,26 +232,56 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN04 IMPLEMENTATION. data ls_categor type /neptune/categor. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/CATEGOR'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_categor index 1. - if sy-subrc = 0 and ls_categor-updnam is not initial. - rv_user = ls_categor-updnam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/CATEGOR'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_categor index 1. + if sy-subrc = 0 and ls_categor-updnam is not initial. + rv_user = ls_categor-updnam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn05.clas.abap b/src/zcl_abapgit_object_zn05.clas.abap index 1ead944..a212c30 100644 --- a/src/zcl_abapgit_object_zn05.clas.abap +++ b/src/zcl_abapgit_object_zn05.clas.abap @@ -231,30 +231,60 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN05 IMPLEMENTATION. data ls_menu type /neptune/menu. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. ********************************************************************** - lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - lv_key = ms_item-obj_name. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). + + lv_key = ms_item-obj_name. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/MENU'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_menu index 1. + if sy-subrc = 0 and ls_menu-updnam is not initial. + rv_user = ls_menu-updnam. + else. + rv_user = ls_menu-crenam. + endif. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/MENU'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_menu index 1. - if sy-subrc = 0 and ls_menu-updnam is not initial. - rv_user = ls_menu-updnam. - else. - rv_user = ls_menu-crenam. - endif. - endif. + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn06.clas.abap b/src/zcl_abapgit_object_zn06.clas.abap index 6dcfcf6..b52ba63 100644 --- a/src/zcl_abapgit_object_zn06.clas.abap +++ b/src/zcl_abapgit_object_zn06.clas.abap @@ -231,28 +231,58 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN06 IMPLEMENTATION. data ls_policy type /neptune/policy. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/POLICY'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_policy index 1. - if sy-subrc = 0 and ls_policy-updnam is not initial. - rv_user = ls_policy-updnam. - else. - rv_user = ls_policy-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/POLICY'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_policy index 1. + if sy-subrc = 0 and ls_policy-updnam is not initial. + rv_user = ls_policy-updnam. + else. + rv_user = ls_policy-crenam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn07.clas.abap b/src/zcl_abapgit_object_zn07.clas.abap index df0b8bd..d20f3b0 100644 --- a/src/zcl_abapgit_object_zn07.clas.abap +++ b/src/zcl_abapgit_object_zn07.clas.abap @@ -255,28 +255,58 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN07 IMPLEMENTATION. data ls_cuslay type /neptune/cuslay. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/CUSLAY'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_cuslay index 1. - if sy-subrc = 0 and ls_cuslay-updnam is not initial. - rv_user = ls_cuslay-updnam. - else. - rv_user = ls_cuslay-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/CUSLAY'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_cuslay index 1. + if sy-subrc = 0 and ls_cuslay-updnam is not initial. + rv_user = ls_cuslay-updnam. + else. + rv_user = ls_cuslay-crenam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn08.clas.abap b/src/zcl_abapgit_object_zn08.clas.abap index 9f7d629..c34413b 100644 --- a/src/zcl_abapgit_object_zn08.clas.abap +++ b/src/zcl_abapgit_object_zn08.clas.abap @@ -232,28 +232,58 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN08 IMPLEMENTATION. data ls_custil type /neptune/custil. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/CUSTIL'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_custil index 1. - if sy-subrc = 0 and ls_custil-updnam is not initial. - rv_user = ls_custil-updnam. - else. - rv_user = ls_custil-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/CUSTIL'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_custil index 1. + if sy-subrc = 0 and ls_custil-updnam is not initial. + rv_user = ls_custil-updnam. + else. + rv_user = ls_custil-crenam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn09.clas.abap b/src/zcl_abapgit_object_zn09.clas.abap index 7034e62..0122056 100644 --- a/src/zcl_abapgit_object_zn09.clas.abap +++ b/src/zcl_abapgit_object_zn09.clas.abap @@ -395,28 +395,58 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN09 IMPLEMENTATION. data ls_enhance type /neptune/enhance. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/ENHANCE'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_enhance index 1. - if sy-subrc = 0 and ls_enhance-updnam is not initial. - rv_user = ls_enhance-updnam. - else. - rv_user = ls_enhance-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/ENHANCE'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_enhance index 1. + if sy-subrc = 0 and ls_enhance-updnam is not initial. + rv_user = ls_enhance-updnam. + else. + rv_user = ls_enhance-crenam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn10.clas.abap b/src/zcl_abapgit_object_zn10.clas.abap index 73f4e80..a7506ff 100644 --- a/src/zcl_abapgit_object_zn10.clas.abap +++ b/src/zcl_abapgit_object_zn10.clas.abap @@ -223,28 +223,58 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN10 IMPLEMENTATION. data ls_enhlogi type /neptune/enhlogi. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/ENHLOGI'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_enhlogi index 1. - if sy-subrc = 0 and ls_enhlogi-updnam is not initial. - rv_user = ls_enhlogi-updnam. - else. - rv_user = ls_enhlogi-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/ENHLOGI'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_enhlogi index 1. + if sy-subrc = 0 and ls_enhlogi-updnam is not initial. + rv_user = ls_enhlogi-updnam. + else. + rv_user = ls_enhlogi-crenam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn11.clas.abap b/src/zcl_abapgit_object_zn11.clas.abap index 977028c..4e66ce4 100644 --- a/src/zcl_abapgit_object_zn11.clas.abap +++ b/src/zcl_abapgit_object_zn11.clas.abap @@ -246,28 +246,58 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN11 IMPLEMENTATION. data ls_cusbann type /neptune/cusbann. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/CUSBANN'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_cusbann index 1. - if sy-subrc = 0 and ls_cusbann-updnam is not initial. - rv_user = ls_cusbann-updnam. - else. - rv_user = ls_cusbann-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/CUSBANN'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_cusbann index 1. + if sy-subrc = 0 and ls_cusbann-updnam is not initial. + rv_user = ls_cusbann-updnam. + else. + rv_user = ls_cusbann-crenam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn12.clas.abap b/src/zcl_abapgit_object_zn12.clas.abap index 61e0d4a..219df03 100644 --- a/src/zcl_abapgit_object_zn12.clas.abap +++ b/src/zcl_abapgit_object_zn12.clas.abap @@ -225,28 +225,58 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN12 IMPLEMENTATION. data ls_splash type /neptune/splash. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/SPLASH'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_splash index 1. - if sy-subrc = 0 and ls_splash-updnam is not initial. - rv_user = ls_splash-updnam. - else. - rv_user = ls_splash-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/SPLASH'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_splash index 1. + if sy-subrc = 0 and ls_splash-updnam is not initial. + rv_user = ls_splash-updnam. + else. + rv_user = ls_splash-crenam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn13.clas.abap b/src/zcl_abapgit_object_zn13.clas.abap index fb1e082..4ebcf3e 100644 --- a/src/zcl_abapgit_object_zn13.clas.abap +++ b/src/zcl_abapgit_object_zn13.clas.abap @@ -239,6 +239,13 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN13 IMPLEMENTATION. data ls_cusclrs type /neptune/cusclrs. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). @@ -247,22 +254,45 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN13 IMPLEMENTATION. translate lv_key to lower case. replace mc_colorset_lower in lv_key with mc_colorset_cammel. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/CUSCLRS'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_cusclrs index 1. - if sy-subrc = 0 and ls_cusclrs-updnam is not initial. - rv_user = ls_cusclrs-updnam. - else. - rv_user = ls_cusclrs-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/CUSCLRS'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_cusclrs index 1. + if sy-subrc = 0 and ls_cusclrs-updnam is not initial. + rv_user = ls_cusclrs-updnam. + else. + rv_user = ls_cusclrs-crenam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn14.clas.abap b/src/zcl_abapgit_object_zn14.clas.abap index 5916b41..8e9ecec 100644 --- a/src/zcl_abapgit_object_zn14.clas.abap +++ b/src/zcl_abapgit_object_zn14.clas.abap @@ -233,28 +233,58 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN14 IMPLEMENTATION. data ls_rttempl type /neptune/rttempl. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/RTTEMPL'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_rttempl index 1. - if sy-subrc = 0 and ls_rttempl-updnam is not initial. - rv_user = ls_rttempl-updnam. - else. - rv_user = ls_rttempl-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/RTTEMPL'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_rttempl index 1. + if sy-subrc = 0 and ls_rttempl-updnam is not initial. + rv_user = ls_rttempl-updnam. + else. + rv_user = ls_rttempl-crenam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn15.clas.abap b/src/zcl_abapgit_object_zn15.clas.abap index 80d4424..dfcf9ae 100644 --- a/src/zcl_abapgit_object_zn15.clas.abap +++ b/src/zcl_abapgit_object_zn15.clas.abap @@ -424,6 +424,13 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN15 IMPLEMENTATION. data ls_jshlpsc type /neptune/jshlpsc. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). @@ -431,22 +438,45 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN15 IMPLEMENTATION. lv_key = ms_item-obj_name. translate lv_key to lower case. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/JSHLPSC'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_jshlpsc index 1. - if sy-subrc = 0 and ls_jshlpsc-updnam is not initial. - rv_user = ls_jshlpsc-updnam. - else. - rv_user = ls_jshlpsc-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/JSHLPSC'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_jshlpsc index 1. + if sy-subrc = 0 and ls_jshlpsc-updnam is not initial. + rv_user = ls_jshlpsc-updnam. + else. + rv_user = ls_jshlpsc-crenam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn16.clas.abap b/src/zcl_abapgit_object_zn16.clas.abap index 61cfa25..97db4bf 100644 --- a/src/zcl_abapgit_object_zn16.clas.abap +++ b/src/zcl_abapgit_object_zn16.clas.abap @@ -246,28 +246,58 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN16 IMPLEMENTATION. data ls_doc type /neptune/doc. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/DOC'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_doc index 1. - if sy-subrc = 0 and ls_doc-updnam is not initial. - rv_user = ls_doc-updnam. - else. - rv_user = ls_doc-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/DOC'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_doc index 1. + if sy-subrc = 0 and ls_doc-updnam is not initial. + rv_user = ls_doc-updnam. + else. + rv_user = ls_doc-crenam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn17.clas.abap b/src/zcl_abapgit_object_zn17.clas.abap index 8c5eec1..535a691 100644 --- a/src/zcl_abapgit_object_zn17.clas.abap +++ b/src/zcl_abapgit_object_zn17.clas.abap @@ -218,26 +218,56 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN17 IMPLEMENTATION. data ls_rfcmap type /neptune/rfcmap. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/RFCMAP'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_rfcmap index 1. - if sy-subrc = 0 and ls_rfcmap-updnam is not initial. - rv_user = ls_rfcmap-updnam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/RFCMAP'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_rfcmap index 1. + if sy-subrc = 0 and ls_rfcmap-updnam is not initial. + rv_user = ls_rfcmap-updnam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn19.clas.abap b/src/zcl_abapgit_object_zn19.clas.abap index 643346a..b4bcfde 100644 --- a/src/zcl_abapgit_object_zn19.clas.abap +++ b/src/zcl_abapgit_object_zn19.clas.abap @@ -419,28 +419,58 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN19 IMPLEMENTATION. data ls_medpack type /neptune/medpack. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = gc_medpack. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_medpack index 1. - if sy-subrc = 0 and ls_medpack-updnam is not initial. - rv_user = ls_medpack-updnam. - else. - rv_user = ls_medpack-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = gc_medpack. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_medpack index 1. + if sy-subrc = 0 and ls_medpack-updnam is not initial. + rv_user = ls_medpack-updnam. + else. + rv_user = ls_medpack-crenam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn20.clas.abap b/src/zcl_abapgit_object_zn20.clas.abap index fd6b06a..ec85219 100644 --- a/src/zcl_abapgit_object_zn20.clas.abap +++ b/src/zcl_abapgit_object_zn20.clas.abap @@ -231,26 +231,56 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN20 IMPLEMENTATION. data ls_urlmap type /neptune/urlmap. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/URLMAP'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_urlmap index 1. - if sy-subrc = 0 and ls_urlmap-updnam is not initial. - rv_user = ls_urlmap-updnam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/URLMAP'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_urlmap index 1. + if sy-subrc = 0 and ls_urlmap-updnam is not initial. + rv_user = ls_urlmap-updnam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn21.clas.abap b/src/zcl_abapgit_object_zn21.clas.abap index a1bf271..91e7454 100644 --- a/src/zcl_abapgit_object_zn21.clas.abap +++ b/src/zcl_abapgit_object_zn21.clas.abap @@ -231,26 +231,56 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN21 IMPLEMENTATION. data ls_urlmap type /neptune/urlmap. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/URLMAP'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_urlmap index 1. - if sy-subrc = 0 and ls_urlmap-updnam is not initial. - rv_user = ls_urlmap-updnam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/URLMAP'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_urlmap index 1. + if sy-subrc = 0 and ls_urlmap-updnam is not initial. + rv_user = ls_urlmap-updnam. + endif. + endif. + + endtry. endmethod. diff --git a/src/zcl_abapgit_object_zn22.clas.abap b/src/zcl_abapgit_object_zn22.clas.abap index a25abfa..911ae9c 100644 --- a/src/zcl_abapgit_object_zn22.clas.abap +++ b/src/zcl_abapgit_object_zn22.clas.abap @@ -848,28 +848,58 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN22 IMPLEMENTATION. data ls_appcach type /neptune/appcach. + data: lv_crenam type /neptune/create_user, + lv_credat type /neptune/create_date, + lv_cretim type /neptune/create_time, + lv_updnam type /neptune/update_user, + lv_upddat type /neptune/update_date, + lv_updtim type /neptune/update_time. + field-symbols type standard table. lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ). lv_key = ms_item-obj_name. - lo_artifact->get_table_content( - exporting iv_key1 = lv_key - iv_only_sys_independent = abap_true - importing et_table_content = lt_table_content ). + try. + call method lo_artifact->('GET_METADATA') + exporting + iv_key1 = lv_key + importing + ev_crenam = lv_crenam + ev_credat = lv_credat + ev_cretim = lv_cretim + ev_updnam = lv_updnam + ev_upddat = lv_upddat + ev_updtim = lv_updtim. + + if lv_upddat is not initial. + rv_user = lv_upddat. + else. + rv_user = lv_crenam. + endif. - read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/APPCACH'. - if sy-subrc = 0. - assign ls_table_content-table_content->* to . - check sy-subrc = 0. - read table into ls_appcach index 1. - if sy-subrc = 0 and ls_appcach-updnam is not initial. - rv_user = ls_appcach-updnam. - else. - rv_user = ls_appcach-crenam. - endif. - endif. + catch cx_sy_dyn_call_illegal_class + cx_sy_dyn_call_illegal_method. + + lo_artifact->get_table_content( + exporting iv_key1 = lv_key + iv_only_sys_independent = abap_true + importing et_table_content = lt_table_content ). + + read table lt_table_content into ls_table_content with table key tabname = '/NEPTUNE/APPCACH'. + if sy-subrc = 0. + assign ls_table_content-table_content->* to . + check sy-subrc = 0. + read table into ls_appcach index 1. + if sy-subrc = 0 and ls_appcach-updnam is not initial. + rv_user = ls_appcach-updnam. + else. + rv_user = ls_appcach-crenam. + endif. + endif. + + endtry. endmethod.