mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 20:03:20 +08:00
Consolidate READ/INSERT/DELETE REPORT statements (#6299)
Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
parent
33e0ae2437
commit
c8a4a54a3e
|
@ -188,7 +188,6 @@
|
||||||
"^sychar70$",
|
"^sychar70$",
|
||||||
"^sydatum$",
|
"^sydatum$",
|
||||||
"^sylangu$",
|
"^sylangu$",
|
||||||
"^syrepid$",
|
|
||||||
"^syst_title$",
|
"^syst_title$",
|
||||||
"^syuzeit$",
|
"^syuzeit$",
|
||||||
"^xubname$"
|
"^xubname$"
|
||||||
|
|
|
@ -591,7 +591,7 @@ CLASS zcl_abapgit_objects_activation IMPLEMENTATION.
|
||||||
ls_item TYPE zif_abapgit_definitions=>ty_item,
|
ls_item TYPE zif_abapgit_definitions=>ty_item,
|
||||||
lv_msg TYPE string,
|
lv_msg TYPE string,
|
||||||
lv_error TYPE c LENGTH 1,
|
lv_error TYPE c LENGTH 1,
|
||||||
lv_include TYPE programm.
|
lv_include TYPE syrepid.
|
||||||
|
|
||||||
LOOP AT gt_classes INTO ls_class.
|
LOOP AT gt_classes INTO ls_class.
|
||||||
CASE ls_class-object.
|
CASE ls_class-object.
|
||||||
|
|
|
@ -93,7 +93,7 @@ CLASS zcl_abapgit_object_enho_class IMPLEMENTATION.
|
||||||
|
|
||||||
DATA: lt_includes TYPE enhnewmeth_tabincl_plus_enha,
|
DATA: lt_includes TYPE enhnewmeth_tabincl_plus_enha,
|
||||||
lt_source TYPE TABLE OF abaptxt255,
|
lt_source TYPE TABLE OF abaptxt255,
|
||||||
lv_include TYPE programm.
|
lv_include TYPE syrepid.
|
||||||
|
|
||||||
FIELD-SYMBOLS: <ls_include> LIKE LINE OF lt_includes.
|
FIELD-SYMBOLS: <ls_include> LIKE LINE OF lt_includes.
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,9 @@ CLASS zcl_abapgit_oo_class DEFINITION
|
||||||
!io_scanner TYPE REF TO cl_oo_source_scanner_class .
|
!io_scanner TYPE REF TO cl_oo_source_scanner_class .
|
||||||
CLASS-METHODS update_report
|
CLASS-METHODS update_report
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_program TYPE programm
|
!iv_program TYPE syrepid
|
||||||
!it_source TYPE string_table
|
!it_source TYPE string_table
|
||||||
|
!iv_package TYPE devclass
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rv_updated) TYPE abap_bool
|
VALUE(rv_updated) TYPE abap_bool
|
||||||
RAISING
|
RAISING
|
||||||
|
@ -64,7 +65,7 @@ CLASS zcl_abapgit_oo_class DEFINITION
|
||||||
!iv_name TYPE seoclsname
|
!iv_name TYPE seoclsname
|
||||||
!iv_method TYPE seocpdname
|
!iv_method TYPE seocpdname
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rv_program) TYPE programm
|
VALUE(rv_program) TYPE syrepid
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
CLASS-METHODS init_scanner
|
CLASS-METHODS init_scanner
|
||||||
|
@ -79,21 +80,29 @@ CLASS zcl_abapgit_oo_class DEFINITION
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_classname TYPE seoclsname
|
!iv_classname TYPE seoclsname
|
||||||
!it_source TYPE string_table
|
!it_source TYPE string_table
|
||||||
!it_methods TYPE cl_oo_source_scanner_class=>type_method_implementations .
|
!it_methods TYPE cl_oo_source_scanner_class=>type_method_implementations
|
||||||
|
!iv_package TYPE devclass
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception.
|
||||||
CLASS-METHODS create_report
|
CLASS-METHODS create_report
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_program TYPE programm
|
!iv_program TYPE syrepid
|
||||||
!it_source TYPE string_table
|
!it_source TYPE string_table
|
||||||
!iv_extension TYPE ty_char2
|
!iv_extension TYPE ty_char2
|
||||||
!iv_program_type TYPE ty_char1
|
!iv_program_type TYPE ty_char1
|
||||||
!iv_version TYPE r3state .
|
!iv_version TYPE r3state
|
||||||
|
!iv_package TYPE devclass
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception.
|
||||||
CLASS-METHODS update_cs_number_of_methods
|
CLASS-METHODS update_cs_number_of_methods
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_classname TYPE seoclsname
|
!iv_classname TYPE seoclsname
|
||||||
!iv_number_of_impl_methods TYPE i .
|
!iv_number_of_impl_methods TYPE i .
|
||||||
CLASS-METHODS delete_report
|
CLASS-METHODS delete_report
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_program TYPE programm .
|
!iv_program TYPE syrepid
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception.
|
||||||
CLASS-METHODS get_method_includes
|
CLASS-METHODS get_method_includes
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_classname TYPE seoclsname
|
!iv_classname TYPE seoclsname
|
||||||
|
@ -117,13 +126,18 @@ CLASS zcl_abapgit_oo_class IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD create_report.
|
METHOD create_report.
|
||||||
INSERT REPORT iv_program FROM it_source EXTENSION TYPE iv_extension STATE iv_version PROGRAM TYPE iv_program_type.
|
zcl_abapgit_factory=>get_sap_report( )->insert_report(
|
||||||
ASSERT sy-subrc = 0.
|
iv_name = iv_program
|
||||||
|
iv_package = iv_package
|
||||||
|
it_source = it_source
|
||||||
|
iv_state = iv_version
|
||||||
|
iv_program_type = iv_program_type
|
||||||
|
iv_extension_type = iv_extension ).
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD delete_report.
|
METHOD delete_report.
|
||||||
DELETE REPORT iv_program ##SUBRC_OK.
|
zcl_abapgit_factory=>get_sap_report( )->delete_report( iv_program ).
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
@ -402,6 +416,7 @@ CLASS zcl_abapgit_oo_class IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
create_report( iv_program = cl_oo_classname_service=>get_cs_name( iv_classname )
|
create_report( iv_program = cl_oo_classname_service=>get_cs_name( iv_classname )
|
||||||
|
iv_package = iv_package
|
||||||
it_source = it_source
|
it_source = it_source
|
||||||
iv_extension = lc_class_source_extension
|
iv_extension = lc_class_source_extension
|
||||||
iv_program_type = lc_include_program_type
|
iv_program_type = lc_include_program_type
|
||||||
|
@ -490,22 +505,10 @@ CLASS zcl_abapgit_oo_class IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD update_report.
|
METHOD update_report.
|
||||||
|
rv_updated = zcl_abapgit_factory=>get_sap_report( )->update_report(
|
||||||
DATA: lt_old TYPE string_table.
|
iv_name = iv_program
|
||||||
|
iv_package = iv_package
|
||||||
READ REPORT iv_program INTO lt_old.
|
it_source = it_source ).
|
||||||
IF sy-subrc <> 0.
|
|
||||||
zcx_abapgit_exception=>raise( |Fatal error. Include { iv_program } should have been created previously!| ).
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
IF lt_old <> it_source.
|
|
||||||
INSERT REPORT iv_program FROM it_source.
|
|
||||||
ASSERT sy-subrc = 0.
|
|
||||||
rv_updated = abap_true.
|
|
||||||
ELSE.
|
|
||||||
rv_updated = abap_false.
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
@ -688,6 +691,7 @@ CLASS zcl_abapgit_oo_class IMPLEMENTATION.
|
||||||
IF lt_public IS NOT INITIAL.
|
IF lt_public IS NOT INITIAL.
|
||||||
lv_program = cl_oo_classname_service=>get_pubsec_name( is_key-clsname ).
|
lv_program = cl_oo_classname_service=>get_pubsec_name( is_key-clsname ).
|
||||||
lv_updated = update_report( iv_program = lv_program
|
lv_updated = update_report( iv_program = lv_program
|
||||||
|
iv_package = iv_package
|
||||||
it_source = lt_public ).
|
it_source = lt_public ).
|
||||||
IF lv_updated = abap_true.
|
IF lv_updated = abap_true.
|
||||||
update_meta( iv_name = is_key-clsname
|
update_meta( iv_name = is_key-clsname
|
||||||
|
@ -701,6 +705,7 @@ CLASS zcl_abapgit_oo_class IMPLEMENTATION.
|
||||||
IF lt_source IS NOT INITIAL.
|
IF lt_source IS NOT INITIAL.
|
||||||
lv_program = cl_oo_classname_service=>get_prosec_name( is_key-clsname ).
|
lv_program = cl_oo_classname_service=>get_prosec_name( is_key-clsname ).
|
||||||
lv_updated = update_report( iv_program = lv_program
|
lv_updated = update_report( iv_program = lv_program
|
||||||
|
iv_package = iv_package
|
||||||
it_source = lt_source ).
|
it_source = lt_source ).
|
||||||
IF lv_updated = abap_true.
|
IF lv_updated = abap_true.
|
||||||
update_meta( iv_name = is_key-clsname
|
update_meta( iv_name = is_key-clsname
|
||||||
|
@ -714,6 +719,7 @@ CLASS zcl_abapgit_oo_class IMPLEMENTATION.
|
||||||
IF lt_source IS NOT INITIAL.
|
IF lt_source IS NOT INITIAL.
|
||||||
lv_program = cl_oo_classname_service=>get_prisec_name( is_key-clsname ).
|
lv_program = cl_oo_classname_service=>get_prisec_name( is_key-clsname ).
|
||||||
lv_updated = update_report( iv_program = lv_program
|
lv_updated = update_report( iv_program = lv_program
|
||||||
|
iv_package = iv_package
|
||||||
it_source = lt_source ).
|
it_source = lt_source ).
|
||||||
IF lv_updated = abap_true.
|
IF lv_updated = abap_true.
|
||||||
update_meta( iv_name = is_key-clsname
|
update_meta( iv_name = is_key-clsname
|
||||||
|
@ -739,6 +745,7 @@ CLASS zcl_abapgit_oo_class IMPLEMENTATION.
|
||||||
|
|
||||||
update_report(
|
update_report(
|
||||||
iv_program = lv_program
|
iv_program = lv_program
|
||||||
|
iv_package = iv_package
|
||||||
it_source = lt_source ).
|
it_source = lt_source ).
|
||||||
|
|
||||||
" If method was implemented before, remove from list
|
" If method was implemented before, remove from list
|
||||||
|
@ -747,6 +754,7 @@ CLASS zcl_abapgit_oo_class IMPLEMENTATION.
|
||||||
|
|
||||||
* full class include
|
* full class include
|
||||||
update_full_class_include( iv_classname = is_key-clsname
|
update_full_class_include( iv_classname = is_key-clsname
|
||||||
|
iv_package = iv_package
|
||||||
it_source = it_source
|
it_source = it_source
|
||||||
it_methods = lt_methods ).
|
it_methods = lt_methods ).
|
||||||
|
|
||||||
|
@ -781,29 +789,33 @@ CLASS zcl_abapgit_oo_class IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD zif_abapgit_oo_object_fnc~generate_locals.
|
METHOD zif_abapgit_oo_object_fnc~generate_locals.
|
||||||
|
|
||||||
DATA: lv_program TYPE programm.
|
DATA: lv_program TYPE syrepid.
|
||||||
|
|
||||||
IF lines( it_local_definitions ) > 0.
|
IF lines( it_local_definitions ) > 0.
|
||||||
lv_program = cl_oo_classname_service=>get_ccdef_name( is_key-clsname ).
|
lv_program = cl_oo_classname_service=>get_ccdef_name( is_key-clsname ).
|
||||||
update_report( iv_program = lv_program
|
update_report( iv_program = lv_program
|
||||||
|
iv_package = iv_package
|
||||||
it_source = it_local_definitions ).
|
it_source = it_local_definitions ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
IF lines( it_local_implementations ) > 0.
|
IF lines( it_local_implementations ) > 0.
|
||||||
lv_program = cl_oo_classname_service=>get_ccimp_name( is_key-clsname ).
|
lv_program = cl_oo_classname_service=>get_ccimp_name( is_key-clsname ).
|
||||||
update_report( iv_program = lv_program
|
update_report( iv_program = lv_program
|
||||||
|
iv_package = iv_package
|
||||||
it_source = it_local_implementations ).
|
it_source = it_local_implementations ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
IF lines( it_local_macros ) > 0.
|
IF lines( it_local_macros ) > 0.
|
||||||
lv_program = cl_oo_classname_service=>get_ccmac_name( is_key-clsname ).
|
lv_program = cl_oo_classname_service=>get_ccmac_name( is_key-clsname ).
|
||||||
update_report( iv_program = lv_program
|
update_report( iv_program = lv_program
|
||||||
|
iv_package = iv_package
|
||||||
it_source = it_local_macros ).
|
it_source = it_local_macros ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
lv_program = cl_oo_classname_service=>get_ccau_name( is_key-clsname ).
|
lv_program = cl_oo_classname_service=>get_ccau_name( is_key-clsname ).
|
||||||
IF lines( it_local_test_classes ) > 0.
|
IF lines( it_local_test_classes ) > 0.
|
||||||
update_report( iv_program = lv_program
|
update_report( iv_program = lv_program
|
||||||
|
iv_package = iv_package
|
||||||
it_source = it_local_test_classes ).
|
it_source = it_local_test_classes ).
|
||||||
ELSE.
|
ELSE.
|
||||||
" Drop the include to remove left-over test classes
|
" Drop the include to remove left-over test classes
|
||||||
|
|
|
@ -22,8 +22,9 @@ CLASS zcl_abapgit_oo_interface DEFINITION
|
||||||
|
|
||||||
CLASS-METHODS update_report
|
CLASS-METHODS update_report
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_program TYPE programm
|
!iv_program TYPE syrepid
|
||||||
!it_source TYPE string_table
|
!it_source TYPE string_table
|
||||||
|
!iv_package TYPE devclass
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rv_updated) TYPE abap_bool
|
VALUE(rv_updated) TYPE abap_bool
|
||||||
RAISING
|
RAISING
|
||||||
|
@ -142,22 +143,10 @@ CLASS zcl_abapgit_oo_interface IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD update_report.
|
METHOD update_report.
|
||||||
|
rv_updated = zcl_abapgit_factory=>get_sap_report( )->update_report(
|
||||||
DATA: lt_old TYPE string_table.
|
iv_name = iv_program
|
||||||
|
iv_package = iv_package
|
||||||
READ REPORT iv_program INTO lt_old.
|
it_source = it_source ).
|
||||||
IF sy-subrc <> 0.
|
|
||||||
zcx_abapgit_exception=>raise( |Fatal error. Include { iv_program } should have been created previously!| ).
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
IF lt_old <> it_source.
|
|
||||||
INSERT REPORT iv_program FROM it_source.
|
|
||||||
ASSERT sy-subrc = 0.
|
|
||||||
rv_updated = abap_true.
|
|
||||||
ELSE.
|
|
||||||
rv_updated = abap_false.
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
@ -275,6 +264,7 @@ CLASS zcl_abapgit_oo_interface IMPLEMENTATION.
|
||||||
IF lt_public IS NOT INITIAL.
|
IF lt_public IS NOT INITIAL.
|
||||||
lv_program = cl_oo_classname_service=>get_intfsec_name( is_key-clsname ).
|
lv_program = cl_oo_classname_service=>get_intfsec_name( is_key-clsname ).
|
||||||
lv_updated = update_report( iv_program = lv_program
|
lv_updated = update_report( iv_program = lv_program
|
||||||
|
iv_package = iv_package
|
||||||
it_source = lt_public ).
|
it_source = lt_public ).
|
||||||
IF lv_updated = abap_true.
|
IF lv_updated = abap_true.
|
||||||
update_meta( iv_name = is_key-clsname
|
update_meta( iv_name = is_key-clsname
|
||||||
|
|
|
@ -76,7 +76,9 @@ CLASS zcl_abapgit_oo_serializer DEFINITION
|
||||||
!is_clskey TYPE seoclskey
|
!is_clskey TYPE seoclskey
|
||||||
!iv_type TYPE seop_include_ext_app
|
!iv_type TYPE seop_include_ext_app
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rt_source) TYPE seop_source_string .
|
VALUE(rt_source) TYPE seop_source_string
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception.
|
||||||
METHODS reduce
|
METHODS reduce
|
||||||
CHANGING
|
CHANGING
|
||||||
!ct_source TYPE zif_abapgit_definitions=>ty_string_tt .
|
!ct_source TYPE zif_abapgit_definitions=>ty_string_tt .
|
||||||
|
@ -130,7 +132,8 @@ CLASS zcl_abapgit_oo_serializer IMPLEMENTATION.
|
||||||
METHOD read_include.
|
METHOD read_include.
|
||||||
|
|
||||||
DATA: ls_include TYPE progstruc.
|
DATA: ls_include TYPE progstruc.
|
||||||
|
DATA lv_program TYPE syrepid.
|
||||||
|
DATA lt_source TYPE abaptxt255_tab.
|
||||||
|
|
||||||
ASSERT iv_type = seop_ext_class_locals_def
|
ASSERT iv_type = seop_ext_class_locals_def
|
||||||
OR iv_type = seop_ext_class_locals_imp
|
OR iv_type = seop_ext_class_locals_imp
|
||||||
|
@ -145,7 +148,9 @@ CLASS zcl_abapgit_oo_serializer IMPLEMENTATION.
|
||||||
* it looks like there is an issue in function module SEO_CLASS_GET_INCLUDE_SOURCE
|
* it looks like there is an issue in function module SEO_CLASS_GET_INCLUDE_SOURCE
|
||||||
* on 750 kernels, where the READ REPORT without STATE addition does not
|
* on 750 kernels, where the READ REPORT without STATE addition does not
|
||||||
* return the active version, this method is a workaround for this issue
|
* return the active version, this method is a workaround for this issue
|
||||||
READ REPORT ls_include INTO rt_source STATE 'A'.
|
lv_program = ls_include.
|
||||||
|
lt_source = zcl_abapgit_factory=>get_sap_report( )->read_report( lv_program ).
|
||||||
|
rt_source = lt_source.
|
||||||
|
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ INTERFACE zif_abapgit_oo_object_fnc PUBLIC.
|
||||||
END OF c_parts.
|
END OF c_parts.
|
||||||
|
|
||||||
TYPES: BEGIN OF ty_includes,
|
TYPES: BEGIN OF ty_includes,
|
||||||
programm TYPE programm,
|
programm TYPE syrepid,
|
||||||
END OF ty_includes,
|
END OF ty_includes,
|
||||||
ty_includes_tt TYPE STANDARD TABLE OF ty_includes WITH DEFAULT KEY.
|
ty_includes_tt TYPE STANDARD TABLE OF ty_includes WITH DEFAULT KEY.
|
||||||
|
|
||||||
|
@ -35,12 +35,14 @@ INTERFACE zif_abapgit_oo_object_fnc PUBLIC.
|
||||||
it_local_implementations TYPE seop_source_string OPTIONAL
|
it_local_implementations TYPE seop_source_string OPTIONAL
|
||||||
it_local_macros TYPE seop_source_string OPTIONAL
|
it_local_macros TYPE seop_source_string OPTIONAL
|
||||||
it_local_test_classes TYPE seop_source_string OPTIONAL
|
it_local_test_classes TYPE seop_source_string OPTIONAL
|
||||||
|
iv_package TYPE devclass
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception,
|
zcx_abapgit_exception,
|
||||||
deserialize_source
|
deserialize_source
|
||||||
IMPORTING
|
IMPORTING
|
||||||
is_key TYPE seoclskey
|
is_key TYPE seoclskey
|
||||||
it_source TYPE zif_abapgit_definitions=>ty_string_tt
|
it_source TYPE zif_abapgit_definitions=>ty_string_tt
|
||||||
|
iv_package TYPE devclass
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception
|
zcx_abapgit_exception
|
||||||
cx_sy_dyn_call_error,
|
cx_sy_dyn_call_error,
|
||||||
|
|
188
src/objects/sap/zcl_abapgit_sap_report.clas.abap
Normal file
188
src/objects/sap/zcl_abapgit_sap_report.clas.abap
Normal file
|
@ -0,0 +1,188 @@
|
||||||
|
CLASS zcl_abapgit_sap_report DEFINITION
|
||||||
|
PUBLIC
|
||||||
|
FINAL
|
||||||
|
CREATE PUBLIC.
|
||||||
|
|
||||||
|
PUBLIC SECTION.
|
||||||
|
|
||||||
|
INTERFACES zif_abapgit_sap_report.
|
||||||
|
|
||||||
|
PROTECTED SECTION.
|
||||||
|
PRIVATE SECTION.
|
||||||
|
|
||||||
|
METHODS get_language_version
|
||||||
|
IMPORTING
|
||||||
|
iv_package TYPE devclass
|
||||||
|
iv_version TYPE zif_abapgit_sap_report=>ty_abap_language_version
|
||||||
|
RETURNING
|
||||||
|
VALUE(rv_version) TYPE zif_abapgit_sap_report=>ty_abap_language_version.
|
||||||
|
|
||||||
|
METHODS authorization_check
|
||||||
|
IMPORTING
|
||||||
|
iv_mode TYPE csequence
|
||||||
|
is_item TYPE zif_abapgit_definitions=>ty_item
|
||||||
|
iv_version TYPE zif_abapgit_sap_report=>ty_abap_language_version OPTIONAL
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception.
|
||||||
|
|
||||||
|
ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CLASS zcl_abapgit_sap_report IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD authorization_check.
|
||||||
|
|
||||||
|
IF is_item IS NOT INITIAL.
|
||||||
|
" TODO: Check for ABAP Language Version (ABAP_LANGU_VERSION_UPON_INSERT = iv_version)
|
||||||
|
CALL FUNCTION 'RS_ACCESS_PERMISSION'
|
||||||
|
EXPORTING
|
||||||
|
mode = iv_mode
|
||||||
|
object = is_item-obj_name
|
||||||
|
object_class = is_item-obj_type
|
||||||
|
suppress_corr_check = abap_true
|
||||||
|
suppress_language_check = abap_true
|
||||||
|
suppress_extend_dialog = abap_true
|
||||||
|
EXCEPTIONS
|
||||||
|
canceled_in_corr = 1
|
||||||
|
enqueued_by_user = 2
|
||||||
|
enqueue_system_failure = 3
|
||||||
|
illegal_parameter_values = 4
|
||||||
|
locked_by_author = 5
|
||||||
|
no_modify_permission = 6
|
||||||
|
no_show_permission = 7
|
||||||
|
permission_failure = 8
|
||||||
|
request_language_denied = 9
|
||||||
|
OTHERS = 10.
|
||||||
|
IF sy-subrc <> 0.
|
||||||
|
zcx_abapgit_exception=>raise_t100( ).
|
||||||
|
ENDIF.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD get_language_version.
|
||||||
|
|
||||||
|
ASSERT iv_version CA ' X25'.
|
||||||
|
|
||||||
|
" TODO: Determine ABAP Language Version
|
||||||
|
" https://github.com/abapGit/abapGit/issues/6154#issuecomment-1503566920)
|
||||||
|
|
||||||
|
" For now, use default for ABAP source code
|
||||||
|
IF zcl_abapgit_factory=>get_environment( )->is_sap_cloud_platform( ) = abap_true.
|
||||||
|
rv_version = '5'. " abap_for_cloud_development
|
||||||
|
ELSE.
|
||||||
|
rv_version = 'X'. " standard_abap
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD zif_abapgit_sap_report~delete_report.
|
||||||
|
|
||||||
|
authorization_check(
|
||||||
|
iv_mode = 'DELETE'
|
||||||
|
is_item = is_item ).
|
||||||
|
|
||||||
|
DELETE REPORT iv_name.
|
||||||
|
|
||||||
|
IF sy-subrc <> 0 AND iv_raise_error = abap_true.
|
||||||
|
zcx_abapgit_exception=>raise( |Error deleting report { iv_name }| ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD zif_abapgit_sap_report~insert_report.
|
||||||
|
|
||||||
|
DATA lv_version TYPE zif_abapgit_sap_report=>ty_abap_language_version.
|
||||||
|
DATA lv_obj_name TYPE e071-obj_name.
|
||||||
|
|
||||||
|
ASSERT iv_state CA ' AI'.
|
||||||
|
ASSERT iv_program_type CA ' 1FIJKMST'.
|
||||||
|
|
||||||
|
lv_version = get_language_version(
|
||||||
|
iv_package = iv_package
|
||||||
|
iv_version = iv_version ).
|
||||||
|
|
||||||
|
authorization_check(
|
||||||
|
iv_mode = 'MODIFY'
|
||||||
|
is_item = is_item
|
||||||
|
iv_version = lv_version ).
|
||||||
|
|
||||||
|
IF iv_state IS INITIAL.
|
||||||
|
INSERT REPORT iv_name FROM it_source
|
||||||
|
VERSION lv_version.
|
||||||
|
ELSEIF iv_program_type IS INITIAL AND iv_extension_type IS INITIAL.
|
||||||
|
INSERT REPORT iv_name FROM it_source
|
||||||
|
STATE iv_state
|
||||||
|
VERSION lv_version.
|
||||||
|
ELSEIF iv_extension_type IS INITIAL.
|
||||||
|
INSERT REPORT iv_name FROM it_source
|
||||||
|
STATE iv_state
|
||||||
|
PROGRAM TYPE iv_program_type
|
||||||
|
VERSION lv_version.
|
||||||
|
ELSE.
|
||||||
|
INSERT REPORT iv_name FROM it_source
|
||||||
|
STATE iv_state
|
||||||
|
EXTENSION TYPE iv_extension_type
|
||||||
|
PROGRAM TYPE iv_program_type
|
||||||
|
VERSION lv_version.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
IF sy-subrc <> 0.
|
||||||
|
zcx_abapgit_exception=>raise( |Error inserting report { iv_name }| ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD zif_abapgit_sap_report~read_report.
|
||||||
|
|
||||||
|
ASSERT iv_state CA ' AI'.
|
||||||
|
|
||||||
|
authorization_check(
|
||||||
|
iv_mode = 'SHOW'
|
||||||
|
is_item = is_item ).
|
||||||
|
|
||||||
|
IF iv_state IS INITIAL.
|
||||||
|
READ REPORT iv_name INTO rt_source.
|
||||||
|
ELSE.
|
||||||
|
READ REPORT iv_name INTO rt_source STATE iv_state.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
IF sy-subrc <> 0.
|
||||||
|
zcx_abapgit_exception=>raise( |Error reading report { iv_name }| ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD zif_abapgit_sap_report~update_report.
|
||||||
|
|
||||||
|
DATA lt_new TYPE string_table.
|
||||||
|
DATA lt_old TYPE string_table.
|
||||||
|
|
||||||
|
lt_new = it_source.
|
||||||
|
lt_old = zif_abapgit_sap_report~read_report( iv_name ).
|
||||||
|
|
||||||
|
IF lt_old <> lt_new.
|
||||||
|
zif_abapgit_sap_report~insert_report(
|
||||||
|
iv_name = iv_name
|
||||||
|
it_source = it_source
|
||||||
|
iv_state = iv_state
|
||||||
|
iv_program_type = iv_program_type
|
||||||
|
iv_extension_type = iv_extension_type
|
||||||
|
iv_package = iv_package
|
||||||
|
iv_version = iv_version
|
||||||
|
is_item = is_item ).
|
||||||
|
|
||||||
|
rv_updated = abap_true.
|
||||||
|
ELSE.
|
||||||
|
rv_updated = abap_false.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
ENDCLASS.
|
16
src/objects/sap/zcl_abapgit_sap_report.clas.xml
Normal file
16
src/objects/sap/zcl_abapgit_sap_report.clas.xml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
|
||||||
|
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
|
||||||
|
<asx:values>
|
||||||
|
<VSEOCLASS>
|
||||||
|
<CLSNAME>ZCL_ABAPGIT_SAP_REPORT</CLSNAME>
|
||||||
|
<LANGU>E</LANGU>
|
||||||
|
<DESCRIPT>abapGit - SAP Report</DESCRIPT>
|
||||||
|
<STATE>1</STATE>
|
||||||
|
<CLSCCINCL>X</CLSCCINCL>
|
||||||
|
<FIXPT>X</FIXPT>
|
||||||
|
<UNICODE>X</UNICODE>
|
||||||
|
</VSEOCLASS>
|
||||||
|
</asx:values>
|
||||||
|
</asx:abap>
|
||||||
|
</abapGit>
|
54
src/objects/sap/zif_abapgit_sap_report.intf.abap
Normal file
54
src/objects/sap/zif_abapgit_sap_report.intf.abap
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
INTERFACE zif_abapgit_sap_report
|
||||||
|
PUBLIC.
|
||||||
|
|
||||||
|
TYPES:
|
||||||
|
ty_abap_language_version TYPE c LENGTH 1.
|
||||||
|
|
||||||
|
METHODS read_report
|
||||||
|
IMPORTING
|
||||||
|
iv_name TYPE syrepid
|
||||||
|
iv_state TYPE r3state OPTIONAL
|
||||||
|
is_item TYPE zif_abapgit_definitions=>ty_item OPTIONAL
|
||||||
|
RETURNING
|
||||||
|
VALUE(rt_source) TYPE abaptxt255_tab
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception.
|
||||||
|
|
||||||
|
METHODS insert_report
|
||||||
|
IMPORTING
|
||||||
|
iv_name TYPE syrepid
|
||||||
|
it_source TYPE STANDARD TABLE
|
||||||
|
iv_state TYPE r3state OPTIONAL
|
||||||
|
iv_program_type TYPE c OPTIONAL
|
||||||
|
iv_extension_type TYPE c OPTIONAL
|
||||||
|
iv_package TYPE devclass
|
||||||
|
iv_version TYPE ty_abap_language_version OPTIONAL
|
||||||
|
is_item TYPE zif_abapgit_definitions=>ty_item OPTIONAL
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception.
|
||||||
|
|
||||||
|
METHODS update_report
|
||||||
|
IMPORTING
|
||||||
|
iv_name TYPE syrepid
|
||||||
|
it_source TYPE STANDARD TABLE
|
||||||
|
iv_state TYPE r3state OPTIONAL
|
||||||
|
iv_program_type TYPE c OPTIONAL
|
||||||
|
iv_extension_type TYPE c OPTIONAL
|
||||||
|
iv_package TYPE devclass
|
||||||
|
iv_version TYPE ty_abap_language_version OPTIONAL
|
||||||
|
is_item TYPE zif_abapgit_definitions=>ty_item OPTIONAL
|
||||||
|
RETURNING
|
||||||
|
VALUE(rv_updated) TYPE abap_bool
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception.
|
||||||
|
|
||||||
|
METHODS delete_report
|
||||||
|
IMPORTING
|
||||||
|
iv_name TYPE syrepid
|
||||||
|
iv_raise_error TYPE abap_bool DEFAULT abap_false
|
||||||
|
iv_version TYPE ty_abap_language_version OPTIONAL
|
||||||
|
is_item TYPE zif_abapgit_definitions=>ty_item OPTIONAL
|
||||||
|
RAISING
|
||||||
|
zcx_abapgit_exception.
|
||||||
|
|
||||||
|
ENDINTERFACE.
|
15
src/objects/sap/zif_abapgit_sap_report.intf.xml
Normal file
15
src/objects/sap/zif_abapgit_sap_report.intf.xml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<abapGit version="v1.0.0" serializer="LCL_OBJECT_INTF" serializer_version="v1.0.0">
|
||||||
|
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
|
||||||
|
<asx:values>
|
||||||
|
<VSEOINTERF>
|
||||||
|
<CLSNAME>ZIF_ABAPGIT_SAP_REPORT</CLSNAME>
|
||||||
|
<LANGU>E</LANGU>
|
||||||
|
<DESCRIPT>abapGit - SAP Report</DESCRIPT>
|
||||||
|
<EXPOSURE>2</EXPOSURE>
|
||||||
|
<STATE>1</STATE>
|
||||||
|
<UNICODE>X</UNICODE>
|
||||||
|
</VSEOINTERF>
|
||||||
|
</asx:values>
|
||||||
|
</asx:abap>
|
||||||
|
</abapGit>
|
|
@ -204,6 +204,7 @@ CLASS zcl_abapgit_object_clas IMPLEMENTATION.
|
||||||
|
|
||||||
mi_object_oriented_object_fct->generate_locals(
|
mi_object_oriented_object_fct->generate_locals(
|
||||||
is_key = ls_class_key
|
is_key = ls_class_key
|
||||||
|
iv_package = iv_package
|
||||||
it_local_definitions = lt_local_definitions
|
it_local_definitions = lt_local_definitions
|
||||||
it_local_implementations = lt_local_implementations
|
it_local_implementations = lt_local_implementations
|
||||||
it_local_macros = lt_local_macros
|
it_local_macros = lt_local_macros
|
||||||
|
@ -211,8 +212,9 @@ CLASS zcl_abapgit_object_clas IMPLEMENTATION.
|
||||||
|
|
||||||
repo_apack_replacement( CHANGING ct_source = lt_source ).
|
repo_apack_replacement( CHANGING ct_source = lt_source ).
|
||||||
mi_object_oriented_object_fct->deserialize_source(
|
mi_object_oriented_object_fct->deserialize_source(
|
||||||
is_key = ls_class_key
|
is_key = ls_class_key
|
||||||
it_source = lt_source ).
|
iv_package = iv_package
|
||||||
|
it_source = lt_source ).
|
||||||
|
|
||||||
ii_xml->read( EXPORTING iv_name = 'DESCRIPTIONS'
|
ii_xml->read( EXPORTING iv_name = 'DESCRIPTIONS'
|
||||||
CHANGING cg_data = lt_descriptions ).
|
CHANGING cg_data = lt_descriptions ).
|
||||||
|
@ -777,8 +779,8 @@ CLASS zcl_abapgit_object_clas IMPLEMENTATION.
|
||||||
|
|
||||||
DATA: lt_reposrc TYPE STANDARD TABLE OF ty_reposrc,
|
DATA: lt_reposrc TYPE STANDARD TABLE OF ty_reposrc,
|
||||||
ls_reposrc LIKE LINE OF lt_reposrc,
|
ls_reposrc LIKE LINE OF lt_reposrc,
|
||||||
lv_include TYPE programm,
|
lv_include TYPE syrepid,
|
||||||
lt_includes TYPE STANDARD TABLE OF programm.
|
lt_includes TYPE STANDARD TABLE OF syrepid.
|
||||||
|
|
||||||
CASE iv_extra.
|
CASE iv_extra.
|
||||||
WHEN zif_abapgit_oo_object_fnc=>c_parts-locals_def.
|
WHEN zif_abapgit_oo_object_fnc=>c_parts-locals_def.
|
||||||
|
|
|
@ -75,19 +75,20 @@ CLASS zcl_abapgit_object_fugr DEFINITION PUBLIC INHERITING FROM zcl_abapgit_obje
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!it_functions TYPE ty_function_tt
|
!it_functions TYPE ty_function_tt
|
||||||
!ii_log TYPE REF TO zif_abapgit_log
|
!ii_log TYPE REF TO zif_abapgit_log
|
||||||
|
!iv_package TYPE devclass
|
||||||
!iv_transport TYPE trkorr
|
!iv_transport TYPE trkorr
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
METHODS serialize_function_docs
|
METHODS serialize_function_docs
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_prog_name TYPE programm
|
!iv_prog_name TYPE syrepid
|
||||||
!it_functions TYPE ty_function_tt
|
!it_functions TYPE ty_function_tt
|
||||||
!ii_xml TYPE REF TO zif_abapgit_xml_output
|
!ii_xml TYPE REF TO zif_abapgit_xml_output
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
METHODS deserialize_function_docs
|
METHODS deserialize_function_docs
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_prog_name TYPE programm
|
!iv_prog_name TYPE syrepid
|
||||||
!it_functions TYPE ty_function_tt
|
!it_functions TYPE ty_function_tt
|
||||||
!ii_xml TYPE REF TO zif_abapgit_xml_input
|
!ii_xml TYPE REF TO zif_abapgit_xml_input
|
||||||
RAISING
|
RAISING
|
||||||
|
@ -142,13 +143,13 @@ CLASS zcl_abapgit_object_fugr DEFINITION PUBLIC INHERITING FROM zcl_abapgit_obje
|
||||||
!iv_short_text TYPE tftit-stext .
|
!iv_short_text TYPE tftit-stext .
|
||||||
METHODS serialize_texts
|
METHODS serialize_texts
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_prog_name TYPE programm
|
!iv_prog_name TYPE syrepid
|
||||||
!ii_xml TYPE REF TO zif_abapgit_xml_output
|
!ii_xml TYPE REF TO zif_abapgit_xml_output
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
METHODS deserialize_texts
|
METHODS deserialize_texts
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_prog_name TYPE programm
|
!iv_prog_name TYPE syrepid
|
||||||
!ii_xml TYPE REF TO zif_abapgit_xml_input
|
!ii_xml TYPE REF TO zif_abapgit_xml_input
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
|
@ -318,7 +319,11 @@ CLASS zcl_abapgit_object_fugr IMPLEMENTATION.
|
||||||
CONTINUE. "with next function module
|
CONTINUE. "with next function module
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
INSERT REPORT lv_include FROM lt_source.
|
zcl_abapgit_factory=>get_sap_report( )->insert_report(
|
||||||
|
iv_name = lv_include
|
||||||
|
iv_package = iv_package
|
||||||
|
it_source = lt_source ).
|
||||||
|
|
||||||
ii_log->add_success( iv_msg = |Function module { <ls_func>-funcname } imported|
|
ii_log->add_success( iv_msg = |Function module { <ls_func>-funcname } imported|
|
||||||
is_item = ms_item ).
|
is_item = ms_item ).
|
||||||
ENDLOOP.
|
ENDLOOP.
|
||||||
|
@ -1196,7 +1201,7 @@ CLASS zcl_abapgit_object_fugr IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD zif_abapgit_object~deserialize.
|
METHOD zif_abapgit_object~deserialize.
|
||||||
|
|
||||||
DATA: lv_program_name TYPE programm,
|
DATA: lv_program_name TYPE syrepid,
|
||||||
lt_functions TYPE ty_function_tt,
|
lt_functions TYPE ty_function_tt,
|
||||||
lt_dynpros TYPE ty_dynpro_tt,
|
lt_dynpros TYPE ty_dynpro_tt,
|
||||||
ls_cua TYPE ty_cua.
|
ls_cua TYPE ty_cua.
|
||||||
|
@ -1212,6 +1217,7 @@ CLASS zcl_abapgit_object_fugr IMPLEMENTATION.
|
||||||
deserialize_functions(
|
deserialize_functions(
|
||||||
it_functions = lt_functions
|
it_functions = lt_functions
|
||||||
ii_log = ii_log
|
ii_log = ii_log
|
||||||
|
iv_package = iv_package
|
||||||
iv_transport = iv_transport ).
|
iv_transport = iv_transport ).
|
||||||
|
|
||||||
deserialize_includes(
|
deserialize_includes(
|
||||||
|
@ -1362,7 +1368,7 @@ CLASS zcl_abapgit_object_fugr IMPLEMENTATION.
|
||||||
|
|
||||||
DATA: lt_functions TYPE ty_function_tt,
|
DATA: lt_functions TYPE ty_function_tt,
|
||||||
ls_progdir TYPE ty_progdir,
|
ls_progdir TYPE ty_progdir,
|
||||||
lv_program_name TYPE programm,
|
lv_program_name TYPE syrepid,
|
||||||
lt_dynpros TYPE ty_dynpro_tt,
|
lt_dynpros TYPE ty_dynpro_tt,
|
||||||
ls_cua TYPE ty_cua.
|
ls_cua TYPE ty_cua.
|
||||||
|
|
||||||
|
|
|
@ -441,7 +441,7 @@ CLASS zcl_abapgit_object_intf IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD zif_abapgit_object~changed_by.
|
METHOD zif_abapgit_object~changed_by.
|
||||||
TYPES: BEGIN OF ty_includes,
|
TYPES: BEGIN OF ty_includes,
|
||||||
programm TYPE programm,
|
programm TYPE syrepid,
|
||||||
END OF ty_includes.
|
END OF ty_includes.
|
||||||
|
|
||||||
TYPES: BEGIN OF ty_reposrc,
|
TYPES: BEGIN OF ty_reposrc,
|
||||||
|
@ -523,8 +523,9 @@ CLASS zcl_abapgit_object_intf IMPLEMENTATION.
|
||||||
ls_clskey-clsname = ms_item-obj_name.
|
ls_clskey-clsname = ms_item-obj_name.
|
||||||
lt_source = zif_abapgit_object~mo_files->read_abap( ).
|
lt_source = zif_abapgit_object~mo_files->read_abap( ).
|
||||||
mi_object_oriented_object_fct->deserialize_source(
|
mi_object_oriented_object_fct->deserialize_source(
|
||||||
is_key = ls_clskey
|
is_key = ls_clskey
|
||||||
it_source = lt_source ).
|
iv_package = iv_package
|
||||||
|
it_source = lt_source ).
|
||||||
|
|
||||||
deserialize_descriptions( it_description = ls_intf-description ).
|
deserialize_descriptions( it_description = ls_intf-description ).
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ CLASS zcl_abapgit_object_prog DEFINITION PUBLIC INHERITING FROM zcl_abapgit_obje
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!is_progdir TYPE ty_progdir
|
!is_progdir TYPE ty_progdir
|
||||||
!it_source TYPE abaptxt255_tab
|
!it_source TYPE abaptxt255_tab
|
||||||
|
!iv_package TYPE devclass
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
METHODS serialize_texts
|
METHODS serialize_texts
|
||||||
|
@ -72,14 +73,13 @@ CLASS zcl_abapgit_object_prog IMPLEMENTATION.
|
||||||
" https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm?file=abapinsert_report_internal.htm
|
" https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm?file=abapinsert_report_internal.htm
|
||||||
" This e.g. occurs in case of transportable Code Inspector variants (ending with ===VC)
|
" This e.g. occurs in case of transportable Code Inspector variants (ending with ===VC)
|
||||||
|
|
||||||
INSERT REPORT is_progdir-name
|
zcl_abapgit_factory=>get_sap_report( )->insert_report(
|
||||||
FROM it_source
|
iv_name = is_progdir-name
|
||||||
STATE 'I'
|
iv_package = iv_package
|
||||||
EXTENSION TYPE is_progdir-name+30
|
it_source = it_source
|
||||||
PROGRAM TYPE is_progdir-subc.
|
iv_state = 'I'
|
||||||
IF sy-subrc <> 0.
|
iv_program_type = is_progdir-subc
|
||||||
zcx_abapgit_exception=>raise( 'Error from INSERT REPORT .. EXTENSION TYPE' ).
|
iv_extension_type = is_progdir-name+30 ).
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
CALL FUNCTION 'UPDATE_PROGDIR'
|
CALL FUNCTION 'UPDATE_PROGDIR'
|
||||||
EXPORTING
|
EXPORTING
|
||||||
|
@ -187,7 +187,7 @@ CLASS zcl_abapgit_object_prog IMPLEMENTATION.
|
||||||
OTHERS = 5.
|
OTHERS = 5.
|
||||||
IF sy-subrc = 2.
|
IF sy-subrc = 2.
|
||||||
" Drop also any inactive code that is left in REPOSRC
|
" Drop also any inactive code that is left in REPOSRC
|
||||||
DELETE REPORT lv_program ##SUBRC_OK.
|
zcl_abapgit_factory=>get_sap_report( )->delete_report( lv_program ).
|
||||||
|
|
||||||
" Remove inactive objects from work area
|
" Remove inactive objects from work area
|
||||||
lv_obj_name = lv_program.
|
lv_obj_name = lv_program.
|
||||||
|
@ -216,7 +216,7 @@ CLASS zcl_abapgit_object_prog IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD zif_abapgit_object~deserialize.
|
METHOD zif_abapgit_object~deserialize.
|
||||||
|
|
||||||
DATA: lv_program_name TYPE programm,
|
DATA: lv_program_name TYPE syrepid,
|
||||||
ls_progdir TYPE ty_progdir,
|
ls_progdir TYPE ty_progdir,
|
||||||
lt_tpool TYPE textpool_table,
|
lt_tpool TYPE textpool_table,
|
||||||
lt_dynpros TYPE ty_dynpro_tt,
|
lt_dynpros TYPE ty_dynpro_tt,
|
||||||
|
@ -242,6 +242,7 @@ CLASS zcl_abapgit_object_prog IMPLEMENTATION.
|
||||||
|
|
||||||
" Objects with extension for example transportable Code Inspector variants (ending with ===VC)
|
" Objects with extension for example transportable Code Inspector variants (ending with ===VC)
|
||||||
deserialize_with_ext( is_progdir = ls_progdir
|
deserialize_with_ext( is_progdir = ls_progdir
|
||||||
|
iv_package = iv_package
|
||||||
it_source = lt_source ).
|
it_source = lt_source ).
|
||||||
|
|
||||||
ELSE.
|
ELSE.
|
||||||
|
|
|
@ -139,7 +139,11 @@ CLASS zcl_abapgit_object_type IMPLEMENTATION.
|
||||||
iv_devclass = iv_package ).
|
iv_devclass = iv_package ).
|
||||||
ELSE.
|
ELSE.
|
||||||
CONCATENATE c_prefix lv_typegroup INTO lv_progname.
|
CONCATENATE c_prefix lv_typegroup INTO lv_progname.
|
||||||
INSERT REPORT lv_progname FROM lt_source STATE 'I'.
|
|
||||||
|
zcl_abapgit_factory=>get_sap_report( )->insert_report(
|
||||||
|
iv_name = lv_progname
|
||||||
|
iv_package = iv_package
|
||||||
|
it_source = lt_source ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
zcl_abapgit_objects_activation=>add_item( ms_item ).
|
zcl_abapgit_objects_activation=>add_item( ms_item ).
|
||||||
|
|
|
@ -59,13 +59,13 @@ CLASS zcl_abapgit_objects_program DEFINITION
|
||||||
!io_xml TYPE REF TO zif_abapgit_xml_output OPTIONAL
|
!io_xml TYPE REF TO zif_abapgit_xml_output OPTIONAL
|
||||||
!is_item TYPE zif_abapgit_definitions=>ty_item
|
!is_item TYPE zif_abapgit_definitions=>ty_item
|
||||||
!io_files TYPE REF TO zcl_abapgit_objects_files
|
!io_files TYPE REF TO zcl_abapgit_objects_files
|
||||||
!iv_program TYPE programm OPTIONAL
|
!iv_program TYPE syrepid OPTIONAL
|
||||||
!iv_extra TYPE clike OPTIONAL
|
!iv_extra TYPE clike OPTIONAL
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception.
|
zcx_abapgit_exception.
|
||||||
METHODS read_progdir
|
METHODS read_progdir
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_program TYPE programm
|
!iv_program TYPE syrepid
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rs_progdir) TYPE ty_progdir.
|
VALUE(rs_progdir) TYPE ty_progdir.
|
||||||
METHODS deserialize_program
|
METHODS deserialize_program
|
||||||
|
@ -96,14 +96,14 @@ CLASS zcl_abapgit_objects_program DEFINITION
|
||||||
ct_source TYPE STANDARD TABLE. " tab of string or charX
|
ct_source TYPE STANDARD TABLE. " tab of string or charX
|
||||||
METHODS serialize_dynpros
|
METHODS serialize_dynpros
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_program_name TYPE programm
|
!iv_program_name TYPE syrepid
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rt_dynpro) TYPE ty_dynpro_tt
|
VALUE(rt_dynpro) TYPE ty_dynpro_tt
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
METHODS serialize_cua
|
METHODS serialize_cua
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_program_name TYPE programm
|
!iv_program_name TYPE syrepid
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rs_cua) TYPE ty_cua
|
VALUE(rs_cua) TYPE ty_cua
|
||||||
RAISING
|
RAISING
|
||||||
|
@ -115,7 +115,7 @@ CLASS zcl_abapgit_objects_program DEFINITION
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
METHODS deserialize_textpool
|
METHODS deserialize_textpool
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_program TYPE programm
|
!iv_program TYPE syrepid
|
||||||
!it_tpool TYPE textpool_table
|
!it_tpool TYPE textpool_table
|
||||||
!iv_language TYPE sy-langu OPTIONAL
|
!iv_language TYPE sy-langu OPTIONAL
|
||||||
!iv_is_include TYPE abap_bool DEFAULT abap_false
|
!iv_is_include TYPE abap_bool DEFAULT abap_false
|
||||||
|
@ -123,27 +123,27 @@ CLASS zcl_abapgit_objects_program DEFINITION
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
METHODS deserialize_cua
|
METHODS deserialize_cua
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_program_name TYPE programm
|
!iv_program_name TYPE syrepid
|
||||||
!is_cua TYPE ty_cua
|
!is_cua TYPE ty_cua
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
METHODS is_any_dynpro_locked
|
METHODS is_any_dynpro_locked
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_program TYPE programm
|
!iv_program TYPE syrepid
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rv_is_any_dynpro_locked) TYPE abap_bool
|
VALUE(rv_is_any_dynpro_locked) TYPE abap_bool
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
METHODS is_cua_locked
|
METHODS is_cua_locked
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_program TYPE programm
|
!iv_program TYPE syrepid
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rv_is_cua_locked) TYPE abap_bool
|
VALUE(rv_is_cua_locked) TYPE abap_bool
|
||||||
RAISING
|
RAISING
|
||||||
zcx_abapgit_exception .
|
zcx_abapgit_exception .
|
||||||
METHODS is_text_locked
|
METHODS is_text_locked
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!iv_program TYPE programm
|
!iv_program TYPE syrepid
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rv_is_text_locked) TYPE abap_bool
|
VALUE(rv_is_text_locked) TYPE abap_bool
|
||||||
RAISING
|
RAISING
|
||||||
|
@ -600,17 +600,19 @@ CLASS zcl_abapgit_objects_program IMPLEMENTATION.
|
||||||
" For cases that standard function does not handle (like FUGR),
|
" For cases that standard function does not handle (like FUGR),
|
||||||
" we save active and inactive version of source with the given PROGRAM TYPE.
|
" we save active and inactive version of source with the given PROGRAM TYPE.
|
||||||
" Without the active version, the code will not be visible in case of activation errors.
|
" Without the active version, the code will not be visible in case of activation errors.
|
||||||
INSERT REPORT is_progdir-name
|
zcl_abapgit_factory=>get_sap_report( )->insert_report(
|
||||||
FROM it_source
|
iv_name = is_progdir-name
|
||||||
STATE 'A'
|
iv_package = iv_package
|
||||||
PROGRAM TYPE is_progdir-subc.
|
it_source = it_source
|
||||||
INSERT REPORT is_progdir-name
|
iv_state = 'A'
|
||||||
FROM it_source
|
iv_program_type = is_progdir-subc ).
|
||||||
STATE 'I'
|
|
||||||
PROGRAM TYPE is_progdir-subc.
|
zcl_abapgit_factory=>get_sap_report( )->insert_report(
|
||||||
IF sy-subrc <> 0.
|
iv_name = is_progdir-name
|
||||||
zcx_abapgit_exception=>raise( 'Error from INSERT REPORT .. PROGRAM TYPE' ).
|
iv_package = iv_package
|
||||||
ENDIF.
|
it_source = it_source
|
||||||
|
iv_state = 'I'
|
||||||
|
iv_program_type = is_progdir-subc ).
|
||||||
|
|
||||||
ELSEIF sy-subrc > 0.
|
ELSEIF sy-subrc > 0.
|
||||||
zcx_abapgit_exception=>raise_t100( ).
|
zcx_abapgit_exception=>raise_t100( ).
|
||||||
|
@ -877,7 +879,7 @@ CLASS zcl_abapgit_objects_program IMPLEMENTATION.
|
||||||
METHOD serialize_program.
|
METHOD serialize_program.
|
||||||
|
|
||||||
DATA: ls_progdir TYPE ty_progdir,
|
DATA: ls_progdir TYPE ty_progdir,
|
||||||
lv_program_name TYPE programm,
|
lv_program_name TYPE syrepid,
|
||||||
lt_dynpros TYPE ty_dynpro_tt,
|
lt_dynpros TYPE ty_dynpro_tt,
|
||||||
ls_cua TYPE ty_cua,
|
ls_cua TYPE ty_cua,
|
||||||
lt_source TYPE TABLE OF abaptxt255,
|
lt_source TYPE TABLE OF abaptxt255,
|
||||||
|
|
|
@ -20,7 +20,7 @@ CLASS zcl_abapgit_gui_page_debuginfo DEFINITION
|
||||||
PROTECTED SECTION.
|
PROTECTED SECTION.
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
|
|
||||||
CONSTANTS c_exit_standalone TYPE c LENGTH 30 VALUE 'ZABAPGIT_USER_EXIT' ##NO_TEXT.
|
CONSTANTS c_exit_standalone TYPE syrepid VALUE 'ZABAPGIT_USER_EXIT' ##NO_TEXT.
|
||||||
CONSTANTS c_exit_class TYPE c LENGTH 30 VALUE 'ZCL_ABAPGIT_USER_EXIT' ##NO_TEXT.
|
CONSTANTS c_exit_class TYPE c LENGTH 30 VALUE 'ZCL_ABAPGIT_USER_EXIT' ##NO_TEXT.
|
||||||
CONSTANTS c_exit_interface TYPE c LENGTH 30 VALUE 'ZIF_ABAPGIT_EXIT' ##NO_TEXT.
|
CONSTANTS c_exit_interface TYPE c LENGTH 30 VALUE 'ZIF_ABAPGIT_EXIT' ##NO_TEXT.
|
||||||
CONSTANTS:
|
CONSTANTS:
|
||||||
|
@ -68,7 +68,7 @@ ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS ZCL_ABAPGIT_GUI_PAGE_DEBUGINFO IMPLEMENTATION.
|
CLASS zcl_abapgit_gui_page_debuginfo IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD build_toolbar.
|
METHOD build_toolbar.
|
||||||
|
@ -198,7 +198,7 @@ CLASS ZCL_ABAPGIT_GUI_PAGE_DEBUGINFO IMPLEMENTATION.
|
||||||
|
|
||||||
IF zcl_abapgit_factory=>get_environment( )->is_merged( ) = abap_true.
|
IF zcl_abapgit_factory=>get_environment( )->is_merged( ) = abap_true.
|
||||||
" Standalone version
|
" Standalone version
|
||||||
READ REPORT c_exit_standalone INTO lt_source.
|
lt_source = zcl_abapgit_factory=>get_sap_report( )->read_report( c_exit_standalone ).
|
||||||
IF sy-subrc = 0.
|
IF sy-subrc = 0.
|
||||||
ri_html->add( |<div>User exits are active (include { get_jump_object(
|
ri_html->add( |<div>User exits are active (include { get_jump_object(
|
||||||
iv_obj_type = 'PROG'
|
iv_obj_type = 'PROG'
|
||||||
|
|
|
@ -41,6 +41,9 @@ CLASS zcl_abapgit_factory DEFINITION
|
||||||
CLASS-METHODS get_sap_namespace
|
CLASS-METHODS get_sap_namespace
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(ri_namespace) TYPE REF TO zif_abapgit_sap_namespace .
|
VALUE(ri_namespace) TYPE REF TO zif_abapgit_sap_namespace .
|
||||||
|
CLASS-METHODS get_sap_report
|
||||||
|
RETURNING
|
||||||
|
VALUE(ri_report) TYPE REF TO zif_abapgit_sap_report.
|
||||||
PROTECTED SECTION.
|
PROTECTED SECTION.
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
|
|
||||||
|
@ -71,11 +74,12 @@ CLASS zcl_abapgit_factory DEFINITION
|
||||||
CLASS-DATA gi_http_agent TYPE REF TO zif_abapgit_http_agent .
|
CLASS-DATA gi_http_agent TYPE REF TO zif_abapgit_http_agent .
|
||||||
CLASS-DATA gi_lxe_texts TYPE REF TO zif_abapgit_lxe_texts .
|
CLASS-DATA gi_lxe_texts TYPE REF TO zif_abapgit_lxe_texts .
|
||||||
CLASS-DATA gi_sap_namespace TYPE REF TO zif_abapgit_sap_namespace .
|
CLASS-DATA gi_sap_namespace TYPE REF TO zif_abapgit_sap_namespace .
|
||||||
|
CLASS-DATA gi_sap_report TYPE REF TO zif_abapgit_sap_report.
|
||||||
ENDCLASS.
|
ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS ZCL_ABAPGIT_FACTORY IMPLEMENTATION.
|
CLASS zcl_abapgit_factory IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD get_code_inspector.
|
METHOD get_code_inspector.
|
||||||
|
@ -187,6 +191,17 @@ CLASS ZCL_ABAPGIT_FACTORY IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD get_sap_report.
|
||||||
|
|
||||||
|
IF gi_sap_report IS NOT BOUND.
|
||||||
|
CREATE OBJECT gi_sap_report TYPE zcl_abapgit_sap_report.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
ri_report = gi_sap_report.
|
||||||
|
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD get_stage_logic.
|
METHOD get_stage_logic.
|
||||||
|
|
||||||
IF gi_stage_logic IS INITIAL.
|
IF gi_stage_logic IS INITIAL.
|
||||||
|
|
|
@ -36,6 +36,9 @@ CLASS zcl_abapgit_injector DEFINITION
|
||||||
CLASS-METHODS set_sap_namespace
|
CLASS-METHODS set_sap_namespace
|
||||||
IMPORTING
|
IMPORTING
|
||||||
!ii_namespace TYPE REF TO zif_abapgit_sap_namespace .
|
!ii_namespace TYPE REF TO zif_abapgit_sap_namespace .
|
||||||
|
CLASS-METHODS set_sap_report
|
||||||
|
IMPORTING
|
||||||
|
!ii_report TYPE REF TO zif_abapgit_sap_report.
|
||||||
|
|
||||||
PROTECTED SECTION.
|
PROTECTED SECTION.
|
||||||
PRIVATE SECTION.
|
PRIVATE SECTION.
|
||||||
|
@ -43,7 +46,7 @@ ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS ZCL_ABAPGIT_INJECTOR IMPLEMENTATION.
|
CLASS zcl_abapgit_injector IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD set_code_inspector.
|
METHOD set_code_inspector.
|
||||||
|
@ -122,6 +125,11 @@ CLASS ZCL_ABAPGIT_INJECTOR IMPLEMENTATION.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
METHOD set_sap_report.
|
||||||
|
zcl_abapgit_factory=>gi_sap_report = ii_report.
|
||||||
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
METHOD set_stage_logic.
|
METHOD set_stage_logic.
|
||||||
|
|
||||||
zcl_abapgit_factory=>gi_stage_logic = ii_logic.
|
zcl_abapgit_factory=>gi_stage_logic = ii_logic.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user