mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-03 13:26:12 +08:00

* add global classes for objects * fix metadata * comment old code fix serializer class move missing interfaces * keep objects and bridge as local * fix syntax errors and remove SICF -> tadir dependency, instead tadir -> SICF * remove dependency TABL -> lcl_popups * fix indentation * remove old includes * fix parser errors * fix deserializing
45 lines
1.5 KiB
ABAP
45 lines
1.5 KiB
ABAP
CLASS zcl_abapgit_object_tabl_valid DEFINITION PUBLIC FINAL.
|
|
PUBLIC SECTION.
|
|
METHODS validate
|
|
IMPORTING
|
|
io_remote_version TYPE REF TO zcl_abapgit_xml_input
|
|
io_local_version TYPE REF TO zcl_abapgit_xml_input
|
|
RETURNING
|
|
VALUE(rv_message) TYPE string
|
|
RAISING
|
|
zcx_abapgit_exception.
|
|
ENDCLASS.
|
|
|
|
CLASS zcl_abapgit_object_tabl_valid IMPLEMENTATION.
|
|
|
|
METHOD validate.
|
|
DATA: lt_previous_table_fields TYPE TABLE OF dd03p,
|
|
ls_previous_table_field LIKE LINE OF lt_previous_table_fields,
|
|
lt_current_table_fields TYPE TABLE OF dd03p,
|
|
ls_current_table_field LIKE LINE OF lt_current_table_fields.
|
|
io_remote_version->read(
|
|
EXPORTING
|
|
iv_name = 'DD03P_TABLE'
|
|
CHANGING
|
|
cg_data = lt_previous_table_fields ).
|
|
io_local_version->read(
|
|
EXPORTING
|
|
iv_name = 'DD03P_TABLE'
|
|
CHANGING
|
|
cg_data = lt_current_table_fields ).
|
|
|
|
LOOP AT lt_previous_table_fields INTO ls_previous_table_field.
|
|
READ TABLE lt_current_table_fields WITH KEY fieldname = ls_previous_table_field-fieldname
|
|
INTO ls_current_table_field.
|
|
IF sy-subrc = 0.
|
|
IF ls_current_table_field-rollname <> ls_previous_table_field-rollname.
|
|
rv_message = 'Fields were changed. This may lead to inconsistencies.'.
|
|
ENDIF.
|
|
ELSE.
|
|
rv_message = 'Fields were changed. This may lead to inconsistencies.'.
|
|
ENDIF.
|
|
ENDLOOP.
|
|
ENDMETHOD.
|
|
|
|
ENDCLASS.
|