ABAP-程序下载程序

   1 PROGRAM y4_b4_test19.
   2 TABLES: trdir, seoclass, tfdir, enlfdir, dd02l, tadiv, dd40l, transfdesc.
   3 TYPE-POOLS: abap, seor.
   4 TYPES: ttexttable LIKE textpool.
   5 
   6 TYPES: tguititle LIKE d347t.
   7 TYPES: BEGIN OF tmessage,
   8          arbgb LIKE t100-arbgb,
   9          stext LIKE t100a-stext,
  10          msgnr LIKE t100-msgnr,
  11          text  LIKE t100-text,
  12        END OF tmessage.
  13 TYPES: BEGIN OF tscreenflow,
  14          screen LIKE d020s-dnum,
  15          code   LIKE d022s-line,
  16        END OF tscreenflow.
  17 TYPES: BEGIN OF tdomainstructure,
  18          domname    TYPE domname,
  19          domvalue_l TYPE domvalue_l,
  20          domvalue_h TYPE domvalue_l,
  21          ddtext     TYPE val_text,
  22        END OF tdomainstructure.
  23 TYPES: BEGIN OF tdicttablestructure,
  24          fieldname LIKE dd03l-fieldname,
  25          position  LIKE dd03l-position,
  26          keyflag   LIKE dd03l-keyflag,
  27          rollname  LIKE dd03l-rollname,
  28          domname   LIKE dd03l-domname,
  29          datatype  LIKE dd03l-datatype,
  30          leng      LIKE dd03l-leng,
  31          lowercase TYPE lowercase,
  32          ddtext    LIKE dd04t-ddtext,
  33          idomains  TYPE tdomainstructure OCCURS 0,
  34        END OF tdicttablestructure.
  35 TYPES: BEGIN OF ttabletype,
  36          typename   TYPE ttypename,  " Name of table type
  37          rowtype    TYPE ttrowtype,  " Name of row type for table types
  38          ttypkind   TYPE ttypkind,   " Category of table type (range or general table type)
  39          range_ctyp TYPE range_ctyp, " Elem. type of LOW and HIGH components of a Ranges type
  40          reftype    TYPE ddreftype,  " Type of Object Referenced
  41          occurs     TYPE ddoccurs,   " Initial Line Number for Table Types
  42          ddtext     TYPE ddtext,     " Description
  43        END OF ttabletype.
  44 TYPES: BEGIN OF tdicttable,
  45          tablename  LIKE dd03l-tabname,
  46          tabletitle LIKE dd02t-ddtext,
  47          istructure TYPE tdicttablestructure OCCURS 0,
  48        END OF tdicttable.
  49 TYPES: BEGIN OF tdictfilename,
  50          tablename LIKE dd03l-tabname,
  51          filename  TYPE string,
  52        END OF tdictfilename.
  53 TYPES: BEGIN OF ttransformation,
  54          xsltname LIKE trdir-name,
  55          xsltdesc LIKE tftit-stext,
  56          subc     LIKE trdir-subc,
  57        END OF ttransformation.
  58 TYPES: BEGIN OF tinclude,
  59          includename  LIKE trdir-name,
  60          includetitle LIKE tftit-stext,
  61        END OF tinclude.
  62 TYPES: BEGIN OF tconcept,
  63          constname TYPE string,
  64          concept   TYPE sotr_conc,
  65        END OF tconcept.
  66 TYPES: BEGIN OF tmethod,
  67          cmpname(61),
  68          descript    LIKE vseomethod-descript,
  69          exposure    LIKE vseomethod-exposure,
  70          methodkey   TYPE string,
  71        END OF tmethod.
  72 TYPES: BEGIN OF tinterface,
  73          interfacename LIKE vseoclass-clsname,
  74        END OF tinterface.
  75 TYPES: BEGIN OF tclass,
  76          scanned(1),
  77          clsname           LIKE vseoclass-clsname,
  78          descript          LIKE vseoclass-descript,
  79          msg_id            LIKE vseoclass-msg_id,
  80          exposure          LIKE vseoclass-exposure,
  81          state             LIKE vseoclass-state,
  82          clsfinal          LIKE vseoclass-clsfinal,
  83          r3release         LIKE vseoclass-r3release,
  84          imethods          TYPE tmethod OCCURS 0,
  85          idictstruct       TYPE tdicttable OCCURS 0,
  86          itextelements     TYPE ttexttable OCCURS 0,
  87          imessages         TYPE tmessage OCCURS 0,
  88          iinterfaces       TYPE tinterface OCCURS 0,
  89          iconcepts         TYPE tconcept OCCURS 0,
  90          itabletypes       TYPE ttabletype OCCURS 0,
  91          itransformations  TYPE ttransformation OCCURS 0,
  92          textelementkey    TYPE string,
  93          publicclasskey    TYPE string,
  94          privateclasskey   TYPE string,
  95          protectedclasskey TYPE string,
  96          typesclasskey     TYPE string,
  97          exceptionclass    TYPE abap_bool,
  98        END OF tclass.
  99 TYPES: BEGIN OF tfunction,
 100          functionname        LIKE tfdir-funcname,
 101          functiongroup       LIKE enlfdir-area,
 102          includenumber       LIKE tfdir-include,
 103          functionmaininclude LIKE tfdir-funcname,
 104          functiontitle       LIKE tftit-stext,
 105          topincludename      LIKE tfdir-funcname,
 106          progname            LIKE tfdir-pname,
 107          programlinkname     LIKE tfdir-pname,
 108          messageclass        LIKE t100-arbgb,
 109          itextelements       TYPE ttexttable OCCURS 0,
 110          iselectiontexts     TYPE ttexttable OCCURS 0,
 111          imessages           TYPE tmessage OCCURS 0,
 112          iincludes           TYPE tinclude OCCURS 0,
 113          idictstruct         TYPE tdicttable OCCURS 0,
 114          iguititle           TYPE tguititle OCCURS 0,
 115          iscreenflow         TYPE tscreenflow OCCURS 0,
 116          itabletypes         TYPE ttabletype OCCURS 0,
 117          itransformations    TYPE ttransformation OCCURS 0,
 118        END OF tfunction.
 119 TYPES: BEGIN OF tprogram,
 120          progname         LIKE trdir-name,
 121          programtitle     LIKE tftit-stext,
 122          subc             LIKE trdir-subc,
 123          messageclass     LIKE t100-arbgb,
 124          imessages        TYPE tmessage OCCURS 0,
 125          itextelements    TYPE ttexttable OCCURS 0,
 126          iselectiontexts  TYPE ttexttable OCCURS 0,
 127          iguititle        TYPE tguititle OCCURS 0,
 128          iscreenflow      TYPE tscreenflow OCCURS 0,
 129          iincludes        TYPE tinclude OCCURS 0,
 130          idictstruct      TYPE tdicttable OCCURS 0,
 131          itabletypes      TYPE ttabletype OCCURS 0,
 132          itransformations TYPE ttransformation OCCURS 0,
 133        END OF tprogram.
 134 DATA: idictionary TYPE STANDARD TABLE OF tdicttable WITH HEADER LINE.
 135 DATA: idictfilename TYPE STANDARD TABLE OF tdictfilename WITH HEADER LINE.
 136 DATA: itabletypes TYPE STANDARD TABLE OF ttabletype WITH HEADER LINE.
 137 DATA: itabletypefilename TYPE STANDARD TABLE OF tdictfilename WITH HEADER LINE.
 138 DATA: ifunctions TYPE STANDARD TABLE OF tfunction WITH HEADER LINE.
 139 DATA: iprogfunctions TYPE STANDARD TABLE OF tfunction WITH HEADER LINE.
 140 DATA: itreedisplay TYPE STANDARD TABLE OF snodetext WITH HEADER LINE.
 141 DATA: imessages TYPE STANDARD TABLE OF tmessage WITH HEADER LINE.
 142 DATA: isinglemessageclass TYPE STANDARD TABLE OF tmessage WITH HEADER LINE.
 143 DATA: iprograms TYPE STANDARD TABLE OF tprogram WITH HEADER LINE.
 144 DATA: iclasses TYPE STANDARD TABLE OF tclass WITH HEADER LINE.
 145 DATA: iserverpaths TYPE STANDARD TABLE OF string WITH HEADER LINE.
 146 DATA: itransformations TYPE STANDARD TABLE OF ttransformation WITH HEADER LINE.
 147 DATA: dumidictstructure TYPE STANDARD TABLE OF tdicttablestructure.
 148 DATA: dumitexttab TYPE STANDARD TABLE OF ttexttable.
 149 DATA: dumiincludes TYPE STANDARD TABLE OF tinclude.
 150 DATA: dumihtml TYPE STANDARD TABLE OF string.
 151 DATA: dumiheader TYPE STANDARD TABLE OF string .
 152 DATA: dumiscreen TYPE STANDARD TABLE OF tscreenflow .
 153 DATA: dumiguititle TYPE STANDARD TABLE OF tguititle.
 154 DATA: dumimethods TYPE STANDARD TABLE OF tmethod.
 155 DATA: dumiconcepts TYPE STANDARD TABLE OF tconcept.
 156 DATA: dumiinterfaces TYPE STANDARD TABLE OF tinterface.
 157 DATA: objfile TYPE REF TO cl_gui_frontend_services.
 158 DATA: objruntimeerror TYPE REF TO cx_root.
 159 CONSTANTS: versionno TYPE string VALUE '1.5.2'.
 160 CONSTANTS: tables TYPE string VALUE 'TABLES'.
 161 CONSTANTS: table TYPE string VALUE 'TABLE'.
 162 CONSTANTS: like TYPE string VALUE 'LIKE'.
 163 CONSTANTS: type TYPE string VALUE 'TYPE'.
 164 CONSTANTS: typerefto TYPE string VALUE 'TYPE REF TO'.
 165 CONSTANTS: structure TYPE string VALUE 'STRUCTURE'.
 166 CONSTANTS: lowstructure TYPE string VALUE 'structure'.
 167 CONSTANTS: occurs TYPE string VALUE 'OCCURS'.
 168 CONSTANTS: function TYPE string VALUE 'FUNCTION'.
 169 CONSTANTS: callfunction TYPE string VALUE ' CALL FUNCTION'.
 170 CONSTANTS: message TYPE string  VALUE 'MESSAGE'.
 171 CONSTANTS: include TYPE string VALUE 'INCLUDE'.
 172 CONSTANTS: transformation TYPE string VALUE 'TRANSFORMATION'.
 173 CONSTANTS: lowinclude TYPE string VALUE 'include'.
 174 CONSTANTS: destination TYPE string VALUE 'DESTINATION'.
 175 CONSTANTS: is_table TYPE string VALUE 'T'.
 176 CONSTANTS: is_transformation TYPE string VALUE 'X'.
 177 CONSTANTS: is_program TYPE string VALUE 'P'.
 178 CONSTANTS: is_screen TYPE string VALUE 'S'.
 179 CONSTANTS: is_guititle TYPE string VALUE 'G'.
 180 CONSTANTS: is_documentation TYPE string VALUE 'D'.
 181 CONSTANTS: is_messageclass TYPE string VALUE 'MC'.
 182 CONSTANTS: is_function TYPE string VALUE 'F'.
 183 CONSTANTS: is_class TYPE string VALUE 'C'.
 184 CONSTANTS: is_method TYPE string VALUE 'M'.
 185 CONSTANTS: asterix TYPE string VALUE '*'.
 186 CONSTANTS: comma TYPE string VALUE ','.
 187 CONSTANTS: period TYPE string VALUE '.'.
 188 CONSTANTS: dash TYPE string VALUE '-'.
 189 CONSTANTS: true TYPE abap_bool VALUE 'X'.
 190 CONSTANTS: false TYPE abap_bool VALUE ''.
 191 CONSTANTS: lt TYPE string VALUE '<'.
 192 CONSTANTS: gt TYPE string VALUE '>'.
 193 CONSTANTS: unix TYPE string VALUE 'UNIX'.
 194 CONSTANTS: non_unix TYPE string VALUE 'not UNIX'.
 195 CONSTANTS: htmlextension TYPE string VALUE 'html'.
 196 CONSTANTS: textextension TYPE string VALUE 'txt'.
 197 CONSTANTS: ss_code TYPE c VALUE 'C'.
 198 CONSTANTS: ss_table TYPE c VALUE 'T'.
 199 DATA: statusbarmessage(100).
 200 DATA: forcedexit TYPE abap_bool VALUE false.
 201 DATA: starttime LIKE sy-uzeit.
 202 DATA: runtime LIKE sy-uzeit.
 203 DATA: downloadfileextension TYPE string.
 204 DATA: downloadfolder TYPE string.
 205 DATA: serverslashseparator TYPE string.
 206 DATA: frontendslashseparator TYPE string.
 207 DATA: slashseparatortouse TYPE string.
 208 DATA: serverfilesystem TYPE filesys_d.
 209 DATA: serverfolder TYPE string.
 210 DATA: frontendopsystem TYPE string.
 211 DATA: serveropsystem TYPE string.
 212 DATA: customernamespace TYPE string.
 213 RANGES: soprogramname FOR trdir-name.
 214 RANGES: soauthor FOR usr02-bname.
 215 RANGES: sotablenames FOR dd02l-tabname.
 216 RANGES: sotabletypenames FOR dd40l-typename.
 217 RANGES: sofunctionname  FOR tfdir-funcname.
 218 RANGES: soclassname FOR vseoclass-clsname.
 219 RANGES: sofunctiongroup FOR enlfdir-area.
 220 RANGES: soxsltname FOR tadir-obj_name.
 221 FIELD-SYMBOLS: <wadictstruct> TYPE tdicttable.
 222 SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE tblock1.
 223   SELECTION-SCREEN BEGIN OF LINE.
 224     SELECTION-SCREEN COMMENT 5(23) tauth.
 225     PARAMETERS: pauth LIKE usr02-bname MEMORY ID mauth.
 226   SELECTION-SCREEN END OF LINE.
 227   SELECTION-SCREEN BEGIN OF LINE.
 228     SELECTION-SCREEN COMMENT 5(36) tpmod.
 229     PARAMETERS: pmod AS CHECKBOX.
 230   SELECTION-SCREEN END OF LINE.
 231 SELECTION-SCREEN: END OF BLOCK b1.
 232 SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE tblock2.
 233   SELECTION-SCREEN BEGIN OF LINE.
 234     PARAMETERS: rtable RADIOBUTTON GROUP r1.
 235     SELECTION-SCREEN COMMENT 5(15) trtable.
 236   SELECTION-SCREEN END OF LINE.
 237   SELECTION-SCREEN BEGIN OF LINE.
 238     SELECTION-SCREEN COMMENT 10(15) tptable.
 239     SELECT-OPTIONS: sotable FOR dd02l-tabname.
 240   SELECTION-SCREEN END OF LINE.
 241   SELECTION-SCREEN BEGIN OF LINE.
 242     SELECTION-SCREEN COMMENT 10(79) ttnote.
 243   SELECTION-SCREEN END OF LINE.
 244   SELECTION-SCREEN BEGIN OF LINE.
 245     PARAMETERS: rtabtype RADIOBUTTON GROUP r1.
 246     SELECTION-SCREEN COMMENT 5(15) trtabtyp.
 247   SELECTION-SCREEN END OF LINE.
 248   SELECTION-SCREEN BEGIN OF LINE.
 249     SELECTION-SCREEN COMMENT 10(15) tptabtyp.
 250     SELECT-OPTIONS: sotabtyp FOR dd40l-typename.
 251   SELECTION-SCREEN END OF LINE.
 252   SELECTION-SCREEN BEGIN OF LINE.
 253     PARAMETERS: rmess RADIOBUTTON GROUP r1.
 254     SELECTION-SCREEN COMMENT 5(18) tpmes.
 255   SELECTION-SCREEN END OF LINE.
 256   SELECTION-SCREEN BEGIN OF LINE.
 257     SELECTION-SCREEN COMMENT 10(18) tmname.
 258     PARAMETERS: pmname LIKE t100-arbgb MEMORY ID mmname.
 259   SELECTION-SCREEN END OF LINE.
 260   SELECTION-SCREEN BEGIN OF LINE.
 261     PARAMETERS: rfunc RADIOBUTTON GROUP r1.
 262     SELECTION-SCREEN COMMENT 5(30) trfunc.
 263   SELECTION-SCREEN END OF LINE.
 264   SELECTION-SCREEN BEGIN OF LINE.
 265     SELECTION-SCREEN COMMENT 10(15) tpfname.
 266     SELECT-OPTIONS: sofname FOR tfdir-funcname.
 267   SELECTION-SCREEN END OF LINE.
 268   SELECTION-SCREEN BEGIN OF LINE.
 269     SELECTION-SCREEN COMMENT 10(15) tfgroup.
 270     SELECT-OPTIONS: sofgroup FOR enlfdir-area.
 271   SELECTION-SCREEN END OF LINE.
 272   SELECTION-SCREEN BEGIN OF LINE.
 273     PARAMETERS: rxslt RADIOBUTTON GROUP r1.
 274     SELECTION-SCREEN COMMENT 5(30) trxslt.
 275   SELECTION-SCREEN END OF LINE.
 276   SELECTION-SCREEN BEGIN OF LINE.
 277     SELECTION-SCREEN COMMENT 10(15) tpxslt.
 278     SELECT-OPTIONS: soxslt FOR transfdesc-xsltdesc.
 279   SELECTION-SCREEN END OF LINE.
 280   SELECTION-SCREEN BEGIN OF LINE.
 281     PARAMETERS: rclass RADIOBUTTON GROUP r1.
 282     SELECTION-SCREEN COMMENT 5(30) trclass.
 283   SELECTION-SCREEN END OF LINE.
 284   SELECTION-SCREEN BEGIN OF LINE.
 285     SELECTION-SCREEN COMMENT 10(15) tpcname.
 286     SELECT-OPTIONS: soclass FOR seoclass-clsname.
 287   SELECTION-SCREEN END OF LINE.
 288   SELECTION-SCREEN BEGIN OF LINE.
 289     PARAMETERS: rprog RADIOBUTTON GROUP r1 DEFAULT 'X'.
 290     SELECTION-SCREEN COMMENT 5(18) tprog.
 291   SELECTION-SCREEN END OF LINE.
 292   SELECTION-SCREEN BEGIN OF LINE.
 293     SELECTION-SCREEN COMMENT 10(15) trpname.
 294     SELECT-OPTIONS: soprog FOR trdir-name.
 295   SELECTION-SCREEN END OF LINE.
 296   SELECTION-SCREEN SKIP.
 297   SELECTION-SCREEN BEGIN OF LINE.
 298     SELECTION-SCREEN COMMENT 1(27) tmlang.
 299     PARAMETERS: pmlang LIKE t100-sprsl DEFAULT 'EN'.
 300   SELECTION-SCREEN END OF LINE.
 301   SELECTION-SCREEN BEGIN OF LINE.
 302     SELECTION-SCREEN COMMENT 1(24) tpack.
 303     SELECT-OPTIONS: sopack FOR tadiv-devclass.
 304   SELECTION-SCREEN END OF LINE.
 305   SELECTION-SCREEN BEGIN OF LINE.
 306     SELECTION-SCREEN COMMENT 1(27) tcust.
 307     PARAMETERS: pcust AS CHECKBOX DEFAULT 'X'.
 308   SELECTION-SCREEN END OF LINE.
 309   SELECTION-SCREEN BEGIN OF LINE.
 310     SELECTION-SCREEN COMMENT 1(27) tnrange.
 311     PARAMETERS: pcname TYPE namespace MEMORY ID mnamespace.
 312   SELECTION-SCREEN END OF LINE.
 313 SELECTION-SCREEN: END OF BLOCK b2.
 314 SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME TITLE tblock3.
 315   SELECTION-SCREEN BEGIN OF LINE.
 316     SELECTION-SCREEN COMMENT 1(33) tptext.
 317     PARAMETERS: ptext AS CHECKBOX DEFAULT 'X' MEMORY ID mtext.
 318   SELECTION-SCREEN END OF LINE.
 319   SELECTION-SCREEN BEGIN OF LINE.
 320     SELECTION-SCREEN COMMENT 1(33) tmess.
 321     PARAMETERS: pmess AS CHECKBOX DEFAULT 'X' MEMORY ID mmess.
 322   SELECTION-SCREEN END OF LINE.
 323   SELECTION-SCREEN BEGIN OF LINE.
 324     SELECTION-SCREEN COMMENT 1(33) tttyp.
 325     PARAMETERS: pttyp AS CHECKBOX DEFAULT 'X' MEMORY ID mttyp.
 326   SELECTION-SCREEN END OF LINE.
 327   SELECTION-SCREEN BEGIN OF LINE.
 328     SELECTION-SCREEN COMMENT 1(33) txslt.
 329     PARAMETERS: ptrans AS CHECKBOX DEFAULT 'X' MEMORY ID mxslt.
 330   SELECTION-SCREEN END OF LINE.
 331   SELECTION-SCREEN BEGIN OF LINE.
 332     SELECTION-SCREEN COMMENT 1(33) tpinc.
 333     PARAMETERS: pinc AS CHECKBOX DEFAULT 'X' MEMORY ID minc.
 334     SELECTION-SCREEN COMMENT 40(20) treci.
 335     PARAMETERS: preci AS CHECKBOX DEFAULT 'X' MEMORY ID mreci.
 336   SELECTION-SCREEN END OF LINE.
 337   SELECTION-SCREEN BEGIN OF LINE.
 338     SELECTION-SCREEN COMMENT 1(33) tpfunc.
 339     PARAMETERS: pfunc AS CHECKBOX DEFAULT 'X' MEMORY ID mfunc.
 340     SELECTION-SCREEN COMMENT 40(20) trecf.
 341     PARAMETERS: precf AS CHECKBOX DEFAULT 'X' MEMORY ID mrecf.
 342   SELECTION-SCREEN END OF LINE.
 343   SELECTION-SCREEN BEGIN OF LINE.
 344     SELECTION-SCREEN COMMENT 1(33) trecc.
 345     PARAMETERS: precc AS CHECKBOX DEFAULT 'X' MEMORY ID mrecc.
 346   SELECTION-SCREEN END OF LINE.
 347   SELECTION-SCREEN BEGIN OF LINE.
 348     SELECTION-SCREEN COMMENT 1(33) tfdoc.
 349     PARAMETERS: pfdoc AS CHECKBOX DEFAULT 'X' MEMORY ID mfdoc.
 350   SELECTION-SCREEN END OF LINE.
 351   SELECTION-SCREEN BEGIN OF LINE.
 352     SELECTION-SCREEN COMMENT 1(33) tcdoc.
 353     PARAMETERS: pcdoc AS CHECKBOX DEFAULT 'X' MEMORY ID mcdoc.
 354   SELECTION-SCREEN END OF LINE.
 355   SELECTION-SCREEN BEGIN OF LINE.
 356     SELECTION-SCREEN COMMENT 1(33) tpscr.
 357     PARAMETERS: pscr AS CHECKBOX DEFAULT 'X' MEMORY ID mscr.
 358   SELECTION-SCREEN END OF LINE.
 359   SELECTION-SCREEN BEGIN OF LINE.
 360     SELECTION-SCREEN COMMENT 1(33) tpdict.
 361     PARAMETERS: pdict AS CHECKBOX DEFAULT 'X' MEMORY ID mdict.
 362   SELECTION-SCREEN END OF LINE.
 363   SELECTION-SCREEN BEGIN OF LINE.
 364     SELECTION-SCREEN COMMENT 1(33) tsortt.
 365     PARAMETERS: psortt AS CHECKBOX DEFAULT ' ' MEMORY ID msortt.
 366   SELECTION-SCREEN END OF LINE.
 367 SELECTION-SCREEN: END OF BLOCK b3.
 368 SELECTION-SCREEN: BEGIN OF BLOCK b4 WITH FRAME TITLE tblock4.
 369   SELECTION-SCREEN BEGIN OF LINE.
 370     SELECTION-SCREEN COMMENT 1(20) tphtml.
 371     PARAMETERS: phtml RADIOBUTTON GROUP g1 DEFAULT 'X'.
 372   SELECTION-SCREEN END OF LINE.
 373   SELECTION-SCREEN BEGIN OF LINE.
 374     SELECTION-SCREEN COMMENT 5(29) tback.
 375     PARAMETERS: pback AS CHECKBOX DEFAULT 'X'.
 376   SELECTION-SCREEN END OF LINE.
 377   SELECTION-SCREEN BEGIN OF LINE.
 378     SELECTION-SCREEN COMMENT 1(20) tptxt.
 379     PARAMETERS: ptxt RADIOBUTTON GROUP g1.
 380   SELECTION-SCREEN END OF LINE.
 381   SELECTION-SCREEN SKIP.
 382   SELECTION-SCREEN BEGIN OF LINE.
 383     SELECTION-SCREEN COMMENT 1(25) tserv.
 384     PARAMETERS: pserv RADIOBUTTON GROUP g2.
 385   SELECTION-SCREEN END OF LINE.
 386   SELECTION-SCREEN BEGIN OF LINE.
 387     SELECTION-SCREEN COMMENT 8(20) tspath.
 388     PARAMETERS: plogical LIKE filename-fileintern MEMORY ID mlogical.
 389   SELECTION-SCREEN END OF LINE.
 390   SELECTION-SCREEN COMMENT /28(60) tsdpath.
 391   SELECTION-SCREEN BEGIN OF LINE.
 392     SELECTION-SCREEN COMMENT 1(25) tpc.
 393     PARAMETERS: ppc RADIOBUTTON GROUP g2 DEFAULT 'X'.
 394   SELECTION-SCREEN END OF LINE.
 395   SELECTION-SCREEN BEGIN OF LINE.
 396     SELECTION-SCREEN COMMENT 8(20) tppath.
 397     PARAMETERS: pfolder LIKE rlgrap-filename MEMORY ID mfolder.
 398   SELECTION-SCREEN END OF LINE.
 399 SELECTION-SCREEN: END OF BLOCK b4.
 400 SELECTION-SCREEN: BEGIN OF BLOCK b5 WITH FRAME TITLE tblock5.
 401   SELECTION-SCREEN BEGIN OF LINE.
 402     SELECTION-SCREEN COMMENT 1(33) trep.
 403     PARAMETERS: prep AS CHECKBOX DEFAULT 'X'.
 404   SELECTION-SCREEN END OF LINE.
 405   SELECTION-SCREEN BEGIN OF LINE.
 406     SELECTION-SCREEN COMMENT 1(33) tpromess.
 407     PARAMETERS: ppromess AS CHECKBOX DEFAULT 'X'.
 408   SELECTION-SCREEN END OF LINE.
 409 SELECTION-SCREEN: END OF BLOCK b5.
 410 AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfolder.
 411   DATA: objfile TYPE REF TO cl_gui_frontend_services.
 412   DATA: pickedfolder TYPE string.
 413   DATA: initialfolder TYPE string.
 414   IF sy-batch IS INITIAL.
 415     CREATE OBJECT objfile.
 416     IF NOT pfolder IS INITIAL.
 417       initialfolder = pfolder.
 418     ELSE.
 419       objfile->get_temp_directory( CHANGING temp_dir = initialfolder
 420                                    EXCEPTIONS cntl_error = 1
 421                                              error_no_gui = 2
 422                                              not_supported_by_gui = 3 ).
 423     ENDIF.
 424     objfile->directory_browse( EXPORTING initial_folder = initialfolder
 425                                CHANGING selected_folder = pickedfolder
 426                                EXCEPTIONS cntl_error = 1
 427                                           error_no_gui = 2
 428                                           not_supported_by_gui = 3 ).
 429     IF sy-subrc = 0.
 430       pfolder = pickedfolder.
 431     ELSE.
 432       WRITE: / 'An error has occured picking a folder'.
 433     ENDIF.
 434   ENDIF.
 435 AT SELECTION-SCREEN.
 436   CASE 'X'.
 437     WHEN ppc.
 438       IF pfolder IS INITIAL.
 439         MESSAGE e000(oo) WITH 'You must enter a file path'.
 440       ENDIF.
 441     WHEN pserv.
 442       IF plogical IS INITIAL.
 443         MESSAGE e000(oo) WITH 'You must enter a logical file name'.
 444       ENDIF.
 445   ENDCASE.
 446 AT SELECTION-SCREEN ON plogical.
 447   IF NOT pserv IS INITIAL.
 448     CALL FUNCTION 'FILE_GET_NAME'
 449       EXPORTING
 450         logical_filename = plogical
 451       IMPORTING
 452         file_name        = serverfolder
 453       EXCEPTIONS
 454         file_not_found   = 1
 455         OTHERS           = 2.
 456     IF sy-subrc = 0.
 457       IF serverfolder IS INITIAL.
 458         MESSAGE e000(oo) WITH 'No file path returned from logical filename'.
 459       ELSE.
 460         tsdpath = serverfolder.
 461         SHIFT serverfolder RIGHT DELETING TRAILING serverslashseparator.
 462         SHIFT serverfolder LEFT DELETING LEADING space.
 463       ENDIF.
 464     ELSE.
 465       MESSAGE e000(oo) WITH 'Logical filename does not exist'.
 466     ENDIF.
 467   ENDIF.
 468 AT SELECTION-SCREEN ON VALUE-REQUEST FOR soprog-low.
 469   CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
 470     EXPORTING
 471       object_type           = 'PROG'
 472       object_name           = soprog-low
 473       suppress_selection    = 'X'
 474       use_alv_grid          = ''
 475       without_personal_list = ''
 476     IMPORTING
 477       object_name_selected  = soprog-low
 478     EXCEPTIONS
 479       cancel                = 1.
 480 AT SELECTION-SCREEN ON VALUE-REQUEST FOR soprog-high.
 481   CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
 482     EXPORTING
 483       object_type           = 'PROG'
 484       object_name           = soprog-high
 485       suppress_selection    = 'X'
 486       use_alv_grid          = ''
 487       without_personal_list = ''
 488     IMPORTING
 489       object_name_selected  = soprog-high
 490     EXCEPTIONS
 491       cancel                = 1.
 492 AT SELECTION-SCREEN ON VALUE-REQUEST FOR soxslt-low.
 493   CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
 494     EXPORTING
 495       object_type           = 'XSLT'
 496       object_name           = soxslt-low
 497       suppress_selection    = 'X'
 498       use_alv_grid          = ''
 499       without_personal_list = ''
 500     IMPORTING
 501       object_name_selected  = soxslt-low
 502     EXCEPTIONS
 503       cancel                = 1.
 504 AT SELECTION-SCREEN ON VALUE-REQUEST FOR soxslt-high.
 505   CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
 506     EXPORTING
 507       object_type           = 'XSLT'
 508       object_name           = soxslt-high
 509       suppress_selection    = 'X'
 510       use_alv_grid          = ''
 511       without_personal_list = ''
 512     IMPORTING
 513       object_name_selected  = soxslt-high
 514     EXCEPTIONS
 515       cancel                = 1.
 516 AT SELECTION-SCREEN ON VALUE-REQUEST FOR soclass-low.
 517   CALL FUNCTION 'F4_DD_ALLTYPES'
 518     EXPORTING
 519       object               = soclass-low
 520       suppress_selection   = 'X'
 521       display_only         = ''
 522       only_types_for_clifs = 'X'
 523     IMPORTING
 524       result               = soclass-low.
 525 AT SELECTION-SCREEN ON VALUE-REQUEST FOR soclass-high.
 526   CALL FUNCTION 'F4_DD_ALLTYPES'
 527     EXPORTING
 528       object               = soclass-high
 529       suppress_selection   = 'X'
 530       display_only         = ''
 531       only_types_for_clifs = 'X'
 532     IMPORTING
 533       result               = soclass-high.
 534 AT SELECTION-SCREEN ON VALUE-REQUEST FOR sofname-low.
 535   CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
 536     EXPORTING
 537       object_type           = 'FUNC'
 538       object_name           = sofname-low
 539       suppress_selection    = 'X'
 540       use_alv_grid          = ''
 541       without_personal_list = ''
 542     IMPORTING
 543       object_name_selected  = sofname-low
 544     EXCEPTIONS
 545       cancel                = 1.
 546 AT SELECTION-SCREEN ON VALUE-REQUEST FOR sofname-high.
 547   CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
 548     EXPORTING
 549       object_type           = 'FUNC'
 550       object_name           = sofname-high
 551       suppress_selection    = 'X'
 552       use_alv_grid          = ''
 553       without_personal_list = ''
 554     IMPORTING
 555       object_name_selected  = sofname-high
 556     EXCEPTIONS
 557       cancel                = 1.
 558 AT SELECTION-SCREEN ON VALUE-REQUEST FOR sofgroup-low.
 559   CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
 560     EXPORTING
 561       object_type           = 'FUGR'
 562       object_name           = sofgroup-low
 563       suppress_selection    = 'X'
 564       use_alv_grid          = ''
 565       without_personal_list = ''
 566     IMPORTING
 567       object_name_selected  = sofgroup-low
 568     EXCEPTIONS
 569       cancel                = 1.
 570 AT SELECTION-SCREEN ON VALUE-REQUEST FOR sofgroup-high.
 571   CALL FUNCTION 'REPOSITORY_INFO_SYSTEM_F4'
 572     EXPORTING
 573       object_type           = 'FUGR'
 574       object_name           = sofgroup-high
 575       suppress_selection    = 'X'
 576       use_alv_grid          = ''
 577       without_personal_list = ''
 578     IMPORTING
 579       object_name_selected  = sofgroup-high
 580     EXCEPTIONS
 581       cancel                = 1.
 582 INITIALIZATION.
 583   tblock1 = 'Author (Optional)'.
 584   tblock2 = 'Objects to download'.
 585   tblock3 = 'Additional downloads for programs, function modules and classes'.
 586   tblock4 = 'Download parameters'.
 587   tblock5 = 'Display options'.
 588   tauth   = 'Author name'.
 589   tpmod   = 'Include programs modified by author'.
 590   tcust   = 'Only customer objects'.
 591   tnrange = 'Alt customer name range'.
 592   trtable = 'Tables / Structures'.
 593   trtabtyp = 'Table types'.
 594   tptable = 'Table name'.
 595   ttnote  = 'Note: tables are stored under the username of the last person who modified them'.
 596   trfunc  = 'Function modules'.
 597   tpfname = 'Function name'.
 598   tfgroup = 'Function group'.
 599   trclass  = 'Classes'.
 600   tpcname = 'Class name'.
 601   tmess   = 'Message class'.
 602   tmname  = 'Class name'.
 603   tmlang  = 'Language'.
 604   tprog   = 'Programs'.
 605   trpname = 'Program name'.
 606   tpack   = 'Package'.
 607   tptxt   = 'Text document'.
 608   tphtml  = 'HTML document'.
 609   tback   = 'Include background colour'.
 610   tptext  = 'Text elements'.
 611   tpinc   = 'Include programs'.
 612   treci   = 'Recursive search'.
 613   tppath  = 'File path'.
 614   tspath  = 'Logical file name'.
 615   tpmes   = 'Message classes'.
 616   tpfunc  = 'Function modules'.
 617   tfdoc    = 'Function module documentation'.
 618   tcdoc    = 'Class documentation'.
 619   trecf   = 'Recursive search'.
 620   trecc   = 'Class recursive search'.
 621   tpscr   = 'Screens'.
 622   tpdict  = 'Dictionary structures'.
 623   tsortt  = 'Sort table fields alphabetically'.
 624   tserv   = 'Download to server'.
 625   tpc     = 'Download to PC'.
 626   trep    = 'Display download report'.
 627   tpromess  = 'Display progress messages'.
 628   trxslt     = 'Transformations'.
 629   tpxslt    = 'XSLT Name'.
 630   tttyp = 'Table Types'.
 631   txslt = 'Transformation'.
 632   IF sy-batch IS INITIAL.
 633     PERFORM determinefrontendopsystem USING frontendslashseparator frontendopsystem.
 634   ENDIF.
 635   PERFORM determineserveropsystem USING serverslashseparator serverfilesystem serveropsystem.
 636   PERFORM findexternalcommand USING serverfilesystem.
 637 START-OF-SELECTION.
 638   PERFORM checkcomboboxes.
 639   PERFORM fillselectionranges.
 640   starttime = sy-uzeit.
 641   IF NOT sy-batch IS INITIAL.
 642     ppromess = ''.
 643   ENDIF.
 644   IF pcname IS INITIAL.
 645     customernamespace  = '^'.
 646   ELSE.
 647     customernamespace = pcname.
 648   ENDIF.
 649   IF ptxt IS INITIAL.
 650     downloadfileextension = htmlextension.
 651   ELSE.
 652     downloadfileextension = textextension.
 653   ENDIF.
 654   CASE 'X'.
 655     WHEN ppc.
 656       slashseparatortouse = frontendslashseparator.
 657       downloadfolder = pfolder.
 658     WHEN pserv.
 659       slashseparatortouse = serverslashseparator.
 660       downloadfolder = serverfolder.
 661   ENDCASE.
 662   CASE 'X'.
 663     WHEN rtable.
 664       PERFORM retrievetables USING idictionary[]
 665                                    sotablenames[]
 666                                    soauthor[]
 667                                    sopack[].
 668     WHEN rtabtype.
 669       PERFORM retrievetabletypes USING itabletypes[]
 670                                        sotabletypenames[]
 671                                        soauthor[]
 672                                        sopack[].
 673     WHEN rmess.
 674       PERFORM retrievemessageclass USING imessages[]
 675                                          soauthor[]      "Author
 676                                          pmname          "Message class name
 677                                          pmlang          "Message class language
 678                                          pmod            "Modified by author
 679                                          sopack[].       "Package
 680     WHEN rfunc.
 681       PERFORM retrievefunctions USING sofunctionname[]   "Function name
 682                                       sofunctiongroup[]  "Function group
 683                                       ifunctions[]       "Found functions
 684                                       soauthor[]         "Author
 685                                       ptext              "Get text elements
 686                                       pscr               "Get screens
 687                                       pcust              "Customer data only
 688                                       customernamespace  "Customer name range
 689                                       sopack[].             "Package
 690       PERFORM scanforadditionalfuncstuff USING ifunctions[]
 691                                                preci                   "Search for includes recursively
 692                                                precf                   "Search for functions recursively
 693                                                pinc                    "Search for includes
 694                                                pfunc                   "Search for functions
 695                                                pdict                   "search for dictionary objects
 696                                                pmess                   "Search for messages
 697                                                ptrans                  "Search for transformations
 698                                                pcust                   "Customer data only
 699                                                customernamespace.      "Customer name range
 700     WHEN rclass.
 701       PERFORM retrieveclasses USING iclasses[]
 702                                     ifunctions[]
 703                                     soclassname[]       "Class name
 704                                     soauthor[]          "Author
 705                                     customernamespace   "Customer name range
 706                                     pmod                "Also modified by author
 707                                     pcust               "Customer object only
 708                                     pmess               "Find messages
 709                                     ptext               "Text Elements
 710                                     pdict               "Dictionary structures
 711                                     pfunc               "Get functions
 712                                     pinc                "Get includes
 713                                     ptrans
 714                                     precf               "Search recursively for functions
 715                                     preci               "Search recursively for includes
 716                                     precc               "Search recursively for classes
 717                                     pmlang              "Language
 718                                     sopack[].           "Package
 719       LOOP AT ifunctions.
 720         PERFORM scanforadditionalfuncstuff USING ifunctions[]
 721                                                  preci                   "Search for includes recursively
 722                                                  precf                   "Search for functions recursively
 723                                                  pinc                    "Search for includes
 724                                                  pfunc                   "Search for functions
 725                                                  pdict                   "search for dictionary objects
 726                                                  pmess                   "Search for messages
 727                                                  ptrans                  "Search for transformations
 728                                                  pcust                   "Customer data only
 729                                                  customernamespace.      "Customer name range
 730       ENDLOOP.
 731     WHEN rprog.
 732       PERFORM retrieveprograms USING iprograms[]
 733                                      iprogfunctions[]
 734                                      soprogramname[]    "Program name
 735                                      soauthor[]         "Author
 736                                      customernamespace  "Customer name range
 737                                      pmod               "Also modified by author
 738                                      pcust              "Customer object only
 739                                      pmess              "Find messages
 740                                      ptext              "Text Elements
 741                                      pdict              "Dictionay structures
 742                                      pfunc              "Get functions
 743                                      pinc               "Get includes
 744                                      pscr               "Get screens
 745                                      ptrans             "Get Transformations
 746                                      precf              "Search recursively for functions
 747                                      preci              "Search recursively for includes
 748                                      sopack[].             "Package
 749     WHEN rxslt.
 750       PERFORM retrievexslt USING itransformations[]
 751                                  soxsltname[]           "XSL Transformation name
 752                                  soauthor[]             "Author
 753                                  customernamespace      "Customer name range
 754                                  pmod                   "Also modified by author
 755                                  pcust                  "Customer object only
 756                                  sopack[].              "Package
 757   ENDCASE.
 758 END-OF-SELECTION.
 759   IF forcedexit = 0.
 760     CASE 'X'.
 761       WHEN rtable.
 762         IF NOT ( idictionary[] IS INITIAL ).
 763           PERFORM downloadddstructures USING idictionary[]
 764                                              idictfilename[]
 765                                              downloadfolder
 766                                              htmlextension
 767                                              space
 768                                              psortt
 769                                              slashseparatortouse
 770                                              pserv
 771                                              ppromess
 772                                              serverfilesystem
 773                                              pback.
 774         ENDIF.
 775       WHEN rtabtype.
 776         IF NOT ( itabletypes[] IS INITIAL ).
 777           PERFORM downloadddtabletypes USING itabletypes[]
 778                                              itabletypefilename[]
 779                                              downloadfolder
 780                                              htmlextension
 781                                              space
 782                                              psortt
 783                                              slashseparatortouse
 784                                              pserv
 785                                              ppromess
 786                                              serverfilesystem
 787                                              pback.
 788         ENDIF.
 789       WHEN rmess.
 790         IF NOT ( imessages[] IS INITIAL ).
 791           SORT imessages ASCENDING BY arbgb msgnr.
 792           LOOP AT imessages.
 793             APPEND imessages TO isinglemessageclass.
 794             AT END OF arbgb.
 795               PERFORM downloadmessageclass USING isinglemessageclass[]
 796                                                  imessages-arbgb
 797                                                  downloadfolder
 798                                                  downloadfileextension
 799                                                  phtml
 800                                                  space
 801                                                  customernamespace
 802                                                  pinc
 803                                                  pdict
 804                                                  pmess
 805                                                  slashseparatortouse
 806                                                  pserv
 807                                                  ppromess
 808                                                  serverfilesystem
 809                                                  pback.
 810               CLEAR isinglemessageclass[].
 811             ENDAT.
 812           ENDLOOP.
 813         ENDIF.
 814       WHEN rfunc.
 815         IF NOT ( ifunctions[] IS INITIAL ).
 816           PERFORM downloadfunctions USING ifunctions[]
 817                                           idictfilename[]
 818                                           itabletypefilename[]
 819                                           downloadfolder
 820                                           downloadfileextension
 821                                           space
 822                                           pfdoc
 823                                           phtml
 824                                           customernamespace
 825                                           pinc
 826                                           pdict
 827                                           textextension
 828                                           htmlextension
 829                                           psortt
 830                                           slashseparatortouse
 831                                           pserv
 832                                           ppromess
 833                                           serverfilesystem
 834                                           pback.
 835         ENDIF.
 836       WHEN rclass.
 837         IF NOT ( iclasses[] IS INITIAL ).
 838           PERFORM downloadclasses USING iclasses[]
 839                                         ifunctions[]
 840                                         idictfilename[]
 841                                         itabletypefilename[]
 842                                         downloadfolder
 843                                         downloadfileextension
 844                                         htmlextension
 845                                         textextension
 846                                         phtml
 847                                         customernamespace
 848                                         pinc
 849                                         pdict
 850                                         pcdoc
 851                                         psortt
 852                                         slashseparatortouse
 853                                         pserv
 854                                         ppromess
 855                                         serverfilesystem
 856                                         pback.
 857         ENDIF.
 858       WHEN rprog.
 859         IF NOT ( iprograms[] IS INITIAL ).
 860           PERFORM downloadprograms USING iprograms[]
 861                                          iprogfunctions[]
 862                                          idictfilename[]
 863                                          itabletypefilename[]
 864                                          downloadfolder
 865                                          downloadfileextension
 866                                          htmlextension
 867                                          textextension
 868                                          phtml
 869                                          customernamespace
 870                                          pinc
 871                                          pdict
 872                                          ''
 873                                          psortt
 874                                          slashseparatortouse
 875                                          pserv
 876                                          ppromess
 877                                          serverfilesystem
 878                                          pback.
 879         ENDIF.
 880       WHEN rxslt.
 881         IF NOT ( itransformations[] IS INITIAL ).
 882           PERFORM downloadxslt USING itransformations[]
 883                                      downloadfolder
 884                                      downloadfileextension
 885                                      htmlextension
 886                                      textextension
 887                                      phtml
 888                                      customernamespace
 889                                      slashseparatortouse
 890                                      pserv
 891                                      space
 892                                      ppromess
 893                                      serverfilesystem
 894                                      pback.
 895         ENDIF.
 896     ENDCASE.
 897     PERFORM freememory USING iprograms[]
 898                              ifunctions[]
 899                              iprogfunctions[]
 900                              idictionary[]
 901                              itabletypes[]
 902                              itransformations[].
 903     IF NOT prep IS INITIAL.
 904       GET TIME.
 905       runtime = sy-uzeit - starttime.
 906       CASE 'X'.
 907         WHEN rtable.
 908           PERFORM filltreenodetables USING idictionary[]
 909                                            itreedisplay[]
 910                                            runtime.
 911         WHEN rtabtype.
 912           PERFORM filltreenodetabletypes USING itabletypes[]
 913                                                itreedisplay[]
 914                                                runtime.
 915         WHEN rmess.
 916           PERFORM filltreenodemessages USING imessages[]
 917                                              itreedisplay[]
 918                                              runtime.
 919         WHEN rfunc.
 920           PERFORM filltreenodefunctions USING ifunctions[]
 921                                               itreedisplay[]
 922                                               runtime.
 923         WHEN rclass.
 924           PERFORM filltreenodeclasses USING iclasses[]
 925                                             ifunctions[]
 926                                             itreedisplay[]
 927                                             runtime.
 928         WHEN rprog.
 929           PERFORM filltreenodeprograms USING iprograms[]
 930                                              iprogfunctions[]
 931                                              itreedisplay[]
 932                                              runtime.
 933         WHEN rxslt.
 934           PERFORM filltreenodexslt USING itransformations[]
 935                                          itreedisplay[]
 936                                          runtime.
 937       ENDCASE.
 938       IF NOT ( itreedisplay[] IS INITIAL ).
 939         PERFORM displaytree USING itreedisplay[].
 940       ELSE.
 941         statusbarmessage = 'No items found matching selection criteria'.
 942         PERFORM displaystatus USING statusbarmessage 2.
 943       ENDIF.
 944     ENDIF.
 945   ENDIF.
 946   CLEAR iprograms[].
 947   CLEAR ifunctions[].
 948   CLEAR iclasses[].
 949   CLEAR iprogfunctions[].
 950   CLEAR imessages[].
 951   CLEAR idictionary[].
 952   CLEAR idictfilename[].
 953   CLEAR itabletypefilename[].
 954   CLEAR itransformations[].
 955   CLEAR itabletypes[].
 956   SET PARAMETER ID 'MAUTH' FIELD pauth.
 957   SET PARAMETER ID 'MMNAME' FIELD pmname.
 958   SET PARAMETER ID 'MNAMESPACE' FIELD pcname.
 959   SET PARAMETER ID 'MFOLDER' FIELD pfolder.
 960   SET PARAMETER ID 'MLOGICAL' FIELD plogical.
 961   SET PARAMETER ID 'MTEXT' FIELD ptext.
 962   SET PARAMETER ID 'MMESS' FIELD pmess.
 963   SET PARAMETER ID 'MINC' FIELD pinc.
 964   SET PARAMETER ID 'MRECI' FIELD preci.
 965   SET PARAMETER ID 'MFUNC' FIELD pfunc.
 966   SET PARAMETER ID 'MRECF' FIELD precf.
 967   SET PARAMETER ID 'MRECF' FIELD precc.
 968   SET PARAMETER ID 'MFDOC' FIELD pfdoc.
 969   SET PARAMETER ID 'MCDOC' FIELD pcdoc.
 970   SET PARAMETER ID 'MSCR' FIELD pscr.
 971   SET PARAMETER ID 'MDICT' FIELD pdict.
 972   SET PARAMETER ID 'MSORTT' FIELD psortt.
 973   SET PARAMETER ID 'MTTYP' FIELD pttyp.
 974   SET PARAMETER ID 'MXSLT' FIELD ptrans.
 975 FORM freememory USING ilocprograms LIKE iprograms[]
 976                       ilocfunctions LIKE ifunctions[]
 977                       ilocprogfunctions LIKE iprogfunctions[]
 978                       ilocdictionary LIKE idictionary[]
 979                       iloctabletypes LIKE itabletypes[]
 980                       iloctransformation LIKE itransformations[] .
 981   FIELD-SYMBOLS: <wafunction> LIKE LINE OF ilocfunctions.
 982   FIELD-SYMBOLS: <waprogram> LIKE LINE OF ilocprograms.
 983   FIELD-SYMBOLS: <wadictstruct> TYPE tdicttable.
 984   FIELD-SYMBOLS: <watabletypestruct> LIKE LINE OF iloctabletypes.
 985   FIELD-SYMBOLS: <watransformation> TYPE ttransformation.
 986   LOOP AT ilocfunctions ASSIGNING <wafunction>.
 987     LOOP AT <wafunction>-idictstruct ASSIGNING <wadictstruct>.
 988       FREE MEMORY ID <wadictstruct>-tablename.
 989     ENDLOOP.
 990   ENDLOOP.
 991   LOOP AT ilocprogfunctions ASSIGNING <wafunction>.
 992     LOOP AT <wafunction>-idictstruct ASSIGNING <wadictstruct>.
 993       FREE MEMORY ID <wadictstruct>-tablename.
 994     ENDLOOP.
 995   ENDLOOP.
 996   LOOP AT ilocprograms ASSIGNING <waprogram>.
 997     LOOP AT <waprogram>-idictstruct ASSIGNING <wadictstruct>.
 998       FREE MEMORY ID <wadictstruct>-tablename.
 999     ENDLOOP.
1000   ENDLOOP.
1001   LOOP AT ilocdictionary ASSIGNING <wadictstruct>.
1002     FREE MEMORY ID <wadictstruct>-tablename.
1003   ENDLOOP.
1004   LOOP AT iloctabletypes ASSIGNING <watabletypestruct>.
1005     FREE MEMORY ID <watabletypestruct>-typename.
1006   ENDLOOP.
1007   LOOP AT iloctransformation ASSIGNING <watransformation>.
1008     FREE MEMORY ID <watransformation>-xsltname.
1009   ENDLOOP.
1010 ENDFORM.
1011 FORM checkcomboboxes.
1012   IF pauth IS INITIAL.
1013     IF sopack[] IS INITIAL.
1014       CASE 'X'.
1015         WHEN rtable.
1016           IF sotable[] IS INITIAL.
1017             statusbarmessage = 'You must enter either a table name or author.'.
1018           ENDIF.
1019         WHEN rfunc.
1020           IF ( sofname[] IS INITIAL ) AND ( sofgroup[] IS INITIAL ).
1021             IF sofname[] IS INITIAL.
1022               statusbarmessage = 'You must enter either a function name or author.'.
1023             ELSE.
1024               IF sofgroup[] IS INITIAL.
1025                 statusbarmessage = 'You must enter either a function group, or an author name.'.
1026               ENDIF.
1027             ENDIF.
1028           ENDIF.
1029         WHEN rprog.
1030           IF soprog[] IS INITIAL.
1031             statusbarmessage = 'You must enter either a program name or author name.'.
1032           ENDIF.
1033       ENDCASE.
1034     ENDIF.
1035   ELSE.
1036     IF pauth = 'SAP*' OR pauth = 'SAP'.
1037       statusbarmessage = 'Sorry cannot download all objects for SAP standard user'.
1038     ENDIF.
1039   ENDIF.
1040   IF NOT statusbarmessage IS INITIAL.
1041     PERFORM displaystatus USING statusbarmessage 3.
1042     forcedexit = 1.
1043     STOP.
1044   ENDIF.
1045 ENDFORM.
1046 FORM fillselectionranges.
1047   DATA: strlength TYPE i.
1048   strlength = strlen( pcname ).
1049   IF NOT pauth IS INITIAL.
1050     soauthor-sign = 'I'.
1051     soauthor-option = 'EQ'.
1052     soauthor-low = pauth.
1053     APPEND soauthor.
1054   ENDIF.
1055   IF NOT sotable IS INITIAL.
1056     sotablenames[] = sotable[].
1057     IF NOT pcname IS INITIAL.
1058       LOOP AT sotablenames.
1059         IF sotablenames-low+0(strlength) <> pcname.
1060           CONCATENATE pcname sotablenames-low INTO sotablenames-low.
1061         ENDIF.
1062         IF sotablenames-high+0(strlength) <> pcname.
1063           CONCATENATE pcname sotablenames-high INTO sotablenames-high.
1064         ENDIF.
1065         MODIFY sotablenames.
1066       ENDLOOP.
1067     ENDIF.
1068   ENDIF.
1069   IF NOT sofname IS INITIAL.
1070     sofunctionname[] = sofname[].
1071     IF NOT pcname IS INITIAL.
1072       LOOP AT sofunctionname.
1073         IF sofunctionname-low+0(strlength) <> pcname.
1074           CONCATENATE pcname sofunctionname-low INTO sofunctionname-low.
1075         ENDIF.
1076         IF sofunctionname-high+0(strlength) <> pcname.
1077           CONCATENATE pcname sofunctionname-high INTO sofunctionname-high.
1078         ENDIF.
1079         MODIFY sofunctionname.
1080       ENDLOOP.
1081     ENDIF.
1082   ENDIF.
1083   IF NOT sotabtyp IS INITIAL.
1084     sotabletypenames[] = sotabtyp[].
1085     IF NOT pcname IS INITIAL.
1086       LOOP AT sotabletypenames.
1087         IF sotabletypenames-low+0(strlength) <> pcname.
1088           CONCATENATE pcname sotabletypenames-low INTO sotabletypenames-low.
1089         ENDIF.
1090         IF sotablenames-high+0(strlength) <> pcname.
1091           CONCATENATE pcname sotabletypenames-high INTO sotabletypenames-high.
1092         ENDIF.
1093         MODIFY sotabletypenames.
1094       ENDLOOP.
1095     ENDIF.
1096   ENDIF.
1097   IF NOT sofgroup IS INITIAL.
1098     sofunctiongroup[] = sofgroup[].
1099     IF NOT pcname IS INITIAL.
1100       LOOP AT sofunctionname.
1101         IF sofunctiongroup-low+0(strlength) <> pcname.
1102           CONCATENATE pcname sofunctiongroup-low INTO sofunctiongroup-low.
1103         ENDIF.
1104         IF sofunctiongroup-high+0(strlength) <> pcname.
1105           CONCATENATE pcname sofunctiongroup-high INTO sofunctiongroup-high.
1106         ENDIF.
1107         MODIFY sofunctiongroup.
1108       ENDLOOP.
1109     ENDIF.
1110   ENDIF.
1111   IF NOT soclass IS INITIAL.
1112     soclassname[] = soclass[].
1113     IF NOT pcname IS INITIAL.
1114       LOOP AT soclassname.
1115         IF soclassname-low+0(strlength) <> pcname.
1116           CONCATENATE pcname soclassname-low INTO soclassname-low.
1117         ENDIF.
1118         IF soclassname-high+0(strlength) <> pcname.
1119           CONCATENATE pcname soclassname-high INTO soclassname-high.
1120         ENDIF.
1121         MODIFY soclassname.
1122       ENDLOOP.
1123     ENDIF.
1124   ENDIF.
1125   IF NOT soprog IS INITIAL.
1126     soprogramname[] = soprog[].
1127     IF NOT pcname IS INITIAL.
1128       LOOP AT soprogramname.
1129         IF soprogramname-low+0(strlength) <> pcname.
1130           CONCATENATE pcname soprogramname-low INTO soprogramname-low.
1131         ENDIF.
1132         IF soprogramname-high+0(strlength) <> pcname.
1133           CONCATENATE pcname soprogramname-high INTO soprogramname-high.
1134         ENDIF.
1135         MODIFY soprogramname.
1136       ENDLOOP.
1137     ENDIF.
1138   ENDIF.
1139   IF NOT soxslt IS INITIAL.
1140     soxsltname[] = soxslt[].
1141     IF NOT pcname IS INITIAL.
1142       LOOP AT soxsltname.
1143         IF soxsltname-low+0(strlength) <> pcname.
1144           CONCATENATE pcname soxsltname-low INTO soxsltname-low.
1145         ENDIF.
1146         IF soxsltname-high+0(strlength) <> pcname.
1147           CONCATENATE pcname soxsltname-high INTO soxsltname-high.
1148         ENDIF.
1149         MODIFY soxsltname.
1150       ENDLOOP.
1151     ENDIF.
1152   ENDIF.
1153 ENDFORM.
1154 FORM retrievetables USING ilocdictstructure LIKE idictionary[]
1155                           sotable LIKE sotable[]
1156                           soauthor LIKE soauthor[]
1157                           VALUE(solocpackage) LIKE sopack[].
1158   DATA: idictstructure TYPE STANDARD TABLE OF tdicttable.
1159   DATA: wadictstructure TYPE tdicttable.
1160   SELECT a~tabname AS tablename
1161          INTO CORRESPONDING FIELDS OF TABLE idictstructure
1162          FROM dd02l AS a
1163          INNER JOIN tadir AS b
1164            ON a~tabname = b~obj_name
1165          WHERE a~tabname IN sotable
1166            AND a~tabclass <> 'CLUSTER'
1167            AND a~tabclass <> 'POOL'
1168            AND a~tabclass <> 'VIEW'
1169            AND a~as4user IN soauthor
1170            AND a~as4local = 'A'
1171            AND b~pgmid = 'R3TR'
1172            AND b~object = 'TABL'
1173            AND b~devclass IN solocpackage[].
1174   LOOP AT idictstructure INTO wadictstructure.
1175     PERFORM findtabledescription USING wadictstructure-tablename
1176                                        wadictstructure-tabletitle.
1177     PERFORM findtabledefinition USING wadictstructure-tablename
1178                                       wadictstructure-istructure[].
1179     APPEND wadictstructure TO ilocdictstructure.
1180     CLEAR wadictstructure.
1181   ENDLOOP.
1182 ENDFORM.
1183 FORM retrievetabletypes  USING iloctabletypes      LIKE itabletypes[]
1184                                sotabletypenames    LIKE sotable[]
1185                                soauthor            LIKE soauthor[]
1186                                VALUE(solocpackage) LIKE sopack[].
1187   SELECT *
1188          INTO CORRESPONDING FIELDS OF TABLE iloctabletypes
1189          FROM dd40l AS a
1190          INNER JOIN dd40t AS t
1191             ON a~typename = t~typename
1192          INNER JOIN tadir AS b
1193            ON a~typename = b~obj_name
1194          WHERE a~typename IN sotabletypenames
1195            AND t~ddlanguage EQ sy-langu
1196            AND a~as4user IN soauthor
1197            AND a~as4local = 'A'
1198            AND b~pgmid = 'R3TR'
1199            AND b~object = 'TTYP'
1200            AND b~devclass IN solocpackage[].
1201 ENDFORM.
1202 FORM retrievexslt USING iloctransformations LIKE itransformations[]
1203                         rangexslt   LIKE soxsltname[]
1204                         rangeauthor LIKE soauthor[]
1205                         VALUE(custnamerange)
1206                         VALUE(alsomodifiedbyauthor)
1207                         VALUE(customerprogsonly)
1208                         VALUE(solocpackage) LIKE sopack[].
1209   DATA: warangexslt LIKE LINE OF rangexslt.
1210   IF rangexslt[] IS INITIAL.
1211     PERFORM findallxsltforauthor USING iloctransformations[]
1212                                        rangexslt[]
1213                                        rangeauthor[]
1214                                        custnamerange
1215                                        alsomodifiedbyauthor
1216                                        customerprogsonly
1217                                        solocpackage[].
1218   ELSE.
1219     READ TABLE rangexslt INDEX 1 INTO warangexslt.
1220     IF warangexslt-low CS asterix.
1221       PERFORM findxsltbywildcard USING iloctransformations[]
1222                                        rangexslt[]
1223                                        rangeauthor[]
1224                                        custnamerange
1225                                        customerprogsonly
1226                                        solocpackage[].
1227     ELSE.
1228       PERFORM checkxsltdoesexist USING iloctransformations[]
1229                                        rangexslt[].
1230     ENDIF.
1231   ENDIF.
1232 ENDFORM.
1233 FORM findtabledescription USING VALUE(tablename)
1234                                       tabledescription.
1235   SELECT SINGLE ddtext
1236                 FROM dd02t
1237                 INTO tabledescription
1238                 WHERE tabname = tablename
1239                  AND ddlanguage = pmlang.
1240 ENDFORM.
1241 FORM findtabledefinition USING VALUE(tablename)
1242                                idictstruct LIKE dumidictstructure[].
1243   DATA gotstate LIKE dcobjif-gotstate.
1244   DATA: definition TYPE STANDARD TABLE OF dd03p WITH HEADER LINE.
1245   DATA: idomaindataa TYPE STANDARD TABLE OF dd07v WITH HEADER LINE.
1246   DATA: idomaindatan TYPE STANDARD TABLE OF dd07v WITH HEADER LINE.
1247   DATA: wadictstruct TYPE tdicttablestructure.
1248   DATA: wadomainstruct TYPE tdomainstructure.
1249   DATA: wadd02v_n TYPE dd02v.
1250   CLEAR idictstruct[].
1251   CALL FUNCTION 'DD_INT_TABL_GET'
1252     EXPORTING
1253       tabname        = tablename
1254       langu          = pmlang
1255     IMPORTING
1256       gotstate       = gotstate
1257       dd02v_n        = wadd02v_n
1258     TABLES
1259       dd03p_n        = definition
1260     EXCEPTIONS
1261       internal_error = 1.
1262   IF sy-subrc = 0 AND NOT wadd02v_n IS INITIAL.
1263     CALL FUNCTION 'DD_TABL_EXPAND'
1264       EXPORTING
1265         dd02v_wa          = wadd02v_n
1266         mode              = 46
1267         prid              = 0
1268       TABLES
1269         dd03p_tab         = definition
1270       EXCEPTIONS
1271         illegal_parameter = 1.
1272   ENDIF.
1273   IF sy-subrc = 0 AND gotstate = 'A'.
1274     LOOP AT definition.
1275       MOVE-CORRESPONDING definition TO wadictstruct.
1276       PERFORM removeleadingzeros CHANGING wadictstruct-position.
1277       PERFORM removeleadingzeros CHANGING wadictstruct-leng.
1278       CALL FUNCTION 'DD_DOMA_GET'
1279         EXPORTING
1280           domain_name   = definition-domname
1281           get_state     = 'M  '
1282           langu         = pmlang
1283           withtext      = 'X'
1284         TABLES
1285           dd07v_tab_a   = idomaindataa
1286           dd07v_tab_n   = idomaindatan
1287         EXCEPTIONS
1288           illegal_value = 1
1289           op_failure    = 2.
1290       LOOP AT idomaindataa.
1291         MOVE-CORRESPONDING idomaindataa TO wadomainstruct.
1292         APPEND wadomainstruct TO wadictstruct-idomains.
1293       ENDLOOP.
1294       CLEAR idomaindataa[].
1295       APPEND wadictstruct TO idictstruct.
1296     ENDLOOP.
1297   ENDIF.
1298 ENDFORM.
1299 FORM retrievemessageclass USING ilocmessages LIKE imessages[]
1300                                 rangeauthor LIKE soauthor[]
1301                                 VALUE(messageclassname)
1302                                 VALUE(messageclasslang)
1303                                 VALUE(modifiedby)
1304                                 VALUE(solocpackage) LIKE sopack[].
1305   DATA: wamessage TYPE tmessage.
1306   DATA: imclasses TYPE STANDARD TABLE OF arbgb.
1307   IF NOT messageclassname IS INITIAL.
1308     IF NOT solocpackage[] IS INITIAL.
1309       SELECT obj_name AS arbgb
1310              INTO TABLE imclasses
1311              FROM tadir
1312              WHERE pgmid = 'R3TR'
1313                AND object = 'MSAG'
1314                AND devclass IN solocpackage.
1315     ENDIF.
1316     REPLACE '*' WITH '%' INTO messageclassname.
1317     IF imclasses[] IS INITIAL.
1318       SELECT t100~arbgb
1319              t100~text
1320              t100~msgnr
1321              t100a~stext
1322              APPENDING CORRESPONDING FIELDS OF TABLE ilocmessages
1323              FROM t100
1324              INNER JOIN t100a
1325                ON t100a~arbgb = t100~arbgb
1326              WHERE t100a~masterlang = messageclasslang
1327                AND t100~sprsl = messageclasslang
1328                AND t100~arbgb LIKE messageclassname
1329                AND t100a~respuser IN rangeauthor[].
1330     ELSE.
1331       SELECT t100~arbgb
1332              t100~text
1333              t100~msgnr
1334              t100a~stext
1335              APPENDING CORRESPONDING FIELDS OF TABLE ilocmessages
1336              FROM t100
1337              INNER JOIN t100a
1338                ON t100a~arbgb = t100~arbgb
1339              FOR ALL ENTRIES IN imclasses
1340                WHERE t100~sprsl = messageclasslang
1341                AND ( t100~arbgb LIKE messageclassname AND t100~arbgb = imclasses-table_line )
1342                AND t100a~masterlang = messageclasslang
1343                AND t100a~respuser IN rangeauthor[].
1344     ENDIF.
1345   ELSE.
1346     IF modifiedby IS INITIAL.
1347       SELECT t100~arbgb
1348              t100~msgnr
1349              t100~text
1350              t100a~stext
1351              APPENDING CORRESPONDING FIELDS OF TABLE ilocmessages
1352              FROM t100
1353              INNER JOIN t100a
1354                ON t100a~arbgb = t100~arbgb
1355              INNER JOIN tadir
1356                ON t100~arbgb = tadir~obj_name
1357              WHERE t100a~masterlang = messageclasslang
1358                AND t100a~respuser IN rangeauthor[]
1359                AND tadir~pgmid = 'R3TR'
1360                AND tadir~object = 'MSAG'
1361                AND tadir~devclass IN solocpackage[].
1362     ELSE.
1363       SELECT t100~arbgb
1364              t100~msgnr
1365              t100~text
1366              t100a~stext
1367              APPENDING CORRESPONDING FIELDS OF TABLE ilocmessages
1368              FROM t100
1369              INNER JOIN t100a
1370                ON t100a~arbgb = t100~arbgb
1371              INNER JOIN tadir
1372                ON t100~arbgb = tadir~obj_name
1373              WHERE t100a~masterlang = messageclasslang
1374                AND t100a~respuser IN rangeauthor[]
1375                AND t100a~lastuser IN rangeauthor[]
1376                AND tadir~pgmid = 'R3TR'
1377                AND tadir~object = 'MSAG'
1378                AND tadir~devclass IN solocpackage[].
1379     ENDIF.
1380   ENDIF.
1381 ENDFORM.
1382 FORM retrievefunctions USING sofname LIKE sofunctionname[]
1383                              sofgroup LIKE sofunctiongroup[]
1384                              ilocfunctionnames LIKE ifunctions[]
1385                              VALUE(solocauthor) LIKE soauthor[]
1386                              VALUE(gettextelements)
1387                              VALUE(getscreens)
1388                              VALUE(customeronly)
1389                              VALUE(customernamerange)
1390                              VALUE(solocpackage) LIKE sopack[].
1391   DATA: wafunctionname TYPE tfunction.
1392   DATA: nogroupsfound TYPE abap_bool VALUE true.
1393   DATA: previousfg TYPE v_fdir-area.
1394   SELECT a~funcname AS functionname
1395          a~area AS functiongroup
1396          INTO CORRESPONDING FIELDS OF TABLE ilocfunctionnames
1397          FROM v_fdir AS a
1398          INNER JOIN tlibv AS b
1399            ON a~area = b~area
1400          INNER JOIN tadir AS c
1401            ON a~area = c~obj_name
1402          WHERE a~funcname IN sofname[]
1403            AND a~area IN sofgroup[]
1404            AND a~generated = ''
1405            AND b~uname IN solocauthor[]
1406            AND pgmid = 'R3TR'
1407            AND object = 'FUGR'
1408            AND devclass IN solocpackage[]
1409            ORDER BY a~area.
1410   LOOP AT ilocfunctionnames INTO wafunctionname.
1411     PERFORM retrievefunctiondetail USING wafunctionname-functionname
1412                                          wafunctionname-progname
1413                                          wafunctionname-includenumber
1414                                          wafunctionname-functiontitle.
1415     PERFORM findmainfunctioninclude USING wafunctionname-progname
1416                                           wafunctionname-functiongroup
1417                                           wafunctionname-includenumber
1418                                           wafunctionname-functionmaininclude.
1419     PERFORM findfunctiontopinclude USING wafunctionname-progname
1420                                          wafunctionname-functiongroup
1421                                          wafunctionname-topincludename.
1422     PERFORM scanforfunctionincludes USING wafunctionname-progname
1423                                           customeronly
1424                                           customernamerange
1425                                           wafunctionname-iincludes[].
1426     PERFORM findmainmessageclass USING wafunctionname-progname
1427                                        wafunctionname-messageclass.
1428     IF NOT getscreens IS INITIAL.
1429       IF previousfg IS INITIAL OR previousfg <> wafunctionname-functiongroup.
1430         PERFORM findfunctionscreenflow USING wafunctionname.
1431         PERFORM retrieveguititles USING wafunctionname-iguititle[]
1432                                       wafunctionname-progname.
1433       ENDIF.
1434     ENDIF.
1435     IF NOT gettextelements IS INITIAL.
1436       PERFORM retrieveprogramtexts USING wafunctionname-iselectiontexts[]
1437                                          wafunctionname-itextelements[]
1438                                          wafunctionname-progname.
1439     ENDIF.
1440     previousfg = wafunctionname-functiongroup.
1441     MODIFY ilocfunctionnames FROM wafunctionname.
1442   ENDLOOP.
1443 ENDFORM.
1444 FORM retrievefunctiondetail USING VALUE(functionname)
1445                                         progname
1446                                         includename
1447                                         titletext.
1448   SELECT SINGLE pname
1449                 include
1450                 FROM tfdir
1451                 INTO (progname, includename)
1452                 WHERE funcname = functionname.
1453   IF sy-subrc = 0.
1454     SELECT SINGLE stext
1455                   FROM tftit
1456                   INTO titletext
1457                   WHERE spras = pmlang
1458                     AND funcname = functionname.
1459   ENDIF.
1460 ENDFORM.
1461 FORM scanforadditionalfuncstuff USING ilocfunctions LIKE ifunctions[]
1462                                       VALUE(recursiveincludes)
1463                                       VALUE(recursivefunctions)
1464                                       VALUE(searchforincludes)
1465                                       VALUE(searchforfunctions)
1466                                       VALUE(searchfordictionary)
1467                                       VALUE(searchformessages)
1468                                       VALUE(searchfortransformations)
1469                                       VALUE(customeronly)
1470                                       VALUE(customernamerange).
1471   DATA: wafunction TYPE tfunction.
1472   DATA: wainclude TYPE tinclude.
1473   LOOP AT ilocfunctions INTO wafunction.
1474     IF NOT searchforincludes IS INITIAL.
1475       PERFORM scanforincludeprograms USING wafunction-progname
1476                                            recursiveincludes
1477                                            customeronly
1478                                            customernamerange
1479                                            wafunction-iincludes[].
1480       PERFORM scanforincludeprograms USING wafunction-functionmaininclude
1481                                            recursiveincludes
1482                                            customeronly
1483                                            customernamerange
1484                                            wafunction-iincludes[].
1485       PERFORM scanforincludeprograms USING wafunction-topincludename
1486                                            recursiveincludes
1487                                            customeronly
1488                                            customernamerange
1489                                            wafunction-iincludes[].
1490     ENDIF.
1491     IF NOT searchforfunctions IS INITIAL.
1492       PERFORM scanforfunctions USING wafunction-functionmaininclude
1493                                      wafunction-programlinkname
1494                                      recursiveincludes
1495                                      recursivefunctions
1496                                      customeronly
1497                                      customernamerange
1498                                      ilocfunctions[].
1499     ENDIF.
1500     MODIFY ilocfunctions FROM wafunction.
1501   ENDLOOP.
1502   LOOP AT ilocfunctions INTO wafunction.
1503     IF NOT searchfordictionary IS INITIAL.
1504       PERFORM scanfortables USING wafunction-progname
1505                                   customeronly
1506                                   customernamerange
1507                                   wafunction-idictstruct[].
1508       PERFORM scanforlikeortype USING wafunction-progname
1509                                       customeronly
1510                                       customernamerange
1511                                       wafunction-idictstruct[]
1512                                       wafunction-itabletypes[].
1513       PERFORM scanfortables USING wafunction-functionmaininclude
1514                                   customeronly
1515                                   customernamerange
1516                                   wafunction-idictstruct[].
1517       PERFORM scanforlikeortype USING wafunction-functionmaininclude
1518                                       customeronly
1519                                       customernamerange
1520                                       wafunction-idictstruct[]
1521                                       wafunction-itabletypes[].
1522       LOOP AT wafunction-iincludes INTO wainclude.
1523         PERFORM scanfortables USING wainclude-includename
1524                                     customeronly
1525                                     customernamerange
1526                                     wafunction-idictstruct[].
1527         PERFORM scanforlikeortype USING wainclude-includename
1528                                         customeronly
1529                                         customernamerange
1530                                         wafunction-idictstruct[]
1531                                         wafunction-itabletypes[].
1532       ENDLOOP.
1533       MODIFY ilocfunctions FROM wafunction.
1534     ENDIF.
1535     IF NOT searchformessages IS INITIAL.
1536       PERFORM scanformessages USING wafunction-progname
1537                                     wafunction-messageclass
1538                                     wafunction-imessages[].
1539       MODIFY ilocfunctions FROM wafunction.
1540     ENDIF.
1541     IF NOT searchfortransformations IS INITIAL.
1542       PERFORM scanfortransformations USING wafunction-progname
1543                                            customeronly
1544                                            customernamerange
1545                                            wafunction-itransformations[].
1546     ENDIF.
1547   ENDLOOP.
1548 ENDFORM.
1549 FORM scanforclasses USING VALUE(classname)
1550                           VALUE(classlinkname)
1551                           VALUE(customeronly)
1552                           VALUE(customernamerange)
1553                                 ilocclasses LIKE iclasses[]
1554                           VALUE(solocpackage) LIKE sopack[].
1555   DATA ilines TYPE STANDARD TABLE OF string WITH HEADER LINE.
1556   DATA: head TYPE string.
1557   DATA: tail TYPE string.
1558   DATA: linelength TYPE i VALUE 0.
1559   DATA: waline TYPE string.
1560   DATA: waclass TYPE tclass.
1561   DATA: wasearchclass TYPE tclass.
1562   DATA: castclassname TYPE program.
1563   DATA: exceptioncustomernamerange TYPE string.
1564   CONCATENATE customernamerange 'CX_' INTO  exceptioncustomernamerange.
1565   castclassname = classname.
1566   READ REPORT castclassname INTO ilines.
1567   LOOP AT ilines INTO waline.
1568     linelength = strlen( waline ).
1569     IF linelength > 0.
1570       IF waline(1) = asterix.
1571         CONTINUE.
1572       ENDIF.
1573       TRANSLATE waline TO UPPER CASE.
1574       FIND typerefto IN waline IGNORING CASE.
1575       IF sy-subrc = 0.
1576         SPLIT waline AT type INTO head tail.
1577         SHIFT tail LEFT DELETING LEADING space.
1578         SPLIT tail AT 'REF' INTO head tail.
1579         SHIFT tail LEFT DELETING LEADING space.
1580         SPLIT tail AT 'TO' INTO head tail.
1581         SHIFT tail LEFT DELETING LEADING space.
1582         IF tail CS period.
1583           SPLIT tail AT period INTO head tail.
1584         ELSE.
1585           IF tail CS comma.
1586             SPLIT tail AT comma INTO head tail.
1587           ENDIF.
1588         ENDIF.
1589       ELSE.
1590         FIND '=>' IN waline MATCH OFFSET sy-fdpos.
1591         IF sy-subrc = 0.
1592           head = waline+0(sy-fdpos).
1593           SHIFT head LEFT DELETING LEADING space.
1594           CONDENSE head.
1595           FIND 'call method' IN head IGNORING CASE.
1596           IF sy-subrc = 0.
1597             SHIFT head LEFT DELETING LEADING space.
1598             SPLIT head AT space INTO head tail.
1599             SPLIT tail AT space INTO head tail.
1600             head = tail.
1601           ELSE.
1602             IF waline CS '='.
1603               SPLIT waline AT '=' INTO tail head.
1604               SHIFT head LEFT DELETING LEADING space.
1605               SPLIT head AT '=' INTO head tail.
1606             ENDIF.
1607             sy-subrc = 0.
1608           ENDIF.
1609         ENDIF.
1610       ENDIF.
1611       IF sy-subrc = 0.
1612         TRY.
1613             IF head+0(1) = 'Y' OR head+0(1) = 'Z' OR head CS customernamerange.
1614               READ TABLE ilocclasses INTO wasearchclass WITH KEY clsname = head.
1615               IF sy-subrc <> 0.
1616                 IF head+0(3) = 'CX_'
1617                    OR head+0(4) = 'ZCX_'
1618                    OR head+0(4) = 'YCX_'
1619                    OR head CS exceptioncustomernamerange.
1620                   waclass-exceptionclass = true.
1621                 ENDIF.
1622                 waclass-clsname = head.
1623                 IF NOT solocpackage[] IS INITIAL.
1624                   SELECT SINGLE obj_name
1625                          FROM tadir
1626                          INTO waclass-clsname
1627                          WHERE pgmid = 'R3TR'
1628                            AND object = 'CLAS'
1629                            AND obj_name = waclass-clsname
1630                            AND devclass IN solocpackage[].
1631                   IF sy-subrc = 0.
1632                     APPEND waclass TO ilocclasses.
1633                   ENDIF.
1634                 ELSE.
1635                   APPEND waclass TO ilocclasses.
1636                 ENDIF.
1637               ENDIF.
1638             ENDIF.
1639           CATCH cx_sy_range_out_of_bounds.
1640         ENDTRY.
1641       ENDIF.
1642     ENDIF.
1643   ENDLOOP.
1644 ENDFORM.
1645 FORM scanforincludeprograms USING VALUE(programname)
1646                                   VALUE(recursiveincludes)
1647                                   VALUE(customeronly)
1648                                   VALUE(customernamerange)
1649                                         ilocincludes LIKE dumiincludes[].
1650   DATA: iincludelines TYPE STANDARD TABLE OF string WITH HEADER LINE.
1651   DATA: itokens TYPE STANDARD TABLE OF stokes WITH HEADER LINE.
1652   DATA: ikeywords TYPE STANDARD TABLE OF text20 WITH HEADER LINE.
1653   DATA: istatements TYPE STANDARD TABLE OF sstmnt WITH HEADER LINE.
1654   DATA: watokens TYPE stokes.
1655   DATA: wainclude TYPE tinclude.
1656   DATA: waincludeexists TYPE tinclude.
1657   DATA: maxlines TYPE i.
1658   DATA: nextline TYPE i.
1659   DATA: castprogramname TYPE program.
1660   castprogramname = programname.
1661   READ REPORT castprogramname INTO iincludelines.
1662   APPEND include TO ikeywords.
1663   SCAN ABAP-SOURCE iincludelines TOKENS INTO itokens WITH INCLUDES STATEMENTS INTO istatements KEYWORDS FROM ikeywords.
1664   CLEAR iincludelines[].
1665   maxlines = lines( itokens ).
1666   LOOP AT itokens WHERE str = include AND type = 'I'.
1667     nextline = sy-tabix + 1.
1668     IF nextline <= maxlines.
1669       READ TABLE itokens INDEX nextline INTO watokens.
1670       IF NOT customeronly IS INITIAL.
1671         TRY.
1672             IF watokens-str+0(1) = 'Y' OR watokens-str+0(1) = 'Z' OR watokens-str CS customernamerange
1673                OR watokens-str+0(2) = 'MZ' OR watokens-str+0(2) = 'MY'.
1674             ELSE.
1675               CONTINUE.
1676             ENDIF.
1677           CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
1678         ENDTRY.
1679       ENDIF.
1680       wainclude-includename = watokens-str.
1681       PERFORM findprogramorincludetitle USING wainclude-includename
1682                                               wainclude-includetitle.
1683       READ TABLE ilocincludes INTO waincludeexists WITH KEY includename = wainclude-includename.
1684       IF sy-subrc <> 0.
1685         APPEND wainclude TO ilocincludes.
1686         IF NOT recursiveincludes IS INITIAL.
1687           PERFORM scanforincludeprograms USING wainclude-includename
1688                                                recursiveincludes
1689                                                customeronly
1690                                                customernamerange
1691                                                ilocincludes[].
1692         ENDIF.
1693       ENDIF.
1694     ENDIF.
1695   ENDLOOP.
1696 ENDFORM.
1697 FORM scanfortransformations USING VALUE(programname)
1698                                   VALUE(customeronly)
1699                                   VALUE(customernamerange)
1700                                         iloctransformation LIKE itransformations[].
1701   DATA: iincludelines TYPE STANDARD TABLE OF string WITH HEADER LINE.
1702   DATA: itokens TYPE STANDARD TABLE OF stokes WITH HEADER LINE.
1703   DATA: ikeywords TYPE STANDARD TABLE OF text20 WITH HEADER LINE.
1704   DATA: istatements TYPE STANDARD TABLE OF sstmnt WITH HEADER LINE.
1705   DATA: watokens TYPE stokes.
1706   DATA: watransformation TYPE ttransformation.
1707   DATA: watransformationexists TYPE ttransformation.
1708   DATA: maxlines TYPE i.
1709   DATA: nextline TYPE i.
1710   DATA: castprogramname TYPE program.
1711   castprogramname = programname.
1712   READ REPORT castprogramname INTO iincludelines.
1713   APPEND 'CALL' TO ikeywords.
1714   SCAN ABAP-SOURCE iincludelines TOKENS INTO itokens WITH INCLUDES STATEMENTS INTO istatements KEYWORDS FROM ikeywords.
1715   CLEAR iincludelines[].
1716   maxlines = lines( itokens ).
1717   LOOP AT itokens WHERE str = transformation AND type = 'I'.
1718     nextline = sy-tabix + 1.
1719     IF nextline <= maxlines.
1720       READ TABLE itokens INDEX nextline INTO watokens.
1721       IF NOT customeronly IS INITIAL.
1722         TRY.
1723             IF watokens-str+0(1) = 'Y' OR watokens-str+0(1) = 'Z' OR watokens-str CS customernamerange.
1724             ELSE.
1725               CONTINUE.
1726             ENDIF.
1727           CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
1728         ENDTRY.
1729       ENDIF.
1730       watransformation-xsltname = watokens-str.
1731       READ TABLE iloctransformation INTO watransformationexists WITH KEY xsltname = watransformation-xsltname.
1732       IF sy-subrc <> 0.
1733         APPEND watransformation TO iloctransformation.
1734         PERFORM scanfortransincludes USING watransformation-xsltname
1735                                            customeronly
1736                                            customernamerange
1737                                            iloctransformation[].
1738       ENDIF.
1739     ENDIF.
1740   ENDLOOP.
1741 ENDFORM.
1742 FORM scanfortransincludes USING VALUE(xsltname)
1743                                 VALUE(customeronly)
1744                                 VALUE(customernamerange)
1745                                       iloctransformations LIKE itransformations[].
1746   DATA: ixsltsource TYPE o2pageline_table.
1747   DATA: waxsltattributes TYPE o2xsltattr.
1748   DATA: waxsltsource LIKE LINE OF ixsltsource.
1749   DATA: dummy TYPE string.
1750   DATA: watransformationexists TYPE ttransformation.
1751   DATA: watransformation TYPE ttransformation.
1752   cl_o2_api_xsltdesc=>load( EXPORTING p_xslt_desc = xsltname
1753                            IMPORTING p_source = ixsltsource
1754                                      p_attributes = waxsltattributes
1755                            EXCEPTIONS not_existing = 1
1756                                       permission_failure = 2
1757                                       error_occured = 3
1758                                       version_not_found = 4 ).
1759   LOOP AT ixsltsource INTO waxsltsource.
1760     IF waxsltsource-line CS '<xsl:include'.
1761       SPLIT waxsltsource-line AT '"' INTO dummy waxsltsource-line.
1762       SPLIT waxsltsource-line AT '"' INTO waxsltsource dummy.
1763       IF NOT customeronly IS INITIAL.
1764         TRY.
1765             IF waxsltsource-line+0(1) = 'Y' OR waxsltsource-line+0(1) = 'Z' OR waxsltsource-line CS customernamerange.
1766             ELSE.
1767               CONTINUE.
1768             ENDIF.
1769           CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
1770         ENDTRY.
1771       ENDIF.
1772       READ TABLE iloctransformations INTO watransformationexists WITH KEY xsltname = waxsltsource-line.
1773       IF sy-subrc <> 0.
1774         watransformation-xsltname = waxsltsource-line.
1775         APPEND watransformation TO iloctransformations.
1776         PERFORM scanfortransincludes USING watransformation-xsltname
1777                                            customeronly
1778                                            customernamerange
1779                                            iloctransformations[].
1780       ENDIF.
1781     ENDIF.
1782   ENDLOOP.
1783 ENDFORM.
1784 FORM scanforfunctions USING VALUE(programname)
1785                             VALUE(programlinkname)
1786                             VALUE(recursiveincludes)
1787                             VALUE(recursivefunctions)
1788                             VALUE(customeronly)
1789                             VALUE(customernamerange)
1790                                   ilocfunctions LIKE ifunctions[].
1791   DATA: iincludelines TYPE STANDARD TABLE OF string WITH HEADER LINE.
1792   DATA: itokens TYPE STANDARD TABLE OF stokes WITH HEADER LINE.
1793   DATA: istatements TYPE STANDARD TABLE OF sstmnt WITH HEADER LINE.
1794   DATA: watokens TYPE stokes.
1795   DATA: wafunction TYPE tfunction.
1796   DATA: wafunctioncomparison TYPE tfunction.
1797   DATA: maxlines TYPE i.
1798   DATA: nextline TYPE i.
1799   DATA: castprogramname TYPE program.
1800   DATA: skipthisloop TYPE abap_bool.
1801   castprogramname = programname.
1802   READ REPORT castprogramname INTO iincludelines.
1803   SCAN ABAP-SOURCE iincludelines TOKENS INTO itokens WITH INCLUDES STATEMENTS INTO istatements.
1804   CLEAR iincludelines[].
1805   maxlines = lines( itokens ).
1806   LOOP AT itokens WHERE str = function AND type = 'I'.
1807     nextline = sy-tabix + 1.
1808     IF nextline <= maxlines.
1809       READ TABLE itokens INDEX nextline INTO watokens.
1810       skipthisloop = false.
1811       IF NOT customeronly IS INITIAL.
1812         TRY.
1813             IF watokens-str+1(1) = 'Y' OR watokens-str+1(1) = 'Z' OR watokens-str CS customernamerange.
1814             ELSE.
1815               skipthisloop = true.
1816             ENDIF.
1817           CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
1818           CLEANUP.
1819             skipthisloop = true.
1820         ENDTRY.
1821       ENDIF.
1822       IF skipthisloop = false.
1823         wafunction-functionname = watokens-str.
1824         REPLACE ALL OCCURRENCES OF '''' IN wafunction-functionname WITH ' '.
1825         CONDENSE wafunction-functionname.
1826         READ TABLE ilocfunctions WITH KEY functionname = wafunction-functionname INTO wafunctioncomparison.
1827         IF sy-subrc <> 0.
1828           wafunction-programlinkname = programlinkname.
1829           nextline = sy-tabix + 2.
1830           READ TABLE itokens INDEX nextline INTO watokens.
1831           IF watokens-str <> destination.
1832             SELECT SINGLE area FROM v_fdir INTO wafunction-functiongroup WHERE funcname = wafunction-functionname.
1833             IF sy-subrc = 0.
1834               PERFORM retrievefunctiondetail USING wafunction-functionname
1835                                                    wafunction-progname
1836                                                    wafunction-includenumber
1837                                                    wafunction-functiontitle.
1838               PERFORM findmainfunctioninclude USING wafunction-progname
1839                                                     wafunction-functiongroup
1840                                                     wafunction-includenumber
1841                                                     wafunction-functionmaininclude.
1842               PERFORM findfunctiontopinclude USING wafunction-progname
1843                                                    wafunction-functiongroup
1844                                                    wafunction-topincludename.
1845               PERFORM findmainmessageclass USING wafunction-progname
1846                                                  wafunction-messageclass.
1847               APPEND wafunction TO ilocfunctions.
1848               IF NOT recursiveincludes IS INITIAL.
1849                 PERFORM scanforincludeprograms USING wafunction-functionmaininclude
1850                                                      recursiveincludes
1851                                                      customeronly
1852                                                      customernamerange
1853                                                      wafunction-iincludes[].
1854               ENDIF.
1855               IF NOT recursivefunctions IS INITIAL.
1856                 PERFORM scanforfunctions USING wafunction-functionmaininclude
1857                                                space
1858                                                recursiveincludes
1859                                                recursivefunctions
1860                                                customeronly
1861                                                customernamerange
1862                                                ilocfunctions[].
1863               ENDIF.
1864               CLEAR wafunction.
1865             ENDIF.
1866           ENDIF.
1867         ENDIF.
1868         CLEAR wafunction.
1869       ENDIF.
1870     ENDIF.
1871   ENDLOOP.
1872 ENDFORM.
1873 FORM scanforfunctionincludes USING poolname
1874                                    VALUE(customeronly)
1875                                    VALUE(customernamerange)
1876                                    ilocincludes LIKE dumiincludes[].
1877   DATA: iincludelines TYPE STANDARD TABLE OF string WITH HEADER LINE.
1878   DATA: itokens TYPE STANDARD TABLE OF stokes WITH HEADER LINE.
1879   DATA: ikeywords TYPE STANDARD TABLE OF text20 WITH HEADER LINE.
1880   DATA: istatements TYPE STANDARD TABLE OF sstmnt WITH HEADER LINE.
1881   DATA: watokens TYPE stokes.
1882   DATA: wainclude TYPE tinclude.
1883   DATA: waincludeexists TYPE tinclude.
1884   DATA: maxlines TYPE i.
1885   DATA: nextline TYPE i.
1886   DATA: castprogramname TYPE program.
1887   castprogramname = poolname.
1888   READ REPORT castprogramname INTO iincludelines.
1889   APPEND include TO ikeywords.
1890   SCAN ABAP-SOURCE iincludelines TOKENS INTO itokens WITH INCLUDES STATEMENTS INTO istatements KEYWORDS FROM ikeywords.
1891   CLEAR iincludelines[].
1892   maxlines = lines( itokens ).
1893   LOOP AT itokens WHERE str = include AND type = 'I'.
1894     nextline = sy-tabix + 1.
1895     IF nextline <= maxlines.
1896       READ TABLE itokens INDEX nextline INTO watokens.
1897       IF watokens-str CP '*F++'.
1898         IF NOT customeronly IS INITIAL.
1899           TRY.
1900               IF watokens-str+0(2) = 'LY' OR watokens-str+0(2) = 'LZ' OR watokens-str CS customernamerange.
1901               ELSE.
1902                 CONTINUE.
1903               ENDIF.
1904             CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
1905           ENDTRY.
1906         ENDIF.
1907         wainclude-includename = watokens-str.
1908         PERFORM findprogramorincludetitle USING wainclude-includename
1909                                                 wainclude-includetitle.
1910         READ TABLE ilocincludes INTO waincludeexists WITH KEY includename = wainclude-includename.
1911         IF sy-subrc <> 0.
1912           APPEND wainclude TO ilocincludes.
1913         ENDIF.
1914       ENDIF.
1915     ENDIF.
1916   ENDLOOP.
1917 ENDFORM.
1918 FORM findprogramorincludetitle USING VALUE(programname)
1919                                            titletext.
1920   SELECT SINGLE text
1921                 FROM trdirt
1922                 INTO titletext
1923                 WHERE name = programname
1924                   AND sprsl = pmlang.
1925 ENDFORM.
1926 FORM retrieveprograms USING ilocprogram LIKE iprograms[]
1927                             ilocfunctions LIKE ifunctions[]
1928                             rangeprogram LIKE soprogramname[]
1929                             rangeauthor LIKE soauthor[]
1930                             VALUE(custnamerange)
1931                             VALUE(alsomodifiedbyauthor)
1932                             VALUE(customerprogsonly)
1933                             VALUE(getmessages)
1934                             VALUE(gettextelements)
1935                             VALUE(getcustdictstructures)
1936                             VALUE(getfunctions)
1937                             VALUE(getincludes)
1938                             VALUE(getscreens)
1939                             VALUE(gettransformations)
1940                             VALUE(recursivefuncsearch)
1941                             VALUE(recursiveincludesearch)
1942                             VALUE(solocpackage) LIKE sopack[].
1943   DATA: warangeprogram LIKE LINE OF rangeprogram.
1944   IF rangeprogram[] IS INITIAL.
1945     PERFORM findallprogramsforauthor USING ilocprogram[]
1946                                            rangeprogram[]
1947                                            rangeauthor[]
1948                                            custnamerange
1949                                            alsomodifiedbyauthor
1950                                            customerprogsonly
1951                                            solocpackage[].
1952   ELSE.
1953     READ TABLE rangeprogram INDEX 1 INTO warangeprogram.
1954     IF warangeprogram-low CS asterix.
1955       PERFORM findprogramsbywildcard USING ilocprogram[]
1956                                            rangeprogram[]
1957                                            rangeauthor[]
1958                                            custnamerange
1959                                            customerprogsonly
1960                                            solocpackage[].
1961     ELSE.
1962       PERFORM checkprogramdoesexist USING ilocprogram[]
1963                                          rangeprogram[].
1964     ENDIF.
1965   ENDIF.
1966   PERFORM scanforadditionalprogstuff USING ilocprogram[]
1967                                            ilocfunctions[]
1968                                            gettextelements
1969                                            getmessages
1970                                            getscreens
1971                                            getcustdictstructures
1972                                            getfunctions
1973                                            getincludes
1974                                            gettransformations
1975                                            customerprogsonly
1976                                            custnamerange
1977                                            recursiveincludesearch
1978                                            recursivefuncsearch.
1979 ENDFORM.
1980 FORM scanforadditionalprogstuff USING ilocprogram LIKE iprograms[]
1981                                       ilocfunctions LIKE ifunctions[]
1982                                       VALUE(gettextelements)
1983                                       VALUE(getmessages)
1984                                       VALUE(getscreens)
1985                                       VALUE(getcustdictstructures)
1986                                       VALUE(getfunctions)
1987                                       VALUE(getincludes)
1988                                       VALUE(gettransformations)
1989                                       VALUE(customeronly)
1990                                       VALUE(customernamerange)
1991                                       VALUE(recursiveincludesearch)
1992                                       VALUE(recursivefuncsearch).
1993   DATA: waprogram TYPE tprogram.
1994   DATA: wainclude TYPE tinclude.
1995   DATA: mytabix TYPE sytabix.
1996   IF NOT getincludes IS INITIAL.
1997     LOOP AT ilocprogram INTO waprogram.
1998       mytabix = sy-tabix.
1999       PERFORM scanforincludeprograms USING waprogram-progname
2000                                            recursiveincludesearch
2001                                            customeronly
2002                                            customernamerange
2003                                            waprogram-iincludes[].
2004       MODIFY ilocprogram FROM waprogram INDEX mytabix.
2005     ENDLOOP.
2006   ENDIF.
2007   LOOP AT ilocprogram INTO waprogram.
2008     mytabix = sy-tabix.
2009     PERFORM findprogramdetails USING waprogram-progname
2010                                      waprogram-subc
2011                                      waprogram-programtitle
2012                                      waprogram
2013                                      gettextelements
2014                                      getmessages
2015                                      getscreens
2016                                      gettransformations
2017                                      getcustdictstructures
2018                                      customeronly
2019                                      customernamerange.
2020     IF NOT getscreens IS INITIAL.
2021       PERFORM findprogramscreenflow USING waprogram.
2022     ENDIF.
2023     LOOP AT waprogram-iincludes INTO wainclude.
2024       PERFORM findprogramdetails USING wainclude-includename
2025                                        'I'
2026                                        wainclude-includetitle
2027                                        waprogram
2028                                        gettextelements
2029                                        getmessages
2030                                        getscreens
2031                                        gettransformations
2032                                        getcustdictstructures
2033                                        customeronly
2034                                        customernamerange.
2035     ENDLOOP.
2036     MODIFY ilocprogram FROM waprogram INDEX mytabix.
2037   ENDLOOP.
2038   IF NOT getfunctions IS INITIAL.
2039     LOOP AT ilocprogram INTO waprogram.
2040       PERFORM scanforfunctions USING waprogram-progname
2041                                      waprogram-progname
2042                                      space
2043                                      space
2044                                      customeronly
2045                                      customernamerange
2046                                      ilocfunctions[].
2047     ENDLOOP.
2048     PERFORM scanforadditionalfuncstuff USING ilocfunctions[]
2049                                              recursiveincludesearch
2050                                              recursivefuncsearch
2051                                              getincludes
2052                                              getfunctions
2053                                              getcustdictstructures
2054                                              getmessages
2055                                              gettransformations
2056                                              customeronly
2057                                              customernamerange.
2058   ENDIF.
2059 ENDFORM.
2060 FORM findprogramdetails USING VALUE(programname)
2061                               VALUE(programtype)
2062                                     programtitle
2063                                     waprogram TYPE tprogram
2064                               VALUE(gettextelements)
2065                               VALUE(getmessages)
2066                               VALUE(getscreens)
2067                               VALUE(gettransformations)
2068                               VALUE(getcustdictstructures)
2069                               VALUE(customeronly)
2070                               VALUE(customernamerange).
2071   PERFORM findprogramorincludetitle USING programname
2072                                           programtitle.
2073   IF NOT gettextelements IS INITIAL.
2074     PERFORM retrieveprogramtexts USING waprogram-iselectiontexts[]
2075                                        waprogram-itextelements[]
2076                                        programname.
2077   ENDIF.
2078   IF NOT getscreens IS INITIAL AND ( programtype = 'M' OR programtype = '1' ).
2079     PERFORM retrieveguititles USING waprogram-iguititle[]
2080                                     programname.
2081   ENDIF.
2082   IF NOT getmessages IS INITIAL.
2083     IF programtype = 'M' OR programtype = '1'.
2084       PERFORM findmainmessageclass USING programname
2085                                          waprogram-messageclass.
2086     ENDIF.
2087     PERFORM scanformessages USING programname
2088                                   waprogram-messageclass
2089                                   waprogram-imessages[].
2090   ENDIF.
2091   IF NOT gettransformations IS INITIAL.
2092     PERFORM scanfortransformations USING programname
2093                                          customeronly
2094                                          customernamerange
2095                                          waprogram-itransformations[].
2096   ENDIF.
2097   IF NOT getcustdictstructures IS INITIAL.
2098     PERFORM scanfortables USING programname
2099                                 customeronly
2100                                 customernamerange
2101                                 waprogram-idictstruct[].
2102     PERFORM scanforlikeortype USING programname
2103                                     customeronly
2104                                     customernamerange
2105                                     waprogram-idictstruct[]
2106                                     waprogram-itabletypes[].
2107   ENDIF.
2108 ENDFORM.
2109 FORM findallprogramsforauthor USING ilocprogram LIKE iprograms[]
2110                                     rangeprogram LIKE soprogramname[]
2111                                     rangeauthor LIKE soauthor[]
2112                                     VALUE(custnamerange)
2113                                     VALUE(alsomodifiedbyauthor)
2114                                     VALUE(customerprogsonly)
2115                                     VALUE(solocpackage) LIKE sopack[].
2116   DATA: altcustomernamerange TYPE string.
2117   FIELD-SYMBOLS: <waprogram> TYPE tprogram.
2118   DATA: genflag TYPE genflag.
2119   CONCATENATE custnamerange '%' INTO altcustomernamerange.
2120   IF NOT alsomodifiedbyauthor IS INITIAL.
2121     IF customerprogsonly IS INITIAL.
2122       SELECT a~progname
2123              a~subc
2124              APPENDING CORRESPONDING FIELDS OF TABLE ilocprogram
2125              FROM reposrc AS a
2126              INNER JOIN tadir AS b
2127                ON a~progname = b~obj_name
2128              WHERE a~progname IN rangeprogram
2129                AND a~cnam IN rangeauthor
2130                AND ( a~subc = '1' OR a~subc = 'M' OR a~subc = 'S' )
2131                AND b~pgmid = 'R3TR'
2132                AND b~object = 'PROG'
2133                AND b~devclass IN solocpackage.
2134 
2135     ELSE.
2136       SELECT progname
2137              subc
2138              APPENDING CORRESPONDING FIELDS OF TABLE ilocprogram
2139              FROM reposrc AS a
2140              INNER JOIN tadir AS b
2141                ON a~progname = b~obj_name
2142              WHERE a~progname  IN rangeprogram
2143                AND ( a~progname LIKE altcustomernamerange
2144                      OR a~progname LIKE 'Z%'
2145                      OR a~progname LIKE 'Y%'
2146                      OR a~progname LIKE 'SAPMZ%'
2147                      OR a~progname LIKE 'SAPMY%')
2148                AND a~cnam IN rangeauthor
2149                AND ( a~subc = '1' OR a~subc = 'M' OR a~subc = 'S' )
2150                AND b~pgmid = 'R3TR'
2151                AND b~object = 'PROG'
2152                AND b~devclass IN solocpackage.
2153     ENDIF.
2154   ELSE.
2155     IF customerprogsonly IS INITIAL.
2156       SELECT progname
2157              subc
2158              APPENDING CORRESPONDING FIELDS OF TABLE ilocprogram
2159              FROM reposrc AS a
2160              INNER JOIN tadir AS b
2161                ON a~progname = b~obj_name
2162              WHERE a~progname IN rangeprogram
2163                AND ( a~subc = '1' OR a~subc = 'M' OR a~subc = 'S' )
2164                AND ( a~cnam IN rangeauthor OR a~unam IN rangeauthor )
2165                AND b~pgmid = 'R3TR'
2166                AND b~object = 'PROG'
2167                AND b~devclass IN solocpackage.
2168     ELSE.
2169       SELECT a~progname
2170              a~subc
2171              APPENDING CORRESPONDING FIELDS OF TABLE ilocprogram
2172              FROM reposrc AS a
2173              INNER JOIN tadir AS b
2174                ON a~progname = b~obj_name
2175              WHERE a~progname IN rangeprogram
2176                AND ( a~progname LIKE altcustomernamerange
2177                      OR a~progname LIKE 'Z%'
2178                      OR a~progname LIKE 'Y%'
2179                      OR a~progname LIKE 'SAPMZ%'
2180                      OR a~progname LIKE 'SAPMY%')
2181                AND ( a~subc = '1' OR a~subc = 'M' OR a~subc = 'S' )
2182                AND ( a~cnam IN rangeauthor OR a~unam IN rangeauthor )
2183                AND b~pgmid = 'R3TR'
2184                AND b~object = 'PROG'
2185                AND b~devclass IN solocpackage.
2186     ENDIF.
2187   ENDIF.
2188 ENDFORM.
2189 FORM findallxsltforauthor USING iloctransformations  LIKE itransformations[]
2190                                 rangexslt LIKE soxsltname[]
2191                                 rangeauthor LIKE soauthor[]
2192                                 VALUE(custnamerange)
2193                                 VALUE(alsomodifiedbyauthor)
2194                                 VALUE(customerprogsonly)
2195                                 VALUE(solocpackage) LIKE sopack[].
2196   DATA: altcustomernamerange TYPE string.
2197   DATA: watransformation LIKE LINE OF itransformations.
2198   FIELD-SYMBOLS: <waxslt> TYPE ttransformation.
2199   DATA: genflag TYPE genflag.
2200   CONCATENATE custnamerange '%' INTO altcustomernamerange.
2201   IF NOT alsomodifiedbyauthor IS INITIAL.
2202     IF customerprogsonly IS INITIAL.
2203       SELECT obj_name
2204              INTO   watransformation-xsltname
2205              FROM   tadir
2206              WHERE  pgmid     = 'R3TR'
2207              AND    object    = 'XSLT'
2208              AND    author    IN rangeauthor
2209              AND    obj_name  IN rangexslt
2210              AND    devclass  IN solocpackage.
2211         APPEND watransformation TO iloctransformations.
2212       ENDSELECT.
2213     ELSE.
2214       SELECT obj_name
2215              INTO   watransformation-xsltname
2216              FROM   tadir
2217              WHERE  pgmid     = 'R3TR'
2218              AND    object    = 'XSLT'
2219              AND    author    IN rangeauthor
2220              AND    obj_name  IN rangexslt
2221              AND    devclass  IN solocpackage
2222              AND ( obj_name LIKE altcustomernamerange
2223                    OR obj_name LIKE 'Z%'
2224                    OR obj_name LIKE 'Y%').
2225         APPEND watransformation TO iloctransformations.
2226       ENDSELECT.
2227     ENDIF.
2228   ELSE.
2229     IF customerprogsonly IS INITIAL.
2230       SELECT obj_name
2231              INTO   watransformation-xsltname
2232              FROM   tadir
2233              WHERE  pgmid     = 'R3TR'
2234              AND    object    = 'XSLT'
2235              AND    author    IN rangeauthor
2236              AND    obj_name  IN rangexslt
2237              AND    devclass  IN solocpackage.
2238         APPEND watransformation TO iloctransformations.
2239       ENDSELECT.
2240     ELSE.
2241       SELECT obj_name
2242              INTO   watransformation-xsltname
2243              FROM   tadir
2244              WHERE  pgmid     = 'R3TR'
2245              AND    object    = 'XSLT'
2246              AND    author    IN rangeauthor
2247              AND    obj_name  IN rangexslt
2248              AND    devclass  IN solocpackage
2249              AND ( obj_name LIKE altcustomernamerange
2250                    OR obj_name LIKE 'Z%'
2251                    OR obj_name LIKE 'Y%').
2252         APPEND watransformation TO iloctransformations.
2253       ENDSELECT.
2254     ENDIF.
2255   ENDIF.
2256 ENDFORM.
2257 FORM findxsltbywildcard USING iloctransformations LIKE itransformations[]
2258                                   VALUE(rangexslt) LIKE soxsltname[]
2259                                   VALUE(rangeauthor) LIKE soauthor[]
2260                                   VALUE(custnamerange)
2261                                   VALUE(customerprogsonly)
2262                                   VALUE(solocpackage) LIKE sopack[].
2263   DATA: altcustomernamerange TYPE string.
2264   DATA: watransformation LIKE LINE OF iloctransformations.
2265   FIELD-SYMBOLS: <watransformation> TYPE ttransformation.
2266   DATA: genflag TYPE genflag.
2267   IF customerprogsonly IS INITIAL.
2268     IF custnamerange <> '^'.
2269       CONCATENATE custnamerange '%' INTO altcustomernamerange.
2270       SELECT obj_name
2271              INTO   watransformation-xsltname
2272              FROM   tadir
2273              WHERE  pgmid     = 'R3TR'
2274              AND    object    = 'XSLT'
2275              AND    obj_name  IN rangexslt
2276              AND    obj_name  LIKE altcustomernamerange
2277              AND    author    IN rangeauthor.
2278         APPEND watransformation TO iloctransformations.
2279       ENDSELECT.
2280     ELSE.
2281       SELECT obj_name
2282              INTO   watransformation-xsltname
2283              FROM   tadir
2284              WHERE  pgmid     = 'R3TR'
2285              AND    object    = 'XSLT'
2286              AND    obj_name  IN rangexslt
2287              AND    author    IN rangeauthor.
2288         APPEND watransformation TO iloctransformations.
2289       ENDSELECT.
2290     ENDIF.
2291   ELSE.
2292     IF custnamerange <> '^'.
2293       CONCATENATE custnamerange '%' INTO altcustomernamerange.
2294       SELECT obj_name
2295              INTO   watransformation-xsltname
2296              FROM   tadir
2297              WHERE  pgmid     = 'R3TR'
2298              AND    object    = 'XSLT'
2299              AND    obj_name  IN rangexslt
2300              AND    obj_name  LIKE altcustomernamerange
2301              AND    ( obj_name LIKE 'Z%' OR
2302                       obj_name LIKE 'Y%' ).
2303         APPEND watransformation TO iloctransformations.
2304       ENDSELECT.
2305     ELSE.
2306       SELECT obj_name
2307              INTO   watransformation-xsltname
2308              FROM   tadir
2309              WHERE  pgmid     = 'R3TR'
2310              AND    object    = 'XSLT'
2311              AND    obj_name  IN rangexslt
2312              AND    ( obj_name LIKE 'Z%' OR
2313                       obj_name LIKE 'Y%' ).
2314         APPEND watransformation TO iloctransformations.
2315       ENDSELECT.
2316     ENDIF.
2317   ENDIF.
2318 ENDFORM.
2319 FORM checkxsltdoesexist USING iloctransformations LIKE itransformations[]
2320                               rangexslt LIKE soxsltname[].
2321   DATA: watransformation TYPE ttransformation.
2322   SELECT SINGLE obj_name
2323          INTO   watransformation-xsltname
2324          FROM   tadir
2325          WHERE  pgmid     = 'R3TR'
2326          AND    object    = 'XSLT'
2327          AND    obj_name  IN rangexslt.
2328   IF sy-subrc = 0.
2329     APPEND watransformation TO iloctransformations.
2330   ENDIF.
2331 ENDFORM.
2332 FORM checkprogramdoesexist USING ilocprogram LIKE iprograms[]
2333                                  rangeprogram LIKE soprogramname[].
2334   SELECT progname
2335          subc
2336          INTO CORRESPONDING FIELDS OF TABLE ilocprogram
2337          FROM reposrc
2338          WHERE progname IN rangeprogram
2339            AND ( subc = '1' OR
2340                  subc = 'I' OR
2341                  subc = 'M' OR
2342                  subc = 'S' ).
2343 ENDFORM.
2344 FORM checkandaddtabletype USING wadictionary-tablename
2345                                 iloctabletypes LIKE itabletypes[].
2346   SELECT *
2347          INTO CORRESPONDING FIELDS OF TABLE iloctabletypes
2348          FROM dd40l AS a
2349          INNER JOIN dd40t AS t
2350             ON a~typename = t~typename
2351          WHERE a~typename = wadictionary-tablename
2352            AND t~ddlanguage EQ sy-langu
2353            AND a~as4local = 'A'.
2354 ENDFORM.
2355 FORM findprogramsbywildcard USING ilocprogram LIKE iprograms[]
2356                                   VALUE(rangeprogram) LIKE soprogramname[]
2357                                   VALUE(rangeauthor) LIKE soauthor[]
2358                                   VALUE(custnamerange)
2359                                   VALUE(customerprogsonly)
2360                                   VALUE(solocpackage) LIKE sopack[].
2361   DATA: altcustomernamerange TYPE string.
2362   FIELD-SYMBOLS: <waprogram> TYPE tprogram.
2363   DATA: genflag TYPE genflag.
2364   IF customerprogsonly IS INITIAL.
2365     IF custnamerange <> '^'.
2366       CONCATENATE custnamerange '%' INTO altcustomernamerange.
2367       SELECT progname
2368              subc
2369              FROM reposrc
2370              APPENDING CORRESPONDING FIELDS OF TABLE ilocprogram
2371              WHERE progname  IN rangeprogram
2372                AND progname LIKE altcustomernamerange
2373                AND ( subc = '1' OR subc = 'M' OR subc = 'S' )
2374                AND ( cnam IN rangeauthor OR unam IN rangeauthor ).
2375     ELSE.
2376       SELECT progname
2377              subc
2378              FROM reposrc
2379              APPENDING CORRESPONDING FIELDS OF TABLE ilocprogram
2380              WHERE progname  IN rangeprogram
2381                AND ( subc = '1' OR subc = 'M' OR subc = 'S' )
2382                AND ( cnam IN rangeauthor OR unam IN rangeauthor ).
2383     ENDIF.
2384   ELSE.
2385     IF custnamerange <> '^'.
2386       CONCATENATE custnamerange '%' INTO altcustomernamerange.
2387       SELECT progname
2388              subc
2389              FROM reposrc
2390              APPENDING CORRESPONDING FIELDS OF TABLE ilocprogram
2391              WHERE progname  IN rangeprogram
2392                AND ( progname LIKE altcustomernamerange
2393                      OR progname LIKE 'Z%'
2394                      OR progname LIKE 'Y%'
2395                      OR progname LIKE 'SAPMZ%'
2396                      OR progname LIKE 'SAPMY%')
2397                AND ( subc = '1' OR subc = 'M' OR subc = 'S' )
2398                AND ( cnam IN rangeauthor OR unam IN rangeauthor ).
2399     ELSE.
2400       SELECT progname
2401              subc
2402              FROM reposrc
2403              APPENDING CORRESPONDING FIELDS OF TABLE ilocprogram
2404              WHERE progname  IN rangeprogram
2405              AND ( progname LIKE 'Z%'
2406                    OR progname LIKE 'Y%'
2407                    OR progname LIKE 'SAPMZ%'
2408                    OR progname LIKE 'SAPMY%')
2409              AND ( subc = '1' OR subc = 'M' OR subc = 'S' )
2410              AND ( cnam IN rangeauthor OR unam IN rangeauthor ).
2411     ENDIF.
2412   ENDIF.
2413 ENDFORM.
2414 FORM retrieveprogramtexts USING ilocselectiontexts LIKE dumitexttab[]
2415                                 iloctextelements LIKE dumitexttab[]
2416                                 VALUE(programname).
2417   DATA: itexttable TYPE STANDARD TABLE OF ttexttable WITH HEADER LINE.
2418   DATA: watexts TYPE ttexttable.
2419   DATA: castprogramname(50).
2420   MOVE programname TO castprogramname.
2421   READ TEXTPOOL castprogramname INTO itexttable LANGUAGE pmlang.
2422   DELETE itexttable WHERE key = 'R'.
2423   LOOP AT itexttable WHERE id = 'S'.
2424     MOVE itexttable-key TO watexts-key.
2425     MOVE itexttable-entry TO watexts-entry.
2426     APPEND watexts TO ilocselectiontexts.
2427     CLEAR watexts.
2428   ENDLOOP.
2429   DELETE itexttable WHERE key = 'S'.
2430   LOOP AT itexttable WHERE id = 'I'.
2431     MOVE itexttable-key TO watexts-key.
2432     MOVE itexttable-entry TO watexts-entry.
2433     APPEND watexts TO iloctextelements.
2434   ENDLOOP.
2435 ENDFORM.
2436 FORM retrieveguititles USING ilocguititle LIKE dumiguititle[]
2437                              VALUE(programname).
2438   SELECT obj_code
2439          text
2440          FROM d347t
2441          APPENDING CORRESPONDING FIELDS OF TABLE ilocguititle
2442          WHERE progname = programname.
2443 ENDFORM.
2444 FORM findmainmessageclass USING VALUE(programname)
2445                                       messageclass.
2446   SELECT SINGLE msgid
2447                 FROM trdire INTO messageclass
2448                 WHERE report = programname.
2449 ENDFORM.
2450 FORM retrieveclasses USING ilocclasses LIKE iclasses[]
2451                            ilocfunctions LIKE ifunctions[]
2452                            rangeclass LIKE soclassname[]
2453                            rangeauthor LIKE soauthor[]
2454                            VALUE(custnamerange)
2455                            VALUE(alsomodifiedbyauthor)
2456                            VALUE(customerprogsonly)
2457                            VALUE(getmessages)
2458                            VALUE(gettextelements)
2459                            VALUE(getcustdictstructures)
2460                            VALUE(getfunctions)
2461                            VALUE(getincludes)
2462                            VALUE(gettransformations)
2463                            VALUE(recursivefuncsearch)
2464                            VALUE(recursiveincludesearch)
2465                            VALUE(recursiveclasssearch)
2466                            VALUE(language)
2467                            VALUE(solocpackage) LIKE sopack[].
2468   DATA: warangeclass LIKE LINE OF rangeclass.
2469   DATA: waclass LIKE LINE OF ilocclasses[].
2470   IF rangeclass[] IS INITIAL.
2471     PERFORM findallclassesforauthor USING ilocclasses[]
2472                                            rangeclass[]
2473                                            rangeauthor[]
2474                                            custnamerange
2475                                            alsomodifiedbyauthor
2476                                            customerprogsonly
2477                                            language.
2478   ELSE.
2479     READ TABLE rangeclass INDEX 1 INTO warangeclass.
2480     IF warangeclass-low CS asterix.
2481       PERFORM findclassesbywildcard USING ilocclasses[]
2482                                           rangeclass[]
2483                                           rangeauthor[]
2484                                           custnamerange
2485                                           customerprogsonly
2486                                           language.
2487     ELSE.
2488       PERFORM checkclassdoesexist USING ilocclasses[]
2489                                         rangeclass[].
2490     ENDIF.
2491   ENDIF.
2492   IF NOT solocpackage[] IS INITIAL.
2493     LOOP AT ilocclasses INTO waclass.
2494       SELECT SINGLE obj_name
2495              FROM tadir
2496              INTO waclass-clsname
2497              WHERE pgmid = 'R3TR'
2498                AND object = 'CLAS'
2499                AND obj_name = waclass-clsname
2500                AND devclass IN solocpackage[].
2501       IF sy-subrc <> 0.
2502         DELETE ilocclasses.
2503       ENDIF.
2504     ENDLOOP.
2505   ENDIF.
2506   IF NOT ilocclasses[] IS INITIAL.
2507     PERFORM scanforadditionalclassstuff USING ilocclasses[]
2508                                               ilocfunctions[]
2509                                               gettextelements
2510                                               getmessages
2511                                               getcustdictstructures
2512                                               getfunctions
2513                                               getincludes
2514                                               gettransformations
2515                                               customerprogsonly
2516                                               custnamerange
2517                                               recursiveincludesearch
2518                                               recursivefuncsearch
2519                                               recursiveclasssearch
2520                                               solocpackage[].
2521   ENDIF.
2522 ENDFORM.
2523 FORM findallclassesforauthor USING ilocclass LIKE iclasses[]
2524                                    rangeclass LIKE soclassname[]
2525                                    rangeauthor LIKE soauthor[]
2526                                    VALUE(custnamerange)
2527                                    VALUE(alsomodifiedbyauthor)
2528                                    VALUE(customerclassesonly)
2529                                    VALUE(language).
2530   DATA: altcustomernamerange TYPE string.
2531   CONCATENATE custnamerange '%' INTO altcustomernamerange.
2532   IF NOT alsomodifiedbyauthor IS INITIAL.
2533     IF customerclassesonly IS INITIAL.
2534       SELECT clsname descript msg_id
2535              FROM vseoclass
2536              APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2537              WHERE clsname IN rangeclass
2538                AND langu = language
2539                AND ( author IN rangeauthor OR changedby IN rangeauthor )
2540                AND version = '1'
2541                AND ( state = '0' OR state = '1' ).
2542       IF sy-subrc <> 0.
2543         SELECT clsname descript msg_id
2544                FROM vseoclass
2545                APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2546                WHERE clsname IN rangeclass
2547                AND langu = language
2548                  AND ( author IN rangeauthor OR changedby IN rangeauthor )
2549                  AND version = '0'
2550                  AND ( state = '0' OR state = '1' ).
2551       ENDIF.
2552     ELSE.
2553       SELECT clsname descript msg_id
2554              FROM vseoclass
2555              APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2556              WHERE clsname IN rangeclass
2557                AND ( clsname LIKE altcustomernamerange
2558                      OR clsname LIKE 'Z%'
2559                      OR clsname LIKE 'Y%')
2560                AND langu = language
2561                AND ( author IN rangeauthor OR changedby IN rangeauthor )
2562                AND version = '1'
2563                AND ( state = '0' OR state = '1' ).
2564       IF sy-subrc <> 0.
2565         SELECT clsname descript msg_id
2566                FROM vseoclass
2567                APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2568                WHERE clsname IN rangeclass
2569                  AND ( clsname LIKE altcustomernamerange
2570                        OR clsname LIKE 'Z%'
2571                        OR clsname LIKE 'Y%')
2572                  AND langu = language
2573                  AND ( author IN rangeauthor OR changedby IN rangeauthor )
2574                  AND version = '0'
2575                  AND ( state = '0' OR state = '1' ).
2576       ENDIF.
2577     ENDIF.
2578   ELSE.
2579     IF customerclassesonly IS INITIAL.
2580       SELECT clsname descript msg_id
2581              FROM vseoclass
2582              APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2583              WHERE clsname IN rangeclass
2584                AND langu = language
2585                AND author IN rangeauthor
2586                AND version = '1'
2587                AND ( state = '0' OR state = '1' ).
2588       IF sy-subrc <> 0.
2589         SELECT clsname descript msg_id
2590                FROM vseoclass
2591                APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2592                WHERE clsname IN rangeclass
2593                  AND langu = language
2594                  AND author IN rangeauthor
2595                  AND version = '0'
2596                  AND ( state = '0' OR state = '1' ).
2597       ENDIF.
2598     ELSE.
2599       SELECT clsname descript msg_id
2600              FROM vseoclass
2601              APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2602              WHERE clsname IN rangeclass
2603                AND ( clsname LIKE altcustomernamerange
2604                      OR clsname LIKE 'Z%'
2605                      OR clsname LIKE 'Y%')
2606                AND langu = language
2607                AND author IN rangeauthor
2608                AND version = '1'
2609                AND ( state = '0' OR state = '1' ).
2610       IF sy-subrc <> 0.
2611         SELECT clsname descript msg_id
2612                FROM vseoclass
2613                APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2614                WHERE clsname IN rangeclass
2615                  AND ( clsname LIKE altcustomernamerange
2616                        OR clsname LIKE 'Z%'
2617                        OR clsname LIKE 'Y%')
2618                  AND langu = language
2619                  AND author IN rangeauthor
2620                  AND version = '0'
2621                  AND ( state = '0' OR state = '1' ).
2622       ENDIF.
2623     ENDIF.
2624   ENDIF.
2625 ENDFORM.
2626 FORM findclassesbywildcard USING ilocclass LIKE iclasses[]
2627                                  rangeclass LIKE soclassname[]
2628                                  VALUE(rangeauthor) LIKE soauthor[]
2629                                  VALUE(custnamerange)
2630                                  VALUE(customerclassesonly)
2631                                  VALUE(language).
2632   DATA: altcustomernamerange TYPE string.
2633   IF customerclassesonly IS INITIAL.
2634     IF custnamerange <> '^'.
2635       CONCATENATE custnamerange '%' INTO altcustomernamerange.
2636       SELECT clsname descript msg_id
2637              FROM vseoclass
2638              APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2639              WHERE clsname IN rangeclass
2640                AND clsname LIKE custnamerange
2641                AND langu = language
2642                AND ( author IN rangeauthor OR changedby IN rangeauthor )
2643                AND version = '1'
2644                AND ( state = '0' OR state = '1' ).
2645       IF sy-subrc <> 0.
2646         SELECT clsname descript msg_id
2647                FROM vseoclass
2648                APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2649                WHERE clsname IN rangeclass
2650                  AND clsname LIKE custnamerange
2651                  AND langu = language
2652                  AND ( author IN rangeauthor OR changedby IN rangeauthor )
2653                  AND version = '0'
2654                  AND ( state = '0' OR state = '1' ).
2655       ENDIF.
2656     ELSE.
2657       SELECT clsname descript msg_id
2658              FROM vseoclass
2659              APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2660              WHERE clsname IN rangeclass
2661                AND langu = language
2662                AND ( author IN rangeauthor OR changedby IN rangeauthor )
2663                AND version = '1'
2664                AND ( state = '0' OR state = '1' ).
2665       IF sy-subrc <> 0.
2666         SELECT clsname descript msg_id
2667                FROM vseoclass
2668                APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2669                WHERE clsname IN rangeclass
2670                  AND langu = language
2671                  AND ( author IN rangeauthor OR changedby IN rangeauthor )
2672                  AND version = '0'
2673                  AND ( state = '0' OR state = '1' ).
2674       ENDIF.
2675     ENDIF.
2676   ELSE.
2677     IF custnamerange <> '^'.
2678       CONCATENATE custnamerange '%' INTO altcustomernamerange.
2679       SELECT clsname descript msg_id
2680              FROM vseoclass
2681              APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2682              WHERE clsname IN rangeclass
2683                AND clsname LIKE custnamerange
2684                AND langu = language
2685                AND ( clsname LIKE 'ZC%' OR clsname LIKE 'YC%' )
2686                AND ( author IN rangeauthor OR changedby IN rangeauthor )
2687                AND version = '1'
2688                AND ( state = '0' OR state = '1' ).
2689       IF sy-subrc <> 0.
2690         SELECT clsname descript msg_id
2691                FROM vseoclass
2692                APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2693                WHERE clsname IN rangeclass
2694                  AND langu = language
2695                  AND ( clsname LIKE 'ZC%' OR clsname LIKE 'YC%' )
2696                  AND ( author IN rangeauthor OR changedby IN rangeauthor )
2697                  AND version = '0'
2698                  AND ( state = '0' OR state = '1' ).
2699       ENDIF.
2700     ELSE.
2701       SELECT clsname descript msg_id
2702              FROM vseoclass
2703              APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2704              WHERE clsname IN rangeclass
2705                AND ( clsname LIKE 'ZC%' OR clsname LIKE 'YC%' )
2706                AND ( author IN rangeauthor OR changedby IN rangeauthor )
2707                AND version = '1'
2708                AND ( state = '0' OR state = '1' ).
2709       IF sy-subrc <> 0.
2710         SELECT clsname descript msg_id
2711                FROM vseoclass
2712                APPENDING CORRESPONDING FIELDS OF TABLE ilocclass
2713                WHERE clsname IN rangeclass
2714                  AND ( clsname LIKE 'ZC%' OR clsname LIKE 'YC%' )
2715                  AND ( author IN rangeauthor OR changedby IN rangeauthor )
2716                  AND version = '0'
2717                  AND ( state = '0' OR state = '1' ).
2718       ENDIF.
2719     ENDIF.
2720   ENDIF.
2721 ENDFORM.
2722 FORM checkclassdoesexist USING ilocclass LIKE iclasses[]
2723                                rangeclass LIKE soclassname[].
2724   DATA: waclass TYPE tclass.
2725   SELECT SINGLE clsname descript msg_id
2726          FROM vseoclass
2727          INTO CORRESPONDING FIELDS OF waclass
2728          WHERE clsname IN rangeclass
2729            AND version = '1'
2730            AND ( state = '0' OR state = '1' ).
2731   IF sy-subrc <> 0.
2732     SELECT SINGLE clsname descript msg_id
2733          FROM vseoclass
2734          INTO CORRESPONDING FIELDS OF waclass
2735          WHERE clsname IN rangeclass
2736            AND version = '0'
2737            AND ( state = '0' OR state = '1' ).
2738   ENDIF.
2739   IF NOT waclass-clsname IS INITIAL.
2740     APPEND waclass TO ilocclass.
2741   ENDIF.
2742 ENDFORM.
2743 FORM scanforadditionalclassstuff USING ilocclasses LIKE iclasses[]
2744                                        ilocfunctions LIKE ifunctions[]
2745                                        VALUE(gettextelements)
2746                                        VALUE(getmessages)
2747                                        VALUE(getcustdictstructures)
2748                                        VALUE(getfunctions)
2749                                        VALUE(getincludes)
2750                                        VALUE(gettransformations)
2751                                        VALUE(customeronly)
2752                                        VALUE(customernamerange)
2753                                        VALUE(recursiveincludesearch)
2754                                        VALUE(recursivefuncsearch)
2755                                        VALUE(recursiveclasssearch)
2756                                        VALUE(solocpackage) LIKE sopack[].
2757   DATA: waclass TYPE tclass.
2758   DATA: wamethod TYPE tmethod.
2759   DATA: mytabix TYPE sytabix.
2760   DATA: scanningforclasses TYPE abap_bool VALUE false.
2761   DATA: classnewlines TYPE i VALUE 0.
2762   DATA: classcurrentlines TYPE i VALUE 0.
2763   LOOP AT ilocclasses INTO waclass WHERE scanned IS INITIAL.
2764     mytabix = sy-tabix.
2765     PERFORM findclassdetails USING waclass-clsname
2766                                    waclass
2767                                    ilocfunctions[]
2768                                    gettextelements
2769                                    getmessages
2770                                    getfunctions
2771                                    getcustdictstructures
2772                                    gettransformations
2773                                    customeronly
2774                                    customernamerange.
2775     waclass-scanned = 'X'.
2776     MODIFY ilocclasses FROM waclass INDEX mytabix.
2777   ENDLOOP.
2778   IF NOT recursiveclasssearch IS INITIAL.
2779     classcurrentlines = lines( ilocclasses ).
2780     LOOP AT ilocclasses INTO waclass.
2781       IF ( waclass-clsname NS 'ZCX_' OR waclass-clsname NS 'CX_'  ).
2782         PERFORM scanforclasses USING waclass-privateclasskey
2783                                      waclass-clsname
2784                                      customeronly
2785                                      customernamerange
2786                                      ilocclasses[]
2787                                      solocpackage[].
2788         PERFORM scanforclasses USING waclass-publicclasskey
2789                                      waclass-clsname
2790                                      customeronly
2791                                      customernamerange
2792                                      ilocclasses[]
2793                                      solocpackage[].
2794         PERFORM scanforclasses USING waclass-protectedclasskey
2795                                      waclass-clsname
2796                                      customeronly
2797                                      customernamerange
2798                                      ilocclasses[]
2799                                      solocpackage[].
2800         LOOP AT waclass-imethods INTO wamethod.
2801           PERFORM scanforclasses USING wamethod-methodkey
2802                                        waclass-clsname
2803                                        customeronly
2804                                        customernamerange
2805                                        ilocclasses[]
2806                                        solocpackage[].
2807         ENDLOOP.
2808       ENDIF.
2809     ENDLOOP.
2810     classnewlines = lines( ilocclasses ).
2811     IF classnewlines > classcurrentlines.
2812       PERFORM scanforadditionalclassstuff USING ilocclasses[]
2813                                                 ilocfunctions[]
2814                                                 gettextelements
2815                                                 getmessages
2816                                                 getcustdictstructures
2817                                                 getfunctions
2818                                                 getincludes
2819                                                 gettransformations
2820                                                 customeronly
2821                                                 customernamerange
2822                                                 recursiveincludesearch
2823                                                 recursivefuncsearch
2824                                                 recursiveclasssearch
2825                                                 solocpackage[].
2826     ENDIF.
2827   ENDIF.
2828 ENDFORM.
2829 FORM findclassdetails USING VALUE(classname)
2830                                   waclass TYPE tclass
2831                                   ilocfunctions LIKE ifunctions[]
2832                                   VALUE(gettextelements)
2833                                   VALUE(getmessages)
2834                                   VALUE(getfunctions)
2835                                   VALUE(getcustdictstructures)
2836                                   VALUE(gettransformations)
2837                                   VALUE(customeronly)
2838                                   VALUE(customernamerange).
2839   DATA: iemptyselectiontexts TYPE STANDARD TABLE OF ttexttable.
2840   DATA: mytabix TYPE sytabix.
2841   DATA: wamethod TYPE tmethod.
2842   DATA: rnblankauthor LIKE soauthor[].
2843   DATA: rnblankpackage LIKE sopack[].
2844   DATA: wainterface TYPE tinterface.
2845   PERFORM buildclasskeys USING waclass.
2846   IF waclass-descript IS INITIAL.
2847     PERFORM findclassdescription USING classname
2848                                        waclass-descript.
2849   ENDIF.
2850   SELECT SINGLE exposure msg_id state clsfinal r3release
2851                 FROM vseoclass
2852                 INTO (waclass-exposure, waclass-msg_id, waclass-state,
2853                       waclass-clsfinal, waclass-r3release)
2854                 WHERE clsname = waclass-clsname.
2855   IF ( waclass-clsname CS 'ZCX_' OR waclass-clsname CS 'CX_'  ).
2856     PERFORM findexceptiontexts USING waclass-publicclasskey
2857                                      waclass-iconcepts[].
2858     waclass-scanned = 'X'.
2859   ELSE.
2860     IF NOT gettextelements IS INITIAL.
2861       PERFORM retrieveprogramtexts USING iemptyselectiontexts[]
2862                                          waclass-itextelements[]
2863                                          waclass-textelementkey.
2864     ENDIF.
2865     IF NOT getcustdictstructures IS INITIAL.
2866       PERFORM scanfortables USING waclass-privateclasskey
2867                                   customeronly
2868                                   customernamerange
2869                                   waclass-idictstruct[].
2870       PERFORM scanfortables USING waclass-publicclasskey
2871                                   customeronly
2872                                   customernamerange
2873                                   waclass-idictstruct[].
2874       PERFORM scanfortables USING waclass-protectedclasskey
2875                                   customeronly
2876                                   customernamerange
2877                                   waclass-idictstruct[].
2878       PERFORM scanfortables USING waclass-typesclasskey
2879                                   customeronly
2880                                   customernamerange
2881                                   waclass-idictstruct[].
2882       PERFORM scanforlikeortype USING waclass-privateclasskey
2883                                       customeronly
2884                                       customernamerange
2885                                       waclass-idictstruct[]
2886                                       waclass-itabletypes[].
2887       PERFORM scanforlikeortype USING waclass-publicclasskey
2888                                       customeronly
2889                                       customernamerange
2890                                       waclass-idictstruct[]
2891                                       waclass-itabletypes[].
2892       PERFORM scanforlikeortype USING waclass-protectedclasskey
2893                                       customeronly
2894                                       customernamerange
2895                                       waclass-idictstruct[]
2896                                       waclass-itabletypes[].
2897       PERFORM scanforlikeortype USING waclass-typesclasskey
2898                                       customeronly
2899                                       customernamerange
2900                                       waclass-idictstruct[]
2901                                       waclass-itabletypes[].
2902     ENDIF.
2903     PERFORM findclassinterfaces USING classname
2904                                       waclass-iinterfaces[].
2905     PERFORM findinterfacemethods USING classname
2906                                        waclass-iinterfaces[]
2907                                        waclass-imethods[].
2908     PERFORM findclassmethods USING classname
2909                                    waclass-imethods[].
2910     LOOP AT waclass-imethods[] INTO wamethod.
2911       mytabix = sy-tabix.
2912       IF NOT getmessages IS INITIAL.
2913         PERFORM scanformessages USING wamethod-methodkey
2914                                       waclass-msg_id
2915                                       waclass-imessages[].
2916       ENDIF.
2917       IF NOT getcustdictstructures IS INITIAL.
2918         PERFORM scanfortables USING wamethod-methodkey
2919                                     customeronly
2920                                     customernamerange
2921                                     waclass-idictstruct[].
2922         PERFORM scanforlikeortype USING wamethod-methodkey
2923                                         customeronly
2924                                         customernamerange
2925                                         waclass-idictstruct[]
2926                                         waclass-itabletypes[].
2927       ENDIF.
2928       IF NOT getfunctions IS INITIAL.
2929         PERFORM scanforfunctions USING wamethod-methodkey
2930                                        waclass-clsname
2931                                        space
2932                                        space
2933                                        customeronly
2934                                        customernamerange
2935                                        ilocfunctions[].
2936       ENDIF.
2937       IF NOT gettransformations IS INITIAL.
2938         PERFORM scanfortransformations USING wamethod-methodkey
2939                                              customeronly
2940                                              customernamerange
2941                                              waclass-itransformations[].
2942       ENDIF.
2943       MODIFY waclass-imethods FROM wamethod INDEX mytabix.
2944     ENDLOOP.
2945     IF ( NOT waclass-msg_id IS INITIAL AND waclass-imessages[] IS INITIAL ).
2946       PERFORM retrievemessageclass USING waclass-imessages[]
2947                                          rnblankauthor[]
2948                                          waclass-msg_id
2949                                          pmlang
2950                                          ''
2951                                          rnblankpackage[].
2952     ENDIF.
2953   ENDIF.
2954 ENDFORM.
2955 FORM findinterfacemethods USING VALUE(classname)
2956                                       ilocinterfaces LIKE dumiinterfaces[]
2957                                       ilocmethods LIKE dumimethods[].
2958   TYPES: BEGIN OF tintmethod,
2959            interfacename LIKE vseomethod-clsname,
2960            cmpname       LIKE vseomethod-cmpname,
2961            exposure      LIKE vseomethod-exposure,
2962          END OF tintmethod.
2963   DATA: wamethod TYPE tmethod.
2964   DATA: wainterface LIKE LINE OF ilocinterfaces.
2965   DATA: iintmethod TYPE STANDARD TABLE OF tintmethod WITH HEADER LINE.
2966   LOOP AT ilocinterfaces INTO wainterface.
2967     SELECT a~clsname AS interfacename
2968            a~cmpname
2969            b~exposure
2970            APPENDING TABLE iintmethod
2971            FROM seocompo AS a
2972            INNER JOIN seocompodf AS b
2973              ON a~clsname = b~clsname
2974              AND a~cmpname = b~cmpname
2975            WHERE a~clsname = wainterface-interfacename.
2976   ENDLOOP.
2977   LOOP AT iintmethod.
2978     CONCATENATE iintmethod-interfacename '~' iintmethod-cmpname INTO wamethod-cmpname.
2979     wamethod-exposure = iintmethod-exposure.
2980     SELECT SINGLE descript
2981            FROM seocompotx
2982            INTO wamethod-descript
2983            WHERE clsname = iintmethod-interfacename
2984              AND cmpname = iintmethod-cmpname
2985              AND langu = pmlang.
2986     PERFORM findmethodkey USING classname
2987                                 wamethod-cmpname
2988                                 wamethod-methodkey.
2989     IF NOT wamethod-methodkey IS INITIAL.
2990       APPEND wamethod TO ilocmethods.
2991     ENDIF.
2992     CLEAR wamethod.
2993   ENDLOOP.
2994 ENDFORM.
2995 FORM findclassinterfaces USING VALUE(classname)
2996                                      ilocinterfaces LIKE dumiinterfaces[].
2997   DATA: isinheritance TYPE abap_bool VALUE abap_true.
2998   DATA: iinterfaces TYPE STANDARD TABLE OF vseoimplem WITH HEADER LINE.
2999   DATA: walocinterface LIKE LINE OF ilocinterfaces.
3000   SELECT * FROM vseoimplem
3001            INTO TABLE iinterfaces
3002            WHERE clsname = classname.
3003   WHILE isinheritance = abap_true.
3004     PERFORM findclassparent USING classname
3005                                   classname.
3006     IF classname IS INITIAL.
3007       isinheritance = abap_false.
3008     ELSE.
3009       SELECT * FROM vseoimplem
3010                APPENDING TABLE iinterfaces
3011                WHERE clsname = classname.
3012     ENDIF.
3013   ENDWHILE.
3014   IF NOT iinterfaces[] IS INITIAL.
3015     SORT iinterfaces ASCENDING BY refclsname.
3016     DELETE ADJACENT DUPLICATES FROM iinterfaces COMPARING refclsname.
3017     LOOP AT iinterfaces.
3018       walocinterface-interfacename = iinterfaces-refclsname.
3019       APPEND walocinterface TO ilocinterfaces.
3020     ENDLOOP.
3021   ENDIF.
3022 ENDFORM.
3023 FORM findclassparent USING VALUE(classname)
3024                                  parentclassname.
3025   DATA: wainheritance TYPE seor_inheritance_r.
3026   DATA: clskey TYPE seoclskey.
3027   clskey-clsname = classname.
3028   CALL FUNCTION 'SEO_INHERITANC_READ'
3029     EXPORTING
3030       clskey             = clskey
3031       version            = seoc_version_active
3032     IMPORTING
3033       inheritance        = wainheritance
3034     EXCEPTIONS
3035       class_not_existing = 1.
3036   parentclassname = wainheritance-refclsname.
3037 ENDFORM.
3038 FORM buildclasskeys USING waclass TYPE tclass.
3039   DATA: classnamelength TYPE i.
3040   DATA: loops TYPE i.
3041   classnamelength = strlen( waclass-clsname ).
3042   cl_oo_classname_service=>get_pubsec_name( EXPORTING clsname = waclass-clsname
3043                                             RECEIVING result = waclass-publicclasskey ).
3044   cl_oo_classname_service=>get_prisec_name( EXPORTING clsname = waclass-clsname
3045                                             RECEIVING result = waclass-privateclasskey ).
3046   cl_oo_classname_service=>get_prosec_name( EXPORTING clsname = waclass-clsname
3047                                             RECEIVING result = waclass-protectedclasskey ).
3048   loops = 30 - classnamelength.
3049   waclass-textelementkey = waclass-clsname.
3050   DO loops TIMES.
3051     CONCATENATE waclass-textelementkey '=' INTO waclass-textelementkey.
3052   ENDDO.
3053   CONCATENATE waclass-textelementkey 'CP' INTO waclass-textelementkey.
3054   loops = 30 - classnamelength.
3055   waclass-typesclasskey = waclass-clsname.
3056   DO loops TIMES.
3057     CONCATENATE waclass-typesclasskey '=' INTO waclass-typesclasskey.
3058   ENDDO.
3059   CONCATENATE waclass-typesclasskey 'CT' INTO waclass-typesclasskey.
3060 ENDFORM.
3061 FORM findclassdescription USING VALUE(classname)
3062                                       titletext.
3063   SELECT SINGLE descript
3064                 FROM vseoclass
3065                 INTO titletext
3066                 WHERE clsname = classname
3067                   AND langu = pmlang.
3068   IF sy-subrc <> 0.
3069     SELECT SINGLE descript
3070                   FROM vseoclass
3071                   INTO titletext
3072                   WHERE clsname = classname.
3073   ENDIF.
3074 ENDFORM.
3075 FORM findexceptiontexts USING publicclasskey
3076                               iconcepts LIKE dumiconcepts[].
3077   DATA: castclassname TYPE program.
3078   DATA: itemplines TYPE STANDARD TABLE OF string WITH HEADER LINE.
3079   DATA: itokens TYPE STANDARD TABLE OF stokes WITH HEADER LINE.
3080   DATA: ikeywords TYPE STANDARD TABLE OF text20 WITH HEADER LINE.
3081   DATA: istatements TYPE STANDARD TABLE OF sstmnt WITH HEADER LINE.
3082   DATA: watokens TYPE stokes.
3083   DATA: wacurrenttoken TYPE stokes.
3084   DATA: waconcept LIKE LINE OF iconcepts.
3085   DATA: tokenlength TYPE i.
3086   DATA: myrow TYPE i.
3087   castclassname = publicclasskey.
3088   READ REPORT castclassname INTO itemplines.
3089   APPEND 'CONSTANTS' TO ikeywords.
3090   SCAN ABAP-SOURCE itemplines TOKENS INTO itokens STATEMENTS INTO istatements KEYWORDS FROM ikeywords.
3091   DELETE itokens WHERE str = 'CONSTANTS'.
3092   DELETE itokens WHERE str = 'VALUE'.
3093   DELETE itokens WHERE str = 'TYPE'.
3094   LOOP AT itokens INTO watokens WHERE str = 'SOTR_CONC'.
3095     myrow = sy-tabix - 1.
3096     READ TABLE itokens INDEX myrow INTO wacurrenttoken.
3097     waconcept-constname = wacurrenttoken-str.
3098     myrow = myrow + 2.
3099     READ TABLE itokens INDEX myrow INTO wacurrenttoken.
3100     tokenlength = strlen( wacurrenttoken-str ).
3101     IF tokenlength = 34.
3102       REPLACE ALL OCCURRENCES OF '''' IN wacurrenttoken-str WITH ' ' .
3103       waconcept-concept = wacurrenttoken-str.
3104       APPEND waconcept TO iconcepts.
3105     ENDIF.
3106   ENDLOOP.
3107 ENDFORM.
3108 FORM findclassmethods USING VALUE(classname)
3109                             ilocmethods LIKE dumimethods[].
3110   DATA: imethods TYPE STANDARD TABLE OF tmethod WITH HEADER LINE.
3111   DATA: iredefinedmethods TYPE STANDARD TABLE OF seoredef WITH HEADER LINE.
3112   DATA: originalclassname TYPE seoclsname.
3113   DATA: wamethod LIKE LINE OF imethods.
3114   SELECT cmpname descript exposure
3115          FROM vseomethod
3116          INTO CORRESPONDING FIELDS OF TABLE imethods
3117            WHERE clsname = classname
3118              AND version = '1'
3119              AND langu = pmlang
3120              AND ( state = '0' OR state = '1' ).
3121   IF sy-subrc <> 0.
3122     SELECT cmpname descript exposure
3123            FROM vseomethod
3124            INTO CORRESPONDING FIELDS OF TABLE imethods
3125            WHERE clsname = classname
3126              AND version = '0'
3127              AND langu = pmlang
3128              AND ( state = '0' OR state = '1' ).
3129   ENDIF.
3130   SELECT *
3131          FROM seoredef
3132          INTO TABLE iredefinedmethods
3133          WHERE clsname = classname
3134            AND version = '1'.
3135   LOOP AT iredefinedmethods.
3136     PERFORM findredefinitionclass USING iredefinedmethods-refclsname
3137                                         iredefinedmethods-mtdname
3138                                         originalclassname.
3139     wamethod-cmpname = iredefinedmethods-mtdname.
3140     SELECT SINGLE descript exposure
3141         FROM vseomethod
3142         INTO CORRESPONDING FIELDS OF  wamethod
3143           WHERE clsname = originalclassname
3144             AND cmpname = iredefinedmethods-mtdname
3145             AND version = '1'
3146             AND langu = pmlang
3147             AND ( state = '0' OR state = '1' ).
3148     CONCATENATE `Redefined: ` wamethod-descript INTO wamethod-descript.
3149     APPEND wamethod TO imethods.
3150   ENDLOOP.
3151   LOOP AT imethods.
3152     PERFORM findmethodkey USING classname
3153                                 imethods-cmpname
3154                                 imethods-methodkey.
3155     APPEND imethods TO ilocmethods.
3156   ENDLOOP.
3157 ENDFORM.
3158 FORM findredefinitionclass USING VALUE(redefinedclassname) TYPE seoclsname
3159                                  VALUE(methodname) TYPE seocpdname
3160                                        originalclassname TYPE seoclsname.
3161   DATA: waredef TYPE seoredef.
3162   SELECT SINGLE *
3163          FROM seoredef
3164          INTO waredef
3165          WHERE refclsname = redefinedclassname
3166            AND mtdname = methodname.
3167   IF sy-subrc = 0.
3168     originalclassname = waredef-refclsname.
3169     PERFORM findredefinitionclassrecur USING waredef-refclsname
3170                                              waredef-mtdname
3171                                              originalclassname.
3172   ELSE.
3173     originalclassname = waredef-refclsname.
3174   ENDIF.
3175 ENDFORM.
3176 FORM findredefinitionclassrecur USING VALUE(redefinedclassname) TYPE seoclsname
3177                                  VALUE(methodname) TYPE seocpdname
3178                                        originalclassname TYPE seoclsname.
3179   DATA: waredef TYPE seoredef.
3180   SELECT SINGLE *
3181          FROM seoredef
3182          INTO waredef
3183          WHERE clsname = redefinedclassname
3184            AND mtdname = methodname.
3185   IF sy-subrc = 0.
3186     originalclassname = waredef-refclsname.
3187     PERFORM findredefinitionclassrecur USING waredef-refclsname
3188                                              waredef-mtdname
3189                                              originalclassname.
3190   ENDIF.
3191 ENDFORM.
3192 FORM findmethodkey USING VALUE(classname)
3193                          VALUE(methodname)
3194                                methodkey.
3195   DATA: methodid TYPE seocpdkey.
3196   DATA: locmethodkey TYPE program.
3197   methodid-clsname = classname.
3198   methodid-cpdname = methodname.
3199   cl_oo_classname_service=>get_method_include( EXPORTING mtdkey = methodid
3200                                                RECEIVING result = locmethodkey
3201                                                EXCEPTIONS class_not_existing = 1
3202                                                           method_not_existing = 2 ).
3203   methodkey = locmethodkey.
3204 ENDFORM.
3205 FORM scanformessages USING VALUE(programname)
3206                            VALUE(mainmessageclass)
3207                                  ilocmessages LIKE imessages[].
3208   DATA: iincludelines TYPE STANDARD TABLE OF string WITH HEADER LINE.
3209   DATA: itokens TYPE STANDARD TABLE OF stokes WITH HEADER LINE.
3210   DATA: istatements TYPE STANDARD TABLE OF sstmnt WITH HEADER LINE.
3211   DATA: ikeywords TYPE STANDARD TABLE OF text20 WITH HEADER LINE.
3212   DATA: wamessage TYPE tmessage.
3213   DATA: wamessagecomparison TYPE tmessage.
3214   DATA: watokens TYPE stokes.
3215   DATA: nextline TYPE i.
3216   DATA: stringlength TYPE i VALUE 0.
3217   DATA: workingonmessage TYPE abap_bool VALUE false.
3218   DATA: castprogramname TYPE program.
3219   castprogramname = programname.
3220   READ REPORT castprogramname INTO iincludelines.
3221   APPEND message TO ikeywords.
3222   SCAN ABAP-SOURCE iincludelines TOKENS INTO itokens WITH INCLUDES STATEMENTS INTO istatements KEYWORDS FROM ikeywords.
3223   CLEAR iincludelines[].
3224   LOOP AT itokens.
3225     IF itokens-str = message.
3226       workingonmessage = true.
3227       CONTINUE.
3228     ENDIF.
3229     IF workingonmessage = true.
3230       stringlength = strlen( itokens-str ).
3231       IF stringlength = 4 AND itokens-str+0(1) CA sy-abcde.
3232         wamessage-msgnr = itokens-str+1(3).
3233         wamessage-arbgb = mainmessageclass.
3234       ELSE.
3235         IF itokens-str CS '''' OR itokens-str CS '`'.
3236           TRANSLATE itokens-str USING ''' '.
3237           TRANSLATE itokens-str USING '` '.
3238           CONDENSE itokens-str.
3239           SHIFT itokens-str LEFT DELETING LEADING space.
3240           wamessage-text = itokens-str.
3241           wamessage-arbgb = 'Hard coded'.
3242         ELSE.
3243           IF itokens-str = 'ID'.
3244             nextline = sy-tabix + 1.
3245             READ TABLE itokens INDEX nextline INTO watokens.
3246             TRANSLATE watokens-str USING ''' '.
3247             CONDENSE itokens-str.
3248             SHIFT watokens-str LEFT DELETING LEADING space.
3249             IF NOT watokens-str = 'SY-MSGID'.
3250               wamessage-arbgb = watokens-str.
3251               nextline = nextline + 4.
3252               READ TABLE itokens INDEX nextline INTO watokens.
3253               TRANSLATE watokens-str USING ''' '.
3254               CONDENSE watokens-str.
3255               SHIFT watokens-str LEFT DELETING LEADING space.
3256               wamessage-msgnr = watokens-str.
3257             ELSE.
3258               workingonmessage = false.
3259             ENDIF.
3260           ELSE.
3261             IF stringlength >= 5 AND itokens-str+4(1) = '('.
3262               wamessage-msgnr = itokens-str+1(3).
3263               SHIFT itokens-str LEFT UP TO '('.
3264               REPLACE '(' INTO itokens-str WITH space.
3265               REPLACE ')' INTO itokens-str WITH space.
3266               CONDENSE itokens-str.
3267               wamessage-arbgb = itokens-str.
3268             ENDIF.
3269           ENDIF.
3270         ENDIF.
3271       ENDIF.
3272       IF NOT wamessage-arbgb IS INITIAL AND NOT wamessage-msgnr IS INITIAL AND wamessage-text IS INITIAL.
3273         SELECT SINGLE text
3274                       FROM t100
3275                       INTO wamessage-text
3276                       WHERE sprsl = pmlang
3277                         AND arbgb = wamessage-arbgb
3278                         AND msgnr = wamessage-msgnr.
3279       ENDIF.
3280       IF NOT wamessage IS INITIAL.
3281         IF NOT wamessage-text IS INITIAL.
3282           READ TABLE ilocmessages WITH KEY arbgb = wamessage-arbgb
3283                                            msgnr = wamessage-msgnr
3284                                            INTO wamessagecomparison.
3285           IF sy-subrc <> 0.
3286             APPEND wamessage TO ilocmessages.
3287           ENDIF.
3288         ENDIF.
3289         CLEAR wamessage.
3290         workingonmessage = false.
3291       ENDIF.
3292     ENDIF.
3293   ENDLOOP.
3294 ENDFORM.
3295 FORM scanfortables USING VALUE(programname)
3296                          VALUE(customeronly)
3297                          VALUE(customernamerange)
3298                                ilocdictionary LIKE idictionary[].
3299   DATA: iincludelines TYPE STANDARD TABLE OF string WITH HEADER LINE.
3300   DATA: itokens TYPE STANDARD TABLE OF stokes WITH HEADER LINE.
3301   DATA: istatements TYPE STANDARD TABLE OF sstmnt WITH HEADER LINE.
3302   DATA: ikeywords TYPE STANDARD TABLE OF text20 WITH HEADER LINE.
3303   DATA: wadictionary TYPE tdicttable.
3304   DATA: wadictionarycomparison TYPE tdicttable.
3305   DATA: castprogramname TYPE program.
3306   castprogramname = programname.
3307   READ REPORT castprogramname INTO iincludelines.
3308   APPEND tables TO ikeywords.
3309   SCAN ABAP-SOURCE iincludelines TOKENS INTO itokens WITH INCLUDES STATEMENTS INTO istatements KEYWORDS FROM ikeywords.
3310   CLEAR iincludelines[].
3311   SORT itokens ASCENDING BY str.
3312   DELETE itokens WHERE str = tables.
3313   LOOP AT itokens.
3314     IF NOT customeronly IS INITIAL.
3315       TRY.
3316           CASE itokens-str+0(1).
3317             WHEN 'Y' OR 'Z' OR customernamerange.
3318             WHEN OTHERS.
3319               CONTINUE.
3320           ENDCASE.
3321         CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
3322       ENDTRY.
3323     ENDIF.
3324     wadictionary-tablename = itokens-str.
3325     READ TABLE ilocdictionary INTO wadictionarycomparison WITH KEY tablename = wadictionary-tablename.
3326     IF sy-subrc <> 0.
3327       PERFORM findtabledescription USING wadictionary-tablename
3328                                          wadictionary-tabletitle.
3329       PERFORM findtabledefinition USING wadictionary-tablename
3330                                         wadictionary-istructure[].
3331       APPEND wadictionary TO ilocdictionary.
3332     ENDIF.
3333   ENDLOOP.
3334 ENDFORM.
3335 FORM findprogramscreenflow USING waprogram TYPE tprogram.
3336   DATA: iflow TYPE STANDARD TABLE OF tscreenflow WITH HEADER LINE.
3337   CALL FUNCTION 'DYNPRO_PROCESSINGLOGIC'
3338     EXPORTING
3339       rep_name  = waprogram-progname
3340     TABLES
3341       scr_logic = iflow.
3342   SORT iflow ASCENDING BY screen.
3343   DELETE ADJACENT DUPLICATES FROM iflow COMPARING screen.
3344   IF waprogram-subc <> 'M'.
3345     DELETE iflow WHERE screen >= '1000' AND screen <= '1099'.
3346   ENDIF.
3347   LOOP AT iflow.
3348     APPEND iflow TO waprogram-iscreenflow.
3349   ENDLOOP.
3350 ENDFORM.
3351 FORM findmainfunctioninclude USING VALUE(programname)
3352                                    VALUE(functiongroup)
3353                                    VALUE(functionincludeno)
3354                                          functionincludename.
3355   DATA: namespace        TYPE string,
3356         iresults         TYPE match_result_tab,
3357         waresult         TYPE match_result,
3358         startingposition TYPE i.
3359   FIND ALL OCCURRENCES OF '/' IN functiongroup RESULTS iresults.
3360   IF sy-subrc = 0.
3361     READ TABLE iresults INDEX sy-tfill INTO waresult.
3362     startingposition = waresult-offset + 1.
3363     namespace = functiongroup+0(startingposition).
3364     functiongroup = functiongroup+startingposition.
3365   ENDIF.
3366   CONCATENATE namespace 'L' functiongroup 'U' functionincludeno INTO functionincludename.
3367 ENDFORM.
3368 FORM findfunctiontopinclude USING VALUE(programname)
3369                                   VALUE(functiongroup)
3370                                         topincludename.
3371   DATA: namespace        TYPE string,
3372         iresults         TYPE match_result_tab,
3373         waresult         TYPE match_result,
3374         startingposition TYPE i.
3375   FIND ALL OCCURRENCES OF '/' IN functiongroup RESULTS iresults.
3376   IF sy-subrc = 0.
3377     READ TABLE iresults INDEX sy-tfill INTO waresult.
3378     startingposition = waresult-offset + 1.
3379     namespace = functiongroup+0(startingposition).
3380     functiongroup = functiongroup+startingposition.
3381   ENDIF.
3382   CONCATENATE namespace 'L' functiongroup 'TOP' INTO topincludename.
3383 ENDFORM.
3384 FORM findfunctionscreenflow USING wafunction TYPE tfunction.
3385   DATA: iflow TYPE STANDARD TABLE OF tscreenflow WITH HEADER LINE.
3386   CALL FUNCTION 'DYNPRO_PROCESSINGLOGIC'
3387     EXPORTING
3388       rep_name  = wafunction-progname
3389     TABLES
3390       scr_logic = iflow.
3391   SORT iflow ASCENDING BY screen.
3392   DELETE ADJACENT DUPLICATES FROM iflow COMPARING screen.
3393   LOOP AT iflow.
3394     APPEND iflow TO wafunction-iscreenflow.
3395   ENDLOOP.
3396 ENDFORM.
3397 FORM scanforlikeortype USING VALUE(programname)
3398                              VALUE(customeronly)
3399                              VALUE(customernamerange)
3400                              ilocdictionary LIKE idictionary[]
3401                              iloctabletypes LIKE itabletypes[].
3402   DATA ilines TYPE STANDARD TABLE OF string WITH HEADER LINE.
3403   DATA: head TYPE string.
3404   DATA: tail TYPE string.
3405   DATA: junk TYPE string.
3406   DATA: linetype TYPE string.
3407   DATA: linelength TYPE i VALUE 0.
3408   DATA: endofline TYPE abap_bool VALUE true.
3409   DATA: wadictionary TYPE tdicttable.
3410   DATA: wadictionarycomparison TYPE tdicttable.
3411   DATA: waline TYPE string.
3412   DATA: castprogramname TYPE program.
3413   castprogramname = programname.
3414   READ REPORT castprogramname INTO ilines.
3415   LOOP AT ilines INTO waline.
3416     linelength = strlen( waline ).
3417     IF linelength > 0.
3418       IF waline(1) = asterix.
3419         CONTINUE.
3420       ENDIF.
3421       TRANSLATE waline TO UPPER CASE.
3422       IF endofline = true.
3423         SHIFT waline UP TO like.
3424         IF sy-subrc = 0.
3425           linetype = like.
3426         ELSE.
3427           SHIFT waline UP TO type.
3428           IF sy-subrc = 0.
3429             FIND 'BEGIN OF' IN waline.
3430             IF sy-subrc <> 0.
3431               FIND 'END OF' IN waline.
3432               IF sy-subrc <> 0.
3433                 FIND 'VALUE' IN waline.
3434                 IF sy-subrc <> 0.
3435                   linetype = type.
3436                 ENDIF.
3437               ENDIF.
3438             ENDIF.
3439           ELSE.
3440             SHIFT waline UP TO include.
3441             IF sy-subrc = 0.
3442               SPLIT waline AT space INTO junk ilines.
3443             ENDIF.
3444             SHIFT waline UP TO structure.
3445             IF sy-subrc = 0.
3446               linetype = structure.
3447             ELSE.
3448               CONTINUE.
3449             ENDIF.
3450           ENDIF.
3451         ENDIF.
3452       ELSE.
3453         linetype = comma.
3454       ENDIF.
3455       CASE linetype.
3456         WHEN like OR type OR structure.
3457           SHIFT waline UP TO space.
3458           SHIFT waline LEFT DELETING LEADING space.
3459           IF waline CS table.
3460             SPLIT waline AT table INTO head tail.
3461             SPLIT tail AT 'OF' INTO head tail.
3462             waline = tail.
3463             SHIFT waline LEFT DELETING LEADING space.
3464             REPLACE ALL OCCURRENCES OF 'WITH HEADER LINE' IN waline WITH ''.
3465           ENDIF.
3466           IF NOT customeronly IS INITIAL.
3467             TRY.
3468                 IF waline+0(1) = 'Y' OR waline+0(1) = 'Z' OR waline CS customernamerange.
3469                 ELSE.
3470                   linetype = ''.
3471                   CONTINUE.
3472                 ENDIF.
3473               CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
3474             ENDTRY.
3475           ENDIF.
3476           IF waline CS comma.
3477             SPLIT waline AT comma INTO head tail.
3478             IF waline CS dash.
3479               SPLIT head AT dash INTO head tail.
3480             ENDIF.
3481             IF waline CS occurs.
3482               SPLIT waline AT space INTO head tail.
3483             ENDIF.
3484           ELSE.
3485             IF waline CS period.
3486               SPLIT waline AT period INTO head tail.
3487               IF waline CS dash.
3488                 SPLIT head AT dash INTO head tail.
3489               ENDIF.
3490               IF waline CS occurs.
3491                 SPLIT waline AT space INTO head tail.
3492               ENDIF.
3493             ELSE.
3494               SPLIT waline AT space INTO head tail.
3495               IF waline CS dash.
3496                 SPLIT head AT dash INTO head tail.
3497               ENDIF.
3498             ENDIF.
3499           ENDIF.
3500           IF NOT head IS INITIAL.
3501             wadictionary-tablename = head.
3502             READ TABLE ilocdictionary INTO wadictionarycomparison
3503                                       WITH KEY tablename = wadictionary-tablename.
3504             IF sy-subrc <> 0.
3505               PERFORM findtabledescription USING wadictionary-tablename
3506                                                  wadictionary-tabletitle.
3507               PERFORM findtabledefinition USING wadictionary-tablename
3508                                                 wadictionary-istructure[].
3509               IF wadictionary-istructure[] IS INITIAL.
3510                 PERFORM checkandaddtabletype USING wadictionary-tablename
3511                                                    iloctabletypes[].
3512               ELSE.
3513                 APPEND wadictionary TO ilocdictionary.
3514               ENDIF.
3515             ENDIF.
3516             CLEAR wadictionary.
3517           ENDIF.
3518           linetype = ''.
3519       ENDCASE.
3520     ENDIF.
3521   ENDLOOP.
3522 ENDFORM.
3523 FORM displaystatus USING VALUE(message)
3524                          VALUE(delay).
3525   CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
3526     EXPORTING
3527       percentage = 0
3528       text       = message
3529     EXCEPTIONS
3530       OTHERS     = 1.
3531   IF delay > 0.
3532     WAIT UP TO delay SECONDS.
3533   ENDIF.
3534 ENDFORM.
3535 FORM removeleadingzeros CHANGING myvalue.
3536   CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
3537     EXPORTING
3538       input  = myvalue
3539     IMPORTING
3540       output = myvalue
3541     EXCEPTIONS
3542       OTHERS = 1.
3543 ENDFORM.
3544 FORM determinefrontendopsystem USING separator
3545                                      operatingsystem.
3546   DATA: platformid TYPE i VALUE 0.
3547   CREATE OBJECT objfile.
3548   CALL METHOD objfile->get_platform
3549     RECEIVING
3550       platform             = platformid
3551     EXCEPTIONS
3552       cntl_error           = 1
3553       error_no_gui         = 2
3554       not_supported_by_gui = 3.
3555   CASE platformid.
3556     WHEN objfile->platform_windows95
3557          OR objfile->platform_windows98
3558          OR objfile->platform_nt351
3559          OR objfile->platform_nt40
3560          OR objfile->platform_nt50
3561          OR objfile->platform_mac
3562          OR objfile->platform_os2
3563          OR 14.      "XP
3564       separator = '\'.
3565       operatingsystem = non_unix.
3566     WHEN OTHERS.
3567       separator = '/'.
3568       operatingsystem = unix.
3569   ENDCASE.
3570 ENDFORM.
3571 FORM determineserveropsystem USING separator
3572                                    serverfilesystem
3573                                    serveropsystem.
3574 
3575   SELECT SINGLE filesys
3576                 FROM opsystem
3577                 INTO serverfilesystem
3578                 WHERE opsys = sy-opsys.
3579   FIND 'WINDOWS' IN serverfilesystem IGNORING CASE.
3580   IF sy-subrc = 0.
3581     separator = '\'.
3582     serveropsystem = non_unix.
3583     serverfilesystem = 'Windows NT'.
3584   ELSE.
3585     FIND 'DOS' IN serverfilesystem IGNORING CASE.
3586     IF sy-subrc = 0.
3587       separator = '\'.
3588       serveropsystem = non_unix.
3589     ELSE.
3590       separator = '/'.
3591       serveropsystem = unix.
3592     ENDIF.
3593   ENDIF.
3594 ENDFORM.
3595 FORM findexternalcommand USING VALUE(locserverfilesystem).
3596   DATA: castserveropsys TYPE syopsys.
3597   castserveropsys = locserverfilesystem.
3598   CALL FUNCTION 'SXPG_COMMAND_CHECK'
3599     EXPORTING
3600       commandname       = 'ZDTX_MKDIR'
3601       operatingsystem   = castserveropsys
3602     EXCEPTIONS
3603       command_not_found = 1
3604       OTHERS            = 0.
3605   IF sy-subrc <> 0.
3606     LOOP AT SCREEN.
3607       IF screen-name = 'PLOGICAL'.
3608         screen-input = 0.
3609         MODIFY SCREEN.
3610       ENDIF.
3611       IF screen-name = 'PSERV'.
3612         screen-input = 0.
3613         MODIFY SCREEN.
3614       ENDIF.
3615       IF screen-name = 'PPC'.
3616         screen-input = 0.
3617         MODIFY SCREEN.
3618       ENDIF.
3619     ENDLOOP.
3620     MESSAGE s000(oo) WITH 'Download to server disabled,' 'external command ZDTX_MKDIR not defined.'.
3621   ENDIF.
3622 ENDFORM.
3623 FORM downloadddstructures USING ilocdictionary LIKE idictionary[]
3624                                 ilocdictionaryfilename LIKE idictfilename[]
3625                                 VALUE(pathname)
3626                                 VALUE(htmlfileextension)
3627                                 VALUE(subdir)
3628                                 VALUE(sorttablesasc)
3629                                 VALUE(slashseparator)
3630                                 VALUE(savetoserver)
3631                                 VALUE(displayprogressmessage)
3632                                 VALUE(locserverfilesystem)
3633                                 VALUE(addbackground) TYPE abap_bool.
3634   FIELD-SYMBOLS: <wadictionary> TYPE tdicttable.
3635   DATA: tablefilename TYPE string.
3636   DATA: tablefilenamewithpath TYPE string.
3637   DATA: ihtmltable TYPE STANDARD TABLE OF string WITH HEADER LINE.
3638   DATA: newsubdirectory TYPE string.
3639   DATA: completesavepath TYPE string.
3640   DATA: wadictfilename LIKE LINE OF ilocdictionaryfilename.
3641   LOOP AT ilocdictionary ASSIGNING <wadictionary>.
3642     PERFORM buildfilename USING pathname
3643                                 subdir
3644                                 <wadictionary>-tablename
3645                                 space
3646                                 space
3647                                 htmlfileextension
3648                                 is_table
3649                                 savetoserver
3650                                 slashseparator
3651                                 tablefilenamewithpath
3652                                 tablefilename
3653                                 newsubdirectory
3654                                 completesavepath.
3655     READ TABLE ilocdictionaryfilename INTO wadictfilename WITH KEY tablename = <wadictionary>-tablename
3656                                                                    filename = completesavepath.
3657     IF sy-subrc <> 0.
3658       IMPORT ihtmltable FROM MEMORY ID <wadictionary>-tablename.
3659       IF sy-subrc <> 0.
3660         IF displayprogressmessage = abap_true.
3661           CONCATENATE 'Converting table' <wadictionary>-tablename 'to html' INTO statusbarmessage SEPARATED BY space.
3662           PERFORM displaystatus USING statusbarmessage 0.
3663         ENDIF.
3664         PERFORM convertddtohtml USING <wadictionary>-istructure[]
3665                                       ihtmltable[]
3666                                       <wadictionary>-tablename
3667                                       <wadictionary>-tabletitle
3668                                       sorttablesasc
3669                                       addbackground.
3670         EXPORT ihtmltable TO MEMORY ID <wadictionary>-tablename.
3671       ENDIF.
3672       IF savetoserver IS INITIAL.
3673         PERFORM savefiletopc USING ihtmltable[]
3674                                    tablefilenamewithpath
3675                                    tablefilename
3676                                    space
3677                                    space
3678                                    displayprogressmessage.
3679       ELSE.
3680         PERFORM savefiletoserver USING ihtmltable[]
3681                                        tablefilenamewithpath
3682                                        tablefilename
3683                                        completesavepath
3684                                        displayprogressmessage
3685                                        locserverfilesystem.
3686       ENDIF.
3687       wadictfilename-tablename = <wadictionary>-tablename.
3688       wadictfilename-filename = completesavepath.
3689       APPEND wadictfilename TO ilocdictionaryfilename.
3690       CLEAR wadictfilename.
3691     ENDIF.
3692 
3693     CLEAR ihtmltable[].
3694   ENDLOOP.
3695 ENDFORM.
3696 FORM downloadddtabletypes USING iloctabletypes LIKE itabletypes[]
3697                                 iloctabletypefilename LIKE idictfilename[]
3698                                 VALUE(pathname)
3699                                 VALUE(htmlfileextension)
3700                                 VALUE(subdir)
3701                                 VALUE(sorttablesasc)
3702                                 VALUE(slashseparator)
3703                                 VALUE(savetoserver)
3704                                 VALUE(displayprogressmessage)
3705                                 VALUE(locserverfilesystem)
3706                                 VALUE(addbackground) TYPE abap_bool.
3707   FIELD-SYMBOLS: <watabletypes> LIKE LINE OF iloctabletypes.
3708   FIELD-SYMBOLS <wattfilename> LIKE LINE OF iloctabletypefilename[].
3709   DATA: tablefilename TYPE string.
3710   DATA: tablefilenamewithpath TYPE string.
3711   DATA: ihtmltable TYPE STANDARD TABLE OF string WITH HEADER LINE.
3712   DATA: newsubdirectory TYPE string.
3713   DATA: completesavepath TYPE string.
3714   LOOP AT iloctabletypes ASSIGNING <watabletypes>.
3715     PERFORM buildfilename USING pathname
3716                                 subdir
3717                                 <watabletypes>-typename
3718                                 space
3719                                 space
3720                                 htmlfileextension
3721                                 is_table
3722                                 savetoserver
3723                                 slashseparator
3724                                 tablefilenamewithpath
3725                                 tablefilename
3726                                 newsubdirectory
3727                                 completesavepath.
3728     READ TABLE iloctabletypefilename INTO <wattfilename> WITH KEY tablename = <watabletypes>-typename
3729                                                                    filename = completesavepath.
3730     IF sy-subrc <> 0.
3731       IMPORT ihtmltable FROM MEMORY ID <watabletypes>-typename.
3732       IF sy-subrc <> 0.
3733         IF displayprogressmessage = abap_true.
3734           CONCATENATE 'Converting table type' <watabletypes>-typename 'to html' INTO statusbarmessage SEPARATED BY space.
3735           PERFORM displaystatus USING statusbarmessage 0.
3736         ENDIF.
3737         PERFORM converttabletypetohtml USING iloctabletypes[]
3738                                              ihtmltable[]
3739                                              <watabletypes>-typename
3740                                              <watabletypes>-ddtext
3741                                              sorttablesasc
3742                                              addbackground.
3743         IF savetoserver IS INITIAL.
3744           PERFORM savefiletopc USING ihtmltable[]
3745                                      tablefilenamewithpath
3746                                      tablefilename
3747                                      space
3748                                      space
3749                                      displayprogressmessage.
3750         ELSE.
3751           PERFORM savefiletoserver USING ihtmltable[]
3752                                          tablefilenamewithpath
3753                                          tablefilename
3754                                          completesavepath
3755                                          displayprogressmessage
3756                                          locserverfilesystem.
3757         ENDIF.
3758       ENDIF.
3759     ENDIF.
3760     CLEAR ihtmltable[].
3761   ENDLOOP.
3762 ENDFORM.
3763 FORM downloadmessageclass USING ilocmessages LIKE imessages[]
3764                                 VALUE(messageclassname)
3765                                 VALUE(userfilepath)
3766                                 VALUE(fileextension)
3767                                 VALUE(htmlfileflag)
3768                                       subdir
3769                                 VALUE(customernamerange)
3770                                 VALUE(getincludes)
3771                                 VALUE(getdictstructures)
3772                                 VALUE(userhasselectedmessageclasses)
3773                                 VALUE(slashseparator)
3774                                 VALUE(savetoserver)
3775                                 VALUE(displayprogressmessage)
3776                                 VALUE(locserverfilesystem)
3777                                 VALUE(addbackground) TYPE abap_bool.
3778   DATA: htmlpagename TYPE string.
3779   DATA: newfilenameonly TYPE string.
3780   DATA: newfilenamewithpath TYPE string.
3781   DATA: ihtmltable TYPE STANDARD TABLE OF string WITH HEADER LINE.
3782   DATA: newsubdirectory TYPE string.
3783   DATA: completesavepath TYPE string.
3784   PERFORM appendmessagestofile USING ilocmessages[]
3785                                      ihtmltable[]
3786                                      userhasselectedmessageclasses.
3787   CONCATENATE `message class ` messageclassname INTO htmlpagename.
3788   IF htmlfileflag IS INITIAL.
3789     APPEND '' TO ihtmltable.
3790     APPEND  '----------------------------------------------------------------------------------' TO ihtmltable.
3791     PERFORM buildfootermessage USING ihtmltable.
3792     APPEND ihtmltable.
3793   ELSE.
3794     PERFORM convertcodetohtml USING ihtmltable[]
3795                                     htmlpagename
3796                                     space
3797                                     is_messageclass
3798                                     ''
3799                                     false
3800                                     fileextension
3801                                     customernamerange
3802                                     getincludes
3803                                     getdictstructures
3804                                     addbackground.
3805   ENDIF.
3806   PERFORM buildfilename USING userfilepath
3807                               subdir
3808                               messageclassname
3809                               space
3810                               space
3811                               fileextension
3812                               is_messageclass
3813                               savetoserver
3814                               slashseparator
3815                               newfilenamewithpath
3816                               newfilenameonly
3817                               newsubdirectory
3818                               completesavepath.
3819   IF savetoserver IS INITIAL.
3820     PERFORM savefiletopc USING ihtmltable[]
3821                                newfilenamewithpath
3822                                newfilenameonly
3823                                space
3824                                space
3825                                displayprogressmessage.
3826   ELSE.
3827     PERFORM savefiletoserver USING ihtmltable[]
3828                                    newfilenamewithpath
3829                                    newfilenameonly
3830                                    completesavepath
3831                                    displayprogressmessage
3832                                    locserverfilesystem.
3833   ENDIF.
3834 ENDFORM.
3835 FORM appendmessagestofile USING ilocmessages LIKE imessages[]
3836                                 ilochtml LIKE dumihtml[]
3837                                 VALUE(userhasselectedmessageclasses).
3838   DATA: previousmessageid LIKE imessages-arbgb.
3839   FIELD-SYMBOLS: <wamessage> TYPE tmessage.
3840   DATA: wahtml TYPE string.
3841   SORT ilocmessages ASCENDING BY arbgb msgnr.
3842   IF NOT ilocmessages[] IS INITIAL.
3843     IF userhasselectedmessageclasses IS INITIAL.
3844       APPEND wahtml TO ilochtml.
3845       APPEND wahtml TO ilochtml.
3846       APPEND '*Messages' TO ilochtml.
3847       APPEND '*----------------------------------------------------------' TO ilochtml.
3848     ENDIF.
3849     LOOP AT ilocmessages ASSIGNING <wamessage>.
3850       IF ( <wamessage>-arbgb <> previousmessageid ).
3851         IF userhasselectedmessageclasses IS INITIAL.
3852           APPEND '*' TO ilochtml.
3853           CONCATENATE `* Message class: ` <wamessage>-arbgb INTO wahtml.
3854           APPEND wahtml TO ilochtml.
3855         ENDIF.
3856         previousmessageid = <wamessage>-arbgb.
3857         CLEAR wahtml.
3858       ENDIF.
3859       IF userhasselectedmessageclasses IS INITIAL.
3860         CONCATENATE '*' <wamessage>-msgnr `   ` <wamessage>-text INTO wahtml.
3861       ELSE.
3862         CONCATENATE <wamessage>-msgnr `   ` <wamessage>-text INTO wahtml.
3863       ENDIF.
3864       APPEND wahtml TO ilochtml.
3865     ENDLOOP.
3866   ENDIF.
3867 ENDFORM.
3868 FORM downloadfunctions USING ilocfunctions LIKE ifunctions[]
3869                              ilocdictionaryfilename LIKE idictfilename[]
3870                              iloctabletypefilename LIKE itabletypefilename[]
3871                              VALUE(userfilepath)
3872                              VALUE(fileextension)
3873                              VALUE(subdir)
3874                              VALUE(downloaddocumentation)
3875                              VALUE(converttohtml)
3876                              VALUE(customernamerange)
3877                              VALUE(getincludes)
3878                              VALUE(getdictstruct)
3879                              VALUE(textfileextension)
3880                              VALUE(htmlfileextension)
3881                              VALUE(sorttablesasc)
3882                              VALUE(slashseparator)
3883                              VALUE(savetoserver)
3884                              VALUE(displayprogressmessage)
3885                              VALUE(locserverfilesystem)
3886                              VALUE(addbackground) TYPE abap_bool.
3887   DATA: mainsubdir TYPE string.
3888   DATA: incsubdir TYPE string.
3889   FIELD-SYMBOLS: <wafunction> TYPE tfunction.
3890   FIELD-SYMBOLS: <wainclude> TYPE tinclude.
3891   DATA: iemptytextelements TYPE STANDARD TABLE OF ttexttable.
3892   DATA: iemptyselectiontexts TYPE STANDARD TABLE OF ttexttable.
3893   DATA: iemptymessages TYPE STANDARD TABLE OF tmessage.
3894   DATA: iemptyguititles TYPE STANDARD TABLE OF tguititle.
3895   DATA: functiondocumentationexists TYPE abap_bool VALUE false.
3896   LOOP AT ilocfunctions ASSIGNING <wafunction>.
3897     IF subdir IS INITIAL.
3898       incsubdir = <wafunction>-functionname.
3899       mainsubdir = ''.
3900     ELSE.
3901       CONCATENATE subdir <wafunction>-functionname INTO incsubdir SEPARATED BY slashseparator.
3902       mainsubdir = subdir.
3903     ENDIF.
3904     IF NOT downloaddocumentation IS INITIAL.
3905       PERFORM downloadfunctiondocs USING <wafunction>-functionname
3906                                          <wafunction>-functiontitle
3907                                          userfilepath
3908                                          fileextension
3909                                          converttohtml
3910                                          slashseparator
3911                                          savetoserver
3912                                          displayprogressmessage
3913                                          mainsubdir
3914                                          functiondocumentationexists
3915                                          locserverfilesystem
3916                                          addbackground.
3917     ENDIF.
3918     PERFORM readfunctionanddownload USING <wafunction>-itextelements[]
3919                                           <wafunction>-iselectiontexts[]
3920                                           <wafunction>-imessages[]
3921                                           <wafunction>-functionname
3922                                           <wafunction>-functionmaininclude
3923                                           <wafunction>-functiontitle
3924                                           userfilepath
3925                                           fileextension
3926                                           mainsubdir
3927                                           converttohtml
3928                                           functiondocumentationexists
3929                                           customernamerange
3930                                           getincludes
3931                                           getdictstruct
3932                                           slashseparator
3933                                           savetoserver
3934                                           displayprogressmessage
3935                                           locserverfilesystem
3936                                           addbackground.
3937     PERFORM readincludeanddownload USING iemptytextelements[]
3938                                          iemptyselectiontexts[]
3939                                          iemptymessages[]
3940                                          iemptyguititles[]
3941                                          <wafunction>-topincludename
3942                                          <wafunction>-functionname
3943                                          <wafunction>-functiontitle
3944                                          is_function
3945                                          userfilepath
3946                                          fileextension
3947                                          mainsubdir
3948                                          converttohtml
3949                                          customernamerange
3950                                          getincludes
3951                                          getdictstruct
3952                                          slashseparator
3953                                          savetoserver
3954                                          displayprogressmessage
3955                                          locserverfilesystem
3956                                          addbackground.
3957     IF NOT <wafunction>-iscreenflow[] IS INITIAL.
3958       PERFORM downloadscreens USING <wafunction>-iscreenflow[]
3959                                     <wafunction>-progname
3960                                     userfilepath
3961                                     textfileextension
3962                                     mainsubdir
3963                                     slashseparator
3964                                     savetoserver
3965                                     displayprogressmessage
3966                                     locserverfilesystem.
3967     ENDIF.
3968     IF NOT <wafunction>-iguititle[] IS INITIAL.
3969       PERFORM downloadguititles USING <wafunction>-iguititle
3970                                       userfilepath
3971                                       textfileextension
3972                                       mainsubdir
3973                                       slashseparator
3974                                       savetoserver
3975                                       displayprogressmessage
3976                                       locserverfilesystem.
3977     ENDIF.
3978     LOOP AT <wafunction>-iincludes ASSIGNING <wainclude>.
3979       PERFORM readincludeanddownload USING iemptytextelements[]
3980                                            iemptyselectiontexts[]
3981                                            iemptymessages[]
3982                                            iemptyguititles[]
3983                                            <wainclude>-includename
3984                                            space
3985                                            <wainclude>-includetitle
3986                                            is_program
3987                                            userfilepath
3988                                            fileextension
3989                                            incsubdir
3990                                            converttohtml
3991                                            customernamerange
3992                                            getincludes
3993                                            getdictstruct
3994                                            slashseparator
3995                                            savetoserver
3996                                            displayprogressmessage
3997                                            locserverfilesystem
3998                                            addbackground.
3999 
4000     ENDLOOP.
4001     IF NOT <wafunction>-idictstruct[] IS INITIAL.
4002       PERFORM downloadddstructures USING <wafunction>-idictstruct[]
4003                                          ilocdictionaryfilename[]
4004                                          userfilepath
4005                                          htmlfileextension
4006                                          mainsubdir
4007                                          sorttablesasc
4008                                          slashseparator
4009                                          savetoserver
4010                                          displayprogressmessage
4011                                          locserverfilesystem
4012                                          addbackground.
4013     ENDIF.
4014     IF NOT <wafunction>-itabletypes[] IS INITIAL.
4015       PERFORM downloadddtabletypes USING <wafunction>-itabletypes[]
4016                                          iloctabletypefilename[]
4017                                          userfilepath
4018                                          htmlfileextension
4019                                          mainsubdir
4020                                          sorttablesasc
4021                                          slashseparator
4022                                          savetoserver
4023                                          displayprogressmessage
4024                                          locserverfilesystem
4025                                          addbackground.
4026     ENDIF.
4027     IF NOT <wafunction>-itransformations[] IS INITIAL.
4028       PERFORM downloadxslt USING <wafunction>-itransformations[]
4029                                  userfilepath
4030                                  fileextension
4031                                  htmlfileextension
4032                                  textfileextension
4033                                  converttohtml
4034                                  customernamespace
4035                                  slashseparatortouse
4036                                  savetoserver
4037                                  subdir
4038                                  displayprogressmessage
4039                                  serverfilesystem
4040                                  addbackground.
4041     ENDIF.
4042   ENDLOOP.
4043 ENDFORM.
4044 FORM readincludeanddownload USING iloctextelements LIKE dumitexttab[]
4045                                   ilocselectiontexts LIKE dumitexttab[]
4046                                   ilocmessages LIKE imessages[]
4047                                   ilocguititles LIKE dumiguititle[]
4048                                   VALUE(programname)
4049                                   VALUE(functionname)
4050                                   VALUE(programdescription)
4051                                   VALUE(overideprogtype)
4052                                   VALUE(userfilepath)
4053                                   VALUE(fileextension)
4054                                   VALUE(additionalsubdir)
4055                                   VALUE(converttohtml)
4056                                   VALUE(customernamerange)
4057                                   VALUE(getincludes)
4058                                   VALUE(getdictstructures)
4059                                   VALUE(slashseparator)
4060                                   VALUE(savetoserver)
4061                                   VALUE(displayprogressmessage)
4062                                   VALUE(locserverfilesystem)
4063                                   VALUE(addbackground) TYPE abap_bool.
4064   DATA: ilines TYPE STANDARD TABLE OF string WITH HEADER LINE.
4065   DATA: localfilenamewithpath TYPE string.
4066   DATA: localfilenameonly TYPE string.
4067   DATA: newsubdirectory TYPE string.
4068   DATA: objectname TYPE string.
4069   DATA: completesavepath TYPE string.
4070   READ REPORT programname INTO ilines.
4071   IF NOT ilocguititles[] IS INITIAL.
4072     PERFORM appendguititles USING ilocguititles[]
4073                                   ilines[].
4074   ENDIF.
4075   IF NOT iloctextelements[] IS INITIAL.
4076     PERFORM appendtextelements USING iloctextelements[]
4077                                      ilines[].
4078   ENDIF.
4079   IF NOT ilocselectiontexts[] IS INITIAL.
4080     PERFORM appendselectiontexts USING ilocselectiontexts[]
4081                                        ilines[].
4082   ENDIF.
4083   IF NOT ilocmessages[] IS INITIAL.
4084     PERFORM appendmessagestofile USING ilocmessages[]
4085                                        ilines[]
4086                                        space.
4087   ENDIF.
4088   IF converttohtml IS INITIAL.
4089     APPEND '' TO ilines.
4090     APPEND '----------------------------------------------------------------------------------' TO ilines.
4091     PERFORM buildfootermessage USING ilines.
4092     APPEND ilines.
4093   ELSE.
4094     PERFORM convertcodetohtml USING ilines[]
4095                                     programname
4096                                     programdescription
4097                                     overideprogtype
4098                                     space
4099                                     space
4100                                     fileextension
4101                                     customernamerange
4102                                     getincludes
4103                                     getdictstructures
4104                                     addbackground.
4105   ENDIF.
4106   IF functionname IS INITIAL.
4107     objectname = programname.
4108   ELSE.
4109     objectname = functionname.
4110   ENDIF.
4111   PERFORM buildfilename USING userfilepath
4112                               additionalsubdir
4113                               objectname
4114                               space
4115                               programname
4116                               fileextension
4117                               overideprogtype
4118                               savetoserver
4119                               slashseparator
4120                               localfilenamewithpath
4121                               localfilenameonly
4122                               newsubdirectory
4123                               completesavepath.
4124   IF savetoserver IS INITIAL.
4125     PERFORM savefiletopc USING ilines[]
4126                                localfilenamewithpath
4127                                localfilenameonly
4128                                space
4129                                space
4130                                displayprogressmessage.
4131   ELSE.
4132     PERFORM savefiletoserver USING ilines[]
4133                                    localfilenamewithpath
4134                                    localfilenameonly
4135                                    completesavepath
4136                                    displayprogressmessage
4137                                    locserverfilesystem.
4138   ENDIF.
4139 ENDFORM.
4140 FORM readclassanddownload USING walocclass TYPE tclass
4141                                 VALUE(classname)
4142                                 VALUE(functionname)
4143                                 VALUE(overideprogtype)
4144                                 VALUE(userfilepath)
4145                                 VALUE(fileextension)
4146                                 VALUE(additionalsubdir)
4147                                 VALUE(converttohtml)
4148                                 VALUE(customernamerange)
4149                                 VALUE(getincludes)
4150                                 VALUE(getdictstructures)
4151                                 VALUE(slashseparator)
4152                                 VALUE(savetoserver)
4153                                 VALUE(displayprogressmessage)
4154                                 VALUE(locserverfilesystem)
4155                                 VALUE(addbackground) TYPE abap_bool.
4156   DATA: itemplines TYPE STANDARD TABLE OF string WITH HEADER LINE.
4157   DATA: ilines TYPE STANDARD TABLE OF string WITH HEADER LINE.
4158   DATA: localfilenamewithpath TYPE string.
4159   DATA: localfilenameonly TYPE string.
4160   DATA: newsubdirectory TYPE string.
4161   DATA: objectname TYPE string.
4162   DATA: castclassname TYPE program.
4163   DATA: completesavepath TYPE string.
4164   APPEND '**************************************************************************' TO ilines.
4165   APPEND '*   Class attributes.                                                    *' TO ilines.
4166   APPEND '**************************************************************************' TO ilines.
4167   CASE walocclass-exposure.
4168     WHEN 0.
4169       APPEND `Instantiation: Private` TO ilines.
4170     WHEN 1.
4171       APPEND `Instantiation: Protected` TO ilines.
4172     WHEN 2.
4173       APPEND `Instantiation: Public` TO ilines.
4174   ENDCASE.
4175   CONCATENATE `Message class: ` walocclass-msg_id INTO ilines.
4176   APPEND ilines.
4177   CASE walocclass-state.
4178     WHEN 0.
4179       APPEND `State: Only Modelled` TO ilines.
4180     WHEN 1.
4181       APPEND `State: Implemented` TO ilines.
4182   ENDCASE.
4183   CONCATENATE `Final Indicator: ` walocclass-clsfinal INTO ilines.
4184   APPEND ilines.
4185   CONCATENATE `R/3 Release: ` walocclass-r3release INTO ilines.
4186   APPEND ilines.
4187   CLEAR ilines.
4188   APPEND ilines.
4189   castclassname = walocclass-publicclasskey.
4190   READ REPORT castclassname INTO itemplines.
4191   IF sy-subrc = 0.
4192     PERFORM reformatclasscode USING itemplines[].
4193     APPEND '**************************************************************************' TO ilines.
4194     APPEND '*   Public section of class.                                             *' TO ilines.
4195     APPEND '**************************************************************************' TO ilines.
4196     LOOP AT itemplines.
4197       APPEND itemplines TO ilines.
4198     ENDLOOP.
4199   ENDIF.
4200   castclassname = walocclass-privateclasskey.
4201   READ REPORT castclassname INTO itemplines.
4202   IF sy-subrc = 0.
4203     PERFORM reformatclasscode USING itemplines[].
4204     APPEND ilines.
4205     APPEND '**************************************************************************' TO ilines.
4206     APPEND '*   Private section of class.                                            *' TO ilines.
4207     APPEND '**************************************************************************' TO ilines.
4208     LOOP AT itemplines.
4209       APPEND itemplines TO ilines.
4210     ENDLOOP.
4211   ENDIF.
4212   castclassname = walocclass-protectedclasskey.
4213   READ REPORT castclassname INTO itemplines.
4214   IF sy-subrc = 0.
4215     PERFORM reformatclasscode USING itemplines[].
4216     APPEND ilines.
4217     APPEND '**************************************************************************' TO ilines.
4218     APPEND '*   Protected section of class.                                          *' TO ilines.
4219     APPEND '**************************************************************************' TO ilines.
4220     LOOP AT itemplines.
4221       APPEND itemplines TO ilines.
4222     ENDLOOP.
4223   ENDIF.
4224   castclassname = walocclass-typesclasskey.
4225   READ REPORT castclassname INTO itemplines.
4226   IF sy-subrc = 0.
4227     APPEND ilines.
4228     APPEND '**************************************************************************' TO ilines.
4229     APPEND '*   Types section of class.                                              *' TO ilines.
4230     APPEND '**************************************************************************' TO ilines.
4231     LOOP AT itemplines.
4232       APPEND itemplines TO ilines.
4233     ENDLOOP.
4234   ENDIF.
4235   IF NOT walocclass-itextelements[] IS INITIAL.
4236     PERFORM appendtextelements USING walocclass-itextelements[]
4237                                      ilines[].
4238   ENDIF.
4239   IF NOT walocclass-imessages[] IS INITIAL.
4240     PERFORM appendmessagestofile USING walocclass-imessages[]
4241                                        ilines[]
4242                                        space.
4243   ENDIF.
4244   IF NOT walocclass-iconcepts[] IS INITIAL.
4245     PERFORM appendexceptiontexts USING walocclass-iconcepts[]
4246                                        ilines[].
4247   ENDIF.
4248   IF converttohtml IS INITIAL.
4249     APPEND '' TO ilines.
4250     APPEND '----------------------------------------------------------------------------------' TO ilines.
4251     PERFORM buildfootermessage USING ilines.
4252     APPEND ilines.
4253   ELSE.
4254     PERFORM convertclasstohtml USING ilines[]
4255                                     classname
4256                                     walocclass-descript
4257                                     overideprogtype
4258                                     fileextension
4259                                     customernamerange
4260                                     getdictstructures
4261                                     addbackground.
4262   ENDIF.
4263   IF functionname IS INITIAL.
4264     objectname = classname.
4265   ELSE.
4266     objectname = functionname.
4267   ENDIF.
4268   PERFORM buildfilename USING userfilepath
4269                               additionalsubdir
4270                               objectname
4271                               space
4272                               classname
4273                               fileextension
4274                               overideprogtype
4275                               savetoserver
4276                               slashseparator
4277                               localfilenamewithpath
4278                               localfilenameonly
4279                               newsubdirectory
4280                               completesavepath.
4281   IF savetoserver IS INITIAL.
4282     PERFORM savefiletopc USING ilines[]
4283                                localfilenamewithpath
4284                                localfilenameonly
4285                                space
4286                                space
4287                                displayprogressmessage.
4288   ELSE.
4289     PERFORM savefiletoserver USING ilines[]
4290                                    localfilenamewithpath
4291                                    localfilenameonly
4292                                    completesavepath
4293                                    displayprogressmessage
4294                                    locserverfilesystem.
4295   ENDIF.
4296 ENDFORM.
4297 FORM readmethodanddownload USING walocmethod TYPE tmethod
4298                                 VALUE(methodname)
4299                                 VALUE(methodkey)
4300                                 VALUE(functionname)
4301                                 VALUE(overideprogtype)
4302                                 VALUE(userfilepath)
4303                                 VALUE(fileextension)
4304                                 VALUE(additionalsubdir)
4305                                 VALUE(converttohtml)
4306                                 VALUE(customernamerange)
4307                                 VALUE(getincludes)
4308                                 VALUE(getdictstructures)
4309                                 VALUE(slashseparator)
4310                                 VALUE(savetoserver)
4311                                 VALUE(displayprogressmessage)
4312                                 VALUE(locserverfilesystem)
4313                                 VALUE(addbackground) TYPE abap_bool.
4314   DATA: ilines TYPE STANDARD TABLE OF string WITH HEADER LINE.
4315   DATA: itemplines TYPE STANDARD TABLE OF string WITH HEADER LINE.
4316   DATA: localfilenamewithpath TYPE string.
4317   DATA: localfilenameonly TYPE string.
4318   DATA: newsubdirectory TYPE string.
4319   DATA: objectname TYPE string.
4320   DATA: castmethodkey TYPE program.
4321   DATA: completesavepath TYPE string.
4322   APPEND '**************************************************************************' TO ilines.
4323   APPEND '*   Method attributes.                                                   *' TO ilines.
4324   APPEND '**************************************************************************' TO ilines.
4325   CASE walocmethod-exposure.
4326     WHEN 0.
4327       APPEND `Instantiation: Private` TO ilines.
4328     WHEN 1.
4329       APPEND `Instantiation: Protected` TO ilines.
4330     WHEN 2.
4331       APPEND `Instantiation: Public` TO ilines.
4332   ENDCASE.
4333   APPEND '**************************************************************************' TO ilines.
4334   APPEND '' TO ilines.
4335   castmethodkey = walocmethod-methodkey.
4336   READ REPORT castmethodkey INTO itemplines.
4337   LOOP AT itemplines.
4338     APPEND itemplines TO ilines.
4339   ENDLOOP.
4340   IF converttohtml IS INITIAL.
4341     APPEND '' TO ilines.
4342     APPEND '----------------------------------------------------------------------------------' TO ilines.
4343     PERFORM buildfootermessage USING ilines.
4344     APPEND ilines.
4345   ELSE.
4346     PERFORM convertcodetohtml USING ilines[]
4347                                     methodname
4348                                     walocmethod-descript
4349                                     overideprogtype
4350                                     space
4351                                     space
4352                                     fileextension
4353                                     customernamerange
4354                                     getincludes
4355                                     getdictstructures
4356                                     addbackground.
4357   ENDIF.
4358   IF functionname IS INITIAL.
4359     objectname = methodname.
4360   ELSE.
4361     objectname = functionname.
4362   ENDIF.
4363   CASE walocmethod-exposure.
4364     WHEN 0.
4365       CONCATENATE additionalsubdir slashseparator 'private_methods' INTO additionalsubdir.
4366     WHEN 1.
4367       CONCATENATE additionalsubdir slashseparator 'protected_methods' INTO additionalsubdir.
4368     WHEN 2.
4369       CONCATENATE additionalsubdir slashseparator 'public_methods' INTO additionalsubdir.
4370   ENDCASE.
4371   PERFORM buildfilename USING userfilepath
4372                               additionalsubdir
4373                               objectname
4374                               space
4375                               methodname
4376                               fileextension
4377                               overideprogtype
4378                               savetoserver
4379                               slashseparator
4380                               localfilenamewithpath
4381                               localfilenameonly
4382                               newsubdirectory
4383                               completesavepath.
4384   IF savetoserver IS INITIAL.
4385     PERFORM savefiletopc USING ilines[]
4386                                localfilenamewithpath
4387                                localfilenameonly
4388                                space
4389                                space
4390                                displayprogressmessage.
4391   ELSE.
4392     PERFORM savefiletoserver USING ilines[]
4393                                    localfilenamewithpath
4394                                    localfilenameonly
4395                                    completesavepath
4396                                    displayprogressmessage
4397                                    locserverfilesystem.
4398   ENDIF.
4399 ENDFORM.
4400 FORM readxsltanddownload USING VALUE(xsltname)
4401                                      xsltdescription
4402                                VALUE(userfilepath)
4403                                VALUE(fileextension)
4404                                VALUE(converttohtml)
4405                                VALUE(customernamerange)
4406                                VALUE(slashseparator)
4407                                VALUE(savetoserver)
4408                                VALUE(subdir)
4409                                VALUE(displayprogressmessage)
4410                                VALUE(locserverfilesystem)
4411                                VALUE(addbackground) TYPE abap_bool.
4412   DATA: ilines TYPE STANDARD TABLE OF string WITH HEADER LINE.
4413   DATA: ilocxsltsource TYPE o2pageline_table.
4414   DATA: waxsltattributes TYPE o2xsltattr.
4415   DATA: localfilenamewithpath TYPE string.
4416   DATA: localfilenameonly TYPE string.
4417   DATA: newsubdirectory TYPE string.
4418   DATA: objectname TYPE string.
4419   DATA: completesavepath TYPE string.
4420   cl_o2_api_xsltdesc=>load( EXPORTING p_xslt_desc = xsltname
4421                             IMPORTING p_source = ilocxsltsource
4422                                       p_attributes = waxsltattributes
4423                             EXCEPTIONS not_existing = 1
4424                                        permission_failure = 2
4425                                        error_occured = 3
4426                                        version_not_found = 4 ).
4427   IF sy-subrc = 0.
4428     xsltdescription = waxsltattributes-descript.
4429     APPEND LINES OF ilocxsltsource TO ilines.
4430     IF converttohtml IS INITIAL.
4431       APPEND '' TO ilines.
4432       APPEND '----------------------------------------------------------------------------------' TO ilines.
4433       PERFORM buildfootermessage USING ilines.
4434       APPEND ilines.
4435     ELSE.
4436       PERFORM convertcodetohtml USING ilines[]
4437                                       xsltname
4438                                       waxsltattributes-descript
4439                                       space
4440                                       space
4441                                       space
4442                                       fileextension
4443                                       customernamerange
4444                                       space
4445                                       space
4446                                       addbackground.
4447     ENDIF.
4448     PERFORM buildfilename USING userfilepath
4449                                 subdir
4450                                 xsltname
4451                                 space
4452                                 xsltname
4453                                 fileextension
4454                                 is_transformation
4455                                 savetoserver
4456                                 slashseparator
4457                                 localfilenamewithpath
4458                                 localfilenameonly
4459                                 newsubdirectory
4460                                 completesavepath.
4461     IF savetoserver IS INITIAL.
4462       PERFORM savefiletopc USING ilines[]
4463                                  localfilenamewithpath
4464                                  localfilenameonly
4465                                  space
4466                                  space
4467                                  displayprogressmessage.
4468     ELSE.
4469       PERFORM savefiletoserver USING ilines[]
4470                                      localfilenamewithpath
4471                                      localfilenameonly
4472                                      completesavepath
4473                                      displayprogressmessage
4474                                      locserverfilesystem.
4475     ENDIF.
4476   ENDIF.
4477 ENDFORM.
4478 FORM readfunctionanddownload USING iloctextelements LIKE dumitexttab[]
4479                                    ilocselectiontexts LIKE dumitexttab[]
4480                                    ilocmessages LIKE imessages[]
4481                                    VALUE(functionname)
4482                                    VALUE(functioninternalname)
4483                                    VALUE(shorttext)
4484                                    VALUE(userfilepath)
4485                                    VALUE(fileextension)
4486                                    VALUE(subdir)
4487                                    VALUE(converttohtml)
4488                                    VALUE(functiondocumentationexists)
4489                                    VALUE(customernamerange)
4490                                    VALUE(getincludes)
4491                                    VALUE(getdictstructures)
4492                                    VALUE(slashseparator)
4493                                    VALUE(savetoserver)
4494                                    VALUE(displayprogressmessage)
4495                                    VALUE(locserverfilesystem)
4496                                    VALUE(addbackground) TYPE abap_bool.
4497   DATA: ilines TYPE STANDARD TABLE OF string WITH HEADER LINE.
4498   DATA: localfilenamewithpath TYPE string.
4499   DATA: localfilenameonly TYPE string.
4500   DATA: newsubdirectory TYPE string.
4501   DATA: completesavepath TYPE string.
4502   READ REPORT functioninternalname INTO ilines.
4503   IF NOT iloctextelements[] IS INITIAL.
4504     PERFORM appendtextelements USING iloctextelements[]
4505                                      ilines[].
4506   ENDIF.
4507   IF NOT ilocmessages[] IS INITIAL.
4508     PERFORM appendmessagestofile USING ilocmessages[]
4509                                        ilines[]
4510                                        space.
4511   ENDIF.
4512   IF converttohtml IS INITIAL.
4513     APPEND '' TO ilines.
4514     APPEND '----------------------------------------------------------------------------------' TO ilines.
4515     PERFORM buildfootermessage USING ilines.
4516     APPEND ilines.
4517   ELSE.
4518     PERFORM convertfunctiontohtml USING ilines[]
4519                                         functionname
4520                                         shorttext
4521                                         is_function
4522                                         functiondocumentationexists
4523                                         true
4524                                         fileextension
4525                                         customernamerange
4526                                         getincludes
4527                                         getdictstructures
4528                                         addbackground.
4529   ENDIF.
4530   PERFORM buildfilename USING userfilepath
4531                               subdir
4532                               functionname
4533                               space
4534                               space
4535                               fileextension
4536                               is_function
4537                               savetoserver
4538                               slashseparator
4539                               localfilenamewithpath
4540                               localfilenameonly
4541                               newsubdirectory
4542                               completesavepath.
4543   IF savetoserver IS INITIAL.
4544     PERFORM savefiletopc USING ilines[]
4545                                localfilenamewithpath
4546                                localfilenameonly
4547                                space
4548                                space
4549                                displayprogressmessage.
4550   ELSE.
4551     PERFORM savefiletoserver USING ilines[]
4552                                    localfilenamewithpath
4553                                    localfilenameonly
4554                                    completesavepath
4555                                    displayprogressmessage
4556                                    locserverfilesystem.
4557   ENDIF.
4558 ENDFORM.
4559 FORM buildfilename USING VALUE(userpath)
4560                          VALUE(additionalsubdirectory)
4561                          VALUE(objectname)
4562                          VALUE(mainfunctionno)
4563                          VALUE(includename)
4564                          VALUE(fileextension)
4565                          VALUE(downloadtype)
4566                          VALUE(downloadtoserver)
4567                          VALUE(slashseparator)
4568                                newfilenamewithpath
4569                                newfilenameonly
4570                                newsubdirectory
4571                                completepath.
4572   IF downloadtoserver IS INITIAL.
4573     IF frontendopsystem = non_unix.
4574       IF NOT additionalsubdirectory IS INITIAL.
4575         TRANSLATE additionalsubdirectory USING '/_'.
4576         IF additionalsubdirectory+0(1) = '_'.
4577           SHIFT additionalsubdirectory LEFT BY 1 PLACES.
4578         ENDIF.
4579       ENDIF.
4580     ENDIF.
4581   ELSE.
4582     IF serveropsystem = non_unix.
4583       IF NOT additionalsubdirectory IS INITIAL.
4584         TRANSLATE additionalsubdirectory USING '/_'.
4585         IF additionalsubdirectory+0(1) = '_'.
4586           SHIFT additionalsubdirectory LEFT BY 1 PLACES.
4587         ENDIF.
4588       ENDIF.
4589     ENDIF.
4590   ENDIF.
4591   CASE downloadtype.
4592     WHEN is_program.
4593       IF additionalsubdirectory IS INITIAL.
4594         CONCATENATE userpath slashseparator objectname period fileextension INTO newfilenamewithpath.
4595         CONCATENATE userpath slashseparator INTO completepath.
4596       ELSE.
4597         CONCATENATE userpath slashseparator additionalsubdirectory
4598                              slashseparator objectname period fileextension INTO newfilenamewithpath.
4599         CONCATENATE userpath slashseparator additionalsubdirectory INTO completepath.
4600       ENDIF.
4601     WHEN is_function.
4602       IF additionalsubdirectory IS INITIAL.
4603         FIND 'top' IN includename IGNORING CASE.
4604         IF sy-subrc = 0.
4605           CONCATENATE userpath slashseparator objectname
4606                                slashseparator 'Global-' objectname
4607                                period fileextension
4608                                INTO newfilenamewithpath.
4609         ELSE.
4610           IF includename CS mainfunctionno AND NOT mainfunctionno IS INITIAL.
4611             CONCATENATE userpath slashseparator objectname
4612                                  slashseparator objectname
4613                                  period fileextension
4614                                  INTO newfilenamewithpath.
4615           ELSE.
4616             CONCATENATE userpath slashseparator objectname
4617                                  slashseparator objectname
4618                                  period fileextension
4619                                  INTO newfilenamewithpath.
4620           ENDIF.
4621         ENDIF.
4622         newsubdirectory = objectname.
4623         CONCATENATE userpath
4624                     slashseparator
4625                     newsubdirectory
4626                     slashseparator INTO completepath.
4627       ELSE.
4628         FIND 'top' IN includename IGNORING CASE.
4629         IF sy-subrc = 0.
4630           CONCATENATE userpath slashseparator additionalsubdirectory
4631                                slashseparator objectname
4632                                slashseparator 'Global-' objectname
4633                                period fileextension
4634                                INTO newfilenamewithpath.
4635         ELSE.
4636           IF includename CS mainfunctionno AND NOT mainfunctionno IS INITIAL.
4637             CONCATENATE userpath slashseparator additionalsubdirectory
4638                                  slashseparator objectname
4639                                  slashseparator objectname
4640                                  period fileextension
4641                                  INTO newfilenamewithpath.
4642           ELSE.
4643             CONCATENATE userpath slashseparator additionalsubdirectory
4644                                  slashseparator objectname
4645                                  slashseparator objectname
4646                                  period fileextension
4647                                  INTO newfilenamewithpath.
4648           ENDIF.
4649         ENDIF.
4650         CONCATENATE additionalsubdirectory slashseparator objectname INTO newsubdirectory.
4651         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator objectname INTO completepath.
4652       ENDIF.
4653     WHEN is_table.
4654       IF additionalsubdirectory IS INITIAL.
4655         CONCATENATE userpath slashseparator 'Dictionary_Objects'   " slashSeparator objectName
4656                              slashseparator
4657                              objectname period fileextension
4658                              INTO newfilenamewithpath.
4659         CONCATENATE userpath slashseparator objectname INTO newsubdirectory.
4660         CONCATENATE userpath slashseparator objectname INTO completepath.
4661       ELSE.
4662         CONCATENATE userpath slashseparator additionalsubdirectory
4663                              slashseparator 'Dictionary_Objects'   " slashSeparator objectName
4664                              slashseparator
4665                              objectname period fileextension
4666                              INTO newfilenamewithpath.
4667         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator objectname INTO newsubdirectory.
4668         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator objectname INTO completepath.
4669       ENDIF.
4670     WHEN is_transformation.
4671       IF additionalsubdirectory IS INITIAL.
4672         CONCATENATE userpath slashseparator 'Transformations'   " slashSeparator objectName
4673                              slashseparator
4674                              objectname period fileextension
4675                              INTO newfilenamewithpath.
4676         CONCATENATE userpath slashseparator objectname INTO newsubdirectory.
4677         CONCATENATE userpath slashseparator objectname INTO completepath.
4678       ELSE.
4679         CONCATENATE userpath slashseparator additionalsubdirectory
4680                              slashseparator 'Transformations'   " slashSeparator objectName
4681                              slashseparator
4682                              objectname period fileextension
4683                              INTO newfilenamewithpath.
4684         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator objectname INTO newsubdirectory.
4685         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator objectname INTO completepath.
4686       ENDIF.
4687     WHEN is_documentation.
4688       IF additionalsubdirectory IS INITIAL.
4689         CONCATENATE userpath slashseparator objectname
4690                              slashseparator 'Docs-'
4691                              objectname period
4692                              fileextension
4693                              INTO newfilenamewithpath.
4694         CONCATENATE userpath slashseparator objectname INTO newsubdirectory.
4695         CONCATENATE userpath slashseparator objectname INTO completepath.
4696       ELSE.
4697         CONCATENATE userpath slashseparator additionalsubdirectory
4698                              slashseparator objectname
4699                              slashseparator 'Docs-'
4700                              objectname period fileextension
4701                              INTO newfilenamewithpath.
4702         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator objectname INTO newsubdirectory.
4703         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator objectname INTO completepath.
4704       ENDIF.
4705     WHEN is_screen.
4706       IF additionalsubdirectory IS INITIAL.
4707         CONCATENATE userpath slashseparator 'Screens'
4708                              slashseparator 'screen_'
4709                              objectname period
4710                              fileextension INTO newfilenamewithpath.
4711         CONCATENATE userpath slashseparator 'screens' INTO newsubdirectory.
4712         CONCATENATE userpath slashseparator 'screens' INTO completepath.
4713       ELSE.
4714         CONCATENATE userpath slashseparator additionalsubdirectory
4715                              slashseparator 'Screens'
4716                              slashseparator 'screen_'
4717                              objectname period
4718                              fileextension INTO newfilenamewithpath.
4719         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator 'screens' INTO newsubdirectory.
4720         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator 'screens' INTO completepath.
4721       ENDIF.
4722     WHEN is_guititle.
4723       IF additionalsubdirectory IS INITIAL.
4724         CONCATENATE userpath slashseparator 'Screens'
4725                              slashseparator 'gui_title_'
4726                              objectname period
4727                              fileextension INTO newfilenamewithpath.
4728         CONCATENATE userpath slashseparator 'screens' INTO newsubdirectory.
4729         CONCATENATE userpath slashseparator 'screens' INTO completepath.
4730       ELSE.
4731         CONCATENATE userpath slashseparator additionalsubdirectory
4732                              slashseparator 'Screens'
4733                              slashseparator 'gui_title_'
4734                              objectname period
4735                              fileextension INTO newfilenamewithpath.
4736         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator 'Screens' INTO newsubdirectory.
4737         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator 'Screens' INTO completepath.
4738       ENDIF.
4739     WHEN is_messageclass.
4740       IF additionalsubdirectory IS INITIAL.
4741         CONCATENATE userpath slashseparator objectname
4742                              slashseparator 'Message class-'
4743                              objectname period
4744                              fileextension
4745                              INTO newfilenamewithpath.
4746         CONCATENATE userpath slashseparator objectname INTO newsubdirectory.
4747         CONCATENATE userpath slashseparator objectname INTO completepath.
4748       ELSE.
4749         CONCATENATE userpath slashseparator additionalsubdirectory
4750                              slashseparator objectname
4751                              slashseparator 'Message class-'
4752                              objectname period fileextension
4753                              INTO newfilenamewithpath.
4754         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator objectname INTO newsubdirectory.
4755         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator objectname INTO completepath.
4756       ENDIF.
4757     WHEN is_class.
4758       IF additionalsubdirectory IS INITIAL.
4759         CONCATENATE userpath slashseparator objectname
4760                              slashseparator 'Class-'
4761                              objectname period fileextension
4762                              INTO newfilenamewithpath.
4763         CONCATENATE userpath slashseparator objectname INTO newsubdirectory.
4764         CONCATENATE userpath slashseparator objectname INTO completepath.
4765       ELSE.
4766         CONCATENATE userpath slashseparator additionalsubdirectory
4767                              slashseparator objectname
4768                              slashseparator 'Class-'
4769                              objectname period fileextension
4770                              INTO newfilenamewithpath.
4771         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator objectname INTO newsubdirectory.
4772         CONCATENATE userpath slashseparator additionalsubdirectory slashseparator objectname INTO completepath.
4773       ENDIF.
4774     WHEN is_method.
4775       IF additionalsubdirectory IS INITIAL.
4776         CONCATENATE userpath slashseparator
4777                              objectname period fileextension
4778                              INTO newfilenamewithpath.
4779         CONCATENATE userpath slashseparator objectname INTO newsubdirectory.
4780         CONCATENATE userpath slashseparator objectname INTO completepath.
4781       ELSE.
4782         CONCATENATE userpath slashseparator additionalsubdirectory
4783                              slashseparator
4784                              objectname period fileextension
4785                              INTO newfilenamewithpath.
4786         CONCATENATE userpath slashseparator additionalsubdirectory INTO completepath.
4787       ENDIF.
4788   ENDCASE.
4789   TRANSLATE completepath TO LOWER CASE.
4790   CONCATENATE objectname period fileextension INTO newfilenameonly.
4791   TRANSLATE newfilenameonly TO LOWER CASE.
4792   TRANSLATE newfilenamewithpath TO LOWER CASE.
4793   TRANSLATE newsubdirectory TO LOWER CASE.
4794   IF downloadtoserver IS INITIAL.
4795     IF frontendopsystem = non_unix.
4796       TRANSLATE newfilenameonly USING '/_'.
4797       TRANSLATE newfilenamewithpath USING '/_'.
4798       TRANSLATE newfilenameonly USING '< '.
4799       TRANSLATE newfilenamewithpath USING '< '.
4800       TRANSLATE newfilenameonly USING '> '.
4801       TRANSLATE newfilenamewithpath USING '> '.
4802       TRANSLATE newfilenameonly USING '? '.
4803       TRANSLATE newfilenamewithpath USING '? '.
4804       TRANSLATE newfilenameonly USING '| '.
4805       TRANSLATE newfilenamewithpath USING '| '.
4806       CONDENSE newfilenameonly NO-GAPS.
4807       CONDENSE newfilenamewithpath NO-GAPS.
4808     ENDIF.
4809   ELSE.
4810     IF serveropsystem = non_unix.
4811       TRANSLATE newfilenameonly USING '/_'.
4812       TRANSLATE newfilenamewithpath USING '/_'.
4813       TRANSLATE newfilenameonly USING '< '.
4814       TRANSLATE newfilenamewithpath USING '< '.
4815       TRANSLATE newfilenameonly USING '> '.
4816       TRANSLATE newfilenamewithpath USING '> '.
4817       TRANSLATE newfilenameonly USING '? '.
4818       TRANSLATE newfilenamewithpath USING '? '.
4819       TRANSLATE newfilenameonly USING '| '.
4820       TRANSLATE newfilenamewithpath USING '| '.
4821       CONDENSE newfilenameonly NO-GAPS.
4822       CONDENSE newfilenamewithpath NO-GAPS.
4823     ENDIF.
4824   ENDIF.
4825 ENDFORM.
4826 FORM savefiletopc USING idownload TYPE STANDARD TABLE
4827                         VALUE(filenamewithpath)
4828                         VALUE(filename)
4829                         VALUE(writefieldseparator)
4830                         VALUE(truncatetrailingblanks)
4831                         VALUE(displayprogressmessage).
4832   DATA: statusmessage TYPE string.
4833   DATA: objfile TYPE REF TO cl_gui_frontend_services.
4834   DATA: strsubrc TYPE string.
4835   IF NOT displayprogressmessage IS INITIAL.
4836     CONCATENATE `Downloading: ` filename INTO statusmessage.
4837     PERFORM displaystatus USING statusmessage 0.
4838   ENDIF.
4839   CREATE OBJECT objfile.
4840   objfile->gui_download( EXPORTING filename = filenamewithpath
4841                                     filetype = 'ASC'
4842                                     write_field_separator = writefieldseparator
4843                                     trunc_trailing_blanks = truncatetrailingblanks
4844                            CHANGING data_tab = idownload[]
4845                          EXCEPTIONS file_write_error        = 1
4846                                     no_batch                = 2
4847                                     gui_refuse_filetransfer = 3
4848                                     invalid_type            = 4
4849                                     no_authority            = 5
4850                                     unknown_error           = 6
4851                                     header_not_allowed      = 7
4852                                     separator_not_allowed   = 8
4853                                     filesize_not_allowed    = 9
4854                                     header_too_long         = 10
4855                                     dp_error_create         = 11
4856                                     dp_error_send           = 12
4857                                     dp_error_write          = 13
4858                                     unknown_dp_error        = 14
4859                                     access_denied           = 15
4860                                     dp_out_of_memory        = 16
4861                                     disk_full               = 17
4862                                     dp_timeout              = 18
4863                                     file_not_found          = 19
4864                                     dataprovider_exception  = 20
4865                                     control_flush_error     = 21
4866                                     not_supported_by_gui    = 22
4867                                     error_no_gui            = 23 ).
4868   IF sy-subrc <> 0.
4869     strsubrc = sy-subrc.
4870     CONCATENATE `File save error: ` filename ` sy-subrc: ` strsubrc INTO statusmessage.
4871     PERFORM displaystatus USING statusmessage 3.
4872   ENDIF.
4873 ENDFORM.
4874 FORM savefiletoserver USING idownload TYPE STANDARD TABLE
4875                             VALUE(filenamewithpath)
4876                             VALUE(filename)
4877                             VALUE(path)
4878                             VALUE(displayprogressmessage)
4879                              VALUE(locserverfilesystem).
4880   DATA: wadownload TYPE string.
4881   DATA: statusmessage TYPE string.
4882   IF NOT displayprogressmessage IS INITIAL.
4883     CONCATENATE `Downloading: ` filename INTO statusmessage.
4884     PERFORM displaystatus USING statusmessage 0.
4885   ENDIF.
4886   READ TABLE iserverpaths WITH KEY table_line = path.
4887   IF sy-subrc <> 0.
4888     PERFORM createserverdirectory USING path locserverfilesystem.
4889     APPEND path TO iserverpaths.
4890   ENDIF.
4891   OPEN DATASET filenamewithpath FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
4892   IF sy-subrc = 0.
4893     LOOP AT idownload INTO wadownload.
4894       TRANSFER wadownload TO filenamewithpath.
4895       IF sy-subrc <> 0.
4896         MESSAGE e000(oo) WITH 'Error transferring data to file'.
4897       ENDIF.
4898     ENDLOOP.
4899     CLOSE DATASET filenamewithpath.
4900     IF sy-subrc <> 0.
4901       MESSAGE e000(oo) WITH 'Error closing file'.
4902     ENDIF.
4903   ELSE.
4904     MESSAGE e000(oo) WITH 'Error creating file on SAP server' 'check permissions'.
4905   ENDIF.
4906 ENDFORM.
4907 FORM createserverdirectory USING VALUE(path)
4908                                  VALUE(locserverfilesystem).
4909   DATA: castserveropsys TYPE syopsys.
4910   castserveropsys = locserverfilesystem.
4911   DATA: param1 TYPE sxpgcolist-parameters.
4912   DATA: funcstatus TYPE extcmdexex-status.
4913   DATA: iserveroutput TYPE STANDARD TABLE OF btcxpm.
4914   DATA: waserveroutput TYPE btcxpm.
4915   DATA: target TYPE rfcdisplay-rfchost.
4916   DATA: operatingsystem TYPE sxpgcolist-opsystem.
4917   DATA: head TYPE string..
4918   DATA: tail TYPE string.
4919   param1 = path.
4920   target = sy-host.
4921   operatingsystem = locserverfilesystem.
4922   CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
4923     EXPORTING
4924       commandname                   = 'ZDTX_MKDIR'
4925       additional_parameters         = param1
4926       operatingsystem               = castserveropsys
4927       targetsystem                  = target
4928       stdout                        = 'X'
4929       stderr                        = 'X'
4930       terminationwait               = 'X'
4931     IMPORTING
4932       status                        = funcstatus
4933     TABLES
4934       exec_protocol                 = iserveroutput[]
4935     EXCEPTIONS
4936       no_permission                 = 1
4937       command_not_found             = 2
4938       parameters_too_long           = 3
4939       security_risk                 = 4
4940       wrong_check_call_interface    = 5
4941       program_start_error           = 6
4942       program_termination_error     = 7
4943       x_error                       = 8
4944       parameter_expected            = 9
4945       too_many_parameters           = 10
4946       illegal_command               = 11
4947       wrong_asynchronous_parameters = 12
4948       cant_enq_tbtco_entry          = 13
4949       jobcount_generation_error     = 14
4950       OTHERS                        = 15.
4951   IF sy-subrc = 0.
4952     IF funcstatus = 'E'.
4953       IF sy-opsys CS 'Windows NT'.
4954         READ TABLE iserveroutput INDEX 1 INTO waserveroutput.
4955         IF waserveroutput-message NS 'already exists'.
4956           MESSAGE e000(oo) WITH 'An error occurred creating a directory'.
4957         ENDIF.
4958       ELSE.
4959         READ TABLE iserveroutput INDEX 2 INTO waserveroutput.
4960         SPLIT waserveroutput-message AT space INTO head tail.
4961         SHIFT tail LEFT DELETING LEADING space.
4962         IF tail <> 'Do not specify an existing file.'.
4963           MESSAGE e000(oo) WITH 'An error occurred creating a directory'.
4964         ENDIF.
4965       ENDIF.
4966     ENDIF.
4967   ELSE.
4968     CASE sy-subrc.
4969       WHEN 1.
4970         MESSAGE e000(oo) WITH 'No permissions to run external command ZDTX_MKDIR'.
4971       WHEN 2.
4972         MESSAGE e000(oo) WITH 'External comand ZDTX_MKDIR not found'.
4973       WHEN OTHERS.
4974         MESSAGE e000(oo) WITH 'An error occurred creating a directory'
4975                               ', subrc:'
4976                               sy-subrc.
4977     ENDCASE.
4978   ENDIF.
4979 ENDFORM.
4980 FORM appendtextelements USING iloctextelements LIKE dumitexttab[]
4981                               iloclines LIKE dumihtml[].
4982   FIELD-SYMBOLS: <watextelement> TYPE ttexttable.
4983   DATA: waline TYPE string.
4984   IF lines( iloctextelements ) > 0.
4985     APPEND '' TO iloclines.
4986     APPEND '*Text elements' TO iloclines.
4987     APPEND '*----------------------------------------------------------' TO  iloclines.
4988     LOOP AT iloctextelements ASSIGNING <watextelement>.
4989       CONCATENATE '*  ' <watextelement>-key <watextelement>-entry INTO waline SEPARATED BY space.
4990       APPEND waline TO iloclines.
4991     ENDLOOP.
4992   ENDIF.
4993 ENDFORM.
4994 FORM appendguititles USING ilocguititles LIKE dumiguititle[]
4995                            iloclines LIKE dumihtml[].
4996   FIELD-SYMBOLS: <waguititle> TYPE tguititle.
4997   DATA: waline TYPE string.
4998   IF lines( ilocguititles ) > 0.
4999     APPEND '' TO iloclines.
5000     APPEND '*GUI Texts' TO iloclines.
5001     APPEND '*----------------------------------------------------------' TO  iloclines.
5002     LOOP AT ilocguititles ASSIGNING <waguititle>.
5003       CONCATENATE '*  ' <waguititle>-obj_code '-->' <waguititle>-text INTO waline SEPARATED BY space.
5004       APPEND waline TO iloclines.
5005     ENDLOOP.
5006   ENDIF.
5007 ENDFORM.
5008 FORM appendselectiontexts USING ilocselectiontexts LIKE dumitexttab[]
5009                                 iloclines LIKE dumihtml[].
5010   FIELD-SYMBOLS: <waselectiontext> TYPE ttexttable.
5011   DATA: waline TYPE string.
5012   IF lines( ilocselectiontexts ) > 0.
5013     APPEND '' TO iloclines.
5014     APPEND '' TO iloclines.
5015     APPEND '*Selection texts' TO iloclines.
5016     APPEND '*----------------------------------------------------------' TO  iloclines.
5017     LOOP AT ilocselectiontexts ASSIGNING <waselectiontext>.
5018       CONCATENATE '*  ' <waselectiontext>-key <waselectiontext>-entry INTO waline SEPARATED BY space.
5019       APPEND waline TO iloclines.
5020     ENDLOOP.
5021   ENDIF.
5022 ENDFORM.
5023 FORM appendexceptiontexts USING iconcepts LIKE dumiconcepts[]
5024                                 iloclines LIKE dumihtml[].
5025   FIELD-SYMBOLS: <waconcept> TYPE tconcept.
5026   DATA: waline TYPE string.
5027   DATA: concepttext TYPE sotr_txt.
5028   IF lines( iconcepts ) > 0.
5029     APPEND '' TO iloclines.
5030     APPEND '*Exception texts' TO iloclines.
5031     APPEND '*----------------------------------------------------------' TO  iloclines.
5032     LOOP AT iconcepts ASSIGNING <waconcept>.
5033       CALL FUNCTION 'SOTR_GET_TEXT_KEY'
5034         EXPORTING
5035           concept                = <waconcept>-concept
5036           langu                  = pmlang
5037           search_in_second_langu = 'X'
5038         IMPORTING
5039           e_text                 = concepttext
5040         EXCEPTIONS
5041           no_entry_found         = 1
5042           parameter_error        = 2
5043           OTHERS                 = 3.
5044       IF sy-subrc = 0.
5045         CONCATENATE '*  ' <waconcept>-constname '-' concepttext  INTO waline SEPARATED BY space.
5046         APPEND waline TO iloclines.
5047       ENDIF.
5048     ENDLOOP.
5049   ENDIF.
5050 ENDFORM.
5051 FORM downloadfunctiondocs USING VALUE(functionname)
5052                                 VALUE(functiondescription)
5053                                 VALUE(userfilepath)
5054                                 VALUE(fileextension)
5055                                 VALUE(converttohtml)
5056                                 VALUE(slashseparator)
5057                                 VALUE(savetoserver)
5058                                 VALUE(displayprogressmessage)
5059                                       subdir
5060                                       documentationdownloaded
5061                                 VALUE(locserverfilesystem)
5062                                 VALUE(addbackground) TYPE abap_bool.
5063   DATA: ilines TYPE STANDARD TABLE OF string WITH HEADER LINE.
5064   DATA: idocumentation TYPE STANDARD TABLE OF funct WITH HEADER LINE.
5065   DATA: iexceptions TYPE STANDARD TABLE OF rsexc WITH HEADER LINE.
5066   DATA: iexport TYPE STANDARD TABLE OF rsexp WITH HEADER LINE.
5067   DATA: iparameter TYPE STANDARD TABLE OF rsimp WITH HEADER LINE.
5068   DATA: itables TYPE STANDARD TABLE OF rstbl WITH HEADER LINE.
5069   DATA: iscriptlines TYPE STANDARD TABLE OF tline WITH HEADER LINE.
5070   DATA: htmlpagename TYPE string.
5071   DATA: newfilenamewithpath TYPE string.
5072   DATA: newfilenameonly TYPE string.
5073   DATA: object LIKE dokhl-object.
5074   DATA: stringlength TYPE i VALUE 0.
5075   DATA: newsubdirectory TYPE string.
5076   DATA: waline(255).
5077   DATA: completesavepath TYPE string.
5078   documentationdownloaded = false.
5079   object = functionname.
5080   CALL FUNCTION 'FUNCTION_IMPORT_DOKU'
5081     EXPORTING
5082       funcname           = functionname
5083     TABLES
5084       dokumentation      = idocumentation
5085       exception_list     = iexceptions
5086       export_parameter   = iexport
5087       import_parameter   = iparameter
5088       tables_parameter   = itables
5089     EXCEPTIONS
5090       error_message      = 1
5091       function_not_found = 2
5092       invalid_name       = 3
5093       OTHERS             = 4.
5094   CALL FUNCTION 'DOCU_GET'
5095     EXPORTING
5096       id                     = 'FU'
5097       langu                  = pmlang
5098       object                 = object
5099       typ                    = 'T'
5100       version_active_or_last = 'L'
5101     TABLES
5102       line                   = iscriptlines
5103     EXCEPTIONS
5104       no_docu_on_screen      = 1
5105       no_docu_self_def       = 2
5106       no_docu_temp           = 3
5107       ret_code               = 4
5108       OTHERS                 = 5.
5109   IF sy-subrc = 0 AND NOT ( iscriptlines[] IS INITIAL ).
5110     APPEND 'SHORT TEXT' TO ilines.
5111     CONCATENATE space functiondescription INTO functiondescription SEPARATED BY space.
5112     APPEND functiondescription TO ilines.
5113     APPEND space TO ilines.
5114     LOOP AT iscriptlines.
5115       MOVE iscriptlines-tdline TO ilines.
5116       CONCATENATE space ilines INTO ilines SEPARATED BY space.
5117       WHILE ilines CP '&*' OR ilines CP '*&'.
5118         REPLACE '&' INTO ilines WITH space.
5119         SHIFT ilines LEFT DELETING LEADING space.
5120       ENDWHILE.
5121       APPEND ilines.
5122     ENDLOOP.
5123     CLEAR ilines.
5124     IF NOT ( idocumentation[] IS INITIAL ).
5125       APPEND ilines.
5126       APPEND 'PARAMETER DOCUMENTATION' TO ilines.
5127       APPEND '-----------------------' TO ilines.
5128       APPEND ilines.
5129       DESCRIBE FIELD idocumentation-parameter LENGTH stringlength IN CHARACTER MODE.
5130       stringlength = stringlength + 3.
5131       LOOP AT idocumentation.
5132         MOVE idocumentation-parameter TO waline.
5133         MOVE idocumentation-stext TO waline+stringlength.
5134         APPEND waline TO ilines.
5135       ENDLOOP.
5136     ENDIF.
5137     CONCATENATE `Documentation - ` functionname INTO htmlpagename.
5138     IF converttohtml IS INITIAL.
5139       APPEND ilines.
5140       APPEND  '----------------------------------------------------------------------------------' TO ilines.
5141       APPEND ilines.
5142       PERFORM buildfootermessage USING ilines.
5143       APPEND ilines.
5144     ELSE.
5145       PERFORM convertcodetohtml USING ilines[]
5146                                       htmlpagename
5147                                       space
5148                                       is_documentation
5149                                       true
5150                                       space
5151                                       space
5152                                       space
5153                                       space
5154                                       space
5155                                       addbackground.
5156     ENDIF.
5157     PERFORM buildfilename USING userfilepath
5158                                 subdir
5159                                 functionname
5160                                 space
5161                                 space
5162                                 fileextension
5163                                 is_documentation
5164                                 savetoserver
5165                                 slashseparator
5166                                 newfilenamewithpath
5167                                 newfilenameonly
5168                                 newsubdirectory
5169                                 completesavepath.
5170     IF savetoserver IS INITIAL.
5171       PERFORM savefiletopc USING ilines[]
5172                                  newfilenamewithpath
5173                                  newfilenameonly
5174                                  space
5175                                  space
5176                                  displayprogressmessage.
5177     ELSE.
5178       PERFORM savefiletoserver USING ilines[]
5179                                      newfilenamewithpath
5180                                      newfilenameonly
5181                                      completesavepath
5182                                      displayprogressmessage
5183                                      locserverfilesystem.
5184     ENDIF.
5185     documentationdownloaded = true.
5186   ENDIF.
5187 ENDFORM.
5188 FORM downloadclassdocs USING VALUE(classname) TYPE seoclsname
5189                              VALUE(userfilepath)
5190                              VALUE(fileextension)
5191                              VALUE(converttohtml)
5192                              VALUE(slashseparator)
5193                              VALUE(savetoserver)
5194                              VALUE(displayprogressmessage)
5195                                    subdir
5196                                    documentationdownloaded
5197                              VALUE(locserverfilesystem)
5198                              VALUE(addbackground) TYPE abap_bool.
5199   DATA: ilines TYPE STANDARD TABLE OF string WITH HEADER LINE.
5200   DATA: idocumentation TYPE STANDARD TABLE OF funct WITH HEADER LINE.
5201   DATA: iexceptions TYPE STANDARD TABLE OF rsexc WITH HEADER LINE.
5202   DATA: iexport TYPE STANDARD TABLE OF rsexp WITH HEADER LINE.
5203   DATA: iparameter TYPE STANDARD TABLE OF rsimp WITH HEADER LINE.
5204   DATA: itables TYPE STANDARD TABLE OF rstbl WITH HEADER LINE.
5205   DATA: iscriptlines TYPE STANDARD TABLE OF tline WITH HEADER LINE.
5206   DATA: htmlpagename TYPE string.
5207   DATA: newfilenamewithpath TYPE string.
5208   DATA: newfilenameonly TYPE string.
5209   DATA: object LIKE dokhl-object.
5210   DATA: stringlength TYPE i VALUE 0.
5211   DATA: newsubdirectory TYPE string.
5212   DATA: waline(255).
5213   DATA: completesavepath TYPE string.
5214   documentationdownloaded = false.
5215   object = classname.
5216   CALL FUNCTION 'DOC_OBJECT_GET'
5217     EXPORTING
5218       class            = 'CL'
5219       name             = object
5220       language         = pmlang
5221     TABLES
5222       itf_lines        = iscriptlines[]
5223     EXCEPTIONS
5224       object_not_found = 1.
5225   IF sy-subrc = 0 AND NOT ( iscriptlines[] IS INITIAL ).
5226     LOOP AT iscriptlines.
5227       MOVE iscriptlines-tdline TO ilines.
5228       CONCATENATE space ilines INTO ilines SEPARATED BY space.
5229       WHILE ilines CP '&*' OR ilines CP '*&'.
5230         REPLACE '&' INTO ilines WITH space.
5231         SHIFT ilines LEFT DELETING LEADING space.
5232       ENDWHILE.
5233       APPEND ilines.
5234     ENDLOOP.
5235     CONCATENATE `Documentation - ` classname INTO htmlpagename.
5236     IF converttohtml IS INITIAL.
5237       APPEND ilines.
5238       APPEND  '----------------------------------------------------------------------------------' TO ilines.
5239       APPEND ilines.
5240       PERFORM buildfootermessage USING ilines.
5241       APPEND ilines.
5242     ELSE.
5243       PERFORM convertcodetohtml USING ilines[]
5244                                       htmlpagename
5245                                       space
5246                                       is_documentation
5247                                       true
5248                                       space
5249                                       space
5250                                       space
5251                                       space
5252                                       space
5253                                       addbackground.
5254     ENDIF.
5255     PERFORM buildfilename USING userfilepath
5256                                 subdir
5257                                 classname
5258                                 space
5259                                 space
5260                                 fileextension
5261                                 is_documentation
5262                                 savetoserver
5263                                 slashseparator
5264                                 newfilenamewithpath
5265                                 newfilenameonly
5266                                 newsubdirectory
5267                                 completesavepath.
5268     IF savetoserver IS INITIAL.
5269       PERFORM savefiletopc USING ilines[]
5270                                  newfilenamewithpath
5271                                  newfilenameonly
5272                                  space
5273                                  space
5274                                  displayprogressmessage.
5275     ELSE.
5276       PERFORM savefiletoserver USING ilines[]
5277                                      newfilenamewithpath
5278                                      newfilenameonly
5279                                      completesavepath
5280                                      displayprogressmessage
5281                                      locserverfilesystem.
5282     ENDIF.
5283     documentationdownloaded = true.
5284   ENDIF.
5285 ENDFORM.
5286 FORM downloadscreens USING ilocscreenflow LIKE dumiscreen[]
5287                            VALUE(programname)
5288                            VALUE(userfilepath)
5289                            VALUE(textfileextension)
5290                            VALUE(subdir)
5291                            VALUE(slashseparator)
5292                            VALUE(savetoserver)
5293                            VALUE(displayprogressmessage)
5294                            VALUE(locserverfilesystem).
5295   TABLES: d020t.
5296   DATA: header LIKE d020s.
5297   DATA: ifields TYPE STANDARD TABLE OF d021s WITH HEADER LINE.
5298   DATA: iflowlogic TYPE STANDARD TABLE OF d022s WITH HEADER LINE.
5299   FIELD-SYMBOLS <wascreen> TYPE tscreenflow.
5300   DATA: wacharheader TYPE scr_chhead.
5301   DATA: iscreenchar TYPE STANDARD TABLE OF scr_chfld WITH HEADER LINE.
5302   DATA: ifieldschar TYPE STANDARD TABLE OF scr_chfld WITH HEADER LINE.
5303   DATA: stars TYPE string VALUE '****************************************************************'.
5304   DATA: comment1 TYPE string VALUE '*   This file was generated by Direct Download Enterprise.     *'.
5305   DATA: comment2 TYPE string VALUE '*   Please do not change it manually.                          *'.
5306   DATA: dynprotext TYPE string VALUE '%_DYNPRO'.
5307   DATA: headertext TYPE string VALUE '%_HEADER'.
5308   DATA: paramstext TYPE string VALUE '%_PARAMS'.
5309   DATA: descriptiontext TYPE string VALUE '%_DESCRIPTION'.
5310   DATA: fieldstext TYPE string VALUE '%_FIELDS'.
5311   DATA: flowlogictext TYPE string VALUE '%_FLOWLOGIC'.
5312   DATA: programlength TYPE string.
5313   DATA: newsubdirectory TYPE string.
5314   DATA: newfilenamewithpath TYPE string.
5315   DATA: newfilenameonly TYPE string.
5316   DATA: completesavepath TYPE string.
5317   LOOP AT ilocscreenflow ASSIGNING <wascreen>.
5318     CALL FUNCTION 'RS_IMPORT_DYNPRO'
5319       EXPORTING
5320         dylang = pmlang
5321         dyname = programname
5322         dynumb = <wascreen>-screen
5323       IMPORTING
5324         header = header
5325       TABLES
5326         ftab   = ifields
5327         pltab  = iflowlogic.
5328     CALL FUNCTION 'RS_SCRP_HEADER_RAW_TO_CHAR'
5329       EXPORTING
5330         header_int  = header
5331       IMPORTING
5332         header_char = wacharheader
5333       EXCEPTIONS
5334         OTHERS      = 1.
5335     APPEND stars TO iscreenchar .
5336     APPEND comment1 TO iscreenchar.
5337     APPEND comment2 TO iscreenchar.
5338     APPEND stars TO iscreenchar.
5339     APPEND dynprotext TO iscreenchar.
5340     APPEND wacharheader-prog TO iscreenchar.
5341     APPEND wacharheader-dnum TO iscreenchar.
5342     APPEND sy-saprl TO iscreenchar.
5343     DESCRIBE FIELD d020t-prog LENGTH programlength IN CHARACTER MODE.
5344     CONCATENATE `                ` programlength INTO iscreenchar.
5345     APPEND iscreenchar.
5346     APPEND headertext TO iscreenchar.
5347     APPEND wacharheader TO iscreenchar.
5348     APPEND descriptiontext TO iscreenchar.
5349     SELECT SINGLE dtxt FROM d020t INTO iscreenchar
5350                        WHERE prog = programname
5351                              AND dynr = <wascreen>-screen
5352                              AND lang = pmlang.
5353     APPEND iscreenchar.
5354     APPEND fieldstext TO iscreenchar.
5355     CALL FUNCTION 'RS_SCRP_FIELDS_RAW_TO_CHAR'
5356       TABLES
5357         fields_int  = ifields[]
5358         fields_char = ifieldschar[]
5359       EXCEPTIONS
5360         OTHERS      = 1.
5361     LOOP AT ifieldschar.
5362       MOVE-CORRESPONDING ifieldschar TO iscreenchar.
5363       APPEND iscreenchar.
5364     ENDLOOP.
5365     APPEND flowlogictext TO iscreenchar.
5366     LOOP AT iflowlogic.
5367       APPEND iflowlogic TO iscreenchar.
5368     ENDLOOP.
5369     PERFORM buildfilename USING userfilepath
5370                                 subdir
5371                                 wacharheader-dnum
5372                                 space
5373                                 space
5374                                 textfileextension
5375                                 is_screen
5376                                 savetoserver
5377                                 slashseparator
5378                                 newfilenamewithpath
5379                                 newfilenameonly
5380                                 newsubdirectory
5381                                 completesavepath.
5382     IF savetoserver IS INITIAL.
5383       PERFORM savefiletopc USING iscreenchar[]
5384                                  newfilenamewithpath
5385                                  newfilenameonly
5386                                  'X'
5387                                  'X'
5388                                  displayprogressmessage.
5389     ELSE.
5390       PERFORM savefiletoserver USING iscreenchar[]
5391                                      newfilenamewithpath
5392                                      newfilenameonly
5393                                      completesavepath
5394                                      displayprogressmessage
5395                                      locserverfilesystem.
5396     ENDIF.
5397     CLEAR header. CLEAR wacharheader.
5398     CLEAR iscreenchar[].
5399     CLEAR ifieldschar[].
5400     CLEAR ifields[].
5401     CLEAR iflowlogic[].
5402   ENDLOOP.
5403 ENDFORM.
5404 FORM downloadguititles USING ilocguititles LIKE dumiguititle[]
5405                              VALUE(userfilepath)
5406                              VALUE(textfileextension)
5407                              VALUE(subdir)
5408                              VALUE(slashseparator)
5409                              VALUE(savetoserver)
5410                              VALUE(displayprogressmessage)
5411                              VALUE(locserverfilesystem).
5412   DATA: ilines TYPE STANDARD TABLE OF string WITH HEADER LINE.
5413   FIELD-SYMBOLS: <waguititle> TYPE tguititle.
5414   DATA: newsubdirectory TYPE string.
5415   DATA: newfilenamewithpath TYPE string.
5416   DATA: newfilenameonly TYPE string.
5417   DATA: completesavepath TYPE string.
5418   LOOP AT ilocguititles ASSIGNING <waguititle>.
5419     APPEND <waguititle>-text TO ilines.
5420     PERFORM buildfilename USING userfilepath
5421                                 subdir
5422                                 <waguititle>-obj_code
5423                                 space
5424                                 space
5425                                 textfileextension
5426                                 is_guititle
5427                                 savetoserver
5428                                 slashseparator
5429                                 newfilenamewithpath
5430                                 newfilenameonly
5431                                 newsubdirectory
5432                                 completesavepath.
5433     IF savetoserver IS INITIAL.
5434       PERFORM savefiletopc USING ilines[]
5435                                  newfilenamewithpath
5436                                  newfilenameonly
5437                                  space
5438                                  space
5439                                  displayprogressmessage.
5440     ELSE.
5441       PERFORM savefiletoserver USING ilines[]
5442                                      newfilenamewithpath
5443                                      newfilenameonly
5444                                      completesavepath
5445                                      displayprogressmessage
5446                                      locserverfilesystem.
5447     ENDIF.
5448     CLEAR ilines[].
5449   ENDLOOP.
5450 ENDFORM.
5451 FORM downloadprograms USING ilocprogram LIKE iprograms[]
5452                             ilocfunctions LIKE ifunctions[]
5453                             ilocdictionaryfilename LIKE idictfilename[]
5454                             iloctabletypefilename LIKE itabletypefilename[]
5455                             VALUE(userfilepath)
5456                             VALUE(fileextension)
5457                             VALUE(htmlfileextension)
5458                             VALUE(textfileextension)
5459                             VALUE(converttohtml)
5460                             VALUE(customernamerange)
5461                             VALUE(getincludes)
5462                             VALUE(getdictstruct)
5463                             VALUE(downloaddocumentation)
5464                             VALUE(sorttablesasc)
5465                             VALUE(slashseparator)
5466                             VALUE(savetoserver)
5467                             VALUE(displayprogressmessage)
5468                             VALUE(locserverfilesystem)
5469                             VALUE(addbackground) TYPE abap_bool.
5470   DATA: iprogfunctions TYPE STANDARD TABLE OF tfunction WITH HEADER LINE.
5471   FIELD-SYMBOLS: <waprogram> TYPE tprogram.
5472   FIELD-SYMBOLS: <wainclude> TYPE tinclude.
5473   DATA: iemptytextelements TYPE STANDARD TABLE OF ttexttable.
5474   DATA: iemptyselectiontexts TYPE STANDARD TABLE OF ttexttable.
5475   DATA: iemptymessages TYPE STANDARD TABLE OF tmessage.
5476   DATA: iemptyguititles TYPE STANDARD TABLE OF tguititle.
5477   DATA: locconverttohtml(1).
5478   DATA: locfileextension TYPE string.
5479   SORT ilocprogram ASCENDING BY progname.
5480   LOOP AT ilocprogram ASSIGNING <waprogram>.
5481     IF <waprogram>-progname = sy-cprog.
5482       locconverttohtml = ''.
5483       locfileextension = textextension.
5484     ELSE.
5485       locconverttohtml = converttohtml.
5486       locfileextension = fileextension.
5487     ENDIF.
5488     PERFORM readincludeanddownload USING <waprogram>-itextelements[]
5489                                          <waprogram>-iselectiontexts[]
5490                                          <waprogram>-imessages[]
5491                                          <waprogram>-iguititle[]
5492                                          <waprogram>-progname
5493                                          space
5494                                          <waprogram>-programtitle
5495                                          is_program
5496                                          userfilepath
5497                                          locfileextension
5498                                          <waprogram>-progname
5499                                          locconverttohtml
5500                                          customernamerange
5501                                          getincludes
5502                                          getdictstruct
5503                                          slashseparator
5504                                          savetoserver
5505                                          displayprogressmessage
5506                                          locserverfilesystem
5507                                          addbackground.
5508     IF NOT <waprogram>-iscreenflow[] IS INITIAL.
5509       PERFORM downloadscreens USING <waprogram>-iscreenflow[]
5510                                     <waprogram>-progname
5511                                     userfilepath
5512                                     textfileextension
5513                                     <waprogram>-progname
5514                                     slashseparator
5515                                     savetoserver
5516                                     displayprogressmessage
5517                                     locserverfilesystem.
5518     ENDIF.
5519     IF NOT <waprogram>-iguititle[] IS INITIAL.
5520       PERFORM downloadguititles USING <waprogram>-iguititle
5521                                       userfilepath
5522                                       textfileextension
5523                                       <waprogram>-progname
5524                                       slashseparator
5525                                       savetoserver
5526                                       displayprogressmessage
5527                                       locserverfilesystem.
5528     ENDIF.
5529     LOOP AT <waprogram>-iincludes ASSIGNING <wainclude>.
5530       PERFORM readincludeanddownload USING iemptytextelements[]
5531                                            iemptyselectiontexts[]
5532                                            iemptymessages[]
5533                                            iemptyguititles[]
5534                                            <wainclude>-includename
5535                                            space
5536                                            <wainclude>-includetitle
5537                                            is_program
5538                                            userfilepath
5539                                            fileextension
5540                                            <waprogram>-progname
5541                                            converttohtml
5542                                            customernamerange
5543                                            getincludes
5544                                            getdictstruct
5545                                            slashseparator
5546                                            savetoserver
5547                                            displayprogressmessage
5548                                            locserverfilesystem
5549                                            addbackground.
5550     ENDLOOP.
5551     IF NOT <waprogram>-idictstruct[] IS INITIAL.
5552       PERFORM downloadddstructures USING <waprogram>-idictstruct[]
5553                                          ilocdictionaryfilename[]
5554                                          userfilepath
5555                                          htmlfileextension
5556                                          <waprogram>-progname
5557                                          sorttablesasc
5558                                          slashseparator
5559                                          savetoserver
5560                                          displayprogressmessage
5561                                          locserverfilesystem
5562                                          addbackground.
5563     ENDIF.
5564     IF NOT <waprogram>-itabletypes[] IS INITIAL.
5565       PERFORM downloadddtabletypes USING <waprogram>-itabletypes[]
5566                                          iloctabletypefilename[]
5567                                          userfilepath
5568                                          htmlfileextension
5569                                          <waprogram>-progname
5570                                          sorttablesasc
5571                                          slashseparator
5572                                          savetoserver
5573                                          displayprogressmessage
5574                                          locserverfilesystem
5575                                          addbackground.
5576     ENDIF.
5577     IF NOT <waprogram>-itransformations[] IS INITIAL.
5578       PERFORM downloadxslt USING <waprogram>-itransformations[]
5579                                  userfilepath
5580                                  fileextension
5581                                  htmlfileextension
5582                                  textfileextension
5583                                  converttohtml
5584                                  customernamespace
5585                                  slashseparatortouse
5586                                  savetoserver
5587                                  <waprogram>-progname
5588                                  displayprogressmessage
5589                                  serverfilesystem
5590                                  addbackground.
5591     ENDIF.
5592     LOOP AT ilocfunctions INTO iprogfunctions WHERE programlinkname = <waprogram>-progname.
5593       APPEND iprogfunctions.
5594     ENDLOOP.
5595     IF NOT iprogfunctions[] IS INITIAL.
5596       PERFORM downloadfunctions USING iprogfunctions[]
5597                                       ilocdictionaryfilename[]
5598                                       itabletypefilename[]
5599                                       userfilepath
5600                                       fileextension
5601                                       <waprogram>-progname
5602                                       downloaddocumentation
5603                                       converttohtml
5604                                       customernamerange
5605                                       getincludes
5606                                       getdictstruct
5607                                       textfileextension
5608                                       htmlfileextension
5609                                       sorttablesasc
5610                                       slashseparator
5611                                       savetoserver
5612                                       displayprogressmessage
5613                                       locserverfilesystem
5614                                       addbackground.
5615       CLEAR iprogfunctions[].
5616     ENDIF.
5617   ENDLOOP.
5618 ENDFORM.
5619 FORM downloadclasses USING ilocclasses LIKE iclasses[]
5620                            ilocfunctions LIKE ifunctions[]
5621                            ilocdictionaryfilename LIKE idictfilename[]
5622                            iloctabletypefilename LIKE itabletypefilename[]
5623                            VALUE(userfilepath)
5624                            VALUE(fileextension)
5625                            VALUE(htmlfileextension)
5626                            VALUE(textfileextension)
5627                            VALUE(converttohtml)
5628                            VALUE(customernamerange)
5629                            VALUE(getincludes)
5630                            VALUE(getdictstruct)
5631                            VALUE(downloaddocumentation)
5632                            VALUE(sorttablesasc)
5633                            VALUE(slashseparator)
5634                            VALUE(savetoserver)
5635                            VALUE(displayprogressmessage)
5636                            VALUE(locserverfilesystem)
5637                            VALUE(addbackground) TYPE abap_bool.
5638   DATA: iclassfunctions TYPE STANDARD TABLE OF tfunction WITH HEADER LINE.
5639   FIELD-SYMBOLS: <waclass> TYPE tclass.
5640   FIELD-SYMBOLS: <wamethod> TYPE tmethod.
5641   DATA: additionalsubdirectory TYPE string.
5642   DATA: classdocumentationexists TYPE abap_bool VALUE false.
5643   SORT ilocclasses ASCENDING BY clsname.
5644   LOOP AT ilocclasses ASSIGNING <waclass>.
5645     PERFORM readclassanddownload USING <waclass>
5646                                         <waclass>-clsname
5647                                         space
5648                                         is_class
5649                                         userfilepath
5650                                         fileextension
5651                                         space
5652                                         converttohtml
5653                                         customernamerange
5654                                         getincludes
5655                                         getdictstruct
5656                                         slashseparator
5657                                         savetoserver
5658                                         displayprogressmessage
5659                                         locserverfilesystem
5660                                         addbackground.
5661     LOOP AT <waclass>-imethods ASSIGNING <wamethod>.
5662       additionalsubdirectory = <waclass>-clsname.
5663       PERFORM readmethodanddownload USING <wamethod>
5664                                           <wamethod>-cmpname
5665                                           <wamethod>-methodkey
5666                                           space
5667                                           is_method
5668                                           userfilepath
5669                                           fileextension
5670                                           additionalsubdirectory
5671                                           converttohtml
5672                                           customernamerange
5673                                           getincludes
5674                                           getdictstruct
5675                                           slashseparator
5676                                           savetoserver
5677                                           displayprogressmessage
5678                                           locserverfilesystem
5679                                           addbackground.
5680 
5681     ENDLOOP.
5682     IF NOT <waclass>-idictstruct[] IS INITIAL.
5683       PERFORM downloadddstructures USING <waclass>-idictstruct[]
5684                                          ilocdictionaryfilename[]
5685                                          userfilepath
5686                                          htmlfileextension
5687                                          <waclass>-clsname
5688                                          sorttablesasc
5689                                          slashseparator
5690                                          savetoserver
5691                                          displayprogressmessage
5692                                          locserverfilesystem
5693                                          addbackground.
5694     ENDIF.
5695     IF NOT <waclass>-itabletypes[] IS INITIAL.
5696       PERFORM downloadddtabletypes USING <waclass>-itabletypes[]
5697                                          iloctabletypefilename[]
5698                                          userfilepath
5699                                          htmlfileextension
5700                                          <waclass>-clsname
5701                                          sorttablesasc
5702                                          slashseparator
5703                                          savetoserver
5704                                          displayprogressmessage
5705                                          locserverfilesystem
5706                                          addbackground.
5707     ENDIF.
5708     IF NOT <waclass>-itransformations[] IS INITIAL.
5709       PERFORM downloadxslt USING <waclass>-itransformations[]
5710                                  userfilepath
5711                                  fileextension
5712                                  htmlfileextension
5713                                  textfileextension
5714                                  converttohtml
5715                                  customernamespace
5716                                  slashseparatortouse
5717                                  savetoserver
5718                                  <waclass>-clsname
5719                                  displayprogressmessage
5720                                  serverfilesystem
5721                                  addbackground.
5722     ENDIF.
5723     LOOP AT ilocfunctions INTO iclassfunctions WHERE programlinkname = <waclass>-clsname.
5724       APPEND iclassfunctions.
5725     ENDLOOP.
5726     IF NOT iclassfunctions[] IS INITIAL.
5727       PERFORM downloadfunctions USING iclassfunctions[]
5728                                       ilocdictionaryfilename[]
5729                                       iloctabletypefilename[]
5730                                       userfilepath
5731                                       fileextension
5732                                       <waclass>-clsname
5733                                       downloaddocumentation
5734                                       converttohtml
5735                                       customernamerange
5736                                       getincludes
5737                                       getdictstruct
5738                                       textfileextension
5739                                       htmlfileextension
5740                                       sorttablesasc
5741                                       slashseparator
5742                                       savetoserver
5743                                       displayprogressmessage
5744                                       locserverfilesystem
5745                                       addbackground.
5746       CLEAR iclassfunctions[].
5747     ENDIF.
5748     IF downloaddocumentation = true.
5749       PERFORM downloadclassdocs USING <waclass>-clsname
5750                                        userfilepath
5751                                        fileextension
5752                                        converttohtml
5753                                        slashseparator
5754                                        savetoserver
5755                                        displayprogressmessage
5756                                       '' "subdirectory
5757                                        classdocumentationexists
5758                                        locserverfilesystem
5759                                        addbackground.
5760     ENDIF.
5761   ENDLOOP.
5762 ENDFORM.
5763 FORM downloadxslt USING iloctransformation LIKE itransformations[]
5764                             VALUE(userfilepath)
5765                             VALUE(fileextension)
5766                             VALUE(htmlfileextension)
5767                             VALUE(textfileextension)
5768                             VALUE(converttohtml)
5769                             VALUE(customernamerange)
5770                             VALUE(slashseparator)
5771                             VALUE(savetoserver)
5772                             VALUE(subdir)
5773                             VALUE(displayprogressmessage)
5774                             VALUE(locserverfilesystem)
5775                             VALUE(addbackground) TYPE abap_bool.
5776   FIELD-SYMBOLS: <watransformation> TYPE ttransformation.
5777   SORT iloctransformation ASCENDING.
5778   LOOP AT iloctransformation ASSIGNING <watransformation>.
5779     PERFORM readxsltanddownload USING <watransformation>-xsltname
5780                                       <watransformation>-xsltdesc
5781                                       userfilepath
5782                                       fileextension
5783                                       converttohtml
5784                                       customernamerange
5785                                       slashseparator
5786                                       savetoserver
5787                                       subdir
5788                                       displayprogressmessage
5789                                       locserverfilesystem
5790                                       addbackground.
5791   ENDLOOP.
5792 ENDFORM.
5793 FORM reformatclasscode USING itemplines LIKE dumihtml[].
5794   FIELD-SYMBOLS: <waline> TYPE string.
5795   DATA: newline TYPE string.
5796   DATA: inewtable TYPE STANDARD TABLE OF string.
5797   DATA: foundone TYPE abap_bool VALUE false.
5798   LOOP AT itemplines ASSIGNING <waline>.
5799     IF NOT <waline> IS INITIAL.
5800       IF foundone = false.
5801         FIND 'data' IN <waline> RESPECTING CASE.
5802         IF sy-subrc = 0.
5803           foundone = true.
5804         ENDIF.
5805         FIND 'constants' IN <waline> RESPECTING CASE.
5806         IF sy-subrc = 0.
5807           foundone = true.
5808         ENDIF.
5809         IF foundone = true.
5810           newline = <waline>.
5811           IF ( newline CS '.' OR newline CS '*' ).
5812             REPLACE '!' IN <waline> WITH ''.
5813             APPEND newline TO inewtable.
5814             CLEAR newline.
5815             foundone = false.
5816           ENDIF.
5817         ELSE.
5818           REPLACE '!' IN <waline> WITH ''.
5819           APPEND <waline> TO inewtable.
5820         ENDIF.
5821       ELSE.
5822         CONCATENATE newline <waline> INTO newline SEPARATED BY space.
5823         IF ( newline CS '.' OR newline CS '*' ).
5824           APPEND newline TO inewtable.
5825           CLEAR newline.
5826           foundone = false.
5827         ENDIF.
5828       ENDIF.
5829     ELSE.
5830       REPLACE '!' IN <waline> WITH ''.
5831       APPEND <waline> TO inewtable[].
5832     ENDIF.
5833   ENDLOOP.
5834   itemplines[] = inewtable[].
5835 ENDFORM.
5836 FORM convertddtohtml USING ilocdictstructure LIKE dumidictstructure[]
5837                            ilochtml LIKE dumihtml[]
5838                            VALUE(tablename)
5839                            VALUE(tabletitle)
5840                            VALUE(sorttablesasc)
5841                            VALUE(addbackground) TYPE abap_bool..
5842   DATA: icolumncaptions TYPE STANDARD TABLE OF string WITH HEADER LINE.
5843   DATA: wadictionary TYPE tdicttablestructure.
5844   DATA: wahtml TYPE string.
5845   DATA: title TYPE string.
5846   FIELD-SYMBOLS: <ilocdictstructure> TYPE tdicttablestructure.
5847   FIELD-SYMBOLS: <fsfield>.
5848   DATA: wtextcell TYPE string.
5849   DATA: rowcounter(3).
5850   DATA: wfieldbasetype.
5851   PERFORM buildddcolumnheaders USING icolumncaptions[].
5852   CONCATENATE 'Dictionary object-' tablename INTO title SEPARATED BY space.
5853   PERFORM addhtmlheader USING ilochtml[]
5854                               title
5855                               addbackground
5856                               ss_table.
5857   APPEND `<body>` TO ilochtml.
5858   APPEND `  <table class="outerTable">` TO ilochtml.
5859   APPEND `    <tr>` TO ilochtml.
5860   CONCATENATE `      <td><h2>Table: ` tablename '</h2>' INTO wahtml.
5861   APPEND wahtml TO ilochtml.
5862   CONCATENATE `  <h3>Description: ` tabletitle '</h3></td>' INTO wahtml.
5863   APPEND wahtml TO ilochtml.
5864   APPEND `    </tr>` TO ilochtml.
5865   APPEND `    <tr>` TO ilochtml.
5866   APPEND `      <td><!--This is where our main table begins  -->` TO ilochtml.
5867   APPEND `<table class="innerTable">` TO ilochtml.
5868   IF NOT sorttablesasc IS INITIAL.
5869     SORT ilocdictstructure ASCENDING BY fieldname.
5870   ENDIF.
5871   APPEND `<tr>` TO ilochtml.
5872   LOOP AT icolumncaptions.
5873     CONCATENATE `  <th>` icolumncaptions `</th>` INTO wahtml.
5874     APPEND wahtml TO ilochtml.
5875   ENDLOOP.
5876   APPEND `</tr>` TO ilochtml.
5877   LOOP AT ilocdictstructure ASSIGNING <ilocdictstructure>.
5878     APPEND `<tr class="cell">` TO ilochtml.
5879     rowcounter = rowcounter + 1.
5880     CONCATENATE `  <td>` rowcounter `</td>` INTO wahtml.
5881     APPEND wahtml TO ilochtml.
5882     DO.
5883       ASSIGN COMPONENT sy-index OF STRUCTURE <ilocdictstructure> TO <fsfield>.
5884       IF sy-subrc = 0.
5885         DESCRIBE FIELD <fsfield> TYPE wfieldbasetype.
5886         IF wfieldbasetype <> 'h'.
5887           MOVE <fsfield> TO wtextcell.
5888           wahtml = `  <td>`.
5889           IF wtextcell IS INITIAL.
5890             CONCATENATE wahtml '&nbsp;' '</td>' INTO wahtml.
5891           ELSE.
5892             CONCATENATE wahtml wtextcell '</td>' INTO wahtml.
5893           ENDIF.
5894           APPEND wahtml TO ilochtml.
5895           CLEAR wahtml.
5896         ENDIF.
5897       ELSE.
5898         EXIT.
5899       ENDIF.
5900     ENDDO.
5901     APPEND `</tr>` TO ilochtml.
5902   ENDLOOP.
5903   APPEND `      </table>` TO ilochtml.
5904   APPEND `     </td>` TO ilochtml.
5905   APPEND `   </tr>` TO ilochtml.
5906   APPEND '<br/>' TO ilochtml.
5907   PERFORM adddomaintohtml USING ilocdictstructure[] ilochtml[].
5908   PERFORM addhtmlfooter USING ilochtml[].
5909 ENDFORM.
5910 FORM adddomaintohtml USING ilocdictstructure LIKE dumidictstructure[]
5911                            ilochtml LIKE dumihtml[].
5912   DATA: icolumncaptions TYPE STANDARD TABLE OF string WITH HEADER LINE.
5913   DATA: wadictionary TYPE tdicttablestructure.
5914   DATA: wahtml TYPE string.
5915   DATA: title TYPE string.
5916   FIELD-SYMBOLS: <ilocdictstructure> TYPE tdicttablestructure.
5917   DATA: idomstructure TYPE STANDARD TABLE OF tdomainstructure WITH HEADER LINE.
5918   FIELD-SYMBOLS: <fsfield>.
5919   DATA: wtextcell TYPE string.
5920   DATA: rowcounter(3).
5921   DATA: wfieldbasetype.
5922   DATA: addedheader TYPE flag VALUE ''.
5923   PERFORM builddomcolumnheaders USING icolumncaptions[].
5924   LOOP AT ilocdictstructure ASSIGNING <ilocdictstructure>.
5925     LOOP AT <ilocdictstructure>-idomains INTO idomstructure.
5926       IF addedheader = ''.
5927         APPEND `  <table class="outerTable">` TO ilochtml.
5928         APPEND `    <tr>` TO ilochtml.
5929         CONCATENATE `      <td><h2>Fixed Domain Values ` '</h2>' INTO wahtml.
5930         APPEND wahtml TO ilochtml.
5931         APPEND `    </tr>` TO ilochtml.
5932         APPEND `    <tr>` TO ilochtml.
5933         APPEND `      <td><!--This is where our main table begins  -->` TO ilochtml.
5934         APPEND `<table class="innerTable">` TO ilochtml.
5935         APPEND `<tr>` TO ilochtml.
5936         LOOP AT icolumncaptions.
5937           CONCATENATE `  <th>` icolumncaptions `</th>` INTO wahtml.
5938           APPEND wahtml TO ilochtml.
5939         ENDLOOP.
5940         APPEND `</tr>` TO ilochtml.
5941         addedheader = 'X'.
5942       ENDIF.
5943       APPEND `<tr class="cell">` TO ilochtml.
5944       DO.
5945         ASSIGN COMPONENT sy-index OF STRUCTURE idomstructure TO <fsfield>.
5946         IF sy-subrc = 0.
5947           DESCRIBE FIELD <fsfield> TYPE wfieldbasetype.
5948           IF wfieldbasetype <> 'h'.
5949             MOVE <fsfield> TO wtextcell.
5950             wahtml = `  <td>`.
5951             IF wtextcell IS INITIAL.
5952               CONCATENATE wahtml '&nbsp;' '</td>' INTO wahtml.
5953             ELSE.
5954               CONCATENATE wahtml wtextcell '</td>' INTO wahtml.
5955             ENDIF.
5956             APPEND wahtml TO ilochtml.
5957             CLEAR wahtml.
5958           ENDIF.
5959         ELSE.
5960           EXIT.
5961         ENDIF.
5962       ENDDO.
5963       APPEND `</tr>` TO ilochtml.
5964     ENDLOOP.
5965   ENDLOOP.
5966   IF addedheader = 'X'.
5967     APPEND `      </table>` TO ilochtml.
5968     APPEND `     </td>` TO ilochtml.
5969     APPEND `   </tr>` TO ilochtml.
5970   ENDIF.
5971 ENDFORM.
5972 FORM converttabletypetohtml USING iloctabletypes LIKE itabletypes[]
5973                                   ilochtml LIKE dumihtml[]
5974                                   VALUE(tablename)
5975                                   VALUE(tabletitle)
5976                                   VALUE(sorttablesasc)
5977                                   VALUE(addbackground) TYPE abap_bool.
5978   DATA: icolumncaptions TYPE STANDARD TABLE OF string WITH HEADER LINE.
5979   DATA: wadictionary TYPE tdicttablestructure.
5980   DATA: wahtml TYPE string.
5981   DATA: title TYPE string.
5982   FIELD-SYMBOLS: <iloctabletype> LIKE LINE OF iloctabletypes.
5983   FIELD-SYMBOLS: <fsfield>.
5984   DATA: wtextcell TYPE string.
5985   DATA: rowcounter(3).
5986   PERFORM buildcolumnheaderstabletypes USING icolumncaptions[].
5987   CONCATENATE 'Dictionary object (Table Type)-' tablename INTO title SEPARATED BY space.
5988   PERFORM addhtmlheader USING ilochtml[]
5989                               title
5990                               addbackground
5991                               ss_table.
5992   APPEND '<body>' TO ilochtml.
5993   APPEND '  <table class="outerTable">' TO ilochtml.
5994   APPEND '    <tr>' TO ilochtml.
5995   CONCATENATE '      <td><h2>Table: ' tablename '</h2>' INTO wahtml.
5996   APPEND wahtml TO ilochtml.
5997   CONCATENATE '  <h3>Description: ' tabletitle '</h3></td>' INTO wahtml.
5998   APPEND wahtml TO ilochtml.
5999   APPEND '    </tr>' TO ilochtml.
6000   APPEND '    <tr>' TO ilochtml.
6001   APPEND '      <td><!--This is where our main table begins  -->' TO ilochtml.
6002   APPEND '<table class="innerTable">' TO ilochtml.
6003   APPEND '<tr>' TO ilochtml.
6004   LOOP AT icolumncaptions.
6005     CONCATENATE '  <th>' icolumncaptions '</th>' INTO wahtml.
6006     APPEND wahtml TO ilochtml.
6007   ENDLOOP.
6008   APPEND '</tr>' TO ilochtml.
6009   LOOP AT iloctabletypes ASSIGNING <iloctabletype>.
6010     APPEND '<tr class="cell">' TO ilochtml.
6011     rowcounter = rowcounter + 1.
6012     CONCATENATE '  <td>' rowcounter '</td>' INTO wahtml.
6013     APPEND wahtml TO ilochtml.
6014     DO.
6015       ASSIGN COMPONENT sy-index OF STRUCTURE <iloctabletype> TO <fsfield>.
6016       IF sy-subrc = 0.
6017         MOVE <fsfield> TO wtextcell.
6018         wahtml = '  <td>'.
6019         IF wtextcell IS INITIAL.
6020           CONCATENATE wahtml '&nbsp;' '</td>' INTO wahtml.
6021         ELSE.
6022           CONCATENATE wahtml wtextcell '</td>' INTO wahtml.
6023         ENDIF.
6024         APPEND wahtml TO ilochtml.
6025         CLEAR wahtml.
6026       ELSE.
6027         EXIT.
6028       ENDIF.
6029     ENDDO.
6030     APPEND '</tr>' TO ilochtml.
6031   ENDLOOP.
6032   APPEND '      </table>' TO ilochtml.
6033   APPEND '     </td>' TO ilochtml.
6034   APPEND '   </tr>' TO ilochtml.
6035   PERFORM addhtmlfooter USING ilochtml[].
6036 ENDFORM.
6037 FORM convertcodetohtml USING icontents LIKE dumihtml[]
6038                              VALUE(programname)
6039                              VALUE(shortdescription)
6040                              VALUE(sourcecodetype)
6041                              VALUE(functiondocumentationexists)
6042                              VALUE(ismainfunctioninclude)
6043                              VALUE(htmlextension)
6044                              VALUE(customernamerange)
6045                              VALUE(getincludes)
6046                              VALUE(getdictstructures)
6047                              VALUE(addbackground) TYPE abap_bool.
6048   DATA: htmltable TYPE STANDARD TABLE OF string WITH HEADER LINE.
6049   DATA: head(255).
6050   DATA: tail(255).
6051   DATA: mytabix TYPE sytabix.
6052   DATA: nextline TYPE sytabix.
6053   DATA: hyperlinkname TYPE string.
6054   DATA: copyofcurrentline TYPE string.
6055   DATA: currentlinelength TYPE i VALUE 0.
6056   DATA: copylinelength TYPE i VALUE 0.
6057   DATA: ignorefuturelines TYPE abap_bool VALUE false.
6058   DATA: foundasterix TYPE abap_bool VALUE false.
6059   DATA: lowercaselink TYPE string.
6060   DATA: wanextline TYPE string.
6061   DATA: wacontent TYPE string.
6062   DATA: incommentmode TYPE abap_bool VALUE 'X'.
6063   PERFORM addhtmlheader USING htmltable[]
6064                               programname
6065                               addbackground
6066                               ss_code.
6067   APPEND '<body>' TO htmltable.
6068   APPEND '<table class="outerTable">' TO htmltable.
6069   APPEND `  <tr class="normalBoldLarge">` TO htmltable.
6070   CONCATENATE `     <td><h2>Code listing for: ` programname `</h2>` INTO htmltable.
6071   APPEND htmltable.
6072   CONCATENATE `<h3> Description: ` shortdescription `</h3></td>` INTO htmltable.
6073   APPEND htmltable.
6074   APPEND `   </tr>` TO htmltable.
6075   APPEND `  <tr>` TO htmltable.
6076   APPEND `     <td>` TO htmltable.
6077   APPEND `     <table class="innerTable">` TO htmltable.
6078   APPEND `       <tr>` TO htmltable.
6079   APPEND `          <td>` TO htmltable.
6080   LOOP AT icontents INTO wacontent.
6081     mytabix = sy-tabix.
6082     IF NOT ( wacontent IS INITIAL ).
6083       WHILE ( wacontent CS '<' OR wacontent CS '>' ).
6084         REPLACE '<' IN wacontent WITH lt.
6085         REPLACE '>' IN wacontent WITH gt.
6086       ENDWHILE.
6087       IF wacontent+0(1) <> asterix.
6088         IF mytabix = 1.
6089           APPEND `   <div class="code">` TO htmltable.
6090           incommentmode = false.
6091         ELSE.
6092           IF incommentmode = true.
6093             APPEND `   </div>` TO htmltable.
6094             incommentmode = false.
6095             APPEND `   <div class="code">` TO htmltable.
6096           ENDIF.
6097         ENDIF.
6098         currentlinelength = strlen( wacontent ).
6099         copyofcurrentline = wacontent.
6100         IF sourcecodetype <> is_documentation.
6101           IF ( wacontent CS callfunction ) AND ( wacontent <> 'DESTINATION' ).
6102             nextline = mytabix + 1.
6103             READ TABLE icontents INTO wanextline INDEX nextline.
6104             TRANSLATE wanextline TO UPPER CASE.
6105             IF wanextline NS 'DESTINATION'.
6106               SHIFT copyofcurrentline LEFT DELETING LEADING space.
6107               copylinelength = strlen( copyofcurrentline ).
6108               SPLIT copyofcurrentline AT space INTO head tail.
6109               SPLIT tail AT space INTO head tail.
6110               SPLIT tail AT space INTO head tail.
6111               TRANSLATE head USING ''' '.
6112               SHIFT head LEFT DELETING LEADING space.
6113               TRY.
6114                   IF head+0(1) = 'Y' OR head+0(1) = 'Z' OR head+0(1) = 'y' OR head+0(1) = 'z' OR head CS customernamerange.
6115                     hyperlinkname = head.
6116                     IF sourcecodetype = is_function.
6117                       copyofcurrentline = 'call function <a href ="../'.
6118                     ELSE.
6119                       copyofcurrentline = 'call function <a href ="'.
6120                     ENDIF.
6121                     lowercaselink = hyperlinkname.
6122                     TRANSLATE lowercaselink TO LOWER CASE.
6123                     IF frontendopsystem = non_unix.
6124                       TRANSLATE lowercaselink USING '/_'.
6125                     ENDIF.
6126                     CONCATENATE copyofcurrentline
6127                                 lowercaselink     "hyperlinkName
6128                                 '/'
6129                                 lowercaselink     "hyperlinkName
6130                                 period htmlextension '">'
6131                                 ''''
6132                                 hyperlinkname
6133                                 ''''
6134                                 '</a>'
6135                                 tail INTO copyofcurrentline.
6136                     WHILE copylinelength < currentlinelength.
6137                       SHIFT copyofcurrentline RIGHT BY 1 PLACES.
6138                       copylinelength = copylinelength + 1.
6139                     ENDWHILE.
6140                     wacontent = copyofcurrentline.
6141                   ENDIF.
6142                 CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
6143               ENDTRY.
6144             ENDIF.
6145           ENDIF.
6146         ENDIF.
6147         IF wacontent CS include OR wacontent CS lowinclude.
6148           SHIFT copyofcurrentline LEFT DELETING LEADING space.
6149           copylinelength = strlen( copyofcurrentline ).
6150           SPLIT copyofcurrentline AT space INTO head tail.
6151           SHIFT tail LEFT DELETING LEADING space.
6152           TRY.
6153               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' )
6154                   AND NOT getincludes IS INITIAL AND  tail NS structure AND tail NS lowstructure.
6155                 CLEAR wacontent.
6156                 SHIFT tail LEFT DELETING LEADING space.
6157                 SPLIT tail AT period INTO hyperlinkname tail.
6158                 copyofcurrentline = 'include <a href ="'.
6159                 lowercaselink = hyperlinkname.
6160                 TRANSLATE lowercaselink TO LOWER CASE.
6161                 IF frontendopsystem = non_unix.
6162                   TRANSLATE lowercaselink USING '/_'.
6163                 ENDIF.
6164                 CONCATENATE copyofcurrentline
6165                             lowercaselink       "hyperlinkName
6166                             period htmlextension '">'
6167                             hyperlinkname
6168                             '</a>'
6169                             period tail INTO copyofcurrentline.
6170                 WHILE copylinelength < currentlinelength.
6171                   SHIFT copyofcurrentline RIGHT BY 1 PLACES.
6172                   copylinelength = copylinelength + 1.
6173                 ENDWHILE.
6174                 wacontent = copyofcurrentline.
6175               ELSE.
6176                 IF NOT getdictstructures IS INITIAL.
6177                   copylinelength = strlen( copyofcurrentline ).
6178                   SPLIT copyofcurrentline AT space INTO head tail.
6179                   SHIFT tail LEFT DELETING LEADING space.
6180                   SPLIT tail AT space INTO head tail.
6181                   TRY.
6182                       IF tail+0(1) = 'Y' OR tail+0(1) = 'Z' OR tail+0(1) = 'y' OR tail+0(1) = 'z' OR tail CS customernamerange.
6183                         CLEAR wacontent.
6184                         SHIFT tail LEFT DELETING LEADING space.
6185                         SPLIT tail AT period INTO hyperlinkname tail.
6186                         copyofcurrentline = 'include structure <a href ='.
6187                         lowercaselink = hyperlinkname.
6188                         TRANSLATE lowercaselink TO LOWER CASE.
6189                         IF frontendopsystem = non_unix.
6190                           TRANSLATE lowercaselink USING '/_'.
6191                         ENDIF.
6192                         CONCATENATE copyofcurrentline
6193                                     '"'
6194                                     lowercaselink    "hyperlinkName
6195                                     '/'
6196                                     'dictionary-'
6197                                     lowercaselink    "hyperlinkName
6198                                     period htmlextension
6199                                     '">'
6200                                     hyperlinkname
6201                                     '</a>'
6202                                     period tail INTO copyofcurrentline.
6203                         WHILE copylinelength < currentlinelength.
6204                           SHIFT copyofcurrentline RIGHT BY 1 PLACES.
6205                           copylinelength = copylinelength + 1.
6206                         ENDWHILE.
6207                         wacontent = copyofcurrentline.
6208                       ENDIF.
6209                     CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
6210                   ENDTRY.
6211                 ENDIF.
6212               ENDIF.
6213             CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
6214           ENDTRY.
6215         ENDIF.
6216       ELSE.
6217         IF  wacontent+0(1) = asterix.
6218           IF mytabix = 1.
6219             APPEND `   <div class="codeComment">` TO htmltable.
6220             incommentmode = true.
6221           ELSE.
6222             IF incommentmode = false.
6223               APPEND `   </div>` TO htmltable.
6224               APPEND `   <div class="codeComment">` TO htmltable.
6225               incommentmode = true.
6226             ENDIF.
6227           ENDIF.
6228         ENDIF.
6229       ENDIF.
6230       IF incommentmode = true.
6231         WHILE wacontent CS ' '.
6232           REPLACE space WITH '&nbsp;' INTO wacontent.
6233           IF sy-subrc <> 0.
6234             EXIT.
6235           ENDIF.
6236         ENDWHILE.
6237       ENDIF.
6238       htmltable =  wacontent.
6239       TRY.
6240           IF htmltable+0(1) = ` `.
6241             WHILE htmltable CS ` `.
6242               REPLACE ` ` WITH '&nbsp;' INTO htmltable.
6243               IF sy-subrc <> 0.
6244                 EXIT.
6245               ENDIF.
6246             ENDWHILE.
6247           ENDIF.
6248         CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
6249       ENDTRY.
6250     ELSE.
6251       htmltable = ''.
6252     ENDIF.
6253     CONCATENATE htmltable `<br />` INTO htmltable.
6254     APPEND htmltable.
6255   ENDLOOP.
6256   APPEND `            </div>` TO htmltable.
6257   APPEND `          </td>`  TO htmltable.
6258   APPEND `        </tr>` TO htmltable.
6259   APPEND `      </table>` TO htmltable.
6260   APPEND `      </td>` TO htmltable.
6261   APPEND `      </tr>` TO htmltable.
6262   PERFORM addhtmlfooter USING htmltable[].
6263   icontents[] = htmltable[].
6264 ENDFORM.
6265 FORM convertclasstohtml USING icontents LIKE dumihtml[]
6266                               VALUE(classname)
6267                               VALUE(shortdescription)
6268                               VALUE(sourcecodetype)
6269                               VALUE(htmlextension)
6270                               VALUE(customernamerange)
6271                               VALUE(getdictstructures)
6272                               VALUE(addbackground) TYPE abap_bool.
6273   DATA: htmltable TYPE STANDARD TABLE OF string WITH HEADER LINE.
6274   DATA: mytabix TYPE sytabix.
6275   DATA: wacontent TYPE string.
6276   DATA: head TYPE string.
6277   DATA: tail TYPE string.
6278   DATA: hyperlinkname TYPE string.
6279   DATA: lowercaselink TYPE string.
6280   DATA: copyofcurrentline TYPE string.
6281   DATA: currentlinelength TYPE i VALUE 0.
6282   DATA: copylinelength TYPE i VALUE 0.
6283   DATA: incommentmode TYPE abap_bool VALUE 'X'.
6284   DATA: methoddirectory TYPE string.
6285   PERFORM addhtmlheader USING htmltable[]
6286                               classname
6287                               addbackground
6288                               ss_code.
6289   APPEND '<body>' TO htmltable.
6290   APPEND '<table class="outerTable">' TO htmltable.
6291   APPEND `  <tr class="normalBoldLarge">` TO htmltable.
6292   CONCATENATE `     <td><h2>Code listing for class: ` classname `</h2>` INTO htmltable.
6293   APPEND htmltable.
6294   CONCATENATE `<h3> Description: ` shortdescription `</h3></td>` INTO htmltable.
6295   APPEND htmltable.
6296   APPEND `   </tr>` TO htmltable.
6297   APPEND `  <tr>` TO htmltable.
6298   APPEND `     <td>` TO htmltable.
6299   APPEND `     <table class="innerTable">` TO htmltable.
6300   APPEND `       <tr>` TO htmltable.
6301   APPEND `          <td>` TO htmltable.
6302   LOOP AT icontents INTO wacontent.
6303     mytabix = sy-tabix.
6304     IF NOT ( wacontent IS INITIAL ).
6305       IF wacontent+0(1) = asterix.
6306         htmltable = wacontent.
6307         IF mytabix = 1.
6308           APPEND `   <div class="codeComment">` TO htmltable.
6309           incommentmode = true.
6310         ELSE.
6311           IF incommentmode = false.
6312             APPEND `   </div>` TO htmltable.
6313             APPEND `   <div class="codeComment">` TO htmltable.
6314             incommentmode = true.
6315           ENDIF.
6316         ENDIF.
6317       ELSE.
6318         IF mytabix = 1.
6319           APPEND `   <div class="code">` TO htmltable.
6320           incommentmode = false.
6321         ELSE.
6322           IF incommentmode = true.
6323             APPEND `   </div>` TO htmltable.
6324             incommentmode = false.
6325             APPEND `   <div class="code">` TO htmltable.
6326           ENDIF.
6327         ENDIF.
6328         IF NOT ( wacontent IS INITIAL ).
6329           WHILE ( wacontent CS '<' OR wacontent CS '>' ).
6330             REPLACE '<' IN wacontent WITH lt.
6331             REPLACE '>' IN wacontent WITH gt.
6332           ENDWHILE.
6333           IF wacontent CS 'public section.'.
6334             methoddirectory = 'public_methods'.
6335           ELSEIF wacontent CS 'private section.'.
6336             methoddirectory = 'private_methods'.
6337           ELSEIF wacontent CS 'protected section.'.
6338             methoddirectory = 'protected_methods'.
6339           ENDIF.
6340           FIND REGEX '([:space:]*methods[:space:]*)(.*)' IN wacontent
6341                                                          IGNORING CASE
6342                                                          SUBMATCHES head hyperlinkname.
6343           IF sy-subrc = 0.
6344             SHIFT hyperlinkname LEFT DELETING LEADING space.
6345             CONCATENATE methoddirectory
6346                         '/'
6347                         hyperlinkname
6348                         '.html'
6349                         INTO lowercaselink.
6350             TRANSLATE lowercaselink TO LOWER CASE.
6351             CONCATENATE head
6352                         ' <a href="'
6353                         lowercaselink
6354                         '">'
6355                         hyperlinkname
6356                         '</a>'
6357                         INTO wacontent.
6358             SHIFT wacontent RIGHT BY 2 PLACES.
6359           ENDIF.
6360           IF NOT getdictstructures IS INITIAL.
6361             FIND 'class' IN wacontent IGNORING CASE.
6362             IF sy-subrc <> 0.
6363               copylinelength = strlen( wacontent ).
6364               copyofcurrentline = wacontent.
6365               SPLIT copyofcurrentline AT space INTO head tail.
6366               SHIFT tail LEFT DELETING LEADING space.
6367               SPLIT tail AT space INTO head tail.
6368               TRY.
6369                   IF tail+0(1) = 'Y' OR tail+0(1) = 'Z' OR tail+0(1) = 'y' OR tail+0(1) = 'z' OR tail CS customernamerange.
6370                     CLEAR wacontent.
6371                     SHIFT tail LEFT DELETING LEADING space.
6372                     SPLIT tail AT period INTO hyperlinkname tail.
6373                     copyofcurrentline = 'include structure <a href ='.
6374                     lowercaselink = hyperlinkname.
6375                     TRANSLATE lowercaselink TO LOWER CASE.
6376                     IF frontendopsystem = non_unix.
6377                       TRANSLATE lowercaselink USING '/_'.
6378                     ENDIF.
6379                     CONCATENATE copyofcurrentline
6380                                 '"'
6381                                 lowercaselink    "hyperlinkName
6382                                 '/'
6383                                 'dictionary-'
6384                                 lowercaselink    "hyperlinkName
6385                                 period htmlextension
6386                                 '">'
6387                                 hyperlinkname
6388                                 '</a>'
6389                                 period tail INTO copyofcurrentline.
6390                     WHILE copylinelength < currentlinelength.
6391                       SHIFT copyofcurrentline RIGHT BY 1 PLACES.
6392                       copylinelength = copylinelength + 1.
6393                     ENDWHILE.
6394                     wacontent = copyofcurrentline.
6395                   ENDIF.
6396                 CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
6397               ENDTRY.
6398             ENDIF.
6399           ENDIF.
6400           htmltable = wacontent.
6401           TRY.
6402               IF htmltable+0(1) = ` `.
6403                 WHILE htmltable CS ` `.
6404                   REPLACE ` ` WITH '&nbsp;' INTO htmltable.
6405                   IF sy-subrc <> 0.
6406                     EXIT.
6407                   ENDIF.
6408                 ENDWHILE.
6409               ENDIF.
6410             CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
6411           ENDTRY.
6412         ELSE.
6413           htmltable = ''.
6414         ENDIF.
6415       ENDIF.
6416     ELSE.
6417       htmltable = ''.
6418     ENDIF.
6419     CONCATENATE htmltable '<br />' INTO htmltable.
6420     APPEND htmltable.
6421   ENDLOOP.
6422   APPEND `            </div>` TO htmltable.
6423   APPEND `          </td>`  TO htmltable.
6424   APPEND `        </tr>` TO htmltable.
6425   APPEND `      </table>` TO htmltable.
6426   APPEND `      </td>` TO htmltable.
6427   APPEND `      </tr>` TO htmltable.
6428   PERFORM addhtmlfooter USING htmltable[].
6429   icontents[] = htmltable[].
6430 ENDFORM.                                                                                            "convertClassToHtml
6431 FORM convertfunctiontohtml USING icontents LIKE dumihtml[]
6432                                  VALUE(functionname)
6433                                  VALUE(shortdescription)
6434                                  VALUE(sourcecodetype)
6435                                  VALUE(functiondocumentationexists)
6436                                  VALUE(ismainfunctioninclude)
6437                                  VALUE(htmlextension)
6438                                  VALUE(customernamerange)
6439                                  VALUE(getincludes)
6440                                  VALUE(getdictstructures)
6441                                  VALUE(addbackground) TYPE abap_bool.
6442   DATA: htmltable TYPE STANDARD TABLE OF string WITH HEADER LINE.
6443   DATA: head(255).
6444   DATA: tail(255).
6445   DATA: mytabix TYPE sytabix.
6446   DATA: nextline TYPE sytabix.
6447   DATA: hyperlinkname TYPE string.
6448   DATA: copyofcurrentline TYPE string.
6449   DATA: currentlinelength TYPE i VALUE 0.
6450   DATA: copylinelength TYPE i VALUE 0.
6451   DATA: ignorefuturelines TYPE abap_bool VALUE false.
6452   DATA: foundasterix TYPE abap_bool VALUE false.
6453   DATA: lowercaselink TYPE string.
6454   DATA: wanextline TYPE string.
6455   DATA: wacontent TYPE string.
6456   DATA: incommentmode TYPE abap_bool VALUE 'X'.
6457   PERFORM addhtmlheader USING htmltable[]
6458                               functionname
6459                               addbackground
6460                               ss_code.
6461   APPEND '<body>' TO htmltable.
6462   APPEND '<table class="outerTable">' TO htmltable.
6463   APPEND `  <tr class="normalBoldLarge">` TO htmltable.
6464   CONCATENATE `     <td><h2>Code listing for function ` functionname `</h2>` INTO htmltable.
6465   APPEND htmltable.
6466   CONCATENATE `<h3> Description: ` shortdescription `</h3></td>` INTO htmltable.
6467   APPEND htmltable.
6468   APPEND `   </tr>` TO htmltable.
6469   APPEND `  <tr>` TO htmltable.
6470   APPEND `     <td>` TO htmltable.
6471   APPEND `     <table class="innerTable">` TO htmltable.
6472   APPEND `       <tr>` TO htmltable.
6473   APPEND `          <td>` TO htmltable.
6474   LOOP AT icontents INTO wacontent.
6475     mytabix = sy-tabix.
6476     IF sourcecodetype = is_function AND ismainfunctioninclude = true.
6477       IF NOT ( wacontent IS INITIAL ).
6478         IF sy-tabix > 1.
6479           IF wacontent+0(1) = asterix AND ignorefuturelines = false.
6480             foundasterix = true.
6481           ELSE.
6482             IF foundasterix = true.
6483               APPEND '' TO htmltable.
6484               copyofcurrentline = '<div class="codeComment">*       <a href ="' .
6485               lowercaselink = functionname.
6486               TRANSLATE lowercaselink TO LOWER CASE.
6487               IF frontendopsystem = non_unix.
6488                 TRANSLATE lowercaselink USING '/_'.
6489               ENDIF.
6490               CONCATENATE copyofcurrentline 'global-' lowercaselink  "functionName
6491                           period htmlextension '">' 'Global data declarations' '</a>' INTO copyofcurrentline.
6492               CONCATENATE copyofcurrentline '</div><br />' INTO copyofcurrentline.
6493               APPEND copyofcurrentline TO htmltable.
6494               IF functiondocumentationexists = true.
6495                 copyofcurrentline = '<div class="codeComment">*       <a href ="'.
6496                 lowercaselink = functionname.
6497                 TRANSLATE lowercaselink TO LOWER CASE.
6498                 IF frontendopsystem = non_unix.
6499                   TRANSLATE lowercaselink USING '/_'.
6500                 ENDIF.
6501                 CONCATENATE copyofcurrentline
6502                             'docs-'
6503                             lowercaselink  "functionName
6504                             period htmlextension '">'
6505                             'Function module documentation'
6506                             '</a>'
6507                             INTO copyofcurrentline.
6508                 CONCATENATE copyofcurrentline '</div><br />' INTO copyofcurrentline.
6509                 APPEND copyofcurrentline TO htmltable.
6510               ENDIF.
6511               foundasterix = false.
6512               ignorefuturelines = true.
6513             ENDIF.
6514           ENDIF.
6515         ENDIF.
6516       ENDIF.
6517     ENDIF.
6518     IF NOT ( wacontent IS INITIAL ).
6519       WHILE ( wacontent CS '<' OR wacontent CS '>' ).
6520         REPLACE '<' IN wacontent WITH lt.
6521         REPLACE '>' IN wacontent WITH gt.
6522       ENDWHILE.
6523       IF wacontent+0(1) <> asterix.
6524         IF mytabix = 1.
6525           APPEND `   <div class="code">` TO htmltable.
6526           incommentmode = false.
6527         ELSE.
6528           IF incommentmode = true.
6529             APPEND `   </div>` TO htmltable.
6530             incommentmode = false.
6531             APPEND `   <div class="code">` TO htmltable.
6532           ENDIF.
6533         ENDIF.
6534         currentlinelength = strlen( wacontent ).
6535         IF sourcecodetype <> is_documentation.
6536           IF ( wacontent CS callfunction ) AND ( wacontent <> 'DESTINATION' ).
6537             nextline = mytabix + 1.
6538             READ TABLE icontents INTO wanextline INDEX nextline.
6539             TRANSLATE wanextline TO UPPER CASE.
6540             IF wanextline NS 'DESTINATION'.
6541               copyofcurrentline = wacontent.
6542               SHIFT copyofcurrentline LEFT DELETING LEADING space.
6543               copylinelength = strlen( copyofcurrentline ).
6544               SPLIT copyofcurrentline AT space INTO head tail.
6545               SPLIT tail AT space INTO head tail.
6546               SPLIT tail AT space INTO head tail.
6547               TRANSLATE head USING ''' '.
6548               SHIFT head LEFT DELETING LEADING space.
6549               TRY.
6550                   IF head+0(1) = 'Y' OR head+0(1) = 'Z' OR head+0(1) = 'y' OR head+0(1) = 'z' OR head CS customernamerange.
6551                     hyperlinkname = head.
6552                     IF sourcecodetype = is_function.
6553                       copyofcurrentline = 'call function <a href ="../'.
6554                     ELSE.
6555                       copyofcurrentline = 'call function <a href ="'.
6556                     ENDIF.
6557                     lowercaselink = hyperlinkname.
6558                     TRANSLATE lowercaselink TO LOWER CASE.
6559                     IF frontendopsystem = non_unix.
6560                       TRANSLATE lowercaselink USING '/_'.
6561                     ENDIF.
6562                     CONCATENATE copyofcurrentline
6563                                 lowercaselink     "hyperlinkName
6564                                 '/'
6565                                 lowercaselink     "hyperlinkName
6566                                 period htmlextension '">'
6567                                 ''''
6568                                 hyperlinkname
6569                                 ''''
6570                                 '</a>'
6571                                 tail INTO copyofcurrentline.
6572                     WHILE copylinelength < currentlinelength.
6573                       SHIFT copyofcurrentline RIGHT BY 1 PLACES.
6574                       copylinelength = copylinelength + 1.
6575                     ENDWHILE.
6576                     wacontent = copyofcurrentline.
6577                   ENDIF.
6578                 CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
6579               ENDTRY.
6580             ENDIF.
6581           ENDIF.
6582         ENDIF.
6583         IF wacontent CS include OR wacontent CS lowinclude.
6584           copyofcurrentline = wacontent.
6585           SHIFT copyofcurrentline LEFT DELETING LEADING space.
6586           copylinelength = strlen( copyofcurrentline ).
6587           SPLIT copyofcurrentline AT space INTO head tail.
6588           SHIFT tail LEFT DELETING LEADING space.
6589           TRY.
6590               IF ( tail+0(1) = 'Y' OR tail+0(1) = 'Z' OR tail+0(1) = 'y' OR tail+0(1) = 'z'
6591                    OR tail CS customernamerange OR tail+0(2) = 'mz' OR tail+0(2) = 'MZ' ) AND NOT getincludes IS INITIAL.
6592                 CLEAR wacontent.
6593                 SHIFT tail LEFT DELETING LEADING space.
6594                 SPLIT tail AT period INTO hyperlinkname tail.
6595                 copyofcurrentline = 'include <a href ="'.
6596                 lowercaselink = hyperlinkname.
6597                 TRANSLATE lowercaselink TO LOWER CASE.
6598                 IF frontendopsystem = non_unix.
6599                   TRANSLATE lowercaselink USING '/_'.
6600                 ENDIF.
6601                 CONCATENATE copyofcurrentline
6602                             lowercaselink       "hyperlinkName
6603                             period htmlextension '">'
6604                             hyperlinkname
6605                             '</a>'
6606                             period tail INTO copyofcurrentline.
6607                 WHILE copylinelength < currentlinelength.
6608                   SHIFT copyofcurrentline RIGHT BY 1 PLACES.
6609                   copylinelength = copylinelength + 1.
6610                 ENDWHILE.
6611                 wacontent = copyofcurrentline.
6612               ELSE.
6613                 IF NOT getdictstructures IS INITIAL.
6614                   copylinelength = strlen( copyofcurrentline ).
6615                   SPLIT copyofcurrentline AT space INTO head tail.
6616                   SHIFT tail LEFT DELETING LEADING space.
6617                   SPLIT tail AT space INTO head tail.
6618                   TRY.
6619                       IF tail+0(1) = 'Y' OR tail+0(1) = 'Z' OR tail+0(1) = 'y' OR tail+0(1) = 'z' OR tail CS customernamerange.
6620                         CLEAR wacontent.
6621                         SHIFT tail LEFT DELETING LEADING space.
6622                         SPLIT tail AT period INTO hyperlinkname tail.
6623                         copyofcurrentline = 'include structure <a href ='.
6624                         lowercaselink = hyperlinkname.
6625                         TRANSLATE lowercaselink TO LOWER CASE.
6626                         IF frontendopsystem = non_unix.
6627                           TRANSLATE lowercaselink USING '/_'.
6628                         ENDIF.
6629                         CONCATENATE copyofcurrentline
6630                                     '"'
6631                                     lowercaselink    "hyperlinkName
6632                                     '/'
6633                                     'dictionary-'
6634                                     lowercaselink    "hyperlinkName
6635                                     period htmlextension
6636                                     '">'
6637                                     hyperlinkname
6638                                     '</a>'
6639                                     period tail INTO copyofcurrentline.
6640                         WHILE copylinelength < currentlinelength.
6641                           SHIFT copyofcurrentline RIGHT BY 1 PLACES.
6642                           copylinelength = copylinelength + 1.
6643                         ENDWHILE.
6644                         wacontent = copyofcurrentline.
6645                       ENDIF.
6646                     CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
6647                   ENDTRY.
6648                 ENDIF.
6649               ENDIF.
6650             CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
6651           ENDTRY.
6652         ENDIF.
6653       ELSE.
6654         IF wacontent+0(1) = asterix.
6655           IF mytabix = 1.
6656             APPEND `   <div class="codeComment">` TO htmltable.
6657             incommentmode = true.
6658           ELSE.
6659             IF incommentmode = false.
6660               APPEND `   </div>` TO htmltable.
6661               APPEND `   <div class="codeComment">` TO htmltable.
6662               incommentmode = true.
6663             ENDIF.
6664           ENDIF.
6665         ENDIF.
6666       ENDIF.
6667       htmltable = wacontent.
6668       TRY.
6669           IF htmltable+0(1) = ` `.
6670             WHILE htmltable CS ` `.
6671               REPLACE ` ` WITH '&nbsp;' INTO htmltable.
6672               IF sy-subrc <> 0.
6673                 EXIT.
6674               ENDIF.
6675             ENDWHILE.
6676           ENDIF.
6677         CATCH cx_sy_range_out_of_bounds INTO objruntimeerror.
6678       ENDTRY.
6679     ELSE.
6680       htmltable = ''.
6681     ENDIF.
6682     CONCATENATE htmltable '<br />' INTO htmltable.
6683     APPEND htmltable.
6684   ENDLOOP.
6685   APPEND `            </div>` TO htmltable.
6686   APPEND `          </td>`  TO htmltable.
6687   APPEND `        </tr>` TO htmltable.
6688   APPEND `      </table>` TO htmltable.
6689   APPEND `      </td>` TO htmltable.
6690   APPEND `      </tr>` TO htmltable.
6691   PERFORM addhtmlfooter USING htmltable[].
6692   icontents[] = htmltable[].
6693 ENDFORM.
6694 FORM buildddcolumnheaders USING iloccolumncaptions LIKE dumihtml[].
6695   APPEND 'Row' TO iloccolumncaptions.
6696   APPEND 'Field name' TO iloccolumncaptions.
6697   APPEND 'Position' TO iloccolumncaptions.
6698   APPEND 'Key' TO iloccolumncaptions.
6699   APPEND 'Data element' TO iloccolumncaptions.
6700   APPEND 'Domain' TO iloccolumncaptions.
6701   APPEND 'Datatype' TO iloccolumncaptions.
6702   APPEND 'Length' TO iloccolumncaptions.
6703   APPEND 'Lowercase' TO iloccolumncaptions.
6704   APPEND 'Domain text' TO iloccolumncaptions.
6705 ENDFORM.
6706 FORM builddomcolumnheaders USING iloccolumncaptions LIKE dumihtml[].
6707   APPEND 'Domain Name' TO iloccolumncaptions.
6708   APPEND 'Value Low' TO iloccolumncaptions.
6709   APPEND 'Value High' TO iloccolumncaptions.
6710   APPEND 'Text' TO iloccolumncaptions.
6711 ENDFORM.
6712 FORM buildcolumnheaderstabletypes  USING iloccolumncaptions LIKE dumihtml[].
6713   APPEND 'Row' TO iloccolumncaptions.
6714   APPEND 'Name of table type' TO iloccolumncaptions.
6715   APPEND 'Name of row type for table types' TO iloccolumncaptions.
6716   APPEND 'Category of table type (range or general table type)' TO iloccolumncaptions.
6717   APPEND 'Elem. type of LOW and HIGH components of a Ranges type' TO iloccolumncaptions.
6718   APPEND 'Type of Object Referenced' TO iloccolumncaptions.
6719   APPEND 'Initial Line Number for Table Types' TO iloccolumncaptions.
6720   APPEND 'Description' TO iloccolumncaptions.
6721 ENDFORM.
6722 FORM addhtmlheader USING ilocheader LIKE dumihtml[]
6723                          VALUE(title)
6724                          VALUE(addbackground) TYPE abap_bool
6725                          VALUE(stylesheettype) TYPE char1.
6726   DATA: waheader TYPE string.
6727   APPEND '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">' TO ilocheader.
6728   APPEND '<html xmlns="http://www.w3.org/1999/xhtml">' TO ilocheader.
6729   APPEND '<head>' TO ilocheader.
6730   APPEND '<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=GB2312" />' TO ilocheader.
6731   CONCATENATE '<title>' title '</title>' INTO waheader.
6732   APPEND waheader TO ilocheader.
6733   CASE stylesheettype.
6734     WHEN ss_code.
6735       PERFORM addcodestyles USING ilocheader
6736                                   addbackground.
6737     WHEN ss_table.
6738       PERFORM addtablestyles USING ilocheader
6739                                    addbackground.
6740   ENDCASE.
6741   PERFORM addgenericstyles USING ilocheader
6742                                  addbackground.
6743   APPEND '</head>' TO ilocheader.
6744 ENDFORM.
6745 FORM addcodestyles USING ilocheader LIKE dumihtml[]
6746                          VALUE(addbackground) TYPE abap_bool.
6747   APPEND '<style type="text/css">' TO ilocheader.
6748   APPEND `.code{ font-family:"Courier New", Courier, monospace; color:#000; font-size:14px; background-color:#F2F4F7 }` TO ilocheader.
6749   APPEND `  .codeComment {font-family:"Courier New", Courier, monospace; color:#0000F0; font-size:14px; background-color:#F2F4F7 }` TO ilocheader.
6750   APPEND `  .normalBold{ font-family:Arial, Helvetica, sans-serif; color:#000; font-size:12px; font-weight:800 }` TO ilocheader.
6751   APPEND `  .normalBoldLarge{ font-family:Arial, Helvetica, sans-serif; color:#000; font-size:16px; font-weight:800 }` TO ilocheader.
6752   APPEND '</style>' TO ilocheader.
6753 ENDFORM.
6754 FORM addtablestyles USING ilocheader LIKE dumihtml[]
6755                           VALUE(addbackground) TYPE abap_bool.
6756   APPEND '<style type="text/css">' TO ilocheader.
6757   APPEND `  th{text-align:left}` TO ilocheader.
6758   APPEND `  .cell{` TO ilocheader.
6759   APPEND `     font-family:"Courier New", Courier, monospace;` TO ilocheader.
6760   APPEND `     color:#000;` TO ilocheader.
6761   APPEND `     font-size:12px;` TO ilocheader.
6762   APPEND `     background-color:#F2F4F7;` TO ilocheader.
6763   APPEND `  }` TO ilocheader.
6764   APPEND `  .cell td { border: thin solid #ccc; }` TO ilocheader.
6765   APPEND `</style>` TO ilocheader.
6766 ENDFORM.
6767 FORM addgenericstyles USING ilocheader LIKE dumihtml[]
6768                           VALUE(addbackground) TYPE abap_bool.
6769   APPEND '<style type="text/css">' TO ilocheader.
6770   APPEND `  .normal{ font-family:Arial, Helvetica, sans-serif; color:#000; font-size:12px }` TO ilocheader.
6771   APPEND `  .footer{ font-family:Arial, Helvetica, sans-serif; color:#000; font-size:12px; text-align: center }` TO ilocheader.
6772   APPEND `  h2{ font-family:Arial, Helvetica, sans-serif; color:#000; font-size:16px; font-weight:800 }` TO ilocheader.
6773   APPEND `  h3{ font-family:Arial, Helvetica, sans-serif; color:#000; font-size:14px; font-weight:800 }` TO ilocheader.
6774   APPEND `  .outerTable{` TO ilocheader.
6775   IF NOT addbackground IS INITIAL.
6776     APPEND `   background-color:#E0E7ED;` TO ilocheader.
6777   ENDIF.
6778   APPEND `   width:100%;` TO ilocheader.
6779   APPEND `   border-top-width: thin;` TO ilocheader.
6780   APPEND `   border-right-width: thin;` TO ilocheader.
6781   APPEND `   border-right-width: thin;` TO ilocheader.
6782   APPEND `   border-left-width: thin;` TO ilocheader.
6783   APPEND `   border-top-style: solid;` TO ilocheader.
6784   APPEND `   border-right-style: solid;` TO ilocheader.
6785   APPEND `   border-bottom-style: solid;` TO ilocheader.
6786   APPEND `   border-left-style: solid;` TO ilocheader.
6787   APPEND `  }` TO ilocheader.
6788   APPEND `  .innerTable{` TO ilocheader.
6789   IF NOT addbackground IS INITIAL.
6790     APPEND `   background-color:#F2F4F7;` TO ilocheader.
6791   ENDIF.
6792   APPEND `   width:100%;` TO ilocheader.
6793   APPEND `   border-top-width: thin;` TO ilocheader.
6794   APPEND `   border-right-width: thin;` TO ilocheader.
6795   APPEND `   border-bottom-width: thin;` TO ilocheader.
6796   APPEND `   border-left-width: thin;` TO ilocheader.
6797   APPEND `   border-top-style: solid;` TO ilocheader.
6798   APPEND `   border-right-style: solid;` TO ilocheader.
6799   APPEND `   border-bottom-style: solid;` TO ilocheader.
6800   APPEND `   border-left-style: solid;` TO ilocheader.
6801   APPEND `  }` TO ilocheader.
6802   APPEND '</style>' TO ilocheader.
6803 ENDFORM.
6804 FORM addhtmlfooter USING ilocfooter LIKE dumihtml[].
6805   DATA: footermessage TYPE string.
6806   DATA: wafooter TYPE string.
6807   PERFORM buildfootermessage USING footermessage.
6808   APPEND `   <tr>` TO ilocfooter.
6809   CONCATENATE '<td class="footer">' footermessage '</td>' INTO wafooter.
6810   APPEND wafooter TO ilocfooter.
6811   APPEND `   </tr>` TO ilocfooter.
6812   APPEND `</table>` TO ilocfooter.
6813   APPEND '</body>' TO ilocfooter.
6814   APPEND '</html>' TO ilocfooter.
6815 ENDFORM.
6816 FORM buildfootermessage USING returnmessage.
6817   CONCATENATE `Extracted by Mass Download version `
6818               versionno ` - E.G.Mellodew. 1998-`
6819               sy-datum+0(4) `. Sap Release ` sy-saprl INTO returnmessage.
6820 ENDFORM.
6821 FORM filltreenodetables USING ilocdictionary LIKE idictionary[]
6822                               iloctreedisplay LIKE itreedisplay[]
6823                               VALUE(runtime).
6824   DATA: tablelines TYPE i.
6825   DATA: watreedisplay LIKE snodetext.
6826   FIELD-SYMBOLS: <wadictionary> TYPE tdicttable.
6827   DATA: tablelinesstring TYPE string.
6828   DATA: runtimechar(10).
6829   DATA: sublevel TYPE string.
6830   tablelines = lines( ilocdictionary ).
6831   tablelinesstring = tablelines.
6832   IF tablelines = 1.
6833     CONCATENATE tablelinesstring 'table downloaded' INTO watreedisplay-text2 SEPARATED BY space.
6834   ELSE.
6835     CONCATENATE tablelinesstring 'tables downloaded' INTO watreedisplay-text2 SEPARATED BY space.
6836   ENDIF.
6837   WRITE runtime TO runtimechar.
6838   CONCATENATE watreedisplay-text2 '- runtime' runtimechar INTO watreedisplay-text2 SEPARATED BY space.
6839   watreedisplay-tlevel = '1'.
6840   watreedisplay-tlength2  = 60.
6841   watreedisplay-tcolor2    = 1.
6842   APPEND watreedisplay TO iloctreedisplay.
6843   LOOP AT ilocdictionary ASSIGNING <wadictionary>.
6844     watreedisplay-tlevel = '2'.
6845     watreedisplay-text2 = <wadictionary>-tablename.
6846     watreedisplay-tcolor2    = 3.
6847     watreedisplay-tlength3   = 80.
6848     watreedisplay-tcolor3    = 3.
6849     watreedisplay-tpos3      = 60.
6850     CONCATENATE 'Dictionary:' <wadictionary>-tabletitle INTO watreedisplay-text3 SEPARATED BY space.
6851     APPEND watreedisplay TO iloctreedisplay.
6852   ENDLOOP.
6853 ENDFORM.
6854 FORM filltreenodexslt USING iloctransformations LIKE itransformations[]
6855                             iloctreedisplay LIKE itreedisplay[]
6856                             VALUE(runtime).
6857   DATA: tablelines TYPE i.
6858   DATA: watreedisplay LIKE snodetext.
6859   FIELD-SYMBOLS: <watransformation> TYPE ttransformation.
6860   DATA: tablelinesstring TYPE string.
6861   DATA: runtimechar(10).
6862   tablelines = lines( iloctransformations ).
6863   tablelinesstring = tablelines.
6864   IF tablelines = 1.
6865     CONCATENATE tablelinesstring ` XSLT program downloaded` INTO watreedisplay-text2.
6866   ELSE.
6867     CONCATENATE tablelinesstring ` XSLT programs downloaded` INTO watreedisplay-text2.
6868   ENDIF.
6869   WRITE runtime TO runtimechar.
6870   CONCATENATE watreedisplay-text2 ` - runtime ` runtimechar INTO watreedisplay-text2.
6871   watreedisplay-tlevel = '2'.
6872   watreedisplay-tlength2  = 60.
6873   watreedisplay-tcolor2    = 1.
6874   APPEND watreedisplay TO itreedisplay.
6875   LOOP AT iloctransformations ASSIGNING <watransformation>.
6876     watreedisplay-tlevel = '3'.
6877     watreedisplay-text2 = <watransformation>-xsltname.
6878     watreedisplay-tcolor2    = 1.
6879     watreedisplay-tlength3   = 80.
6880     watreedisplay-tcolor3    = 1.
6881     watreedisplay-tpos3      = 60.
6882     CONCATENATE `XSLT: ` <watransformation>-xsltdesc INTO watreedisplay-text3.
6883     APPEND watreedisplay TO itreedisplay.
6884   ENDLOOP.
6885 ENDFORM.
6886 FORM filltreenodemessages USING ilocmessages LIKE imessages[]
6887                                 iloctreedisplay LIKE itreedisplay[]
6888                                 VALUE(runtime).
6889   DATA: tablelines TYPE i.
6890   DATA: watreedisplay LIKE snodetext.
6891   FIELD-SYMBOLS: <wamessage> TYPE tmessage.
6892   DATA: tablelinesstring TYPE string.
6893   DATA: runtimechar(10).
6894   SORT ilocmessages ASCENDING BY arbgb.
6895   LOOP AT ilocmessages ASSIGNING <wamessage>.
6896     AT NEW arbgb.
6897       tablelines = tablelines + 1.
6898     ENDAT.
6899   ENDLOOP.
6900   tablelinesstring = tablelines.
6901   IF tablelines = 1.
6902     CONCATENATE tablelinesstring 'message class downloaded' INTO watreedisplay-text2 SEPARATED BY space.
6903   ELSE.
6904     CONCATENATE tablelinesstring 'message classes downloaded' INTO watreedisplay-text2 SEPARATED BY space.
6905   ENDIF.
6906   WRITE runtime TO runtimechar.
6907   CONCATENATE watreedisplay-text2 '- runtime' runtimechar INTO watreedisplay-text2 SEPARATED BY space.
6908   watreedisplay-tlevel = '1'.
6909   watreedisplay-tlength2 = 60.
6910   watreedisplay-tcolor2 = 1.
6911   APPEND watreedisplay TO iloctreedisplay.
6912   LOOP AT ilocmessages ASSIGNING <wamessage>.
6913     AT NEW arbgb.
6914       watreedisplay-tlevel = '2'.
6915       watreedisplay-text2 = <wamessage>-arbgb.
6916       watreedisplay-tcolor2    = 5.
6917       watreedisplay-tlength3   = 80.
6918       watreedisplay-tcolor3    = 5.
6919       watreedisplay-tpos3      = 60.
6920       watreedisplay-text3 = <wamessage>-stext.
6921       CONCATENATE 'Message class:'  watreedisplay-text3 INTO watreedisplay-text3 SEPARATED BY space.
6922       APPEND watreedisplay TO iloctreedisplay.
6923     ENDAT.
6924   ENDLOOP.
6925 ENDFORM.
6926 FORM filltreenodetabletypes USING iloctabletypes LIKE itabletypes[]
6927                                   iloctreedisplay LIKE itreedisplay[]
6928                                   VALUE(runtime).
6929   DATA: tablelines TYPE i.
6930   DATA: watreedisplay LIKE snodetext.
6931   FIELD-SYMBOLS: <watabletype> LIKE LINE OF iloctabletypes.
6932   DATA: tablelinesstring TYPE string.
6933   DATA: runtimechar(10).
6934   DATA: sublevel TYPE string.
6935   tablelines = lines( iloctabletypes ).
6936   tablelinesstring = tablelines.
6937   IF tablelines = 1.
6938     CONCATENATE tablelinesstring 'table type downloaded' INTO watreedisplay-text2 SEPARATED BY space.
6939   ELSE.
6940     CONCATENATE tablelinesstring 'table types downloaded' INTO watreedisplay-text2 SEPARATED BY space.
6941   ENDIF.
6942   WRITE runtime TO runtimechar.
6943   CONCATENATE watreedisplay-text2 '- runtime' runtimechar INTO watreedisplay-text2 SEPARATED BY space.
6944   watreedisplay-tlevel = '2'.
6945   watreedisplay-tlength2  = 60.
6946   watreedisplay-tcolor2    = 1.
6947   APPEND watreedisplay TO iloctreedisplay.
6948   LOOP AT iloctabletypes ASSIGNING <watabletype>.
6949     watreedisplay-tlevel = '3'.
6950     watreedisplay-text2 = <watabletype>-typename.
6951     watreedisplay-tcolor2    = 3.
6952     watreedisplay-tlength3   = 80.
6953     watreedisplay-tcolor3    = 3.
6954     watreedisplay-tpos3      = 60.
6955     CONCATENATE 'Dictionary:' <watabletype>-ddtext INTO watreedisplay-text3 SEPARATED BY space.
6956     APPEND watreedisplay TO iloctreedisplay.
6957   ENDLOOP.
6958 ENDFORM.
6959 FORM filltreenodefunctions USING ilocfunctions LIKE ifunctions[]
6960                                  iloctreedisplay LIKE itreedisplay[]
6961                                  VALUE(runtime).
6962   DATA: tablelines TYPE i.
6963   DATA: watreedisplay LIKE snodetext.
6964   FIELD-SYMBOLS: <wafunction> TYPE tfunction.
6965   FIELD-SYMBOLS: <wascreen> TYPE tscreenflow.
6966   FIELD-SYMBOLS: <waguititle> TYPE tguititle.
6967   FIELD-SYMBOLS: <wadictionary> TYPE tdicttable.
6968   FIELD-SYMBOLS: <wainclude> TYPE tinclude.
6969   FIELD-SYMBOLS: <wamessage> TYPE tmessage.
6970   FIELD-SYMBOLS: <watabletype> TYPE ttabletype.
6971   FIELD-SYMBOLS: <watransformation> TYPE ttransformation.
6972   DATA: tablelinesstring TYPE string.
6973   DATA: runtimechar(10).
6974   SORT ilocfunctions ASCENDING BY functionname.
6975   tablelines = lines( ilocfunctions ).
6976   tablelinesstring = tablelines.
6977   IF tablelines = 1.
6978     CONCATENATE tablelinesstring ` function downloaded` INTO watreedisplay-text2.
6979   ELSE.
6980     CONCATENATE tablelinesstring ` functions downloaded` INTO watreedisplay-text2.
6981   ENDIF.
6982   WRITE runtime TO runtimechar.
6983   CONCATENATE watreedisplay-text2 ` - runtime ` runtimechar INTO watreedisplay-text2.
6984   watreedisplay-tlevel = '1'.
6985   watreedisplay-tlength2  = 60.
6986   watreedisplay-tcolor2    = 1.
6987   APPEND watreedisplay TO iloctreedisplay.
6988   LOOP AT ilocfunctions ASSIGNING <wafunction>.
6989     watreedisplay-tlevel = 2.
6990     watreedisplay-text2 = <wafunction>-functionname.
6991     watreedisplay-tcolor2    = 7.
6992     watreedisplay-tlength3   = 80.
6993     watreedisplay-tcolor3    = 7.
6994     watreedisplay-tpos3      = 60.
6995     CONCATENATE `Function: ` <wafunction>-functionname INTO watreedisplay-text3.
6996     APPEND watreedisplay TO iloctreedisplay.
6997     LOOP AT <wafunction>-iscreenflow ASSIGNING <wascreen>.
6998       watreedisplay-tlevel = '2'.
6999       watreedisplay-text2 = <wascreen>-screen.
7000       watreedisplay-tcolor2    = 6.
7001       watreedisplay-tlength3   = 80.
7002       watreedisplay-tcolor3    = 6.
7003       watreedisplay-tpos3      = 60.
7004       watreedisplay-text3 = 'Screen'.
7005       APPEND watreedisplay TO itreedisplay.
7006     ENDLOOP.
7007     LOOP AT <wafunction>-iguititle ASSIGNING <waguititle>.
7008       watreedisplay-tlevel = '2'.
7009       watreedisplay-text2 = <waguititle>-obj_code.
7010       watreedisplay-tcolor2    = 6.
7011       watreedisplay-tlength3   = 80.
7012       watreedisplay-tcolor3    = 6.
7013       watreedisplay-tpos3      = 60.
7014       watreedisplay-text3 = 'GUI Title'.
7015       APPEND watreedisplay TO itreedisplay.
7016     ENDLOOP.
7017     LOOP AT <wafunction>-iincludes ASSIGNING <wainclude>.
7018       watreedisplay-tlevel = 3.
7019       watreedisplay-text2 =  <wainclude>-includename.
7020       watreedisplay-tcolor2    = 4.
7021       watreedisplay-tlength3   = 80.
7022       watreedisplay-tcolor3    = 4.
7023       watreedisplay-tpos3      = 60.
7024       CONCATENATE `Include:   ` <wainclude>-includetitle INTO watreedisplay-text3.
7025       APPEND watreedisplay TO iloctreedisplay.
7026     ENDLOOP.
7027     LOOP AT <wafunction>-idictstruct ASSIGNING <wadictionary>.
7028       watreedisplay-tlevel = 3.
7029       watreedisplay-text2 =  <wadictionary>-tablename.
7030       watreedisplay-tcolor2    = 3.
7031       watreedisplay-tlength3   = 80.
7032       watreedisplay-tcolor3    = 3.
7033       watreedisplay-tpos3      = 60.
7034       CONCATENATE `Dictionary:` <wadictionary>-tabletitle INTO watreedisplay-text3.
7035       APPEND watreedisplay TO iloctreedisplay.
7036     ENDLOOP.
7037     LOOP AT <wafunction>-itabletypes ASSIGNING <watabletype>.
7038       watreedisplay-tlevel = 3.
7039       watreedisplay-text2 =  <watabletype>-typename.
7040       watreedisplay-tcolor2    = 3.
7041       watreedisplay-tlength3   = 80.
7042       watreedisplay-tcolor3    = 3.
7043       watreedisplay-tpos3      = 60.
7044       CONCATENATE `Table Type:    ` <watabletype>-ddtext INTO watreedisplay-text3.
7045       APPEND watreedisplay TO iloctreedisplay.
7046     ENDLOOP.
7047     LOOP AT <wafunction>-itransformations[] ASSIGNING <watransformation>.
7048       watreedisplay-tlevel = 3.
7049       watreedisplay-text2 =  <watransformation>-xsltname.
7050       watreedisplay-tcolor2    = 3.
7051       watreedisplay-tlength3   = 80.
7052       watreedisplay-tcolor3    = 3.
7053       watreedisplay-tpos3      = 60.
7054       CONCATENATE `Table Type:    ` <watransformation>-xsltdesc INTO watreedisplay-text3.
7055       APPEND watreedisplay TO iloctreedisplay.
7056     ENDLOOP.
7057     SORT <wafunction>-imessages[] ASCENDING BY arbgb.
7058     LOOP AT <wafunction>-imessages ASSIGNING <wamessage>.
7059       AT NEW arbgb.
7060         watreedisplay-tlevel = 3.
7061         watreedisplay-text2 = <wamessage>-arbgb.
7062         watreedisplay-tcolor2    = 5.
7063         watreedisplay-tlength3   = 80.
7064         watreedisplay-tcolor3    = 5.
7065         watreedisplay-tpos3      = 60.
7066         IF <wamessage>-stext IS INITIAL.
7067           SELECT SINGLE stext FROM t100a
7068                               INTO <wamessage>-stext
7069                               WHERE arbgb = <wamessage>-arbgb.
7070         ENDIF.
7071         watreedisplay-text3 = <wamessage>-stext.
7072         CONCATENATE `Message class: `  watreedisplay-text3 INTO watreedisplay-text3.
7073         APPEND watreedisplay TO iloctreedisplay.
7074       ENDAT.
7075     ENDLOOP.
7076   ENDLOOP.
7077 ENDFORM.
7078 FORM filltreenodeprograms USING ilocprograms LIKE iprograms[]
7079                                 ilocfunctions LIKE ifunctions[]
7080                                 iloctreedisplay LIKE itreedisplay[]
7081                                 VALUE(runtime).
7082   DATA: tablelines TYPE i.
7083   DATA: watreedisplay LIKE snodetext.
7084   FIELD-SYMBOLS: <waprogram> TYPE tprogram.
7085   FIELD-SYMBOLS: <wascreen> TYPE tscreenflow.
7086   FIELD-SYMBOLS: <wafunction> TYPE tfunction.
7087   FIELD-SYMBOLS: <wadictionary> TYPE tdicttable.
7088   FIELD-SYMBOLS: <wainclude> TYPE tinclude.
7089   FIELD-SYMBOLS: <wamessage> TYPE tmessage.
7090   FIELD-SYMBOLS: <watabletype> TYPE ttabletype.
7091   FIELD-SYMBOLS: <watransformation> TYPE ttransformation.
7092   DATA: tablelinesstring TYPE string.
7093   DATA: runtimechar(10).
7094   tablelines = lines( ilocprograms ).
7095   tablelinesstring = tablelines.
7096   IF tablelines = 1.
7097     CONCATENATE tablelinesstring ` program downloaded` INTO watreedisplay-text2.
7098   ELSE.
7099     CONCATENATE tablelinesstring ` programs downloaded` INTO watreedisplay-text2.
7100   ENDIF.
7101   WRITE runtime TO runtimechar.
7102   CONCATENATE watreedisplay-text2 ` - runtime ` runtimechar INTO watreedisplay-text2.
7103   watreedisplay-tlevel = '1'.
7104   watreedisplay-tlength2  = 60.
7105   watreedisplay-tcolor2    = 1.
7106   APPEND watreedisplay TO itreedisplay.
7107   LOOP AT ilocprograms ASSIGNING <waprogram>.
7108     watreedisplay-tlevel = '2'.
7109     watreedisplay-text2 = <waprogram>-progname.
7110     watreedisplay-tcolor2    = 1.
7111     watreedisplay-tlength3   = 80.
7112     watreedisplay-tcolor3    = 1.
7113     watreedisplay-tpos3      = 60.
7114     CONCATENATE `Program: ` <waprogram>-programtitle INTO watreedisplay-text3.
7115     APPEND watreedisplay TO itreedisplay.
7116     LOOP AT <waprogram>-iscreenflow ASSIGNING <wascreen>.
7117       watreedisplay-tlevel = '3'.
7118       watreedisplay-text2 = <wascreen>-screen.
7119       watreedisplay-tcolor2    = 6.
7120       watreedisplay-tlength3   = 80.
7121       watreedisplay-tcolor3    = 6.
7122       watreedisplay-tpos3      = 60.
7123       watreedisplay-text3 = 'Screen'.
7124       APPEND watreedisplay TO itreedisplay.
7125     ENDLOOP.
7126     SORT <waprogram>-imessages[] ASCENDING BY arbgb.
7127     LOOP AT <waprogram>-imessages ASSIGNING <wamessage>.
7128       AT NEW arbgb.
7129         watreedisplay-tlevel = 3.
7130         watreedisplay-text2 = <wamessage>-arbgb.
7131         watreedisplay-tcolor2    = 5.
7132         watreedisplay-tlength3   = 80.
7133         watreedisplay-tcolor3    = 5.
7134         watreedisplay-tpos3      = 60.
7135         IF <wamessage>-stext IS INITIAL.
7136           SELECT SINGLE stext FROM t100a
7137                               INTO <wamessage>-stext
7138                               WHERE arbgb = <wamessage>-arbgb.
7139         ENDIF.
7140         watreedisplay-text3 = <wamessage>-stext.
7141         CONCATENATE `Message class: `  watreedisplay-text3 INTO watreedisplay-text3.
7142         APPEND watreedisplay TO iloctreedisplay.
7143       ENDAT.
7144     ENDLOOP.
7145     LOOP AT <waprogram>-iincludes ASSIGNING <wainclude>.
7146       watreedisplay-tlevel = 3.
7147       watreedisplay-text2 =  <wainclude>-includename.
7148       watreedisplay-tcolor2    = 4.
7149       watreedisplay-tlength3   = 80.
7150       watreedisplay-tcolor3    = 4.
7151       watreedisplay-tpos3      = 60.
7152       CONCATENATE `Include:   ` <wainclude>-includetitle INTO watreedisplay-text3.
7153       APPEND watreedisplay TO iloctreedisplay.
7154     ENDLOOP.
7155     LOOP AT <waprogram>-idictstruct ASSIGNING <wadictionary>.
7156       watreedisplay-tlevel = 3.
7157       watreedisplay-text2 =  <wadictionary>-tablename.
7158       watreedisplay-tcolor2    = 3.
7159       watreedisplay-tlength3   = 80.
7160       watreedisplay-tcolor3    = 3.
7161       watreedisplay-tpos3      = 60.
7162       CONCATENATE `Dictionary:    ` <wadictionary>-tabletitle INTO watreedisplay-text3.
7163       APPEND watreedisplay TO iloctreedisplay.
7164     ENDLOOP.
7165     LOOP AT <waprogram>-itabletypes ASSIGNING <watabletype>.
7166       watreedisplay-tlevel = 3.
7167       watreedisplay-text2 =  <watabletype>-typename.
7168       watreedisplay-tcolor2    = 3.
7169       watreedisplay-tlength3   = 80.
7170       watreedisplay-tcolor3    = 3.
7171       watreedisplay-tpos3      = 60.
7172       CONCATENATE `Table Type:    ` <watabletype>-ddtext INTO watreedisplay-text3.
7173       APPEND watreedisplay TO iloctreedisplay.
7174     ENDLOOP.
7175     LOOP AT <waprogram>-itransformations ASSIGNING <watransformation>.
7176       watreedisplay-tlevel = 3.
7177       watreedisplay-text2 =  <watransformation>-xsltname.
7178       watreedisplay-tcolor2    = 3.
7179       watreedisplay-tlength3   = 80.
7180       watreedisplay-tcolor3    = 3.
7181       watreedisplay-tpos3      = 60.
7182       CONCATENATE `Table Type:    ` <watransformation>-xsltdesc INTO watreedisplay-text3.
7183       APPEND watreedisplay TO iloctreedisplay.
7184     ENDLOOP.
7185     LOOP AT ilocfunctions ASSIGNING <wafunction> WHERE programlinkname = <waprogram>-progname.
7186       watreedisplay-tlevel = 3.
7187       watreedisplay-text2 = <wafunction>-functionname.
7188       watreedisplay-tcolor2    = 7.
7189       watreedisplay-tlength3   = 80.
7190       watreedisplay-tcolor3    = 7.
7191       watreedisplay-tpos3      = 60.
7192       CONCATENATE `Function:      ` <wafunction>-functionname INTO watreedisplay-text3.
7193       APPEND watreedisplay TO iloctreedisplay.
7194       LOOP AT <wafunction>-iincludes ASSIGNING <wainclude>.
7195         watreedisplay-tlevel = 4.
7196         watreedisplay-text2 =  <wainclude>-includename.
7197         watreedisplay-tcolor2    = 4.
7198         watreedisplay-tlength3   = 80.
7199         watreedisplay-tcolor3    = 4.
7200         watreedisplay-tpos3      = 60.
7201         CONCATENATE `Include:       ` <wainclude>-includetitle INTO watreedisplay-text3.
7202         APPEND watreedisplay TO iloctreedisplay.
7203       ENDLOOP.
7204       LOOP AT <wafunction>-idictstruct ASSIGNING <wadictionary>.
7205         watreedisplay-tlevel = 4.
7206         watreedisplay-text2 =  <wadictionary>-tablename.
7207         watreedisplay-tcolor2    = 3.
7208         watreedisplay-tlength3   = 80.
7209         watreedisplay-tcolor3    = 3.
7210         watreedisplay-tpos3      = 60.
7211         CONCATENATE `Dictionary:    ` <wadictionary>-tabletitle INTO watreedisplay-text3.
7212         APPEND watreedisplay TO iloctreedisplay.
7213       ENDLOOP.
7214       SORT <wafunction>-imessages[] ASCENDING BY arbgb.
7215       LOOP AT <wafunction>-imessages ASSIGNING <wamessage>.
7216         AT NEW arbgb.
7217           watreedisplay-tlevel = 4.
7218           watreedisplay-text2 = <wamessage>-arbgb.
7219           watreedisplay-tcolor2    = 5.
7220           watreedisplay-tlength3   = 80.
7221           watreedisplay-tcolor3    = 5.
7222           watreedisplay-tpos3      = 60.
7223           IF <wamessage>-stext IS INITIAL.
7224             SELECT SINGLE stext FROM t100a
7225                                 INTO <wamessage>-stext
7226                                 WHERE arbgb = <wamessage>-arbgb.
7227           ENDIF.
7228           watreedisplay-text3 = <wamessage>-stext.
7229           CONCATENATE `Message class:  `  watreedisplay-text3 INTO watreedisplay-text3.
7230           APPEND watreedisplay TO iloctreedisplay.
7231         ENDAT.
7232       ENDLOOP.
7233     ENDLOOP.
7234   ENDLOOP.
7235 ENDFORM.
7236 FORM filltreenodeclasses USING ilocclasses LIKE iclasses[]
7237                                ilocfunctions LIKE ifunctions[]
7238                                iloctreedisplay LIKE itreedisplay[]
7239                                VALUE(runtime).
7240   DATA: tablelines TYPE i.
7241   DATA: watreedisplay LIKE snodetext.
7242   FIELD-SYMBOLS: <waclass> TYPE tclass.
7243   FIELD-SYMBOLS: <wamethod> TYPE tmethod.
7244   FIELD-SYMBOLS: <wafunction> TYPE tfunction.
7245   FIELD-SYMBOLS: <wadictionary> TYPE tdicttable.
7246   FIELD-SYMBOLS: <wainclude> TYPE tinclude.
7247   FIELD-SYMBOLS: <wamessage> TYPE tmessage.
7248   FIELD-SYMBOLS: <watabletype> TYPE ttabletype.
7249   FIELD-SYMBOLS: <watransformation> TYPE ttransformation.
7250   DATA: tablelinesstring TYPE string.
7251   DATA: runtimechar(10).
7252   tablelines = lines( ilocclasses ).
7253   tablelinesstring = tablelines.
7254   IF tablelines = 1.
7255     CONCATENATE tablelinesstring ` class downloaded` INTO watreedisplay-text2.
7256   ELSE.
7257     CONCATENATE tablelinesstring ` classes downloaded` INTO watreedisplay-text2.
7258   ENDIF.
7259   WRITE runtime TO runtimechar.
7260   CONCATENATE watreedisplay-text2 ` - runtime ` runtimechar INTO watreedisplay-text2.
7261   watreedisplay-tlevel = '1'.
7262   watreedisplay-tlength2  = 60.
7263   watreedisplay-tcolor2    = 1.
7264   APPEND watreedisplay TO itreedisplay.
7265   LOOP AT ilocclasses ASSIGNING <waclass>.
7266     watreedisplay-tlevel = '2'.
7267     watreedisplay-text2 = <waclass>-clsname.
7268     watreedisplay-tcolor2    = 1.
7269     watreedisplay-tlength3   = 80.
7270     watreedisplay-tcolor3    = 1.
7271     watreedisplay-tpos3      = 60.
7272     CONCATENATE `Class:    ` <waclass>-descript INTO watreedisplay-text3.
7273     APPEND watreedisplay TO itreedisplay.
7274     LOOP AT <waclass>-imethods[] ASSIGNING <wamethod>.
7275       watreedisplay-tlevel = 3.
7276       watreedisplay-text2 =  <wamethod>-cmpname.
7277       watreedisplay-tcolor2    = 2.
7278       watreedisplay-tlength3   = 80.
7279       watreedisplay-tcolor3    = 2.
7280       watreedisplay-tpos3      = 60.
7281       CONCATENATE `Method:   ` <wamethod>-descript INTO watreedisplay-text3.
7282       APPEND watreedisplay TO iloctreedisplay.
7283     ENDLOOP.
7284     SORT <waclass>-imessages[] ASCENDING BY arbgb.
7285     LOOP AT <waclass>-imessages ASSIGNING <wamessage>.
7286       AT NEW arbgb.
7287         watreedisplay-tlevel = 3.
7288         watreedisplay-text2 = <wamessage>-arbgb.
7289         watreedisplay-tcolor2    = 5.
7290         watreedisplay-tlength3   = 80.
7291         watreedisplay-tcolor3    = 5.
7292         watreedisplay-tpos3      = 60.
7293         IF <wamessage>-stext IS INITIAL.
7294           SELECT SINGLE stext FROM t100a
7295                               INTO <wamessage>-stext
7296                               WHERE arbgb = <wamessage>-arbgb.
7297         ENDIF.
7298 
7299         watreedisplay-text3 = <wamessage>-stext.
7300         CONCATENATE `Message class: `  watreedisplay-text3 INTO watreedisplay-text3.
7301         APPEND watreedisplay TO iloctreedisplay.
7302       ENDAT.
7303     ENDLOOP.
7304     LOOP AT <waclass>-idictstruct ASSIGNING <wadictionary>.
7305       watreedisplay-tlevel = 3.
7306       watreedisplay-text2 =  <wadictionary>-tablename.
7307       watreedisplay-tcolor2    = 3.
7308       watreedisplay-tlength3   = 80.
7309       watreedisplay-tcolor3    = 3.
7310       watreedisplay-tpos3      = 60.
7311       CONCATENATE `Dictionary:    ` <wadictionary>-tabletitle INTO watreedisplay-text3.
7312       APPEND watreedisplay TO iloctreedisplay.
7313     ENDLOOP.
7314     LOOP AT <waclass>-itabletypes ASSIGNING <watabletype>.
7315       watreedisplay-tlevel = 3.
7316       watreedisplay-text2 =  <watabletype>-typename.
7317       watreedisplay-tcolor2    = 3.
7318       watreedisplay-tlength3   = 80.
7319       watreedisplay-tcolor3    = 3.
7320       watreedisplay-tpos3      = 60.
7321       CONCATENATE `Table Type:    ` <watabletype>-ddtext INTO watreedisplay-text3.
7322       APPEND watreedisplay TO iloctreedisplay.
7323     ENDLOOP.
7324     LOOP AT <waclass>-itransformations ASSIGNING <watransformation>.
7325       watreedisplay-tlevel = 3.
7326       watreedisplay-text2 =  <watransformation>-xsltname.
7327       watreedisplay-tcolor2    = 3.
7328       watreedisplay-tlength3   = 80.
7329       watreedisplay-tcolor3    = 3.
7330       watreedisplay-tpos3      = 60.
7331       CONCATENATE `Table Type:    ` <watransformation>-xsltdesc INTO watreedisplay-text3.
7332       APPEND watreedisplay TO iloctreedisplay.
7333     ENDLOOP.
7334     LOOP AT ilocfunctions ASSIGNING <wafunction> WHERE programlinkname = <waclass>-clsname.
7335       watreedisplay-tlevel = 3.
7336       watreedisplay-text2 = <wafunction>-functionname.
7337       watreedisplay-tcolor2    = 7.
7338       watreedisplay-tlength3   = 80.
7339       watreedisplay-tcolor3    = 7.
7340       watreedisplay-tpos3      = 60.
7341       CONCATENATE `Function:      ` <wafunction>-functionname INTO watreedisplay-text3.
7342       APPEND watreedisplay TO iloctreedisplay.
7343       LOOP AT <wafunction>-iincludes ASSIGNING <wainclude>.
7344         watreedisplay-tlevel = 4.
7345         watreedisplay-text2 =  <wainclude>-includename.
7346         watreedisplay-tcolor2    = 4.
7347         watreedisplay-tlength3   = 80.
7348         watreedisplay-tcolor3    = 4.
7349         watreedisplay-tpos3      = 60.
7350         CONCATENATE `Include:       ` <wainclude>-includetitle INTO watreedisplay-text3.
7351         APPEND watreedisplay TO iloctreedisplay.
7352       ENDLOOP.
7353       LOOP AT <wafunction>-idictstruct ASSIGNING <wadictionary>.
7354         watreedisplay-tlevel = 4.
7355         watreedisplay-text2 =  <wadictionary>-tablename.
7356         watreedisplay-tcolor2    = 3.
7357         watreedisplay-tlength3   = 80.
7358         watreedisplay-tcolor3    = 3.
7359         watreedisplay-tpos3      = 60.
7360         CONCATENATE `Dictionary:    ` <wadictionary>-tabletitle INTO watreedisplay-text3.
7361         APPEND watreedisplay TO iloctreedisplay.
7362       ENDLOOP.
7363       SORT <wafunction>-imessages[] ASCENDING BY arbgb.
7364       LOOP AT <wafunction>-imessages ASSIGNING <wamessage>.
7365         AT NEW arbgb.
7366           watreedisplay-tlevel = 4.
7367           watreedisplay-text2 = <wamessage>-arbgb.
7368           watreedisplay-tcolor2    = 5.
7369           watreedisplay-tlength3   = 80.
7370           watreedisplay-tcolor3    = 5.
7371           watreedisplay-tpos3      = 60.
7372           IF <wamessage>-stext IS INITIAL.
7373             SELECT SINGLE stext
7374               FROM t100a
7375               INTO <wamessage>-stext
7376               WHERE arbgb = <wamessage>-arbgb.
7377           ENDIF.
7378           watreedisplay-text3 = <wamessage>-stext.
7379           CONCATENATE `Message class:  `  watreedisplay-text3 INTO watreedisplay-text3.
7380           APPEND watreedisplay TO iloctreedisplay.
7381         ENDAT.
7382       ENDLOOP.
7383     ENDLOOP.
7384   ENDLOOP.
7385 ENDFORM.
7386 FORM displaytree USING iloctreedisplay LIKE itreedisplay[].
7387   DATA: watreedisplay TYPE snodetext.
7388   CALL FUNCTION 'RS_TREE_CONSTRUCT'
7389     TABLES
7390       nodetab            = itreedisplay
7391     EXCEPTIONS
7392       tree_failure       = 1
7393       id_not_found       = 2
7394       wrong_relationship = 3
7395       OTHERS             = 4.
7396   READ TABLE iloctreedisplay INTO watreedisplay INDEX 1.
7397   CALL FUNCTION 'RS_TREE_EXPAND'
7398     EXPORTING
7399       node_id   = watreedisplay-id
7400       all       = 'X'
7401     EXCEPTIONS
7402       not_found = 1
7403       OTHERS    = 2.
7404   CALL FUNCTION 'RS_TREE_LIST_DISPLAY'
7405     EXPORTING
7406       callback_program      = sy-cprog
7407       callback_user_command = 'CB_USER_COMMAND'
7408       callback_text_display = 'CB_text_DISPLAY'
7409       callback_top_of_page  = 'TOP_OF_PAGE'
7410     EXCEPTIONS
7411       OTHERS                = 1.
7412 ENDFORM.

 

posted @ 2022-06-21 10:26  TigerMan  阅读(428)  评论(0编辑  收藏  举报