*&---------------------------------------------------------------------*
*& 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 . *
*& *
*&---------------------------------------------------------------------*
*& *
*& 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:
TYPE st_ref_seoattrib,
TYPE st_ref_seomethod,
TYPE st_ref_seoevent,
TYPE st_ref_seotype,
TYPE st_ref_seoalias,
TYPE seoaliases.
REFRESH:
ct_ref_alias.
ls_ref_alias-type = txt_attribute.
LOOP AT it_ref_attrib ASSIGNING
WHERE cpdname CP '*~*'.
ls_ref_alias-cpdname = -cpdname.
ls_ref_alias-owner = -owner.
APPEND ls_ref_alias TO lt_ref_alias_tmp.
ENDLOOP.
ls_ref_alias-type = txt_method.
LOOP AT it_ref_method ASSIGNING
WHERE cpdname CP '*~*'.
ls_ref_alias-cpdname = -cpdname.
ls_ref_alias-owner = -owner.
APPEND ls_ref_alias TO lt_ref_alias_tmp.
ENDLOOP.
ls_ref_alias-type = txt_event.
LOOP AT it_ref_event ASSIGNING
WHERE cpdname CP '*~*'.
ls_ref_alias-cpdname = -cpdname.
ls_ref_alias-owner = -owner.
APPEND ls_ref_alias TO lt_ref_alias_tmp.
ENDLOOP.
ls_ref_alias-type = txt_type___1.
LOOP AT it_ref_type ASSIGNING
WHERE cpdname CP '*~*'.
ls_ref_alias-cpdname = -cpdname.
ls_ref_alias-owner = -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
WHERE cpdname CP '*~*'
AND owner = i_clsname.
SPLIT -cpdname AT '~'
INTO l_clsname l_cmpname.
READ TABLE lt_seoalias ASSIGNING
WITH KEY cmpname = l_cmpname.
IF sy-subrc = 0.
-refcmpname = -cmpname.
PERFORM get_dom_value_text
USING
'SEOEXPOSE'
-exposure
CHANGING
-exposure.
IF NOT -refcmpname IS INITIAL
AND -exposure > 0.
APPEND TO ct_ref_alias.
ENDIF.
ELSE.
APPEND 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:
TYPE st_seo_super_class,
TYPE vseoattrib,
TYPE st_ref_seoattrib.
LOOP AT it_super_class ASSIGNING .
SELECT * FROM vseoattrib INTO TABLE lt_attrib
WHERE clsname = -clsname
AND alias = abap_false
AND langu = sy-langu
AND version = '1'
ORDER BY editorder.
LOOP AT lt_attrib ASSIGNING .
l_cpdname = -cmpname.
READ TABLE ct_ref_attrib ASSIGNING
WITH KEY cpdname = l_cpdname.
IF sy-subrc = 0.
IF -clsname = i_clsname.
-inherited = abap_false.
ENDIF.
ELSEIF -clsname = i_clsname
OR -exposure > 0.
ls_ref_attrib-cpdname = l_cpdname.
IF -clsname = i_clsname.
ls_ref_attrib-inherited = abap_false.
ELSE.
ls_ref_attrib-inherited = abap_true.
ENDIF.
PERFORM get_dom_value_text
USING
'SEOEXPOSE'
-exposure
CHANGING
ls_ref_attrib-exposure.
PERFORM seo_get_check_model
USING
CHANGING ls_ref_attrib.
PERFORM get_dom_value_text
USING
'SEOATTDECL'
-attdecltyp
CHANGING
ls_ref_attrib-decltype.
ls_ref_attrib-attrdonly = -attrdonly.
PERFORM get_dom_value_text
USING
'SEOTYPTYPE'
-typtype
CHANGING
ls_ref_attrib-typtype.
ls_ref_attrib-type = -type.
l_str = -exposure.
CONDENSE l_str.
CONCATENATE 'COMPONENTS_' l_str '_' INTO l_str.
PERFORM get_id
USING l_str -clsname
CHANGING l_id.
CONCATENATE 'switchContent(''' l_id ''')'
INTO ls_ref_attrib-onclick.
ls_ref_attrib-typelink = '->'.
ls_ref_attrib-descript = -descript.
ls_ref_attrib-attvalue = -attvalue.
ls_ref_attrib-owner = -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:
TYPE st_seo_super_class,
TYPE st_ref_seointerface,
TYPE vseoattrib,
TYPE st_ref_seoattrib.
LOOP AT it_super_class ASSIGNING .
LOOP AT it_ref_interface ASSIGNING
WHERE owner = -clsname.
SELECT * FROM vseoattrib INTO TABLE lt_attrib
WHERE clsname = -refclsname
AND alias = abap_false
AND langu = sy-langu
AND version = '1'
ORDER BY editorder.
LOOP AT lt_attrib ASSIGNING .
CONCATENATE
-clsname '~' -cmpname
INTO l_cpdname.
READ TABLE ct_ref_attrib ASSIGNING
WITH KEY cpdname = l_cpdname.
IF sy-subrc <> 0
AND ( -clsname = i_clsname
OR -exposure > 0 ).
ls_ref_attrib-cpdname = l_cpdname.
IF -clsname = i_clsname.
ls_ref_attrib-inherited = abap_false.
ELSE.
ls_ref_attrib-inherited = abap_true.
ENDIF.
PERFORM get_dom_value_text
USING
'SEOEXPOSE'
-exposure
CHANGING
ls_ref_attrib-exposure.
PERFORM seo_get_check_model
USING
CHANGING ls_ref_attrib.
PERFORM get_dom_value_text
USING
'SEOATTDECL'
-attdecltyp
CHANGING
ls_ref_attrib-decltype.
ls_ref_attrib-attrdonly = -attrdonly.
PERFORM get_dom_value_text
USING
'SEOTYPTYPE'
-typtype
CHANGING
ls_ref_attrib-typtype.
ls_ref_attrib-type = -type.
l_str = -exposure.
CONDENSE l_str.
CONCATENATE 'COMPONENTS_' l_str '_' INTO l_str.
PERFORM get_id
USING l_str -clsname
CHANGING l_id.
CONCATENATE 'switchContent(''' l_id ''')'
INTO ls_ref_attrib-onclick.
ls_ref_attrib-typelink = '->'.
ls_ref_attrib-descript = -descript.
ls_ref_attrib-attvalue = -attvalue.
ls_ref_attrib-owner = -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:
TYPE st_seo_super_class,
TYPE vseoevent.
LOOP AT it_super_class ASSIGNING .
SELECT * FROM vseoevent INTO TABLE lt_event
WHERE clsname = -clsname
AND langu = sy-langu
AND alias = abap_false
AND version = '1'
ORDER BY editorder.
LOOP AT lt_event ASSIGNING .
CLEAR ls_ref_event.
ls_cmpkey-clsname = -clsname.
ls_cmpkey-cmpname = -cmpname.
CALL FUNCTION 'SEO_EVENT_GET'
EXPORTING
evtkey = ls_cmpkey
version = 1
IMPORTING
event =
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0 AND -alias = abap_false.
ls_ref_event-owner = -clsname.
IF -clsname <> i_clsname.
ls_ref_event-inherited = abap_true.
ENDIF.
ls_ref_event-cpdname = -cmpname.
PERFORM get_dom_value_text
USING
'SEOEVTDECL'
-evtdecltyp
CHANGING
ls_ref_event-type.
PERFORM get_dom_value_text
USING
'SEOEXPOSE'
-exposure
CHANGING
ls_ref_event-exposure.
PERFORM seo_get_check_model
USING
CHANGING ls_ref_event.
ls_ref_event-descript = -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:
TYPE st_seo_super_class,
TYPE st_ref_seointerface,
TYPE vseoevent.
LOOP AT it_super_class ASSIGNING .
LOOP AT it_ref_interface ASSIGNING
WHERE owner = -clsname.
SELECT * FROM vseoevent INTO TABLE lt_event
WHERE clsname = -refclsname
AND langu = sy-langu
AND alias = abap_false
AND version = '1'
ORDER BY editorder.
LOOP AT lt_event ASSIGNING .
CLEAR ls_ref_event.
ls_cmpkey-clsname = -refclsname.
IF -clsname <> i_clsname.
ls_ref_event-inherited = abap_true.
ENDIF.
ls_cmpkey-cmpname = -cmpname.
CALL FUNCTION 'SEO_EVENT_GET'
EXPORTING
evtkey = ls_cmpkey
version = 1
IMPORTING
event =
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0 AND -alias = abap_false.
ls_ref_event-owner = -clsname.
CONCATENATE -refclsname '~'
-cmpname INTO ls_ref_event-cpdname.
PERFORM get_dom_value_text
USING
'SEOEVTDECL'
-evtdecltyp
CHANGING
ls_ref_event-type.
PERFORM get_dom_value_text
USING
'SEOEXPOSE'
-exposure
CHANGING
ls_ref_event-exposure.
PERFORM seo_get_check_model
USING
CHANGING ls_ref_event.
ls_ref_event-descript = -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:
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 .
CLEAR ls_ref_friends.
READ TABLE ct_ref_friends TRANSPORTING NO FIELDS
WITH KEY refclsname = -refclsname.
IF sy-subrc <> 0.
ls_ref_friends-refclsname = -refclsname.
PERFORM seo_get_check_model
USING
CHANGING ls_ref_friends.
SELECT SINGLE descript FROM seoclasstx
INTO ls_ref_friends-descript
WHERE clsname = -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:
TYPE st_seo_super_class,
TYPE st_ref_seointerface.
REFRESH:
ct_ref_interface,
ct_ref_interface_all.
LOOP AT it_super_class ASSIGNING .
REFRESH lt_ref_interface_tmp.
PERFORM seo_get_interfaces
USING
-clsname
0
CHANGING
lt_ref_interface_tmp
lt_ref_interface_all_tmp.
LOOP AT lt_ref_interface_tmp ASSIGNING .
-owner = .
IF -clsname <> i_clsname.
-inherited = abap_true.
ENDIF.
APPEND TO ct_ref_interface.
ENDLOOP.
LOOP AT lt_ref_interface_all_tmp
ASSIGNING .
-owner = .
IF -clsname <> i_clsname.
-inherited = abap_true.
ENDIF.
APPEND 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:
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
* with key cpdname = l_cpdname.
* if sy-subrc = 0.
* -inherited = abap_false.
* -redefin = abap_true.
* endif.
* endselect.
*Methods - add to global methods' table
LOOP AT ct_ref_method ASSIGNING .
READ TABLE gt_zseomethod TRANSPORTING NO FIELDS
WITH KEY devclass = is_ztadir-devclass
pgmid = is_ztadir-pgmid
object = is_ztadir-object
clsname = -owner
cpdname = -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 = -owner.
ls_zseomethod-cpdname = -cpdname.
ls_zseomethod-active = -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:
TYPE st_seo_super_class,
TYPE vseomethod,
TYPE st_ref_seomethod,
TYPE seoredef.
LOOP AT it_super_class ASSIGNING .
SELECT * FROM vseomethod INTO TABLE lt_method
WHERE clsname = -clsname
AND langu = sy-langu
AND alias = abap_false
AND version = '1'
ORDER BY editorder.
IF -clsname <> i_clsname.
DELETE lt_method WHERE cmpname = 'CLASS_CONSTRUCTOR'
OR cmpname = 'DESTRUCTOR'.
ENDIF.
LOOP AT lt_method ASSIGNING .
l_cpdname = -cmpname.
READ TABLE ct_ref_method ASSIGNING
WITH KEY cpdname = l_cpdname.
IF sy-subrc = 0
AND l_cpdname <> 'CONSTRUCTOR'.
IF -clsname = i_clsname.
-inherited = abap_false.
UNASSIGN .
ENDIF.
ELSEIF -clsname = i_clsname
OR -exposure > 0.
CLEAR ls_ref_method.
ls_ref_method-cpdname = l_cpdname.
IF -clsname <> i_clsname.
ls_ref_method-inherited = abap_true.
ENDIF.
PERFORM get_dom_value_text
USING
'SEOVERSION'
-version
CHANGING
ls_ref_method-active.
PERFORM get_dom_value_text
USING
'SEOMTDDECL'
-mtddecltyp
CHANGING
ls_ref_method-type.
PERFORM get_dom_value_text
USING
'SEOEXPOSE'
-exposure
CHANGING
ls_ref_method-exposure.
PERFORM seo_get_check_model
USING
CHANGING ls_ref_method.
PERFORM get_dom_value_text
USING
'SEOMTDTYPE'
-mtdtype
CHANGING
ls_ref_method-methodtype.
ls_ref_method-descript = -descript.
ls_ref_method-owner = -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 IS ASSIGNED.
DELETE ct_ref_method
WHERE owner = -owner
AND cpdname = -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:
TYPE st_seo_super_class,
TYPE st_ref_seointerface,
TYPE vseomethod,
TYPE st_ref_seomethod.
LOOP AT it_super_class ASSIGNING .
LOOP AT it_ref_interface ASSIGNING
WHERE owner = -clsname.
SELECT * FROM vseomethod INTO TABLE lt_method
WHERE clsname = -refclsname
AND langu = sy-langu
AND alias = abap_false
AND version = '1'
ORDER BY editorder.
LOOP AT lt_method ASSIGNING .
CONCATENATE
-refclsname '~'
-cmpname
INTO l_cpdname.
READ TABLE ct_ref_method ASSIGNING
WITH KEY cpdname = l_cpdname.
IF sy-subrc <> 0
AND ( -clsname = i_clsname
OR -exposure > 0 ).
CLEAR ls_ref_method.
ls_ref_method-cpdname = l_cpdname.
IF -clsname <> i_clsname.
ls_ref_method-inherited = abap_true.
ENDIF.
PERFORM get_dom_value_text
USING
'SEOVERSION'
-version
CHANGING
ls_ref_method-active.
PERFORM get_dom_value_text
USING
'SEOMTDDECL'
-mtddecltyp
CHANGING
ls_ref_method-type.
PERFORM get_dom_value_text
USING
'SEOEXPOSE'
-exposure
CHANGING
ls_ref_method-exposure.
PERFORM seo_get_check_model
USING
CHANGING ls_ref_method.
PERFORM get_dom_value_text
USING
'SEOMTDTYPE'
-mtdtype
CHANGING
ls_ref_method-methodtype.
ls_ref_method-descript = -descript.
ls_ref_method-owner = -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:
TYPE st_seo_super_class,
TYPE st_ref_seomethod,
TYPE seoredef.
LOOP AT it_super_class ASSIGNING .
SELECT * FROM seoredef INTO TABLE lt_redef
WHERE clsname = -clsname
AND version = '1'.
LOOP AT lt_redef ASSIGNING .
READ TABLE ct_ref_method ASSIGNING
WITH KEY cpdname = -mtdname.
IF sy-subrc = 0.
IF -clsname = i_clsname.
-inherited = abap_false.
-redefin = abap_true.
ENDIF.
-owner = -clsname.
CONCATENATE
-owner '-'
-cpdname
INTO -onclick.
SPLIT -onclick AT '/' INTO TABLE lt_str.
LOOP AT lt_str INTO -onclick.
ENDLOOP.
CONCATENATE
'loadIFrame(''IFRAME'', '''
-onclick '.'
gc_extension_htm ''');'
'switchContent(''IFRAME'')'
INTO -onclick.
PERFORM replace_all
USING '~' '-'
CHANGING -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:
TYPE seotypepls,
TYPE ANY,
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 .
ASSIGN COMPONENT 'EXPLICIT' OF STRUCTURE
TO .
IF IS ASSIGNED AND = abap_true.
APPEND 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 .
IF IS ASSIGNED.
IF = 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:
TYPE ANY,
TYPE ANY,
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 .
IF 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 .
IF IS ASSIGNED.
CLEAR ls_ti.
ls_ti-name = txt_shared_memory_enabled.
ls_ti-flag = abap_true.
ls_ti-value = .
APPEND ls_ti TO ct_ti.
ENDIF.
ASSIGN COMPONENT 'MSG_ID' OF STRUCTURE is_vseoclass TO .
IF IS ASSIGNED.
CLEAR ls_ti.
ls_ti-name = txt_message_class.
ls_ti-value = .
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:
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_addons-strlen = strlen(
-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:
TYPE st_seo_super_class,
TYPE vseotype.
REFRESH:
ct_ref_type,
ct_ref_type_par.
LOOP AT it_super_class ASSIGNING .
SELECT * FROM vseotype INTO TABLE lt_seotype
WHERE clsname = -clsname
AND langu = sy-langu
AND version = '1'
ORDER BY editorder.
LOOP AT lt_seotype ASSIGNING .
CLEAR ls_ref_type.
ls_ref_type-cpdname = -cmpname.
ls_ref_type-owner = -clsname.
IF -clsname <> i_clsname.
ls_ref_type-inherited = abap_true.
ENDIF.
PERFORM get_dom_value_text
USING
'SEOTYPTYPE'
-typtype
CHANGING
ls_ref_type-typtype.
ls_ref_type-type = -type.
l_str = -exposure.
CONDENSE l_str.
CONCATENATE 'COMPONENTS_' l_str '_' INTO l_str.
PERFORM get_id
USING l_str -clsname
CHANGING l_id.
CONCATENATE 'switchContent(''' l_id ''')'
INTO ls_ref_type-onclick.
ls_ref_type-typelink = '->'.
ls_ref_type-descript =