diff --git a/README.md b/README.md index ac9d7ce..52fad14 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,74 @@ -# dxp-sap-edition-abapgit-extension -Neptune DXP SAP Edition abapGit Extension Objects +# Neptune DXP SAP Edition abapGit Extension Objects. + +Leveraging the already well-known open-source software [abapGit](https://github.com/abapGit/abapGit), we now provide an interface to integrate all Neptune DXP artifacts with GitHub. + +This will allow you to have side-by-side your ABAP artifacts with your Neptune DXP artifacts, making it possible to store, version, and deploy full solutions across systems using GitHub. + + +## Documentation and Guides +Check out our full documentation about this extension [here.](https://docs.neptune-software.com/neptune-sap-edition/23/resources-help/abapGit-integration.html) + +## Post-installation activities +If this is the first time implementing abapGit user exits, you will need to create a class named ZCL_ABAPGIT_USER_EXIT with interface ZIF_ABAPGIT_EXIT, then it is necessary to implement the code showned below in the mentioned methods. The full user exit guide for abapGit can be found [here.](https://docs.abapgit.org/user-guide/reference/exits.html) + +If you already have the abapGit user exit class implemented, please add and adjust the code shown below to the mentioned methods. + +#### CHANGE_SUPPORTED_OBJECT_TYPES: + +```abap +// Change supported object types to recognize Neptune DXP Artifacts + method zif_abapgit_exit~change_supported_object_types. + + data: lt_neptune_types type /neptune/cl_abapgit_user_exit=>ty_object_types_tt, + ls_neptune_types like line of lt_neptune_types. + + data ls_types like line of ct_types. + + lt_neptune_types = /neptune/cl_abapgit_user_exit=>change_supported_object_types( ). + loop at lt_neptune_types into ls_neptune_types. + ls_types = ls_neptune_types. + append ls_types to ct_types. + endloop. + + endmethod. +``` + +#### CHANGE_TADIR: + +> [!NOTE] +> Parameter _iv_ignore_subpackages_ is available from Neptune SAP Edition DXP23.10.0003 and abapGit V1.127 + +```abap +// Include Neptune DXP Artifacts in the internal tadir table + method zif_abapgit_exit~change_tadir. + + data: lt_neptune_tadir type /neptune/cl_abapgit_user_exit=>ty_tadir_tt, + ls_neptune_tadir like line of lt_neptune_tadir. + + data ls_tadir like line of ct_tadir. + + lt_neptune_tadir = /neptune/cl_abapgit_user_exit=>change_tadir( + iv_package = iv_package + iv_ignore_subpackages = iv_ignore_subpackages ). + + loop at lt_neptune_tadir into ls_neptune_tadir. + move-corresponding ls_neptune_tadir to ls_tadir. + append ls_tadir to ct_tadir. + endloop. + + endmethod. +``` + +## Bug Reports + +A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful - thank you! + +Guidelines for bug reports: + +1. **Use the GitHub issue search** — check if the issue has already been reported. + +2. **Check if the issue has been fixed** — try to reproduce it using the latest version or development branch in the repository. + +3. **Demonstrate the problem** — provide clear steps that can be reproduced. + +A good bug report should not leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What would you expect to be the outcome? All these details will help to fix any potential bugs. diff --git a/src/zcl_abapgit_object_zn00.clas.abap b/src/zcl_abapgit_object_zn00.clas.abap index ce56e60..387ab1a 100644 --- a/src/zcl_abapgit_object_zn00.clas.abap +++ b/src/zcl_abapgit_object_zn00.clas.abap @@ -8,7 +8,7 @@ class zcl_abapgit_object_zn00 definition interfaces zif_abapgit_object . - constants mc_extension_version type string value '1.0.2'. "#EC NOTEXT + constants mc_extension_version type string value '1.0.3'. "#EC NOTEXT protected section. private section. diff --git a/src/zcl_abapgit_object_zn01.clas.abap b/src/zcl_abapgit_object_zn01.clas.abap index b553674..68afa84 100644 --- a/src/zcl_abapgit_object_zn01.clas.abap +++ b/src/zcl_abapgit_object_zn01.clas.abap @@ -8,181 +8,181 @@ class zcl_abapgit_object_zn01 definition interfaces zif_abapgit_object . protected section. - private section. +private section. - types: - begin of ty_lcl_evtscr, + types: + begin of ty_lcl_evtscr, applid type /neptune/applid, field_id type /neptune/field_id, event type /neptune/event_id, file_name type string, end of ty_lcl_evtscr . - types: - ty_tt_lcl_evtscr type standard table of ty_lcl_evtscr . - types: - begin of ty_lcl_css, + types: + ty_tt_lcl_evtscr type standard table of ty_lcl_evtscr . + types: + begin of ty_lcl_css, applid type /neptune/applid, file_name type string, end of ty_lcl_css . - types: - ty_tt_lcl_css type standard table of ty_lcl_css . - types: - begin of ty_code, + types: + ty_tt_lcl_css type standard table of ty_lcl_css . + types: + begin of ty_code, file_name type string, code type string, end of ty_code . - types: - ty_tt_code type standard table of ty_code with non-unique key file_name . - types: - begin of ty_lcl_script, + types: + ty_tt_code type standard table of ty_code with non-unique key file_name . + types: + begin of ty_lcl_script, applid type /neptune/applid, field_id type /neptune/field_id, file_name type string, end of ty_lcl_script . - types: - ty_tt_lcl_script type standard table of ty_lcl_script . - - data mv_artifact_type type /neptune/artifact_type . - - interface /neptune/if_artifact_type load . - methods serialize_html - importing - !it_obj type /neptune/_obj_tt - !is_table_content type /neptune/if_artifact_type=>ty_table_content - raising - zcx_abapgit_exception . - methods serialize_evtscr - importing - !it_obj type /neptune/_obj_tt - !is_table_content type /neptune/if_artifact_type=>ty_table_content - raising - zcx_abapgit_exception . - methods serialize_script - importing - !it_obj type /neptune/_obj_tt - !is_table_content type /neptune/if_artifact_type=>ty_table_content - raising - zcx_abapgit_exception . - methods serialize__script - importing - !it_obj type /neptune/_obj_tt - !is_table_content type /neptune/if_artifact_type=>ty_table_content - raising - zcx_abapgit_exception . - methods serialize__html - importing - !it_obj type /neptune/_obj_tt - !is_table_content type /neptune/if_artifact_type=>ty_table_content - raising - zcx_abapgit_exception . - methods serialize__evtscr - importing - !it_obj type /neptune/_obj_tt - !is_table_content type /neptune/if_artifact_type=>ty_table_content - raising - zcx_abapgit_exception . - methods serialize_table - importing - !iv_tabname type tabname - !it_table type any - raising - zcx_abapgit_exception . - methods serialize_css - importing - !is_table_content type /neptune/if_artifact_type=>ty_table_content - raising - zcx_abapgit_exception . - methods serialize__css - importing - !is_table_content type /neptune/if_artifact_type=>ty_table_content - raising - zcx_abapgit_exception . - interface zif_abapgit_git_definitions load . - methods deserialize_table - importing - !is_file type zif_abapgit_git_definitions=>ty_file - !ir_data type ref to data - !iv_tabname type tadir-obj_name - !iv_key type /neptune/artifact_key - !iv_devclass type devclass - raising - zcx_abapgit_exception . - methods get_values_from_filename - importing - !is_filename type string - exporting - !ev_tabname type tadir-obj_name . - methods deserialize_script - importing - !is_file type zif_abapgit_git_definitions=>ty_file - !it_files type zif_abapgit_git_definitions=>ty_files_tt - !ir_data type ref to data - !iv_key type /neptune/artifact_key - raising - zcx_abapgit_exception . - methods deserialize_html - importing - !is_file type zif_abapgit_git_definitions=>ty_file - !it_files type zif_abapgit_git_definitions=>ty_files_tt - !ir_data type ref to data - !iv_key type /neptune/artifact_key - raising - zcx_abapgit_exception . - methods deserialize_evtscr - importing - !is_file type zif_abapgit_git_definitions=>ty_file - !it_files type zif_abapgit_git_definitions=>ty_files_tt - !ir_data type ref to data - !iv_key type /neptune/artifact_key - raising - zcx_abapgit_exception . - methods deserialize__script - importing - !is_file type zif_abapgit_git_definitions=>ty_file - !it_files type zif_abapgit_git_definitions=>ty_files_tt - !ir_data type ref to data - !iv_key type /neptune/artifact_key - raising - zcx_abapgit_exception . - methods deserialize__html - importing - !is_file type zif_abapgit_git_definitions=>ty_file - !it_files type zif_abapgit_git_definitions=>ty_files_tt - !ir_data type ref to data - !iv_key type /neptune/artifact_key - raising - zcx_abapgit_exception . - methods deserialize__evtscr - importing - !is_file type zif_abapgit_git_definitions=>ty_file - !it_files type zif_abapgit_git_definitions=>ty_files_tt - !ir_data type ref to data - !iv_key type /neptune/artifact_key - raising - zcx_abapgit_exception . - methods deserialize_css - importing - !is_file type zif_abapgit_git_definitions=>ty_file - !it_files type zif_abapgit_git_definitions=>ty_files_tt - !ir_data type ref to data - !iv_key type /neptune/artifact_key - raising - zcx_abapgit_exception . - methods deserialize__css - importing - !is_file type zif_abapgit_git_definitions=>ty_file - !it_files type zif_abapgit_git_definitions=>ty_files_tt - !ir_data type ref to data - !iv_key type /neptune/artifact_key - raising - zcx_abapgit_exception . - methods insert_to_transport - importing - !io_artifact type ref to /neptune/if_artifact_type - !iv_transport type trkorr - !iv_package type devclass - !iv_key1 type any - !iv_artifact_type type /neptune/aty-artifact_type . + types: + ty_tt_lcl_script type standard table of ty_lcl_script . + + data MV_ARTIFACT_TYPE type /NEPTUNE/ARTIFACT_TYPE . + + interface /NEPTUNE/IF_ARTIFACT_TYPE load . + methods SERIALIZE_HTML + importing + !IT_OBJ type /NEPTUNE/_OBJ_TT + !IS_TABLE_CONTENT type /NEPTUNE/IF_ARTIFACT_TYPE=>TY_TABLE_CONTENT + raising + ZCX_ABAPGIT_EXCEPTION . + methods SERIALIZE_EVTSCR + importing + !IT_OBJ type /NEPTUNE/_OBJ_TT + !IS_TABLE_CONTENT type /NEPTUNE/IF_ARTIFACT_TYPE=>TY_TABLE_CONTENT + raising + ZCX_ABAPGIT_EXCEPTION . + methods SERIALIZE_SCRIPT + importing + !IT_OBJ type /NEPTUNE/_OBJ_TT + !IS_TABLE_CONTENT type /NEPTUNE/IF_ARTIFACT_TYPE=>TY_TABLE_CONTENT + raising + ZCX_ABAPGIT_EXCEPTION . + methods SERIALIZE__SCRIPT + importing + !IT_OBJ type /NEPTUNE/_OBJ_TT + !IS_TABLE_CONTENT type /NEPTUNE/IF_ARTIFACT_TYPE=>TY_TABLE_CONTENT + raising + ZCX_ABAPGIT_EXCEPTION . + methods SERIALIZE__HTML + importing + !IT_OBJ type /NEPTUNE/_OBJ_TT + !IS_TABLE_CONTENT type /NEPTUNE/IF_ARTIFACT_TYPE=>TY_TABLE_CONTENT + raising + ZCX_ABAPGIT_EXCEPTION . + methods SERIALIZE__EVTSCR + importing + !IT_OBJ type /NEPTUNE/_OBJ_TT + !IS_TABLE_CONTENT type /NEPTUNE/IF_ARTIFACT_TYPE=>TY_TABLE_CONTENT + raising + ZCX_ABAPGIT_EXCEPTION . + methods SERIALIZE_TABLE + importing + !IV_TABNAME type TABNAME + !IT_TABLE type ANY + raising + ZCX_ABAPGIT_EXCEPTION . + methods SERIALIZE_CSS + importing + !IS_TABLE_CONTENT type /NEPTUNE/IF_ARTIFACT_TYPE=>TY_TABLE_CONTENT + raising + ZCX_ABAPGIT_EXCEPTION . + methods SERIALIZE__CSS + importing + !IS_TABLE_CONTENT type /NEPTUNE/IF_ARTIFACT_TYPE=>TY_TABLE_CONTENT + raising + ZCX_ABAPGIT_EXCEPTION . + interface ZIF_ABAPGIT_GIT_DEFINITIONS load . + methods DESERIALIZE_TABLE + importing + !IS_FILE type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE + !IR_DATA type ref to DATA + !IV_TABNAME type TADIR-OBJ_NAME + !IV_KEY type /NEPTUNE/ARTIFACT_KEY + !IV_DEVCLASS type DEVCLASS + raising + ZCX_ABAPGIT_EXCEPTION . + methods GET_VALUES_FROM_FILENAME + importing + !IS_FILENAME type STRING + exporting + !EV_TABNAME type TADIR-OBJ_NAME . + methods DESERIALIZE_SCRIPT + importing + !IS_FILE type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE + !IT_FILES type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILES_TT + !IR_DATA type ref to DATA + !IV_KEY type /NEPTUNE/ARTIFACT_KEY + raising + ZCX_ABAPGIT_EXCEPTION . + methods DESERIALIZE_HTML + importing + !IS_FILE type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE + !IT_FILES type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILES_TT + !IR_DATA type ref to DATA + !IV_KEY type /NEPTUNE/ARTIFACT_KEY + raising + ZCX_ABAPGIT_EXCEPTION . + methods DESERIALIZE_EVTSCR + importing + !IS_FILE type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE + !IT_FILES type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILES_TT + !IR_DATA type ref to DATA + !IV_KEY type /NEPTUNE/ARTIFACT_KEY + raising + ZCX_ABAPGIT_EXCEPTION . + methods DESERIALIZE__SCRIPT + importing + !IS_FILE type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE + !IT_FILES type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILES_TT + !IR_DATA type ref to DATA + !IV_KEY type /NEPTUNE/ARTIFACT_KEY + raising + ZCX_ABAPGIT_EXCEPTION . + methods DESERIALIZE__HTML + importing + !IS_FILE type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE + !IT_FILES type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILES_TT + !IR_DATA type ref to DATA + !IV_KEY type /NEPTUNE/ARTIFACT_KEY + raising + ZCX_ABAPGIT_EXCEPTION . + methods DESERIALIZE__EVTSCR + importing + !IS_FILE type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE + !IT_FILES type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILES_TT + !IR_DATA type ref to DATA + !IV_KEY type /NEPTUNE/ARTIFACT_KEY + raising + ZCX_ABAPGIT_EXCEPTION . + methods DESERIALIZE_CSS + importing + !IS_FILE type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE + !IT_FILES type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILES_TT + !IR_DATA type ref to DATA + !IV_KEY type /NEPTUNE/ARTIFACT_KEY + raising + ZCX_ABAPGIT_EXCEPTION . + methods DESERIALIZE__CSS + importing + !IS_FILE type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE + !IT_FILES type ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILES_TT + !IR_DATA type ref to DATA + !IV_KEY type /NEPTUNE/ARTIFACT_KEY + raising + ZCX_ABAPGIT_EXCEPTION . + methods INSERT_TO_TRANSPORT + importing + !IO_ARTIFACT type ref to /NEPTUNE/IF_ARTIFACT_TYPE + !IV_TRANSPORT type TRKORR + !IV_PACKAGE type DEVCLASS + !IV_KEY1 type ANY + !IV_ARTIFACT_TYPE type /NEPTUNE/ATY-ARTIFACT_TYPE . ENDCLASS. @@ -875,6 +875,7 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN01 IMPLEMENTATION. concatenate ls_lcl_evtscr-file_name ls_obj-field_name + ls_obj-field_id ls_lcl_evtscr-event 'js' into ls_lcl_evtscr-file_name separated by '.'. @@ -1106,6 +1107,7 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN01 IMPLEMENTATION. concatenate ls_lcl_script-file_name ls_obj-field_name + ls_obj-field_id lv_ext into ls_lcl_script-file_name separated by '.'. append ls_lcl_script to lt_lcl_script. @@ -1382,6 +1384,7 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN01 IMPLEMENTATION. concatenate ls_lcl_evtscr-file_name ls_obj-field_name + ls_obj-field_id ls_lcl_evtscr-event lv_ext into ls_lcl_evtscr-file_name separated by '.'. @@ -1623,6 +1626,7 @@ CLASS ZCL_ABAPGIT_OBJECT_ZN01 IMPLEMENTATION. concatenate ls_lcl_script-file_name ls_obj-field_name + ls_obj-field_id lv_ext into ls_lcl_script-file_name separated by '.'. append ls_lcl_script to lt_lcl_script. diff --git a/src/zcl_neptune_abapgit_utilities.clas.abap b/src/zcl_neptune_abapgit_utilities.clas.abap index 415827b..ae72f2c 100644 --- a/src/zcl_neptune_abapgit_utilities.clas.abap +++ b/src/zcl_neptune_abapgit_utilities.clas.abap @@ -26,10 +26,10 @@ public section. value(RT_CODE_LINES) type STRING_TABLE . class-methods FIX_STRING_SERIALIZE changing - !CV_STRING type STRING ##NEEDED. + !CV_STRING type STRING ##NEEDED. class-methods FIX_STRING_DESERIALIZE changing - !CV_STRING type STRING ##NEEDED. + !CV_STRING type STRING ##NEEDED. class-methods GET_SKIP_FIELDS_FOR_ARTIFACT importing !IV_ARTIFACT_TYPE type /NEPTUNE/ARTIFACT_TYPE