*&---------------------------------------------------------------------*
*& Include ZSOFTCOPY_O2 *
*& *
*&---------------------------------------------------------------------*
*& *
*& 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 *
*& *
*&---------------------------------------------------------------------*
*-----------------------------------------------------------------------
* o2
*-----------------------------------------------------------------------
FORM o2.
*BSP Application
PERFORM o2_r3tr_wapa.
*BSP Applications
PERFORM o2_r3tr_wapa_appl.
*Mimes
PERFORM o2_r3tr_wapa_mime.
*BSP Extension
PERFORM o2_r3tr_wtag.
*BSP Extensions
PERFORM o2_r3tr_wtag_ext.
*XSLT
PERFORM o2_r3tr_xslt.
ENDFORM. "o2
*-----------------------------------------------------------------------
* o2_get_mime_content
*-----------------------------------------------------------------------
FORM o2_get_mime_content
USING
value(i_objtype)
value(i_class)
value(i_objid)
CHANGING
ct_content_ascii TYPE it_o2content_ascii
ct_content_binary TYPE it_o2content_binary
c_filesize TYPE i.
DATA:
lo_io TYPE REF TO data,
lo_phio TYPE REF TO data,
lo_error TYPE REF TO data,
lt_class_filter TYPE it_o2class_filter,
lt_relation TYPE it_o2relation,
lt_file_info TYPE it_o2file_info.
FIELD-SYMBOLS:
TYPE ANY,
TYPE ANY,
TYPE ANY,
TYPE ANY,
TYPE st_o2relation,
TYPE st_o2file_info.
CREATE DATA lo_io TYPE ('SKWF_IO').
ASSIGN lo_io->* TO .
CREATE DATA lo_phio TYPE ('SKWF_IO').
ASSIGN lo_phio->* TO .
CREATE DATA lo_error TYPE ('SKWF_ERROR').
ASSIGN lo_error->* TO .
ASSIGN COMPONENT 'OBJTYPE' OF STRUCTURE TO .
= i_objtype.
ASSIGN COMPONENT 'CLASS' OF STRUCTURE TO .
= i_class.
ASSIGN COMPONENT 'OBJID' OF STRUCTURE TO .
= i_objid.
CALL FUNCTION 'SKWF_IO_FROM_RELATIONS_GET'
EXPORTING
io =
IMPORTING
error =
TABLES
class_filter = lt_class_filter
relations = lt_relation.
CHECK IS INITIAL.
LOOP AT lt_relation ASSIGNING .
CLEAR .
ASSIGN COMPONENT 'OBJTYPE' OF STRUCTURE TO .
= -objtype.
ASSIGN COMPONENT 'CLASS' OF STRUCTURE TO .
= -prtn_class.
ASSIGN COMPONENT 'OBJID' OF STRUCTURE TO .
= -prtn_id.
CALL FUNCTION 'SKWF_PHIO_LOAD_CONTENT'
EXPORTING
phio =
IMPORTING
error =
TABLES
file_access_info = lt_file_info
file_content_ascii = ct_content_ascii
file_content_binary = ct_content_binary.
LOOP AT lt_file_info ASSIGNING .
c_filesize = -file_size.
ENDLOOP.
ENDLOOP.
ENDFORM. "get_mime_content
*-----------------------------------------------------------------------
* o2_get_mimes
*-----------------------------------------------------------------------
FORM o2_get_mimes
USING value(i_folder_name)
CHANGING ct_mime TYPE it_mime.
DATA:
l_folder_name1(4096) TYPE c,
l_folder_name2(4096) TYPE c,
ls_folder TYPE st_skwf_io,
ls_error TYPE st_skwf_error,
ls_parent TYPE st_skwf_io,
lt_io TYPE it_skwf_io,
ls_io TYPE st_skwf_io,
l_prefix(4096) TYPE c,
l_len TYPE i,
ls_mime TYPE st_mime,
l_url(4096) TYPE c,
l_rel_url(64) TYPE c,
l_filename(255) TYPE c,
l_url_prefix TYPE seovalue.
REFRESH ct_mime.
PERFORM get_class_attribute_value
USING
'CL_WB_MIME_REPOSITORY'
'MR_URL_PREFIX'
CHANGING
l_url_prefix.
IF l_url_prefix IS INITIAL.
l_url_prefix = '/'.
ENDIF.
CONCATENATE l_url_prefix 'SAP' INTO l_url.
CALL FUNCTION 'SKWF_NMSPC_IO_FIND_BY_ADDRESS'
EXPORTING
url = l_url
appl = 'MIME'
IMPORTING
io = ls_parent
error = ls_error.
IF NOT ls_parent IS INITIAL.
l_folder_name1 = i_folder_name.
DO.
IF l_folder_name1 CS '/'.
SPLIT l_folder_name1 AT '/' INTO l_folder_name2 l_folder_name1.
ELSE.
l_folder_name2 = l_folder_name1.
ENDIF.
CALL FUNCTION 'SKWF_NMSPC_IO_FIND_BY_ADDRESS'
EXPORTING
url = l_folder_name2
folder = ls_parent
IMPORTING
io = ls_folder
error = ls_error.
IF ls_folder IS INITIAL
OR l_folder_name2 = l_folder_name1.
EXIT.
ENDIF.
ls_parent = ls_folder.
ENDDO.
IF NOT ls_folder IS INITIAL.
CALL FUNCTION 'SKWF_FOLDER_SUB_IOS_GET'
EXPORTING
folder = ls_folder
io_type = 'L'
IMPORTING
error = ls_error
TABLES
ios = lt_io.
IF ls_error IS INITIAL.
CONCATENATE l_url_prefix 'SAP/' i_folder_name '/'
INTO l_prefix.
l_len = strlen( l_prefix ).
LOOP AT lt_io INTO ls_io.
CLEAR ls_mime.
CALL FUNCTION 'SKWF_NMSPC_IO_ADDRESS_GET'
EXPORTING
io = ls_io
IMPORTING
url = l_url
relative_url = l_rel_url
error = ls_error.
IF ls_error IS INITIAL.
* Shave off prefix of URL
SHIFT l_url BY l_len PLACES.
ls_mime-key = l_url.
TRANSLATE ls_mime-key TO UPPER CASE.
ls_mime-name = l_url.
ls_mime-objtype = ls_io-objtype.
ls_mime-class = ls_io-class.
ls_mime-objid = ls_io-objid.
l_filename = l_rel_url.
* Get MIME type from filename
CALL FUNCTION 'SKWF_MIMETYPE_OF_FILE_GET'
EXPORTING
filename = l_filename
IMPORTING
mimetype = ls_mime-mimetype.
* Get MIME type description
IF NOT ls_mime-mimetype IS INITIAL.
CALL FUNCTION 'SKWF_MIMETYPE_DESCRIPTION_GET'
EXPORTING
mimetype = ls_mime-mimetype
language = sy-langu
IMPORTING
descript = ls_mime-mimetype_descript.
ENDIF.
IF NOT ls_mime IS INITIAL.
APPEND ls_mime TO ct_mime.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
SORT ct_mime BY key.
ENDFORM. "get_mimes
*-----------------------------------------------------------------------
* o2_get_url
*-----------------------------------------------------------------------
FORM o2_get_url
USING
value(i_https) TYPE flag
value(i_applname) "char30
value(i_pagekey) "char70
value(i_pagename) "char70
value(i_pagetype) TYPE c
value(i_is_error_page) TYPE flag
CHANGING
c_url TYPE string.
DATA:
lo_page TYPE REF TO data.
FIELD-SYMBOLS:
TYPE ANY,
TYPE ANY.
CREATE DATA lo_page TYPE ('O2PAGENAME').
ASSIGN lo_page->* TO .
ASSIGN COMPONENT 'APPLNAME' OF STRUCTURE TO .
= i_applname.
ASSIGN COMPONENT 'PAGEKEY' OF STRUCTURE TO .
= i_pagekey.
ASSIGN COMPONENT 'PAGENAME' OF STRUCTURE TO .
= i_pagename.
ASSIGN COMPONENT 'PAGETYPE' OF STRUCTURE TO .
= i_pagetype.
ASSIGN COMPONENT 'IS_ERROR_PAGE' OF STRUCTURE TO .
= i_is_error_page.
CALL METHOD ('CL_O2_HELPER')=>generate_url_for_page
EXPORTING
p_page =
p_secure_http = i_https
IMPORTING
p_url = c_url
EXCEPTIONS
OTHERS = 1.
ENDFORM. "get_url
*-----------------------------------------------------------------------
* o2_r3tr_wapa BSP Application
*-----------------------------------------------------------------------
FORM o2_r3tr_wapa.
DATA:
lt_tabstrip TYPE it_tabstrip,
lt_html TYPE it_string,
ls_attributes TYPE st_attributes,
lo_appl TYPE REF TO data,
lo_applt TYPE REF TO data,
l_applname(30) TYPE c,
l_applext(30) TYPE c,
l_bname TYPE xubname,
l_name_text TYPE ad_namtext,
ls_o2navigation TYPE st_o2navigation,
lt_o2navigation TYPE it_o2navigation,
lo_navgraph TYPE REF TO data,
l_pagekey(70) TYPE c,
l_flag TYPE flag.
FIELD-SYMBOLS:
TYPE st_ztadir,
TYPE ANY,
TYPE ANY,
TYPE ANY,
TYPE ANY,
TYPE st_tabstrip.
LOOP AT gt_ztadir ASSIGNING
WHERE pgmid = 'R3TR'
AND object = 'WAPA'
AND o2pagekey = space
AND downloaded = abap_false.
-downloaded = abap_true.
IF NOT IS ASSIGNED.
PERFORM get_tabstrip
USING 'O2_R3TR_WAPA' space
CHANGING lt_tabstrip.
CREATE DATA lo_navgraph TYPE ('O2NAVGRAPH').
ASSIGN lo_navgraph->* TO .
CREATE DATA lo_appl TYPE ('O2APPL').
ASSIGN lo_appl->* TO .
CREATE DATA lo_applt TYPE ('O2APPLT').
ASSIGN lo_applt->* TO .
ENDIF.
REFRESH:
lt_html,
lt_o2navigation.
CLEAR:
ls_attributes,
l_applname,
l_applext,
,
.
*Properties
l_applname = -obj_name.
SELECT SINGLE * FROM ('O2APPL') INTO
WHERE applname = l_applname
AND version = 'A'.
IF sy-subrc = 0.
ASSIGN COMPONENT 'APPLEXT' OF STRUCTURE TO .
l_applext = .
ls_attributes-space_after_descript = abap_true.
ls_attributes-is_bsp_appl = abap_true.
ls_attributes-descript = -descript.
ASSIGN COMPONENT 'AUTHOR' OF STRUCTURE TO .
ls_attributes-author = .
l_bname = .
PERFORM get_user
USING l_bname
CHANGING l_name_text.
ls_attributes-author_text = l_name_text.
ASSIGN COMPONENT 'CREATEDON' OF STRUCTURE TO .
PERFORM get_date
USING
CHANGING ls_attributes-date_created.
ASSIGN COMPONENT 'CHANGEDBY' OF STRUCTURE TO .
ls_attributes-bname = .
l_bname = .
PERFORM get_user
USING l_bname
CHANGING l_name_text.
ls_attributes-name_text = l_name_text.
ASSIGN COMPONENT 'CHANGEDON' OF STRUCTURE TO .
PERFORM get_date
USING
CHANGING ls_attributes-date_last_changed.
ls_attributes-devclass = -devclass.
PERFORM get_devclass
USING -devclass
CHANGING ls_attributes-devclass_descr.
PERFORM get_spras
USING
-masterlang
CHANGING
ls_attributes-laiso
ls_attributes-sptxt.
ASSIGN COMPONENT 'APPLNAME' OF STRUCTURE TO .
ls_attributes-internal_name = .
ASSIGN COMPONENT 'STARTPAGE' OF STRUCTURE TO .
ls_attributes-initial_bsp = .
ASSIGN COMPONENT 'APPLCLAS' OF STRUCTURE TO .
ls_attributes-application_class = .
ASSIGN COMPONENT 'THEME' OF STRUCTURE TO .
ls_attributes-initial_bsp = .
ASSIGN COMPONENT 'STATEFUL' OF STRUCTURE TO .
ls_attributes-stateful = .
ASSIGN COMPONENT 'SESSIONMANAGEMNT' OF STRUCTURE
TO .
ls_attributes-supports_portal_integration = .
ENDIF.
*Navigation
SELECT * FROM ('O2NAVGRAPH') INTO
WHERE applname = l_applname
AND version = 'A'.
CLEAR ls_o2navigation.
* * * Navigation Request
ASSIGN COMPONENT 'NODEEXIT' OF STRUCTURE
TO .
ls_o2navigation-navrequest = .
* * * Start
ASSIGN COMPONENT 'CURRNODE' OF STRUCTURE
TO .
SELECT SINGLE pagekey FROM ('O2NAVMAP') INTO l_pagekey
WHERE applname = l_applname
AND version = 'A'
AND node = .
IF sy-subrc = 0.
SELECT SINGLE pagename FROM ('O2PAGDIR')
INTO ls_o2navigation-start
WHERE applname = l_applname
AND pagekey = l_pagekey.
ENDIF.
* * * Target
ASSIGN COMPONENT 'FUPNODE' OF STRUCTURE
TO .
SELECT SINGLE pagekey FROM ('O2NAVMAP') INTO l_pagekey
WHERE applname = l_applname
AND version = 'A'
AND node = .
IF sy-subrc = 0.
SELECT SINGLE pagename FROM ('O2PAGDIR')
INTO ls_o2navigation-target
WHERE applname = l_applname
AND pagekey = l_pagekey.
ENDIF.
* * *
APPEND ls_o2navigation TO lt_o2navigation.
ENDSELECT.
*** TabStrip
LOOP AT lt_tabstrip ASSIGNING .
-empty = abap_false.
CASE -id.
WHEN 'NAVIGATION'.
IF lt_o2navigation IS INITIAL.
-empty = abap_true.
ENDIF.
ENDCASE.
ENDLOOP.
*HTML
PERFORM html_main_header
USING
tpt_o2_wapa
txt_bsp_application
l_applext
txt_active___1
space
space
space
lt_tabstrip
gt_link
CHANGING
lt_html.
l_flag = abap_false.
IF lt_o2navigation IS INITIAL.
l_flag = abap_true.
ENDIF.
PERFORM html_add_attributes_2
USING
ls_attributes
'PROPERTIES'
l_flag
CHANGING
lt_html.
IF NOT lt_o2navigation IS INITIAL
OR g_empty_tab = gc_empty_tab_display.
PERFORM html_add_table
USING
'WAPA_NAVI'
lt_o2navigation
lt_o2navigation
'NAVIGATION'
abap_true
CHANGING
lt_html.
ENDIF.
PERFORM html_main_footer
USING
lt_html.
PERFORM download
USING
lt_html
-pgmid
-object
-obj_name
gc_extension_htm
abap_true.
ENDLOOP.
ENDFORM. "r3tr_wapa
*-----------------------------------------------------------------------
* o2_r3tr_wapa_appl BSP Applications
*-----------------------------------------------------------------------
FORM o2_r3tr_wapa_appl.
DATA:
mt_string TYPE it_string.
TYPES:
BEGIN OF st_o2pagevhs,
applname(30) TYPE c,
pagekey(70) TYPE c,
evhandler(30) TYPE c,
version TYPE c,
evhname(30) TYPE c,
source LIKE mt_string,
END OF st_o2pagevhs,
it_o2pagevhs TYPE SORTED TABLE OF st_o2pagevhs
WITH UNIQUE KEY evhandler.
DATA:
lt_html TYPE it_string,
l_objname(110) TYPE c,
l_applname(30) TYPE c,
l_pagekey(70) TYPE c,
l_pagename(70) TYPE c,
l_pagetype(1) TYPE c,
l_is_error_page TYPE flag,
l_https TYPE flag,
lo_pagdir TYPE REF TO data,
ls_ti TYPE st_textinput,
ls_rb TYPE st_access,
lt_prop_header TYPE it_textinput,
lt_prop_page_type_rb TYPE it_access,
lt_prop_page_type_ti TYPE it_textinput,
lt_prop_error_handling TYPE it_textinput,
lt_prop_status_rb TYPE it_access,
lt_prop_status_ti TYPE it_textinput,
lt_prop_caching_li TYPE it_textinput,
lt_prop_caching_re TYPE it_textinput,
lt_prop_transfer_options_li TYPE it_textinput,
lt_prop_transfer_options_re TYPE it_textinput,
lt_prop_footer TYPE it_textinput,
lt_dom_value TYPE it_dom_value,
l_bname TYPE xubname,
l_name TYPE ad_namtext,
lt_line TYPE it_line,
lt_layout_src TYPE it_string,
l_str TYPE string,
lt_o2pagevhs TYPE it_o2pagevhs,
lt_o2pagpars TYPE it_o2pagpars,
lt_typesrc TYPE it_string,
lt_used_guid TYPE it_guid,
lt_tabstrip TYPE it_tabstrip,
l_o2type TYPE c,
l_type(4) TYPE c,
l_filename TYPE string,
l_filename2 TYPE string,
lt_pageattr TYPE it_o2pageattr,
ls_pageattr TYPE st_o2pageattr,
l_flag TYPE flag,
ls_tabstrip TYPE st_tabstrip,
l_type_title TYPE string,
l_title TYPE string,
l_id TYPE string,
l_javascript TYPE string.
FIELD-SYMBOLS:
TYPE st_ztadir,
TYPE ANY,
TYPE st_line,
TYPE ANY,
TYPE st_dom_value,
TYPE st_o2pagevhs,
TYPE st_o2pagpars,
TYPE st_tabstrip.
LOOP AT gt_ztadir ASSIGNING
WHERE pgmid = 'R3TR'
AND object = 'WAPA'
AND o2pagekey <> space
AND (
o2type = gc_o2type_bsp
OR o2type = gc_o2type_ctrl
OR o2type = gc_o2type_incl
OR o2type = gc_o2type_view
)
AND downloaded = abap_false.
-downloaded = abap_true.
IF NOT IS ASSIGNED.
CREATE DATA lo_pagdir TYPE ('O2PAGATTR').
ASSIGN lo_pagdir->* TO .
ENDIF.
REFRESH:
lt_html,
lt_prop_header,
lt_prop_page_type_rb,
lt_prop_page_type_ti,
lt_prop_error_handling,
lt_prop_status_rb,
lt_prop_status_ti,
lt_prop_caching_li,
lt_prop_caching_re,
lt_prop_transfer_options_li,
lt_prop_transfer_options_re,
lt_prop_footer,
lt_layout_src,
lt_o2pagevhs,
lt_o2pagpars,
lt_typesrc,
lt_used_guid,
lt_tabstrip,
lt_pageattr.
CLEAR:
l_objname,
l_o2type,
,
l_type,
l_filename,
l_filename2,
l_flag,
l_type_title,
l_title,
l_id,
l_javascript.
l_applname = -obj_name.
l_pagekey = -o2pagekey.
l_objname+0(30) = -obj_name.
l_objname+30(70) = -o2pagekey.
CALL FUNCTION 'O2_GET_WAPA_SOURCEN'
EXPORTING
p_objname = l_objname
p_versno = 0
p_devclass = -devclass
p_langu = sy-langu
p_master_l = sy-langu
IMPORTING
pt_page_content = lt_line
pt_ev_handler = lt_o2pagevhs
pt_parameters = lt_o2pagpars
ps_page_attr =
pt_typesource = lt_typesrc
pt_used_guids = lt_used_guid
EXCEPTIONS
OTHERS = 1.
ASSIGN COMPONENT 'PAGENAME' OF STRUCTURE TO .
l_pagename = .
* Properties - Header
* Description
CLEAR ls_ti.
ls_ti-name = txt_description.
ls_ti-value = -descript.
ls_ti-input = abap_true.
APPEND ls_ti TO lt_prop_header.
*
IF -o2type = gc_o2type_ctrl.
* Controller Class
CLEAR ls_ti.
ls_ti-name = txt_controller_class.
ASSIGN COMPONENT 'IMPLCLASS' OF STRUCTURE TO .
ls_ti-value = .
ls_ti-input = abap_true.
APPEND ls_ti TO lt_prop_header.
ENDIF.
*
IF -o2type = gc_o2type_bsp
OR -o2type = gc_o2type_view.
* Mime Type
CLEAR ls_ti.
ls_ti-name = txt_mime_type.
ASSIGN COMPONENT 'MIMETYPE' OF STRUCTURE TO .
ls_ti-value = .
IF ls_ti-value IS INITIAL.
ls_ti-value = 'application/octet-stream'.
ENDIF.
ls_ti-input = abap_true.
APPEND ls_ti TO lt_prop_header.
* Compression
CLEAR ls_ti.
ls_ti-name = txt_compression.
ASSIGN COMPONENT 'STRIPMODE' OF STRUCTURE
TO .
PERFORM get_dom_value_text
USING 'O2STRIPMODE'
CHANGING ls_ti-value.
ls_ti-input = abap_true.
APPEND ls_ti TO lt_prop_header.
* W/O Script Code
CLEAR ls_ti.
ls_ti-name = txt_wo_script_code.
ASSIGN COMPONENT 'NO_SCRIPT' OF STRUCTURE TO .
ls_ti-value = .
ls_ti-flag = abap_true.
APPEND ls_ti TO lt_prop_header.
ENDIF.
*
IF -o2type = gc_o2type_bsp
OR -o2type = gc_o2type_incl
OR -o2type = gc_o2type_view.
* Properties - Page Type
ASSIGN COMPONENT 'PAGETYPE' OF STRUCTURE TO .
l_pagetype = .
* View
CLEAR ls_rb.
ls_rb-ddtext = txt_view.
IF l_pagetype = gc_o2type_view.
ls_rb-checked = abap_true.
ENDIF.
APPEND ls_rb TO lt_prop_page_type_rb.
* Page with Flow Logic
CLEAR ls_rb.
ls_rb-ddtext = txt_page_with_flow_logic.
IF l_pagetype = gc_o2type_bsp.
ls_rb-checked = abap_true.
ENDIF.
APPEND ls_rb TO lt_prop_page_type_rb.
* Page Fragment
CLEAR ls_rb.
ls_rb-ddtext = txt_page_fragment.
IF l_pagetype = gc_o2type_incl.
ls_rb-checked = abap_true.
ENDIF.
APPEND ls_rb TO lt_prop_page_type_rb.
* Controller class
CLEAR ls_ti.
ls_ti-name = txt_controller_class.
ASSIGN COMPONENT 'CONTROLLERURL' OF STRUCTURE
TO .
ls_ti-value = .
ls_ti-input = abap_true.
APPEND ls_ti TO lt_prop_page_type_ti.
ENDIF.
*
IF -o2type = gc_o2type_bsp
OR -o2type = gc_o2type_ctrl
OR -o2type = gc_o2type_view.
* Properties - Error Handling
* Is Error Page
CLEAR ls_ti.
ls_ti-name = txt_is_error_page.
ASSIGN COMPONENT 'IS_ERROR_PAGE' OF STRUCTURE
TO .
l_is_error_page = .
ls_ti-value = l_is_error_page.
ls_ti-flag = abap_true.
APPEND ls_ti TO lt_prop_error_handling.
* Assigned Error Page
CLEAR ls_ti.
ls_ti-name = txt_assigned_error_page.
ASSIGN COMPONENT 'ERROR_PAGE' OF STRUCTURE
TO .
ls_ti-value = .
ls_ti-input = abap_true.
APPEND ls_ti TO lt_prop_error_handling.
ENDIF.
*
IF -o2type = gc_o2type_bsp
OR -o2type = gc_o2type_ctrl.
* Properties - Status
PERFORM get_dom_value_texts
USING 'O2PAGSTATE'
CHANGING lt_dom_value.
SORT lt_dom_value BY value.
ASSIGN COMPONENT 'STATE' OF STRUCTURE TO .
LOOP AT lt_dom_value ASSIGNING .
CLEAR ls_rb.
ls_rb-ddtext = -text.
IF -value = .
ls_rb-checked = abap_true.
ENDIF.
APPEND ls_rb TO lt_prop_status_rb.
ENDLOOP.
* Lifetime
CLEAR ls_ti.
ls_ti-name = txt_lifetime.
ASSIGN COMPONENT 'LIFETIME' OF STRUCTURE TO .
PERFORM get_dom_value_text
USING 'O2LIFETIME'
CHANGING ls_ti-value.
ls_ti-input = abap_true.
APPEND ls_ti TO lt_prop_status_ti.
* Properties - Caching
* Browser Cache
CLEAR ls_ti.
ls_ti-name = txt_browser_cache.
ASSIGN COMPONENT 'BROWSER_CACHE' OF STRUCTURE
TO .
ls_ti-value = .
ls_ti-input = abap_true.
ls_ti-description = txt_sec.
APPEND ls_ti TO lt_prop_caching_li.
* Server Cache
CLEAR ls_ti.
ls_ti-name = txt_server_cache.
ASSIGN COMPONENT 'SERVER_CACHE' OF STRUCTURE
TO .
ls_ti-value = .
ls_ti-input = abap_true.
ls_ti-description = txt_sec.
APPEND ls_ti TO lt_prop_caching_li.
*
CLEAR ls_ti.
ls_ti-space = abap_true.
APPEND ls_ti TO lt_prop_caching_re.
* Browser-Specific
CLEAR ls_ti.
ls_ti-name = txt_browser_specific.
ASSIGN COMPONENT 'BROWSER_DEP' OF STRUCTURE
TO .
ls_ti-value = .
ls_ti-flag = abap_true.
APPEND ls_ti TO lt_prop_caching_re.
* Properties - Transfer Options
* Compression
CLEAR ls_ti.
ls_ti-name = txt_compression.
ASSIGN COMPONENT 'COMPRESSION' OF STRUCTURE
TO .
ls_ti-value = .
ls_ti-flag = abap_true.
APPEND ls_ti TO lt_prop_transfer_options_li.
ENDIF.
*
IF -o2type = gc_o2type_bsp
OR -o2type = gc_o2type_ctrl
OR -o2type = gc_o2type_view.
* Delta Handling
CLEAR ls_ti.
ls_ti-name = txt_delta_handling.
ASSIGN COMPONENT 'DELTA_HANDLING' OF STRUCTURE
TO .
ls_ti-value = .
ls_ti-flag = abap_true.
APPEND ls_ti TO lt_prop_transfer_options_li.
ENDIF.
*
IF -o2type = gc_o2type_bsp
OR -o2type = gc_o2type_ctrl.
* HTTPS
CLEAR ls_ti.
ls_ti-name = txt_https.
ASSIGN COMPONENT 'SECUREHTTP' OF STRUCTURE
TO .
l_https = .
ls_ti-value = l_https.
ls_ti-flag = abap_true.
APPEND ls_ti TO lt_prop_transfer_options_re.
ENDIF.
* Properties - Footer
* Created on
CLEAR ls_ti.
ls_ti-name = txt_created_on.
ASSIGN COMPONENT 'AUTHOR' OF STRUCTURE TO .
l_bname = .
PERFORM get_user
USING l_bname
CHANGING l_name.
ls_ti-value = l_bname.
ls_ti-value_text = l_name.
ASSIGN COMPONENT 'CREATEDON' OF STRUCTURE TO .
PERFORM get_date
USING
CHANGING ls_ti-value_ext.
ls_ti-input = abap_true.
ls_ti-has_value_ext = abap_true.
APPEND ls_ti TO lt_prop_footer.
* Last Changed on
CLEAR ls_ti.
ls_ti-name = txt_last_changed_on.
ASSIGN COMPONENT 'CHANGEDBY' OF STRUCTURE TO .
l_bname = .
PERFORM get_user
USING l_bname
CHANGING l_name.
ls_ti-value = l_bname.
ls_ti-value_text = l_name.
ASSIGN COMPONENT 'CHANGEDON' OF STRUCTURE TO .
PERFORM get_date
USING
CHANGING ls_ti-value_ext.
ls_ti-input = abap_true.
ls_ti-has_value_ext = abap_true.
APPEND ls_ti TO lt_prop_footer.
* Package
CLEAR ls_ti.
ls_ti-name = txt_package.
ls_ti-value = -devclass.
ls_ti-input = abap_true.
APPEND ls_ti TO lt_prop_footer.
*
IF -o2type = gc_o2type_bsp
OR -o2type = gc_o2type_ctrl.
* URL
CLEAR ls_ti.
ls_ti-name = txt_url.
PERFORM o2_get_url
USING
l_https
l_applname
l_pagekey
l_pagename
l_pagetype
l_is_error_page
CHANGING
ls_ti-value.
ls_ti-input = abap_true.
APPEND ls_ti TO lt_prop_footer.
ENDIF.
* Layout
IF -o2type = gc_o2type_bsp
OR -o2type = gc_o2type_incl
OR -o2type = gc_o2type_view.
LOOP AT lt_line ASSIGNING .
l_str = -line.
APPEND l_str TO lt_layout_src.
ENDLOOP.
ENDIF.
* Page Attributes
IF -o2type = gc_o2type_bsp
OR -o2type = gc_o2type_view.
LOOP AT lt_o2pagpars ASSIGNING .
CLEAR ls_pageattr.
MOVE-CORRESPONDING TO ls_pageattr.
PERFORM get_dom_value_text
USING
'O2TYPTYPE'
ls_pageattr-typtype
CHANGING
ls_pageattr-typtype_txt.
IF ls_pageattr-pardecltyp = '0'.
ls_pageattr-pardecltyp_flag = abap_true.
ENDIF.
APPEND ls_pageattr TO lt_pageattr.
ENDLOOP.
ENDIF.
l_o2type = -o2type.
IF l_o2type IS INITIAL.
l_o2type = 'B'.
ENDIF.
PERFORM get_tabstrip
USING 'O2_R3TR_WAPA_APPL' l_o2type
CHANGING lt_tabstrip.
LOOP AT lt_tabstrip ASSIGNING .
-empty = abap_false.
CASE -id.
WHEN 'LAYOUT'.
IF lt_layout_src IS INITIAL.
-empty = abap_true.
ELSE.
CONCATENATE l_javascript 'makeDivSize(''LAYOUT'');'
INTO l_javascript.
ENDIF.
WHEN 'EVENT_HANDLER'.
IF lt_o2pagevhs IS INITIAL.
-empty = abap_true.
ENDIF.
WHEN 'PAGE_ATTRIBUTES'.
IF lt_pageattr IS INITIAL.
-empty = abap_true.
ENDIF.
WHEN 'TYPE_DEFINITIONS'.
IF lt_typesrc IS INITIAL.
-empty = abap_true.
ELSE.
CONCATENATE l_javascript
'makeDivSize(''TYPE_DEFINITIONS'');'
INTO l_javascript.
ENDIF.
ENDCASE.
ENDLOOP.
LOOP AT lt_o2pagevhs ASSIGNING .
CLEAR ls_tabstrip.
ls_tabstrip-form = 'O2_R3TR_WAPA_APPL'.
ls_tabstrip-id = -evhandler.
ls_tabstrip-parent_id = 'EVENT_HANDLER'.
ls_tabstrip-text =