move SOTR defintions to SOTR class (#6033)

Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
This commit is contained in:
Lars Hvam 2023-02-03 16:25:27 +01:00 committed by GitHub
parent 13886f99dc
commit 716111370a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 25 deletions

View File

@ -5,6 +5,16 @@ CLASS zcl_abapgit_sotr_handler DEFINITION
PUBLIC SECTION. PUBLIC SECTION.
TYPES:
BEGIN OF ty_sotr,
header TYPE sotr_head,
entries TYPE sotr_text_tt,
END OF ty_sotr .
TYPES:
ty_sotr_tt TYPE STANDARD TABLE OF ty_sotr WITH DEFAULT KEY .
TYPES:
ty_sotr_use_tt TYPE STANDARD TABLE OF sotr_use WITH DEFAULT KEY .
CLASS-METHODS read_sotr CLASS-METHODS read_sotr
IMPORTING IMPORTING
!iv_pgmid TYPE pgmid DEFAULT 'R3TR' !iv_pgmid TYPE pgmid DEFAULT 'R3TR'
@ -13,8 +23,8 @@ CLASS zcl_abapgit_sotr_handler DEFINITION
!io_xml TYPE REF TO zif_abapgit_xml_output OPTIONAL !io_xml TYPE REF TO zif_abapgit_xml_output OPTIONAL
!iv_language TYPE spras OPTIONAL !iv_language TYPE spras OPTIONAL
EXPORTING EXPORTING
!et_sotr TYPE zif_abapgit_definitions=>ty_sotr_tt !et_sotr TYPE ty_sotr_tt
!et_sotr_use TYPE zif_abapgit_definitions=>ty_sotr_use_tt !et_sotr_use TYPE ty_sotr_use_tt
RAISING RAISING
zcx_abapgit_exception . zcx_abapgit_exception .
CLASS-METHODS create_sotr CLASS-METHODS create_sotr
@ -26,8 +36,8 @@ CLASS zcl_abapgit_sotr_handler DEFINITION
CLASS-METHODS create_sotr_from_data CLASS-METHODS create_sotr_from_data
IMPORTING IMPORTING
!iv_package TYPE devclass !iv_package TYPE devclass
!it_sotr TYPE zif_abapgit_definitions=>ty_sotr_tt !it_sotr TYPE ty_sotr_tt
!it_sotr_use TYPE zif_abapgit_definitions=>ty_sotr_use_tt !it_sotr_use TYPE ty_sotr_use_tt
RAISING RAISING
zcx_abapgit_exception . zcx_abapgit_exception .
CLASS-METHODS delete_sotr CLASS-METHODS delete_sotr
@ -49,13 +59,13 @@ CLASS zcl_abapgit_sotr_handler DEFINITION
!iv_object TYPE trobjtype !iv_object TYPE trobjtype
!iv_obj_name TYPE csequence !iv_obj_name TYPE csequence
RETURNING RETURNING
VALUE(rt_sotr_use) TYPE zif_abapgit_definitions=>ty_sotr_use_tt. VALUE(rt_sotr_use) TYPE ty_sotr_use_tt.
CLASS-METHODS get_sotr_4_concept CLASS-METHODS get_sotr_4_concept
IMPORTING IMPORTING
!iv_concept TYPE sotr_conc !iv_concept TYPE sotr_conc
RETURNING RETURNING
VALUE(rs_sotr) TYPE zif_abapgit_definitions=>ty_sotr . VALUE(rs_sotr) TYPE ty_sotr .
PRIVATE SECTION. PRIVATE SECTION.
ENDCLASS. ENDCLASS.
@ -67,8 +77,8 @@ CLASS zcl_abapgit_sotr_handler IMPLEMENTATION.
METHOD create_sotr. METHOD create_sotr.
DATA: DATA:
lt_sotr TYPE zif_abapgit_definitions=>ty_sotr_tt, lt_sotr TYPE ty_sotr_tt,
lt_sotr_use TYPE zif_abapgit_definitions=>ty_sotr_use_tt. lt_sotr_use TYPE ty_sotr_use_tt.
io_xml->read( EXPORTING iv_name = 'SOTR' io_xml->read( EXPORTING iv_name = 'SOTR'
CHANGING cg_data = lt_sotr ). CHANGING cg_data = lt_sotr ).
@ -159,7 +169,7 @@ CLASS zcl_abapgit_sotr_handler IMPLEMENTATION.
METHOD delete_sotr. METHOD delete_sotr.
DATA lt_sotr_use TYPE zif_abapgit_definitions=>ty_sotr_use_tt. DATA lt_sotr_use TYPE ty_sotr_use_tt.
FIELD-SYMBOLS <ls_sotr_use> LIKE LINE OF lt_sotr_use. FIELD-SYMBOLS <ls_sotr_use> LIKE LINE OF lt_sotr_use.
@ -261,9 +271,9 @@ CLASS zcl_abapgit_sotr_handler IMPLEMENTATION.
METHOD get_sotr_4_concept. METHOD get_sotr_4_concept.
DATA: ls_header TYPE zif_abapgit_definitions=>ty_sotr-header, DATA: ls_header TYPE ty_sotr-header,
lv_paket LIKE ls_header-alias_name, lv_paket LIKE ls_header-alias_name,
lt_entries TYPE zif_abapgit_definitions=>ty_sotr-entries. lt_entries TYPE ty_sotr-entries.
FIELD-SYMBOLS: <ls_entry> LIKE LINE OF lt_entries. FIELD-SYMBOLS: <ls_entry> LIKE LINE OF lt_entries.
@ -345,7 +355,7 @@ CLASS zcl_abapgit_sotr_handler IMPLEMENTATION.
FIELD-SYMBOLS <ls_sotr_use> LIKE LINE OF et_sotr_use. FIELD-SYMBOLS <ls_sotr_use> LIKE LINE OF et_sotr_use.
DATA: lv_sotr TYPE zif_abapgit_definitions=>ty_sotr, DATA: lv_sotr TYPE ty_sotr,
lt_language_filter TYPE zif_abapgit_environment=>ty_system_language_filter. lt_language_filter TYPE zif_abapgit_environment=>ty_system_language_filter.
" SOTR usage (see LSOTR_SYSTEM_SETTINGSF01, FORM GET_OBJECT_TABLE) " SOTR usage (see LSOTR_SYSTEM_SETTINGSF01, FORM GET_OBJECT_TABLE)

View File

@ -34,7 +34,7 @@ CLASS ltcl_sotr_handler IMPLEMENTATION.
ENDMETHOD. ENDMETHOD.
METHOD sotr_wda_0001. METHOD sotr_wda_0001.
CONSTANTS lc_wd_component_name TYPE sobj_name VALUE 'SALV_WD_TEST_TABLE_SIMPLE'. CONSTANTS lc_wd_component_name TYPE sobj_name VALUE 'SALV_WD_TEST_TABLE_SIMPLE'.
DATA lt_sotr TYPE zif_abapgit_definitions=>ty_sotr_tt. DATA lt_sotr TYPE zcl_abapgit_sotr_handler=>ty_sotr_tt.
IF is_wd_component_existing( lc_wd_component_name ) = abap_true. IF is_wd_component_existing( lc_wd_component_name ) = abap_true.
TRY. TRY.
zcl_abapgit_sotr_handler=>read_sotr( zcl_abapgit_sotr_handler=>read_sotr(
@ -52,7 +52,7 @@ CLASS ltcl_sotr_handler IMPLEMENTATION.
ENDMETHOD. ENDMETHOD.
METHOD sotr_wda_0003_not_exist. METHOD sotr_wda_0003_not_exist.
CONSTANTS lc_wd_not_exist_component_name TYPE sobj_name VALUE '_NOT_EXISTING'. CONSTANTS lc_wd_not_exist_component_name TYPE sobj_name VALUE '_NOT_EXISTING'.
DATA lt_sotr TYPE zif_abapgit_definitions=>ty_sotr_tt. DATA lt_sotr TYPE zcl_abapgit_sotr_handler=>ty_sotr_tt.
IF is_wd_component_existing( lc_wd_not_exist_component_name ) <> abap_true. IF is_wd_component_existing( lc_wd_not_exist_component_name ) <> abap_true.
TRY. TRY.
zcl_abapgit_sotr_handler=>read_sotr( zcl_abapgit_sotr_handler=>read_sotr(
@ -70,7 +70,7 @@ CLASS ltcl_sotr_handler IMPLEMENTATION.
ENDMETHOD. ENDMETHOD.
METHOD sotr_wda_0004. METHOD sotr_wda_0004.
CONSTANTS lc_wd_component_name TYPE sobj_name VALUE 'SALV_WD_TEST_TABLE_SELECT'. CONSTANTS lc_wd_component_name TYPE sobj_name VALUE 'SALV_WD_TEST_TABLE_SELECT'.
DATA lt_sotr TYPE zif_abapgit_definitions=>ty_sotr_tt. DATA lt_sotr TYPE zcl_abapgit_sotr_handler=>ty_sotr_tt.
IF is_wd_component_existing( lc_wd_component_name ) = abap_true. IF is_wd_component_existing( lc_wd_component_name ) = abap_true.
TRY. TRY.
zcl_abapgit_sotr_handler=>read_sotr( zcl_abapgit_sotr_handler=>read_sotr(
@ -89,7 +89,7 @@ CLASS ltcl_sotr_handler IMPLEMENTATION.
ENDIF. ENDIF.
ENDMETHOD. ENDMETHOD.
METHOD sotr_cx_0002. METHOD sotr_cx_0002.
DATA lt_sotr TYPE zif_abapgit_definitions=>ty_sotr_tt. DATA lt_sotr TYPE zcl_abapgit_sotr_handler=>ty_sotr_tt.
TRY. TRY.
zcl_abapgit_sotr_handler=>read_sotr( zcl_abapgit_sotr_handler=>read_sotr(
EXPORTING EXPORTING

View File

@ -151,15 +151,6 @@ INTERFACE zif_abapgit_definitions
TYPES: END OF ty_tpool . TYPES: END OF ty_tpool .
TYPES: TYPES:
ty_tpool_tt TYPE STANDARD TABLE OF ty_tpool WITH DEFAULT KEY . ty_tpool_tt TYPE STANDARD TABLE OF ty_tpool WITH DEFAULT KEY .
TYPES:
BEGIN OF ty_sotr,
header TYPE sotr_head,
entries TYPE sotr_text_tt,
END OF ty_sotr .
TYPES:
ty_sotr_tt TYPE STANDARD TABLE OF ty_sotr WITH DEFAULT KEY .
TYPES:
ty_sotr_use_tt TYPE STANDARD TABLE OF sotr_use WITH DEFAULT KEY .
TYPES: TYPES:
BEGIN OF ty_obj_attribute, BEGIN OF ty_obj_attribute,
cmpname TYPE seocmpname, cmpname TYPE seocmpname,