mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 20:03:20 +08:00
FUGR: Add documentation (longtexts) (#5795)
After #5786, Ref #5774 Serialize and deserialize documentation of function group, function modules, and parameters. Test case: https://github.com/abapGit-tests/FUGR_docu Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
parent
954d913191
commit
004885fcc0
|
@ -5,6 +5,11 @@ CLASS zcl_abapgit_object_fugr DEFINITION PUBLIC INHERITING FROM zcl_abapgit_obje
|
|||
PROTECTED SECTION.
|
||||
PRIVATE SECTION.
|
||||
|
||||
CONSTANTS:
|
||||
c_longtext_id_prog TYPE dokil-id VALUE 'RE',
|
||||
c_longtext_id_func TYPE dokil-id VALUE 'FU',
|
||||
c_longtext_id_func_exc TYPE dokil-id VALUE 'FX'.
|
||||
|
||||
TYPES:
|
||||
ty_rs38l_incl_tt TYPE STANDARD TABLE OF rs38l_incl WITH DEFAULT KEY .
|
||||
TYPES:
|
||||
|
@ -73,6 +78,20 @@ CLASS zcl_abapgit_object_fugr DEFINITION PUBLIC INHERITING FROM zcl_abapgit_obje
|
|||
!iv_transport TYPE trkorr
|
||||
RAISING
|
||||
zcx_abapgit_exception .
|
||||
METHODS serialize_function_docs
|
||||
IMPORTING
|
||||
!iv_prog_name TYPE programm
|
||||
!it_functions TYPE ty_function_tt
|
||||
!ii_xml TYPE REF TO zif_abapgit_xml_output
|
||||
RAISING
|
||||
zcx_abapgit_exception .
|
||||
METHODS deserialize_function_docs
|
||||
IMPORTING
|
||||
!iv_prog_name TYPE programm
|
||||
!it_functions TYPE ty_function_tt
|
||||
!ii_xml TYPE REF TO zif_abapgit_xml_input
|
||||
RAISING
|
||||
zcx_abapgit_exception .
|
||||
METHODS serialize_xml
|
||||
IMPORTING
|
||||
!ii_xml TYPE REF TO zif_abapgit_xml_output
|
||||
|
@ -142,7 +161,7 @@ ENDCLASS.
|
|||
|
||||
|
||||
|
||||
CLASS ZCL_ABAPGIT_OBJECT_FUGR IMPLEMENTATION.
|
||||
CLASS zcl_abapgit_object_fugr IMPLEMENTATION.
|
||||
|
||||
|
||||
METHOD check_rfc_parameters.
|
||||
|
@ -307,6 +326,34 @@ CLASS ZCL_ABAPGIT_OBJECT_FUGR IMPLEMENTATION.
|
|||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD deserialize_function_docs.
|
||||
|
||||
FIELD-SYMBOLS <ls_func> LIKE LINE OF it_functions.
|
||||
|
||||
zcl_abapgit_factory=>get_longtexts( )->deserialize(
|
||||
iv_longtext_id = c_longtext_id_prog
|
||||
iv_object_name = iv_prog_name
|
||||
ii_xml = ii_xml
|
||||
iv_main_language = mv_language ).
|
||||
|
||||
LOOP AT it_functions ASSIGNING <ls_func>.
|
||||
zcl_abapgit_factory=>get_longtexts( )->deserialize(
|
||||
iv_longtext_name = |LONGTEXTS_{ <ls_func>-funcname }|
|
||||
iv_longtext_id = c_longtext_id_func
|
||||
iv_object_name = <ls_func>-funcname
|
||||
ii_xml = ii_xml
|
||||
iv_main_language = mv_language ).
|
||||
zcl_abapgit_factory=>get_longtexts( )->deserialize(
|
||||
iv_longtext_name = |LONGTEXTS_{ <ls_func>-funcname }___EXC|
|
||||
iv_longtext_id = c_longtext_id_func_exc
|
||||
iv_object_name = <ls_func>-funcname
|
||||
ii_xml = ii_xml
|
||||
iv_main_language = mv_language ).
|
||||
ENDLOOP.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD deserialize_includes.
|
||||
|
||||
DATA: lo_xml TYPE REF TO zif_abapgit_xml_input,
|
||||
|
@ -869,6 +916,31 @@ CLASS ZCL_ABAPGIT_OBJECT_FUGR IMPLEMENTATION.
|
|||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD serialize_function_docs.
|
||||
|
||||
FIELD-SYMBOLS <ls_func> LIKE LINE OF it_functions.
|
||||
|
||||
zcl_abapgit_factory=>get_longtexts( )->serialize(
|
||||
iv_longtext_id = c_longtext_id_prog
|
||||
iv_object_name = iv_prog_name
|
||||
ii_xml = ii_xml ).
|
||||
|
||||
LOOP AT it_functions ASSIGNING <ls_func>.
|
||||
zcl_abapgit_factory=>get_longtexts( )->serialize(
|
||||
iv_longtext_name = |LONGTEXTS_{ <ls_func>-funcname }|
|
||||
iv_longtext_id = c_longtext_id_func
|
||||
iv_object_name = <ls_func>-funcname
|
||||
ii_xml = ii_xml ).
|
||||
zcl_abapgit_factory=>get_longtexts( )->serialize(
|
||||
iv_longtext_name = |LONGTEXTS_{ <ls_func>-funcname }___EXC|
|
||||
iv_longtext_id = c_longtext_id_func_exc
|
||||
iv_object_name = <ls_func>-funcname
|
||||
ii_xml = ii_xml ).
|
||||
ENDLOOP.
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
METHOD serialize_includes.
|
||||
|
||||
DATA: lt_includes TYPE ty_sobj_name_tt.
|
||||
|
@ -1107,6 +1179,7 @@ CLASS ZCL_ABAPGIT_OBJECT_FUGR IMPLEMENTATION.
|
|||
|
||||
io_xml->read( EXPORTING iv_name = 'FUNCTIONS'
|
||||
CHANGING cg_data = lt_functions ).
|
||||
|
||||
deserialize_functions(
|
||||
it_functions = lt_functions
|
||||
ii_log = ii_log
|
||||
|
@ -1126,13 +1199,20 @@ CLASS ZCL_ABAPGIT_OBJECT_FUGR IMPLEMENTATION.
|
|||
|
||||
io_xml->read( EXPORTING iv_name = 'DYNPROS'
|
||||
CHANGING cg_data = lt_dynpros ).
|
||||
|
||||
deserialize_dynpros( lt_dynpros ).
|
||||
|
||||
io_xml->read( EXPORTING iv_name = 'CUA'
|
||||
CHANGING cg_data = ls_cua ).
|
||||
|
||||
deserialize_cua( iv_program_name = lv_program_name
|
||||
is_cua = ls_cua ).
|
||||
|
||||
deserialize_function_docs(
|
||||
iv_prog_name = lv_program_name
|
||||
it_functions = lt_functions
|
||||
ii_xml = io_xml ).
|
||||
|
||||
ENDMETHOD.
|
||||
|
||||
|
||||
|
@ -1216,6 +1296,7 @@ CLASS ZCL_ABAPGIT_OBJECT_FUGR IMPLEMENTATION.
|
|||
serialize_xml( io_xml ).
|
||||
|
||||
lt_functions = serialize_functions( ).
|
||||
|
||||
io_xml->add( iv_name = 'FUNCTIONS'
|
||||
ig_data = lt_functions ).
|
||||
|
||||
|
@ -1243,5 +1324,9 @@ CLASS ZCL_ABAPGIT_OBJECT_FUGR IMPLEMENTATION.
|
|||
ig_data = ls_cua ).
|
||||
ENDIF.
|
||||
|
||||
serialize_function_docs( iv_prog_name = lv_program_name
|
||||
it_functions = lt_functions
|
||||
ii_xml = io_xml ).
|
||||
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
|
|
Loading…
Reference in New Issue
Block a user