Skip to content

Commit

Permalink
Fix #37
Browse files Browse the repository at this point in the history
  • Loading branch information
andrecarrilho committed Jan 24, 2024
1 parent afdd519 commit 27237fa
Show file tree
Hide file tree
Showing 20 changed files with 893 additions and 294 deletions.
59 changes: 44 additions & 15 deletions src/zcl_abapgit_object_zn02.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -244,30 +244,59 @@ 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 <lt_standard_table> type standard table.

lo_artifact = /neptune/cl_artifact_type=>get_instance( iv_object_type = ms_item-obj_type ).

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 <lt_standard_table>.
check sy-subrc = 0.
read table <lt_standard_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 <lt_standard_table>.
check sy-subrc = 0.
read table <lt_standard_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.


Expand Down
60 changes: 45 additions & 15 deletions src/zcl_abapgit_object_zn03.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -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 <lt_standard_table> 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 <lt_standard_table>.
check sy-subrc = 0.
read table <lt_standard_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 <lt_standard_table>.
check sy-subrc = 0.
read table <lt_standard_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.

Expand Down
56 changes: 43 additions & 13 deletions src/zcl_abapgit_object_zn04.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -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 <lt_standard_table> 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 <lt_standard_table>.
check sy-subrc = 0.
read table <lt_standard_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 <lt_standard_table>.
check sy-subrc = 0.
read table <lt_standard_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.

Expand Down
64 changes: 47 additions & 17 deletions src/zcl_abapgit_object_zn05.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -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 <lt_standard_table> 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 <lt_standard_table>.
check sy-subrc = 0.
read table <lt_standard_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 <lt_standard_table>.
check sy-subrc = 0.
read table <lt_standard_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.

Expand Down
60 changes: 45 additions & 15 deletions src/zcl_abapgit_object_zn06.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -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 <lt_standard_table> 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 <lt_standard_table>.
check sy-subrc = 0.
read table <lt_standard_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 <lt_standard_table>.
check sy-subrc = 0.
read table <lt_standard_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.

Expand Down
Loading

0 comments on commit 27237fa

Please sign in to comment.