*&---------------------------------------------------------------------*
*&  Include           ZSOFTCOPY_SEO                                    *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*& This file is part of ZSOFTCOPY.                                     *
*&                                                                     *
*& ZSOFTCOPY is free software: you can redistribute it and/or modify   *
*& it under the terms of the GNU General Public License as published   *
*& by the Free Software Foundation, either version 3 of the License,   *
*& or any later version.                                               *
*&                                                                     *
*& ZSOFTCOPY is distributed in the hope that it will be useful,        *
*& but WITHOUT ANY WARRANTY; without even the implied warranty of      *
*& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       *
*& GNU General Public License for more details.                        *
*&                                                                     *
*& You should have received a copy of the GNU General Public License   *
*& along with ZDOWNLOAD. If not, see <http://www.gnu.org/licenses/>.   *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&  Author:     Ruediger von Creytz     ruediger.creytz@globalbit.net  *
*&  Copyright:  globalBIT, LLC          http://www.globalbit.net       *
*&                                                                     *
*&---------------------------------------------------------------------*


*-----------------------------------------------------------------------
* seo
*-----------------------------------------------------------------------
FORM seo.
*INTF
  PERFORM seo_r3tr_intf.
*CLAS
  PERFORM seo_r3tr_clas.
*CLAS methods
  PERFORM seo_r3tr_clas_methods.

ENDFORM.                    "seo


*-----------------------------------------------------------------------
* seo_clas_get_attribs
*-----------------------------------------------------------------------
FORM seo_clas_get_attribs
  USING
    value(i_clsname)
    it_super_class TYPE it_seo_super_class
    it_ref_interface TYPE it_ref_seointerface
  CHANGING
    ct_ref_attrib TYPE it_ref_seoattrib.

  REFRESH ct_ref_attrib.

*Attributes - from Interfaces
  PERFORM seo_clas_get_attribs_from_intf
    USING
      i_clsname
      it_super_class
      it_ref_interface
    CHANGING
      ct_ref_attrib.
*Attributes - from Classes
  PERFORM seo_clas_get_attribs_from_clas
    USING
      i_clsname
      it_super_class
    CHANGING
      ct_ref_attrib.
ENDFORM.                    "seo_clas_get_attribs


*-----------------------------------------------------------------------
* seo_clas_get_aliases
*-----------------------------------------------------------------------
FORM seo_clas_get_aliases
  USING
    value(i_clsname)
    it_ref_attrib TYPE it_ref_seoattrib
    it_ref_method TYPE it_ref_seomethod
    it_ref_event TYPE it_ref_seoevent
    it_ref_type TYPE it_ref_seotype
  CHANGING
    ct_ref_alias TYPE it_ref_seoalias.

  DATA:
  ls_ref_alias TYPE st_ref_seoalias,
  lt_ref_alias_tmp TYPE it_ref_seoalias,
  ls_clskey TYPE seoclskey,
  lt_seoalias TYPE seo_aliases,
  l_clsname TYPE seoclsname,
  l_cmpname TYPE seocmpname.

  FIELD-SYMBOLS:
  <ls_ref_attrib> TYPE st_ref_seoattrib,
  <ls_ref_method> TYPE st_ref_seomethod,
  <ls_ref_event> TYPE st_ref_seoevent,
  <ls_ref_type> TYPE st_ref_seotype,
  <ls_ref_alias> TYPE st_ref_seoalias,
  <ls_alias> TYPE seoaliases.

  REFRESH:
  ct_ref_alias.

  ls_ref_alias-type = txt_attribute.
  LOOP AT it_ref_attrib ASSIGNING <ls_ref_attrib>
    WHERE cpdname CP '*~*'.
    ls_ref_alias-cpdname = <ls_ref_attrib>-cpdname.
    ls_ref_alias-owner = <ls_ref_attrib>-owner.
    APPEND ls_ref_alias TO lt_ref_alias_tmp.
  ENDLOOP.
  ls_ref_alias-type = txt_method.
  LOOP AT it_ref_method ASSIGNING <ls_ref_method>
    WHERE cpdname CP '*~*'.
    ls_ref_alias-cpdname = <ls_ref_method>-cpdname.
    ls_ref_alias-owner = <ls_ref_method>-owner.
    APPEND ls_ref_alias TO lt_ref_alias_tmp.
  ENDLOOP.
  ls_ref_alias-type = txt_event.
  LOOP AT it_ref_event ASSIGNING <ls_ref_event>
    WHERE cpdname CP '*~*'.
    ls_ref_alias-cpdname = <ls_ref_event>-cpdname.
    ls_ref_alias-owner = <ls_ref_event>-owner.
    APPEND ls_ref_alias TO lt_ref_alias_tmp.
  ENDLOOP.
  ls_ref_alias-type = txt_type___1.
  LOOP AT it_ref_type ASSIGNING <ls_ref_type>
    WHERE cpdname CP '*~*'.
    ls_ref_alias-cpdname = <ls_ref_type>-cpdname.
    ls_ref_alias-owner = <ls_ref_type>-owner.
    APPEND ls_ref_alias TO lt_ref_alias_tmp.
  ENDLOOP.
*
  ls_clskey-clsname = i_clsname.
  CALL FUNCTION 'SEO_ALIASES_GET'
    EXPORTING
      cifkey  = ls_clskey
    CHANGING
      aliases = lt_seoalias.
  l_clsname = i_clsname.
  LOOP AT lt_ref_alias_tmp ASSIGNING <ls_ref_alias>
    WHERE cpdname CP '*~*'
    AND owner = i_clsname.
    SPLIT <ls_ref_alias>-cpdname AT '~'
      INTO l_clsname l_cmpname.
    READ TABLE lt_seoalias ASSIGNING <ls_alias>
      WITH KEY cmpname = l_cmpname.
    IF sy-subrc = 0.
      <ls_ref_alias>-refcmpname = <ls_alias>-cmpname.
      PERFORM get_dom_value_text
        USING
          'SEOEXPOSE'
          <ls_alias>-exposure
        CHANGING
          <ls_ref_alias>-exposure.
      IF NOT <ls_ref_alias>-refcmpname IS INITIAL
           AND <ls_alias>-exposure > 0.
        APPEND <ls_ref_alias> TO ct_ref_alias.
      ENDIF.
    ELSE.
      APPEND <ls_ref_alias> TO ct_ref_alias.
    ENDIF.
  ENDLOOP.
  SORT ct_ref_alias BY cpdname.
ENDFORM.                    "seo_clas_get_aliases


*-----------------------------------------------------------------------
* seo_clas_get_attribs_from_clas
*-----------------------------------------------------------------------
FORM seo_clas_get_attribs_from_clas
  USING
    value(i_clsname)
    it_super_class TYPE it_seo_super_class
  CHANGING
    ct_ref_attrib TYPE it_ref_seoattrib.

  DATA:
  lt_attrib TYPE STANDARD TABLE OF vseoattrib,
  l_cpdname TYPE seocpdname,
  ls_ref_attrib TYPE st_ref_seoattrib,
  l_str TYPE string,
  l_id TYPE string.

  FIELD-SYMBOLS:
  <ls_super_class> TYPE st_seo_super_class,
  <ls_attrib> TYPE vseoattrib,
  <ls_ref_attrib> TYPE st_ref_seoattrib.

  LOOP AT it_super_class ASSIGNING <ls_super_class>.
    SELECT * FROM vseoattrib INTO TABLE lt_attrib
      WHERE clsname = <ls_super_class>-clsname
      AND alias = abap_false
      AND langu = sy-langu
      AND version = '1'
      ORDER BY editorder.
    LOOP AT lt_attrib ASSIGNING <ls_attrib>.
      l_cpdname = <ls_attrib>-cmpname.
      READ TABLE ct_ref_attrib ASSIGNING <ls_ref_attrib>
        WITH KEY cpdname = l_cpdname.
      IF sy-subrc = 0.
        IF <ls_super_class>-clsname = i_clsname.
          <ls_ref_attrib>-inherited = abap_false.
        ENDIF.
      ELSEIF <ls_super_class>-clsname = i_clsname
      OR <ls_attrib>-exposure > 0.
        ls_ref_attrib-cpdname = l_cpdname.
        IF <ls_super_class>-clsname = i_clsname.
          ls_ref_attrib-inherited = abap_false.
        ELSE.
          ls_ref_attrib-inherited = abap_true.
        ENDIF.
        PERFORM get_dom_value_text
          USING
            'SEOEXPOSE'
            <ls_attrib>-exposure
          CHANGING
            ls_ref_attrib-exposure.
        PERFORM seo_get_check_model
          USING <ls_attrib>
          CHANGING ls_ref_attrib.
        PERFORM get_dom_value_text
          USING
            'SEOATTDECL'
            <ls_attrib>-attdecltyp
          CHANGING
            ls_ref_attrib-decltype.
        ls_ref_attrib-attrdonly = <ls_attrib>-attrdonly.
        PERFORM get_dom_value_text
          USING
            'SEOTYPTYPE'
            <ls_attrib>-typtype
          CHANGING
            ls_ref_attrib-typtype.
        ls_ref_attrib-type = <ls_attrib>-type.
        l_str = <ls_attrib>-exposure.
        CONDENSE l_str.
        CONCATENATE 'COMPONENTS_' l_str '_' INTO l_str.
        PERFORM get_id
          USING l_str <ls_super_class>-clsname
          CHANGING l_id.
        CONCATENATE 'switchContent(''' l_id ''')'
            INTO ls_ref_attrib-onclick.
        ls_ref_attrib-typelink = '->'.
        ls_ref_attrib-descript = <ls_attrib>-descript.
        ls_ref_attrib-attvalue = <ls_attrib>-attvalue.
        ls_ref_attrib-owner = <ls_super_class>-clsname.
        APPEND ls_ref_attrib TO ct_ref_attrib.
      ENDIF.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    "seo_clas_get_attribs_from_clas


*-----------------------------------------------------------------------
* seo_clas_get_attribs_from_intf
*-----------------------------------------------------------------------
FORM seo_clas_get_attribs_from_intf
  USING
    value(i_clsname)
    it_super_class TYPE it_seo_super_class
    it_ref_interface TYPE it_ref_seointerface
  CHANGING
    ct_ref_attrib TYPE it_ref_seoattrib.

  DATA:
  lt_attrib TYPE STANDARD TABLE OF vseoattrib,
  l_cpdname TYPE seocpdname,
  ls_ref_attrib TYPE st_ref_seoattrib,
  l_str TYPE string,
  l_id TYPE string.

  FIELD-SYMBOLS:
  <ls_super_class> TYPE st_seo_super_class,
  <ls_ref_interface> TYPE st_ref_seointerface,
  <ls_attrib> TYPE vseoattrib,
  <ls_ref_attrib> TYPE st_ref_seoattrib.

  LOOP AT it_super_class ASSIGNING <ls_super_class>.
    LOOP AT it_ref_interface ASSIGNING <ls_ref_interface>
      WHERE owner = <ls_super_class>-clsname.
      SELECT * FROM vseoattrib INTO TABLE lt_attrib
        WHERE clsname = <ls_ref_interface>-refclsname
        AND alias = abap_false
        AND langu = sy-langu
        AND version = '1'
        ORDER BY editorder.
      LOOP AT lt_attrib ASSIGNING <ls_attrib>.
        CONCATENATE
          <ls_attrib>-clsname '~' <ls_attrib>-cmpname
          INTO l_cpdname.
        READ TABLE ct_ref_attrib ASSIGNING <ls_ref_attrib>
          WITH KEY cpdname = l_cpdname.
        IF sy-subrc <> 0
        AND ( <ls_super_class>-clsname = i_clsname
        OR <ls_attrib>-exposure > 0 ).
          ls_ref_attrib-cpdname = l_cpdname.
          IF <ls_super_class>-clsname = i_clsname.
            ls_ref_attrib-inherited = abap_false.
          ELSE.
            ls_ref_attrib-inherited = abap_true.
          ENDIF.
          PERFORM get_dom_value_text
            USING
              'SEOEXPOSE'
              <ls_attrib>-exposure
            CHANGING
              ls_ref_attrib-exposure.
          PERFORM seo_get_check_model
            USING <ls_attrib>
            CHANGING ls_ref_attrib.
          PERFORM get_dom_value_text
            USING
              'SEOATTDECL'
              <ls_attrib>-attdecltyp
            CHANGING
              ls_ref_attrib-decltype.
          ls_ref_attrib-attrdonly = <ls_attrib>-attrdonly.
          PERFORM get_dom_value_text
            USING
              'SEOTYPTYPE'
              <ls_attrib>-typtype
            CHANGING
              ls_ref_attrib-typtype.
          ls_ref_attrib-type = <ls_attrib>-type.
          l_str = <ls_attrib>-exposure.
          CONDENSE l_str.
          CONCATENATE 'COMPONENTS_' l_str '_' INTO l_str.
          PERFORM get_id
            USING l_str <ls_super_class>-clsname
            CHANGING l_id.
          CONCATENATE 'switchContent(''' l_id ''')'
            INTO ls_ref_attrib-onclick.
          ls_ref_attrib-typelink = '->'.
          ls_ref_attrib-descript = <ls_attrib>-descript.
          ls_ref_attrib-attvalue = <ls_attrib>-attvalue.
          ls_ref_attrib-owner = <ls_super_class>-clsname.
          APPEND ls_ref_attrib TO ct_ref_attrib.
        ENDIF.
      ENDLOOP.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    "seo_clas_get_attribs_from_intf


*-----------------------------------------------------------------------
* seo_clas_get_events
*-----------------------------------------------------------------------
FORM seo_clas_get_events
  USING
    value(i_clsname)
    it_super_class TYPE it_seo_super_class
    it_ref_interface TYPE it_ref_seointerface
  CHANGING
    ct_ref_event TYPE it_ref_seoevent.

  REFRESH:
  ct_ref_event.

*Events - from Interfaces
  PERFORM seo_clas_get_events_from_intf
    USING
      i_clsname
      it_super_class
      it_ref_interface
    CHANGING
      ct_ref_event.
*Events - from Classes
  PERFORM seo_clas_get_events_from_clas
    USING
      i_clsname
      it_super_class
    CHANGING
      ct_ref_event.

ENDFORM.                    "seo_clas_get_events


*-----------------------------------------------------------------------
* seo_clas_get_events_from_clas
*-----------------------------------------------------------------------
FORM seo_clas_get_events_from_clas
  USING
    value(i_clsname)
    it_super_class TYPE it_seo_super_class
  CHANGING
    ct_ref_event TYPE it_ref_seoevent.

  DATA:
  lt_event TYPE STANDARD TABLE OF vseoevent,
  ls_ref_event TYPE st_ref_seoevent,
  ls_cmpkey TYPE seocmpkey.

  FIELD-SYMBOLS:
  <ls_super_class> TYPE st_seo_super_class,
  <ls_event> TYPE vseoevent.

  LOOP AT it_super_class ASSIGNING <ls_super_class>.
    SELECT * FROM vseoevent INTO TABLE lt_event
      WHERE clsname = <ls_super_class>-clsname
      AND langu = sy-langu
      AND alias = abap_false
      AND version = '1'
      ORDER BY editorder.
    LOOP AT lt_event ASSIGNING <ls_event>.
      CLEAR ls_ref_event.
      ls_cmpkey-clsname = <ls_super_class>-clsname.
      ls_cmpkey-cmpname = <ls_event>-cmpname.
      CALL FUNCTION 'SEO_EVENT_GET'
        EXPORTING
          evtkey  = ls_cmpkey
          version = 1
        IMPORTING
          event   = <ls_event>
        EXCEPTIONS
          OTHERS  = 1.
      IF sy-subrc = 0 AND <ls_event>-alias = abap_false.
        ls_ref_event-owner = <ls_super_class>-clsname.
        IF <ls_super_class>-clsname <> i_clsname.
          ls_ref_event-inherited = abap_true.
        ENDIF.
        ls_ref_event-cpdname = <ls_event>-cmpname.
        PERFORM get_dom_value_text
          USING
            'SEOEVTDECL'
            <ls_event>-evtdecltyp
          CHANGING
            ls_ref_event-type.
        PERFORM get_dom_value_text
          USING
            'SEOEXPOSE'
            <ls_event>-exposure
          CHANGING
            ls_ref_event-exposure.
        PERFORM seo_get_check_model
          USING <ls_event>
          CHANGING ls_ref_event.
        ls_ref_event-descript = <ls_event>-descript.
        APPEND ls_ref_event TO ct_ref_event.
      ENDIF.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    "seo_clas_get_events_from_clas


*-----------------------------------------------------------------------
* seo_clas_get_events_from_intf
*-----------------------------------------------------------------------
FORM seo_clas_get_events_from_intf
  USING
    value(i_clsname)
    it_super_class TYPE it_seo_super_class
    it_ref_interface TYPE it_ref_seointerface
  CHANGING
    ct_ref_event TYPE it_ref_seoevent.

  DATA:
  lt_event TYPE STANDARD TABLE OF vseoevent,
  ls_ref_event TYPE st_ref_seoevent,
  ls_cmpkey TYPE seocmpkey.

  FIELD-SYMBOLS:
  <ls_super_class> TYPE st_seo_super_class,
  <ls_ref_interface> TYPE st_ref_seointerface,
  <ls_event> TYPE vseoevent.

  LOOP AT it_super_class ASSIGNING <ls_super_class>.
    LOOP AT it_ref_interface ASSIGNING <ls_ref_interface>
      WHERE owner = <ls_super_class>-clsname.
      SELECT * FROM vseoevent INTO TABLE lt_event
        WHERE clsname = <ls_ref_interface>-refclsname
        AND langu = sy-langu
        AND alias = abap_false
        AND version = '1'
        ORDER BY editorder.
      LOOP AT lt_event ASSIGNING <ls_event>.
        CLEAR ls_ref_event.
        ls_cmpkey-clsname = <ls_ref_interface>-refclsname.
        IF <ls_super_class>-clsname <> i_clsname.
          ls_ref_event-inherited = abap_true.
        ENDIF.
        ls_cmpkey-cmpname = <ls_event>-cmpname.
        CALL FUNCTION 'SEO_EVENT_GET'
          EXPORTING
            evtkey  = ls_cmpkey
            version = 1
          IMPORTING
            event   = <ls_event>
          EXCEPTIONS
            OTHERS  = 1.
        IF sy-subrc = 0 AND <ls_event>-alias = abap_false.
          ls_ref_event-owner = <ls_super_class>-clsname.
          CONCATENATE <ls_ref_interface>-refclsname '~'
              <ls_event>-cmpname INTO ls_ref_event-cpdname.
          PERFORM get_dom_value_text
            USING
              'SEOEVTDECL'
              <ls_event>-evtdecltyp
            CHANGING
              ls_ref_event-type.
          PERFORM get_dom_value_text
            USING
              'SEOEXPOSE'
              <ls_event>-exposure
            CHANGING
              ls_ref_event-exposure.
          PERFORM seo_get_check_model
            USING <ls_event>
            CHANGING ls_ref_event.
          ls_ref_event-descript = <ls_event>-descript.
          APPEND ls_ref_event TO ct_ref_event.
        ENDIF.
      ENDLOOP.
    ENDLOOP.
  ENDLOOP.

ENDFORM.                    "seo_clas_get_events_from_intf


*-----------------------------------------------------------------------
* seo_clas_get_friends
*-----------------------------------------------------------------------
FORM seo_clas_get_friends
  USING
    value(i_clsname)
  CHANGING
    ct_ref_friends TYPE it_ref_seofriends.

  DATA:
  lt_friends TYPE STANDARD TABLE OF seofriends,
  ls_ref_friends TYPE st_ref_seofriends.

  FIELD-SYMBOLS:
  <ls_friends> TYPE seofriends.

  REFRESH:
  ct_ref_friends.

  SELECT * FROM seofriends INTO TABLE lt_friends
    WHERE clsname = i_clsname
    AND version = '1'
    ORDER BY refclsname.
  LOOP AT lt_friends ASSIGNING <ls_friends>.
    CLEAR ls_ref_friends.
    READ TABLE ct_ref_friends TRANSPORTING NO FIELDS
      WITH KEY refclsname = <ls_friends>-refclsname.
    IF sy-subrc <> 0.
      ls_ref_friends-refclsname = <ls_friends>-refclsname.
      PERFORM seo_get_check_model
        USING <ls_friends>
        CHANGING ls_ref_friends.
      SELECT SINGLE descript FROM seoclasstx
        INTO ls_ref_friends-descript
        WHERE clsname = <ls_friends>-refclsname
        AND langu = sy-langu.
      APPEND ls_ref_friends TO ct_ref_friends.
    ENDIF.
  ENDLOOP.
ENDFORM.                    "seo_clas_get_friends


*-----------------------------------------------------------------------
* seo_clas_get_interfaces
*-----------------------------------------------------------------------
FORM seo_clas_get_interfaces
  USING
    value(i_clsname)
    it_super_class TYPE it_seo_super_class
  CHANGING
    ct_ref_interface TYPE it_ref_seointerface
    ct_ref_interface_all TYPE it_ref_seointerface.

  DATA:
  lt_ref_interface_tmp TYPE it_ref_seointerface,
  lt_ref_interface_all_tmp TYPE it_ref_seointerface.

  FIELD-SYMBOLS:
  <ls_super_class> TYPE st_seo_super_class,
  <ls_ref_interface> TYPE st_ref_seointerface.

  REFRESH:
  ct_ref_interface,
  ct_ref_interface_all.

  LOOP AT it_super_class ASSIGNING <ls_super_class>.
    REFRESH lt_ref_interface_tmp.
    PERFORM seo_get_interfaces
      USING
        <ls_super_class>-clsname
        0
      CHANGING
        lt_ref_interface_tmp
        lt_ref_interface_all_tmp.
    LOOP AT lt_ref_interface_tmp ASSIGNING <ls_ref_interface>.
      <ls_ref_interface>-owner = <ls_super_class>.
      IF <ls_super_class>-clsname <> i_clsname.
        <ls_ref_interface>-inherited = abap_true.
      ENDIF.
      APPEND <ls_ref_interface> TO ct_ref_interface.
    ENDLOOP.
    LOOP AT lt_ref_interface_all_tmp
        ASSIGNING <ls_ref_interface>.
      <ls_ref_interface>-owner = <ls_super_class>.
      IF <ls_super_class>-clsname <> i_clsname.
        <ls_ref_interface>-inherited = abap_true.
      ENDIF.
      APPEND <ls_ref_interface> TO ct_ref_interface_all.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    "seo_clas_get_interfaces


*-----------------------------------------------------------------------
* seo_clas_get_methods
*-----------------------------------------------------------------------
FORM seo_clas_get_methods
  USING
    is_ztadir TYPE st_ztadir
    it_super_class TYPE it_seo_super_class
    it_ref_interface TYPE it_ref_seointerface
  CHANGING
    ct_ref_method TYPE it_ref_seomethod.

  DATA:
  ls_zseomethod TYPE st_zseomethod,
  l_cpdname TYPE seocpdname.

  FIELD-SYMBOLS:
  <ls_ref_method> TYPE st_ref_seomethod.

  REFRESH:
  ct_ref_method.

*Methods - from Interfaces
  PERFORM seo_clas_get_methods_from_intf
    USING
      is_ztadir-obj_name
      it_super_class
      it_ref_interface
    CHANGING
      ct_ref_method.
*Methods - from Classes
  PERFORM seo_clas_get_methods_from_clas
    USING
      is_ztadir-obj_name
      it_super_class
    CHANGING
      ct_ref_method.
*Methods - check redefinitions
  PERFORM seo_clas_get_methods_redef
    USING
      is_ztadir-obj_name
      it_super_class
    CHANGING
      ct_ref_method.
*  select mtdname from seoredef into l_cpdname
*    where clsname = is_ztadir-obj_name
*    and version = '1'.
*    read table ct_ref_method assigning <ls_ref_method>
*      with key cpdname = l_cpdname.
*    if sy-subrc = 0.
*      <ls_ref_method>-inherited = abap_false.
*      <ls_ref_method>-redefin = abap_true.
*    endif.
*  endselect.
*Methods - add to global methods' table
  LOOP AT ct_ref_method ASSIGNING <ls_ref_method>.
    READ TABLE gt_zseomethod TRANSPORTING NO FIELDS
      WITH KEY devclass = is_ztadir-devclass
      pgmid = is_ztadir-pgmid
      object = is_ztadir-object
      clsname = <ls_ref_method>-owner
      cpdname = <ls_ref_method>-cpdname.
    IF sy-subrc <> 0.
      CLEAR ls_zseomethod.
      ls_zseomethod-pgmid = is_ztadir-pgmid.
      ls_zseomethod-object = is_ztadir-object.
      ls_zseomethod-devclass = is_ztadir-devclass.
      ls_zseomethod-clsname = <ls_ref_method>-owner.
      ls_zseomethod-cpdname = <ls_ref_method>-cpdname.
      ls_zseomethod-active = <ls_ref_method>-active.
      APPEND ls_zseomethod TO gt_zseomethod.
    ENDIF.
  ENDLOOP.
ENDFORM.                    "seo_clas_get_methods


*-----------------------------------------------------------------------
* seo_clas_get_methods_from_clas
*-----------------------------------------------------------------------
FORM seo_clas_get_methods_from_clas
  USING
    value(i_clsname)
    it_super_class TYPE it_seo_super_class
  CHANGING
    ct_ref_method TYPE it_ref_seomethod.

  DATA:
  lt_method TYPE STANDARD TABLE OF vseomethod,
  l_cpdname TYPE seocpdname,
  ls_ref_method TYPE st_ref_seomethod,
  lt_str TYPE it_string,
  lt_redef TYPE STANDARD TABLE OF seoredef.

  FIELD-SYMBOLS:
  <ls_super_class> TYPE st_seo_super_class,
  <ls_method> TYPE vseomethod,
  <ls_ref_method> TYPE st_ref_seomethod,
  <ls_redef> TYPE seoredef.

  LOOP AT it_super_class ASSIGNING <ls_super_class>.
    SELECT * FROM vseomethod INTO TABLE lt_method
      WHERE clsname = <ls_super_class>-clsname
      AND langu = sy-langu
      AND alias = abap_false
      AND version = '1'
      ORDER BY editorder.
    IF <ls_super_class>-clsname <> i_clsname.
      DELETE lt_method WHERE cmpname = 'CLASS_CONSTRUCTOR'
      OR cmpname = 'DESTRUCTOR'.
    ENDIF.
    LOOP AT lt_method ASSIGNING <ls_method>.
      l_cpdname = <ls_method>-cmpname.
      READ TABLE ct_ref_method ASSIGNING <ls_ref_method>
        WITH KEY cpdname = l_cpdname.
      IF sy-subrc = 0
      AND l_cpdname <> 'CONSTRUCTOR'.
        IF <ls_super_class>-clsname = i_clsname.
          <ls_ref_method>-inherited = abap_false.
          UNASSIGN <ls_ref_method>.
        ENDIF.
      ELSEIF <ls_super_class>-clsname = i_clsname
      OR <ls_method>-exposure > 0.
        CLEAR ls_ref_method.
        ls_ref_method-cpdname = l_cpdname.
        IF <ls_super_class>-clsname <> i_clsname.
          ls_ref_method-inherited = abap_true.
        ENDIF.
        PERFORM get_dom_value_text
          USING
            'SEOVERSION'
            <ls_method>-version
          CHANGING
            ls_ref_method-active.
        PERFORM get_dom_value_text
          USING
            'SEOMTDDECL'
            <ls_method>-mtddecltyp
          CHANGING
            ls_ref_method-type.
        PERFORM get_dom_value_text
          USING
            'SEOEXPOSE'
            <ls_method>-exposure
          CHANGING
            ls_ref_method-exposure.
        PERFORM seo_get_check_model
          USING <ls_method>
          CHANGING ls_ref_method.
        PERFORM get_dom_value_text
          USING
            'SEOMTDTYPE'
            <ls_method>-mtdtype
          CHANGING
            ls_ref_method-methodtype.
        ls_ref_method-descript = <ls_method>-descript.
        ls_ref_method-owner = <ls_super_class>-clsname.
        CONCATENATE
          ls_ref_method-owner '-'
          ls_ref_method-cpdname
          INTO ls_ref_method-onclick.
        SPLIT ls_ref_method-onclick AT '/' INTO TABLE lt_str.
        LOOP AT lt_str INTO ls_ref_method-onclick.
        ENDLOOP.
        CONCATENATE
          'loadIFrame(''IFRAME'', '''
          ls_ref_method-onclick '.'
          gc_extension_htm ''');'
          'switchContent(''IFRAME'
            ''')'
          INTO ls_ref_method-onclick.
        PERFORM replace_all
          USING '~' '-'
          CHANGING ls_ref_method-onclick.
        IF l_cpdname = 'CONSTRUCTOR'
        AND <ls_ref_method> IS ASSIGNED.
          DELETE ct_ref_method
            WHERE owner = <ls_ref_method>-owner
            AND cpdname = <ls_ref_method>-cpdname.
        ENDIF.
        APPEND ls_ref_method TO ct_ref_method.
      ENDIF.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    "seo_clas_get_methods_from_clas


*-----------------------------------------------------------------------
* seo_clas_get_methods_from_intf
*-----------------------------------------------------------------------
FORM seo_clas_get_methods_from_intf
  USING
    value(i_clsname)
    it_super_class TYPE it_seo_super_class
    it_ref_interface TYPE it_ref_seointerface
  CHANGING
    ct_ref_method TYPE it_ref_seomethod.

  DATA:
  lt_method TYPE STANDARD TABLE OF vseomethod,
  l_cpdname TYPE seocpdname,
  ls_ref_method TYPE st_ref_seomethod,
  lt_str TYPE it_string.

  FIELD-SYMBOLS:
  <ls_super_class> TYPE st_seo_super_class,
  <ls_ref_interface> TYPE st_ref_seointerface,
  <ls_method> TYPE vseomethod,
  <ls_ref_method> TYPE st_ref_seomethod.

  LOOP AT it_super_class ASSIGNING <ls_super_class>.
    LOOP AT it_ref_interface ASSIGNING <ls_ref_interface>
      WHERE owner = <ls_super_class>-clsname.
      SELECT * FROM vseomethod INTO TABLE lt_method
        WHERE clsname = <ls_ref_interface>-refclsname
        AND langu = sy-langu
        AND alias = abap_false
        AND version = '1'
        ORDER BY editorder.
      LOOP AT lt_method ASSIGNING <ls_method>.
        CONCATENATE
          <ls_ref_interface>-refclsname '~'
          <ls_method>-cmpname
          INTO l_cpdname.
        READ TABLE ct_ref_method ASSIGNING <ls_ref_method>
          WITH KEY cpdname = l_cpdname.
        IF sy-subrc <> 0
        AND ( <ls_super_class>-clsname = i_clsname
              OR <ls_method>-exposure > 0 ).
          CLEAR ls_ref_method.
          ls_ref_method-cpdname = l_cpdname.
          IF <ls_super_class>-clsname <> i_clsname.
            ls_ref_method-inherited = abap_true.
          ENDIF.
          PERFORM get_dom_value_text
            USING
              'SEOVERSION'
              <ls_method>-version
            CHANGING
              ls_ref_method-active.
          PERFORM get_dom_value_text
            USING
              'SEOMTDDECL'
              <ls_method>-mtddecltyp
            CHANGING
              ls_ref_method-type.
          PERFORM get_dom_value_text
            USING
              'SEOEXPOSE'
              <ls_method>-exposure
            CHANGING
              ls_ref_method-exposure.
          PERFORM seo_get_check_model
            USING <ls_method>
            CHANGING ls_ref_method.
          PERFORM get_dom_value_text
            USING
              'SEOMTDTYPE'
              <ls_method>-mtdtype
            CHANGING
              ls_ref_method-methodtype.
          ls_ref_method-descript = <ls_method>-descript.
          ls_ref_method-owner = <ls_super_class>-clsname.
          ls_ref_method-onclick = ls_ref_method-owner.
          SPLIT ls_ref_method-onclick AT '/' INTO TABLE lt_str.
          LOOP AT lt_str INTO ls_ref_method-onclick.
          ENDLOOP.
          CONCATENATE
            ls_ref_method-onclick '-'
            ls_ref_method-cpdname
            INTO ls_ref_method-onclick.
          CONCATENATE
            'loadIFrame(''IFRAME'', '''
            ls_ref_method-onclick '.'
            gc_extension_htm ''');'
            'switchContent(''IFRAME'')'
            INTO ls_ref_method-onclick.
          PERFORM replace_all
            USING '~' '-'
            CHANGING ls_ref_method-onclick.
          APPEND ls_ref_method TO ct_ref_method.
        ENDIF.
      ENDLOOP.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    "seo_clas_get_methods_from_intf


*-----------------------------------------------------------------------
* seo_clas_get_methods_redef
*-----------------------------------------------------------------------
FORM seo_clas_get_methods_redef
  USING
    value(i_clsname)
    it_super_class TYPE it_seo_super_class
  CHANGING
    ct_ref_method TYPE it_ref_seomethod.

  DATA:
  lt_str TYPE it_string,
  lt_redef TYPE STANDARD TABLE OF seoredef.

  FIELD-SYMBOLS:
  <ls_super_class> TYPE st_seo_super_class,
  <ls_ref_method> TYPE st_ref_seomethod,
  <ls_redef> TYPE seoredef.

  LOOP AT it_super_class ASSIGNING <ls_super_class>.
    SELECT * FROM seoredef INTO TABLE lt_redef
      WHERE clsname = <ls_super_class>-clsname
      AND version = '1'.
    LOOP AT lt_redef ASSIGNING <ls_redef>.
      READ TABLE ct_ref_method ASSIGNING <ls_ref_method>
        WITH KEY cpdname = <ls_redef>-mtdname.
      IF sy-subrc = 0.
        IF <ls_super_class>-clsname = i_clsname.
          <ls_ref_method>-inherited = abap_false.
          <ls_ref_method>-redefin = abap_true.
        ENDIF.
        <ls_ref_method>-owner = <ls_redef>-clsname.
        CONCATENATE
          <ls_ref_method>-owner '-'
          <ls_ref_method>-cpdname
          INTO <ls_ref_method>-onclick.
        SPLIT <ls_ref_method>-onclick AT '/' INTO TABLE lt_str.
        LOOP AT lt_str INTO <ls_ref_method>-onclick.
        ENDLOOP.
        CONCATENATE
          'loadIFrame(''IFRAME'', '''
          <ls_ref_method>-onclick '.'
          gc_extension_htm ''');'
          'switchContent(''IFRAME'')'
          INTO <ls_ref_method>-onclick.
        PERFORM replace_all
          USING '~' '-'
          CHANGING <ls_ref_method>-onclick.
      ENDIF.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    "seo_clas_get_methods_redef


*-----------------------------------------------------------------------
* seo_clas_get_props
*-----------------------------------------------------------------------
FORM seo_clas_get_props
  USING
    value(i_clsname)
    value(i_devclass)
  CHANGING
    cs_properties TYPE st_properties
    ct_ti TYPE it_textinput
    ct_typegroup TYPE it_seotypepls.

  DATA:
  ls_clskey TYPE seoclskey,
  ls_extend TYPE vseoextend,
  lt_redefinition TYPE STANDARD TABLE OF seoredef
    WITH KEY clsname refclsname version mtdname,
  ls_relkey TYPE seorelkey,
  ls_vseoclass TYPE vseoclass,
  lt_typegroup TYPE it_seotypepls.

  FIELD-SYMBOLS:
  <ls_typegroup> TYPE seotypepls,
  <l_explicit> TYPE ANY,
  <l_state> TYPE ANY.

  CLEAR:
  cs_properties.

  REFRESH:
  ct_typegroup.

  ls_clskey-clsname = i_clsname.
  CALL FUNCTION 'SEO_CLASS_READ'
    EXPORTING
      clskey  = ls_clskey
      version = '1'
    IMPORTING
      class   = ls_vseoclass.
  IF ls_vseoclass-changedby IS INITIAL
  AND ls_vseoclass-changedon IS INITIAL.
    ls_vseoclass-changedby = ls_vseoclass-author.
    ls_vseoclass-changedon = ls_vseoclass-createdon.
  ENDIF.
  SELECT * FROM seotypepls INTO TABLE lt_typegroup
      WHERE clsname = ls_clskey-clsname
      AND version = '1'
      ORDER BY typegroup.
  LOOP AT lt_typegroup ASSIGNING <ls_typegroup>.
    ASSIGN COMPONENT 'EXPLICIT' OF STRUCTURE <ls_typegroup>
      TO <l_explicit>.
    IF <l_explicit> IS ASSIGNED AND <l_explicit> = abap_true.
      APPEND <ls_typegroup> TO ct_typegroup.
    ENDIF.
  ENDLOOP.
  ls_relkey-clsname = i_clsname.
  CALL FUNCTION 'SEO_INHERITANC_GET'
    EXPORTING
      inhkey        = ls_relkey
      version       = '1'
    IMPORTING
      inheritance   = ls_extend
      redefinitions = lt_redefinition
    EXCEPTIONS
      OTHERS        = 1.
  cs_properties-superclass = ls_extend-refclsname.
  ASSIGN COMPONENT 'STATE' OF STRUCTURE ls_extend TO <l_state>.
  IF <l_state> IS ASSIGNED.
    IF <l_state> = 0.
      cs_properties-check_model_inh = abap_true.
    ENDIF.
  ELSE.
    cs_properties-check_model_inh = abap_undefined.
  ENDIF.
  cs_properties-descript = ls_vseoclass-descript.
  IF ls_vseoclass-clsabstrct = abap_true.
    ls_vseoclass-exposure = 3.
  ENDIF.
  PERFORM get_dom_value_text USING    'SEOCREATE'
                                      ls_vseoclass-exposure
                             CHANGING cs_properties-creatable.
  cs_properties-clsfinal = ls_vseoclass-clsfinal.
  IF ls_vseoclass-langu IS INITIAL.
    SELECT SINGLE masterlang FROM tadir INTO ls_vseoclass-langu
        WHERE pgmid = 'R3TR'
        AND object = 'CLAS'
        AND obj_name = i_clsname.
  ENDIF.

  PERFORM seo_clas_get_props_textinput
    USING
      i_clsname
      i_devclass
      ls_vseoclass
    CHANGING
      ct_ti.
ENDFORM.                    "seo_clas_get_props


*-----------------------------------------------------------------------
* seo_clas_get_props_textInput
*-----------------------------------------------------------------------
FORM seo_clas_get_props_textinput
  USING
    value(i_clsname)
    value(i_devclass)
    is_vseoclass TYPE vseoclass
  CHANGING
    ct_ti TYPE it_textinput.

  DATA:
  l_namtext TYPE ad_namtext,
  ls_ti TYPE st_textinput.

  FIELD-SYMBOLS:
  <l_clssharedmemory> TYPE ANY,
  <l_msg_id> TYPE ANY,
  <l_unicode> TYPE ANY.

  REFRESH:
  ct_ti.

  ls_ti-name = txt_released_internally.
  ls_ti-flag = abap_true.
  IF NOT is_vseoclass-release IS INITIAL.
    ls_ti-value = abap_true.
  ENDIF.
  APPEND ls_ti TO ct_ti.
  CLEAR ls_ti.
  ls_ti-name = txt_fixed_point_arithmetic.
  ls_ti-flag = abap_true.
  ls_ti-flag_col = 1.
  ls_ti-value = is_vseoclass-fixpt.
  APPEND ls_ti TO ct_ti.
  ASSIGN COMPONENT 'UNICODE' OF STRUCTURE is_vseoclass TO <l_unicode>.
  IF <l_unicode> IS ASSIGNED.
    CLEAR ls_ti.
    ls_ti-name = txtt_unicode_checks_active.
    ls_ti-flag = abap_true.
    ls_ti-flag_col = 2.
    ls_ti-value = is_vseoclass-unicode.
    APPEND ls_ti TO ct_ti.
  ENDIF.
  ASSIGN COMPONENT 'CLSSHAREDMEMORY' OF STRUCTURE is_vseoclass
    TO <l_clssharedmemory>.
  IF <l_clssharedmemory> IS ASSIGNED.
    CLEAR ls_ti.
    ls_ti-name = txt_shared_memory_enabled.
    ls_ti-flag = abap_true.
    ls_ti-value = <l_clssharedmemory>.
    APPEND ls_ti TO ct_ti.
  ENDIF.
  ASSIGN COMPONENT 'MSG_ID' OF STRUCTURE is_vseoclass TO <l_msg_id>.
  IF <l_msg_id> IS ASSIGNED.
    CLEAR ls_ti.
    ls_ti-name = txt_message_class.
    ls_ti-value = <l_msg_id>.
    ls_ti-input = abap_true.
    APPEND ls_ti TO ct_ti.
  ENDIF.
  CLEAR ls_ti.
  ls_ti-name = txt_program_status.
  PERFORM get_dom_value_text USING    'RSTAT'
                                      is_vseoclass-rstat
                             CHANGING ls_ti-value.
  ls_ti-input = abap_true.
  APPEND ls_ti TO ct_ti.
  CLEAR ls_ti.
  ls_ti-name = txt_category.
  PERFORM get_dom_value_text USING    'SEOCATEGRY'
                                      is_vseoclass-category
                             CHANGING ls_ti-value.
  ls_ti-input = abap_true.
  APPEND ls_ti TO ct_ti.
  CLEAR ls_ti.
  ls_ti-name = txt_package.
  ls_ti-value = i_devclass.
  ls_ti-input = abap_true.
  APPEND ls_ti TO ct_ti.
  CLEAR ls_ti.
  ls_ti-name = txt_original_language.
  ls_ti-value = is_vseoclass-langu.
  ls_ti-input = abap_true.
  APPEND ls_ti TO ct_ti.
  CLEAR ls_ti.
  ls_ti-name = txt_created_by___1.
  ls_ti-value = is_vseoclass-author.
  PERFORM get_user USING    is_vseoclass-author
                   CHANGING l_namtext.
  ls_ti-value_text = l_namtext.
  ls_ti-has_value_ext = abap_true.
  PERFORM get_date USING    is_vseoclass-createdon
                   CHANGING ls_ti-value_ext.
  ls_ti-input = abap_true.
  APPEND ls_ti TO ct_ti.
  CLEAR ls_ti.
  ls_ti-name = txt_last_changed_by___1.
  ls_ti-value = is_vseoclass-changedby.
  PERFORM get_user USING    is_vseoclass-changedby
                   CHANGING l_namtext.
  ls_ti-value_text = l_namtext.
  ls_ti-has_value_ext = abap_true.
  PERFORM get_date USING    is_vseoclass-changedon
                   CHANGING ls_ti-value_ext.
  ls_ti-input = abap_true.
  APPEND ls_ti TO ct_ti.
ENDFORM.                    "seo_clas_get_props_textInput


*-----------------------------------------------------------------------
* seo_clas_get_text_symbols
*-----------------------------------------------------------------------
FORM seo_clas_get_text_symbols
  USING
    value(i_clsname)
  CHANGING
    ct_text_symbols TYPE it_textpool
    ct_text_symbols_addons TYPE it_textpool_addons.

  DATA:
  l_clsname TYPE seoclsname,
  l_progname TYPE progname,
  ls_text_symbols_addons TYPE st_textpool_addons.

  FIELD-SYMBOLS:
  <ls_text_symbols> TYPE textpool.

  REFRESH:
  ct_text_symbols,
  ct_text_symbols_addons.

  l_clsname = i_clsname.
  PERFORM get_trdir_name
    USING l_clsname 'CP'
    CHANGING l_progname.
  READ TEXTPOOL l_progname INTO ct_text_symbols LANGUAGE sy-langu.
  DELETE ct_text_symbols WHERE id <> 'I'.

  LOOP AT ct_text_symbols ASSIGNING <ls_text_symbols>.
    ls_text_symbols_addons-strlen = strlen(
      <ls_text_symbols>-entry
    ).
    APPEND ls_text_symbols_addons TO ct_text_symbols_addons.
  ENDLOOP.
ENDFORM.                    "seo_clas_get_text_symbols


*-----------------------------------------------------------------------
* seo_clas_get_types
*-----------------------------------------------------------------------
FORM seo_clas_get_types
  USING
    value(i_clsname)
    it_super_class TYPE it_seo_super_class
  CHANGING
    ct_ref_type TYPE it_ref_seotype
    ct_ref_type_par TYPE it_ref_seotype.

  DATA:
  lt_seotype TYPE STANDARD TABLE OF vseotype,
  ls_ref_type TYPE st_ref_seotype,
  l_str TYPE string,
  l_id TYPE string.

  FIELD-SYMBOLS:
  <ls_super_class> TYPE st_seo_super_class,
  <ls_seotype> TYPE vseotype.

  REFRESH:
  ct_ref_type,
  ct_ref_type_par.

  LOOP AT it_super_class ASSIGNING <ls_super_class>.
    SELECT * FROM vseotype INTO TABLE lt_seotype
      WHERE clsname = <ls_super_class>-clsname
      AND langu = sy-langu
      AND version = '1'
      ORDER BY editorder.
    LOOP AT lt_seotype ASSIGNING <ls_seotype>.
      CLEAR ls_ref_type.
      ls_ref_type-cpdname = <ls_seotype>-cmpname.
      ls_ref_type-owner = <ls_super_class>-clsname.
      IF <ls_super_class>-clsname <> i_clsname.
        ls_ref_type-inherited = abap_true.
      ENDIF.
      PERFORM get_dom_value_text
        USING
          'SEOTYPTYPE'
          <ls_seotype>-typtype
        CHANGING
          ls_ref_type-typtype.
      ls_ref_type-type = <ls_seotype>-type.
      l_str = <ls_seotype>-exposure.
      CONDENSE l_str.
      CONCATENATE 'COMPONENTS_' l_str '_' INTO l_str.
      PERFORM get_id
        USING l_str <ls_super_class>-clsname
        CHANGING l_id.
      CONCATENATE 'switchContent(''' l_id ''')'
        INTO ls_ref_type-onclick.
      ls_ref_type-typelink = '->'.
      ls_ref_type-descript = <ls_seotype>-descript.
      PERFORM get_dom_value_text
        USING
          'SEOEXPOSE'
          <ls_seotype>-exposure
        CHANGING
          ls_ref_type-exposure.
      PERFORM seo_get_check_model
        USING <ls_seotype>
        CHANGING ls_ref_type.
      APPEND ls_ref_type TO ct_ref_type_par.
      IF <ls_super_class>-clsname = i_clsname
      OR <ls_seotype>-exposure <> 0.
        APPEND ls_ref_type TO ct_ref_type.
      ENDIF.
    ENDLOOP.
  ENDLOOP.


ENDFORM.                    "seo_clas_get_types


*-----------------------------------------------------------------------
* seo_get_check_model
*-----------------------------------------------------------------------
FORM seo_get_check_model
  USING
    value(is_struc) TYPE any
  CHANGING
    cs_struc TYPE any.

  FIELD-SYMBOLS:
  <l_state> TYPE ANY,
  <l_check_model> TYPE ANY.

  ASSIGN COMPONENT 'STATE' OF STRUCTURE is_struc TO <l_state>.
  ASSIGN COMPONENT 'CHECK_MODEL' OF STRUCTURE cs_struc
    TO <l_check_model>.
  CHECK <l_check_model> IS ASSIGNED.
  IF <l_state> IS ASSIGNED.
    IF <l_state> = 0.
      <l_check_model> = abap_true.
    ELSE.
      <l_check_model> = abap_false.
    ENDIF.
  ELSE.
    <l_check_model> = abap_undefined.
  ENDIF.

ENDFORM.                    "seo_get_check_model


*-----------------------------------------------------------------------
* seo_get_interfaces
*-----------------------------------------------------------------------
FORM seo_get_interfaces
  USING
    value(i_clsname)
    value(i_hierlevel)
  CHANGING
    ct_ref_interface TYPE it_ref_seointerface
    ct_ref_interface_all TYPE it_ref_seointerface.

  DATA:
  l_hierlevel TYPE i,
  lt_metarel TYPE STANDARD TABLE OF seometarel,
  lt_ref_interface TYPE it_ref_seointerface,
  ls_ref_interface TYPE st_ref_seointerface.

  FIELD-SYMBOLS:
  <ls_metarel> TYPE seometarel,
  <ls_ref_interface> TYPE st_ref_seointerface,
  <l_impfinal> TYPE ANY,
  <l_impabstrct> TYPE ANY.

  l_hierlevel = i_hierlevel + 1.

  SELECT * FROM seometarel INTO TABLE lt_metarel
    WHERE clsname = i_clsname
    AND reltype <= 1.
  CLEAR ls_ref_interface.
  LOOP AT lt_metarel ASSIGNING <ls_metarel>.
    READ TABLE ct_ref_interface_all TRANSPORTING NO FIELDS
      WITH KEY refclsname = <ls_metarel>-refclsname.
    IF sy-subrc <> 0.
      ls_ref_interface-refclsname = <ls_metarel>-refclsname.
      ASSIGN COMPONENT 'IMPFINAL' OF STRUCTURE <ls_metarel>
        TO <l_impfinal>.
      IF <l_impfinal> IS ASSIGNED.
        ls_ref_interface-impfinal = <l_impfinal>.
        UNASSIGN <l_impfinal>.
      ELSE.
        ls_ref_interface-impfinal = abap_undefined.
      ENDIF.
      ASSIGN COMPONENT 'IMPABSTRCT' OF STRUCTURE <ls_metarel>
        TO <l_impabstrct>.
      IF <l_impabstrct> IS ASSIGNED.
        ls_ref_interface-impabstrct = <l_impabstrct>.
        UNASSIGN <l_impabstrct>.
      ELSE.
        ls_ref_interface-impabstrct = abap_undefined.
      ENDIF.
      PERFORM seo_get_check_model
        USING <ls_metarel>
        CHANGING ls_ref_interface.
      SELECT SINGLE descript FROM seoclasstx
        INTO ls_ref_interface-descript
        WHERE clsname = ls_ref_interface-refclsname
        AND langu = sy-langu.

      APPEND ls_ref_interface TO ct_ref_interface.
      APPEND ls_ref_interface TO ct_ref_interface_all.

      PERFORM seo_get_interfaces
        USING
          <ls_metarel>-refclsname
          l_hierlevel
        CHANGING
          lt_ref_interface
          ct_ref_interface_all.
    ENDIF.
  ENDLOOP.
  SORT ct_ref_interface_all BY
    hierlevel DESCENDING
    refclsname ASCENDING.
  SORT ct_ref_interface BY refclsname.
ENDFORM.                    "seo_get_interfaces


*-----------------------------------------------------------------------
* seo_get_superClasses
*-----------------------------------------------------------------------
FORM seo_get_superclasses
  USING
    value(i_clsname)
  CHANGING
    ct_super_class TYPE it_seo_super_class.

  DATA:
  ls_clskey TYPE seoclskey,
  ls_clsref TYPE seoclsref,
  ls_super_class TYPE st_seo_super_class,
  l_lines TYPE i.

  FIELD-SYMBOLS:
  <l_class> TYPE seoclsname.

  DESCRIBE TABLE ct_super_class LINES l_lines.
  ls_super_class-clsname = i_clsname.
  ls_super_class-hierlevel = l_lines + 1.
  APPEND ls_super_class TO ct_super_class.

  ls_clskey-clsname = i_clsname.
  CALL FUNCTION 'SEO_CLASS_GET'
    EXPORTING
      clskey     = ls_clskey
      version    = '1'
      state      = '0'
    IMPORTING
      superclass = ls_clsref
    EXCEPTIONS
      OTHERS     = 1.
  IF sy-subrc = 0 AND NOT ls_clsref-refclsname IS INITIAL.
    PERFORM seo_get_superclasses
      USING
        ls_clsref-refclsname
      CHANGING
        ct_super_class.
  ENDIF.
  SORT ct_super_class BY hierlevel DESCENDING.
ENDFORM.                    "seo_get_superClasses


*-----------------------------------------------------------------------
* seo_intf_get_aliases
*-----------------------------------------------------------------------
FORM seo_intf_get_aliases
  USING
    value(i_clsname)
    it_ref_attrib TYPE it_ref_seoattrib
    it_ref_method TYPE it_ref_seomethod
    it_ref_event TYPE it_ref_seoevent
    it_ref_type TYPE it_ref_seotype
  CHANGING
    ct_ref_alias TYPE it_ref_seoalias.

  DATA:
  ls_ref_alias TYPE st_ref_seoalias,
  ls_clskey TYPE seoclskey,
  lt_seoalias TYPE seo_aliases,
  l_cpdname TYPE seocpdname.

  FIELD-SYMBOLS:
  <ls_ref_attrib> TYPE st_ref_seoattrib,
  <ls_ref_method> TYPE st_ref_seomethod,
  <ls_ref_event> TYPE st_ref_seoevent,
  <ls_ref_type> TYPE st_ref_seotype,
  <ls_seoalias> TYPE seoaliases,
  <ls_ref_alias> TYPE st_ref_seoalias.

  REFRESH:
  ct_ref_alias.

  ls_ref_alias-type = txt_attribute.
  LOOP AT it_ref_attrib ASSIGNING <ls_ref_attrib>
    WHERE cpdname CP '*~*'.
    ls_ref_alias-cpdname = <ls_ref_attrib>-cpdname.
    APPEND ls_ref_alias TO ct_ref_alias.
  ENDLOOP.
  ls_ref_alias-type = txt_method.
  LOOP AT it_ref_method ASSIGNING <ls_ref_method>
    WHERE cpdname CP '*~*'.
    ls_ref_alias-cpdname = <ls_ref_method>-cpdname.
    APPEND ls_ref_alias TO ct_ref_alias.
  ENDLOOP.
  ls_ref_alias-type = txt_event.
  LOOP AT it_ref_event ASSIGNING <ls_ref_event>
    WHERE cpdname CP '*~*'.
    ls_ref_alias-cpdname = <ls_ref_event>-cpdname.
    APPEND ls_ref_alias TO ct_ref_alias.
  ENDLOOP.
  ls_ref_alias-type = txt_type___1.
  LOOP AT it_ref_type ASSIGNING <ls_ref_type>
    WHERE cpdname CP '*~*'.
    ls_ref_alias-cpdname = <ls_ref_type>-cpdname.
    APPEND ls_ref_alias TO ct_ref_alias.
  ENDLOOP.

  ls_clskey-clsname = i_clsname.
  CALL FUNCTION 'SEO_ALIASES_GET'
    EXPORTING
      cifkey  = ls_clskey
    CHANGING
      aliases = lt_seoalias.
  LOOP AT lt_seoalias ASSIGNING <ls_seoalias>.
    CONCATENATE
        <ls_seoalias>-refclsname '~'
        <ls_seoalias>-refcmpname
        INTO l_cpdname.
    READ TABLE ct_ref_alias ASSIGNING <ls_ref_alias>
      WITH KEY cpdname = l_cpdname.
    IF sy-subrc = 0.
      <ls_ref_alias>-refcmpname = <ls_seoalias>-cmpname.
    ENDIF.
  ENDLOOP.
  SORT ct_ref_alias BY cpdname.
ENDFORM.                    "seo_intf_get_aliases


*-----------------------------------------------------------------------
* seo_intf_get_attribs
*-----------------------------------------------------------------------
FORM seo_intf_get_attribs
  USING
    value(i_clsname)
    it_ref_interface TYPE it_ref_seointerface
  CHANGING
    ct_ref_attrib TYPE it_ref_seoattrib.

  DATA:
  lt_attrib TYPE STANDARD TABLE OF vseoattrib,
  ls_ref_attrib TYPE st_ref_seoattrib,
  l_id TYPE string.

  FIELD-SYMBOLS:
  <ls_ref_interface> TYPE st_ref_seointerface,
  <ls_attrib> TYPE vseoattrib.

  REFRESH:
  ct_ref_attrib.

  LOOP AT it_ref_interface ASSIGNING <ls_ref_interface>.
    SELECT * FROM vseoattrib INTO TABLE lt_attrib
      WHERE clsname = <ls_ref_interface>-refclsname
      AND langu = sy-langu
      AND version = '1'
      ORDER BY editorder.
    LOOP AT lt_attrib ASSIGNING <ls_attrib>.
      CLEAR ls_ref_attrib.
      IF <ls_attrib>-alias = abap_false.
        ls_ref_attrib-cpdname = <ls_attrib>-cmpname.
        IF <ls_ref_interface>-refclsname <> i_clsname.
          CONCATENATE <ls_ref_interface>-refclsname '~'
            ls_ref_attrib-cpdname INTO ls_ref_attrib-cpdname.
        ENDIF.
        PERFORM seo_get_check_model
          USING <ls_attrib>
          CHANGING ls_ref_attrib.
        PERFORM get_dom_value_text
          USING
            'SEOATTDECL'
            <ls_attrib>-attdecltyp
          CHANGING
            ls_ref_attrib-decltype.
        ls_ref_attrib-attrdonly = <ls_attrib>-attrdonly.
        PERFORM get_dom_value_text
          USING
            'SEOTYPTYPE'
            <ls_attrib>-typtype
          CHANGING
            ls_ref_attrib-typtype.
        ls_ref_attrib-type = <ls_attrib>-type.
        PERFORM get_id
          USING 'COMPONENTS_' <ls_ref_interface>-refclsname
          CHANGING l_id.
        CONCATENATE 'switchContent(''' l_id ''')'
          INTO ls_ref_attrib-onclick.
        ls_ref_attrib-typelink = '->'.
        ls_ref_attrib-descript = <ls_attrib>-descript.
        ls_ref_attrib-attvalue = <ls_attrib>-attvalue.
        APPEND ls_ref_attrib TO ct_ref_attrib.
      ENDIF.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    "seo_intf_get_attribs


*-----------------------------------------------------------------------
* seo_intf_get_events
*-----------------------------------------------------------------------
FORM seo_intf_get_events
  USING
    value(i_clsname)
    it_ref_interface TYPE it_ref_seointerface
  CHANGING
    ct_ref_event TYPE it_ref_seoevent.

  DATA:
  lt_event TYPE STANDARD TABLE OF vseoevent,
  ls_ref_event TYPE st_ref_seoevent,
  ls_cmpkey TYPE seocmpkey,
  ls_event TYPE vseoevent.

  FIELD-SYMBOLS:
  <ls_ref_interface> TYPE st_ref_seointerface,
  <ls_event> TYPE vseoevent.

  REFRESH:
  ct_ref_event.

  LOOP AT it_ref_interface ASSIGNING <ls_ref_interface>.
    SELECT * FROM vseoevent INTO TABLE lt_event
      WHERE clsname = <ls_ref_interface>-refclsname
      AND langu = sy-langu
      AND version = '1'
      ORDER BY editorder.
    CLEAR ls_ref_event.
    LOOP AT lt_event ASSIGNING <ls_event>.
      ls_cmpkey-clsname = <ls_ref_interface>-refclsname.
      ls_cmpkey-cmpname = <ls_event>-cmpname.
      CALL FUNCTION 'SEO_EVENT_GET'
        EXPORTING
          evtkey  = ls_cmpkey
          version = 1
        IMPORTING
          event   = ls_event
        EXCEPTIONS
          OTHERS  = 1.
      IF sy-subrc = 0 AND ls_event-alias = abap_false.
        ls_ref_event-cpdname = ls_event-cmpname.
        IF <ls_ref_interface>-refclsname <> i_clsname.
          CONCATENATE <ls_ref_interface>-refclsname '~'
            ls_ref_event-cpdname INTO ls_ref_event-cpdname.
        ENDIF.
        PERFORM seo_get_check_model
          USING ls_event
          CHANGING ls_ref_event.
        PERFORM get_dom_value_text
          USING
            'SEOEVTDECL'
            ls_event-evtdecltyp
          CHANGING
            ls_ref_event-type.
        ls_ref_event-descript = ls_event-descript.
        APPEND ls_ref_event TO ct_ref_event.
      ENDIF.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    "seo_intf_get_events


*-----------------------------------------------------------------------
* seo_intf_get_methods
*-----------------------------------------------------------------------
FORM seo_intf_get_methods
  USING
    value(i_clsname)
    it_ref_interface TYPE it_ref_seointerface
  CHANGING
    ct_ref_method TYPE it_ref_seomethod.

  DATA:
  lt_method TYPE STANDARD TABLE OF vseomethod,
  ls_ref_method TYPE st_ref_seomethod.

  FIELD-SYMBOLS:
  <ls_ref_interface> TYPE st_ref_seointerface,
  <ls_method> TYPE vseomethod.

  REFRESH:
  ct_ref_method.

  LOOP AT it_ref_interface ASSIGNING <ls_ref_interface>.
    SELECT * FROM vseomethod INTO TABLE lt_method
      WHERE clsname = <ls_ref_interface>-refclsname
      AND langu = sy-langu
      AND version = '1'
      ORDER BY editorder.
    LOOP AT lt_method ASSIGNING <ls_method>.
      CLEAR ls_ref_method.
      IF <ls_method>-alias = abap_false.
        ls_ref_method-cpdname = <ls_method>-cmpname.
        IF <ls_ref_interface>-refclsname <> i_clsname.
          CONCATENATE <ls_ref_interface>-refclsname '~'
            ls_ref_method-cpdname INTO ls_ref_method-cpdname.
        ENDIF.
        PERFORM get_dom_value_text
          USING
            'SEOMTDDECL'
            <ls_method>-mtddecltyp
          CHANGING
            ls_ref_method-type.
        PERFORM seo_get_check_model
          USING <ls_method>
          CHANGING ls_ref_method.
        PERFORM get_dom_value_text
          USING
            'SEOMTDTYPE'
            <ls_method>-mtdtype
          CHANGING
            ls_ref_method-methodtype.
        ls_ref_method-descript = <ls_method>-descript.
        APPEND ls_ref_method TO ct_ref_method.
      ENDIF.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    "seo_intf_get_methods


*-----------------------------------------------------------------------
* seo_intf_get_props
*-----------------------------------------------------------------------
FORM seo_intf_get_props
  USING
    value(i_clsname)
    value(i_devclass)
  CHANGING
    cs_properties TYPE st_properties
    ct_ti TYPE it_textinput
    ct_typegroup TYPE it_seotypepls.

  DATA:
  ls_clskey TYPE seoclskey,
  ls_seointerf TYPE vseointerf,
  lt_typegroup TYPE it_seotypepls.

  FIELD-SYMBOLS:
  <ls_typegroup> TYPE seotypepls,
  <l_explicit> TYPE ANY.

  CLEAR:
  cs_properties.

  REFRESH:
  ct_typegroup.

  ls_clskey-clsname = i_clsname.
  CALL FUNCTION 'SEO_INTERFACE_READ'
    EXPORTING
      intkey    = ls_clskey
      version   = 1
    IMPORTING
      interface = ls_seointerf.
  IF ls_seointerf-changedby IS INITIAL
  AND ls_seointerf-changedon IS INITIAL.
    ls_seointerf-changedby = ls_seointerf-author.
    ls_seointerf-changedon = ls_seointerf-createdon.
  ENDIF.
  SELECT * FROM seotypepls INTO TABLE lt_typegroup
      WHERE clsname = ls_clskey-clsname
      AND version = '1'
      ORDER BY typegroup.
  LOOP AT lt_typegroup ASSIGNING <ls_typegroup>.
    ASSIGN COMPONENT 'EXPLICIT' OF STRUCTURE <ls_typegroup>
      TO <l_explicit>.
    IF <l_explicit> IS ASSIGNED AND <l_explicit> = abap_true.
      APPEND <ls_typegroup> TO ct_typegroup.
    ENDIF.
  ENDLOOP.
  cs_properties-descript = ls_seointerf-descript.
  IF ls_seointerf-langu IS INITIAL.
    SELECT SINGLE masterlang FROM tadir INTO ls_seointerf-langu
        WHERE pgmid = 'R3TR'
        AND object = 'INTF'
        AND obj_name = i_clsname.
  ENDIF.

  PERFORM seo_intf_get_props_textinput
    USING
      i_clsname
      i_devclass
      ls_seointerf
    CHANGING
      ct_ti.
ENDFORM.                    "seo_clas_get_props


*-----------------------------------------------------------------------
* seo_intf_get_props_textInput
*-----------------------------------------------------------------------
FORM seo_intf_get_props_textinput
  USING
    value(i_clsname)
    value(i_devclass)
    is_seointerf TYPE vseointerf
  CHANGING
    ct_ti TYPE it_textinput.

  DATA:
  l_namtext TYPE ad_namtext,
  ls_ti TYPE st_textinput.

  FIELD-SYMBOLS:
  <l_unicode> TYPE ANY.

  REFRESH:
  ct_ti.

  ls_ti-name = txt_released_internally.
  ls_ti-flag = abap_true.
  ls_ti-flag_col = 1.
  IF NOT is_seointerf-release IS INITIAL.
    ls_ti-value = abap_true.
  ENDIF.
  APPEND ls_ti TO ct_ti.
  ASSIGN COMPONENT 'UNICODE' OF STRUCTURE is_seointerf TO <l_unicode>.
  IF <l_unicode> IS ASSIGNED.
    CLEAR ls_ti.
    ls_ti-name = txtt_unicode_checks_active.
    ls_ti-flag = abap_true.
    ls_ti-flag_col = 2.
    ls_ti-value = <l_unicode>.
    APPEND ls_ti TO ct_ti.
  ENDIF.
  CLEAR ls_ti.
  ls_ti-name = txt_package.
  ls_ti-value = i_devclass.
  ls_ti-input = abap_true.
  APPEND ls_ti TO ct_ti.
  CLEAR ls_ti.
  ls_ti-name = txt_original_language.
  ls_ti-value = is_seointerf-langu.
  ls_ti-input = abap_true.
  APPEND ls_ti TO ct_ti.
  CLEAR ls_ti.
  ls_ti-name = txt_created_by___1.
  ls_ti-value = is_seointerf-author.
  PERFORM get_user
    USING
      is_seointerf-author
    CHANGING
      l_namtext.
  ls_ti-value_text = l_namtext.
  ls_ti-has_value_ext = abap_true.
  PERFORM get_date
    USING
      is_seointerf-createdon
    CHANGING
      ls_ti-value_ext.
  ls_ti-input = abap_true.
  APPEND ls_ti TO ct_ti.
  CLEAR ls_ti.
  ls_ti-name = txt_last_changed_by___1.
  ls_ti-value = is_seointerf-changedby.
  PERFORM get_user
    USING
      is_seointerf-changedby
    CHANGING
      l_namtext.
  ls_ti-value_text = l_namtext.
  ls_ti-has_value_ext = abap_true.
  PERFORM get_date
    USING
      is_seointerf-changedon
    CHANGING
      ls_ti-value_ext.
  ls_ti-input = abap_true.
  APPEND ls_ti TO ct_ti.
ENDFORM.                    "seo_intf_get_props_textInput


*-----------------------------------------------------------------------
* seo_intf_get_types
*-----------------------------------------------------------------------
FORM seo_intf_get_types
  USING
    value(i_clsname)
    it_ref_interface TYPE it_ref_seointerface
  CHANGING
    ct_ref_type TYPE it_ref_seotype
    ct_ref_type_par TYPE it_ref_seotype.

  DATA:
  lt_type TYPE STANDARD TABLE OF vseotype,
  ls_ref_type TYPE st_ref_seotype,
  l_id TYPE string.

  FIELD-SYMBOLS:
  <ls_ref_interface> TYPE st_ref_seointerface,
  <ls_type> TYPE vseotype.

  REFRESH:
  ct_ref_type.

  LOOP AT it_ref_interface ASSIGNING <ls_ref_interface>.
    SELECT * FROM vseotype INTO TABLE lt_type
      WHERE clsname = <ls_ref_interface>-refclsname
      AND langu = sy-langu
      AND version = '1'
      ORDER BY editorder.
    CLEAR ls_ref_type.
    LOOP AT lt_type ASSIGNING <ls_type>.
      ls_ref_type-cpdname = <ls_type>-cmpname.
      IF <ls_ref_interface>-refclsname <> i_clsname.
        CONCATENATE <ls_ref_interface>-refclsname '~'
          ls_ref_type-cpdname INTO ls_ref_type-cpdname.
      ENDIF.
      PERFORM get_dom_value_text
        USING
          'SEOTYPTYPE'
          <ls_type>-typtype
        CHANGING
          ls_ref_type-typtype.
      ls_ref_type-type = <ls_type>-type.
      PERFORM get_id
        USING 'COMPONENTS_' <ls_ref_interface>-refclsname
        CHANGING l_id.
      CONCATENATE 'switchContent(''' l_id ''')'
        INTO ls_ref_type-onclick.
      ls_ref_type-typelink = '->'.
      ls_ref_type-descript = <ls_type>-descript.
      APPEND ls_ref_type TO ct_ref_type_par.
      IF <ls_ref_interface>-refclsname = i_clsname.
        APPEND ls_ref_type TO ct_ref_type.
      ENDIF.
    ENDLOOP.
  ENDLOOP.
ENDFORM.                    "seo_intf_get_types


*-----------------------------------------------------------------------
* seo_r3tr_clas                                 Classes
*-----------------------------------------------------------------------
FORM seo_r3tr_clas.

  DATA:
  lt_html TYPE it_string,
  ls_seoclass TYPE seoclass,
  lt_tabstrip TYPE it_tabstrip,
  ls_tabstrip TYPE st_tabstrip,
  lt_typegroup TYPE STANDARD TABLE OF seotypepls,
  ls_properties TYPE st_properties,
  lt_ti TYPE it_textinput,
  lt_super_class TYPE it_seo_super_class,
  lt_ref_interface TYPE it_ref_seointerface,
  lt_ref_interface_all TYPE it_ref_seointerface,
  lt_ref_attrib TYPE it_ref_seoattrib,
  lt_ref_friends TYPE it_ref_seofriends,
  lt_ref_method TYPE it_ref_seomethod,
  lt_ref_event TYPE it_ref_seoevent,
  lt_ref_type TYPE it_ref_seotype,
  lt_ref_type_par TYPE it_ref_seotype,
  lt_ref_alias TYPE it_ref_seoalias,
  l_clsname TYPE seoclsname,
  l_progname TYPE programm,
  lt_doc TYPE it_string,
  lt_text_symbols TYPE it_textpool,
  lt_text_symbols_addons TYPE it_textpool_addons,
  l_javascript TYPE string,
  l_filename TYPE string,
  l_id TYPE string,
  l_flag TYPE flag,
  l_has_cl_name TYPE flag,
  l_char TYPE c.

  FIELD-SYMBOLS:
  <ls_tabstrip> TYPE st_tabstrip,
  <ls_ztadir> TYPE st_ztadir,
  <ls_super_class> TYPE st_seo_super_class.


  LOOP AT gt_ztadir ASSIGNING <ls_ztadir>
      WHERE pgmid = 'R3TR'
      AND object = 'CLAS'
      AND downloaded = abap_false.
    <ls_ztadir>-downloaded = abap_true.

    CLEAR:
    l_javascript,
    ls_tabstrip.

    REFRESH:
    lt_html,
    lt_super_class,
    lt_ref_interface,
    lt_ref_interface_all,
    lt_doc.

    SELECT SINGLE * FROM seoclass INTO ls_seoclass
      WHERE clsname = <ls_ztadir>-obj_name
      AND clstype = 0.
    IF sy-subrc <> 0.
      <ls_ztadir>-subrc = sy-subrc.
      CONTINUE.
    ENDIF.
*Class Documentation
    PERFORM get_docu
      USING
        'CL'
        <ls_ztadir>-obj_name
        'E'
      CHANGING
        lt_doc.
*Text Symbols
    PERFORM seo_clas_get_text_symbols
      USING
        <ls_ztadir>-obj_name
      CHANGING
        lt_text_symbols
        lt_text_symbols_addons.
*Properties
    PERFORM seo_clas_get_props
      USING
        <ls_ztadir>-obj_name
        <ls_ztadir>-devclass
      CHANGING
        ls_properties
        lt_ti
        lt_typegroup.
*Super classes
    PERFORM seo_get_superclasses
      USING
        <ls_ztadir>-obj_name
      CHANGING
        lt_super_class.
*Interfaces
    PERFORM seo_clas_get_interfaces
      USING
        <ls_ztadir>-obj_name
        lt_super_class
      CHANGING
        lt_ref_interface
        lt_ref_interface_all.
*Friends
    PERFORM seo_clas_get_friends
      USING
        <ls_ztadir>-obj_name
      CHANGING
        lt_ref_friends.
*Attributes
    PERFORM seo_clas_get_attribs
      USING
        <ls_ztadir>-obj_name
        lt_super_class
        lt_ref_interface_all
      CHANGING
        lt_ref_attrib.
*Methods
    PERFORM seo_clas_get_methods
      USING
        <ls_ztadir>
        lt_super_class
        lt_ref_interface_all
      CHANGING
        lt_ref_method.
*Events
    PERFORM seo_clas_get_events
      USING
        <ls_ztadir>-obj_name
        lt_super_class
        lt_ref_interface_all
      CHANGING
        lt_ref_event.
*Types
    PERFORM seo_clas_get_types
      USING
        <ls_ztadir>-obj_name
        lt_super_class
      CHANGING
        lt_ref_type
        lt_ref_type_par.
*Aliases
    PERFORM seo_clas_get_aliases
      USING
        <ls_ztadir>-obj_name
        lt_ref_attrib
        lt_ref_method
        lt_ref_event
        lt_ref_type_par
      CHANGING
        lt_ref_alias.
*   Check CL-name
    l_has_cl_name = abap_false.
    l_clsname = <ls_ztadir>-obj_name.
    PERFORM get_trdir_name
      USING l_clsname 'CL'
      CHANGING l_progname.
    SELECT SINGLE name FROM trdir INTO l_progname
        WHERE name = l_progname.
    IF sy-subrc = 0.
      l_has_cl_name = abap_true.
    ENDIF.
***Tabstrip
    l_char = '-'.
    IF l_has_cl_name = abap_false.
      l_char = 'N'.
    ENDIF.
    PERFORM get_tabstrip
      USING 'SEO_R3TR_CLAS' l_char
      CHANGING lt_tabstrip.

    LOOP AT lt_tabstrip ASSIGNING <ls_tabstrip>.
      <ls_tabstrip>-empty = abap_false.
      CASE <ls_tabstrip>-id.
        WHEN 'DOC'.
          IF lt_doc IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
        WHEN 'TEXTSYMBOLS'.
          IF lt_text_symbols IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
        WHEN 'INTERFACES'.
          IF lt_ref_interface IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
        WHEN 'FRIENDS'.
          IF lt_ref_friends IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
        WHEN 'ATTRIBUTES'.
          IF lt_ref_attrib IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
        WHEN 'METHODS'.
          IF lt_ref_method IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
        WHEN 'EVENTS'.
          IF lt_ref_event IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
        WHEN 'TYPES'.
          IF lt_ref_type IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
        WHEN 'ALIASES'.
          IF lt_ref_alias IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
      ENDCASE.
    ENDLOOP.

*Komponenten
    LOOP AT lt_super_class ASSIGNING <ls_super_class>.
*** public Komponenten
      PERFORM get_id
        USING 'COMPONENTS_2_' <ls_super_class>-clsname
        CHANGING ls_tabstrip-id.
      ls_tabstrip-text = space.
      ls_tabstrip-active = abap_false.
      ls_tabstrip-hidden = abap_true.
      APPEND ls_tabstrip TO lt_tabstrip.
      CONCATENATE l_javascript
          'makeDivSize(''' ls_tabstrip-id ''');'
        INTO l_javascript.
*** private Komponenten
      PERFORM get_id
        USING 'COMPONENTS_0_' <ls_super_class>-clsname
        CHANGING ls_tabstrip-id.
      ls_tabstrip-text = space.
      ls_tabstrip-active = abap_false.
      ls_tabstrip-hidden = abap_true.
      APPEND ls_tabstrip TO lt_tabstrip.
      CONCATENATE l_javascript
          'makeDivSize(''' ls_tabstrip-id ''');'
        INTO l_javascript.
*** protected Komponenten
      PERFORM get_id
        USING 'COMPONENTS_1_' <ls_super_class>-clsname
        CHANGING ls_tabstrip-id.
      ls_tabstrip-text = space.
      ls_tabstrip-active = abap_false.
      ls_tabstrip-hidden = abap_true.
      APPEND ls_tabstrip TO lt_tabstrip.
      CONCATENATE l_javascript
          'makeDivSize(''' ls_tabstrip-id ''');'
        INTO l_javascript.
    ENDLOOP.
    ls_tabstrip-id = 'IFRAME'.
    ls_tabstrip-text = space.
    ls_tabstrip-active = abap_false.
    ls_tabstrip-hidden = abap_true.
    APPEND ls_tabstrip TO lt_tabstrip.
*** JavaScript
    CONCATENATE l_javascript
        'makeDivSize(''IFRAME'');'
        'makeDivSize(''LOCTYPES'');'
        'makeDivSize(''IMPL'');'
        'makeDivSize(''MACROS'');'
        'makeDivSize(''DOC'');'
      INTO l_javascript.
*** HTML
    PERFORM html_main_header
      USING
        tpt_seo_clas
        txt_class
        <ls_ztadir>-obj_name
        txt_implemented_active
        space
        space
        l_javascript
        lt_tabstrip
        gt_link
      CHANGING
        lt_html.
*  Local Types (CL)
    l_clsname = <ls_ztadir>-obj_name.
    IF l_has_cl_name = abap_true.
      PERFORM get_trdir_name
        USING l_clsname 'CL'
        CHANGING l_progname.
      CONCATENATE <ls_ztadir>-obj_name '.cl' INTO l_filename.
      PERFORM add_report_sourcecode
        USING
          l_progname
          l_filename
          gc_extension_txt
          abap_false
          <ls_ztadir>
          'LOCTYPES'
          abap_false
        CHANGING
          lt_html.
    ELSE.
*  Local Types (CCDEF)
      PERFORM get_trdir_name
        USING l_clsname 'CCDEF'
        CHANGING l_progname.
      CONCATENATE <ls_ztadir>-obj_name '.ccdef' INTO l_filename.
      PERFORM add_report_sourcecode
        USING
          l_progname
          l_filename
          gc_extension_txt
          abap_false
          <ls_ztadir>
          'LOCTYPES'
          abap_false
        CHANGING
          lt_html.
*  Implementation (CCIMP)
      PERFORM get_trdir_name
        USING l_clsname 'CCIMP'
        CHANGING l_progname.
      CONCATENATE <ls_ztadir>-obj_name '.ccimp' INTO l_filename.
      PERFORM add_report_sourcecode
        USING
          l_progname
          l_filename
          gc_extension_txt
          abap_false
          <ls_ztadir>
          'IMPL'
          abap_false
        CHANGING
          lt_html.
*  Macros (CCMAC)
      PERFORM get_trdir_name
        USING l_clsname 'CCMAC'
        CHANGING l_progname.
      CONCATENATE <ls_ztadir>-obj_name '.ccmac' INTO l_filename.
      PERFORM add_report_sourcecode
        USING
          l_progname
          l_filename
          gc_extension_txt
          abap_false
          <ls_ztadir>
          'MACROS'
          abap_false
        CHANGING
          lt_html.
    ENDIF.
*  Class Documentation
    IF NOT lt_doc IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      PERFORM html_add_doc
        USING
          lt_doc
          'DOC'
          abap_false
        CHANGING
          lt_html.
    ENDIF.
*Text Symbols
    IF NOT lt_text_symbols IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      PERFORM html_add_table
        USING
          'CLAS_SYMBO'
          lt_text_symbols
          lt_text_symbols_addons
          'TEXTSYMBOLS'
          abap_false
        CHANGING
          lt_html.
    ENDIF.
*  Properties
    l_flag = abap_false.
    IF lt_ref_attrib IS INITIAL
    AND lt_ref_method IS INITIAL.
      l_flag = abap_true.
    ENDIF.
    PERFORM html_add_properties
      USING
        ls_properties
        lt_ti
        'CLAS_TYPEG'
        lt_typegroup
        'PROPERTIES'
        l_flag
      CHANGING
        lt_html.
*  Interfaces
    IF NOT lt_ref_interface IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      PERFORM html_add_table
        USING
          'CLAS_INTER'
          lt_ref_interface
          lt_ref_interface
          'INTERFACES'
          abap_false
        CHANGING
          lt_html.
    ENDIF.
*  Friends
    IF NOT lt_ref_friends IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      PERFORM html_add_table
        USING
          'CLAS_FRIEN'
          lt_ref_friends
          lt_ref_friends
          'FRIENDS'
          abap_false
        CHANGING
          lt_html.
    ENDIF.
*  Attributes
    IF NOT lt_ref_attrib IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      l_flag = abap_false.
      IF lt_ref_method IS INITIAL.
        l_flag = abap_true.
      ENDIF.
      PERFORM html_add_table
        USING
          'CLAS_ATTRI'
          lt_ref_attrib
          lt_ref_attrib
          'ATTRIBUTES'
          l_flag
        CHANGING
          lt_html.
    ENDIF.
*  Methods
    IF NOT lt_ref_method IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      PERFORM html_add_table
        USING
          'CLAS_METHO'
          lt_ref_method
          lt_ref_method
          'METHODS'
          abap_true
        CHANGING
          lt_html.
    ENDIF.
*  Events
    IF NOT lt_ref_event IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      PERFORM html_add_table
        USING
          'CLAS_EVENT'
          lt_ref_event
          lt_ref_event
          'EVENTS'
          abap_false
        CHANGING
          lt_html.
    ENDIF.
*  Types
    IF NOT lt_ref_type IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      PERFORM html_add_table
        USING
          'CLAS_TYPES'
          lt_ref_type
          lt_ref_type
          'TYPES'
          abap_false
        CHANGING
          lt_html.
    ENDIF.
* Aliases
    IF NOT lt_ref_alias IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      PERFORM html_add_table
        USING
          'CLAS_ALIAS'
          lt_ref_alias
          lt_ref_alias
          'ALIASES'
          abap_false
        CHANGING
          lt_html.
    ENDIF.
*SourceCode der Komponenten lesen und in DIV ausgeben
    LOOP AT lt_super_class ASSIGNING <ls_super_class>.
*** public Komponenten
      PERFORM get_trdir_name
        USING <ls_super_class>-clsname 'CU'
        CHANGING l_progname.
      PERFORM get_id
        USING 'COMPONENTS_2_' <ls_super_class>-clsname
        CHANGING l_id.
      CONCATENATE <ls_super_class>-clsname '.public'
          INTO l_filename.
      PERFORM add_report_sourcecode
        USING
          l_progname
          l_filename
          gc_extension_txt
          abap_false
          <ls_ztadir>
          l_id
          abap_false
        CHANGING
          lt_html.
*** private Komponenten
      PERFORM get_trdir_name
        USING <ls_super_class>-clsname 'CI'
        CHANGING l_progname.
      PERFORM get_id
        USING 'COMPONENTS_0_' <ls_super_class>-clsname
        CHANGING l_id.
      CONCATENATE <ls_super_class>-clsname '.private'
          INTO l_filename.
      PERFORM add_report_sourcecode
        USING
          l_progname
          l_filename
          gc_extension_txt
          abap_false
          <ls_ztadir>
          l_id
          abap_false
        CHANGING
          lt_html.
*** protected Komponenten
      PERFORM get_trdir_name
        USING <ls_super_class>-clsname 'CO'
        CHANGING l_progname.
      PERFORM get_id
        USING 'COMPONENTS_1_' <ls_super_class>-clsname
        CHANGING l_id.
      CONCATENATE <ls_super_class>-clsname '.protected'
          INTO l_filename.
      PERFORM add_report_sourcecode
        USING
          l_progname
          l_filename
          gc_extension_txt
          abap_false
          <ls_ztadir>
          l_id
          abap_false
        CHANGING
          lt_html.
    ENDLOOP.
***IFrame for Methods' Sources
    PERFORM html_add_iframe
        USING
          space
          'IFRAME'
          abap_false
        CHANGING
          lt_html.
*
    PERFORM html_main_footer
      USING
        lt_html.

    PERFORM download
      USING
        lt_html
        <ls_ztadir>-pgmid
        <ls_ztadir>-object
        <ls_ztadir>-obj_name
        gc_extension_htm
        abap_true.
  ENDLOOP.
ENDFORM.                                                    "r3tr_clas


*-----------------------------------------------------------------------
* seo_r3tr_clas_methods                         Classes
*-----------------------------------------------------------------------
FORM seo_r3tr_clas_methods.

  DATA:
  lt_ref_signature TYPE it_ref_seosignature,
  ls_ref_signature TYPE st_ref_seosignature,
  ls_cpdkey TYPE seocpdkey,
  lt_vseomepara TYPE STANDARD TABLE OF vseomepara,
  lt_vseoexcep TYPE STANDARD TABLE OF vseoexcep,
  l_progname TYPE program,
  lt_sourcecode TYPE it_string,
  lt_html TYPE it_string,
  l_filename TYPE string,
  l_clsname TYPE seoclsname,
  l_cmpname TYPE seocmpname.

  FIELD-SYMBOLS:
  <ls_vseomepara> TYPE vseomepara,
  <ls_vseoexcep> TYPE vseoexcep,
  <ls_zseomethod> TYPE st_zseomethod.


  LOOP AT gt_zseomethod ASSIGNING <ls_zseomethod>.
    REFRESH lt_html.
    REFRESH lt_ref_signature.
    REFRESH lt_vseomepara.
    REFRESH lt_vseoexcep.
    REFRESH lt_sourcecode.
    CLEAR l_clsname.
    CLEAR l_cmpname.
    CLEAR l_filename.

    IF <ls_zseomethod>-cpdname NA '~'.
      l_clsname = <ls_zseomethod>-clsname.
      l_cmpname = <ls_zseomethod>-cpdname.
    ELSE.
      SPLIT <ls_zseomethod>-cpdname AT '~'
        INTO l_clsname l_cmpname.
    ENDIF.
*read Signature - Parameter
    SELECT * FROM vseomepara INTO TABLE lt_vseomepara
      WHERE clsname = l_clsname
      AND cmpname = l_cmpname
      AND langu = sy-langu
      AND version = '1'
      ORDER BY pardecltyp editorder.
    LOOP AT lt_vseomepara ASSIGNING <ls_vseomepara>.
      CLEAR ls_ref_signature.
      PERFORM get_dom_value_text
        USING
          'SEOPARDECL'
          <ls_vseomepara>-pardecltyp
        CHANGING
          ls_ref_signature-declaration.
      IF <ls_vseomepara>-parpasstyp = 0.
        CONCATENATE 'VALUE(' <ls_vseomepara>-sconame ')'
          INTO ls_ref_signature-parameter SEPARATED BY space.
      ELSE.
        ls_ref_signature-parameter = <ls_vseomepara>-sconame.
      ENDIF.
      PERFORM get_dom_value_text
        USING
          'SEOTYPTYPE'
          <ls_vseomepara>-typtype
        CHANGING
          ls_ref_signature-type.
      CONCATENATE ls_ref_signature-type <ls_vseomepara>-type
        INTO ls_ref_signature-type SEPARATED BY space.
      IF <ls_vseomepara>-paroptionl = abap_true.
        CONCATENATE ls_ref_signature-type '(optional)'
          INTO ls_ref_signature-type SEPARATED BY space.
      ENDIF.
      ls_ref_signature-descript = <ls_vseomepara>-descript.
      APPEND ls_ref_signature TO lt_ref_signature.
    ENDLOOP.
*read Signature - Exceptions
    SELECT * FROM vseoexcep INTO TABLE lt_vseoexcep
      WHERE clsname = l_clsname
      AND cmpname = l_cmpname
      AND langu = sy-langu
      AND version = '1'
      ORDER BY editorder.
    LOOP AT lt_vseoexcep ASSIGNING <ls_vseoexcep>.
      CLEAR ls_ref_signature.
      ls_ref_signature-declaration = txt_exception___1.
      ls_ref_signature-parameter = <ls_vseoexcep>-sconame.
      ls_ref_signature-descript = <ls_vseoexcep>-descript.
      APPEND ls_ref_signature TO lt_ref_signature.
    ENDLOOP.
*read SourceCode
    ls_cpdkey-clsname = <ls_zseomethod>-clsname.
    ls_cpdkey-cpdname = <ls_zseomethod>-cpdname.

    PERFORM get_trdir_name_method_include
      USING ls_cpdkey
      CHANGING l_progname.
    IF NOT l_progname IS INITIAL.
      PERFORM try_read_report
        USING l_progname
        CHANGING lt_sourcecode.
    ENDIF.
*download SourceCode
    IF g_add_sourcecode = abap_true.
      CONCATENATE <ls_zseomethod>-clsname '-'
        <ls_zseomethod>-cpdname
        INTO l_filename.
      PERFORM replace_all
        USING '~' '-'
        CHANGING l_filename.
      PERFORM download
        USING
          lt_sourcecode
          <ls_zseomethod>-pgmid
          <ls_zseomethod>-object
          l_filename
          gc_extension_txt
          abap_false.
    ENDIF.
*HTML
    PERFORM html_main_iframeheader
      USING
        <ls_zseomethod>-cpdname
      CHANGING
        lt_html.
    PERFORM html_add_methodnodiv
      USING
        <ls_zseomethod>-cpdname
        <ls_zseomethod>-active
        txt_method
        'CLAS_SIGNA'
        lt_ref_signature
        lt_ref_signature
        lt_sourcecode
        l_filename
        space
        space
        gc_extension_txt
        'CONTENT'
      CHANGING
        lt_html.
    PERFORM html_main_iframefooter
      CHANGING
        lt_html.
*Download
    CONCATENATE <ls_zseomethod>-clsname '-' <ls_zseomethod>-cpdname
      INTO l_filename.
    PERFORM replace_all
      USING '~' '-'
      CHANGING l_filename.
    PERFORM download
        USING
          lt_html
          <ls_zseomethod>-pgmid
          <ls_zseomethod>-object
          l_filename
          gc_extension_htm
          abap_false.
  ENDLOOP.

ENDFORM.                    "r3tr_clas_methods


*-----------------------------------------------------------------------
* seo_r3tr_intf                                 Interfaces
*-----------------------------------------------------------------------
FORM seo_r3tr_intf.

  DATA:
  lt_html TYPE it_string,
  lt_tabstrip TYPE it_tabstrip,
  ls_tabstrip TYPE st_tabstrip,
  ls_seoclass TYPE seoclass,
  lt_typegroup TYPE STANDARD TABLE OF seotypepls,
  ls_properties TYPE st_properties,
  lt_ti TYPE it_textinput,
  lt_ref_interface TYPE it_ref_seointerface,
  lt_ref_interface_all TYPE it_ref_seointerface,
  ls_ref_interface TYPE st_ref_seointerface,
  lt_ref_attrib TYPE it_ref_seoattrib,
  lt_ref_method TYPE it_ref_seomethod,
  lt_ref_event TYPE it_ref_seoevent,
  lt_ref_type TYPE it_ref_seotype,
  lt_ref_type_par TYPE it_ref_seotype,
  lt_ref_alias TYPE it_ref_seoalias,
  lt_doc TYPE it_string,
  l_progname TYPE programm,
  l_javascript TYPE string,
  l_filename TYPE string,
  l_id TYPE string,
  l_flag.

  FIELD-SYMBOLS:
  <ls_tabstrip> TYPE st_tabstrip,
  <ls_ztadir> TYPE st_ztadir,
  <ls_ref_interface_all> TYPE st_ref_seointerface.


  LOOP AT gt_ztadir ASSIGNING <ls_ztadir>
      WHERE pgmid = 'R3TR'
      AND object = 'INTF'
      AND downloaded = abap_false.
    <ls_ztadir>-downloaded = abap_true.

    REFRESH:
    lt_html,
    lt_ref_interface,
    lt_ref_interface_all.

    SELECT SINGLE * FROM seoclass INTO ls_seoclass
      WHERE clsname = <ls_ztadir>-obj_name
      AND clstype = 1.
    IF sy-subrc <> 0.
      <ls_ztadir>-subrc = sy-subrc.
      CONTINUE.
    ENDIF.
*Interface Documentation
    PERFORM get_docu
      USING
        'IF'
        <ls_ztadir>-obj_name
        'E'
      CHANGING
        lt_doc.
*Properties
    PERFORM seo_intf_get_props
      USING
        <ls_ztadir>-obj_name
        <ls_ztadir>-devclass
      CHANGING
        ls_properties
        lt_ti
        lt_typegroup.
*Interfaces
    PERFORM seo_get_interfaces
      USING
        <ls_ztadir>-obj_name
        0
      CHANGING
        lt_ref_interface
        lt_ref_interface_all.
    ls_ref_interface-refclsname = <ls_ztadir>-obj_name.
    APPEND ls_ref_interface TO lt_ref_interface_all.
*Attributes
    PERFORM seo_intf_get_attribs
      USING
        <ls_ztadir>-obj_name
        lt_ref_interface_all
      CHANGING
        lt_ref_attrib.
*Methods
    PERFORM seo_intf_get_methods
      USING
        <ls_ztadir>-obj_name
        lt_ref_interface_all
      CHANGING
        lt_ref_method.
*Events
    PERFORM seo_intf_get_events
      USING
        <ls_ztadir>-obj_name
        lt_ref_interface_all
      CHANGING
        lt_ref_event.
*Types
    PERFORM seo_intf_get_types
      USING
        <ls_ztadir>-obj_name
        lt_ref_interface_all
      CHANGING
        lt_ref_type
        lt_ref_type_par.
*Aliases
    PERFORM seo_intf_get_aliases
      USING
        <ls_ztadir>-obj_name
        lt_ref_attrib
        lt_ref_method
        lt_ref_event
        lt_ref_type_par
      CHANGING
        lt_ref_alias.
*** TabStrip
    PERFORM get_tabstrip
      USING 'SEO_R3TR_INTF' space
      CHANGING lt_tabstrip.

    LOOP AT lt_tabstrip ASSIGNING <ls_tabstrip>.
      <ls_tabstrip>-empty = abap_false.
      CASE <ls_tabstrip>-id.
        WHEN 'DOC'.
          IF lt_doc IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
        WHEN 'INTERFACES'.
          IF lt_ref_interface IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
        WHEN 'ATTRIBUTES'.
          IF lt_ref_attrib IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
        WHEN 'METHODS'.
          IF lt_ref_method IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
        WHEN 'EVENTS'.
          IF lt_ref_event IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
        WHEN 'TYPES'.
          IF lt_ref_type IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
        WHEN 'ALIASES'.
          IF lt_ref_alias IS INITIAL.
            <ls_tabstrip>-empty = abap_true.
          ENDIF.
      ENDCASE.
    ENDLOOP.

    LOOP AT lt_ref_interface_all ASSIGNING <ls_ref_interface_all>.
      CLEAR ls_tabstrip.
      PERFORM get_id
        USING 'COMPONENTS_' <ls_ref_interface_all>-refclsname
        CHANGING ls_tabstrip-id.
      ls_tabstrip-hidden = abap_true.
      APPEND ls_tabstrip TO lt_tabstrip.
      PERFORM get_id
        USING 'COMPONENTS_' <ls_ref_interface_all>-refclsname
        CHANGING l_id.
      CONCATENATE l_javascript 'makeDivSize(''' l_id ''');'
        INTO l_javascript.
    ENDLOOP.
*** HTML
    PERFORM html_main_header
      USING
        tpt_seo_intf
        txt_interface
        <ls_ztadir>-obj_name
        txt_implemented_active
        space
        space
        l_javascript
        lt_tabstrip
        gt_link
      CHANGING
        lt_html.
*  Documentation
    IF NOT lt_doc IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      PERFORM html_add_doc
        USING
          lt_doc
          'DOC'
          abap_false
        CHANGING
          lt_html.
    ENDIF.
*  Properties
    l_flag = abap_false.
    IF lt_ref_method IS INITIAL
    AND lt_ref_attrib IS INITIAL.
      l_flag = abap_true.
    ENDIF.
    PERFORM html_add_properties
      USING
        ls_properties
        lt_ti
        'INTF_TYPEG'
        lt_typegroup
        'PROPERTIES'
        l_flag
      CHANGING
        lt_html.
*  Interfaces
    IF NOT lt_ref_interface IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      PERFORM html_add_table
        USING
          'INTF_INTER'
          lt_ref_interface
          lt_ref_interface
          'INTERFACES'
          abap_false
        CHANGING
          lt_html.
    ENDIF.
*  Attributes
    IF NOT lt_ref_attrib IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      l_flag = abap_false.
      IF lt_ref_method IS INITIAL.
        l_flag = abap_true.
      ENDIF.
      PERFORM html_add_table
        USING
          'INTF_ATTRI'
          lt_ref_attrib
          lt_ref_attrib
          'ATTRIBUTES'
          l_flag
        CHANGING
          lt_html.
    ENDIF.
*  Methods
    IF NOT lt_ref_method IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      PERFORM html_add_table
        USING
          'INTF_METHO'
          lt_ref_method
          lt_ref_method
          'METHODS'
          abap_true
        CHANGING
          lt_html.
    ENDIF.
*  Events
    IF NOT lt_ref_event IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      PERFORM html_add_table
        USING
          'INTF_EVENT'
          lt_ref_event
          lt_ref_event
          'EVENTS'
          abap_false
        CHANGING
          lt_html.
    ENDIF.
*  Types
    IF NOT lt_ref_type IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      PERFORM html_add_table
        USING
          'INTF_TYPES'
          lt_ref_type
          lt_ref_type
          'TYPES'
          abap_false
        CHANGING
          lt_html.
    ENDIF.
*  Aliases
    IF NOT lt_ref_alias IS INITIAL
    OR g_empty_tab = gc_empty_tab_display.
      PERFORM html_add_table
        USING
          'INTF_ALIAS'
          lt_ref_alias
          lt_ref_alias
          'ALIASES'
          abap_false
        CHANGING
          lt_html.
    ENDIF.
    LOOP AT lt_ref_interface_all ASSIGNING <ls_ref_interface_all>.
      PERFORM get_trdir_name
        USING <ls_ref_interface_all>-refclsname 'IU'
        CHANGING l_progname.
      PERFORM get_id
        USING 'COMPONENTS_' <ls_ref_interface_all>-refclsname
        CHANGING l_id.
      CONCATENATE <ls_ref_interface_all>-refclsname '.components'
          INTO l_filename.
      PERFORM add_report_sourcecode
        USING
          l_progname
          l_filename
          gc_extension_txt
          abap_false
          <ls_ztadir>
          l_id
          abap_false
        CHANGING
          lt_html.
    ENDLOOP.
    PERFORM html_main_footer
      USING
        lt_html.

    PERFORM download
      USING
        lt_html
        <ls_ztadir>-pgmid
        <ls_ztadir>-object
        <ls_ztadir>-obj_name
        gc_extension_htm
        abap_true.
  ENDLOOP.
ENDFORM.                                                    "r3tr_intf
