Switch to tr_object_insert

This commit is contained in:
Marc Bernard 2024-10-21 20:53:05 +00:00
parent 944642fd4a
commit 23383d3ff5
3 changed files with 28 additions and 19 deletions

View File

@ -209,7 +209,7 @@ CLASS zcl_abapgit_cts_api IMPLEMENTATION.
IMPORTING
pe_result = lv_type_check_result.
rv_transportable = boolc( lv_type_check_result CA 'RTL' ).
rv_transportable = boolc( lv_type_check_result CA 'RTL' OR iv_object_type = 'TABU' ).
ENDMETHOD.
@ -345,6 +345,9 @@ CLASS zcl_abapgit_cts_api IMPLEMENTATION.
DATA lt_table_keys TYPE STANDARD TABLE OF e071k.
DATA lv_with_dialog TYPE abap_bool.
FIELD-SYMBOLS <ls_table> LIKE LINE OF lt_tables.
FIELD-SYMBOLS <ls_table_key> LIKE LINE OF lt_table_keys.
cl_table_utilities_brf=>create_transport_entries(
EXPORTING
it_table_ins = it_table_ins
@ -373,16 +376,24 @@ CLASS zcl_abapgit_cts_api IMPLEMENTATION.
lv_with_dialog = abap_true.
ENDIF.
CALL FUNCTION 'TRINT_OBJECTS_CHECK_AND_INSERT'
READ TABLE lt_tables ASSIGNING <ls_table> INDEX 1.
ASSERT sy-subrc = 0.
LOOP AT lt_table_keys ASSIGNING <ls_table_key>.
<ls_table_key>-objfunc = <ls_table>-objfunc.
ENDLOOP.
CALL FUNCTION 'TR_OBJECT_INSERT'
EXPORTING
iv_order = iv_transport
iv_with_dialog = lv_with_dialog
iv_append_to_order = iv_append_to_order
CHANGING
ct_ko200 = lt_tables
ct_e071k = lt_table_keys
wi_order = iv_transport
wi_ko200 = <ls_table>
iv_no_show_option = abap_true
TABLES
wt_e071k = lt_table_keys
EXCEPTIONS
OTHERS = 1.
cancel_edit_other_error = 1
show_only_other_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
zcx_abapgit_exception=>raise_t100( ).
ENDIF.

View File

@ -59,12 +59,11 @@ INTERFACE zif_abapgit_cts_api
VALUE(rv_messages_confirmed) TYPE abap_bool .
METHODS create_transport_entries
IMPORTING
!iv_transport TYPE trkorr
!it_table_ins TYPE ANY TABLE OPTIONAL
!it_table_upd TYPE ANY TABLE OPTIONAL
!it_table_del TYPE ANY TABLE OPTIONAL
!iv_tabname TYPE tabname
!iv_append_to_order TYPE abap_bool DEFAULT abap_false
!iv_transport TYPE trkorr
!it_table_ins TYPE ANY TABLE OPTIONAL
!it_table_upd TYPE ANY TABLE OPTIONAL
!it_table_del TYPE ANY TABLE OPTIONAL
!iv_tabname TYPE tabname
RAISING
zcx_abapgit_exception .
METHODS get_r3tr_obj_for_limu_obj

View File

@ -171,10 +171,9 @@ CLASS zcl_abapgit_object_view IMPLEMENTATION.
INSERT ls_key INTO TABLE lt_keys.
zcl_abapgit_factory=>get_cts_api( )->create_transport_entries(
iv_transport = iv_transport
it_table_ins = lt_keys
iv_tabname = 'TDDAT'
iv_append_to_order = abap_true ).
iv_transport = iv_transport
it_table_ins = lt_keys
iv_tabname = 'TDDAT' ).
ENDMETHOD.