Professional Documents
Culture Documents
This document may discuss sample coding or other information that does not include SAP official interfaces
and therefore is not supported by SAP. Changes made based on this information are not supported and can
be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods
suggested in this document, and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of
this technical article or code sample, including any liability resulting from incompatibility between the content
within this document and the materials and services offered by SAP. You agree that you will not hold, or seek
to hold, SAP responsible or liable with respect to the content of this document.
Applies To:
Web Application Server, Business Server Pages and Global Classes in ABAP.
Summary
BSP applications are very critical and high value adding applications in most SAP implementation scenarios.
Being able to have proper backups (on local drives i.e. on presentation server / desktop) of the source code in
the development phase of a BSP application is thus very desirable. Currently we do not have a tool or utility
program at the ABAP Workbench using which one can take a backup of a BSP application on the
presentation server. Attempting to have a back up of any BSP application is a cumbersome process involving
saving each piece of code and later uploading them independently that is prone to committing errors.
The code presented in this document addresses this requirement. It will save the entire source code of any
BSP application to a local drive in to different folders in a well-organized manner. This code also works to
save (download to local drives) any Global classes and their Methods.
The way this code functions in case of saving a BSP application and in case of saving Global classes is
further explained below.
BSP Application
Application related information like it’s Name, Description etc is downloaded and saved into a .txt file.
Creates CONTROLLERS folder in which all the Controllers for that particular BSP application will be
downloaded.
Creates a xxxx.do file for each Controller and saves the Controller information in it. The file can be viewed
using Windows Notepad. It also downloads the Controller Class Methods, Attributes, Interfaces, Types etc
and saves into a .txt file.
All the PAGEWITHFLOWLOGIC source code will be downloaded and saved into a .htm file.
It downloads all the Views into separate directory, with the same extension that can be viewed using Windows
Notepad.
Global Classes
Downloads the Attributes, Methods, Method Parameters and Source Code for each Method of the Class and
saves into a .txt file.
Table of Contents
SDN Community Contribution ..........................................................................................................1
Applies To:........................................................................................................................................2
Summary ..........................................................................................................................................2
Before Running.................................................................................................................................4
Author Bio.....................................................................................................................................126
Before Running
Few things to do before running the program
You need to create the following text elements to understand more clearly
Selection Texts
CHK_ATTR Attributes
CHK_CONT Controllers
CHK_EVTS Events
CHK_METH Methods
CHK_TYPE Types
CHK_VIEW Views
Screen Shots
Source Code
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
***********************************************************************
* TABLES
**********************************************************************
tables: seoclass,
o2appl,
o2pagcon.
***********************************************************************
* TYPE-POOLS
**********************************************************************
type-pools: seoo,seos,seor,seof,seot,seok,seop.
***********************************************************************
* TYPE DEFINITIONS
**********************************************************************
end of t_class.
end of t_component.
cmpname(30),
decltyp(20),
exposur(15),
typtype(15),
type(110),
attval(110),
desc(100),
end of t_format.
pad(4),
sconame(30),
decl(10),
pass(20),
optn(10),
typtype(15),
type(100),
valu(100),
desc(100),
end of t_format1.
pad(4),
sconame(30),
desc(100),
end of t_format2.
end of t_mtd_compo.
end of t_bspappl.
end of t_pagdetl.
end of t_pagcon.
end of t_pagedata.
etype type c,
end of t_scr_out.
***********************************************************************
* DATA DECLARATIONS
**********************************************************************
v_lines type i,
r_temp_all type c,
***********************************************************************
**********************************************************************
***********************************************************************
* CONSTANTS DECLARATIONS
**********************************************************************
***********************************************************************
* SELECTION SCREENS
**********************************************************************
parameters : r_bspall radiobutton group rad1 user-command u1 modif id bsp default 'X',
parameters : r_all radiobutton group rbsp user-command u2 modif id cls default 'X',
***********************************************************************
* INTIALIZATION
**********************************************************************
initialization.
v_repid = sy-repid.
v_dynnr = sy-dynnr.
v_langu = sy-langu.
***********************************************************************
* AT SELECTION-SCREEN OUTPUT
**********************************************************************
at selection-screen output.
loop at screen.
if chk_bsp = 'X'.
screen-active = 1.
endif.
else.
screen-active = 0.
endif.
endif.
if r_bspall = 'X'.
if screen-group1 = 'BS1'.
screen-active = 0.
endif.
else.
if screen-group1 = 'BS1'.
screen-active = 1.
endif.
endif.
modify screen.
endloop.
loop at screen.
if chk_cls = 'X'.
screen-active = 1.
endif.
else.
screen-active = 0.
endif.
endif.
if r_all = 'X'.
if screen-group1 = 'CL1'.
screen-active = 0.
endif.
else.
if screen-group1 = 'CL1'.
screen-active = 1.
endif.
endif.
modify screen.
endloop.
***********************************************************************
* AT SELECTION-SCREEN
**********************************************************************
at selection-screen.
***********************************************************************
* START OF SELECTION
**********************************************************************
start-of-selection.
* If the user selected BSP check box then we need to do down load the BSP application
chk_bsp is initial.
exit.
endif.
if chk_bsp = 'X'.
refresh it_bspappl.
clear it_bspappl.
if s_bspapp is initial.
set pf-status'AA'.
exit.
endif.
if p_dirnam is initial.
exit.
else.
if r_bspall = 'X'.
clear : chk_cont,chk_view,chk_pgfl,chk_frag.
endif.
select a~applname
a~applclas
a~startpage
a~stateful
on a~applname = b~applname
b~langu = v_langu.
clear v_lines.
if v_lines > 0.
loop at it_bspappl.
endloop.
else.
endif.
endif.
endif.
* If the user selected class check box then we need to do down load the class
if chk_cls = 'X'.
refresh it_class.
clear it_class.
clear r_temp_all.
if s_clsnam is initial.
exit.
endif.
if p_dircls is initial.
exit.
else.
if r_temp_all = 'X'.
clear: chk_attr,chk_meth,chk_evts,chk_type.
endif.
* get the class name and Class Description from the table SEOCLASS
* for all the classes which user entered in selection screen based on
b~langu = v_langu
clear v_lines.
if v_lines > 0.
loop at it_class.
endloop.
else.
endif.
endif.
endif.
***********************************************************************
* END OF SELECTION
**********************************************************************
end-of-selection.
write:/ sy-uline.
loop at it_scr_out.
write:/1(25) it_scr_out-appname,
26(25) it_scr_out-component,
52(50) it_scr_out-path,
102(50) it_scr_out-status.
endloop.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
* Data Declarations
refresh: it_attributes,it_methods,it_events,it_types,it_parameters,
it_exceps,it_implementings,it_redefinitions,it_friendships,
it_typepusages,it_clsdeferrds,it_intdeferrds,it_data,
it_explore_inheritance,it_explore_implementings,it_aliases.
clear : it_attributes,it_methods,it_events,it_types,it_parameters,
it_exceps,it_implementings,it_redefinitions,it_friendships,
it_typepusages,it_clsdeferrds,it_intdeferrds,it_data,
it_explore_inheritance,it_explore_implementings,it_aliases.
clear : x_attributes,x_methods,x_events,x_types,x_parameters,
x_exceps,x_implementings,x_redefinitions,x_friendships,
x_typepusages,x_clsdeferrds,x_intdeferrds,
x_explore_inheritance,x_explore_implementings,x_aliases,
x_class,x_inheritance,x_seoclskey.
x_seoclskey-clsname = p_clsname.
exporting
clskey = x_seoclskey
importing
class = x_class
attributes = it_attributes
methods = it_methods
events = it_events
types = it_types
parameters = it_parameters
exceps = it_exceps
implementings = it_implementings
inheritance = x_inheritance
redefinitions = it_redefinitions
friendships = it_friendships
typepusages = it_typepusages
clsdeferrds = it_clsdeferrds
intdeferrds = it_intdeferrds
explore_inheritance = it_explore_inheritance
explore_implementings = it_explore_implementings
aliases = it_aliases
exceptions
not_existing =1
is_interface =2
model_only =3
others = 4.
if sy-subrc <> 0.
it_scr_out-component = p_clsname.
it_scr_out-status = 'ERROR'.
it_scr_out-etype = 'E'.
append it_scr_out.
clear it_scr_out.
else.
endif.
it_parameters
it_exceps.
endif.
* Interface Implementations.
perform download_class_evts.
endif.
perform download_class_type_groups.
perform download_class_internal_types.
endif.
if p_check = 'X'.
else.
endif.
endif.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
it_data = p_x_class-clsname.
append it_data.
clear it_data.
it_data = p_x_class-descript.
append it_data.
clear it_data.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
append it_data.
clear it_data.
endif.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
it_data = '*********************************************************'.
append it_data.
clear it_data.
it_data = 'ATTRIBUTES'.
append it_data.
clear it_data.
it_data = '-----------'.
append it_data.
clear it_data.
clear x_format.
* ATTRIBUTE NAME
x_format-cmpname = x_attributes-cmpname.
case x_attributes-attdecltyp.
when gc_atr_inst.
when gc_atr_stat.
when gc_atr_cnst.
endcase.
* ATTRIBUTE EXPOSURE
case x_attributes-exposure.
when gc_exp_priv.
x_format-exposur = 'PRIVATE'.
when gc_exp_publ.
x_format-exposur = 'PUBLIC'.
when gc_exp_prot.
x_format-exposur = 'PROTECTED'.
endcase.
* ATTRIBUTE TYPTYPE
case x_attributes-typtype.
when gc_typ_like.
x_format-typtype = 'LIKE'.
when gc_typ_type.
x_format-typtype = 'TYPE'.
when gc_typ_otyp.
when gc_typ_tref.
endcase.
x_format-type = x_attributes-type.
x_format-attval = x_attributes-attvalue.
* ATTRIBUTE DESCRIPTION
x_format-desc = x_attributes-descript.
append it_data.
clear it_data.
endloop.
it_data = '*********************************************************'.
append it_data.
clear it_data.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
clear: x_methods,x_params,x_exceps.
it_data = 'METHODS'.
append it_data.
clear it_data.
it_data = '-------'.
append it_data.
clear it_data.
clear: x_format.
* METHOD NAME
x_format-cmpname = x_methods-cmpname.
case x_methods-mtddecltyp.
when gc_atr_inst.
when gc_atr_stat.
endcase.
* METHOD EXPOSURE
case x_methods-exposure.
when gc_exp_priv.
x_format-exposur = 'PRIVATE'.
when gc_exp_publ.
x_format-exposur = 'PUBLIC'.
when gc_exp_prot.
x_format-exposur = 'PROTECTED'.
endcase.
* METHOD DESCRIPTION.
x_format-desc = x_methods-descript.
append it_data.
clear it_data.
using x_methods-cmpname.
using x_methods-cmpname.
x_methods-cmpname.
endloop.
perform download_redef_methods.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
using p_cmpname.
clear: x_parameters.
it_data = '^^^^PARAMETERS'.
append it_data.
clear it_data.
clear: x_format1.
x_format1-sconame = x_parameters-sconame.
case x_parameters-pardecltyp.
when gc_par_impo.
x_format1-decl = 'IMPORTING'.
when gc_par_expo.
x_format1-decl = 'EXPORTING'.
when gc_par_chng.
x_format1-decl = 'CHANGING'.
when gc_par_retn.
x_format1-decl = 'RETURNING'.
endcase.
case x_parameters-parpasstyp.
when gc_pas_valu.
when gc_pas_refr.
endcase.
case x_parameters-typtype.
when gc_typ_like.
x_format1-typtype = 'LIKE'.
when gc_typ_type.
x_format1-typtype = 'TYPE'.
when gc_typ_otyp.
when gc_typ_tref.
endcase.
case x_parameters-paroptionl.
when gc_yes.
x_format1-optn = 'OPTIONAL'.
when gc_no.
x_format1-optn = 'MANDATORY'.
endcase.
x_format1-type = x_parameters-type.
x_format1-valu = x_parameters-parvalue.
x_format1-desc = x_parameters-descript.
append it_data.
clear it_data.
endloop.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
using p_cmpname.
clear: x_exceps.
it_data = '^^^^EXCEPTION'.
append it_data.
clear x_format2.
x_format2-sconame = x_exceps-sconame.
x_format2-desc = x_exceps-descript.
append it_data.
clear it_data.
endloop.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
p_cmpname.
refresh: it_source.
clear : it_source,x_source,x_mtdkey.
x_mtdkey-clsname = p_clsname.
x_mtdkey-cpdname = p_cmpname.
exporting
mtdkey = x_mtdkey
importing
source = it_source
exceptions
_internal_method_not_existing = 1
_internal_class_not_existing = 2
others = 3.
if sy-subrc <> 0.
it_scr_out-component = p_cmpname.
it_scr_out-etype = 'E'.
append it_scr_out.
clear it_scr_out.
else.
it_data =
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@'.
append it_data.
clear it_data.
append it_data.
clear it_data.
endloop.
it_data =
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@'.
append it_data.
clear it_data.
endif.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
form download_redef_methods .
x_redef-mtdname.
endloop.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
form download_class_evts .
it_data = 'EVENTS'.
append it_data.
clear it_data.
it_data = '-------'.
append it_data.
clear it_data.
clear: x_format.
* EVENT NAME
x_format-cmpname = x_events-cmpname.
case x_events-evtdecltyp.
when gc_atr_inst.
when gc_atr_stat.
endcase.
* EVENT EXPSOURE.
case x_events-exposure.
when gc_exp_priv.
x_format-exposur = 'PRIVATE'.
when gc_exp_publ.
x_format-exposur = 'PUBLIC'.
when gc_exp_prot.
x_format-exposur = 'PROTECTED'.
endcase.
* EVENT DESCRIPTION
x_format-desc = x_events-descript.
clear it_data.
endloop.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
form download_class_type_groups .
it_data =
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@'.
append it_data.
clear it_data.
it_data = 'TYPE-GROUPS'.
append it_data.
clear it_data.
it_data = '------------'.
append it_data.
clear it_data.
it_data = x_typep-typegroup.
append it_data.
clear it_data.
endloop.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
form download_class_internal_types .
it_data =
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@'.
append it_data.
clear it_data.
append it_data.
clear it_data.
it_data = '------------'.
append it_data.
clear it_data.
clear: x_format.
* TYPE NAME
x_format-cmpname = x_types-cmpname.
* TYPE EXPSOURE.
case x_types-exposure.
when gc_exp_priv.
x_format-exposur = 'PRIVATE'.
when gc_exp_publ.
x_format-exposur = 'PUBLIC'.
when gc_exp_prot.
x_format-exposur = 'PROTECTED'.
endcase.
* TYPTYPE
case x_types-typtype.
when gc_typ_like.
x_format-typtype = 'LIKE'.
when gc_typ_type.
x_format-typtype = 'TYPE'.
when gc_typ_otyp.
when gc_typ_tref.
endcase.
* TYPE
x_format-type = x_types-type.
* DESCRIPTION
x_format-desc = x_types-descript.
clear it_data.
endloop.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
v_filename = it_class-clsname.
else.
endif.
exporting
filename = lv_filename
tables
data_tab = it_data
exceptions
file_write_error =1
no_batch =2
gui_refuse_filetransfer = 3
invalid_type =4
no_authority =5
unknown_error =6
header_not_allowed =7
separator_not_allowed = 8
filesize_not_allowed =9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
others = 22.
if sy-subrc <> 0.
it_scr_out-component = it_class-clsname.
it_scr_out-path = lv_filename.
it_scr_out-status = 'FAILED'.
it_scr_out-etype = 'E'.
append it_scr_out.
clear it_scr_out.
else.
it_scr_out-component = it_class-clsname.
it_scr_out-path = lv_filename.
it_scr_out-status = 'SUCCESSFULL'.
it_scr_out-etype = 'S'.
append it_scr_out.
clear it_scr_out.
endif.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
refresh it_data.
clear: it_data,lv_filestr.
append it_data.
append it_data.
append it_data.
append it_data.
if p_it_bspappl-stateful is initial.
else.
endif.
append it_data.
exporting
dirname = lv_filenam
exceptions
failed = 1
others = 2.
exporting
filename = lv_filestr
tables
data_tab = it_data
exceptions
file_write_error =1
no_batch =2
gui_refuse_filetransfer = 3
invalid_type =4
no_authority =5
unknown_error =6
header_not_allowed =7
separator_not_allowed = 8
filesize_not_allowed =9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
others = 22.
if sy-subrc <> 0.
it_scr_out-appname = p_it_bspappl-applname.
it_scr_out-path = lv_filestr.
it_scr_out-status = 'FAILED'.
it_scr_out-etype = 'E'.
append it_scr_out.
clear it_scr_out.
else.
it_scr_out-appname = p_it_bspappl-applname.
it_scr_out-path = lv_filestr.
it_scr_out-status = 'SUCCESSFULL'.
it_scr_out-etype = 'S'.
append it_scr_out.
clear it_scr_out.
endif.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
data: lv_tempvar(1),
lv_length type i.
lv_length = lv_length - 1.
lv_tempvar = p_dirnam+lv_length(1).
endif.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
clear: lv_filename.
v_datum = sy-datum.
v_uzeit = sy-uzeit.
exporting
filename = lv_filestr
tables
data_tab = it_data
exceptions
file_write_error =1
no_batch =2
gui_refuse_filetransfer = 3
invalid_type =4
no_authority =5
unknown_error =6
header_not_allowed =7
separator_not_allowed = 8
filesize_not_allowed =9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
others = 22.
if sy-subrc <> 0.
endif.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
refresh it_pagdetl.
clear it_pagdetl.
select applname
pagekey
pagename
implclass
pagetype
controllerurl
lifetime
state
is_error_page
error_page
browser_cache
server_cache
author
createdon
changedby
changedon
from o2pagdir
clear : lv_filestr.
it_scr_out-appname = p_it_bspappl-applname.
it_scr_out-appname = p_it_bspappl-applname.
endif.
clear : lv_filestr.
clear: lv_fn.
it_scr_out-appname = p_it_bspappl-applname.
it_scr_out-appname = p_it_bspappl-applname.
endloop.
endif.
clear : lv_filestr.
it_scr_out-appname = p_it_bspappl-applname.
it_pagdetl-pagekey
lv_tempstr.
endloop.
endif.
clear : lv_filestr.
it_scr_out-appname = p_it_bspappl-applname.
it_pagdetl-pagekey
lv_tempstr.
endloop.
endif.
clear : lv_filestr.
it_scr_out-appname = p_it_bspappl-applname.
it_pagdetl-pagekey
lv_tempstr.
endloop.
endif.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
* To Create Directory
*----------------------------------------------------------------------*
exporting
dirname = lv_filename
exceptions
failed = 1
others = 2.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
* Controller Details
*----------------------------------------------------------------------*
refresh it_data.
clear : it_data,
v_cnt_cls.
append it_data.
it_data = space.
append it_data.
append it_data.
if it_pagdetl-is_error_page is initial.
else.
endif.
append it_data.
append it_data.
append it_data.
it_data = space.
append it_data.
it_data = 'STATUS'.
append it_data.
case it_pagdetl-state.
when gc_lft_requ.
when gc_lft_sess.
when others.
endcase.
append it_data.
case it_pagdetl-state.
when gc_lft_requ.
when gc_lft_sess.
when others.
endcase.
append it_data.
it_data = space.
append it_data.
it_data = 'CACHING'.
append it_data.
lv_temp = it_pagdetl-browser_cache.
append it_data.
lv_temp = it_pagdetl-server_cache.
append it_data.
it_data = space.
append it_data.
append it_data.
concatenate 'CREATED BY: ' it_pagdetl-author ' ON ' it_pagdetl-createdon into it_data.
append it_data.
concatenate 'CHANGED BY: ' it_pagdetl-changedby ' ON ' it_pagdetl-changedon into it_data.
append it_data.
exporting
filename = p_lv_tempstr
tables
data_tab = it_data
exceptions
file_write_error =1
no_batch =2
gui_refuse_filetransfer = 3
invalid_type =4
no_authority =5
unknown_error =6
header_not_allowed =7
separator_not_allowed = 8
filesize_not_allowed =9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
others = 22.
if sy-subrc <> 0.
it_scr_out-path = p_lv_tempstr.
it_scr_out-etype = 'E'.
append it_scr_out.
clear it_scr_out.
else.
it_scr_out-path = p_lv_tempstr.
it_scr_out-status = 'SUCCESSFULL'.
it_scr_out-etype = 'S'.
append it_scr_out.
clear it_scr_out.
endif.
clear v_cnt_cls.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
exporting
filename = lv_filename
tables
data_tab = it_data
exceptions
file_write_error =1
no_batch =2
gui_refuse_filetransfer = 3
invalid_type =4
no_authority =5
unknown_error =6
header_not_allowed =7
separator_not_allowed = 8
filesize_not_allowed =9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
others = 22.
if sy-subrc <> 0.
it_scr_out-component = lv_filename.
it_scr_out-status = 'FAILED'.
it_scr_out-etype = 'E'.
append it_scr_out.
clear it_scr_out.
else.
it_scr_out-component = lv_filename.
it_scr_out-status = 'SUCCESSFULL'.
it_scr_out-etype = 'S'.
append it_scr_out.
clear it_scr_out.
endif.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
p_pagekey
p_lv_tempstr.
lv_count type n.
refresh it_pagcon.
clear it_pagcon.
select applname
pagekey
objtype
version
from o2pagcon
objtype = 'PD'.
lv_count = 0.
loop at it_pagcon.
clear: lv_tempstr,it_source,wa_source,wa_pagecon_key.
wa_pagecon_key-applname = it_pagcon-applname.
wa_pagecon_key-pagekey = it_pagcon-pagekey.
wa_pagecon_key-objtype = it_pagcon-objtype.
wa_pagecon_key-version = it_pagcon-version.
endif.
exporting
filename = lv_tempstr
tables
data_tab = it_source-content
exceptions
file_write_error =1
no_batch =2
gui_refuse_filetransfer = 3
invalid_type =4
no_authority =5
unknown_error =6
header_not_allowed =7
separator_not_allowed = 8
filesize_not_allowed =9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
others = 22.
if sy-subrc <> 0.
it_scr_out-component = p_pagekey.
it_scr_out-path = lv_tempstr.
it_scr_out-status = 'FAILED'.
it_scr_out-etype = 'E'.
append it_scr_out.
clear it_scr_out.
else.
it_scr_out-component = p_pagekey.
it_scr_out-path = lv_tempstr.
it_scr_out-status = 'SUCCESSFULL'.
it_scr_out-etype = 'S'.
append it_scr_out.
clear it_scr_out.
endif.
endif.
endloop.
p_pagekey
p_lv_tempstr.
p_pagekey
p_lv_tempstr.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
p_pagekey
p_lv_tempstr.
auto(5),
typtype(15),
end of t_dld_params.
refresh: it_params,it_dld_params.
clear : it_params,it_dld_params.
version = 'A'.
loop at it_params.
it_dld_params-compname = it_params-compname.
it_dld_params-type1 = it_params-type.
it_dld_params-parvalue = it_params-parvalue.
if it_params-pardecltyp = '0'.
it_dld_params-auto = 'AUTO'.
endif.
if it_params-typtype = '3'.
else.
it_dld_params-typtype = 'TYPE'.
endif.
append it_dld_params.
clear it_dld_params.
endloop.
exporting
filename = lv_tempstr
tables
data_tab = it_dld_params.
endif.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
p_pagekey
p_lv_tempstr.
lv_count type i.
end of t_ev_handler.
types : it_ev_handler type sorted table of t_ev_handler with unique key name.
refresh it_events.
clear : it_events,lv_count.
version = 'A'.
if lv_count > 0.
p_lv_tempstr = lv_tempstr.
endif.
refresh: it_ev_sources.
clear: lv_tempstr,it_source,wa_source,wa_pagecon_key,it_ev_sources.
wa_pagecon_key-applname = p_applname.
wa_pagecon_key-pagekey = p_pagekey.
wa_pagecon_key-objtype = 'EV'.
wa_pagecon_key-version = 'A'.
loop at it_ev_sources.
exporting
filename = lv_tempstr
tables
data_tab = it_ev_sources-source.
endloop.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
v_cnt_lines type i.
clear : v_cnt_cls_name.
clear : r_temp_all,chk_attr,chk_meth,chk_evts,chk_type,it_class.
refresh it_class.
* get the class name and Class Description from the table SEOCLASS
* for all the classes which user entered in selection screen based on
b~langu = v_langu
if v_cnt_lines > 0.
loop at it_class.
endloop.
endif.
endif.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
endloop.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
it_data = 'INTERFACE'.
append it_data.
it_data = '----------'.
append it_data.
* Interface Name
clear it_data.
append it_data.
* Interface Description
clear it_data.
append it_data.
* Interace Methods
it_data = '-----------------'.
append it_data.
clear it_data.
append it_data.
clear it_data.
it_data = '-----------------'.
append it_data.
* Declaration Type
if x_inmeth-mtddecltyp eq 0.
else.
endif.
* Visibility
case x_inmeth-exposure.
when 0.
when 2.
when 1.
endcase.
it_data = temp_str.
append it_data.
clear v_methodname.
clear v_classname.
v_classname = it_class-clsname.
v_methodname.
clear temp_str.
clear it_data.
append it_data.
endloop.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
p_x_inmeth_cmpname.
it_data = '^^^^PARAMETERS'.
append it_data.
clear it_data.
cmpname eq p_x_inmeth_cmpname.
concatenate cl_abap_char_utilities=>horizontal_tab
cl_abap_char_utilities=>horizontal_tab
x_parameters-sconame
case x_parameters-pardecltyp.
when 0.
when 1.
when 2.
when 3.
endcase.
case x_parameters-typtype.
when 0.
when 1.
when 2.
endcase.
it_data = temp_str.
append it_data.
clear it_data.
clear temp_str.
endloop.
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*
p_inctype.
case p_inctype.
when seop_ext_class_locals_imp.
when seop_incextapp_definition.
when seop_incextapp_macros.
endcase.
exporting
clskey = l_clsname
inctype = p_inctype
importing
source = cl_source
source_expanded = cl_exsource
exceptions
_internal_class_not_existing = 1
not_existing =2
others = 3.
if sy-subrc <> 0.
it_scr_out-component = lv_inctype.
it_scr_out-status = 'FAILED'.
it_scr_out-etype = 'E'.
append it_scr_out.
clear it_scr_out.
else.
it_data =
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@'.
append it_data.
clear it_data.
it_data = lv_inctype .
append it_data.
clear it_data.
it_data =
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@'.
append it_data.
clear it_data.
append it_data.
clear it_data.
endloop.
it_data =
'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@'.
append it_data.
clear it_data.
endif.
Author Bio
Uma Shankar has around 6 years of experience in developing applications/programs using Java,
ABAP, Business Server Pages. He is currently working as a Project Leader in Intelligroup Asia
Pvt. Ltd and based in Hyderabad, India. He is also a core member of NetWeaver Competency
group.