PARAMETERS: p_show AS CHECKBOX.
SELECT-OPTIONS: s_langu FOR t002-spras
DEFAULT sy-langu
NO INTERVALS.
CONSTANTS:
c_xml_root TYPE string VALUE 'CLASS_ROOT',
c_xml_public TYPE string VALUE 'PUBLIC_SECTION',
c_xml_protected TYPE string VALUE 'PROTECTED_SECTION',
c_xml_private TYPE string VALUE 'PRIVATE_SECTION',
c_xml_inheritance TYPE string VALUE 'INHERITANCE',
c_xml_friends TYPE string VALUE 'FRIENDS',
c_xml_interfaces TYPE string VALUE 'INTERFACES',
c_xml_redefinitions TYPE string VALUE 'REDEFINITIONS',
c_xml_typesource TYPE string VALUE 'TYPE_SOURCE',
c_xml_locals_src TYPE string VALUE 'LOCALS_SRC',
c_xml_locals_def TYPE string VALUE 'LOCALS_DEF',
c_xml_locals_imp TYPE string VALUE 'LOCALS_IMP',
c_xml_locals_mac TYPE string VALUE 'LOCALS_MAC',
c_xml_method_src TYPE string VALUE 'METHOD_SOURCE',
c_xml_attributes TYPE string VALUE 'ATTRIBUTES',
c_xml_methods TYPE string VALUE 'METHODS',
c_xml_events TYPE string VALUE 'EVENTS',
c_xml_types TYPE string VALUE 'TYPES',
c_xml_parameters TYPE string VALUE 'PARAMETERS',
c_xml_exceps TYPE string VALUE 'EXCEPTIONS',
c_xml_implementings TYPE string VALUE 'IMPLEMENTINGS',
c_xml_impl_details TYPE string VALUE 'IMPL_DETAILS',
c_xml_friendships TYPE string VALUE 'FRIENDSHIPS',
c_xml_typepusages TYPE string VALUE 'TYPEPUSAGES',
c_xml_clsdeferrds TYPE string VALUE 'CLSDEFERRDS',
c_xml_intdeferrds TYPE string VALUE 'INTDEFERRDS',
c_xml_aliases TYPE string VALUE 'ALIASES',
c_xml_text_pool TYPE string VALUE 'TEXT_POOL'.
TYPE-POOLS: seok, seop.
DATA:
wo_xml TYPE REF TO cl_xml_document,
class_root TYPE REF TO if_ixml_node,
section TYPE REF TO if_ixml_node,
gt_texts TYPE TABLE OF textpool,
gs_class TYPE vseoclass,
gt_attributes TYPE seoo_attributes_r,
gt_methods TYPE seoo_methods_r,
gt_events TYPE seoo_events_r,
gt_types TYPE seoo_types_r,
gt_parameters TYPE seos_parameters_r,
gt_exceps TYPE seos_exceptions_r,
gt_implementings TYPE seor_implementings_r,
gs_inheritance TYPE vseoextend,
gt_redefinitions TYPE seor_redefinitions_r,
gt_impl_details TYPE seor_redefinitions_r,
gt_friendships TYPE seof_friendships_r,
gt_typepusages TYPE seot_typepusages_r,
gt_clsdeferrds TYPE seot_clsdeferrds_r,
gt_intdeferrds TYPE seot_intdeferrds_r,
gt_aliases TYPE seoo_aliases_r,
gt_interfaces TYPE seok_int_typeinfos,
gs_includes TYPE seop_methods_w_include,
gt_source TYPE seop_source ,
typkey TYPE seocmpkey,
single_source TYPE seop_source,
type_source TYPE seop_source,
clsname TYPE seoclass-clsname,
clskey TYPE seoclskey,
mtd_name TYPE string,
l_description TYPE sdok_descr,
include_name TYPE programm,
name TYPE string,
user_action TYPE i,
path TYPE string,
full_path TYPE string,
file_name TYPE string,
localfile TYPE localfile.
FIELD-SYMBOLS:
<type> TYPE seoo_type_r,
<info> TYPE seok_cls_typeinfo_by_vis ,
<source_line> TYPE LINE OF seop_source,
<include> TYPE LINE OF seop_methods_w_include.
* All other sections will be under the root (see parent_node)
DEFINE set_section_data.
if not &2 is initial.
wo_xml->set_data( name = &1
parent_node = class_root
dataobject = &2 ).
endif.
END-OF-DEFINITION.
CALL FUNCTION 'F4_OBJECTS_CLASS'
EXPORTING
object = clsname
IMPORTING
RESULT = clsname.
class = clsname.
AT SELECTION-SCREEN ON class.
clskey-clsname = class.
* Check if active version of class exists
CALL FUNCTION 'SEO_CLASS_GET'
EXPORTING
clskey = clskey
version = '1'
state = '1'
EXCEPTIONS
not_existing = 1
deleted = 2
is_interface = 3
model_only = 4
OTHERS = 5.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Load all method include names
CALL FUNCTION 'SEO_CLASS_GET_METHOD_INCLUDES'
EXPORTING
clskey = class
IMPORTING
includes = gs_includes
EXCEPTIONS
_internal_class_not_existing = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Gathering together internal type source
LOOP AT gt_types ASSIGNING <type>.
CALL FUNCTION 'SEO_CLASS_GET_INCLUDE_BY_NAME'
EXPORTING
clskey = class
IMPORTING
progname = include_name.
section = wo_xml->create_simple_element( name = c_xml_text_pool
parent = class_root ).
SELECT spras FROM t002 INTO t002-spras.
REFRESH gt_texts.
READ TEXTPOOL include_name INTO gt_texts
LANGUAGE t002-spras.
CHECK sy-subrc = 0.
name = t002-spras.
wo_xml->set_data( name = name
parent_node = section
dataobject = gt_texts ).
ENDSELECT.
* Create section for method source.
* Then each metod as a single node under the common section
section = wo_xml->create_simple_element( name = c_xml_method_src
parent = class_root ).
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.