Documente Academic
Documente Profesional
Documente Cultură
*==================================================================================
====================================
* Mass download version 1.5.5.
*----------------------------------------------------------------------------------
------------------------------------
* PROGRAM DESCRIPTION & USE
* Allows a user to download programs, Functions, DD definitions, etc to the
presentation server. This version searches
* recursively for nested includes and function modules, and allows you to download
the resulting code as standard text
* or HTML web pages within a suitable directory structure.
*
* You can either search by object name, using wildcards if you wish, or a
combination of Author and object name. If
* you want all objects returned for a particular author then select the author
name and choose the most suitable
* radiobutton. All objects will be returned if the fields to the right hand side
of the radiobutton are left completely
* blank.
*
* Compatible with R/3 Enterprise and Netweaver, for older versions of SAP you will
need Direct Download version 5.xx.
* This version removes the programming limitations imposed by developing across
SAP releases 3 to 4.6.
*
* In order to be able to download files to the SAP server you must first set up a
logical filepath within transaction
* 'FILE', or use an existing one. You must also create a external operating
system command in SM69 called ZDTX_MKDIR. This
* will then be used to create any directories needed on the SAP server
*----------------------------------------------------------------------------------
------------------------------------
* SAP Tables
*----------------------------------------------------------------------------------
------------------------------------
tables: trdir, seoclass, tfdir, enlfdir, dd02l, tadiv, dd40l, transfdesc.
type-pools: abap, seor.
*----------------------------------------------------------------------------------
------------------------------------
* Types
*----------------------------------------------------------------------------------
------------------------------------
* text element structure
types: tTextTable like textpool.
* GUI titles
types: tGUITitle like d347t.
* Message classes
types: begin of tMessage,
arbgb like t100-arbgb,
stext like t100a-stext,
msgnr like t100-msgnr,
text like t100-text,
end of tMessage.
* Screen flow.
types: begin of tScreenFlow,
screen like d020s-dnum,
code like d022s-line,
end of tScreenFlow.
* Method
types: begin of tMethod,
cmpName(61),
descript like vseomethod-descript,
exposure like vseomethod-exposure,
methodKey type string,
end of tMethod.
* Interfaces
types: begin of tInterface,
interfaceName like vseoclass-clsname,
end of tInterface.
* Class
types: begin of tClass,
scanned(1),
clsname like vseoclass-clsname,
descript like vseoclass-descript,
msg_id like vseoclass-msg_id,
exposure like vseoclass-exposure,
state like vseoclass-state,
clsfinal like vseoclass-clsfinal,
r3release like vseoclass-r3release,
iMethods type tMethod occurs 0,
iDictStruct type tDictTable occurs 0,
iTextElements type tTextTable occurs 0,
iMessages type tMessage occurs 0,
iInterfaces type tInterface occurs 0,
iConcepts type tConcept occurs 0,
iTableTypes type tTableType occurs 0,
iTransformations type tTransformation occurs 0,
textElementKey type string,
publicClassKey type string,
privateClassKey type string,
protectedClassKey type string,
typesClassKey type string,
exceptionClass type abap_bool,
end of tClass.
* function modules
types: begin of tFunction,
functionName like tfdir-funcName,
functionGroup like enlfdir-area,
includeNumber like tfdir-include,
functionMainInclude like tfdir-funcName,
functionTitle like tftit-stext,
topIncludeName like tfdir-funcName,
progname like tfdir-pname,
programLinkName like tfdir-pname,
messageClass like t100-arbgb,
iTextElements type tTextTable occurs 0,
iSelectiontexts type tTextTable occurs 0,
iMessages type tMessage occurs 0,
iIncludes type tInclude occurs 0,
iDictStruct type tDictTable occurs 0,
iGUITitle type tGUITitle occurs 0,
iScreenFlow type tScreenFlow occurs 0,
iTableTypes type tTableType occurs 0,
iTransformations type tTransformation occurs 0,
end of tFunction.
*----------------------------------------------------------------------------------
------------------------------------
* Internal tables
*----------------------------------------------------------------------------------
------------------------------------
* Dictionary object
data: iDictionary type standard table of tDictTable with header line.
* Dictionary objects which have previously been downloaded
data: iDictFilename type standard table of tDictFilename with header line.
* Table Types
data: iTableTypes type standard table of tTableType with header line.
* Table Type objects which have previously been downloaded
data: iTableTypeFilename type standard table of tDictFilename with header line.
* Function modules.
data: iFunctions type standard table of tFunction with header line.
* Function modules used within programs.
data: iProgFunctions type standard table of tFunction with header line.
* Tree display structure.
data: iTreeDisplay type standard table of snodetext with header line.
* Message class data
data: iMessages type standard table of tMessage with header line.
* Holds a single message class an all of its messages
data: iSingleMessageClass type standard table of tMessage with header line.
* Holds program related data
data: iPrograms type standard table of tProgram with header line.
* Classes
data: iClasses type standard table of tClass with header line.
* Table of paths created on the SAP server
data: iServerPaths type standard table of string with header line.
* Table of XSL Transformations
data: iTransformations type standard table of tTransformation with header line.
*----------------------------------------------------------------------------------
------------------------------------
* Table prototypes
*----------------------------------------------------------------------------------
------------------------------------
data: dumiDictStructure type standard table of tDictTableStructure.
data: dumiTextTab type standard table of tTextTable.
data: dumiIncludes type standard table of tInclude.
data: dumiHtml type standard table of string.
data: dumiHeader type standard table of string .
data: dumiScreen type standard table of tScreenFlow .
data: dumIGUITitle type standard table of tGUITitle.
data: dumiMethods type standard table of tMethod.
data: dumiConcepts type standard table of tConcept.
data: dumiInterfaces type standard table of tInterface.
*----------------------------------------------------------------------------------
------------------------------------
* Global objects
*----------------------------------------------------------------------------------
------------------------------------
data: objFile type ref to cl_gui_frontend_services.
data: objRuntimeError type ref to cx_root.
*----------------------------------------------------------------------------------
------------------------------------
* Constants
*----------------------------------------------------------------------------------
------------------------------------
constants: VERSIONNO type string value '1.5.5'.
constants: TABLES type string value 'TABLES'.
constants: TABLE type string value 'TABLE'.
constants: LIKE type string value 'LIKE'.
constants: TYPE type string value 'TYPE'.
constants: TYPEREFTO type string value 'TYPE REF TO'.
constants: STRUCTURE type string value 'STRUCTURE'.
constants: LOWSTRUCTURE type string value 'structure'.
constants: OCCURS type string value 'OCCURS'.
constants: FUNCTION type string value 'FUNCTION'.
constants: CALLFUNCTION type string value ' CALL FUNCTION'.
constants: MESSAGE type string value 'MESSAGE'.
constants: INCLUDE type string value 'INCLUDE'.
constants: TRANSFORMATION type string value 'TRANSFORMATION'.
constants: LOWINCLUDE type string value 'include'.
constants: DESTINATION type string value 'DESTINATION'.
constants: IS_TABLE type string value 'T'.
constants: IS_TRANSFORMATION type string value 'X'.
constants: IS_PROGRAM type string value 'P'.
constants: IS_SCREEN type string value 'S'.
constants: IS_GUITITLE type string value 'G'.
constants: IS_DOCUMENTATION type string value 'D'.
constants: IS_MESSAGECLASS type string value 'MC'.
constants: IS_FUNCTION type string value 'F'.
constants: IS_CLASS type string value 'C'.
constants: IS_METHOD type string value 'M'.
constants: ASTERIX type string value '*'.
constants: COMMA type string value ','.
constants: PERIOD type string value '.'.
constants: DASH type string value '-'.
constants: TRUE type abap_bool value 'X'.
constants: FALSE type abap_bool value ''.
constants: LT type string value '<'.
constants: GT type string value '>'.
constants: UNIX type string value 'UNIX'.
constants: NON_UNIX type string value 'not UNIX'.
constants: HTMLEXTENSION type string value 'html'.
constants: TEXTEXTENSION type string value 'txt'.
constants: SS_CODE type c value 'C'.
constants: SS_TABLE type c value 'T'.
*----------------------------------------------------------------------------------
------------------------------------
* Global variables
*----------------------------------------------------------------------------------
------------------------------------
data: statusBarMessage(100).
data: forcedExit type abap_bool value FALSE.
data: startTime like sy-uzeit.
data: runTime like sy-uzeit.
data: downloadFileExtension type string.
data: downloadFolder type string.
data: serverSlashSeparator type string.
data: frontendSlashSeparator type string.
data: slashSeparatorToUse type string.
data: serverFilesystem type filesys_d.
data: serverFolder type string.
data: frontendOpSystem type string.
data: serverOpSystem type string.
data: customerNameSpace type string.
ranges: soProgramName for trdir-name.
ranges: soAuthor for usr02-bname.
ranges: soTableNames for dd02l-tabname.
ranges: soTableTypeNames for dd40l-typename.
ranges: soFunctionName for tfdir-funcName.
ranges: soClassName for vseoclass-clsname.
ranges: soFunctionGroup for enlfdir-area.
ranges: soXsltName for tadir-obj_name.
field-symbols: <waDictStruct> type tDictTable.
*----------------------------------------------------------------------------------
------------------------------------
* Selection screen declaration
*----------------------------------------------------------------------------------
------------------------------------
* Author
selection-screen: begin of block b1 with frame title tBlock1.
selection-screen begin of line.
selection-screen comment 5(23) tAuth.
parameters: pAuth like usr02-bname memory id MAUTH.
selection-screen end of line.
* Table Types
selection-screen begin of line.
parameters: rTabType radiobutton group r1.
selection-screen comment 5(15) trtabtyp.
selection-screen end of line.
* Message classes
selection-screen begin of line.
parameters: rMess radiobutton group r1.
selection-screen comment 5(18) tPMes.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 10(18) tMname.
parameters: pMname like t100-arbgb memory id MMNAME.
selection-screen end of line.
* Function modules
selection-screen begin of line.
parameters: rFunc radiobutton group r1.
selection-screen comment 5(30) tRfunc.
selection-screen end of line.
* XSLT
selection-screen begin of line.
parameters: rxslt radiobutton group r1.
selection-screen comment 5(30) trxslt.
selection-screen end of line.
* Classes
selection-screen begin of line.
parameters: rClass radiobutton group r1.
selection-screen comment 5(30) tRClass.
selection-screen end of line.
* Programs / includes
selection-screen begin of line.
parameters: rProg radiobutton group r1 default 'X'.
selection-screen comment 5(18) tProg.
selection-screen end of line.
selection-screen skip.
* Language
selection-screen begin of line.
selection-screen comment 1(27) tMLang.
parameters: pMLang like t100-sprsl default 'EN'.
selection-screen end of line.
* Package
selection-screen begin of line.
selection-screen comment 1(24) tPack.
select-options: soPack for tadiv-devclass.
selection-screen end of line.
* Customer objects
selection-screen begin of line.
selection-screen comment 1(27) tCust.
parameters: pCust as checkbox default 'X'.
selection-screen end of line.
* File details
selection-screen: begin of block b4 with frame title tBlock4.
selection-screen begin of line.
selection-screen comment 1(20) tPhtml.
parameters: pHtml radiobutton group g1 default 'X'.
selection-screen end of line.
selection-screen skip.
* Display options
selection-screen: begin of block b5 with frame title tBlock5.
* Display final report
selection-screen begin of line.
selection-screen comment 1(33) tRep.
parameters: pRep as checkbox default 'X'.
selection-screen end of line.
* Display progress messages
selection-screen begin of line.
selection-screen comment 1(33) tProMess.
parameters: pProMess as checkbox default 'X'.
selection-screen end of line.
selection-screen: end of block b5.
*----------------------------------------------------------------------------------
------------------------------------
* Display a directory picker window
*----------------------------------------------------------------------------------
------------------------------------
at selection-screen on value-request for pFolder.
if sy-batch is initial.
create object objFile.
if sy-subrc = 0.
pFolder = pickedFolder.
else.
write: / 'An error has occured picking a folder'.
endif.
endif.
*----------------------------------------------------------------------------------
------------------------------------
at selection-screen.
*----------------------------------------------------------------------------------
------------------------------------
case 'X'.
when pPc.
if pFolder is initial.
* User must enter a path to save to
message e000(oo) with 'You must enter a file path'.
endif.
when pServ.
if pLogical is initial.
* User must enter a logical path to save to
message e000(oo) with 'You must enter a logical file name'.
endif.
endcase.
*----------------------------------------------------------------------------------
------------------------------------
at selection-screen on pLogical.
*----------------------------------------------------------------------------------
------------------------------------
if not pServ is initial.
call function 'FILE_GET_NAME' exporting logical_filename = pLogical
importing file_name = serverFolder
exceptions file_not_found = 1
others = 2.
if sy-subrc = 0.
if serverFolder is initial.
message e000(oo) with 'No file path returned from logical filename'.
else.
* Path to display on the selection screen
tSDPath = serverFolder.
* Remove the trailing slash off the path as the subroutine buildFilename will
add an extra one
shift serverFolder right deleting trailing serverSlashSeparator.
shift serverFolder left deleting leading space.
endif.
else.
message e000(oo) with 'Logical filename does not exist'.
endif.
endif.
*
-----------------------------------------------------------------------------------
----------------------------------
at selection-screen on value-request for soProg-low.
*
-----------------------------------------------------------------------------------
----------------------------------
call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type = 'PROG'
object_name = soProg-low
suppress_selection = 'X'
use_alv_grid = ''
without_personal_list = ''
importing object_name_selected =
soProg-low
exceptions cancel = 1.
*
-----------------------------------------------------------------------------------
----------------------------------
at selection-screen on value-request for soProg-high.
*
-----------------------------------------------------------------------------------
----------------------------------
call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type = 'PROG'
object_name = soProg-high
suppress_selection = 'X'
use_alv_grid = ''
without_personal_list = ''
importing object_name_selected =
soProg-high
exceptions cancel = 1.
*
-----------------------------------------------------------------------------------
----------------------------------
at selection-screen on value-request for soxslt-low.
*
-----------------------------------------------------------------------------------
----------------------------------
call function 'REPOSITORY_INFO_SYSTEM_F4'
exporting
object_type = 'XSLT'
object_name = soxslt-low
suppress_selection = 'X'
use_alv_grid = ''
without_personal_list = ''
importing
object_name_selected = soxslt-low
exceptions
cancel = 1.
*
-----------------------------------------------------------------------------------
----------------------------------
at selection-screen on value-request for soxslt-high.
*
-----------------------------------------------------------------------------------
----------------------------------
call function 'REPOSITORY_INFO_SYSTEM_F4'
exporting
object_type = 'XSLT'
object_name = soxslt-high
suppress_selection = 'X'
use_alv_grid = ''
without_personal_list = ''
importing
object_name_selected = soxslt-high
exceptions
cancel = 1.
*
-----------------------------------------------------------------------------------
----------------------------------
at selection-screen on value-request for soClass-low.
*
-----------------------------------------------------------------------------------
----------------------------------
call function 'F4_DD_ALLTYPES' exporting object = soClass-low
suppress_selection = 'X'
display_only = ''
only_types_for_clifs = 'X'
importing result = soClass-low.
*
-----------------------------------------------------------------------------------
----------------------------------
at selection-screen on value-request for soClass-high.
*
-----------------------------------------------------------------------------------
----------------------------------
call function 'F4_DD_ALLTYPES' exporting object = soClass-high
suppress_selection = 'X'
display_only = ''
only_types_for_clifs = 'X'
importing result = soClass-high.
*
-----------------------------------------------------------------------------------
----------------------------------
at selection-screen on value-request for soFName-low.
*
-----------------------------------------------------------------------------------
----------------------------------
call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type = 'FUNC'
object_name = soFname-low
suppress_selection = 'X'
use_alv_grid = ''
without_personal_list = ''
importing object_name_selected =
soFName-low
exceptions cancel = 1.
*
-----------------------------------------------------------------------------------
----------------------------------
at selection-screen on value-request for soFName-high.
*
-----------------------------------------------------------------------------------
----------------------------------
call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type = 'FUNC'
object_name = soFname-high
suppress_selection = 'X'
use_alv_grid = ''
without_personal_list = ''
importing object_name_selected =
soFName-high
exceptions cancel = 1.
*
-----------------------------------------------------------------------------------
----------------------------------
at selection-screen on value-request for soFGroup-low.
*
-----------------------------------------------------------------------------------
----------------------------------
call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type = 'FUGR'
object_name = soFGroup-low
suppress_selection = 'X'
use_alv_grid = ''
without_personal_list = ''
importing object_name_selected =
soFGroup-low
exceptions cancel = 1.
*
-----------------------------------------------------------------------------------
----------------------------------
at selection-screen on value-request for soFGroup-high.
*
-----------------------------------------------------------------------------------
----------------------------------
call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type = 'FUGR'
object_name = soFGroup-high
suppress_selection = 'X'
use_alv_grid = ''
without_personal_list = ''
importing object_name_selected =
soFGroup-high
exceptions cancel = 1.
*----------------------------------------------------------------------------------
------------------------------------
* initialisation
*----------------------------------------------------------------------------------
------------------------------------
initialization.
* Parameter screen texts.
tBlock1 = 'Author (Optional)'.
tBlock2 = 'Objects to download'.
tBlock3 = 'Additional downloads for programs, function modules and classes'.
tBlock4 = 'Download parameters'.
tBlock5 = 'Display options'.
tAuth = 'Author name'.
tPmod = 'Include programs modified by author'.
tCust = 'Only customer objects'.
tNRange = 'Alt customer name range'.
tRtable = 'Tables / Structures'.
trtabtyp = 'Table types'.
tPtable = 'Table name'.
tTnote = 'Note: tables are stored under the username of the last person who
modified them'.
tRfunc = 'Function modules'.
tPfname = 'Function name'.
tFgroup = 'Function group'.
tRClass = 'Classes'.
tPcname = 'Class name'.
tMess = 'Message class'.
tMName = 'Class name'.
tMLang = 'Language'.
tProg = 'Programs'.
tRpname = 'Program name'.
tPack = 'Package'.
tPtxt = 'Text document'.
tPhtml = 'HTML document'.
tBack = 'Include background colour'.
tPtext = 'Text elements'.
tPinc = 'Include programs'.
tRecI = 'Recursive search'.
tPpath = 'File path'.
tSPath = 'Logical file name'.
tPmes = 'Message classes'.
tPfunc = 'Function modules'.
tFDoc = 'Function module documentation'.
tCDoc = 'Class documentation'.
tRecf = 'Recursive search'.
tRecC = 'Class recursive search'.
tPscr = 'Screens'.
tPdict = 'Dictionary structures'.
tSortT = 'Sort table fields alphabetically'.
tServ = 'Download to server'.
tPc = 'Download to PC'.
tRep = 'Display download report'.
tProMess = 'Display progress messages'.
tRxslt = 'Transformations'.
tPxslt = 'XSLT Name'.
tTtyp = 'Table Types'.
tXslt = 'Transformation'.
* Determine if the external command exists. If it doesn't then disable the server
input field
perform findExternalCommand using serverFileSystem.
*----------------------------------------------------------------------------------
------------------------------------
start-of-selection.
*----------------------------------------------------------------------------------
------------------------------------
perform checkComboBoxes.
perform fillSelectionRanges.
startTime = sy-uzeit.
* Fool the HTML routines to stop them hyperlinking anything with a space in them
if pCName is initial.
customerNameSpace = '^'.
else.
customerNameSpace = pCName.
endif.
when rTabType.
perform retrieveTableTypes using iTableTypes[]
soTableTypeNames[]
soAuthor[]
soPack[].
* Select Classes
when rClass.
perform retrieveClasses using iClasses[]
iFunctions[]
soClassName[] "Class name
soAuthor[] "Author
customerNameSpace "Customer name range
pMod "Also modified by author
pCust "Customer object only
pMess "Find messages
pText "Text Elements
pDict "Dictionary structures
pFunc "Get functions
pInc "Get includes
pTrans
pRecF "Search recursively for
functions
pRecI "Search recursively for
includes
pRecC "Search recursively for
classes
pMLang "Language
soPack[]. "Package
loop at iFunctions.
* Find Dict structures, messages, functions, includes etc.
perform scanForAdditionalFuncStuff using iFunctions[]
pRecI "Search
for includes recursively
pRecF "Search
for functions recursively
pInc "Search
for includes
pFunc "Search
for functions
pDict "search
for dictionary objects
pMess "Search
for messages
pTrans "Search
for transformations
pCust "Customer
data only
customerNameSpace. "Customer
name range
endloop.
* Select programs
when rProg.
perform retrievePrograms using iPrograms[]
iProgFunctions[]
soProgramName[] "Program name
soAuthor[] "Author
customerNamespace "Customer name range
pMod "Also modified by author
pCust "Customer object only
pMess "Find messages
pText "Text Elements
pDict "Dictionay structures
pFunc "Get functions
pInc "Get includes
pScr "Get screens
pTrans "Get Transformations
pRecF "Search recursively for
functions
pRecI "Search recursively for
includes
soPack[]. "Package
when rXslt.
perform retrieveXslt using iTransformations[]
soXsltName[] "XSL Transformation name
soAuthor[] "Author
customerNamespace "Customer name range
pMod "Also modified by author
pCust "Customer object only
soPack[]. "Package
endcase.
*----------------------------------------------------------------------------------
------------------------------------
end-of-selection.
*----------------------------------------------------------------------------------
------------------------------------
if forcedExit = 0.
* Decide what to download
case 'X'.
* Download tables
when rTable.
if not ( iDictionary[] is initial ).
perform downloadDDStructures using iDictionary[]
iDictFilename[]
downloadFolder
HTMLEXtension
space
pSortT
slashSeparatorToUse
pServ
pProMess
serverFileSystem
pBack.
endif.
when rTabType.
if not ( iTableTypes[] is initial ).
perform downloadDDTableTypes using iTabletypes[]
iTableTypeFilename[]
downloadFolder
htmlExtension
space
pSortt
slashSeparatorToUse
pServ
pProMess
serverFileSystem
pBack.
endif.
* Download functions
when rFunc.
if not ( iFunctions[] is initial ).
perform downloadFunctions using iFunctions[]
iDictFilename[]
iTableTypeFilename[]
downloadFolder
downloadFileExtension
space
pFDoc
pHtml
customerNameSpace
pInc
pDict
TEXTEXTENSION
HTMLEXTENSION
pSortT
slashSeparatorToUse
pServ
pProMess
serverFileSystem
pBack.
endif.
* Download Classes
when rClass.
if not ( iClasses[] is initial ).
perform downloadClasses using iClasses[]
iFunctions[]
iDictFilename[]
iTableTypeFilename[]
downloadFolder
downloadFileExtension
HTMLEXTENSION
TEXTEXTENSION
pHtml
customerNameSpace
pInc
pDict
pCDoc
pSortT
slashSeparatorToUse
pServ
pProMess
serverFileSystem
pBack.
endif.
* Download programs
when rProg.
if not ( iPrograms[] is initial ).
perform downloadPrograms using iPrograms[]
iProgFunctions[]
iDictFilename[]
iTableTypeFilename[]
downloadFolder
downloadFileExtension
HTMLEXTENSION
TEXTEXTENSION
pHtml
customerNameSpace
pInc
pDict
'' "Documentation
pSortT
slashSeparatorToUse
pServ
pProMess
serverFileSystem
pBack.
endif.
when rXSLT.
if not ( iTransformations[] is initial ).
perform downloadXSLT using iTransformations[]
downloadFolder
downloadFileExtension
htmlExtension
textExtension
pHtml
customerNamespace
slashSeparatorToUse
pServ
space
pProMess
serverFileSystem
pBack.
endif.
endcase.
* Free all the memory IDs we may have built up in the program
* Free up any memory used for caching HTML versions of objects
perform freeMemory using iPrograms[]
iFunctions[]
iProgFunctions[]
iDictionary[]
iTableTypes[]
iTransformations[].
case 'X'.
when rTable.
perform fillTreeNodeTables using iDictionary[]
iTreeDisplay[]
runTime.
when rTabType.
perform fillTreeNodeTableTypes using iTableTypes[]
iTreeDisplay[]
runtime.
when rMess.
perform fillTreeNodeMessages using iMessages[]
iTreeDisplay[]
runTime.
when rFunc.
perform fillTreeNodeFunctions using iFunctions[]
iTreeDisplay[]
runTime.
when rClass.
perform fillTreeNodeClasses using iClasses[]
iFunctions[]
iTreeDisplay[]
runTime.
when rProg.
perform fillTreeNodePrograms using iPrograms[]
iProgFunctions[]
iTreeDisplay[]
runTime.
when rXSLT.
perform fillTreeNodeXSLT using iTransformations[]
iTreeDisplay[]
runtime.
endcase.
***********************************************************************************
************************************
***************************************************SUBROUTINES*********************
************************************
***********************************************************************************
************************************
*----------------------------------------------------------------------------------
------------------------------------
* free memory...
*----------------------------------------------------------------------------------
------------------------------------
form freeMemory using iLocPrograms like iPrograms[]
iLocFunctions like iFunctions[]
iLocProgfunctions like iProgFunctions[]
iLocDictionary like iDictionary[]
iLocTableTypes like iTableTypes[]
iLocTransformation like iTransformations[] .
*----------------------------------------------------------------------------------
------------------------------------
* checkComboBoxes... Check input parameters
*----------------------------------------------------------------------------------
------------------------------------
form checkComboBoxes.
if pAuth is initial.
if soPack[] is initial.
case 'X'.
when rTable.
if soTable[] is initial.
statusBarMessage = 'You must enter either a table name or author.'.
endif.
when rFunc.
if ( soFName[] is initial ) and ( soFGroup[] is initial ).
if soFName[] is initial.
statusBarMessage = 'You must enter either a function name or
author.'.
else.
if soFGroup[] is initial.
statusBarMessage = 'You must enter either a function group, or an
author name.'.
endif.
endif.
endif.
when rProg.
if soProg[] is initial.
statusBarMessage = 'You must enter either a program name or author
name.'.
endif.
endcase.
endif.
else.
* Check the user name of the person objects are to be downloaded for
if pAuth = 'SAP*' or pauth = 'SAP'.
statusBarMessage = 'Sorry cannot download all objects for SAP standard user'.
endif.
endif.
* Tables
if not soTable is initial.
soTableNames[] = soTable[].
* Add in the customer namespace if we need to
if not pcName is initial.
loop at soTableNames.
if soTableNames-low+0(strLength) <> pcName.
concatenate pcName soTableNames-low into soTableNames-low.
endif.
modify soTableNames.
endloop.
endif.
endif.
* Function names
if not soFName is initial.
soFunctionName[] = soFname[].
* Add in the customer namespace if we need to
if not pcName is initial.
loop at soFunctionName.
if soFunctionName-low+0(strLength) <> pcName.
concatenate pcName soFunctionName-low into soFunctionName-low.
endif.
modify soFunctionName.
endloop.
endif.
endif.
* Table Types
if not soTabTyp is initial.
soTableTypeNames[] = soTabTyp[].
modify soTableTypeNames.
endloop.
endif.
endif.
* Function group
if not soFGroup is initial.
soFunctionGroup[] = soFGroup[].
* Add in the customer namespace if we need to
if not pcName is initial.
loop at soFunctionName.
if soFunctionGroup-low+0(strLength) <> pcName.
concatenate pcName soFunctionGroup-low into soFunctionGroup-low.
endif.
modify soFunctionGroup.
endloop.
endif.
endif.
* Class names
if not soClass is initial.
soClassName[] = soClass[].
* Add in the customer namespace if we need to
if not pcName is initial.
loop at soClassName.
if soClassName-low+0(strLength) <> pcName.
concatenate pcName soClassName-low into soClassName-low.
endif.
modify soClassName.
endloop.
endif.
endif.
* Program names
if not soProg is initial.
soProgramName[] = soProg[].
* Add in the customer namespace if we need to
if not pcName is initial.
loop at soProgramName.
if soProgramName-low+0(strLength) <> pcName.
concatenate pcName soProgramName-low into soProgramName-low.
endif.
modify soProgramName.
endloop.
endif.
endif.
* XSLT names
if not soXslt is initial.
soXsltName[] = soXslt[].
* Add in the customer namespace if we need to
if not pcName is initial.
loop at soXsltName.
if soXsltName-low+0(strlength) <> pcName.
concatenate pcName soXsltName-low into soXsltname-low.
endif.
modify soXsltName.
endloop.
endif.
endif.
endform.
" fillSelectionRanges
*----------------------------------------------------------------------------------
------------------------------------
* retrieveTables... Search for tables in dictionary
*----------------------------------------------------------------------------------
------------------------------------
form retrieveTables using iLocDictStructure like iDictionary[]
soTable like soTable[]
soAuthor like soAuthor[]
value(soLocPackage) like soPack[].
*----------------------------------------------------------------------------------
------------------------------------
* retrieveTableTypes
*----------------------------------------------------------------------------------
------------------------------------
form retrieveTableTypes using iLocTableTypes like iTableTypes[]
soTableTypeNames like soTable[]
soAuthor like soAuthor[]
value(soLocPackage) like soPack[].
select *
into corresponding fields of table iLocTableTypes
from dd40l as a
inner join dd40t as t
on a~typename = t~typename
inner join tadir as b
on a~typename = b~obj_name
where a~typename in sotabletypenames
and t~ddlanguage eq sy-langu
and a~as4user in soauthor
and a~as4local = 'A'
and b~pgmid = 'R3TR'
and b~object = 'TTYP'
and b~devclass in solocpackage[].
endform.
" RETRIEVETABLETYPES
*----------------------------------------------------------------------------------
---------------------
* retrieveXSLT...
*----------------------------------------------------------------------------------
---------------------
form retrieveXSLT using ilocTransformations like iTransformations[]
rangexslt like soxsltname[]
rangeauthor like soAuthor[]
value(custnamerange)
value(alsomodifiedbyauthor)
value(customerprogsonly)
value(solocpackage) like sopack[].
data: warangexslt like line of rangexslt.
if rangexslt[] is initial.
* We are finding all programs by an author
perform findAllXsltForAuthor using iLocTransformations[]
rangexslt[]
rangeauthor[]
custnamerange
alsomodifiedbyauthor
customerprogsonly
solocpackage[].
else.
read table rangexslt index 1 into warangexslt.
if warangexslt-low cs asterix.
perform findXsltByWildcard using ilocTransformations[]
rangexslt[]
rangeauthor[]
custnamerange
customerprogsonly
solocpackage[].
else.
perform checkXsltDoesExist using ilocTransformations[]
rangexslt[].
endif.
endif.
endform.
"retrieveXSLT
*----------------------------------------------------------------------------------
------------------------------------
* findTableDescription... Search for table description in dictionary
*----------------------------------------------------------------------------------
------------------------------------
form findTableDescription using value(tableName)
tableDescription.
*----------------------------------------------------------------------------------
------------------------------------
* findTableDefinition... Find the structure of a table from the SAP database.
*----------------------------------------------------------------------------------
------------------------------------
form findTableDefinition using value(tablename)
iDictStruct like dumIDictStructure[].
clear iDictStruct[].
loop at iDomainDataA.
move-corresponding iDomainDataA to waDomainStruct.
append waDomainStruct to waDictStruct-iDomains.
endloop.
clear iDomainDataA[].
append waDictStruct to iDictStruct.
clear waDictStruct.
endloop.
endif.
endform.
"findTableDefinition
*----------------------------------------------------------------------------------
------------------------------------
* retrieveMessageClass... Retrieve a message class from the SAP database
*----------------------------------------------------------------------------------
------------------------------------
form retrieveMessageClass using iLocMessages like iMessages[]
rangeAuthor like soAuthor[]
value(messageClassName)
value(messageClassLang)
value(modifiedBy)
value(soLocPackage) like soPack[].
else.
* Select also by the last person who modified the message class
select t100~arbgb "#EC CI_BUFFJOIN
t100~msgnr
t100~text
t100a~stext
appending corresponding fields of table iLocMessages
from t100
inner join t100a
on t100a~arbgb = t100~arbgb
inner join tadir
on t100~arbgb = tadir~obj_name
where t100a~masterLang = messageClassLang
and t100a~respUser in rangeAuthor[]
and t100a~lastUser in rangeAuthor[]
and tadir~pgmid = 'R3TR'
and tadir~object = 'MSAG'
and tadir~devclass in soLocPackage[].
endif.
endif.
endform.
"retrieveMessageClass
*----------------------------------------------------------------------------------
------------------------------------
* retrieveFunctions... Retrieve function modules from SAP DB. May be called in
one of two ways
*----------------------------------------------------------------------------------
------------------------------------
form retrieveFunctions using soFName like soFunctionName[]
soFGroup like soFunctionGroup[]
iLocFunctionNames like iFunctions[]
value(solocAuthor) like soAuthor[]
value(getTextElements)
value(getScreens)
value(customerOnly)
value(customerNameRange)
value(soLocPackage) like soPack[].
data: waFunctionName type tFunction.
data: noGroupsFound type abap_bool value TRUE.
data: previousFG type v_fdir-area.
previousFG = waFunctionName-functionGroup.
modify iLocFunctionNames from waFunctionName.
endloop.
endform.
"retrieveFunctions
*----------------------------------------------------------------------------------
------------------------------------
* retrieveFunctionDetail... Retrieve function module details from SAP DB.
*----------------------------------------------------------------------------------
------------------------------------
form retrieveFunctionDetail using value(functionName)
progname
includeName
titleText.
if sy-subrc = 0.
select single stext
from tftit
into titleText
where spras = pMLang
and funcName = functionName.
endif.
endform.
"retrieveFunctionDetail
"findFunctionTopInclude
*----------------------------------------------------------------------------------
------------------------------------
* scanForAdditionalFuncStuff... Search for additional things relating to functions
*----------------------------------------------------------------------------------
------------------------------------
form scanForAdditionalFuncStuff using iLocFunctions like iFunctions[]
value(recursiveIncludes)
value(recursiveFunctions)
value(searchForIncludes)
value(searchForFunctions)
value(searchForDictionary)
value(searchForMessages)
value(searchForTransformations)
value(customerOnly)
value(customerNameRange).
*----------------------------------------------------------------------------------
------------------------------------
* scanForClasses... Search each class or method for other classes
*----------------------------------------------------------------------------------
------------------------------------
form scanForClasses using value(className)
value(classLinkName)
value(customerOnly)
value(customerNameRange)
iLocClasses like iClasses[]
value(soLocPackage) like soPack[].
waClass-exceptionClass = TRUE.
endif.
waClass-clsname = head.
*----------------------------------------------------------------------------------
------------------------------------
* scanForIncludePrograms... Search each program for include programs
*----------------------------------------------------------------------------------
------------------------------------
form scanForIncludePrograms using value(programName)
value(recursiveIncludes)
value(customerOnly)
value(customerNameRange)
iLocIncludes like dumiIncludes[].
clear iIncludeLines[].
else.
continue.
endif.
catch cx_sy_range_out_of_bounds into objRuntimeError.
endtry.
endif.
waInclude-includeName = waTokens-str.
*----------------------------------------------------------------------------------
------------------------------------
* scanForIncludePrograms... Search each program for include programs
*----------------------------------------------------------------------------------
------------------------------------
form scanForTransformations using value(programName)
value(customerOnly)
value(customerNameRange)
iLocTransformation like iTransformations[].
clear iIncludeLines[].
waTransformation-xsltName = waTokens-str.
endif.
endif.
endloop.
endform.
"scanForIncludePrograms
*----------------------------------------------------------------------------------
------------------------------------
* scanforTransIncludes...
*----------------------------------------------------------------------------------
------------------------------------
form scanforTransIncludes using value(xsltName)
value(customerOnly)
value(customerNameRange)
iLocTransformations like iTransformations[].
*----------------------------------------------------------------------------------
------------------------------------
* scanForFunctions... Search each program for function modules
*----------------------------------------------------------------------------------
------------------------------------
form scanForFunctions using value(programName)
value(programLinkName)
value(recursiveIncludes)
value(recursiveFunctions)
value(customerOnly)
value(customerNameRange)
iLocFunctions like iFunctions[].
nextLine = sy-tabix + 1.
if nextLine <= maxLines.
read table iTokens index nextLine into waTokens.
if skipThisLoop = FALSE.
waFunction-functionName = waTokens-str.
replace all occurrences of '''' in waFunction-functionName with ' '.
condense waFunction-functionName.
if sy-subrc = 0.
* Best find the function number as well.
perform retrieveFunctionDetail using waFunction-functionName
waFunction-progname
waFunction-includeNumber
waFunction-functionTitle.
* Now lets search a little bit deeper and do a recursive search for
other includes
if not recursiveIncludes is initial.
perform scanForIncludePrograms using waFunction-
functionMainInclude
recursiveIncludes
customerOnly
customerNameRange
waFunction-iIncludes[].
endif.
* Now lets search a little bit deeper and do a recursive search for
other functions
if not recursiveFunctions is initial.
perform scanForFunctions using waFunction-functionMainInclude
space
recursiveIncludes
recursiveFunctions
customerOnly
customerNameRange
iLocFunctions[].
endif.
clear waFunction.
endif.
endif.
endif.
clear waFunction.
endif.
endif.
endloop.
endform.
"scanForFunctions
*----------------------------------------------------------------------------------
------------------------------------
* scanForFunctionIncludes... Find all user defined includes within the function
group
*----------------------------------------------------------------------------------
------------------------------------
form scanForFunctionIncludes using poolName
value(customerOnly)
value(customerNameRange)
iLocIncludes like dumiIncludes[].
clear iIncludeLines[].
maxLines = lines( iTokens ).
loop at iTokens where str = INCLUDE and type = 'I'.
nextLine = sy-tabix + 1.
if nextLine <= maxLines.
read table iTokens index nextLine into waTokens.
if waTokens-str cp '*F++'.
* Are we only to find customer includes?
if not customerOnly is initial.
try.
if waTokens-str+0(2) = 'LY' or waTokens-str+0(2) = 'LZ' or waTokens-
str cs customerNameRange.
else.
continue.
endif.
catch cx_sy_range_out_of_bounds into objRuntimeError.
endtry.
endif.
waInclude-includeName = waTokens-str.
*----------------------------------------------------------------------------------
------------------------------------
* findProgramOrIncludeTitle... Finds the title text of a program.
*----------------------------------------------------------------------------------
------------------------------------
form findProgramOrIncludeTitle using value(programName)
titleText.
*----------------------------------------------------------------------------------
------------------------------------
* retrievePrograms... find programs and sub objects from SAP DB
*----------------------------------------------------------------------------------
------------------------------------
form retrievePrograms using iLocProgram like iPrograms[]
iLocFunctions like iFunctions[]
rangeProgram like soProgramName[]
rangeAuthor like soAuthor[]
value(custNameRange)
value(alsoModifiedByauthor)
value(customerProgsOnly)
value(getMessages)
value(getTextElements)
value(getCustDictStructures)
value(getFunctions)
value(getIncludes)
value(getScreens)
value(getTransformations)
value(recursiveFuncSearch)
value(recursiveIncludeSearch)
value(soLocPackage) like soPack[].
if rangeProgram[] is initial.
* We are finding all programs by an author
perform findAllProgramsForAuthor using iLocProgram[]
rangeProgram[]
rangeAuthor[]
custNameRange
alsoModifiedByAuthor
customerProgsOnly
soLocPackage[].
else.
read table rangeProgram index 1 into waRangeProgram.
if waRangeProgram-low cs ASTERIX.
perform findProgramsByWildcard using iLocProgram[]
rangeProgram[]
rangeAuthor[]
custNameRange
customerProgsOnly
soLocPackage[].
else.
perform checkProgramDoesExist using iLocProgram[]
rangeProgram[].
endif.
endif.
* Once we have a list of all the includes we need to loop round them an select all
the other objects
loop at iLocProgram into waProgram.
myTabix = sy-tabix.
perform findProgramDetails using waProgram-progName
waProgram-subc
waProgram-programTitle
waProgram
getTextElements
getMessages
getScreens
getTransformations
getCustDictStructures
customerOnly
customerNameRange.
* Now we have all the program includes and details we need to find extra functions
if not getFunctions is initial.
loop at iLocProgram into waProgram.
* Find any functions defined in the code
perform scanForFunctions using waProgram-progname
waProgram-progname
space
space
customerOnly
customerNameRange
iLocFunctions[].
endloop.
* We have a list of all the functions so lets go and find details and other
function calls
perform scanForAdditionalFuncStuff using iLocFunctions[]
recursiveIncludeSearch
recursiveFuncSearch
getIncludes
getFunctions
getCustDictStructures
getMessages
getTransformations
customerOnly
customerNameRange.
endif.
endform.
"scanForAdditionalProgStuff
*----------------------------------------------------------------------------------
---------------------
* findProgramDetails...
*----------------------------------------------------------------------------------
---------------------
form findProgramDetails using value(programName)
value(programType)
programTitle
waProgram type tProgram
value(getTextElements)
value(getMessages)
value(getScreens)
value(getTransformations)
value(getCustDictStructures)
value(customerOnly)
value(customerNameRange).
*----------------------------------------------------------------------------------
---------------------
* findAllProgramsForAuthor...
*----------------------------------------------------------------------------------
---------------------
form findAllProgramsForAuthor using iLocProgram like iPrograms[]
rangeProgram like soProgramName[]
rangeAuthor like soAuthor[]
value(custNameRange)
value(alsoModifiedByauthor)
value(customerProgsOnly)
value(soLocPackage) like soPack[].
else.
* Select only customer specific programs
select progname
subc
appending corresponding fields of table iLocProgram
from reposrc as a
inner join tadir as b
on a~progname = b~obj_name
where a~progname in rangeProgram
and ( a~progname like altCustomerNameRange
or a~progname like 'Z%'
or a~progname like 'Y%'
or a~progname like 'SAPMZ%'
or a~progname like 'SAPMY%')
and a~cnam in rangeAuthor
and ( a~subc = '1' or a~subc = 'M' or a~subc = 'S' )
and b~pgmid = 'R3TR'
and b~object = 'PROG'
and b~devclass in soLocPackage.
endif.
else.
*----------------------------------------------------------------------------------
---------------------
* findAllXSLTForAuthor...
*----------------------------------------------------------------------------------
---------------------
form findAllXSLTForAuthor using ilocTransformations like iTransformations[]
rangexslt like soxsltname[]
rangeauthor like soauthor[]
value(custnamerange)
value(alsomodifiedbyauthor)
value(customerprogsonly)
value(solocpackage) like sopack[].
else.
* Select only customer specific programs
select obj_name
into waTransformation-xsltname
from tadir
where pgmid = 'R3TR'
and object = 'XSLT'
and author in rangeauthor
and obj_name in rangexslt
and devclass in solocpackage
and ( obj_name like altcustomernamerange
or obj_name like 'Z%'
or obj_name like 'Y%').
*----------------------------------------------------------------------------------
---------------------
* findXsltByWildcard...
*----------------------------------------------------------------------------------
---------------------
form findXsltByWildcard using iLocTransformations like iTransformations[]
value(rangexslt) like soxsltname[]
value(rangeauthor) like soauthor[]
value(custnamerange)
value(customerprogsonly)
value(solocpackage) like sopack[].
if customerprogsonly is initial.
* build up the customer name range used for select statements
if custnamerange <> '^'.
concatenate custnamerange '%' into altcustomernamerange.
select obj_name
into waTransformation-xsltname
from tadir
where pgmid = 'R3TR'
and object = 'XSLT'
and obj_name in rangexslt
and obj_name like altcustomernamerange
and author in rangeauthor.
select obj_name
into waTransformation-xsltname
from tadir
where pgmid = 'R3TR'
and object = 'XSLT'
and obj_name in rangexslt
and obj_name like altcustomernamerange
and ( obj_name like 'Z%' or
obj_name like 'Y%' ).
*----------------------------------------------------------------------------------
---------------------
* checkXsltDoesExist...
*----------------------------------------------------------------------------------
---------------------
form checkXsltDoesExist using ilocTransformations like iTransformations[]
rangexslt like soxsltname[].
if sy-subrc = 0.
append waTransformation to iLocTransformations.
endif.
endform.
"checkxsltDoesExist
*----------------------------------------------------------------------------------
---------------------
* checkProgramDoesExist...
*----------------------------------------------------------------------------------
---------------------
form checkProgramDoesExist using iLocProgram like iPrograms[]
rangeProgram like soProgramName[].
*----------------------------------------------------------------------------------
---------------------
* findProgramsByWildcard.. Search in the system for programs
*----------------------------------------------------------------------------------
---------------------
form checkAndAddTableType using waDictionary-tableName
iLocTableTypes like iTableTypes[].
select *
into corresponding fields of table iLocTableTypes
from dd40l as a
inner join dd40t as t
on a~typename = t~typename
where a~typename = waDictionary-tableName
and t~ddlanguage eq sy-langu
and a~as4local = 'A'.
endform.
*----------------------------------------------------------------------------------
---------------------
* findProgramsByWildcard.. Search in the system for programs
*----------------------------------------------------------------------------------
---------------------
form findProgramsByWildcard using iLocProgram like iPrograms[]
value(rangeProgram) like soProgramName[]
value(rangeAuthor) like soAuthor[]
value(custNameRange)
value(customerProgsOnly)
value(soLocPackage) like soPack[].
if customerProgsOnly is initial.
* build up the customer name range used for select statements
if custNameRange <> '^'.
concatenate custNameRange '%' into altCustomerNameRange.
select progname
subc
from reposrc
appending corresponding fields of table iLocProgram
where progname in rangeProgram
and progname like altCustomerNameRange
and ( subc = '1' or subc = 'M' or subc = 'S' )
and ( cnam in rangeAuthor or unam in rangeAuthor ).
else.
select progname
subc
from reposrc
appending corresponding fields of table iLocProgram
where progname in rangeProgram
and ( subc = '1' or subc = 'M' or subc = 'S' )
and ( cnam in rangeAuthor or unam in rangeAuthor ).
endif.
else.
* Only customer programs
if custNameRange <> '^'.
concatenate custNameRange '%' into altCustomerNameRange.
select progname
subc
from reposrc
appending corresponding fields of table iLocProgram
where progname in rangeProgram
and ( progname like altCustomerNameRange
or progname like 'Z%'
or progname like 'Y%'
or progname like 'SAPMZ%'
or progname like 'SAPMY%')
and ( subc = '1' or subc = 'M' or subc = 'S' )
and ( cnam in rangeAuthor or unam in rangeAuthor ).
else.
select progname
subc
from reposrc
appending corresponding fields of table iLocProgram
where progname in rangeProgram
and ( progname like 'Z%'
or progname like 'Y%'
or progname like 'SAPMZ%'
or progname like 'SAPMY%')
and ( subc = '1' or subc = 'M' or subc = 'S' )
and ( cnam in rangeAuthor or unam in rangeAuthor ).
endif.
endif.
endform.
"findProgramsByWildcard
*----------------------------------------------------------------------------------
---------------------
* retrieveProgramTexts... Find the text elements and selection texts for a program
*----------------------------------------------------------------------------------
---------------------
form retrieveProgramTexts using iLocSelectionTexts like dumiTextTab[]
iLocTextElements like dumiTextTab[]
value(programName).
* Selection texts.
loop at iTextTable where id = 'S'.
move iTextTable-key to waTexts-key.
move iTextTable-entry to waTexts-entry.
append waTexts to iLocSelectiontexts.
clear waTexts.
endloop.
* Text elements.
delete iTextTable where key = 'S'.
loop at iTextTable where id = 'I'.
move iTextTable-key to waTexts-key.
move iTextTable-entry to waTexts-entry.
append waTexts to iLocTextElements.
endloop.
endform.
"retrieveProgramTexts
*----------------------------------------------------------------------------------
---------------------
* retrieveGUITitles... Search for any GUI texts
*----------------------------------------------------------------------------------
---------------------
form retrieveGUITitles using iLocGUITitle like dumIGUITitle[]
value(programName).
select obj_code
text
from d347t
appending corresponding fields of table iLocGUItitle
where progname = programName.
endform.
"retrieveGUITitles
*----------------------------------------------------------------------------------
---------------------
* findMainMessageClass... find the message class stated at the top of program.
*----------------------------------------------------------------------------------
---------------------
form findMainMessageClass using value(programName)
messageClass.
*----------------------------------------------------------------------------------
---------------------
* retrieveClasses... find classes and sub objects from SAP DB
*----------------------------------------------------------------------------------
---------------------
form retrieveClasses using iLocClasses like iClasses[]
iLocFunctions like iFunctions[]
rangeClass like soClassName[]
rangeAuthor like soAuthor[]
value(custNameRange)
value(alsoModifiedByauthor)
value(customerProgsOnly)
value(getMessages)
value(getTextElements)
value(getCustDictStructures)
value(getFunctions)
value(getIncludes)
value(getTransformations)
value(recursiveFuncSearch)
value(recursiveIncludeSearch)
value(recursiveClassSearch)
value(language)
value(soLocPackage) like soPack[].
if rangeClass[] is initial.
* We are finding all programs by an author
perform findAllClassesForAuthor using iLocClasses[]
rangeClass[]
rangeAuthor[]
custNameRange
alsoModifiedByAuthor
customerProgsOnly
language.
else.
read table rangeClass index 1 into waRangeClass.
if waRangeClass-low cs ASTERIX.
perform findClassesByWildcard using iLocClasses[]
rangeClass[]
rangeAuthor[]
custNameRange
customerProgsOnly
language.
else.
perform checkClassDoesExist using iLocClasses[]
rangeClass[].
endif.
endif.
*----------------------------------------------------------------------------------
---------------------
* findAllClassesForAuthor...
*----------------------------------------------------------------------------------
---------------------
form findAllClassesForAuthor using iLocClass like iClasses[]
rangeClass like soClassName[]
rangeAuthor like soAuthor[]
value(custNameRange)
value(alsoModifiedByauthor)
value(customerClassesOnly)
value(language).
if sy-subrc <> 0.
select clsname descript msg_id
from vseoclass
appending corresponding fields of table ilocClass
where clsname in rangeClass
and langu = language
and ( author in rangeAuthor or changedby in rangeAuthor )
and version = '0'
and ( state = '0' or state = '1' ).
endif.
else.
* Select only customer specific classes
select clsname descript msg_id
from vseoclass
appending corresponding fields of table ilocClass
where clsname in rangeClass
and ( clsname like altCustomerNameRange
or clsname like 'Z%'
or clsname like 'Y%')
and langu = language
and ( author in rangeAuthor or changedby in rangeAuthor )
and version = '1'
and ( state = '0' or state = '1' ).
if sy-subrc <> 0.
select clsname descript msg_id
from vseoclass
appending corresponding fields of table ilocClass
where clsname in rangeClass
and ( clsname like altCustomerNameRange
or clsname like 'Z%'
or clsname like 'Y%')
and langu = language
and ( author in rangeAuthor or changedby in rangeAuthor )
and version = '0'
and ( state = '0' or state = '1' ).
endif.
endif.
else.
* Programs created by author
if customerClassesOnly is initial.
* Select all classes
select clsname descript msg_id
from vseoclass
appending corresponding fields of table ilocClass
where clsname in rangeClass
and langu = language
and author in rangeAuthor
and version = '1'
and ( state = '0' or state = '1' ).
if sy-subrc <> 0.
select clsname descript msg_id
from vseoclass
appending corresponding fields of table ilocClass
where clsname in rangeClass
and langu = language
and author in rangeAuthor
and version = '0'
and ( state = '0' or state = '1' ).
endif.
else.
* Select only customer specific classes
select clsname descript msg_id
from vseoclass
appending corresponding fields of table ilocClass
where clsname in rangeClass
and ( clsname like altCustomerNameRange
or clsname like 'Z%'
or clsname like 'Y%')
and langu = language
and author in rangeAuthor
and version = '1'
and ( state = '0' or state = '1' ).
if sy-subrc <> 0.
select clsname descript msg_id
from vseoclass
appending corresponding fields of table ilocClass
where clsname in rangeClass
and ( clsname like altCustomerNameRange
or clsname like 'Z%'
or clsname like 'Y%')
and langu = language
and author in rangeAuthor
and version = '0'
and ( state = '0' or state = '1' ).
endif.
endif.
endif.
endform.
"findAllClassesForAuthor
*----------------------------------------------------------------------------------
---------------------
* findClassesByWildcard... Find classes using a wildcard search
*----------------------------------------------------------------------------------
---------------------
form findClassesByWildcard using iLocClass like iClasses[]
rangeClass like soClassName[]
value(rangeAuthor) like soAuthor[]
value(custNameRange)
value(customerClassesOnly)
value(language).
if customerClassesOnly is initial.
* Searching for customer and SAP classes
if custNameRange <> '^'.
* build up the customer name range used for select statements
concatenate custNameRange '%' into altCustomerNameRange.
*----------------------------------------------------------------------------------
---------------------
* checkClassDoesExist...
*----------------------------------------------------------------------------------
---------------------
form checkClassDoesExist using iLocClass like iClasses[]
rangeClass like soClassName[].
if sy-subrc <> 0.
select single clsname descript msg_id
from vseoclass
into corresponding fields of waClass
where clsname in rangeClass
and version = '0'
and ( state = '0' or state = '1' ).
endif.
*----------------------------------------------------------------------------------
---------------------
* scanForAdditionalClassStuff...
*----------------------------------------------------------------------------------
---------------------
form scanForAdditionalClassStuff using iLocClasses like iClasses[]
iLocFunctions like iFunctions[]
value(getTextElements)
value(getMessages)
value(getCustDictStructures)
value(getFunctions)
value(getIncludes)
value(getTransformations)
value(customerOnly)
value(customerNameRange)
value(recursiveIncludeSearch)
value(recursiveFuncSearch)
value(recursiveClassSearch)
value(soLocPackage) like soPack[].
* Set the scanned class so we do not check them again when running recursively.
waClass-scanned = 'X'.
modify iLocClasses from waClass index myTabix.
endloop.
* Now we have all the classes and details we need to find extra classes
if not recursiveClassSearch is initial.
classCurrentLines = lines( iLocClasses ).
loop at iLocClasses into waClass.
* Don't try and find any other details for an exception class
if ( waClass-clsName ns 'ZCX_' or waClass-clsName ns 'CX_' ).
* Find any classes defined in the main class definition
perform scanForClasses using waClass-privateClassKey
waClass-clsname
customerOnly
customerNameRange
iLocClasses[]
soLocPackage[].
perform scanForClasses using waClass-publicClassKey
waClass-clsname
customerOnly
customerNameRange
iLocClasses[]
soLocPackage[].
* We have a list of all the classes so lets go and find their details
classNewLines = lines( iLocClasses ).
if classNewLines > classCurrentLines.
perform scanForAdditionalClassStuff using iLocClasses[]
iLocFunctions[]
getTextElements
getMessages
getCustDictStructures
getFunctions
getIncludes
getTransformations
customerOnly
customerNameRange
recursiveIncludeSearch
recursiveFuncSearch
recursiveClassSearch
soLocPackage[].
endif.
endif.
endform.
"scanForAdditionalClassStuff
*----------------------------------------------------------------------------------
---------------------
* findClassDetails...
*----------------------------------------------------------------------------------
---------------------
form findClassDetails using value(className)
waClass type tClass
iLocFunctions like iFunctions[]
value(getTextElements)
value(getMessages)
value(getFunctions)
value(getCustDictStructures)
value(getTransformations)
value(customerOnly)
value(customerNameRange).
if waClass-descript is initial.
perform findClassDescription using className
waClass-descript.
endif.
* Don't try and find any other details for an exception class
if ( waClass-clsName cs 'ZCX_' or waClass-clsName cs 'CX_' ).
* Exception texts
perform findExceptionTexts using waClass-publicClassKey
waClass-iConcepts[].
waClass-scanned = 'X'.
else.
if not getTextElements is initial.
* Find the class texts from out of the database.
perform retrieveProgramTexts using iEmptySelectionTexts[]
waClass-iTextElements[]
waClass-textElementKey.
endif.
* Methods
* Find all the methods for this class
perform findClassMethods using className
waClass-iMethods[].
* If the class has specified a message class but were unable to find any specific
messages
* then retrieve the whole message class.
if ( not waClass-msg_id is initial and waClass-iMessages[] is initial ).
perform retrieveMessageClass using waClass-iMessages[]
rnBlankAuthor[]
waClass-msg_id
pMLang
''
rnBlankPackage[].
endif.
endif.
endform.
"findClassDetails
*----------------------------------------------------------------------------------
------------------------------------
* Find all interface methods used by the class
*----------------------------------------------------------------------------------
------------------------------------
form findInterfaceMethods using value(className)
iLocInterfaces like dumiInterfaces[]
iLocMethods like dumiMethods[].
loop at iIntMethod.
concatenate iIntMethod-interfaceName '~' iIntMethod-cmpname into waMethod-
cmpname.
waMethod-exposure = iIntMethod-exposure.
clear waMethod.
endloop.
endform.
*----------------------------------------------------------------------------------
------------------------------------
* Check to see if their are any interfaces being used by this class
*----------------------------------------------------------------------------------
------------------------------------
form findClassInterfaces using value(className)
iLocInterfaces like dumiInterfaces[].
loop at iInterfaces.
waLocInterface-interfaceName = iInterfaces-refclsname.
append wALocInterface to iLocInterfaces.
endloop.
endif.
endform.
*----------------------------------------------------------------------------------
------------------------------------
* Find the parent of the current class
*----------------------------------------------------------------------------------
------------------------------------
form findClassParent using value(className)
parentClassName.
clskey-clsname = className.
parentClassName = waInheritance-refclsname.
endform.
*----------------------------------------------------------------------------------
---------------------
* buildClassKeys... Finds the title text of a class.
*----------------------------------------------------------------------------------
---------------------
form buildClassKeys using waClass type tClass.
*----------------------------------------------------------------------------------
---------------------
* findClassDescription... Finds the title text of a class.
*----------------------------------------------------------------------------------
---------------------
form findClassDescription using value(className)
titleText.
*----------------------------------------------------------------------------------
---------------------
* findExceptionTexts... Fiond the texts of an exception class.
*----------------------------------------------------------------------------------
---------------------
form findExceptionTexts using publicClassKey
iConcepts like dumiConcepts[].
castClassName = publicClassKey.
read report castClassName into iTempLines.
*----------------------------------------------------------------------------------
---------------------
* findClassMethods... Finds the methods of a class.
*----------------------------------------------------------------------------------
---------------------
form findClassMethods using value(className)
iLocMethods like dumiMethods[].
if sy-subrc <> 0.
select cmpName descript exposure
from vseomethod
into corresponding fields of table iMethods
where clsname = className
and version = '0'
and langu = pMLang
and ( state = '0' or state = '1' ).
endif.
select *
from seoredef
into table iRedefinedMethods
where clsname = className
and version = '1'.
* For Each method we must find the original class the method was created in
loop at iRedefinedMethods.
perform findRedefinitionClass using iRedefinedMethods-refclsname
iRedefinedMethods-mtdname
originalClassName.
waMethod-cmpname = iRedefinedMethods-mtdname.
* Find the method key so that we can acces the source code later
loop at iMethods.
perform findMethodKey using className
iMethods-cmpName
iMethods-methodKey.
append iMethods to iLocMethods.
endloop.
endform.
"findClassMethods
*----------------------------------------------------------------------------------
---------------------
* findRedefinitionClass... find the original class the method was redefined from
*----------------------------------------------------------------------------------
---------------------
form findRedefinitionClass using value(redefinedClassName) type seoclsname
value(methodName) type seocpdname
originalClassName type seoclsname.
select single *
from seoredef
into waRedef
where refclsName = redefinedClassName
and mtdname = methodName.
if sy-subrc = 0.
* There is a higher class still.
originalClassName = waRedef-refclsName.
perform findRedefinitionClassRecur using waRedef-refclsname
waRedef-mtdname
originalClassName.
else.
* We are at the higher class.
originalClassName = waRedef-refclsName.
endif.
endform.
*----------------------------------------------------------------------------------
---------------------
* findRedefinitionClassRecur... Recursively find the original class the method was
redefined from
*----------------------------------------------------------------------------------
---------------------
form findRedefinitionClassRecur using value(redefinedClassName) type seoclsname
value(methodName) type seocpdname
originalClassName type seoclsname.
select single *
from seoredef
into waRedef
where clsName = redefinedClassName
and mtdname = methodName.
if sy-subrc = 0.
* There is a higher class still.
originalClassName = waRedef-refclsName.
perform findRedefinitionClassRecur using waRedef-refclsname
waRedef-mtdname
originalClassName.
endif.
endform.
*----------------------------------------------------------------------------------
---------------------
* findMethodKey... find the unique key which identifes this method
*----------------------------------------------------------------------------------
---------------------
form findMethodKey using value(className)
value(methodName)
methodKey.
data: methodID type seocpdkey.
data: locMethodKey type program.
methodID-clsname = className.
methodID-cpdName = methodName.
methodKey = locMethodKey.
endform.
"findMethodKey
*----------------------------------------------------------------------------------
---------------------
* scanForMessages... Search each program for messages
*----------------------------------------------------------------------------------
---------------------
form scanForMessages using value(programName)
value(mainMessageClass)
iLocMessages like iMessages[].
clear iIncludeLines[].
loop at iTokens.
if iTokens-str = MESSAGE.
workingOnMessage = TRUE.
continue.
endif.
if workingOnMessage = TRUE.
stringLength = strlen( iTokens-str ).
* Message declaration 1
if stringLength = 4 and iTokens-str+0(1) ca sy-abcde.
waMessage-msgnr = iTokens-str+1(3).
waMessage-arbgb = mainMessageClass.
else.
if iTokens-str cs '''' or iTokens-str cs '`'.
* Message declaration 2
translate iTokens-str using ''' '.
translate iTokens-str using '` '.
condense iTokens-str.
shift iTokens-str left deleting leading space.
waMessage-text = iTokens-str.
waMessage-arbgb = 'Hard coded'.
else.
if iTokens-str = 'ID'.
* Message declaration 3
nextLine = sy-tabix + 1.
read table iTokens index nextLine into waTokens.
translate waTokens-str using ''' '.
condense iTokens-str.
shift waTokens-str left deleting leading space.
if not waTokens-str = 'SY-MSGID'.
waMessage-arbgb = waTokens-str.
nextLine = nextLine + 4.
read table iTokens index nextLine into waTokens.
translate waTokens-str using ''' '.
condense waTokens-str.
shift waTokens-str left deleting leading space.
waMessage-msgnr = waTokens-str.
else.
workingOnMessage = FALSE.
endif.
else.
if stringLength >= 5 and iTokens-str+4(1) = '('.
* Message declaration 4
waMessage-msgnr = iTokens-str+1(3).
shift iTokens-str left up to '('.
replace '(' into iTokens-str with space.
replace ')' into iTokens-str with space.
condense iTokens-str.
waMessage-arbgb = iTokens-str.
endif.
endif.
endif.
endif.
*----------------------------------------------------------------------------------
---------------------
* scanForTables... Search each program for dictionary tables
*----------------------------------------------------------------------------------
---------------------
form scanForTables using value(programName)
value(customerOnly)
value(customerNameRange)
iLocDictionary like iDictionary[].
scan abap-source iIncludeLines tokens into iTokens with includes statements into
iStatements keywords from iKeywords.
clear iIncludeLines[].
loop at iTokens.
if not CustomerOnly is initial.
try.
case iTokens-str+0(1).
when 'Y' or 'Z' or customerNameRange.
when others.
continue.
endcase.
* if ( iTokens-str+0(1) <> 'Y' or iTokens-str+0(1) <> 'Z' or iTokens-str ns
customerNameRange ).
* continue.
* endif.
catch cx_sy_range_out_of_bounds into objRuntimeError.
endtry.
endif.
waDictionary-tablename = iTokens-str.
* Don't append the object if we already have it listed
read table iLocDictionary into waDictionaryComparison with key tablename =
waDictionary-tableName.
if sy-subrc <> 0.
perform findTableDescription using waDictionary-tablename
waDictionary-tableTitle.
*----------------------------------------------------------------------------------
---------------------
* findProgramScreenFlow...
*----------------------------------------------------------------------------------
---------------------
form findProgramScreenFlow using waProgram type tProgram.
loop at iFlow.
append iFlow to waProgram-iScreenFlow.
endloop.
endform.
"findProgramScreenFlow
*----------------------------------------------------------------------------------
------------------------------------
* findMainFunctionInclude... Find the main include that contains the source code
*----------------------------------------------------------------------------------
------------------------------------
form findMainFunctionInclude using value(programName)
value(functionGroup)
value(functionIncludeNo)
functionIncludeName.
*----------------------------------------------------------------------------------
------------------------------------
* findFunctionTopInclude... Find the top include for the function group
*----------------------------------------------------------------------------------
------------------------------------
form findFunctionTopInclude using value(programName)
value(functionGroup)
topIncludeName.
*----------------------------------------------------------------------------------
---------------------
* findFunctionScreenFlow...
*----------------------------------------------------------------------------------
---------------------
form findFunctionScreenFlow using waFunction type tFunction.
*----------------------------------------------------------------------------------
---------------------
* scanForLikeOrType... Look for any dictionary objects referenced by a like or type
statement
*----------------------------------------------------------------------------------
---------------------
form scanForLikeOrType using value(programName)
value(customerOnly)
value(customerNameRange)
iLocDictionary like iDictionary[]
iLocTableTypes like iTableTypes[].
case linetype.
when LIKE or TYPE or STRUCTURE.
* Work on the appropriate lineType
shift waLine up to space.
shift waLine left deleting leading space.
if waLine cs TABLE.
split waLine at TABLE into head tail.
split tail at 'OF' into head tail.
waLine = tail.
shift waLine left deleting leading space.
replace all occurrences of 'WITH HEADER LINE' in waLine with ''.
endif.
if waLine cs COMMA.
split waLine at COMMA into head tail.
if waLine cs DASH.
split head at DASH into head tail.
endif.
if waLine cs OCCURS.
split waLine at SPACE into head tail.
endif.
else.
if waLine cs PERIOD.
split waLine at PERIOD into head tail.
if waLine cs DASH.
split head at DASH into head tail.
endif.
if waLine cs OCCURS.
split waLine at SPACE into head tail.
endif.
else.
split waLine at SPACE into head tail.
if waLine cs DASH.
split head at DASH into head tail.
endif.
endif.
endif.
lineType = ''.
endcase.
endif.
endloop.
endform.
"scanForLikeOrType
*----------------------------------------------------------------------------------
---------------------
* displayStatus...
*----------------------------------------------------------------------------------
---------------------
form displayStatus using value(message)
value(delay).
if delay > 0.
wait up to delay seconds.
endif.
endform.
"displayStatus
*----------------------------------------------------------------------------------
---------------------
* removeLeadingZeros...
*----------------------------------------------------------------------------------
---------------------
form removeLeadingZeros changing myValue.
*----------------------------------------------------------------------------------
---------------------
* determineFrontendOPSystem.... Determine the frontend operating system type.
*----------------------------------------------------------------------------------
---------------------
form determineFrontendOPSystem using separator
operatingSystem.
*----------------------------------------------------------------------------------
---------------------
* determineServerOPSystem.... Determine the server operating system type.
*----------------------------------------------------------------------------------
---------------------
form determineServerOPSystem using separator
serverFileSystem
serverOpSystem.
*----------------------------------------------------------------------------------
---------------------
* findExternalCommand.... Determine if the external command exists. If it doesn't
then disable the
* server input field
*----------------------------------------------------------------------------------
---------------------
form findExternalCommand using value(locServerFileSystem).
castServerOpSys = locServerFileSystem.
if sy-subrc <> 0.
loop at screen.
if screen-name = 'PLOGICAL'.
screen-input = 0.
modify screen.
endif.
if screen-name = 'PSERV'.
screen-input = 0.
modify screen.
endif.
if screen-name = 'PPC'.
screen-input = 0.
modify screen.
endif.
endloop.
***********************************************************************************
*********************
*****************************************DOWNLOAD
ROUTINES**********************************************
***********************************************************************************
*********************
*----------------------------------------------------------------------------------
---------------------
* downloadDDStructures... download database objects to file
*----------------------------------------------------------------------------------
---------------------
form downloadDDStructures using iLocDictionary like iDictionary[]
iLocDictionaryFilename like iDictFilename[]
value(pathname)
value(HtmlFileExtension)
value(subDir)
value(sortTablesAsc)
value(slashSeparator)
value(saveToServer)
value(displayProgressMessage)
value(locServerFileSystem)
value(addBackground) type abap_bool.
if saveToServer is initial.
perform saveFileToPc using iHtmlTable[]
tableFilenameWithPath
tableFilename
space
space
displayProgressMessage.
else.
perform saveFileToServer using iHtmlTable[]
tableFilenameWithPath
tableFilename
completeSavePath
displayProgressMessage
locServerFileSystem.
endif.
waDictFilename-tablename = <waDictionary>-tablename.
waDictFilename-filename = completeSavePath.
append waDictFilename to iLocDictionaryFilename.
clear waDictFilename.
endif.
clear iHtmlTable[].
endloop.
endform.
"downloadDDStructures
*----------------------------------------------------------------------------------
------------------------------------
* downloadDDTableTypes
*----------------------------------------------------------------------------------
------------------------------------
form downloadDDTableTypes using iLocTableTypes like iTableTypes[]
iLocTableTypeFilename like iDictFilename[]
value(pathname)
value(htmlFileExtension)
value(subdir)
value(sortTablesAsc)
value(slashSeparator)
value(saveToServer)
value(displayProgressMessage)
value(locServerFileSystem)
value(addBackground) type abap_bool.
* -- Need a specific routine for table types. All data is in the table
perform convertTableTypeToHtml using iLocTableTypes[]
iHtmlTable[]
<waTableTypes>-typename
<waTableTypes>-ddtext
sortTablesAsc
addBackground.
if saveToServer is initial.
perform saveFileToPC using iHtmlTable[]
tableFilenameWithPath
tableFilename
space
space
displayProgressMessage.
else.
perform saveFileToServer using iHtmlTable[]
tableFilenameWithPath
tableFilename
completeSavePath
displayProgressMessage
locServerFileSystem.
endif.
endif.
endif.
clear iHtmlTable[].
endloop.
endform.
*----------------------------------------------------------------------------------
---------------------
* downloadMessageClass...
*----------------------------------------------------------------------------------
---------------------
form downloadMessageClass using iLocMessages like iMessages[]
value(messageClassName)
value(userFilePath)
value(fileExtension)
value(HTMLfileFlag)
subDir
value(customerNameRange)
value(getIncludes)
value(getDictStructures)
value(userHasSelectedMessageClasses)
value(slashSeparator)
value(saveToServer)
value(displayProgressMessage)
value(locServerFileSystem)
value(addBackground) type abap_bool.
if htmlFileFlag is initial.
append '' to iHtmlTable.
append
'----------------------------------------------------------------------------------
' to iHtmlTable.
if saveToServer is initial.
perform saveFileToPc using iHtmlTable[]
newFilenameWithPath
newFilenameOnly
space
space
displayProgressMessage.
else.
* Save the file to the SAP server
perform saveFileToServer using iHtmlTable[]
newFilenameWithPath
newFilenameOnly
completeSavePath
displayProgressMessage
locServerFileSystem.
endif.
endform.
"downloadMessageClass
*----------------------------------------------------------------------------------
---------------------
* appendMessagesToFile
*----------------------------------------------------------------------------------
---------------------
form appendMessagesToFile using iLocMessages like iMessages[]
iLocHtml like dumiHtml[]
value(userHasSelectedMessageClasses).
if userHasSelectedMessageClasses is initial.
* Only add this extra lines if we are actually appending them to the end of
some program code
append '*' to iLocHtml.
concatenate `* Message class: ` <waMessage>-arbgb into waHtml.
append waHtml to iLocHtml.
endif.
previousMessageID = <waMessage>-arbgb.
clear waHtml.
endif.
if userHasSelectedMessageClasses is initial.
* Only add this extra lines if we are actually appending them to the end of
some program code
concatenate '*' <waMessage>-msgnr ` ` <waMessage>-text into waHtml.
else.
concatenate <waMessage>-msgnr ` ` <waMessage>-text into waHtml.
endif.
*----------------------------------------------------------------------------------
---------------------
* downloadFunctions... Download function modules to file.
*----------------------------------------------------------------------------------
---------------------
form downloadFunctions using iLocFunctions like iFunctions[]
iLocDictionaryFilename like iDictFilename[]
iLocTableTypeFilename like iTableTypeFilename[]
value(userFilePath)
value(fileExtension)
value(subDir)
value(downloadDocumentation)
value(convertToHtml)
value(customerNameRange)
value(getIncludes)
value(getDictStruct)
value(textFileExtension)
value(htmlFileExtension)
value(sortTablesAsc)
value(slashSeparator)
value(saveToServer)
value(displayProgressMessage)
value(locServerFileSystem)
value(addBackground) type abap_bool.
* Download screens.
if not <waFunction>-iScreenFlow[] is initial.
perform downloadScreens using <wafunction>-iScreenFlow[]
<wafunction>-progname
userFilePath
textFileExtension
mainSubDir
slashSeparator
saveToServer
displayProgressMessage
locServerFileSystem.
endif.
endloop.
* Download Transformations
if not <waFunction>-iTransformations[] is initial.
perform downloadXSLT using <waFunction>-iTransformations[]
userFilePath
fileExtension
htmlFileExtension
textFileExtension
convertToHtml
customerNamespace
slashSeparatorToUse
saveToServer
subdir
displayProgressMessage
serverFileSystem
addBackground.
endif.
endloop.
endform.
"downloadFunctions
*----------------------------------------------------------------------------------
---------------------
* readIcludeAndDownload...
*----------------------------------------------------------------------------------
---------------------
form readIncludeAndDownload using iLocTextElements like dumiTextTab[]
iLocSelectionTexts like dumiTextTab[]
iLocMessages like iMessages[]
iLocGUITitles like dumIGUITitle[]
value(programName)
value(functionName)
value(programDescription)
value(overideProgType)
value(userFilePath)
value(fileExtension)
value(additionalSubDir)
value(convertToHtml)
value(customerNameRange)
value(getIncludes)
value(getDictStructures)
value(slashSeparator)
value(saveToServer)
value(displayProgressMessage)
value(locServerFileSystem)
value(addBackground) type abap_bool.
if convertToHtml is initial.
append '' to iLines.
append
'----------------------------------------------------------------------------------
' to iLines.
perform buildFooterMessage using iLines.
append iLines.
else.
perform convertCodeToHtml using iLines[]
programName
programDescription
overideProgType
space
space
fileExtension
customerNameRange
getIncludes
getDictStructures
addBackground.
endif.
if functionName is initial.
objectName = programName.
else.
objectName = functionName.
endif.
if saveToServer is initial.
perform saveFileToPc using iLines[]
localFilenameWithPath
localFilenameOnly
space
space
displayProgressMessage.
else.
perform saveFileToServer using iLines[]
localFilenameWithPath
localFilenameOnly
completeSavePath
displayProgressMessage
locServerFileSystem.
endif.
endform.
"readIncludeAndDownload
*----------------------------------------------------------------------------------
---------------------
* readClassAndDownload...
*----------------------------------------------------------------------------------
---------------------
form readClassAndDownload using waLocClass type tClass
value(className)
value(functionName)
value(overideProgType)
value(userFilePath)
value(fileExtension)
value(additionalSubDir)
value(convertToHtml)
value(customerNameRange)
value(getIncludes)
value(getDictStructures)
value(slashSeparator)
value(saveToServer)
value(displayProgressMessage)
value(locServerFileSystem)
value(addBackground) type abap_bool.
castClassName = waLocClass-publicClassKey.
read report castClassName into iTempLines.
if sy-subrc = 0.
perform reFormatClassCode using iTempLines[].
append
'**************************************************************************' to
iLines.
append '* Public section of class.
*' to iLines.
append
'**************************************************************************' to
iLines.
loop at iTempLines.
append iTempLines to iLines.
endloop.
endif.
castClassName = waLocClass-privateClassKey.
read report castClassName into iTempLines.
if sy-subrc = 0.
perform reFormatClassCode using iTempLines[].
append iLines.
append
'**************************************************************************' to
iLines.
append '* Private section of class.
*' to iLines.
append
'**************************************************************************' to
iLines.
loop at iTempLines.
append iTempLines to iLines.
endloop.
endif.
castClassName = waLocClass-ProtectedClassKey.
read report castClassName into iTempLines.
if sy-subrc = 0.
perform reFormatClassCode using iTempLines[].
append iLines.
append
'**************************************************************************' to
iLines.
append '* Protected section of class.
*' to iLines.
append
'**************************************************************************' to
iLines.
loop at iTempLines.
append iTempLines to iLines.
endloop.
endif.
castClassName = waLocClass-typesClassKey.
read report castClassName into iTempLines.
if sy-subrc = 0.
append iLines.
append
'**************************************************************************' to
iLines.
append '* Types section of class.
*' to iLines.
append
'**************************************************************************' to
iLines.
loop at iTempLines.
append iTempLines to iLines.
endloop.
endif.
if convertToHtml is initial.
append '' to iLines.
append
'----------------------------------------------------------------------------------
' to iLines.
perform buildFooterMessage using iLines.
append iLines.
else.
perform convertClassToHtml using iLines[]
className
waLocClass-descript
overideProgType
fileExtension
customerNameRange
getDictStructures
addBackground.
endif.
if functionName is initial.
objectName = className.
else.
objectName = functionName.
endif.
if saveToServer is initial.
perform saveFileToPc using iLines[]
localFilenameWithPath
localFilenameOnly
space
space
displayProgressMessage.
else.
perform saveFileToServer using iLines[]
localFilenameWithPath
localFilenameOnly
completeSavePath
displayProgressMessage
locServerFileSystem.
endif.
endform.
"readClassAndDownload
*----------------------------------------------------------------------------------
---------------------
* readMethodAndDownload...
*----------------------------------------------------------------------------------
---------------------
form readMethodAndDownload using waLocMethod type tMethod
value(methodName)
value(methodKey)
value(functionName)
value(overideProgType)
value(userFilePath)
value(fileExtension)
value(additionalSubDir)
value(convertToHtml)
value(customerNameRange)
value(getIncludes)
value(getDictStructures)
value(slashSeparator)
value(saveToServer)
value(displayProgressMessage)
value(locServerFileSystem)
value(addBackground) type abap_bool.
castMethodKey = waLocMethod-methodKey.
read report castMethodKey into iTempLines.
loop at iTempLines.
append iTempLines to iLines.
endloop.
if convertToHtml is initial.
append '' to iLines.
append
'----------------------------------------------------------------------------------
' to iLines.
perform buildFooterMessage using iLines.
append iLines.
else.
perform convertCodeToHtml using iLines[]
methodName
waLocMethod-descript
overideProgType
space
space
fileExtension
customerNameRange
getIncludes
getDictStructures
addBackground.
endif.
if functionName is initial.
objectName = methodName.
else.
objectName = functionName.
endif.
case waLocMethod-exposure.
when 0.
* Private
concatenate additionalSubDir slashSeparator 'private_methods' into
additionalSubDir.
when 1.
* Protected
concatenate additionalSubDir slashSeparator 'protected_methods' into
additionalSubDir.
when 2.
* Public
concatenate additionalSubDir slashSeparator 'public_methods' into
additionalSubDir.
endcase.
if saveToServer is initial.
perform saveFileToPc using iLines[]
localFilenameWithPath
localFilenameOnly
space
space
displayProgressMessage.
else.
perform saveFileToServer using iLines[]
localFilenameWithPath
localFilenameOnly
completeSavePath
displayProgressMessage
locServerFileSystem.
endif.
endform.
"readMethodAndDownload
*----------------------------------------------------------------------------------
---------------------
* readXsltAndDownload...
*----------------------------------------------------------------------------------
---------------------
form readXsltAndDownload using value(xsltName)
xsltDescription
value(userFilepath)
value(fileExtension)
value(convertToHtml)
value(customerNameRange)
value(slashSeparator)
value(saveToServer)
value(subdir)
value(displayProgressMessage)
value(locServerFileSystem)
value(addBackground) type abap_bool.
if sy-subrc = 0.
xsltDescription = waXsltAttributes-descript.
if convertToHtml is initial.
append '' to iLines.
append
'----------------------------------------------------------------------------------
' to ilines.
perform buildFooterMessage using iLines.
append iLines.
else.
perform convertCodeToHtml using iLines[]
xsltName
waXsltAttributes-descript
space
space
space
fileExtension
customerNameRange
space
space
addBackground.
endif.
if saveToServer is initial.
perform saveFileTopc using iLines[]
localFilenameWithPath
localFilenameOnly
space
space
displayProgressMessage.
else.
perform saveFileToServer using iLines[]
localFilenameWithPath
localFilenameOnly
completeSavePath
displayProgressMessage
locServerFilesystem.
endif.
endif.
endform.
"readXSLTAndDownload
*----------------------------------------------------------------------------------
---------------------
* readFunctionAndDownload...
*----------------------------------------------------------------------------------
---------------------
form readFunctionAndDownload using iLocTextElements like dumiTextTab[]
iLocSelectionTexts like dumiTextTab[]
iLocMessages like iMessages[]
value(functionName)
value(functionInternalName)
value(shortText)
value(userFilePath)
value(fileExtension)
value(subDir)
value(convertToHtml)
value(functionDocumentationExists)
value(customerNameRange)
value(getIncludes)
value(getDictStructures)
value(slashSeparator)
value(saveToServer)
value(displayProgressMessage)
value(locServerFileSystem)
value(addBackground) type abap_bool.
* If we found any text elements for this function then we ought to append them to
the main include.
if not iLocTextElements[] is initial.
perform appendTextElements using iLocTextElements[]
iLines[].
endif.
* If we found any message classes for this function then we ought to append them to
the main include.
if not iLocMessages[] is initial.
perform appendMessagesToFile using iLocMessages[]
iLines[]
space.
endif.
if convertToHtml is initial.
append '' to iLines.
append
'----------------------------------------------------------------------------------
' to iLines.
perform buildFooterMessage using iLines.
append iLines.
else.
perform convertFunctionToHtml using iLines[]
functionName
shortText
IS_FUNCTION
functionDocumentationExists
TRUE
fileExtension
customerNameRange
getIncludes
getDictStructures
addBackground.
endif.
if saveToServer is initial.
perform saveFileToPc using iLines[]
localFilenameWithPath
localFilenameOnly
space
space
displayProgressMessage.
else.
perform saveFileToServer using iLines[]
localFilenameWithPath
localFilenameOnly
completeSavePath
displayProgressMessage
locServerFileSystem.
endif.
endform.
"readFunctionAndDownload
*----------------------------------------------------------------------------------
---------------------
* buildFilename...
*----------------------------------------------------------------------------------
---------------------
form buildFilename using value(userPath)
value(additionalSubDirectory)
value(objectName)
value(mainFunctionNo)
value(includeName)
value(fileExtension)
value(downloadType)
value(downloadToServer)
value(slashSeparator)
newFilenameWithPath
newFilenameOnly
newSubDirectory
completePath.
case downloadType.
* Programs
when IS_PROGRAM.
if additionalSubDirectory is initial.
concatenate userPath slashSeparator objectName PERIOD fileExtension into
newFilenameWithPath.
concatenate userPath slashSeparator into completePath.
else.
concatenate userPath slashSeparator additionalSubdirectory
slashSeparator objectName PERIOD fileExtension into
newFilenameWithPath.
concatenate userPath slashSeparator additionalSubdirectory into
completePath.
endif.
* Function Modules
when IS_FUNCTION.
if additionalSubdirectory is initial.
find 'top' in includeName ignoring case.
if sy-subrc = 0.
concatenate userPath slashSeparator objectName
slashSeparator 'Global-' objectName
PERIOD fileExtension
into newFilenameWithPath.
else.
if includeName cs mainFunctionNo and not mainFunctionNo is initial.
concatenate userPath slashSeparator objectName
slashSeparator objectName
PERIOD fileExtension
into newFilenameWithPath.
else.
concatenate userPath slashSeparator objectName
slashSeparator objectName
PERIOD fileExtension
into newFilenameWithPath.
endif.
endif.
newSubDirectory = objectName.
concatenate userPath
slashSeparator
newSubDirectory
slashSeparator into completePath.
else.
find 'top' in includeName ignoring case.
if sy-subrc = 0.
concatenate userPath slashSeparator additionalSubdirectory
slashSeparator objectName
slashSeparator 'Global-' objectName
PERIOD fileExtension
into newFilenameWithPath.
else.
if includeName cs mainFunctionNo and not mainFunctionNo is initial.
concatenate userPath slashSeparator additionalSubdirectory
slashSeparator objectName
slashSeparator objectName
PERIOD fileExtension
into newFilenameWithPath.
else.
concatenate userPath slashSeparator additionalSubdirectory
slashSeparator objectName
slashSeparator objectName
PERIOD fileExtension
into newFilenameWithPath.
endif.
endif.
concatenate additionalSubDirectory slashSeparator objectName into
newSubDirectory.
concatenate userPath slashSeparator additionalSubdirectory slashSeparator
objectName into completePath.
endif.
* Table definition
when IS_TABLE.
if additionalSubdirectory is initial.
concatenate userPath slashSeparator 'dictionary' " slashSeparator
objectName
slashSeparator
objectName PERIOD fileExtension
into newFilenameWithPath.
* Table definition
when IS_TRANSFORMATION.
if additionalSubdirectory is initial.
concatenate userPath slashSeparator 'Transformations' " slashSeparator
objectName
slashSeparator
objectName PERIOD fileExtension
into newFilenameWithPath.
* Screens
when IS_SCREEN.
if additionalSubDirectory is initial.
concatenate userpath slashSeparator 'Screens'
slashSeparator 'screen_'
objectName PERIOD
fileExtension into newFilenameWithPath.
else.
concatenate userpath slashSeparator additionalSubdirectory
slashSeparator 'Screens'
slashSeparator 'screen_'
objectName PERIOD
fileExtension into newFilenameWithPath.
* GUI title
when IS_GUITITLE.
if additionalSubDirectory is initial.
concatenate userpath slashSeparator 'Screens'
slashSeparator 'gui_title_'
objectName PERIOD
fileExtension into newFilenameWithPath.
* Message Class
when IS_MESSAGECLASS.
if additionalSubDirectory is initial.
concatenate userPath slashSeparator objectName
slashSeparator 'Message class-'
objectName PERIOD
fileExtension
into newFilenameWithPath.
* Class definition
when IS_CLASS.
if additionalSubdirectory is initial.
concatenate userPath slashSeparator objectName
slashSeparator 'Class-'
objectName PERIOD fileExtension
into newFilenameWithPath.
* Class definition
when IS_METHOD.
if additionalSubdirectory is initial.
concatenate userPath slashSeparator
objectName PERIOD fileExtension
into newFilenameWithPath.
*----------------------------------------------------------------------------------
---------------------
* saveFileToPc... write an internal table to a file on the local PC
*----------------------------------------------------------------------------------
---------------------
form saveFileToPc using iDownload type standard table
value(filenameWithPath)
value(filename)
value(writeFieldSeparator)
value(truncateTrailingBlanks)
value(displayProgressMessage).
if sy-subrc <> 0.
strSubrc = sy-subrc.
concatenate `File save error: ` filename ` sy-subrc: ` strSubrc into
statusMessage.
perform displayStatus using statusMessage 3.
endif.
endform.
"saveFileToPc
*----------------------------------------------------------------------------------
------------------------------------
* saveFileToServer... write an internal table to a file on the SAP server
*----------------------------------------------------------------------------------
------------------------------------
form saveFileToServer using iDownload type standard table
value(filenameWithPath)
value(filename)
value(path)
value(displayProgressMessage)
value(locServerFileSystem).
if pathExists = ''.
perform createServerDirectory using path locServerFileSystem.
endif.
* Add the paths we know exist as there is no point wasting time checking them
again.
append path to iServerPaths.
endif.
open dataset filenameWithPath for output in text mode encoding default.
if sy-subrc = 0.
loop at iDownload into waDownload.
transfer waDownload to filenameWithPath.
if sy-subrc <> 0.
message e000(oo) with 'Error transferring data to file'.
endif.
endloop.
*----------------------------------------------------------------------------------
------------------------------------
* checkPathExists... Check a filepath exists on the application server.
*----------------------------------------------------------------------------------
------------------------------------
form checkPathExists using value(path)
pathExists type flag.
castDirectory = path.
if sy-subrc = 0.
pathExists = 'X'.
else.
pathExists = ''.
endif.
endform.
*----------------------------------------------------------------------------------
------------------------------------
* createServerDirectory...
*----------------------------------------------------------------------------------
------------------------------------
form createServerDirectory using value(path)
value(locServerFileSystem).
param1 = path.
target = sy-host.
operatingSystem = locServerFileSystem.
if sy-subrc = 0.
* Although the function succeded did the external command actually work
if funcStatus = 'E'.
* External command returned with an error
* An error occurred creating the directory on the server
message e000(oo) with 'An error occurred creating a directory'.
endif.
else.
case sy-subrc.
when 1.
* No permissions to run the command
message e000(oo) with 'No permissions to run external command ZDTX_MKDIR'.
when 2.
* External command not found
message E000(oo) with 'External comand ZDTX_MKDIR not found'.
when others.
* Unable to create the directory
message e000(oo) with 'An error occurred creating a directory'
', subrc:'
sy-subrc.
endcase.
endif.
endform.
"createServerDirectory
*----------------------------------------------------------------------------------
------------------------------------
* appendTextElements...
*----------------------------------------------------------------------------------
------------------------------------
form appendTextElements using iLocTextElements like dumiTextTab[]
iLocLines like dumiHtml[].
*----------------------------------------------------------------------------------
------------------------------------
* appendGUITitles...
*----------------------------------------------------------------------------------
------------------------------------
form appendGUITitles using iLocGUItitles like dumiGUITitle[]
iLocLines like dumiHtml[].
*----------------------------------------------------------------------------------
------------------------------------
* appendSelectionTexts...
*----------------------------------------------------------------------------------
------------------------------------
form appendSelectionTexts using iLocSelectionTexts like dumiTextTab[]
iLocLines like dumiHtml[].
*----------------------------------------------------------------------------------
------------------------------------
* appendExceptionTexts...
*----------------------------------------------------------------------------------
------------------------------------
form appendExceptionTexts using iConcepts like dumiConcepts[]
iLocLines like dumiHtml[].
if sy-subrc = 0.
concatenate '* ' <waConcept>-constName '-' conceptText into waLine
separated by space.
append waLine to iLocLines.
endif.
endloop.
endif.
endform.
"appendExceptionTexts
*----------------------------------------------------------------------------------
------------------------------------
* downloadFunctionDocs...
*----------------------------------------------------------------------------------
------------------------------------
form downloadFunctionDocs using value(functionName)
value(functionDescription)
value(userFilePath)
value(fileExtension)
value(convertToHtml)
value(slashSeparator)
value(saveToServer)
value(displayProgressMessage)
subDir
documentationDownloaded
value(locServerFileSystem)
value(addBackground) type abap_bool.
documentationDownloaded = FALSE.
object = functionName.
clear iLines.
if not ( iDocumentation[] is initial ).
append iLines.
append 'PARAMETER DOCUMENTATION' to iLines.
append '-----------------------' to iLines.
append iLines.
if convertToHtml is initial.
append iLines.
append
'----------------------------------------------------------------------------------
' to iLines.
append iLines.
perform buildFooterMessage using iLines.
append iLines.
else.
perform convertCodeToHtml using iLines[]
htmlPageName
space
IS_DOCUMENTATION
TRUE
space
space
space
space
space
addBackground.
endif.
if saveToServer is initial.
perform saveFileToPC using iLines[]
newFilenameWithPath
newfilenameOnly
space
space
displayProgressMessage.
else.
perform saveFileToServer using iLines[]
newFilenameWithPath
newfilenameOnly
completeSavePath
displayProgressMessage
locServerFileSystem.
endif.
documentationDownloaded = TRUE.
endif.
endform.
*----------------------------------------------------------------------------------
------------------------------------
* downloadClassDocs...
*----------------------------------------------------------------------------------
------------------------------------
form downloadClassDocs using value(className) type seoclsname
value(userFilePath)
value(fileExtension)
value(convertToHtml)
value(slashSeparator)
value(saveToServer)
value(displayProgressMessage)
subDir
documentationDownloaded
value(locServerFileSystem)
value(addBackground) type abap_bool.
documentationDownloaded = FALSE.
object = className.
if convertToHtml is initial.
append iLines.
append
'----------------------------------------------------------------------------------
' to iLines.
append iLines.
perform buildFooterMessage using iLines.
append iLines.
else.
perform convertCodeToHtml using iLines[]
htmlPageName
space
IS_DOCUMENTATION
TRUE
space
space
space
space
space
addBackground.
endif.
if saveToServer is initial.
perform saveFileToPC using iLines[]
newFilenameWithPath
newfilenameOnly
space
space
displayProgressMessage.
else.
perform saveFileToServer using iLines[]
newFilenameWithPath
newfilenameOnly
completeSavePath
displayProgressMessage
locServerFileSystem.
endif.
documentationDownloaded = TRUE.
endif.
endform.
*----------------------------------------------------------------------------------
------------------------------------
* downloadScreens...
*----------------------------------------------------------------------------------
------------------------------------
form downloadScreens using iLocScreenFlow like dumiScreen[]
value(programName)
value(userFilePath)
value(textFileExtension)
value(subdir)
value(slashSeparator)
value(saveToServer)
value(displayProgressMessage)
value(locServerFileSystem).
tables: d020t.
data: header like d020s.
data: iFields type standard table of d021s with header line.
data: iFlowLogic type standard table of d022s with header line.
field-symbols <waScreen> type tScreenFlow.
data: waCharHeader type scr_chhead.
data: iScreenChar type standard table of scr_chfld with header line.
data: iFieldsChar type standard table of scr_chfld with header line.
data: stars type string value
'****************************************************************'.
data: comment1 type string value '* This file was generated by Direct Download
Enterprise. *'.
data: comment2 type string value '* Please do not change it manually.
*'.
data: dynproText type string value '%_DYNPRO'.
data: headerText type string value '%_HEADER'.
data: paramsText type string value '%_PARAMS'.
data: descriptionText type string value '%_DESCRIPTION'.
data: fieldsText type string value '%_FIELDS'.
data: flowlogicText type string value '%_FLOWLOGIC'.
data: programLength type string.
data: newSubDirectory type string.
data: newFilenameWithPath type string.
data: newFilenameOnly type string.
data: completeSavePath type string.
* Screen identification
append dynproText to iScreenChar.
append waCharHeader-prog to iScreenChar.
append waCharHeader-dnum to iScreenChar.
append sy-saprl to iScreenChar.
describe field d020t-prog length programLength in character mode.
concatenate ` ` programLength into iScreenChar.
append iScreenChar.
* Header
append headerText to iScreenChar.
append waCharHeader to iScreenChar.
* Description text
append descriptionText to iScreenChar.
select single dtxt from d020T into iScreenChar
where prog = programName
and dynr = <waScreen>-screen
and lang = pMLang.
append iScreenChar.
* Fieldlist text
append fieldsText to iScreenChar.
loop at iFieldsChar.
move-corresponding iFieldsChar to iScreenChar.
append iScreenChar.
endloop.
* Flowlogic text
append flowlogicText to iScreenChar.
* Flow logic.
loop at iFlowLogic.
append iFlowLogic to iScreenChar.
endloop.
if saveToServer is initial.
* Save the screen to the local computer
perform saveFileToPc using iScreenChar[]
newFilenameWithPath
newFilenameOnly
'X'
'X'
displayProgressMessage.
else.
* Save the screen to the SAP server
perform saveFileToServer using iScreenChar[]
newFilenameWithPath
newFilenameOnly
completeSavePath
displayProgressMessage
locServerFileSystem.
endif.
*----------------------------------------------------------------------------------
------------------------------------
* downloadGUITitles..
*----------------------------------------------------------------------------------
------------------------------------
form downloadGUITitles using iLocGUITitles like dumIGUITitle[]
value(userFilePath)
value(textFileExtension)
value(subDir)
value(slashSeparator)
value(saveToServer)
value(displayProgressMessage)
value(locServerFileSystem).
if saveToServer is initial.
perform saveFileToPc using iLines[]
newFilenameWithPath
newFilenameOnly
space
space
displayProgressMessage.
else.
perform saveFileToServer using iLines[]
newFilenameWithPath
newFilenameOnly
completeSavePath
displayProgressMessage
locServerFileSystem.
endif.
clear iLines[].
endloop.
endform.
"downloadGUITitles
*----------------------------------------------------------------------------------
------------------------------------
* downloadPrograms..
*----------------------------------------------------------------------------------
------------------------------------
form downloadPrograms using iLocProgram like iPrograms[]
iLocFunctions like iFunctions[]
iLocDictionaryFilename like iDictFilename[]
iLocTableTypeFilename like iTableTypeFilename[]
value(userFilePath)
value(fileExtension)
value(htmlFileExtension)
value(textFileExtension)
value(convertToHtml)
value(customerNameRange)
value(getIncludes)
value(getDictStruct)
value(downloadDocumentation)
value(sortTablesAsc)
value(slashSeparator)
value(saveToServer)
value(displayProgressMessage)
value(locServerFileSystem)
value(addBackground) type abap_bool.
data: iProgFunctions type standard table of tFunction with header line.
field-symbols: <waProgram> type tProgram.
field-symbols: <waInclude> type tInclude.
data: iEmptyTextelements type standard table of tTextTable.
data: iEmptySelectionTexts type standard table of tTextTable.
data: iEmptyMessages type standard table of tMessage.
data: iEmptyGuiTitles type standard table of tGUITitle.
data: locConvertToHtml(1).
data: locFileExtension type string.
* Download screens.
if not <waProgram>-iScreenFlow[] is initial.
perform downloadScreens using <waProgram>-iScreenFlow[]
<waProgram>-progname
userFilePath
textFileExtension
<waprogram>-progname
slashSeparator
saveToServer
displayProgressMessage
locServerFileSystem.
endif.
* Download GUI titles
if not <waProgram>-iGUITitle[] is initial.
perform downloadGUITitles using <waProgram>-iGUITitle
userFilePath
textFileExtension
<waProgram>-progName
slashSeparator
saveToServer
displayProgressMessage
locServerFileSystem.
endif.
endloop.
* Download Transformations
if not <waProgram>-iTransformations[] is initial.
perform downloadXSLT using <waProgram>-iTransformations[]
userFilePath
fileExtension
htmlFileExtension
textFileExtension
convertToHtml
customerNamespace
slashSeparatorToUse
saveToServer
<waProgram>-progName
displayProgressMessage
serverFileSystem
addBackground.
endif.
*----------------------------------------------------------------------------------
------------------------------------
* downloadClasses..
*----------------------------------------------------------------------------------
------------------------------------
form downloadClasses using iLocClasses like iClasses[]
iLocFunctions like iFunctions[]
iLocDictionaryFilename like iDictFilename[]
iLocTableTypeFilename like iTableTypeFilename[]
value(userFilePath)
value(fileExtension)
value(htmlFileExtension)
value(textFileExtension)
value(convertToHtml)
value(customerNameRange)
value(getIncludes)
value(getDictStruct)
value(downloadDocumentation)
value(sortTablesAsc)
value(slashSeparator)
value(saveToServer)
value(displayProgressMessage)
value(locServerFileSystem)
value(addBackground) type abap_bool.
endloop.
* Download Transformations
if not <waClass>-iTransformations[] is initial.
perform downloadXSLT using <waClass>-iTransformations[]
userFilePath
fileExtension
htmlFileExtension
textFileExtension
convertToHtml
customerNamespace
slashSeparatorToUse
saveToServer
<waClass>-clsName
displayProgressMessage
serverFileSystem
addBackground.
endif.
if downloadDocumentation = TRUE.
perform downloadClassDocs using <waClass>-clsName
userFilePath
fileExtension
convertToHtml
slashSeparator
saveToServer
displayProgressMessage
'' "subdirectory
classDocumentationExists
locServerFileSystem
addBackground.
endif.
endloop.
endform.
"downloadClasses
*----------------------------------------------------------------------------------
---------------------
* downloadXslt...
*----------------------------------------------------------------------------------
---------------------
form downloadXslt using iLocTransformation like iTransformations[]
value(userFilePath)
value(fileExtension)
value(htmlFileExtension)
value(textFileExtension)
value(convertToHtml)
value(customerNameRange)
value(slashSeparator)
value(saveToServer)
value(subdir)
value(displayProgressMessage)
value(locServerFileSystem)
value(addBackground) type abap_bool.
*----------------------------------------------------------------------------------
------------------------------------
* reFormatClassCode... Expand a classes public, private and protected section
from the 72 characters that the class
* builder sets it to back to the wide editor mode
*----------------------------------------------------------------------------------
------------------------------------
form reFormatClassCode using iTempLines like dumiHtml[].
iTempLines[] = iNewTable[].
endform.
"reFormatClassCode
***********************************************************************************
************************************
**********************************************HTML
ROUTINES************************************************************
***********************************************************************************
************************************
*----------------------------------------------------------------------------------
------------------------------------
* convertDDToHTML... Convert text description to HTML
*----------------------------------------------------------------------------------
------------------------------------
form convertDDToHTML using iLocDictStructure like dumiDictStructure[]
iLocHtml like dumiHtml[]
value(tableName)
value(tableTitle)
value(sortTablesAsc)
value(addBackground) type abap_bool..
do.
* Assign each field in the table to the field symbol
assign component sy-index of structure <iLocDictStructure> to <fsField>.
if sy-subrc = 0.
describe field <fsField> type wFieldBaseType.
if wFieldBaseType <> 'h'.
move <fsField> to wTextCell.
waHtml = ` <td>`.
*----------------------------------------------------------------------------------
------------------------------------
* addDomaintoHTML... Add domain vlaues into the HTML
*----------------------------------------------------------------------------------
------------------------------------
form addDomaintoHTML using iLocDictStructure like dumiDictStructure[]
iLocHtml like dumiHtml[].
if addedHeader = 'X'.
append ` </table>` to iLocHtml.
append ` </td>` to iLocHtml.
append ` </tr>` to iLocHtml.
endif.
endform.
*----------------------------------------------------------------------------------
------------------------------------
* convertTableTypeToHtml
*----------------------------------------------------------------------------------
------------------------------------
form convertTableTypeToHtml using iLocTableTypes like iTableTypes[]
iLocHtml like dumIhtml[]
value(tableName)
value(tableTitle)
value(sortTablesAsc)
value(addBackground) type abap_bool.
do.
* Assign each field in the table to the field symbol
assign component sy-index of structure <iLocTableType> to <fsField>.
if sy-subrc = 0.
move <fsField> to wTextCell.
waHtml = ' <td>'.
"convertITABtoHtml
*----------------------------------------------------------------------------------
------------------------------------
* convertCodeToHtml... Builds an HTML table based upon a text table.
*----------------------------------------------------------------------------------
------------------------------------
form convertCodeToHtml using iContents like dumIHtml[]
value(programName)
value(ShortDescription)
value(sourceCodeType)
value(functionDocumentationExists)
value(isMainFunctionInclude)
value(htmlExtension)
value(customerNameRange)
value(getIncludes)
value(getDictStructures)
value(addBackground) type abap_bool.
* Code
append ` <tr>` to htmlTable.
append ` <td>` to htmlTable.
try.
if head+0(1) = 'Y' or head+0(1) = 'Z' or head+0(1) = 'y' or
head+0(1) = 'z' or head cs customerNameRange.
* Definately a customer function module
hyperLinkName = head.
if sourceCodeType = IS_FUNCTION.
copyOfCurrentLine = 'call function <a href ="../'.
else.
copyOfCurrentLine = 'call function <a href ="'.
endif.
lowercaseLink = hyperlinkName.
translate lowercaseLink to lower case.
* If we are running on a non UNIX environment we will need to
remove forward slashes
if frontendOpSystem = NON_UNIX.
translate lowercaseLink using '/_'.
endif.
concatenate copyOfCurrentLine
lowercaseLink "hyperlinkName
'/'
lowercaseLink "hyperlinkName
Period htmlExtension '">'
''''
hyperlinkName
''''
'</a>'
tail into copyOfCurrentLine.
waContent = copyOfCurrentLine.
endif.
catch cx_sy_range_out_of_bounds into objRuntimeError.
endtry.
endif.
endif.
endif.
try.
if ( tail+0(1) = 'Y' or tail+0(1) = 'Z' or tail+0(1) = 'y' or tail+0(1)
= 'z' or tail cs customerNameRange or tail+0(2) = 'mz' or tail+0(2) = 'MZ' )
and not getIncludes is initial and tail ns STRUCTURE and tail ns
LOWSTRUCTURE.
lowercaseLink = hyperlinkName.
translate lowercaseLink to lower case.
concatenate copyOfCurrentLine
lowercaseLink "hyperlinkName
PERIOD htmlExtension '">'
hyperlinkName
'</a>'
PERIOD tail into copyOfCurrentLine.
try.
if tail+0(1) = 'Y' or tail+0(1) = 'Z' or tail+0(1) = 'y' or
tail+0(1) = 'z' or tail cs customerNameRange.
clear waContent.
shift tail left deleting leading space.
split tail at PERIOD into hyperlinkName tail.
copyOfCurrentLine = 'include structure <a href ='.
lowercaseLink = hyperlinkName.
translate lowercaseLink to lower case.
* If we are running on a non UNIX environment we will need to
remove forward slashes
if frontendOpSystem = NON_UNIX.
translate lowercaseLink using '/_'.
endif.
concatenate copyOfCurrentLine
'"'
lowercaseLink "hyperlinkName
'/'
'dictionary-'
lowercaseLink "hyperlinkName
PERIOD htmlExtension
'">'
hyperlinkName
'</a>'
PERIOD tail into copyOfCurrentLine.
if inCommentMode = TRUE.
while waContent cs ' '.
replace space with ' ' into waContent.
if sy-subrc <> 0.
exit.
endif.
endwhile.
endif.
htmlTable = waContent.
try.
if htmlTable+0(1) = ` `.
while htmlTable cs ` `.
replace ` ` with ' ' into htmlTable.
if sy-subrc <> 0.
exit.
endif.
endwhile.
endif.
catch cx_sy_range_out_of_bounds into objRuntimeError.
endtry.
else.
htmlTable = ''.
endif.
concatenate htmlTable `<br />` into htmlTable.
append htmlTable.
endloop.
iContents[] = htmlTable[].
endform.
"convertCodeToHtml
*----------------------------------------------------------------------------------
------------------------------------
* convertClassToHtml... Builds an HTML table based upon a text table.
*----------------------------------------------------------------------------------
------------------------------------
form convertClassToHtml using iContents like dumIHtml[]
value(className)
value(ShortDescription)
value(sourceCodeType)
value(htmlExtension)
value(customerNameRange)
value(getDictStructures)
value(addBackground) type abap_bool.
* Code
append ` <tr>` to htmlTable.
append ` <td>` to htmlTable.
* Comments
if not ( waContent is initial ).
if waContent+0(1) = ASTERIX.
htmltable = wacontent.
if myTabix = 1.
append ` <div class="codeComment">` to htmlTable.
inCommentMode = TRUE.
else.
if inCommentMode = FALSE.
append ` </div>` to htmlTable.
append ` <div class="codeComment">` to htmlTable.
inCommentMode = TRUE.
endif.
endif.
else.
if myTabix = 1.
append ` <div class="code">` to htmlTable.
inCommentMode = FALSE.
else.
if inCommentMode = TRUE.
append ` </div>` to htmlTable.
inCommentMode = FALSE.
append ` <div class="code">` to htmlTable.
endif.
endif.
if sy-subrc = 0.
shift hyperlinkname left deleting leading space.
concatenate methoddirectory
'/'
hyperlinkname
'.html'
into lowercaselink.
* Dictionary structures
if not getDictStructures is initial.
find 'class' in waContent ignoring case.
if sy-subrc <> 0.
* Hyperlink for dictionary/structure include
copyLineLength = strlen( waContent ).
copyOfCurrentLine = waContent.
split copyOfCurrentLine at space into head tail.
shift tail left deleting leading space.
split tail at space into head tail.
try.
if tail+0(1) = 'Y' or tail+0(1) = 'Z' or tail+0(1) = 'y' or
tail+0(1) = 'z' or tail cs customerNameRange.
clear waContent.
shift tail left deleting leading space.
split tail at PERIOD into hyperlinkName tail.
copyOfCurrentLine = 'include structure <a href ='.
lowercaseLink = hyperlinkName.
translate lowercaseLink to lower case.
* If we are running on a non UNIX environment we will need to
remove forward slashes
if frontendOpSystem = NON_UNIX.
translate lowercaseLink using '/_'.
endif.
concatenate copyOfCurrentLine
'"'
lowercaseLink "hyperlinkName
'/'
'dictionary-'
lowercaseLink "hyperlinkName
PERIOD htmlExtension
'">'
hyperlinkName
'</a>'
PERIOD tail into copyOfCurrentLine.
htmlTable = waContent.
try.
if htmlTable+0(1) = ` `.
while htmlTable cs ` `.
replace ` ` with ' ' into htmlTable.
if sy-subrc <> 0.
exit.
endif.
endwhile.
endif.
catch cx_sy_range_out_of_bounds into objRuntimeError.
endtry.
else.
htmlTable = ''.
endif.
endif.
else.
htmlTable = ''.
endif.
concatenate htmlTable '<br />' into htmlTable.
append htmlTable.
endloop.
iContents[] = htmlTable[].
endform.
"convertClassToHtml
*----------------------------------------------------------------------------------
------------------------------------
* convertFunctionToHtml... Builds an HTML table based upon a text table.
*----------------------------------------------------------------------------------
------------------------------------
form convertFunctionToHtml using iContents like dumIHtml[]
value(functionName)
value(ShortDescription)
value(sourceCodeType)
value(functionDocumentationExists)
value(isMainFunctionInclude)
value(htmlExtension)
value(customerNameRange)
value(getIncludes)
value(getDictStructures)
value(addBackground) type abap_bool.
* Code
append ` <tr>` to htmlTable.
append ` <td>` to htmlTable.
* Documentation hyperlink.
if functionDocumentationExists = TRUE.
copyOfcurrentLine = '<div class="codeComment">* <a href ="'.
lowercaseLink = functionName.
translate lowercaseLink to lower case.
* If we are running on a non UNIX environment we will need to remove
forward slashes
if frontendOpSystem = NON_UNIX.
translate lowercaseLink using '/_'.
endif.
concatenate copyOfCurrentLine
'docs-'
lowercaseLink "functionName
PERIOD htmlExtension '">'
'Function module documentation'
'</a>'
into copyOfCurrentLine.
foundAsterix = FALSE.
ignoreFutureLines = TRUE.
endif.
endif.
endif.
endif.
endif.
* Carry on as normal
if not ( waContent is initial ).
while ( waContent cs '<' or waContent cs '>' ).
replace '<' in waContent with LT.
replace '>' in waContent with GT.
endwhile.
try.
if head+0(1) = 'Y' or head+0(1) = 'Z' or head+0(1) = 'y' or
head+0(1) = 'z' or head cs customerNameRange.
if sourceCodeType = IS_FUNCTION.
copyOfCurrentLine = 'call function <a href ="../'.
else.
copyOfCurrentLine = 'call function <a href ="'.
endif.
lowercaseLink = hyperlinkName.
translate lowercaseLink to lower case.
* If we are running on a non UNIX environment we will need to
remove forward slashes
if frontendOpSystem = NON_UNIX.
translate lowercaseLink using '/_'.
endif.
concatenate copyOfCurrentLine
lowercaseLink "hyperlinkName
'/'
lowercaseLink "hyperlinkName
Period htmlExtension '">'
''''
hyperlinkName
''''
'</a>'
tail into copyOfCurrentLine.
waContent = copyOfCurrentLine.
endif.
catch cx_sy_range_out_of_bounds into objRuntimeError.
endtry.
endif.
endif.
endif.
try.
if ( tail+0(1) = 'Y' or tail+0(1) = 'Z' or tail+0(1) = 'y' or tail+0(1)
= 'z'
or tail cs customerNameRange or tail+0(2) = 'mz' or tail+0(2) =
'MZ' ) and not getIncludes is initial.
lowercaseLink = hyperlinkName.
translate lowercaseLink to lower case.
* If we are running on a non UNIX environment we will need to remove
forward slashes
if frontendOpSystem = NON_UNIX.
translate lowercaseLink using '/_'.
endif.
concatenate copyOfCurrentLine
lowercaseLink "hyperlinkName
PERIOD htmlExtension '">'
hyperlinkName
'</a>'
PERIOD tail into copyOfCurrentLine.
try.
if tail+0(1) = 'Y' or tail+0(1) = 'Z' or tail+0(1) = 'y' or
tail+0(1) = 'z' or tail cs customerNameRange.
clear waContent.
shift tail left deleting leading space.
split tail at PERIOD into hyperlinkName tail.
copyOfCurrentLine = 'include structure <a href ='.
lowercaseLink = hyperlinkName.
translate lowercaseLink to lower case.
* If we are running on a non UNIX environment we will need to
remove forward slashes
if frontendOpSystem = NON_UNIX.
translate lowercaseLink using '/_'.
endif.
concatenate copyOfCurrentLine
'"'
lowercaseLink "hyperlinkName
'/'
'dictionary-'
lowercaseLink "hyperlinkName
PERIOD htmlExtension
'">'
hyperlinkName
'</a>'
PERIOD tail into copyOfCurrentLine.
htmlTable = waContent.
try.
if htmlTable+0(1) = ` `.
while htmlTable cs ` `.
replace ` ` with ' ' into htmlTable.
if sy-subrc <> 0.
exit.
endif.
endwhile.
endif.
catch cx_sy_range_out_of_bounds into objRuntimeError.
endtry.
else.
htmlTable = ''.
endif.
concatenate htmlTable '<br />' into htmlTable.
append htmlTable.
endloop.
iContents[] = htmlTable[].
endform.
"convertFunctionToHtml
*----------------------------------------------------------------------------------
------------------------------------
* buildColumnHeaders... build table column names
*----------------------------------------------------------------------------------
------------------------------------
form buildDDColumnHeaders using iLocColumnCaptions like dumiHtml[].
*----------------------------------------------------------------------------------
------------------------------------
* buildDomColumnHeaders... build table column names
*----------------------------------------------------------------------------------
------------------------------------
form buildDomColumnHeaders using iLocColumnCaptions like dumiHtml[].
*----------------------------------------------------------------------------------
------------------------------------
* buildColumnHeadersTableTypes
*----------------------------------------------------------------------------------
------------------------------------
form buildColumnHeadersTableTypes using iLocColumnCaptions like dumIhtml[].
*----------------------------------------------------------------------------------
------------------------------------
* addHTMLHeader... add a html formatted header to our output table
*----------------------------------------------------------------------------------
------------------------------------
form addHTMLHeader using iLocHeader like dumiHtml[]
value(title)
value(addBackground) type abap_bool
value(stylesheetType) type char1.
case stylesheetType.
when SS_CODE.
perform addCodeStyles using iLocHeader
addBackground.
when SS_TABLE.
perform addTableStyles using iLocHeader
addBackground.
endcase.
*----------------------------------------------------------------------------------
------------------------------------
* addCodeStyles... Add the stylesheets needed for HTML output
*----------------------------------------------------------------------------------
------------------------------------
form addCodeStyles using iLocHeader like dumiHtml[]
value(addBackground) type abap_bool.
*----------------------------------------------------------------------------------
------------------------------------
* addTableStyles... Add the stylesheets needed for HTML output
*----------------------------------------------------------------------------------
------------------------------------
form addTableStyles using iLocHeader like dumiHtml[]
value(addBackground) type abap_bool.
*----------------------------------------------------------------------------------
------------------------------------
* addTableStyles... Add the stylesheets needed for HTML output
*----------------------------------------------------------------------------------
------------------------------------
form addGenericStyles using iLocHeader like dumiHtml[]
value(addBackground) type abap_bool.
*----------------------------------------------------------------------------------
------------------------------------
* addHTMLFooter... add a html formatted footer to our output table
*----------------------------------------------------------------------------------
------------------------------------
form addHTMLFooter using iLocFooter like dumiHtml[].
*----------------------------------------------------------------------------------
------------------------------------
* buildFooterMessage...Returns a footer message based on the output file type.
*----------------------------------------------------------------------------------
------------------------------------
form buildFooterMessage using returnMessage.
concatenate `Extracted by Mass Download version `
VERSIONNO ` - E.G.Mellodew. 1998-`
sy-datum+0(4) `. Sap Release ` sy-saprl into returnMessage.
endform.
"buildFooterMessage
***********************************************************************************
************************************
********************************************DISPLAY
ROUTINES***********************************************************
***********************************************************************************
************************************
*----------------------------------------------------------------------------------
------------------------------------
* fillTreeNodeTables...
*----------------------------------------------------------------------------------
------------------------------------
form fillTreeNodeTables using iLocDictionary like iDictionary[]
iLocTreeDisplay like iTreeDisplay[]
value(runTime).
if tableLines = 1.
concatenate tableLinesString 'table downloaded' into waTreeDisplay-text2
separated by space.
else.
concatenate tableLinesString 'tables downloaded' into waTreeDisplay-text2
separated by space.
endif.
*----------------------------------------------------------------------------------
---------------------
* fillTreeNodeXslt...
*----------------------------------------------------------------------------------
---------------------
form fillTreeNodeXslt using iLocTransformations like iTransformations[]
iLocTreeDisplay like iTreeDisplay[]
value(runtime).
if tableLines = 1.
concatenate tableLinesString ` XSLT program downloaded` into waTreeDisplay-
text2.
else.
concatenate tableLinesString ` XSLT programs downloaded` into waTreeDisplay-
text2.
endif.
*----------------------------------------------------------------------------------
------------------------------------
* fillTreeNodeMessages...
*----------------------------------------------------------------------------------
------------------------------------
form fillTreeNodeMessages using iLocMessages like iMessages[]
iLocTreeDisplay like iTreeDisplay[]
value(runTime).
if tableLines = 1.
concatenate tableLinesString 'message class downloaded' into waTreeDisplay-
text2 separated by space.
else.
concatenate tableLinesString 'message classes downloaded' into waTreeDisplay-
text2 separated by space.
endif.
*----------------------------------------------------------------------------------
------------------------------------
* fillTreeNodeTableTypes
*----------------------------------------------------------------------------------
------------------------------------
form fillTreeNodeTableTypes using iLocTableTypes like iTableTypes[]
iLocTreeDisplay like iTreeDisplay[]
value(runtime).
if tableLines = 1.
concatenate tableLinesString 'table type downloaded' into waTreeDisplay-text2
separated by space.
else.
concatenate tableLinesString 'table types downloaded' into waTreeDisplay-text2
separated by space.
endif.
*----------------------------------------------------------------------------------
------------------------------------
* fillTreeNodeFunctions...
*----------------------------------------------------------------------------------
------------------------------------
form fillTreeNodeFunctions using iLocFunctions like iFunctions[]
iLocTreeDisplay like iTreeDisplay[]
value(runTime).
data: tableLines type i.
data: waTreeDisplay like sNodeText.
field-symbols: <waFunction> type tFunction.
field-symbols: <waScreen> type tScreenFlow.
field-symbols: <waGUITitle> type tGUITitle.
field-symbols: <waDictionary> type tDictTable.
field-symbols: <waInclude> type tInclude.
field-symbols: <waMessage> type tMessage.
field-symbols: <waTableType> type tTableType.
field-symbols: <waTransformation> type tTransformation.
data: tableLinesString type string.
data: runtimeChar(10).
if tableLines = 1.
concatenate tableLinesString ` function downloaded` into waTreeDisplay-text2.
else.
concatenate tableLinesString ` functions downloaded` into waTreeDisplay-text2.
endif.
* Screens.
loop at <waFunction>-iScreenFlow assigning <waScreen>.
waTreeDisplay-tlevel = '2'.
waTreeDisplay-text2 = <waScreen>-screen.
waTreeDisplay-tcolor2 = 6.
waTreeDisplay-tlength3 = 80.
waTreeDisplay-tcolor3 = 6.
waTreeDisplay-tpos3 = 60.
waTreeDisplay-text3 = 'Screen'.
append waTreeDisplay to iTreeDisplay.
endloop.
* GUI Title.
loop at <waFunction>-iGUITitle assigning <waGUITitle>.
waTreeDisplay-tlevel = '2'.
waTreeDisplay-text2 = <waGUITitle>-obj_code.
waTreeDisplay-tcolor2 = 6.
waTreeDisplay-tlength3 = 80.
waTreeDisplay-tcolor3 = 6.
waTreeDisplay-tpos3 = 60.
waTreeDisplay-text3 = 'GUI Title'.
append waTreeDisplay to iTreeDisplay.
endloop.
waTreeDisplay-text3 = <waMessage>-sText.
concatenate `Message class: ` waTreeDisplay-text3 into waTreeDisplay-
text3.
append waTreeDisplay to iLocTreeDisplay.
endat.
endloop.
endloop.
endform.
"fillTreeNodeFunctions
*----------------------------------------------------------------------------------
------------------------------------
* fillTreeNodePrograms
*----------------------------------------------------------------------------------
------------------------------------
form fillTreeNodePrograms using iLocPrograms like iPrograms[]
iLocFunctions like iFunctions[]
iLocTreeDisplay like iTreeDisplay[]
value(runTime).
if tableLines = 1.
concatenate tableLinesString ` program downloaded` into waTreeDisplay-text2.
else.
concatenate tableLinesString ` programs downloaded` into waTreeDisplay-text2.
endif.
waTreeDisplay-text3 = <waMessage>-sText.
concatenate `Message class: ` waTreeDisplay-text3 into waTreeDisplay-
text3.
append waTreeDisplay to iLocTreeDisplay.
endat.
endloop.
* Fill in the tree with include information
loop at <waProgram>-iIncludes assigning <waInclude>.
waTreeDisplay-tlevel = 3.
waTreeDisplay-text2 = <waInclude>-includeName.
waTreeDisplay-tcolor2 = 4.
waTreeDisplay-tlength3 = 80.
waTreeDisplay-tcolor3 = 4.
waTreeDisplay-tpos3 = 60.
concatenate `Include: ` <waInclude>-includeTitle into waTreeDisplay-text3.
append waTreeDisplay to iLocTreeDisplay.
endloop.
* fill in the tree with dictionary information
loop at <waProgram>-iDictStruct assigning <waDictionary>.
waTreeDisplay-tlevel = 3.
waTreeDisplay-text2 = <waDictionary>-tablename.
waTreeDisplay-tcolor2 = 3.
waTreeDisplay-tlength3 = 80.
waTreeDisplay-tcolor3 = 3.
waTreeDisplay-tpos3 = 60.
concatenate `Dictionary: ` <waDictionary>-tableTitle into waTreeDisplay-
text3.
append waTreeDisplay to iLocTreeDisplay.
endloop.
* Function Modules
loop at iLocFunctions assigning <wafunction> where programLinkName =
<waProgram>-progname.
waTreeDisplay-tlevel = 3.
waTreeDisplay-text2 = <wafunction>-functionName.
waTreeDisplay-tcolor2 = 7.
waTreeDisplay-tlength3 = 80.
waTreeDisplay-tcolor3 = 7.
waTreeDisplay-tpos3 = 60.
concatenate `Function: ` <wafunction>-functionName into waTreeDisplay-
text3.
append waTreeDisplay to iLocTreeDisplay.
waTreeDisplay-text3 = <waMessage>-sText.
concatenate `Message class: ` waTreeDisplay-text3 into waTreeDisplay-
text3.
append waTreeDisplay to iLocTreeDisplay.
endat.
endloop.
endloop.
endloop.
endform.
"fillTreeNodePrograms
*----------------------------------------------------------------------------------
------------------------------------
* fillTreeNodeClasses
*----------------------------------------------------------------------------------
------------------------------------
form fillTreeNodeClasses using iLocClasses like iClasses[]
iLocFunctions like iFunctions[]
iLocTreeDisplay like iTreeDisplay[]
value(runTime).
if tableLines = 1.
concatenate tableLinesString ` class downloaded` into waTreeDisplay-text2.
else.
concatenate tableLinesString ` classes downloaded` into waTreeDisplay-text2.
endif.
waTreeDisplay-text3 = <waMessage>-sText.
concatenate `Message class: ` waTreeDisplay-text3 into waTreeDisplay-
text3.
append waTreeDisplay to iLocTreeDisplay.
endat.
endloop.
* Function Modules
loop at iLocFunctions assigning <wafunction> where programLinkName = <waClass>-
clsname.
waTreeDisplay-tlevel = 3.
waTreeDisplay-text2 = <wafunction>-functionName.
waTreeDisplay-tcolor2 = 7.
waTreeDisplay-tlength3 = 80.
waTreeDisplay-tcolor3 = 7.
waTreeDisplay-tpos3 = 60.
concatenate `Function: ` <wafunction>-functionName into waTreeDisplay-
text3.
append waTreeDisplay to iLocTreeDisplay.
waTreeDisplay-text3 = <waMessage>-sText.
concatenate `Message class: ` waTreeDisplay-text3 into waTreeDisplay-
text3.
append waTreeDisplay to iLocTreeDisplay.
endat.
endloop.
endloop.
endloop.
endform.
"fillTreeNodeClasses
*----------------------------------------------------------------------------------
------------------------------------
* displayTree...
*----------------------------------------------------------------------------------
------------------------------------
form displayTree using iLocTreeDisplay like iTreeDisplay[].
endform.