1
2
3
4
5
6REPORT Z_SYSP_SAP_ADAPTER.
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54tables: trdir, seoclass, tfdir, enlfdir, dd02l, tadiv, dd40l, transfdesc.
55type-pools: abap, seor.
56
57
58
59
60
61types: tTextTable like textpool.
62
63types: tGUITitle like d347t.
64
65
66types: begin of tMessage,
67 arbgb like t100-arbgb,
68 stext like t100a-stext,
69 msgnr like t100-msgnr,
70 text like t100-text,
71 end of tMessage.
72
73
74types: begin of tScreenFlow,
75 screen like d020s-dnum,
76 code like d022s-line,
77 end of tScreenFlow.
78
79
80types: begin of tDomainStructure,
81 domname type domname,
82 domvalue_l type domvalue_l,
83 domvalue_h type domvalue_l,
84 ddtext type val_text,
85 end of tDomainStructure.
86
87
88types: begin of tDictTableStructure,
89 fieldname like dd03l-fieldname,
90 position like dd03l-position,
91 keyflag like dd03l-keyflag,
92 rollname like dd03l-rollname,
93 domname like dd03l-domname,
94 datatype like dd03l-datatype,
95 leng like dd03l-leng,
96 lowercase type lowercase,
97 ddtext like dd04t-ddtext,
98 iDomains type tDomainStructure occurs 0,
99 end of tdictTableStructure.
100
101
102types: begin of tTableType,
103 typename type ttypename,
104 rowtype type ttrowtype,
105 ttypkind type ttypkind,
106 range_ctyp type range_ctyp,
107 reftype type ddreftype,
108 occurs type ddoccurs,
109 ddtext type ddtext,
110 end of tTableType.
111
112
113types: begin of tDictTable,
114 tablename like dd03l-tabname,
115 tableTitle like dd02t-ddtext,
116 iStructure type tDictTableStructure occurs 0,
117 end of tDictTable.
118
119types: begin of tDictFilename,
120 tablename like dd03l-tabname,
121 filename type string,
122 end of tDictFilename.
123
124types: begin of tTransformation,
125 xsltName like trdir-name,
126 xsltDesc like tftit-stext,
127 subc like trdir-subc,
128 end of tTransformation.
129
130
131types: begin of tInclude,
132 includeName like trdir-name,
133 includeTitle like tftit-stext,
134 end of tInclude.
135
136
137types: begin of tConcept,
138 constName type string,
139 concept type sotr_conc,
140 end of tConcept.
141
142
143types: begin of tMethod,
144 cmpName(61),
145 descript like vseomethod-descript,
146 exposure like vseomethod-exposure,
147 methodKey type string,
148 end of tMethod.
149
150
151types: begin of tInterface,
152 interfaceName like vseoclass-clsname,
153 end of tInterface.
154
155
156types: begin of tClass,
157 scanned(1),
158 clsname like vseoclass-clsname,
159 descript like vseoclass-descript,
160 msg_id like vseoclass-msg_id,
161 exposure like vseoclass-exposure,
162 state like vseoclass-state,
163 clsfinal like vseoclass-clsfinal,
164 r3release like vseoclass-r3release,
165 iMethods type tMethod occurs 0,
166 iDictStruct type tDictTable occurs 0,
167 iTextElements type tTextTable occurs 0,
168 iMessages type tMessage occurs 0,
169 iInterfaces type tInterface occurs 0,
170 iConcepts type tConcept occurs 0,
171 iTableTypes type tTableType occurs 0,
172 iTransformations type tTransformation occurs 0,
173 textElementKey type string,
174 publicClassKey type string,
175 privateClassKey type string,
176 protectedClassKey type string,
177 typesClassKey type string,
178 exceptionClass type abap_bool,
179 end of tClass.
180
181
182types: begin of tFunction,
183 functionName like tfdir-funcName,
184 functionGroup like enlfdir-area,
185 includeNumber like tfdir-include,
186 functionMainInclude like tfdir-funcName,
187 functionTitle like tftit-stext,
188 topIncludeName like tfdir-funcName,
189 progname like tfdir-pname,
190 programLinkName like tfdir-pname,
191 messageClass like t100-arbgb,
192 iTextElements type tTextTable occurs 0,
193 iSelectiontexts type tTextTable occurs 0,
194 iMessages type tMessage occurs 0,
195 iIncludes type tInclude occurs 0,
196 iDictStruct type tDictTable occurs 0,
197 iGUITitle type tGUITitle occurs 0,
198 iScreenFlow type tScreenFlow occurs 0,
199 iTableTypes type tTableType occurs 0,
200 iTransformations type tTransformation occurs 0,
201 end of tFunction.
202
203types: begin of tProgram,
204 progname like trdir-name,
205 programTitle like tftit-stext,
206 subc like trdir-subc,
207 messageClass like t100-arbgb,
208 iMessages type tMessage occurs 0,
209 iTextElements type tTextTable occurs 0,
210 iSelectiontexts type tTextTable occurs 0,
211 iGUITitle type tGUITitle occurs 0,
212 iScreenFlow type tScreenFlow occurs 0,
213 iIncludes type tInclude occurs 0,
214 iDictStruct type tDictTable occurs 0,
215 iTableTypes type tTableType occurs 0,
216 iTransformations type tTransformation occurs 0,
217 end of tProgram.
218
219
220
221
222
223data: iDictionary type standard table of tDictTable with header line.
224
225data: iDictFilename type standard table of tDictFilename with header line.
226
227data: iTableTypes type standard table of tTableType with header line.
228
229data: iTableTypeFilename type standard table of tDictFilename with header line.
230
231data: iFunctions type standard table of tFunction with header line.
232
233data: iProgFunctions type standard table of tFunction with header line.
234
235data: iTreeDisplay type standard table of snodetext with header line.
236
237data: iMessages type standard table of tMessage with header line.
238
239data: iSingleMessageClass type standard table of tMessage with header line.
240
241data: iPrograms type standard table of tProgram with header line.
242
243data: iClasses type standard table of tClass with header line.
244
245data: iServerPaths type standard table of string with header line.
246
247data: iTransformations type standard table of tTransformation with header line.
248
249
250
251
252data: dumiDictStructure type standard table of tDictTableStructure.
253data: dumiTextTab type standard table of tTextTable.
254data: dumiIncludes type standard table of tInclude.
255data: dumiHtml type standard table of string.
256data: dumiHeader type standard table of string .
257data: dumiScreen type standard table of tScreenFlow .
258data: dumIGUITitle type standard table of tGUITitle.
259data: dumiMethods type standard table of tMethod.
260data: dumiConcepts type standard table of tConcept.
261data: dumiInterfaces type standard table of tInterface.
262
263
264
265
266data: objFile type ref to cl_gui_frontend_services.
267data: objRuntimeError type ref to cx_root.
268
269
270
271
272constants: VERSIONNO type string value '1.5.5'.
273constants: TABLES type string value 'TABLES'.
274constants: TABLE type string value 'TABLE'.
275constants: LIKE type string value 'LIKE'.
276constants: TYPE type string value 'TYPE'.
277constants: TYPEREFTO type string value 'TYPE REF TO'.
278constants: STRUCTURE type string value 'STRUCTURE'.
279constants: LOWSTRUCTURE type string value 'structure'.
280constants: OCCURS type string value 'OCCURS'.
281constants: FUNCTION type string value 'FUNCTION'.
282constants: CALLFUNCTION type string value ' CALL FUNCTION'.
283constants: MESSAGE type string value 'MESSAGE'.
284constants: INCLUDE type string value 'INCLUDE'.
285constants: TRANSFORMATION type string value 'TRANSFORMATION'.
286constants: LOWINCLUDE type string value 'include'.
287constants: DESTINATION type string value 'DESTINATION'.
288constants: IS_TABLE type string value 'T'.
289constants: IS_TRANSFORMATION type string value 'X'.
290constants: IS_PROGRAM type string value 'P'.
291constants: IS_SCREEN type string value 'S'.
292constants: IS_GUITITLE type string value 'G'.
293constants: IS_DOCUMENTATION type string value 'D'.
294constants: IS_MESSAGECLASS type string value 'MC'.
295constants: IS_FUNCTION type string value 'F'.
296constants: IS_CLASS type string value 'C'.
297constants: IS_METHOD type string value 'M'.
298constants: ASTERIX type string value '*'.
299constants: COMMA type string value ','.
300constants: PERIOD type string value '.'.
301constants: DASH type string value '-'.
302constants: TRUE type abap_bool value 'X'.
303constants: FALSE type abap_bool value ''.
304constants: LT type string value '<'.
305constants: GT type string value '>'.
306constants: UNIX type string value 'UNIX'.
307constants: NON_UNIX type string value 'not UNIX'.
308constants: HTMLEXTENSION type string value 'html'.
309constants: TEXTEXTENSION type string value 'txt'.
310constants: SS_CODE type c value 'C'.
311constants: SS_TABLE type c value 'T'.
312
313
314
315
316data: statusBarMessage(100).
317data: forcedExit type abap_bool value FALSE.
318data: startTime like sy-uzeit.
319data: runTime like sy-uzeit.
320data: downloadFileExtension type string.
321data: downloadFolder type string.
322data: serverSlashSeparator type string.
323data: frontendSlashSeparator type string.
324data: slashSeparatorToUse type string.
325data: serverFilesystem type filesys_d.
326data: serverFolder type string.
327data: frontendOpSystem type string.
328data: serverOpSystem type string.
329data: customerNameSpace type string.
330ranges: soProgramName for trdir-name.
331ranges: soAuthor for usr02-bname.
332ranges: soTableNames for dd02l-tabname.
333ranges: soTableTypeNames for dd40l-typename.
334ranges: soFunctionName for tfdir-funcName.
335ranges: soClassName for vseoclass-clsname.
336ranges: soFunctionGroup for enlfdir-area.
337ranges: soXsltName for tadir-obj_name.
338field-symbols: <waDictStruct> type tDictTable.
339
340
341
342
343
344selection-screen: begin of block b4 with frame title tBlock4.
345
346 selection-screen begin of line.
347 selection-screen comment 1(25) tPc.
348 parameters: pPc radiobutton group g2 default 'X'.
349 selection-screen end of line.
350 selection-screen begin of line.
351 selection-screen comment 8(20) tPpath.
352 parameters: pFolder like rlgrap-filename memory id MFOLDER.
353 selection-screen end of line.
354
355 selection-screen begin of line.
356 selection-screen comment 1(25) tServ.
357 parameters: pServ radiobutton group g2.
358 selection-screen end of line.
359 selection-screen begin of line.
360 selection-screen comment 8(20) tSPath.
361 parameters: pLogical like filename-fileintern memory id MLOGICAL.
362 selection-screen end of line.
363 selection-screen comment /28(60) tSDPath.
364
365 selection-screen begin of line.
366 selection-screen comment 1(20) tPhtml.
367 parameters: pHtml radiobutton group g1.
368 selection-screen end of line.
369
370 selection-screen begin of line.
371 selection-screen comment 5(29) tBack.
372 parameters: pBack as checkbox.
373 selection-screen end of line.
374
375 selection-screen begin of line.
376 selection-screen comment 1(20) tPtxt.
377 parameters: pTxt radiobutton group g1 default 'X'.
378 selection-screen end of line.
379
380 selection-screen skip.
381selection-screen: end of block b4.
382
383
384SELECTION-SCREEN: BEGIN OF BLOCK bsysp WITH FRAME TITLE tblocksy.
385 SELECTION-SCREEN BEGIN OF LINE.
386 SELECTION-SCREEN COMMENT 5(18) tsysjobs.
387 PARAMETERS: psysjobs AS CHECKBOX DEFAULT 'X'.
388 SELECTION-SCREEN END OF LINE.
389 SELECTION-SCREEN BEGIN OF LINE.
390 SELECTION-SCREEN COMMENT 5(18) tsystran.
391 PARAMETERS: psystran AS CHECKBOX DEFAULT 'X'.
392 SELECTION-SCREEN END OF LINE.
393 SELECTION-SCREEN BEGIN OF LINE.
394 SELECTION-SCREEN COMMENT 5(18) tsysprog.
395 PARAMETERS: psysprog AS CHECKBOX DEFAULT 'X'.
396 SELECTION-SCREEN END OF LINE.
397SELECTION-SCREEN: END OF BLOCK bsysp.
398
399
400selection-screen begin of block b2 with frame title tBlock2.
401
402 selection-screen begin of line.
403 parameters: rProg radiobutton group r1 default 'X'.
404 selection-screen comment 5(18) tProg.
405 selection-screen end of line.
406
407 selection-screen begin of line.
408 selection-screen comment 10(15) tRpname.
409 select-options: soProg for trdir-name default 'Z*' OPTION CP.
410 selection-screen end of line.
411
412 selection-screen begin of line.
413 parameters: rTable radiobutton group r1.
414 selection-screen comment 5(15) tRtable.
415 selection-screen end of line.
416
417 selection-screen begin of line.
418 selection-screen comment 10(15) tPtable.
419 select-options: soTable for dd02l-tabname.
420 selection-screen end of line.
421
422 selection-screen begin of line.
423 selection-screen comment 10(79) tTnote.
424 selection-screen end of line.
425
426
427 selection-screen begin of line.
428 parameters: rTabType radiobutton group r1.
429 selection-screen comment 5(15) trtabtyp.
430 selection-screen end of line.
431
432 selection-screen begin of line.
433 selection-screen comment 10(15) tptabtyp.
434 select-options: sotabtyp for dd40l-typename.
435 selection-screen end of line.
436
437
438 selection-screen begin of line.
439 parameters: rMess radiobutton group r1.
440 selection-screen comment 5(18) tPMes.
441 selection-screen end of line.
442
443 selection-screen begin of line.
444 selection-screen comment 10(18) tMname.
445 parameters: pMname like t100-arbgb memory id MMNAME.
446 selection-screen end of line.
447
448
449 selection-screen begin of line.
450 parameters: rFunc radiobutton group r1.
451 selection-screen comment 5(30) tRfunc.
452 selection-screen end of line.
453
454 selection-screen begin of line.
455 selection-screen comment 10(15) tPfname.
456 select-options: soFname for tfdir-funcName.
457 selection-screen end of line.
458
459 selection-screen begin of line.
460 selection-screen comment 10(15) tFgroup.
461 select-options: soFgroup for enlfdir-area.
462 selection-screen end of line.
463
464
465 selection-screen begin of line.
466 parameters: rxslt radiobutton group r1.
467 selection-screen comment 5(30) trxslt.
468 selection-screen end of line.
469
470 selection-screen begin of line.
471 selection-screen comment 10(15) tpxslt.
472 select-options: soxslt for transfdesc-xsltdesc.
473 selection-screen end of line.
474
475
476 selection-screen begin of line.
477 parameters: rClass radiobutton group r1.
478 selection-screen comment 5(30) tRClass.
479 selection-screen end of line.
480
481 selection-screen begin of line.
482 selection-screen comment 10(15) tPcName.
483 select-options: soClass for seoclass-clsname.
484 selection-screen end of line.
485
486 selection-screen skip.
487
488 selection-screen begin of line.
489 selection-screen comment 1(27) tMLang.
490 parameters: pMLang like t100-sprsl default 'EN'.
491 selection-screen end of line.
492
493
494 selection-screen begin of line.
495 selection-screen comment 1(24) tPack.
496 select-options: soPack for tadiv-devclass.
497 selection-screen end of line.
498
499
500 selection-screen begin of line.
501 selection-screen comment 1(27) tCust.
502 parameters: pCust as checkbox default 'X'.
503 selection-screen end of line.
504
505
506 selection-screen begin of line.
507 selection-screen comment 1(27) tNRange.
508 parameters: pCName type namespace memory id MNAMESPACE.
509 selection-screen end of line.
510selection-screen: end of block b2.
511
512
513selection-screen: begin of block b1 with frame title tBlock1.
514 selection-screen begin of line.
515 selection-screen comment 5(23) tAuth.
516 parameters: pAuth like usr02-bname memory id MAUTH.
517 selection-screen end of line.
518
519 selection-screen begin of line.
520 selection-screen comment 5(36) tPmod.
521 parameters: pMod as checkbox.
522 selection-screen end of line.
523selection-screen: end of block b1.
524
525
526selection-screen: begin of block b3 with frame title tBlock3.
527 selection-screen begin of line.
528 selection-screen comment 1(33) tPtext.
529 parameters: pText as checkbox default 'X' memory id MTEXT.
530 selection-screen end of line.
531
532 selection-screen begin of line.
533 selection-screen comment 1(33) tMess.
534 parameters: pMess as checkbox default 'X' memory id MMESS.
535 selection-screen end of line.
536
537 selection-screen begin of line.
538 selection-screen comment 1(33) tTTyp.
539 parameters: pTTyp as checkbox default 'X' memory id MTTYP.
540 selection-screen end of line.
541
542 selection-screen begin of line.
543 selection-screen comment 1(33) tXslt.
544 parameters: pTrans as checkbox default 'X' memory id MXSLT.
545 selection-screen end of line.
546
547 selection-screen begin of line.
548 selection-screen comment 1(33) tPinc.
549 parameters: pInc as checkbox default 'X' memory id MINC.
550 selection-screen comment 40(20) tReci.
551 parameters: pReci as checkbox default 'X' memory id MRECI.
552 selection-screen end of line.
553
554 selection-screen begin of line.
555 selection-screen comment 1(33) tPfunc.
556 parameters: pFunc as checkbox default 'X' memory id MFUNC.
557 selection-screen comment 40(20) tRecf.
558 parameters: pRecf as checkbox default 'X' memory id MRECF.
559 selection-screen end of line.
560
561 selection-screen begin of line.
562 selection-screen comment 1(33) tRecC.
563 parameters: pRecC as checkbox default 'X' memory id MRECC.
564 selection-screen end of line.
565
566 selection-screen begin of line.
567 selection-screen comment 1(33) tFDoc.
568 parameters: pFDoc as checkbox default 'X' memory id MFDOC.
569 selection-screen end of line.
570
571 selection-screen begin of line.
572 selection-screen comment 1(33) tCDoc.
573 parameters: pCDoc as checkbox default 'X' memory id MCDOC.
574 selection-screen end of line.
575
576 selection-screen begin of line.
577 selection-screen comment 1(33) tPscr.
578 parameters: pScr as checkbox default 'X' memory id MSCR.
579 selection-screen end of line.
580
581 selection-screen begin of line.
582 selection-screen comment 1(33) tPdict.
583 parameters: pDict as checkbox default 'X' memory id MDICT.
584 selection-screen end of line.
585
586 selection-screen begin of line.
587 selection-screen comment 1(33) tSortT.
588 parameters: pSortT as checkbox default ' ' memory id MSORTT.
589 selection-screen end of line.
590selection-screen: end of block b3.
591
592
593selection-screen: begin of block b5 with frame title tBlock5.
594
595 selection-screen begin of line.
596 selection-screen comment 1(33) tRep.
597 parameters: pRep as checkbox default 'X'.
598 selection-screen end of line.
599
600 selection-screen begin of line.
601 selection-screen comment 1(33) tProMess.
602 parameters: pProMess as checkbox default 'X'.
603 selection-screen end of line.
604selection-screen: end of block b5.
605
606
607
608
609at selection-screen on value-request for pFolder.
610
611data: objFile type ref to cl_gui_frontend_services.
612data: pickedFolder type string.
613data: initialFolder type string.
614
615 if sy-batch is initial.
616 create object objFile.
617
618 if not pFolder is initial.
619 initialFolder = pFolder.
620 else.
621 objFile->get_temp_directory( changing temp_dir = initialFolder
622 exceptions cntl_error = 1
623 error_no_gui = 2
624 not_supported_by_gui = 3 ).
625 endif.
626
627 objFile->directory_browse( exporting initial_folder = initialFolder
628 changing selected_folder = pickedFolder
629 exceptions cntl_error = 1
630 error_no_gui = 2
631 not_supported_by_gui = 3 ).
632
633 if sy-subrc = 0.
634 pFolder = pickedFolder.
635 else.
636 write: / 'An error has occured picking a folder'.
637 endif.
638 endif.
639
640
641at selection-screen.
642
643 case 'X'.
644 when pPc.
645 if pFolder is initial.
646
647 message e000(oo) with 'You must enter a file path'.
648 endif.
649
650 when pServ.
651 if pLogical is initial.
652
653 message e000(oo) with 'You must enter a logical file name'.
654 endif.
655 endcase.
656
657
658at selection-screen on pLogical.
659
660 if not pServ is initial.
661 call function 'FILE_GET_NAME' exporting logical_filename = pLogical
662 importing file_name = serverFolder
663 exceptions file_not_found = 1
664 others = 2.
665 if sy-subrc = 0.
666 if serverFolder is initial.
667 message e000(oo) with 'No file path returned from logical filename'.
668 else.
669
670 tSDPath = serverFolder.
671
672 shift serverFolder right deleting trailing serverSlashSeparator.
673 shift serverFolder left deleting leading space.
674 endif.
675 else.
676 message e000(oo) with 'Logical filename does not exist'.
677 endif.
678 endif.
679
680
681at selection-screen on value-request for soProg-low.
682
683 call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type = 'PROG'
684 object_name = soProg-low
685 suppress_selection = 'X'
686 use_alv_grid = ''
687 without_personal_list = ''
688 importing object_name_selected = soProg-low
689 exceptions cancel = 1.
690
691
692at selection-screen on value-request for soProg-high.
693
694 call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type = 'PROG'
695 object_name = soProg-high
696 suppress_selection = 'X'
697 use_alv_grid = ''
698 without_personal_list = ''
699 importing object_name_selected = soProg-high
700 exceptions cancel = 1.
701
702
703at selection-screen on value-request for soxslt-low.
704
705 call function 'REPOSITORY_INFO_SYSTEM_F4'
706 exporting
707 object_type = 'XSLT'
708 object_name = soxslt-low
709 suppress_selection = 'X'
710 use_alv_grid = ''
711 without_personal_list = ''
712 importing
713 object_name_selected = soxslt-low
714 exceptions
715 cancel = 1.
716
717
718at selection-screen on value-request for soxslt-high.
719
720 call function 'REPOSITORY_INFO_SYSTEM_F4'
721 exporting
722 object_type = 'XSLT'
723 object_name = soxslt-high
724 suppress_selection = 'X'
725 use_alv_grid = ''
726 without_personal_list = ''
727 importing
728 object_name_selected = soxslt-high
729 exceptions
730 cancel = 1.
731
732
733at selection-screen on value-request for soClass-low.
734
735 call function 'F4_DD_ALLTYPES' exporting object = soClass-low
736 suppress_selection = 'X'
737 display_only = ''
738 only_types_for_clifs = 'X'
739 importing result = soClass-low.
740
741
742at selection-screen on value-request for soClass-high.
743
744 call function 'F4_DD_ALLTYPES' exporting object = soClass-high
745 suppress_selection = 'X'
746 display_only = ''
747 only_types_for_clifs = 'X'
748 importing result = soClass-high.
749
750
751at selection-screen on value-request for soFName-low.
752
753 call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type = 'FUNC'
754 object_name = soFname-low
755 suppress_selection = 'X'
756 use_alv_grid = ''
757 without_personal_list = ''
758 importing object_name_selected = soFName-low
759 exceptions cancel = 1.
760
761
762at selection-screen on value-request for soFName-high.
763
764 call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type = 'FUNC'
765 object_name = soFname-high
766 suppress_selection = 'X'
767 use_alv_grid = ''
768 without_personal_list = ''
769 importing object_name_selected = soFName-high
770 exceptions cancel = 1.
771
772
773at selection-screen on value-request for soFGroup-low.
774
775 call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type = 'FUGR'
776 object_name = soFGroup-low
777 suppress_selection = 'X'
778 use_alv_grid = ''
779 without_personal_list = ''
780 importing object_name_selected = soFGroup-low
781 exceptions cancel = 1.
782
783
784at selection-screen on value-request for soFGroup-high.
785
786 call function 'REPOSITORY_INFO_SYSTEM_F4' exporting object_type = 'FUGR'
787 object_name = soFGroup-high
788 suppress_selection = 'X'
789 use_alv_grid = ''
790 without_personal_list = ''
791 importing object_name_selected = soFGroup-high
792 exceptions cancel = 1.
793
794
795
796
797initialization.
798
799 tblocksy = 'Sysparency Data'.
800 tsysjobs = 'Jobs'.
801 tsystran = 'Transactions'.
802 tsysprog = 'Program structure'.
803 tBlock1 = 'Author (Optional)'.
804 tBlock2 = 'Objects to download'.
805 tBlock3 = 'Additional downloads for programs, function modules and classes'.
806 tBlock4 = 'Download parameters'.
807 tBlock5 = 'Display options'.
808 tAuth = 'Author name'.
809 tPmod = 'Include programs modified by author'.
810 tCust = 'Only customer objects'.
811 tNRange = 'Alt customer name range'.
812 tRtable = 'Tables / Structures'.
813 trtabtyp = 'Table types'.
814 tPtable = 'Table name'.
815 tTnote = 'Note: tables are stored under the username of the last person who modified them'.
816 tRfunc = 'Function modules'.
817 tPfname = 'Function name'.
818 tFgroup = 'Function group'.
819 tRClass = 'Classes'.
820 tPcname = 'Class name'.
821 tMess = 'Message class'.
822 tMName = 'Class name'.
823 tMLang = 'Language'.
824 tProg = 'Programs'.
825 tRpname = 'Program name'.
826 tPack = 'Package'.
827 tPtxt = 'Text document'.
828 tPhtml = 'HTML document'.
829 tBack = 'Include background colour'.
830 tPtext = 'Text elements'.
831 tPinc = 'Include programs'.
832 tRecI = 'Recursive search'.
833 tPpath = 'File path'.
834 tSPath = 'Logical file name'.
835 tPmes = 'Message classes'.
836 tPfunc = 'Function modules'.
837 tFDoc = 'Function module documentation'.
838 tCDoc = 'Class documentation'.
839 tRecf = 'Recursive search'.
840 tRecC = 'Class recursive search'.
841 tPscr = 'Screens'.
842 tPdict = 'Dictionary structures'.
843 tSortT = 'Sort table fields alphabetically'.
844 tServ = 'Download to server'.
845 tPc = 'Download to PC'.
846 tRep = 'Display download report'.
847 tProMess = 'Display progress messages'.
848 tRxslt = 'Transformations'.
849 tPxslt = 'XSLT Name'.
850 tTtyp = 'Table Types'.
851 tXslt = 'Transformation'.
852
853
854 if sy-batch is initial.
855 perform determineFrontendOPSystem using frontendSlashSeparator frontendOpSystem.
856 endif.
857 perform determineServerOpsystem using serverSlashSeparator serverFileSystem serverOpsystem.
858
859
860 perform findExternalCommand using serverFileSystem.
861
862
863start-of-selection.
864
865 perform checkComboBoxes.
866 perform fillSelectionRanges.
867 startTime = sy-uzeit.
868
869
870 if not sy-batch is initial.
871 pProMess = ''.
872 endif.
873
874
875 if pCName is initial.
876 customerNameSpace = '^'.
877 else.
878 customerNameSpace = pCName.
879 endif.
880
881
882 if pTxt is initial.
883 downloadFileExtension = HTMLEXTENSION.
884 else.
885 downloadFileExtension = TEXTEXTENSION.
886 endif.
887
888
889 case 'X'.
890 when pPc.
891 slashSeparatorToUse = frontendSlashSeparator.
892 downloadFolder = pFolder.
893 when pServ.
894 slashSeparatorToUse = serverSlashSeparator.
895 downloadFolder = serverFolder.
896 endcase.
897
898
899 case 'X'.
900
901 when rTable.
902 perform retrieveTables using iDictionary[]
903 soTableNames[]
904 soAuthor[]
905 soPack[].
906
907 when rTabType.
908 perform retrieveTableTypes using iTableTypes[]
909 soTableTypeNames[]
910 soAuthor[]
911 soPack[].
912
913
914 when rMess.
915 perform retrieveMessageClass using iMessages[]
916 soAuthor[]
917 pMname
918 pMLang
919 pMod
920 soPack[].
921
922
923 when rFunc.
924 perform retrieveFunctions using soFunctionName[]
925 soFunctionGroup[]
926 iFunctions[]
927 soAuthor[]
928 pText
929 pScr
930 pCust
931 customerNameSpace
932 soPack[].
933
934
935 perform scanForAdditionalFuncStuff using iFunctions[]
936 pRecI
937 pRecF
938 pInc
939 pFunc
940 pDict
941 pMess
942 pTrans
943 pCust
944 customerNameSpace.
945
946
947 when rClass.
948 perform retrieveClasses using iClasses[]
949 iFunctions[]
950 soClassName[]
951 soAuthor[]
952 customerNameSpace
953 pMod
954 pCust
955 pMess
956 pText
957 pDict
958 pFunc
959 pInc
960 pTrans
961 pRecF
962 pRecI
963 pRecC
964 pMLang
965 soPack[].
966
967 loop at iFunctions.
968
969 perform scanForAdditionalFuncStuff using iFunctions[]
970 pRecI
971 pRecF
972 pInc
973 pFunc
974 pDict
975 pMess
976 pTrans
977 pCust
978 customerNameSpace.
979 endloop.
980
981
982 when rProg.
983 perform retrievePrograms using iPrograms[]
984 iProgFunctions[]
985 soProgramName[]
986 soAuthor[]
987 customerNamespace
988 pMod
989 pCust
990 pMess
991 pText
992 pDict
993 pFunc
994 pInc
995 pScr
996 pTrans
997 pRecF
998 pRecI
999 soPack[].
1000
1001 when rXslt.
1002 perform retrieveXslt using iTransformations[]
1003 soXsltName[]
1004 soAuthor[]
1005 customerNamespace
1006 pMod
1007 pCust
1008 soPack[].
1009
1010 endcase.
1011
1012
1013end-of-selection.
1014
1015 if forcedExit = 0.
1016
1017 case 'X'.
1018
1019 when rTable.
1020 if not ( iDictionary[] is initial ).
1021 perform downloadDDStructures using iDictionary[]
1022 iDictFilename[]
1023 downloadFolder
1024 HTMLEXtension
1025 space
1026 pSortT
1027 slashSeparatorToUse
1028 pServ
1029 pProMess
1030 serverFileSystem
1031 pBack.
1032 endif.
1033
1034 when rTabType.
1035 if not ( iTableTypes[] is initial ).
1036 perform downloadDDTableTypes using iTabletypes[]
1037 iTableTypeFilename[]
1038 downloadFolder
1039 htmlExtension
1040 space
1041 pSortt
1042 slashSeparatorToUse
1043 pServ
1044 pProMess
1045 serverFileSystem
1046 pBack.
1047 endif.
1048
1049
1050 when rMess.
1051 if not ( iMessages[] is initial ).
1052 sort iMessages ascending by arbgb msgnr.
1053 loop at iMessages.
1054 append iMessages to iSingleMessageClass.
1055 at end of arbgb.
1056 perform downloadMessageClass using iSingleMessageClass[]
1057 iMessages-arbgb
1058 downloadFolder
1059 downloadFileExtension
1060 pHtml
1061 space
1062 customerNameSpace
1063 pInc
1064 pDict
1065 pMess
1066 slashSeparatorToUse
1067 pServ
1068 pProMess
1069 serverFileSystem
1070 pBack.
1071 clear iSingleMessageClass[].
1072 endat.
1073 endloop.
1074 endif.
1075
1076
1077 when rFunc.
1078 if not ( iFunctions[] is initial ).
1079 perform downloadFunctions using iFunctions[]
1080 iDictFilename[]
1081 iTableTypeFilename[]
1082 downloadFolder
1083 downloadFileExtension
1084 space
1085 pFDoc
1086 pHtml
1087 customerNameSpace
1088 pInc
1089 pDict
1090 TEXTEXTENSION
1091 HTMLEXTENSION
1092 pSortT
1093 slashSeparatorToUse
1094 pServ
1095 pProMess
1096 serverFileSystem
1097 pBack.
1098 endif.
1099
1100
1101 when rClass.
1102 if not ( iClasses[] is initial ).
1103 perform downloadClasses using iClasses[]
1104 iFunctions[]
1105 iDictFilename[]
1106 iTableTypeFilename[]
1107 downloadFolder
1108 downloadFileExtension
1109 HTMLEXTENSION
1110 TEXTEXTENSION
1111 pHtml
1112 customerNameSpace
1113 pInc
1114 pDict
1115 pCDoc
1116 pSortT
1117 slashSeparatorToUse
1118 pServ
1119 pProMess
1120 serverFileSystem
1121 pBack.
1122 endif.
1123
1124
1125 when rProg.
1126 if not ( iPrograms[] is initial ).
1127 perform downloadPrograms using iPrograms[]
1128 iProgFunctions[]
1129 iDictFilename[]
1130 iTableTypeFilename[]
1131 downloadFolder
1132 downloadFileExtension
1133 HTMLEXTENSION
1134 TEXTEXTENSION
1135 pHtml
1136 customerNameSpace
1137 pInc
1138 pDict
1139 ''
1140 pSortT
1141 slashSeparatorToUse
1142 pServ
1143 pProMess
1144 serverFileSystem
1145 pBack.
1146 endif.
1147
1148 when rXSLT.
1149 if not ( iTransformations[] is initial ).
1150 perform downloadXSLT using iTransformations[]
1151 downloadFolder
1152 downloadFileExtension
1153 htmlExtension
1154 textExtension
1155 pHtml
1156 customerNamespace
1157 slashSeparatorToUse
1158 pServ
1159 space
1160 pProMess
1161 serverFileSystem
1162 pBack.
1163 endif.
1164 endcase.
1165
1166 perform downloadSysparencyDump.
1167
1168
1169
1170 perform freeMemory using iPrograms[]
1171 iFunctions[]
1172 iProgFunctions[]
1173 iDictionary[]
1174 iTableTypes[]
1175 iTransformations[].
1176
1177 if not pRep is initial.
1178 get time.
1179 runTime = sy-uzeit - startTime.
1180
1181 case 'X'.
1182 when rTable.
1183 perform fillTreeNodeTables using iDictionary[]
1184 iTreeDisplay[]
1185 runTime.
1186 when rTabType.
1187 perform fillTreeNodeTableTypes using iTableTypes[]
1188 iTreeDisplay[]
1189 runtime.
1190
1191 when rMess.
1192 perform fillTreeNodeMessages using iMessages[]
1193 iTreeDisplay[]
1194 runTime.
1195
1196
1197 when rFunc.
1198 perform fillTreeNodeFunctions using iFunctions[]
1199 iTreeDisplay[]
1200 runTime.
1201
1202 when rClass.
1203 perform fillTreeNodeClasses using iClasses[]
1204 iFunctions[]
1205 iTreeDisplay[]
1206 runTime.
1207
1208 when rProg.
1209 perform fillTreeNodePrograms using iPrograms[]
1210 iProgFunctions[]
1211 iTreeDisplay[]
1212 runTime.
1213
1214 when rXSLT.
1215 perform fillTreeNodeXSLT using iTransformations[]
1216 iTreeDisplay[]
1217 runtime.
1218 endcase.
1219
1220 if not ( iTreeDisplay[] is initial ).
1221 perform displayTree using iTreeDisplay[].
1222 else.
1223 statusBarMessage = 'No items found matching selection criteria'.
1224 perform displayStatus using statusBarMessage 2.
1225 endif.
1226 endif.
1227 endif.
1228
1229
1230 clear iPrograms[].
1231 clear iFunctions[].
1232 clear iClasses[].
1233 clear iProgFunctions[].
1234 clear iMessages[].
1235 clear iDictionary[].
1236 clear iDictFilename[].
1237 clear iTableTypeFilename[].
1238 clear iTransformations[].
1239 clear iTableTypes[].
1240
1241
1242
1243 set parameter id 'MAUTH' field pAuth.
1244
1245 set parameter id 'MMNAME' field pMname.
1246
1247 set parameter id 'MNAMESPACE' field pCName.
1248
1249 set parameter id 'MFOLDER' field pFolder.
1250
1251 set parameter id 'MLOGICAL' field pLogical.
1252
1253 set parameter id 'MTEXT' field pText.
1254
1255 set parameter id 'MMESS' field pMess.
1256
1257 set parameter id 'MINC' field pInc.
1258
1259 set parameter id 'MRECI' field pReci.
1260
1261 set parameter id 'MFUNC' field pFunc.
1262
1263 set parameter id 'MRECF' field pRecf.
1264
1265 set parameter id 'MRECF' field pRecC.
1266
1267 set parameter id 'MFDOC' field pFDoc.
1268
1269 set parameter id 'MCDOC' field pCDoc.
1270
1271 set parameter id 'MSCR' field pScr.
1272
1273 set parameter id 'MDICT' field pDict.
1274
1275 set parameter id 'MSORTT' field pSortT.
1276
1277 set parameter id 'MTTYP' field pTTyp.
1278
1279 set parameter id 'MXSLT' field pTrans.
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289form freeMemory using iLocPrograms like iPrograms[]
1290 iLocFunctions like iFunctions[]
1291 iLocProgfunctions like iProgFunctions[]
1292 iLocDictionary like iDictionary[]
1293 iLocTableTypes like iTableTypes[]
1294 iLocTransformation like iTransformations[] .
1295
1296field-symbols: <wafunction> like line of iLocfunctions.
1297field-symbols: <waProgram> like line of iLocPrograms.
1298field-symbols: <waDictStruct> type tDictTable.
1299field-symbols: <waTableTypeStruct> like line of iLocTableTypes.
1300field-symbols: <waTransformation> type tTransformation.
1301
1302 loop at iLocFunctions assigning <waFunction>.
1303 loop at <waFunction>-iDictStruct assigning <waDictStruct>.
1304 free memory id <waDictStruct>-tablename.
1305 endloop.
1306 endloop.
1307
1308 loop at iLocProgFunctions assigning <waFunction>.
1309 loop at <waFunction>-iDictStruct assigning <waDictStruct>.
1310 free memory id <waDictStruct>-tablename.
1311 endloop.
1312 endloop.
1313
1314 loop at iLocPrograms assigning <waProgram>.
1315 loop at <waProgram>-iDictStruct assigning <waDictStruct>.
1316 free memory id <waDictStruct>-tablename.
1317 endloop.
1318 endloop.
1319
1320 loop at iLocDictionary assigning <waDictStruct>.
1321 free memory id <waDictStruct>-tablename.
1322 endloop.
1323
1324 loop at iLocTableTypes assigning <waTableTypeStruct>.
1325 free memory id <waTableTypeStruct>-typename.
1326 endloop.
1327
1328 loop at iLocTransformation assigning <waTransformation>.
1329 free memory id <waTransformation>-xsltName.
1330 endloop.
1331endform.
1332
1333
1334
1335
1336form checkComboBoxes.
1337
1338 if pAuth is initial.
1339 if soPack[] is initial.
1340 case 'X'.
1341 when rTable.
1342 if soTable[] is initial.
1343 statusBarMessage = 'You must enter either a table name or author.'.
1344 endif.
1345 when rFunc.
1346 if ( soFName[] is initial ) and ( soFGroup[] is initial ).
1347 if soFName[] is initial.
1348 statusBarMessage = 'You must enter either a function name or author.'.
1349 else.
1350 if soFGroup[] is initial.
1351 statusBarMessage = 'You must enter either a function group, or an author name.'.
1352 endif.
1353 endif.
1354 endif.
1355 when rProg.
1356 if soProg[] is initial.
1357 statusBarMessage = 'You must enter either a program name or author name.'.
1358 endif.
1359 endcase.
1360 endif.
1361 else.
1362
1363 if pAuth = 'SAP*' or pAuth = 'SAP'.
1364 statusBarMessage = 'Sorry cannot download all objects for SAP standard user'.
1365 endif.
1366 endif.
1367
1368 if not statusBarMessage is initial.
1369 perform displayStatus using statusBarMessage 3.
1370 forcedExit = 1.
1371 stop.
1372 endif.
1373endform.
1374
1375
1376
1377
1378form fillSelectionRanges.
1379
1380data: strLength type i.
1381
1382 strLength = strlen( pcName ).
1383
1384 if not pAuth is initial.
1385 soAuthor-sign = 'I'.
1386 soAuthor-option = 'EQ'.
1387 soAuthor-low = pAuth.
1388 append soAuthor.
1389 endif.
1390
1391
1392 if not soTable is initial.
1393 soTableNames[] = soTable[].
1394
1395 if not pcName is initial.
1396 loop at soTableNames.
1397 if soTableNames-low+0(strLength) <> pcName.
1398 concatenate pcName soTableNames-low into soTableNames-low.
1399 endif.
1400
1401 if soTableNames-high+0(strLength) <> pcName.
1402 concatenate pcName soTableNames-high into soTableNames-high.
1403 endif.
1404
1405 modify soTableNames.
1406 endloop.
1407 endif.
1408 endif.
1409
1410
1411 if not soFName is initial.
1412 soFunctionName[] = soFname[].
1413
1414 if not pcName is initial.
1415 loop at soFunctionName.
1416 if soFunctionName-low+0(strLength) <> pcName.
1417 concatenate pcName soFunctionName-low into soFunctionName-low.
1418 endif.
1419
1420 if soFunctionName-high+0(strLength) <> pcName.
1421 concatenate pcName soFunctionName-high into soFunctionName-high.
1422 endif.
1423
1424 modify soFunctionName.
1425 endloop.
1426 endif.
1427 endif.
1428
1429
1430 if not soTabTyp is initial.
1431 soTableTypeNames[] = soTabTyp[].
1432
1433
1434 if not pCname is initial.
1435 loop at soTableTypeNames.
1436 if soTableTypeNames-low+0(strlength) <> pcname.
1437 concatenate pCname soTableTypeNames-low into soTableTypeNames-low.
1438 endif.
1439
1440 if soTableNames-high+0(strlength) <> pcname.
1441 concatenate pcname soTableTypeNames-high into soTableTypeNames-high.
1442 endif.
1443
1444 modify soTableTypeNames.
1445 endloop.
1446 endif.
1447 endif.
1448
1449
1450 if not soFGroup is initial.
1451 soFunctionGroup[] = soFGroup[].
1452
1453 if not pcName is initial.
1454 loop at soFunctionName.
1455 if soFunctionGroup-low+0(strLength) <> pcName.
1456 concatenate pcName soFunctionGroup-low into soFunctionGroup-low.
1457 endif.
1458
1459 if soFunctionGroup-high+0(strLength) <> pcName.
1460 concatenate pcName soFunctionGroup-high into soFunctionGroup-high.
1461 endif.
1462
1463 modify soFunctionGroup.
1464 endloop.
1465 endif.
1466 endif.
1467
1468
1469 if not soClass is initial.
1470 soClassName[] = soClass[].
1471
1472 if not pcName is initial.
1473 loop at soClassName.
1474 if soClassName-low+0(strLength) <> pcName.
1475 concatenate pcName soClassName-low into soClassName-low.
1476 endif.
1477
1478 if soClassName-high+0(strLength) <> pcName.
1479 concatenate pcName soClassName-high into soClassName-high.
1480 endif.
1481
1482 modify soClassName.
1483 endloop.
1484 endif.
1485 endif.
1486
1487
1488 if not soProg is initial.
1489 soProgramName[] = soProg[].
1490
1491 if not pcName is initial.
1492 loop at soProgramName.
1493 if soProgramName-low+0(strLength) <> pcName.
1494 concatenate pcName soProgramName-low into soProgramName-low.
1495 endif.
1496
1497 if soProgramName-high+0(strLength) <> pcName.
1498 concatenate pcName soProgramName-high into soProgramName-high.
1499 endif.
1500
1501 modify soProgramName.
1502 endloop.
1503 endif.
1504 endif.
1505
1506
1507 if not soXslt is initial.
1508 soXsltName[] = soXslt[].
1509
1510 if not pcName is initial.
1511 loop at soXsltName.
1512 if soXsltName-low+0(strlength) <> pcName.
1513 concatenate pcName soXsltName-low into soXsltname-low.
1514 endif.
1515
1516 if soXsltName-high+0(strlength) <> pcName.
1517 concatenate pcName soXsltName-high into soXsltName-high.
1518 endif.
1519
1520 modify soXsltName.
1521 endloop.
1522 endif.
1523 endif.
1524endform.
1525
1526
1527
1528
1529form retrieveTables using iLocDictStructure like iDictionary[]
1530 soTable like soTable[]
1531 soAuthor like soAuthor[]
1532 value(soLocPackage) like soPack[].
1533
1534data: iDictStructure type standard table of tDictTable.
1535data: waDictStructure type tDictTable.
1536
1537 select a~tabname as tableName
1538 into corresponding fields of table iDictStructure
1539 from dd02l as a
1540 inner join tadir as b
1541 on a~tabname = b~obj_name
1542 where a~tabname in soTable
1543 and a~tabclass <> 'CLUSTER'
1544 and a~tabclass <> 'POOL'
1545 and a~tabclass <> 'VIEW'
1546 and a~as4user in soAuthor
1547 and a~as4local = 'A'
1548 and b~pgmid = 'R3TR'
1549 and b~object = 'TABL'
1550 and b~devclass in soLocPackage[].
1551
1552 loop at iDictStructure into waDictStructure.
1553 perform findTableDescription using waDictStructure-tablename
1554 waDictStructure-tableTitle.
1555
1556 perform findTableDefinition using waDictStructure-tableName
1557 waDictStructure-iStructure[].
1558
1559 append waDictStructure to iLocDictStructure.
1560 clear waDictStructure.
1561 endloop.
1562endform.
1563
1564
1565
1566
1567form retrieveTableTypes using iLocTableTypes like iTableTypes[]
1568 soTableTypeNames like soTable[]
1569 soAuthor like soAuthor[]
1570 value(soLocPackage) like soPack[].
1571
1572 select *
1573 into corresponding fields of table iLocTableTypes
1574 from dd40l as a
1575 inner join dd40t as t
1576 on a~typename = t~typename
1577 inner join tadir as b
1578 on a~typename = b~obj_name
1579 where a~typename in sotabletypenames
1580 and t~ddlanguage eq sy-langu
1581 and a~as4user in soauthor
1582 and a~as4local = 'A'
1583 and b~pgmid = 'R3TR'
1584 and b~object = 'TTYP'
1585 and b~devclass in solocpackage[].
1586
1587endform.
1588
1589
1590
1591
1592form retrieveXSLT using ilocTransformations like iTransformations[]
1593 rangexslt like soxsltname[]
1594 rangeauthor like soAuthor[]
1595 value(custnamerange)
1596 value(alsomodifiedbyauthor)
1597 value(customerprogsonly)
1598 value(solocpackage) like sopack[].
1599
1600data: warangexslt like line of rangexslt.
1601
1602 if rangexslt[] is initial.
1603
1604 perform findAllXsltForAuthor using iLocTransformations[]
1605 rangexslt[]
1606 rangeauthor[]
1607 custnamerange
1608 alsomodifiedbyauthor
1609 customerprogsonly
1610 solocpackage[].
1611 else.
1612 read table rangexslt index 1 into warangexslt.
1613 if warangexslt-low cs asterix.
1614 perform findXsltByWildcard using ilocTransformations[]
1615 rangexslt[]
1616 rangeauthor[]
1617 custnamerange
1618 customerprogsonly
1619 solocpackage[].
1620 else.
1621 perform checkXsltDoesExist using ilocTransformations[]
1622 rangexslt[].
1623 endif.
1624 endif.
1625endform.
1626
1627
1628
1629
1630form findTableDescription using value(tableName)
1631 tableDescription.
1632
1633 select single ddtext
1634 from dd02t
1635 into tableDescription
1636 where tabname = tableName
1637 and ddlanguage = pMLang.
1638endform.
1639
1640
1641
1642
1643form findTableDefinition using value(tablename)
1644 iDictStruct like dumIDictStructure[].
1645
1646data gotstate like dcobjif-gotstate.
1647data: definition type standard table of DD03P with header line.
1648data: iDomainDataA type standard table of dd07v with header line.
1649data: iDomainDataN type standard table of dd07v with header line.
1650data: waDictStruct type tDictTableStructure.
1651data: waDomainStruct type tDomainStructure.
1652data: wadd02v_n type dd02v.
1653
1654 clear iDictStruct[].
1655
1656 call function 'DD_INT_TABL_GET'
1657 exporting
1658 tabname = tablename
1659 langu = pmlang
1660 importing
1661 gotstate = gotstate
1662 dd02v_n = wadd02v_n
1663 tables
1664 dd03p_n = definition
1665 exceptions
1666 internal_error = 1.
1667
1668 if sy-subrc = 0 and not wadd02v_n is initial.
1669 call function 'DD_TABL_EXPAND'
1670 exporting
1671 dd02v_wa = wadd02v_n
1672 mode = 46
1673 prid = 0
1674 tables
1675 dd03p_tab = definition
1676 exceptions
1677 illegal_parameter = 1.
1678 endif.
1679
1680 if sy-subrc = 0 and gotstate = 'A'.
1681 loop at definition.
1682 move-corresponding definition to waDictStruct.
1683 perform removeLeadingZeros changing waDictStruct-position.
1684 perform removeLeadingZeros changing waDictStruct-leng.
1685
1686
1687 call function 'DD_DOMA_GET'
1688 exporting
1689 domain_name = definition-domname
1690 get_state = 'M '
1691 langu = pmlang
1692
1693 withtext = 'X'
1694 tables
1695 dd07v_tab_a = iDomainDataA
1696 dd07v_tab_n = iDomainDataN
1697 exceptions
1698 illegal_value = 1
1699 op_failure = 2.
1700
1701 loop at iDomainDataA.
1702 move-corresponding iDomainDataA to waDomainStruct.
1703 append waDomainStruct to waDictStruct-iDomains.
1704 endloop.
1705
1706 clear iDomainDataA[].
1707 append waDictStruct to iDictStruct.
1708 clear waDictStruct.
1709 endloop.
1710 endif.
1711endform.
1712
1713
1714
1715
1716form retrieveMessageClass using iLocMessages like iMessages[]
1717 rangeAuthor like soAuthor[]
1718 value(messageClassName)
1719 value(messageClassLang)
1720 value(modifiedBy)
1721 value(soLocPackage) like soPack[].
1722
1723data: waMessage type tMessage.
1724data: iMClasses type standard table of arbgb.
1725
1726
1727 if not messageClassName is initial.
1728
1729 if not soLocPackage[] is initial.
1730 select obj_name as arbgb
1731 into table iMClasses
1732 from tadir
1733 where pgmid = 'R3TR'
1734 and object = 'MSAG'
1735 and devclass in soLocPackage.
1736 endif.
1737
1738 replace '*' with '%' into messageClassName.
1739 if iMCLasses[] is initial.
1740 select t100~arbgb
1741 t100~text
1742 t100~msgnr
1743 t100a~stext
1744 appending corresponding fields of table iLocMessages
1745 from t100
1746 inner join t100a
1747 on t100a~arbgb = t100~arbgb
1748 where t100a~masterLang = messageClassLang
1749 and t100~sprsl = messageClassLang
1750 and t100~arbgb like messageClassName
1751 and t100a~respUser in rangeAuthor[].
1752 else.
1753 select t100~arbgb
1754 t100~text
1755 t100~msgnr
1756 t100a~stext
1757 appending corresponding fields of table iLocMessages
1758 from t100
1759 inner join t100a
1760 on t100a~arbgb = t100~arbgb
1761 for all entries in iMClasses
1762 where t100~sprsl = messageClassLang
1763 and ( t100~arbgb like messageClassName and t100~arbgb = iMClasses-table_line )
1764 and t100a~masterLang = messageClassLang
1765 and t100a~respUser in rangeAuthor[].
1766 endif.
1767 else.
1768 if modifiedBy is initial.
1769
1770 select t100~arbgb
1771 t100~msgnr
1772 t100~text
1773 t100a~stext
1774 appending corresponding fields of table iLocMessages
1775 from t100
1776 inner join t100a
1777 on t100a~arbgb = t100~arbgb
1778 inner join tadir
1779 on t100~arbgb = tadir~obj_name
1780 where t100a~masterLang = messageClassLang
1781 and t100a~respUser in rangeAuthor[]
1782 and tadir~pgmid = 'R3TR'
1783 and tadir~object = 'MSAG'
1784 and tadir~devclass in soLocPackage[].
1785
1786 else.
1787
1788 select t100~arbgb
1789 t100~msgnr
1790 t100~text
1791 t100a~stext
1792 appending corresponding fields of table iLocMessages
1793 from t100
1794 inner join t100a
1795 on t100a~arbgb = t100~arbgb
1796 inner join tadir
1797 on t100~arbgb = tadir~obj_name
1798 where t100a~masterLang = messageClassLang
1799 and t100a~respUser in rangeAuthor[]
1800 and t100a~lastUser in rangeAuthor[]
1801 and tadir~pgmid = 'R3TR'
1802 and tadir~object = 'MSAG'
1803 and tadir~devclass in soLocPackage[].
1804 endif.
1805 endif.
1806endform.
1807
1808
1809
1810
1811form retrieveFunctions using soFName like soFunctionName[]
1812 soFGroup like soFunctionGroup[]
1813 iLocFunctionNames like iFunctions[]
1814 value(solocAuthor) like soAuthor[]
1815 value(getTextElements)
1816 value(getScreens)
1817 value(customerOnly)
1818 value(customerNameRange)
1819 value(soLocPackage) like soPack[].
1820
1821data: waFunctionName type tFunction.
1822data: noGroupsFound type abap_bool value TRUE.
1823data: previousFG type v_fdir-area.
1824
1825
1826 select a~funcName as functionName
1827 a~area as functionGroup
1828 into corresponding fields of table iLocfunctionNames
1829 from v_fdir as a
1830 inner join tlibv as b
1831 on a~area = b~area
1832 inner join tadir as c
1833 on a~area = c~obj_name
1834 where a~funcName in soFName[]
1835 and a~area in soFGroup[]
1836 and a~generated = ''
1837 and b~uname in soLocAuthor[]
1838 and pgmid = 'R3TR'
1839 and object = 'FUGR'
1840 and devclass in solocPackage[]
1841 order by a~area.
1842
1843 loop at iLocFunctionNames into waFunctionName.
1844 perform retrieveFunctionDetail using waFunctionName-functionName
1845 waFunctionName-progname
1846 waFunctionName-includeNumber
1847 waFunctionName-functionTitle.
1848
1849 perform findMainFunctionInclude using waFunctionName-progname
1850 wafunctionName-functionGroup
1851 waFunctionName-includeNumber
1852 waFunctionName-functionMainInclude.
1853
1854 perform findFunctionTopInclude using waFunctionName-progname
1855 wafunctionName-functionGroup
1856 waFunctionName-topIncludeName.
1857
1858
1859 perform scanForFunctionIncludes using waFunctionName-progname
1860 customerOnly
1861 customerNameRange
1862 waFunctionName-iIncludes[].
1863
1864 perform findMainMessageClass using waFunctionName-progname
1865 waFunctionName-messageClass.
1866
1867
1868 if not getScreens is initial.
1869 if previousFG is initial or previousFG <> waFunctionName-functionGroup.
1870 perform findFunctionScreenFlow using waFunctionName.
1871
1872
1873 perform retrieveGUITitles using waFunctionName-iGUITitle[]
1874 waFunctionName-progname.
1875 endif.
1876 endif.
1877
1878 if not getTextElements is initial.
1879
1880 perform retrieveProgramTexts using waFunctionName-iSelectionTexts[]
1881 waFunctionName-iTextElements[]
1882 waFunctionName-progname.
1883 endif.
1884
1885 previousFG = waFunctionName-functionGroup.
1886 modify iLocFunctionNames from waFunctionName.
1887 endloop.
1888endform.
1889
1890
1891
1892
1893form retrieveFunctionDetail using value(functionName)
1894 progname
1895 includeName
1896 titleText.
1897
1898 select single pname
1899 include
1900 from tfdir
1901 into (progname, includeName)
1902 where funcName = functionName.
1903
1904 if sy-subrc = 0.
1905 select single stext
1906 from tftit
1907 into titleText
1908 where spras = pMLang
1909 and funcName = functionName.
1910 endif.
1911endform.
1912
1913
1914
1915
1916form scanForAdditionalFuncStuff using iLocFunctions like iFunctions[]
1917 value(recursiveIncludes)
1918 value(recursiveFunctions)
1919 value(searchForIncludes)
1920 value(searchForFunctions)
1921 value(searchForDictionary)
1922 value(searchForMessages)
1923 value(searchForTransformations)
1924 value(customerOnly)
1925 value(customerNameRange).
1926
1927data: waFunction type tFunction.
1928data: waInclude type tInclude.
1929
1930 loop at iLocFunctions into waFunction.
1931 if not searchForIncludes is initial.
1932
1933 perform scanForIncludePrograms using waFunction-progname
1934 recursiveIncludes
1935 customerOnly
1936 customerNameRange
1937 waFunction-iIncludes[].
1938
1939
1940 perform scanForIncludePrograms using waFunction-functionMainInclude
1941 recursiveIncludes
1942 customerOnly
1943 customerNameRange
1944 waFunction-iIncludes[].
1945
1946
1947 perform scanForIncludePrograms using waFunction-topIncludeName
1948 recursiveIncludes
1949 customerOnly
1950 customerNameRange
1951 waFunction-iIncludes[].
1952 endif.
1953
1954 if not searchForFunctions is initial.
1955 perform scanForFunctions using waFunction-functionMainInclude
1956 waFunction-programLinkName
1957 recursiveIncludes
1958 recursiveFunctions
1959 customerOnly
1960 customerNameRange
1961 iLocFunctions[].
1962 endif.
1963
1964 modify iLocFunctions from waFunction.
1965 endloop.
1966
1967
1968 loop at iLocFunctions into waFunction.
1969
1970 if not searchForDictionary is initial.
1971 perform scanForTables using waFunction-progname
1972 customerOnly
1973 customerNameRange
1974 waFunction-iDictStruct[].
1975
1976 perform scanForLikeOrType using waFunction-progname
1977 customerOnly
1978 customerNameRange
1979 waFunction-iDictStruct[]
1980 waFunction-iTableTypes[].
1981
1982 perform scanForTables using waFunction-functionMainInclude
1983 customerOnly
1984 customerNameRange
1985 waFunction-iDictStruct[].
1986
1987 perform scanForLikeOrType using waFunction-functionMainInclude
1988 customerOnly
1989 customerNameRange
1990 waFunction-iDictStruct[]
1991 waFunction-iTableTypes[].
1992
1993 loop at waFunction-iIncludes into waInclude.
1994 perform scanForTables using waInclude-includeName
1995 customerOnly
1996 customerNameRange
1997 waFunction-iDictStruct[].
1998
1999 perform scanForLikeOrType using waInclude-includeName
2000 customerOnly
2001 customerNameRange
2002 waFunction-iDictStruct[]
2003 waFunction-iTableTypes[].
2004 endloop.
2005
2006 modify iLocFunctions from waFunction.
2007 endif.
2008
2009
2010 if not searchForMessages is initial.
2011 perform scanForMessages using waFunction-progName
2012 waFunction-messageClass
2013 waFunction-iMessages[].
2014 modify iLocFunctions from waFunction.
2015 endif.
2016
2017
2018 if not searchForTransformations is initial.
2019 perform scanForTransformations using waFunction-progName
2020 customerOnly
2021 customerNameRange
2022 waFunction-iTransformations[].
2023 endif.
2024 endloop.
2025endform.
2026
2027
2028
2029
2030form scanForClasses using value(className)
2031 value(classLinkName)
2032 value(customerOnly)
2033 value(customerNameRange)
2034 iLocClasses like iClasses[]
2035 value(soLocPackage) like soPack[].
2036
2037data iLines type standard table of string with header line.
2038data: head type string.
2039data: tail type string.
2040data: lineLength type i value 0.
2041data: waLine type string.
2042data: waClass type tClass.
2043data: waSearchClass type tClass.
2044data: castClassName type program.
2045data: exceptionCustomerNameRange type string.
2046
2047
2048 concatenate customerNameRange 'CX_' into exceptionCustomerNameRange.
2049
2050
2051 castClassName = className.
2052 read report castClassName into iLines.
2053
2054 loop at iLines into waLine.
2055
2056 lineLength = strLen( waLine ).
2057 if lineLength > 0.
2058 if waLine(1) = ASTERIX.
2059 continue.
2060 endif.
2061
2062 translate waLine to upper case.
2063
2064 find TYPEREFTO in waLine ignoring case.
2065 if sy-subrc = 0.
2066
2067 split waLine at TYPE into head tail.
2068 shift tail left deleting leading space.
2069 split tail at 'REF' into head tail.
2070 shift tail left deleting leading space.
2071 split tail at 'TO' into head tail.
2072 shift tail left deleting leading space.
2073 if tail cs PERIOD.
2074 split tail at PERIOD into head tail.
2075 else.
2076 if tail cs COMMA.
2077 split tail at COMMA into head tail.
2078 endif.
2079 endif.
2080 else.
2081
2082 find '=>' in waLine match offset sy-fdpos.
2083 if sy-subrc = 0.
2084 head = waline+0(sy-fdpos).
2085 shift head left deleting leading space.
2086 condense head.
2087 find 'call method' in head ignoring case.
2088 if sy-subrc = 0.
2089 shift head left deleting leading space.
2090 split head at space into head tail.
2091 split tail at space into head tail.
2092
2093 head = tail.
2094 else.
2095
2096 if waLine cs '='.
2097 split waLine at '=' into tail head.
2098 shift head left deleting leading space.
2099 split head at '=' into head tail.
2100 endif.
2101 sy-subrc = 0.
2102 endif.
2103 endif.
2104 endif.
2105
2106 if sy-subrc = 0.
2107 try.
2108 if head+0(1) = 'Y' or head+0(1) = 'Z' or head cs customerNameRange.
2109
2110 read table iLocClasses into waSearchClass with key clsName = head.
2111 if sy-subrc <> 0.
2112 if head+0(3) = 'CX_'
2113 or head+0(4) = 'ZCX_'
2114 or head+0(4) = 'YCX_'
2115 or head cs exceptionCustomerNameRange.
2116
2117 waClass-exceptionClass = TRUE.
2118 endif.
2119
2120 waClass-clsname = head.
2121
2122
2123 if not soLocPackage[] is initial.
2124 select single obj_name
2125 from tadir
2126 into waClass-clsName
2127 where pgmid = 'R3TR'
2128 and object = 'CLAS'
2129 and obj_name = waClass-clsName
2130 and devclass in soLocPackage[].
2131 if sy-subrc = 0.
2132 append waClass to iLocClasses.
2133 endif.
2134 else.
2135 append waClass to iLocClasses.
2136 endif.
2137 endif.
2138 endif.
2139 catch cx_sy_range_out_of_bounds.
2140 endtry.
2141 endif.
2142 endif.
2143 endloop.
2144endform.
2145
2146
2147
2148
2149form scanForIncludePrograms using value(programName)
2150 value(recursiveIncludes)
2151 value(customerOnly)
2152 value(customerNameRange)
2153 iLocIncludes like dumiIncludes[].
2154
2155data: iIncludeLines type standard table of string with header line.
2156data: iTokens type standard table of stokes with header line.
2157data: iKeywords type standard table of text20 with header line.
2158data: iStatements type standard table of sstmnt with header line.
2159data: waTokens type stokes.
2160data: waInclude type tInclude.
2161data: waIncludeExists type tInclude.
2162data: maxLines type i.
2163data: nextLine type i.
2164data: castProgramName type program.
2165
2166
2167 castProgramName = programName.
2168 read report castProgramName into iIncludeLines.
2169
2170 append INCLUDE to iKeywords.
2171 scan abap-source iIncludeLines tokens into iTokens with includes statements into iStatements keywords from iKeywords.
2172
2173 clear iIncludeLines[].
2174
2175 maxLines = lines( iTokens ).
2176 loop at iTokens where str = INCLUDE and type = 'I'.
2177 nextLine = sy-tabix + 1.
2178 if nextLine <= maxLines.
2179 read table iTokens index nextLine into waTokens.
2180
2181
2182 if not customerOnly is initial.
2183 try.
2184 if waTokens-str+0(1) = 'Y' or waTokens-str+0(1) = 'Z' or waTokens-str cs customerNameRange
2185 or waTokens-str+0(2) = 'MZ' or waTokens-str+0(2) = 'MY'.
2186
2187 else.
2188 continue.
2189 endif.
2190 catch cx_sy_range_out_of_bounds into objRuntimeError.
2191 endtry.
2192 endif.
2193
2194 waInclude-includeName = waTokens-str.
2195
2196
2197 perform findProgramOrIncludeTitle using waInclude-includeName
2198 waInclude-includeTitle.
2199
2200
2201 read table iLocIncludes into waIncludeExists with key includeName = waInclude-includeName.
2202 if sy-subrc <> 0.
2203 append waInclude to iLocIncludes.
2204
2205 if not recursiveIncludes is initial.
2206
2207 perform scanForIncludePrograms using waInclude-includeName
2208 recursiveIncludes
2209 customerOnly
2210 customerNameRange
2211 iLocIncludes[].
2212 endif.
2213 endif.
2214 endif.
2215 endloop.
2216endform.
2217
2218
2219
2220
2221form scanForTransformations using value(programName)
2222 value(customerOnly)
2223 value(customerNameRange)
2224 iLocTransformation like iTransformations[].
2225
2226data: iIncludeLines type standard table of string with header line.
2227data: iTokens type standard table of stokes with header line.
2228data: iKeywords type standard table of text20 with header line.
2229data: iStatements type standard table of sstmnt with header line.
2230data: waTokens type stokes.
2231data: waTransformation type tTransformation.
2232data: waTransformationExists type tTransformation.
2233data: maxLines type i.
2234data: nextLine type i.
2235data: castProgramName type program.
2236
2237
2238
2239 castProgramName = programName.
2240 read report castProgramName into iIncludeLines.
2241
2242 append 'CALL' to iKeywords.
2243 scan abap-source iIncludeLines tokens into iTokens with includes statements into iStatements keywords from iKeywords.
2244
2245 clear iIncludeLines[].
2246
2247 maxLines = lines( iTokens ).
2248 loop at iTokens where str = TRANSFORMATION and type = 'I'.
2249 nextLine = sy-tabix + 1.
2250 if nextLine <= maxLines.
2251 read table iTokens index nextLine into waTokens.
2252
2253
2254 if not customerOnly is initial.
2255 try.
2256 if waTokens-str+0(1) = 'Y' or waTokens-str+0(1) = 'Z' or waTokens-str cs customerNameRange.
2257 else.
2258 continue.
2259 endif.
2260 catch cx_sy_range_out_of_bounds into objRuntimeError.
2261 endtry.
2262 endif.
2263
2264 waTransformation-xsltName = waTokens-str.
2265
2266
2267 read table iLocTransformation into waTRansformationExists with key xsltName = waTransformation-xsltName.
2268 if sy-subrc <> 0.
2269 append waTransformation to iLocTransformation.
2270
2271 perform scanForTransIncludes using waTransformation-xsltName
2272 customerOnly
2273 customerNameRange
2274 iLocTransformation[].
2275
2276 endif.
2277 endif.
2278 endloop.
2279endform.
2280
2281
2282
2283
2284form scanforTransIncludes using value(xsltName)
2285 value(customerOnly)
2286 value(customerNameRange)
2287 iLocTransformations like iTransformations[].
2288
2289data: iXsltSource type o2pageline_table.
2290data: waXsltAttributes type o2xsltattr.
2291data: waXSLTSource like line of iXSLTSource.
2292data: dummy type string.
2293data: waTransformationExists type tTransformation.
2294data: waTransformation type tTransformation.
2295
2296 cl_o2_api_xsltdesc=>load( exporting p_xslt_desc = xsltname
2297 importing p_source = iXsltSource
2298 p_attributes = waXsltAttributes
2299 exceptions not_existing = 1
2300 permission_failure = 2
2301 error_occured = 3
2302 version_not_found = 4 ).
2303
2304 loop at iXsltSource into waXSLTSource.
2305 if waXsltSource-line cs '<xsl:include'.
2306 split waXsltSource-line at '"' into dummy waXsltSource-line.
2307 split waXsltSource-line at '"' into waXSLTSource dummy.
2308
2309
2310 if not customerOnly is initial.
2311 try.
2312 if waXsltSource-line+0(1) = 'Y' or waXsltSource-line+0(1) = 'Z' or waXsltSource-line cs customerNameRange.
2313 else.
2314 continue.
2315 endif.
2316 catch cx_sy_range_out_of_bounds into objRuntimeError.
2317 endtry.
2318 endif.
2319
2320
2321 read table iLocTransformations into waTransformationExists with key xsltName = waXsltSource-line.
2322 if sy-subrc <> 0.
2323 waTransformation-xsltName = waXSLTSource-line.
2324 append waTransformation to iLocTransformations.
2325
2326
2327 perform scanforTransIncludes using waTransformation-xsltName
2328 customerOnly
2329 customerNameRange
2330 iLocTransformations[].
2331 endif.
2332 endif.
2333 endloop.
2334endform.
2335
2336
2337
2338
2339
2340form scanForFunctions using value(programName)
2341 value(programLinkName)
2342 value(recursiveIncludes)
2343 value(recursiveFunctions)
2344 value(customerOnly)
2345 value(customerNameRange)
2346 iLocFunctions like iFunctions[].
2347
2348data: iIncludeLines type standard table of string with header line.
2349data: iTokens type standard table of stokes with header line.
2350data: iStatements type standard table of sstmnt with header line.
2351data: waTokens type stokes.
2352data: waFunction type tFunction.
2353data: waFunctionComparison type tFunction.
2354data: maxLines type i.
2355data: nextLine type i.
2356data: castProgramName type program.
2357data: skipThisloop type abap_bool.
2358
2359
2360 castProgramName = programName.
2361 read report castProgramName into iIncludeLines.
2362 scan abap-source iIncludeLines tokens into iTokens with includes statements into iStatements.
2363 clear iIncludeLines[].
2364
2365 maxLines = lines( iTokens ).
2366 loop at iTokens where str = FUNCTION and type = 'I'.
2367
2368 nextLine = sy-tabix + 1.
2369 if nextLine <= maxLines.
2370 read table iTokens index nextLine into waTokens.
2371
2372
2373 skipThisLoop = FALSE.
2374 if not customerOnly is initial.
2375 try.
2376 if waTokens-str+1(1) = 'Y' or waTokens-str+1(1) = 'Z' or waTokens-str cs customerNameRange.
2377 else.
2378 skipThisLoop = TRUE.
2379 endif.
2380 catch cx_sy_range_out_of_bounds into objRuntimeError.
2381 cleanup.
2382 skipThisLoop = TRUE.
2383 endtry.
2384 endif.
2385
2386 if skipThisLoop = FALSE.
2387 waFunction-functionName = waTokens-str.
2388 replace all occurrences of '''' in waFunction-functionName with ' '.
2389 condense waFunction-functionName.
2390
2391
2392 read table iLocFunctions with key functionName = waFunction-functionName into waFunctionComparison.
2393 if sy-subrc <> 0.
2394
2395 waFunction-programLinkName = programLinkName.
2396
2397
2398 nextline = sy-tabix + 2.
2399 read table iTokens index nextLine into waTokens.
2400 if waTokens-str <> DESTINATION.
2401
2402
2403 select single area from v_fdir into wafunction-functionGroup where funcName = waFunction-functionName.
2404
2405 if sy-subrc = 0.
2406
2407 perform retrieveFunctionDetail using waFunction-functionName
2408 waFunction-progname
2409 waFunction-includeNumber
2410 waFunction-functionTitle.
2411
2412 perform findMainFunctionInclude using waFunction-progname
2413 waFunction-functionGroup
2414 waFunction-includeNumber
2415 waFunction-functionMainInclude.
2416
2417 perform findFunctionTopInclude using waFunction-progname
2418 wafunction-functionGroup
2419 waFunction-topIncludeName.
2420
2421
2422 perform findMainMessageClass using waFunction-progname
2423 waFunction-messageClass.
2424
2425 append waFunction to iLocFunctions.
2426
2427
2428 if not recursiveIncludes is initial.
2429 perform scanForIncludePrograms using waFunction-functionMainInclude
2430 recursiveIncludes
2431 customerOnly
2432 customerNameRange
2433 waFunction-iIncludes[].
2434 endif.
2435
2436
2437 if not recursiveFunctions is initial.
2438 perform scanForFunctions using waFunction-functionMainInclude
2439 space
2440 recursiveIncludes
2441 recursiveFunctions
2442 customerOnly
2443 customerNameRange
2444 iLocFunctions[].
2445 endif.
2446 clear waFunction.
2447 endif.
2448 endif.
2449 endif.
2450
2451 clear waFunction.
2452 endif.
2453 endif.
2454 endloop.
2455endform.
2456
2457
2458
2459
2460form scanForFunctionIncludes using poolName
2461 value(customerOnly)
2462 value(customerNameRange)
2463 iLocIncludes like dumiIncludes[].
2464
2465data: iIncludeLines type standard table of string with header line.
2466data: iTokens type standard table of stokes with header line.
2467data: iKeywords type standard table of text20 with header line.
2468data: iStatements type standard table of sstmnt with header line.
2469data: waTokens type stokes.
2470data: waInclude type tInclude.
2471data: waIncludeExists type tInclude.
2472data: maxLines type i.
2473data: nextLine type i.
2474data: castProgramName type program.
2475
2476
2477 castProgramName = poolName.
2478 read report castProgramName into iIncludeLines.
2479
2480 append INCLUDE to iKeywords.
2481 scan abap-source iIncludeLines tokens into iTokens with includes statements into iStatements keywords from iKeywords.
2482
2483 clear iIncludeLines[].
2484
2485 maxLines = lines( iTokens ).
2486 loop at iTokens where str = INCLUDE and type = 'I'.
2487 nextLine = sy-tabix + 1.
2488 if nextLine <= maxLines.
2489 read table iTokens index nextLine into waTokens.
2490
2491 if waTokens-str cp '*F++'.
2492
2493 if not customerOnly is initial.
2494 try.
2495 if waTokens-str+0(2) = 'LY' or waTokens-str+0(2) = 'LZ' or waTokens-str cs customerNameRange.
2496 else.
2497 continue.
2498 endif.
2499 catch cx_sy_range_out_of_bounds into objRuntimeError.
2500 endtry.
2501 endif.
2502
2503 waInclude-includeName = waTokens-str.
2504
2505
2506 perform findProgramOrIncludeTitle using waInclude-includeName
2507 waInclude-includeTitle.
2508
2509
2510 read table iLocIncludes into waIncludeExists with key includeName = waInclude-includeName.
2511 if sy-subrc <> 0.
2512 append waInclude to iLocIncludes.
2513 endif.
2514 endif.
2515 endif.
2516 endloop.
2517endform.
2518
2519
2520
2521
2522form findProgramOrIncludeTitle using value(programName)
2523 titleText.
2524
2525 select single text
2526 from trdirt
2527 into titleText
2528 where name = programName
2529 and sprsl = pMLang.
2530endform.
2531
2532
2533
2534
2535form retrievePrograms using iLocProgram like iPrograms[]
2536 iLocFunctions like iFunctions[]
2537 rangeProgram like soProgramName[]
2538 rangeAuthor like soAuthor[]
2539 value(custNameRange)
2540 value(alsoModifiedByauthor)
2541 value(customerProgsOnly)
2542 value(getMessages)
2543 value(getTextElements)
2544 value(getCustDictStructures)
2545 value(getFunctions)
2546 value(getIncludes)
2547 value(getScreens)
2548 value(getTransformations)
2549 value(recursiveFuncSearch)
2550 value(recursiveIncludeSearch)
2551 value(soLocPackage) like soPack[].
2552
2553data: waRangeProgram like line of rangeProgram.
2554
2555 if rangeProgram[] is initial.
2556
2557 perform findAllProgramsForAuthor using iLocProgram[]
2558 rangeProgram[]
2559 rangeAuthor[]
2560 custNameRange
2561 alsoModifiedByAuthor
2562 customerProgsOnly
2563 soLocPackage[].
2564 else.
2565 read table rangeProgram index 1 into waRangeProgram.
2566 if waRangeProgram-low cs ASTERIX.
2567 perform findProgramsByWildcard using iLocProgram[]
2568 rangeProgram[]
2569 rangeAuthor[]
2570 custNameRange
2571 customerProgsOnly
2572 soLocPackage[].
2573 else.
2574 perform checkProgramDoesExist using iLocProgram[]
2575 rangeProgram[].
2576 endif.
2577 endif.
2578
2579
2580 perform scanForAdditionalProgStuff using iLocProgram[]
2581 iLocFunctions[]
2582 getTextElements
2583 getMessages
2584 getScreens
2585 getCustDictStructures
2586 getFunctions
2587 getIncludes
2588 getTransformations
2589 customerProgsOnly
2590 custNameRange
2591 recursiveIncludeSearch
2592 recursiveFuncSearch.
2593endform.
2594
2595
2596
2597
2598form scanForAdditionalProgStuff using iLocProgram like iPrograms[]
2599 iLocFunctions like iFunctions[]
2600 value(getTextElements)
2601 value(getMessages)
2602 value(getScreens)
2603 value(getCustDictStructures)
2604 value(getFunctions)
2605 value(getIncludes)
2606 value(getTransformations)
2607 value(customerOnly)
2608 value(customerNameRange)
2609 value(recursiveIncludeSearch)
2610 value(recursiveFuncSearch).
2611
2612data: waProgram type tProgram.
2613data: waInclude type tInclude.
2614data: myTabix type syTabix.
2615
2616
2617 if not getIncludes is initial.
2618 loop at iLocProgram into waProgram.
2619 myTabix = sy-tabix.
2620 perform scanForIncludePrograms using waProgram-progName
2621 recursiveIncludeSearch
2622 customerOnly
2623 customerNameRange
2624 waProgram-iIncludes[].
2625
2626 modify iLocProgram from waProgram index myTabix.
2627 endloop.
2628 endif.
2629
2630
2631 loop at iLocProgram into waProgram.
2632 myTabix = sy-tabix.
2633 perform findProgramDetails using waProgram-progName
2634 waProgram-subc
2635 waProgram-programTitle
2636 waProgram
2637 getTextElements
2638 getMessages
2639 getScreens
2640 getTransformations
2641 getCustDictStructures
2642 customerOnly
2643 customerNameRange.
2644
2645
2646 if not getScreens is initial.
2647 perform findProgramScreenFlow using waProgram.
2648 endif.
2649
2650 loop at waProgram-iIncludes into waInclude.
2651 perform findProgramDetails using waInclude-includeName
2652 'I'
2653 waInclude-includeTitle
2654 waProgram
2655 getTextElements
2656 getMessages
2657 getScreens
2658 getTransformations
2659 getCustDictStructures
2660 customerOnly
2661 customerNameRange.
2662 endloop.
2663
2664 modify iLocProgram from waProgram index myTabix.
2665 endloop.
2666
2667
2668 if not getFunctions is initial.
2669 loop at iLocProgram into waProgram.
2670
2671 perform scanForFunctions using waProgram-progname
2672 waProgram-progname
2673 space
2674 space
2675 customerOnly
2676 customerNameRange
2677 iLocFunctions[].
2678 endloop.
2679
2680
2681 perform scanForAdditionalFuncStuff using iLocFunctions[]
2682 recursiveIncludeSearch
2683 recursiveFuncSearch
2684 getIncludes
2685 getFunctions
2686 getCustDictStructures
2687 getMessages
2688 getTransformations
2689 customerOnly
2690 customerNameRange.
2691 endif.
2692endform.
2693
2694
2695
2696
2697form findProgramDetails using value(programName)
2698 value(programType)
2699 programTitle
2700 waProgram type tProgram
2701 value(getTextElements)
2702 value(getMessages)
2703 value(getScreens)
2704 value(getTransformations)
2705 value(getCustDictStructures)
2706 value(customerOnly)
2707 value(customerNameRange).
2708
2709 perform findProgramOrIncludeTitle using programName
2710 programTitle.
2711
2712 if not getTextElements is initial.
2713
2714 perform retrieveProgramTexts using waProgram-iSelectionTexts[]
2715 waProgram-iTextElements[]
2716 programName.
2717 endif.
2718
2719
2720 if not getScreens is initial and ( programType = 'M' or programType = '1' ).
2721 perform retrieveGUITitles using waProgram-iGUITitle[]
2722 programName.
2723 endif.
2724
2725
2726 if not getMessages is initial.
2727 if programType = 'M' or programType = '1'.
2728 perform findMainMessageClass using programName
2729 waProgram-messageClass.
2730 endif.
2731
2732 perform scanForMessages using programName
2733 waProgram-messageClass
2734 waProgram-iMessages[].
2735 endif.
2736
2737
2738 if not getTransformations is initial.
2739 perform scanForTransformations using programName
2740 customerOnly
2741 customerNameRange
2742 waProgram-iTransformations[].
2743 endif.
2744
2745 if not getCustDictStructures is initial.
2746 perform scanForTables using programName
2747 customerOnly
2748 customerNameRange
2749 waProgram-iDictStruct[].
2750
2751 perform scanForLikeOrType using programName
2752 customerOnly
2753 customerNameRange
2754 waProgram-iDictStruct[]
2755 waProgram-iTableTypes[].
2756 endif.
2757endform.
2758
2759
2760
2761
2762form findAllProgramsForAuthor using iLocProgram like iPrograms[]
2763 rangeProgram like soProgramName[]
2764 rangeAuthor like soAuthor[]
2765 value(custNameRange)
2766 value(alsoModifiedByauthor)
2767 value(customerProgsOnly)
2768 value(soLocPackage) like soPack[].
2769
2770data: altCustomerNameRange type string.
2771field-symbols: <waProgram> type tProgram.
2772data: genFlag type genFlag.
2773
2774
2775 concatenate custNameRange '%' into altCustomerNameRange.
2776
2777
2778 if not alsoModifiedByAuthor is initial.
2779
2780
2781 if customerProgsOnly is initial.
2782
2783 select a~progname
2784 a~subc
2785 appending corresponding fields of table ilocProgram
2786 from reposrc as a
2787 inner join tadir as b
2788 on a~progname = b~obj_name
2789 where a~progname in rangeProgram
2790 and a~cnam in rangeAuthor
2791 and ( a~subc = '1' or a~subc = 'M' or a~subc = 'S' )
2792 and b~pgmid = 'R3TR'
2793 and b~object = 'PROG'
2794 and b~devclass in soLocPackage.
2795
2796 else.
2797
2798 select progname
2799 subc
2800 appending corresponding fields of table iLocProgram
2801 from reposrc as a
2802 inner join tadir as b
2803 on a~progname = b~obj_name
2804 where a~progname in rangeProgram
2805 and ( a~progname like altCustomerNameRange
2806 or a~progname like 'Z%'
2807 or a~progname like 'Y%'
2808 or a~progname like 'SAPMZ%'
2809 or a~progname like 'SAPMY%')
2810 and a~cnam in rangeAuthor
2811 and ( a~subc = '1' or a~subc = 'M' or a~subc = 'S' )
2812 and b~pgmid = 'R3TR'
2813 and b~object = 'PROG'
2814 and b~devclass in soLocPackage.
2815 endif.
2816 else.
2817
2818
2819 if customerProgsOnly is initial.
2820
2821 select progname
2822 subc
2823 appending corresponding fields of table iLocProgram
2824 from reposrc as a
2825 inner join tadir as b
2826 on a~progname = b~obj_name
2827 where a~progname in rangeProgram
2828 and ( a~subc = '1' or a~subc = 'M' or a~subc = 'S' )
2829 and ( a~cnam in rangeAuthor or a~unam in rangeAuthor )
2830 and b~pgmid = 'R3TR'
2831 and b~object = 'PROG'
2832 and b~devclass in soLocPackage.
2833 else.
2834
2835 select a~progname
2836 a~subc
2837 appending corresponding fields of table iLocProgram
2838 from reposrc as a
2839 inner join tadir as b
2840 on a~progname = b~obj_name
2841 where a~progname in rangeProgram
2842 and ( a~progname like altCustomerNameRange
2843 or a~progname like 'Z%'
2844 or a~progname like 'Y%'
2845 or a~progname like 'SAPMZ%'
2846 or a~progname like 'SAPMY%')
2847 and ( a~subc = '1' or a~subc = 'M' or a~subc = 'S' )
2848 and ( a~cnam in rangeAuthor or a~unam in rangeAuthor )
2849 and b~pgmid = 'R3TR'
2850 and b~object = 'PROG'
2851 and b~devclass in soLocPackage.
2852 endif.
2853 endif.
2854endform.
2855
2856
2857
2858
2859form findAllXSLTForAuthor using ilocTransformations like iTransformations[]
2860 rangexslt like soxsltname[]
2861 rangeauthor like soauthor[]
2862 value(custnamerange)
2863 value(alsomodifiedbyauthor)
2864 value(customerprogsonly)
2865 value(solocpackage) like sopack[].
2866
2867data: altCustomerNameRange type string.
2868data: waTransformation like line of iTransformations.
2869field-symbols: <waxslt> type tTransformation.
2870data: genFlag type genflag.
2871
2872
2873 concatenate custNameRange '%' into altcustomernamerange.
2874
2875
2876 if not alsomodifiedbyauthor is initial.
2877
2878
2879 if customerprogsonly is initial.
2880
2881 select obj_name
2882 into waTransformation-xsltname
2883 from tadir
2884 where pgmid = 'R3TR'
2885 and object = 'XSLT'
2886 and author in rangeauthor
2887 and obj_name in rangexslt
2888 and devclass in solocpackage.
2889
2890 append waTransformation to iLocTransformations.
2891 endselect.
2892
2893 else.
2894
2895 select obj_name
2896 into waTransformation-xsltname
2897 from tadir
2898 where pgmid = 'R3TR'
2899 and object = 'XSLT'
2900 and author in rangeauthor
2901 and obj_name in rangexslt
2902 and devclass in solocpackage
2903 and ( obj_name like altcustomernamerange
2904 or obj_name like 'Z%'
2905 or obj_name like 'Y%').
2906
2907 append waTransformation to iLocTransformations.
2908 endselect.
2909 endif.
2910 else.
2911
2912 if customerprogsonly is initial.
2913
2914 select obj_name
2915 into waTransformation-xsltname
2916 from tadir
2917 where pgmid = 'R3TR'
2918 and object = 'XSLT'
2919 and author in rangeauthor
2920 and obj_name in rangexslt
2921 and devclass in solocpackage.
2922
2923 append waTransformation to iLocTransformations.
2924 endselect.
2925 else.
2926
2927 select obj_name
2928 into waTransformation-xsltname
2929 from tadir
2930 where pgmid = 'R3TR'
2931 and object = 'XSLT'
2932 and author in rangeauthor
2933 and obj_name in rangexslt
2934 and devclass in solocpackage
2935 and ( obj_name like altcustomernamerange
2936 or obj_name like 'Z%'
2937 or obj_name like 'Y%').
2938
2939 append waTransformation to iLocTransformations.
2940 endselect.
2941 endif.
2942 endif.
2943endform.
2944
2945
2946
2947
2948form findXsltByWildcard using iLocTransformations like iTransformations[]
2949 value(rangexslt) like soxsltname[]
2950 value(rangeauthor) like soauthor[]
2951 value(custnamerange)
2952 value(customerprogsonly)
2953 value(solocpackage) like sopack[].
2954
2955data: altcustomernamerange type string.
2956data: waTransformation like line of ilocTransformations.
2957field-symbols: <waTransformation> type tTransformation.
2958data: genflag type genflag.
2959
2960 if customerprogsonly is initial.
2961
2962 if custnamerange <> '^'.
2963 concatenate custnamerange '%' into altcustomernamerange.
2964
2965 select obj_name
2966 into waTransformation-xsltname
2967 from tadir
2968 where pgmid = 'R3TR'
2969 and object = 'XSLT'
2970 and obj_name in rangexslt
2971 and obj_name like altcustomernamerange
2972 and author in rangeauthor.
2973
2974 append waTransformation to iLocTransformations.
2975 endselect.
2976 else.
2977 select obj_name
2978 into waTransformation-xsltname
2979 from tadir
2980 where pgmid = 'R3TR'
2981 and object = 'XSLT'
2982 and obj_name in rangexslt
2983 and author in rangeauthor.
2984
2985 append waTransformation to iLocTransformations.
2986 endselect.
2987 endif.
2988 else.
2989
2990 if custnamerange <> '^'.
2991 concatenate custnamerange '%' into altcustomernamerange.
2992
2993 select obj_name
2994 into waTransformation-xsltname
2995 from tadir
2996 where pgmid = 'R3TR'
2997 and object = 'XSLT'
2998 and obj_name in rangexslt
2999 and obj_name like altcustomernamerange
3000 and ( obj_name like 'Z%' or
3001 obj_name like 'Y%' ).
3002
3003 append waTransformation to iLocTransformations.
3004 endselect.
3005 else.
3006 select obj_name
3007 into waTransformation-xsltname
3008 from tadir
3009 where pgmid = 'R3TR'
3010 and object = 'XSLT'
3011 and obj_name in rangexslt
3012 and ( obj_name like 'Z%' or
3013 obj_name like 'Y%' ).
3014
3015 append waTransformation to iLocTransformations.
3016 endselect.
3017 endif.
3018 endif.
3019endform.
3020
3021
3022
3023
3024form checkXsltDoesExist using ilocTransformations like iTransformations[]
3025 rangexslt like soxsltname[].
3026
3027data: waTransformation type tTransformation.
3028
3029
3030 select single obj_name
3031 into waTransformation-xsltname
3032 from tadir
3033 where pgmid = 'R3TR'
3034 and object = 'XSLT'
3035 and obj_name in rangexslt.
3036
3037 if sy-subrc = 0.
3038 append waTransformation to iLocTransformations.
3039 endif.
3040endform.
3041
3042
3043
3044
3045form checkProgramDoesExist using iLocProgram like iPrograms[]
3046 rangeProgram like soProgramName[].
3047
3048
3049 select progname
3050 subc
3051 into corresponding fields of table iLocProgram
3052 from reposrc
3053 where progname in rangeProgram
3054 and ( subc = '1' or
3055 subc = 'I' or
3056 subc = 'M' or
3057 subc = 'S' ).
3058endform.
3059
3060
3061
3062
3063form checkAndAddTableType using waDictionary-tableName
3064 iLocTableTypes like iTableTypes[].
3065
3066 select *
3067 into corresponding fields of table iLocTableTypes
3068 from dd40l as a
3069 inner join dd40t as t
3070 on a~typename = t~typename
3071 where a~typename = waDictionary-tableName
3072 and t~ddlanguage eq sy-langu
3073 and a~as4local = 'A'.
3074endform.
3075
3076
3077
3078
3079form findProgramsByWildcard using iLocProgram like iPrograms[]
3080 value(rangeProgram) like soProgramName[]
3081 value(rangeAuthor) like soAuthor[]
3082 value(custNameRange)
3083 value(customerProgsOnly)
3084 value(soLocPackage) like soPack[].
3085
3086data: altCustomerNameRange type string.
3087field-symbols: <waProgram> type tProgram.
3088data: genFlag type genFlag.
3089
3090 if customerProgsOnly is initial.
3091
3092 if custNameRange <> '^'.
3093 concatenate custNameRange '%' into altCustomerNameRange.
3094
3095 select progname
3096 subc
3097 from reposrc
3098 appending corresponding fields of table iLocProgram
3099 where progname in rangeProgram
3100 and progname like altCustomerNameRange
3101 and ( subc = '1' or subc = 'M' or subc = 'S' )
3102 and ( cnam in rangeAuthor or unam in rangeAuthor ).
3103 else.
3104 select progname
3105 subc
3106 from reposrc
3107 appending corresponding fields of table iLocProgram
3108 where progname in rangeProgram
3109 and ( subc = '1' or subc = 'M' or subc = 'S' )
3110 and ( cnam in rangeAuthor or unam in rangeAuthor ).
3111 endif.
3112 else.
3113
3114 if custNameRange <> '^'.
3115 concatenate custNameRange '%' into altCustomerNameRange.
3116
3117 select progname
3118 subc
3119 from reposrc
3120 appending corresponding fields of table iLocProgram
3121 where progname in rangeProgram
3122 and ( progname like altCustomerNameRange
3123 or progname like 'Z%'
3124 or progname like 'Y%'
3125 or progname like 'SAPMZ%'
3126 or progname like 'SAPMY%')
3127 and ( subc = '1' or subc = 'M' or subc = 'S' )
3128 and ( cnam in rangeAuthor or unam in rangeAuthor ).
3129 else.
3130 select progname
3131 subc
3132 from reposrc
3133 appending corresponding fields of table iLocProgram
3134 where progname in rangeProgram
3135 and ( progname like 'Z%'
3136 or progname like 'Y%'
3137 or progname like 'SAPMZ%'
3138 or progname like 'SAPMY%')
3139 and ( subc = '1' or subc = 'M' or subc = 'S' )
3140 and ( cnam in rangeAuthor or unam in rangeAuthor ).
3141 endif.
3142 endif.
3143endform.
3144
3145
3146
3147
3148form retrieveProgramTexts using iLocSelectionTexts like dumiTextTab[]
3149 iLocTextElements like dumiTextTab[]
3150 value(programName).
3151
3152data: iTextTable type standard table of tTextTable with header line.
3153data: waTexts type tTextTable.
3154data: castProgramName(50).
3155
3156 move programName to castProgramName.
3157
3158 read textpool castProgramName into iTextTable language pMLang.
3159 delete iTextTable where key = 'R'.
3160
3161
3162 loop at iTextTable where id = 'S'.
3163 move iTextTable-key to waTexts-key.
3164 move iTextTable-entry to waTexts-entry.
3165 append waTexts to iLocSelectiontexts.
3166 clear waTexts.
3167 endloop.
3168
3169
3170 delete iTextTable where key = 'S'.
3171 loop at iTextTable where id = 'I'.
3172 move iTextTable-key to waTexts-key.
3173 move iTextTable-entry to waTexts-entry.
3174 append waTexts to iLocTextElements.
3175 endloop.
3176endform.
3177
3178
3179
3180
3181form retrieveGUITitles using iLocGUITitle like dumIGUITitle[]
3182 value(programName).
3183
3184 select obj_code
3185 text
3186 from d347t
3187 appending corresponding fields of table iLocGUItitle
3188 where progname = programName.
3189endform.
3190
3191
3192
3193
3194form findMainMessageClass using value(programName)
3195 messageClass.
3196
3197 select single msgid
3198 from trdire into messageClass
3199 where report = programName.
3200endform.
3201
3202
3203
3204
3205form retrieveClasses using iLocClasses like iClasses[]
3206 iLocFunctions like iFunctions[]
3207 rangeClass like soClassName[]
3208 rangeAuthor like soAuthor[]
3209 value(custNameRange)
3210 value(alsoModifiedByauthor)
3211 value(customerProgsOnly)
3212 value(getMessages)
3213 value(getTextElements)
3214 value(getCustDictStructures)
3215 value(getFunctions)
3216 value(getIncludes)
3217 value(getTransformations)
3218 value(recursiveFuncSearch)
3219 value(recursiveIncludeSearch)
3220 value(recursiveClassSearch)
3221 value(language)
3222 value(soLocPackage) like soPack[].
3223
3224data: waRangeClass like line of rangeClass.
3225data: waClass like line of iLocCLasses[].
3226
3227 if rangeClass[] is initial.
3228
3229 perform findAllClassesForAuthor using iLocClasses[]
3230 rangeClass[]
3231 rangeAuthor[]
3232 custNameRange
3233 alsoModifiedByAuthor
3234 customerProgsOnly
3235 language.
3236 else.
3237 read table rangeClass index 1 into waRangeClass.
3238 if waRangeClass-low cs ASTERIX.
3239 perform findClassesByWildcard using iLocClasses[]
3240 rangeClass[]
3241 rangeAuthor[]
3242 custNameRange
3243 customerProgsOnly
3244 language.
3245 else.
3246 perform checkClassDoesExist using iLocClasses[]
3247 rangeClass[].
3248 endif.
3249 endif.
3250
3251
3252 if not soLocPackage[] is initial.
3253 loop at iLocClasses into waClass.
3254 select single obj_name
3255 from tadir
3256 into waClass-clsName
3257 where pgmid = 'R3TR'
3258 and object = 'CLAS'
3259 and obj_name = waClass-clsName
3260 and devclass in soLocPackage[].
3261 if sy-subrc <> 0.
3262 delete iLocClasses.
3263 endif.
3264 endloop.
3265 endif.
3266
3267
3268 if not iLocClasses[] is initial.
3269 perform scanForAdditionalClassStuff using iLocClasses[]
3270 iLocFunctions[]
3271 getTextElements
3272 getMessages
3273 getCustDictStructures
3274 getFunctions
3275 getIncludes
3276 getTransformations
3277 customerProgsOnly
3278 custNameRange
3279 recursiveIncludeSearch
3280 recursiveFuncSearch
3281 recursiveClassSearch
3282 soLocPackage[].
3283 endif.
3284endform.
3285
3286
3287
3288
3289form findAllClassesForAuthor using iLocClass like iClasses[]
3290 rangeClass like soClassName[]
3291 rangeAuthor like soAuthor[]
3292 value(custNameRange)
3293 value(alsoModifiedByauthor)
3294 value(customerClassesOnly)
3295 value(language).
3296
3297data: altCustomerNameRange type string.
3298
3299
3300 concatenate custNameRange '%' into altCustomerNameRange.
3301
3302
3303 if not alsoModifiedByAuthor is initial.
3304
3305 if customerClassesOnly is initial.
3306
3307 select clsname descript msg_id
3308 from vseoclass
3309 appending corresponding fields of table ilocClass
3310 where clsname in rangeClass
3311 and langu = language
3312 and ( author in rangeAuthor or changedby in rangeAuthor )
3313 and version = '1'
3314 and ( state = '0' or state = '1' ).
3315
3316 if sy-subrc <> 0.
3317 select clsname descript msg_id
3318 from vseoclass
3319 appending corresponding fields of table ilocClass
3320 where clsname in rangeClass
3321 and langu = language
3322 and ( author in rangeAuthor or changedby in rangeAuthor )
3323 and version = '0'
3324 and ( state = '0' or state = '1' ).
3325 endif.
3326 else.
3327
3328 select clsname descript msg_id
3329 from vseoclass
3330 appending corresponding fields of table ilocClass
3331 where clsname in rangeClass
3332 and ( clsname like altCustomerNameRange
3333 or clsname like 'Z%'
3334 or clsname like 'Y%')
3335 and langu = language
3336 and ( author in rangeAuthor or changedby in rangeAuthor )
3337 and version = '1'
3338 and ( state = '0' or state = '1' ).
3339
3340 if sy-subrc <> 0.
3341 select clsname descript msg_id
3342 from vseoclass
3343 appending corresponding fields of table ilocClass
3344 where clsname in rangeClass
3345 and ( clsname like altCustomerNameRange
3346 or clsname like 'Z%'
3347 or clsname like 'Y%')
3348 and langu = language
3349 and ( author in rangeAuthor or changedby in rangeAuthor )
3350 and version = '0'
3351 and ( state = '0' or state = '1' ).
3352 endif.
3353 endif.
3354 else.
3355
3356 if customerClassesOnly is initial.
3357
3358 select clsname descript msg_id
3359 from vseoclass
3360 appending corresponding fields of table ilocClass
3361 where clsname in rangeClass
3362 and langu = language
3363 and author in rangeAuthor
3364 and version = '1'
3365 and ( state = '0' or state = '1' ).
3366
3367 if sy-subrc <> 0.
3368 select clsname descript msg_id
3369 from vseoclass
3370 appending corresponding fields of table ilocClass
3371 where clsname in rangeClass
3372 and langu = language
3373 and author in rangeAuthor
3374 and version = '0'
3375 and ( state = '0' or state = '1' ).
3376 endif.
3377 else.
3378
3379 select clsname descript msg_id
3380 from vseoclass
3381 appending corresponding fields of table ilocClass
3382 where clsname in rangeClass
3383 and ( clsname like altCustomerNameRange
3384 or clsname like 'Z%'
3385 or clsname like 'Y%')
3386 and langu = language
3387 and author in rangeAuthor
3388 and version = '1'
3389 and ( state = '0' or state = '1' ).
3390
3391 if sy-subrc <> 0.
3392 select clsname descript msg_id
3393 from vseoclass
3394 appending corresponding fields of table ilocClass
3395 where clsname in rangeClass
3396 and ( clsname like altCustomerNameRange
3397 or clsname like 'Z%'
3398 or clsname like 'Y%')
3399 and langu = language
3400 and author in rangeAuthor
3401 and version = '0'
3402 and ( state = '0' or state = '1' ).
3403 endif.
3404 endif.
3405 endif.
3406endform.
3407
3408
3409
3410
3411form findClassesByWildcard using iLocClass like iClasses[]
3412 rangeClass like soClassName[]
3413 value(rangeAuthor) like soAuthor[]
3414 value(custNameRange)
3415 value(customerClassesOnly)
3416 value(language).
3417
3418data: altCustomerNameRange type string.
3419
3420 if customerClassesOnly is initial.
3421
3422 if custNameRange <> '^'.
3423
3424 concatenate custNameRange '%' into altCustomerNameRange.
3425
3426 select clsname descript msg_id
3427 from vseoclass
3428 appending corresponding fields of table ilocClass
3429 where clsname in rangeClass
3430 and clsname like custNameRange
3431 and langu = language
3432 and ( author in rangeAuthor or changedby in rangeAuthor )
3433 and version = '1'
3434 and ( state = '0' or state = '1' ).
3435 if sy-subrc <> 0.
3436 select clsname descript msg_id
3437 from vseoclass
3438 appending corresponding fields of table ilocClass
3439 where clsname in rangeClass
3440 and clsname like custNameRange
3441 and langu = language
3442 and ( author in rangeAuthor or changedby in rangeAuthor )
3443 and version = '0'
3444 and ( state = '0' or state = '1' ).
3445 endif.
3446 else.
3447
3448 select clsname descript msg_id
3449 from vseoclass
3450 appending corresponding fields of table ilocClass
3451 where clsname in rangeClass
3452 and langu = language
3453 and ( author in rangeAuthor or changedby in rangeAuthor )
3454 and version = '1'
3455 and ( state = '0' or state = '1' ).
3456 if sy-subrc <> 0.
3457 select clsname descript msg_id
3458 from vseoclass
3459 appending corresponding fields of table ilocClass
3460 where clsname in rangeClass
3461 and langu = language
3462 and ( author in rangeAuthor or changedby in rangeAuthor )
3463 and version = '0'
3464 and ( state = '0' or state = '1' ).
3465 endif.
3466 endif.
3467 else.
3468
3469 if custNameRange <> '^'.
3470
3471 concatenate custNameRange '%' into altCustomerNameRange.
3472
3473 select clsname descript msg_id
3474 from vseoclass
3475 appending corresponding fields of table ilocClass
3476 where clsname in rangeClass
3477 and clsname like custNameRange
3478 and langu = language
3479 and ( clsname like 'ZC%' or clsname like 'YC%' )
3480 and ( author in rangeAuthor or changedby in rangeAuthor )
3481 and version = '1'
3482 and ( state = '0' or state = '1' ).
3483 if sy-subrc <> 0.
3484 select clsname descript msg_id
3485 from vseoclass
3486 appending corresponding fields of table ilocClass
3487 where clsname in rangeClass
3488 and langu = language
3489 and ( clsname like 'ZC%' or clsname like 'YC%' )
3490 and ( author in rangeAuthor or changedby in rangeAuthor )
3491 and version = '0'
3492 and ( state = '0' or state = '1' ).
3493 endif.
3494 else.
3495
3496 select clsname descript msg_id
3497 from vseoclass
3498 appending corresponding fields of table ilocClass
3499 where clsname in rangeClass
3500 and ( clsname like 'ZC%' or clsname like 'YC%' )
3501 and ( author in rangeAuthor or changedby in rangeAuthor )
3502 and version = '1'
3503 and ( state = '0' or state = '1' ).
3504 if sy-subrc <> 0.
3505 select clsname descript msg_id
3506 from vseoclass
3507 appending corresponding fields of table ilocClass
3508 where clsname in rangeClass
3509 and ( clsname like 'ZC%' or clsname like 'YC%' )
3510 and ( author in rangeAuthor or changedby in rangeAuthor )
3511 and version = '0'
3512 and ( state = '0' or state = '1' ).
3513 endif.
3514 endif.
3515 endif.
3516endform.
3517
3518
3519
3520
3521form checkClassDoesExist using iLocClass like iClasses[]
3522 rangeClass like soClassName[].
3523
3524data: waClass type tClass.
3525
3526 select single clsname descript msg_id
3527 from vseoclass
3528 into corresponding fields of waClass
3529 where clsname in rangeClass
3530 and version = '1'
3531 and ( state = '0' or state = '1' ).
3532
3533 if sy-subrc <> 0.
3534 select single clsname descript msg_id
3535 from vseoclass
3536 into corresponding fields of waClass
3537 where clsname in rangeClass
3538 and version = '0'
3539 and ( state = '0' or state = '1' ).
3540 endif.
3541
3542 if not waClass-clsname is initial.
3543 append waClass to iLocClass.
3544 endif.
3545endform.
3546
3547
3548
3549
3550form scanForAdditionalClassStuff using iLocClasses like iClasses[]
3551 iLocFunctions like iFunctions[]
3552 value(getTextElements)
3553 value(getMessages)
3554 value(getCustDictStructures)
3555 value(getFunctions)
3556 value(getIncludes)
3557 value(getTransformations)
3558 value(customerOnly)
3559 value(customerNameRange)
3560 value(recursiveIncludeSearch)
3561 value(recursiveFuncSearch)
3562 value(recursiveClassSearch)
3563 value(soLocPackage) like soPack[].
3564
3565data: waClass type tClass.
3566data: waMethod type tMethod.
3567data: myTabix type syTabix.
3568data: scanningForClasses type abap_bool value FALSE.
3569data: classNewLines type i value 0.
3570data: classCurrentLines type i value 0.
3571
3572 loop at iLocClasses into waClass where scanned is initial.
3573
3574 myTabix = sy-tabix.
3575 perform findClassDetails using waClass-clsName
3576 waClass
3577 iLocFunctions[]
3578 getTextElements
3579 getMessages
3580 getFunctions
3581 getCustDictStructures
3582 getTransformations
3583 customerOnly
3584 customerNameRange.
3585
3586
3587 waClass-scanned = 'X'.
3588 modify iLocClasses from waClass index myTabix.
3589 endloop.
3590
3591
3592 if not recursiveClassSearch is initial.
3593 classCurrentLines = lines( iLocClasses ).
3594 loop at iLocClasses into waClass.
3595
3596 if ( waClass-clsName ns 'ZCX_' or waClass-clsName ns 'CX_' ).
3597
3598 perform scanForClasses using waClass-privateClassKey
3599 waClass-clsname
3600 customerOnly
3601 customerNameRange
3602 iLocClasses[]
3603 soLocPackage[].
3604
3605 perform scanForClasses using waClass-publicClassKey
3606 waClass-clsname
3607 customerOnly
3608 customerNameRange
3609 iLocClasses[]
3610 soLocPackage[].
3611
3612 perform scanForClasses using waClass-protectedClassKey
3613 waClass-clsname
3614 customerOnly
3615 customerNameRange
3616 iLocClasses[]
3617 soLocPackage[].
3618
3619 loop at waClass-iMethods into waMethod.
3620
3621 perform scanForClasses using waMethod-methodKey
3622 waClass-clsname
3623 customerOnly
3624 customerNameRange
3625 iLocClasses[]
3626 soLocPackage[].
3627 endloop.
3628 endif.
3629 endloop.
3630
3631
3632 classNewLines = lines( iLocClasses ).
3633 if classNewLines > classCurrentLines.
3634 perform scanForAdditionalClassStuff using iLocClasses[]
3635 iLocFunctions[]
3636 getTextElements
3637 getMessages
3638 getCustDictStructures
3639 getFunctions
3640 getIncludes
3641 getTransformations
3642 customerOnly
3643 customerNameRange
3644 recursiveIncludeSearch
3645 recursiveFuncSearch
3646 recursiveClassSearch
3647 soLocPackage[].
3648 endif.
3649 endif.
3650endform.
3651
3652
3653
3654
3655form findClassDetails using value(className)
3656 waClass type tClass
3657 iLocFunctions like iFunctions[]
3658 value(getTextElements)
3659 value(getMessages)
3660 value(getFunctions)
3661 value(getCustDictStructures)
3662 value(getTransformations)
3663 value(customerOnly)
3664 value(customerNameRange).
3665
3666data: iEmptySelectionTexts type standard table of tTextTable.
3667data: myTabix type syTabix.
3668data: waMethod type tMethod.
3669data: rnBlankAuthor like soAuthor[].
3670data: rnBlankPackage like soPack[].
3671data: waInterface type tInterface.
3672
3673
3674 perform buildClassKeys using waClass.
3675
3676 if waClass-descript is initial.
3677 perform findClassDescription using className
3678 waClass-descript.
3679 endif.
3680
3681
3682 select single exposure msg_id state clsfinal r3release
3683 from vseoclass
3684 into (waClass-exposure, waClass-msg_id, waClass-state,
3685 waClass-clsfinal, waClass-r3release)
3686 where clsName = waClass-clsName.
3687
3688
3689 if ( waClass-clsName cs 'ZCX_' or waClass-clsName cs 'CX_' ).
3690
3691 perform findExceptionTexts using waClass-publicClassKey
3692 waClass-iConcepts[].
3693 waClass-scanned = 'X'.
3694 else.
3695 if not getTextElements is initial.
3696
3697 perform retrieveProgramTexts using iEmptySelectionTexts[]
3698 waClass-iTextElements[]
3699 waClass-textElementKey.
3700 endif.
3701
3702
3703 if not getCustDictStructures is initial.
3704 perform scanForTables using waClass-privateClassKey
3705 customerOnly
3706 customerNameRange
3707 waClass-iDictStruct[].
3708
3709 perform scanForTables using waClass-publicClassKey
3710 customerOnly
3711 customerNameRange
3712 waClass-iDictStruct[].
3713
3714 perform scanForTables using waClass-protectedClassKey
3715 customerOnly
3716 customerNameRange
3717 waClass-iDictStruct[].
3718
3719 perform scanForTables using waClass-typesClassKey
3720 customerOnly
3721 customerNameRange
3722 waClass-iDictStruct[].
3723
3724 perform scanForLikeOrType using waClass-privateClassKey
3725 customerOnly
3726 customerNameRange
3727 waClass-iDictStruct[]
3728 waClass-iTableTypes[].
3729
3730 perform scanForLikeOrType using waClass-publicClassKey
3731 customerOnly
3732 customerNameRange
3733 waClass-iDictStruct[]
3734 waClass-iTableTypes[].
3735
3736 perform scanForLikeOrType using waClass-protectedClassKey
3737 customerOnly
3738 customerNameRange
3739 waClass-iDictStruct[]
3740 waClass-iTableTypes[].
3741
3742 perform scanForLikeOrType using waClass-typesClassKey
3743 customerOnly
3744 customerNameRange
3745 waClass-iDictStruct[]
3746 waClass-iTableTypes[].
3747 endif.
3748
3749
3750 perform findClassInterfaces using className
3751 waClass-iInterfaces[].
3752
3753
3754 perform findInterfaceMethods using className
3755 waClass-iInterfaces[]
3756 waClass-iMethods[].
3757
3758
3759
3760 perform findClassMethods using className
3761 waClass-iMethods[].
3762
3763 loop at waClass-iMethods[] into waMethod.
3764 myTabix = sy-tabix.
3765
3766 if not getMessages is initial.
3767 perform scanForMessages using waMethod-methodKey
3768 waClass-msg_id
3769 waClass-iMessages[].
3770 endif.
3771
3772 if not getCustDictStructures is initial.
3773
3774 perform scanForTables using waMethod-methodKey
3775 customerOnly
3776 customerNameRange
3777 waClass-iDictStruct[].
3778
3779 perform scanForLikeOrType using waMethod-methodKey
3780 customerOnly
3781 customerNameRange
3782 waClass-iDictStruct[]
3783 waClass-iTableTypes[].
3784 endif.
3785
3786 if not getfunctions is initial.
3787 perform scanForFunctions using waMethod-methodKey
3788 waClass-clsName
3789 space
3790 space
3791 customerOnly
3792 customerNameRange
3793 iLocFunctions[].
3794 endif.
3795
3796
3797 if not getTransformations is initial.
3798 perform scanForTransformations using waMethod-methodKey
3799 customerOnly
3800 customerNameRange
3801 waClass-iTransformations[].
3802 endif.
3803
3804 modify waClass-iMethods from waMethod index myTabix.
3805 endloop.
3806
3807
3808
3809 if ( not waClass-msg_id is initial and waClass-iMessages[] is initial ).
3810 perform retrieveMessageClass using waClass-iMessages[]
3811 rnBlankAuthor[]
3812 waClass-msg_id
3813 pMLang
3814 ''
3815 rnBlankPackage[].
3816 endif.
3817 endif.
3818endform.
3819
3820
3821
3822
3823form findInterfaceMethods using value(className)
3824 iLocInterfaces like dumiInterfaces[]
3825 iLocMethods like dumiMethods[].
3826
3827types: begin of tIntMethod,
3828 interfaceName like vseomethod-clsname,
3829 cmpName like vseomethod-cmpname,
3830 exposure like vseomethod-exposure,
3831 end of tIntMethod.
3832data: waMethod type tMethod.
3833data: waInterface like line of iLocInterfaces.
3834data: iIntMethod type standard table of tIntMethod with header line.
3835
3836 loop at iLocInterfaces into waInterface.
3837 select a~clsname as interfaceName
3838 a~cmpName
3839 b~exposure
3840 appending table iIntMethod
3841 from seocompo as a
3842 inner join seocompodf as b
3843 on a~clsname = b~clsname
3844 and a~cmpname = b~cmpname
3845 where a~clsname = waInterface-interfaceName.
3846 endloop.
3847
3848 loop at iIntMethod.
3849 concatenate iIntMethod-interfaceName '~' iIntMethod-cmpname into waMethod-cmpname.
3850 waMethod-exposure = iIntMethod-exposure.
3851
3852 select single descript
3853 from seocompotx
3854 into waMethod-descript
3855 where clsname = iIntMethod-interfaceName
3856 and cmpname = iIntMethod-cmpname
3857 and langu = pMLang.
3858
3859 perform findMethodKey using className
3860 waMethod-cmpName
3861 waMethod-methodKey.
3862
3863 if not waMethod-methodKey is initial.
3864 append waMethod to iLocMethods.
3865 endif.
3866
3867 clear waMethod.
3868 endloop.
3869endform.
3870
3871
3872
3873
3874form findClassInterfaces using value(className)
3875 iLocInterfaces like dumiInterfaces[].
3876
3877data: isInheritance type abap_bool value abap_true.
3878data: iInterfaces type standard table of vseoimplem with header line.
3879data: waLocInterface like line of iLocInterfaces.
3880
3881 select * from vseoimplem
3882 into table iInterfaces
3883 where clsname = className.
3884
3885 while isInheritance = ABAP_TRUE.
3886 perform findClassParent using className
3887 className.
3888
3889 if className is initial.
3890 isInheritance = ABAP_FALSE.
3891 else.
3892 select * from vseoimplem
3893 appending table iInterfaces
3894 where clsname = className.
3895 endif.
3896 endwhile.
3897
3898 if not iInterfaces[] is initial.
3899 sort iInterfaces ascending by refclsname.
3900 delete adjacent duplicates from iInterfaces comparing refclsname.
3901
3902 loop at iInterfaces.
3903 waLocInterface-interfaceName = iInterfaces-refclsname.
3904 append wALocInterface to iLocInterfaces.
3905 endloop.
3906 endif.
3907endform.
3908
3909
3910
3911
3912form findClassParent using value(className)
3913 parentClassName.
3914
3915data: waInheritance type seor_inheritance_r.
3916data: clskey type seoclskey.
3917
3918 clskey-clsname = className.
3919
3920 call function 'SEO_INHERITANC_READ'
3921 exporting
3922 clskey = clskey
3923 version = seoc_version_active
3924 importing
3925 inheritance = waInheritance
3926
3927 exceptions
3928 class_not_existing = 1.
3929
3930 parentClassName = waInheritance-refclsname.
3931endform.
3932
3933
3934
3935
3936form buildClassKeys using waClass type tClass.
3937
3938data: classNameLength type i.
3939data: loops type i.
3940
3941 classNameLength = strlen( waClass-clsName ).
3942
3943 cl_oo_classname_service=>get_pubsec_name( exporting clsname = waClass-clsName
3944 receiving result = waClass-publicClassKey ).
3945
3946 cl_oo_classname_service=>get_prisec_name( exporting clsname = waClass-clsName
3947 receiving result = waClass-privateClassKey ).
3948
3949 cl_oo_classname_service=>get_prosec_name( exporting clsname = waClass-clsName
3950 receiving result = waClass-protectedClassKey ).
3951
3952
3953
3954 loops = 30 - classNameLength.
3955 waClass-textElementKey = waClass-clsName.
3956 do loops times.
3957 concatenate waClass-textElementKey '=' into waClass-textElementKey.
3958 enddo.
3959
3960 concatenate waClass-textElementKey 'CP' into waClass-textElementKey.
3961
3962
3963 loops = 30 - classNameLength.
3964 waClass-typesClassKey = waClass-clsName.
3965 do loops times.
3966 concatenate waClass-typesClassKey '=' into waClass-typesClassKey.
3967 enddo.
3968
3969 concatenate waClass-typesClassKey 'CT' into waClass-typesClassKey.
3970endform.
3971
3972
3973
3974
3975form findClassDescription using value(className)
3976 titleText.
3977
3978 select single descript
3979 from vseoclass
3980 into titleText
3981 where clsname = className
3982 and langu = pMLang.
3983 if sy-subrc <> 0.
3984 select single descript
3985 from vseoclass
3986 into titleText
3987 where clsname = className.
3988 endif.
3989endform.
3990
3991
3992
3993
3994form findExceptionTexts using publicClassKey
3995 iConcepts like dumiConcepts[].
3996
3997data: castClassName type program.
3998data: iTempLines type standard table of string with header line.
3999data: iTokens type standard table of stokes with header line.
4000data: iKeywords type standard table of text20 with header line.
4001data: iStatements type standard table of sstmnt with header line.
4002data: waTokens type stokes.
4003data: waCurrentToken type stokes.
4004data: waConcept like line of iConcepts.
4005data: tokenLength type i.
4006data: myRow type i.
4007
4008 castClassName = publicClassKey.
4009 read report castClassName into iTempLines.
4010
4011 append 'CONSTANTS' to iKeywords.
4012 scan abap-source iTempLines tokens into iTokens statements into iStatements keywords from iKeywords.
4013
4014 delete iTokens where str = 'CONSTANTS'.
4015 delete iTokens where str = 'VALUE'.
4016 delete iTokens where str = 'TYPE'.
4017
4018 loop at iTokens into waTokens where str = 'SOTR_CONC'.
4019
4020 myRow = sy-tabix - 1.
4021 read table iTokens index myRow into waCurrentToken.
4022 waConcept-constName = waCurrentToken-str.
4023
4024
4025 myRow = myRow + 2.
4026 read table iTokens index myRow into waCurrentToken.
4027 tokenLength = strLen( waCurrentToken-str ).
4028 if tokenLength = 34.
4029
4030 replace all occurrences of '''' in waCurrentToken-str with ' ' .
4031 waConcept-concept = waCurrentToken-str.
4032 append waConcept to iConcepts.
4033 endif.
4034 endloop.
4035endform.
4036
4037
4038
4039
4040form findClassMethods using value(className)
4041 iLocMethods like dumiMethods[].
4042
4043data: iMethods type standard table of tMethod with header line.
4044data: iRedefinedMethods type standard table of seoredef with header line.
4045data: originalClassName type seoclsname.
4046data: waMethod like line of iMethods.
4047
4048 select cmpName descript exposure
4049 from vseomethod
4050 into corresponding fields of table iMethods
4051 where clsname = className
4052 and version = '1'
4053 and langu = pMLang
4054 and ( state = '0' or state = '1' ).
4055
4056 if sy-subrc <> 0.
4057 select cmpName descript exposure
4058 from vseomethod
4059 into corresponding fields of table iMethods
4060 where clsname = className
4061 and version = '0'
4062 and langu = pMLang
4063 and ( state = '0' or state = '1' ).
4064 endif.
4065
4066 select *
4067 from seoredef
4068 into table iRedefinedMethods
4069 where clsname = className
4070 and version = '1'.
4071
4072
4073 loop at iRedefinedMethods.
4074 perform findRedefinitionClass using iRedefinedMethods-refclsname
4075 iRedefinedMethods-mtdname
4076 originalClassName.
4077
4078 waMethod-cmpname = iRedefinedMethods-mtdname.
4079
4080 select single descript exposure
4081 from vseomethod
4082 into corresponding fields of waMethod
4083 where clsname = originalClassName
4084 and cmpname = iRedefinedMethods-mtdname
4085 and version = '1'
4086 and langu = pMLang
4087 and ( state = '0' or state = '1' ).
4088
4089 concatenate `Redefined: ` waMethod-descript into waMethod-descript.
4090 append waMethod to iMethods.
4091 endloop.
4092
4093
4094 loop at iMethods.
4095 perform findMethodKey using className
4096 iMethods-cmpName
4097 iMethods-methodKey.
4098 append iMethods to iLocMethods.
4099 endloop.
4100endform.
4101
4102
4103
4104
4105form findRedefinitionClass using value(redefinedClassName) type seoclsname
4106 value(methodName) type seocpdname
4107 originalClassName type seoclsname.
4108
4109data: waRedef type seoredef.
4110
4111 select single *
4112 from seoredef
4113 into waRedef
4114 where refclsName = redefinedClassName
4115 and mtdname = methodName.
4116
4117 if sy-subrc = 0.
4118
4119 originalClassName = waRedef-refclsName.
4120 perform findRedefinitionClassRecur using waRedef-refclsname
4121 waRedef-mtdname
4122 originalClassName.
4123 else.
4124
4125 originalClassName = waRedef-refclsName.
4126 endif.
4127endform.
4128
4129
4130
4131
4132form findRedefinitionClassRecur using value(redefinedClassName) type seoclsname
4133 value(methodName) type seocpdname
4134 originalClassName type seoclsname.
4135
4136data: waRedef type seoredef.
4137
4138 select single *
4139 from seoredef
4140 into waRedef
4141 where clsName = redefinedClassName
4142 and mtdname = methodName.
4143
4144 if sy-subrc = 0.
4145
4146 originalClassName = waRedef-refclsName.
4147 perform findRedefinitionClassRecur using waRedef-refclsname
4148 waRedef-mtdname
4149 originalClassName.
4150 endif.
4151endform.
4152
4153
4154
4155
4156form findMethodKey using value(className)
4157 value(methodName)
4158 methodKey.
4159
4160data: methodID type seocpdkey.
4161data: locMethodKey type program.
4162
4163 methodID-clsname = className.
4164 methodID-cpdName = methodName.
4165
4166 cl_oo_classname_service=>get_method_include( exporting mtdkey = methodID
4167 receiving result = locMethodKey
4168 exceptions class_not_existing = 1
4169 method_not_existing = 2 ).
4170
4171 methodKey = locMethodKey.
4172endform.
4173
4174
4175
4176
4177form scanForMessages using value(programName)
4178 value(mainMessageClass)
4179 iLocMessages like iMessages[].
4180
4181data: iIncludeLines type standard table of string with header line.
4182data: iTokens type standard table of stokes with header line.
4183data: iStatements type standard table of sstmnt with header line.
4184data: iKeywords type standard table of text20 with header line.
4185data: waMessage type tMessage.
4186data: waMessageComparison type tMessage.
4187data: watokens type stokes.
4188data: nextLine type i.
4189data: stringLength type i value 0.
4190data: workingOnMessage type abap_bool value FALSE.
4191data: castProgramName type program.
4192
4193
4194 castProgramName = programName.
4195 read report castProgramName into iIncludeLines.
4196
4197 append MESSAGE to iKeywords.
4198 scan abap-source iIncludeLines tokens into iTokens with includes statements into iStatements keywords from iKeywords.
4199
4200 clear iIncludeLines[].
4201
4202 loop at iTokens.
4203 if iTokens-str = MESSAGE.
4204 workingOnMessage = TRUE.
4205 continue.
4206 endif.
4207
4208 if workingOnMessage = TRUE.
4209 stringLength = strlen( iTokens-str ).
4210
4211
4212 if stringLength = 4 and iTokens-str+0(1) ca sy-abcde.
4213 waMessage-msgnr = iTokens-str+1(3).
4214 waMessage-arbgb = mainMessageClass.
4215 else.
4216 if iTokens-str cs '''' or iTokens-str cs '`'.
4217
4218 translate iTokens-str using ''' '.
4219 translate iTokens-str using '` '.
4220 condense iTokens-str.
4221 shift iTokens-str left deleting leading space.
4222 waMessage-text = iTokens-str.
4223 waMessage-arbgb = 'Hard coded'.
4224 else.
4225 if iTokens-str = 'ID'.
4226
4227 nextLine = sy-tabix + 1.
4228 read table iTokens index nextLine into waTokens.
4229 translate waTokens-str using ''' '.
4230 condense iTokens-str.
4231 shift waTokens-str left deleting leading space.
4232 if not waTokens-str = 'SY-MSGID'.
4233 waMessage-arbgb = waTokens-str.
4234
4235 nextLine = nextLine + 4.
4236 read table iTokens index nextLine into waTokens.
4237 translate waTokens-str using ''' '.
4238 condense waTokens-str.
4239 shift waTokens-str left deleting leading space.
4240 waMessage-msgnr = waTokens-str.
4241 else.
4242 workingOnMessage = FALSE.
4243 endif.
4244 else.
4245 if stringLength >= 5 and iTokens-str+4(1) = '('.
4246
4247 waMessage-msgnr = iTokens-str+1(3).
4248 shift iTokens-str left up to '('.
4249 replace '(' into iTokens-str with space.
4250 replace ')' into iTokens-str with space.
4251 condense iTokens-str.
4252 waMessage-arbgb = iTokens-str.
4253 endif.
4254 endif.
4255 endif.
4256 endif.
4257
4258
4259 if not waMessage-arbgb is initial and not waMessage-msgnr is initial and waMessage-text is initial.
4260 select single text
4261 from t100
4262 into waMessage-text
4263 where sprsl = pMLang
4264 and arbgb = waMessage-arbgb
4265 and msgnr = waMessage-msgnr.
4266 endif.
4267
4268
4269 if not waMessage is initial.
4270 if not waMessage-text is initial.
4271
4272 read table iLocMessages with key arbgb = waMessage-arbgb
4273 msgnr = waMessage-msgnr
4274 into waMessageComparison.
4275 if sy-subrc <> 0.
4276 append waMessage to iLocMessages.
4277 endif.
4278 endif.
4279 clear waMessage.
4280 workingOnMessage = FALSE.
4281 endif.
4282 endif.
4283 endloop.
4284endform.
4285
4286
4287
4288
4289form scanForTables using value(programName)
4290 value(customerOnly)
4291 value(customerNameRange)
4292 iLocDictionary like iDictionary[].
4293
4294data: iIncludeLines type standard table of string with header line.
4295data: iTokens type standard table of stokes with header line.
4296data: iStatements type standard table of sstmnt with header line.
4297data: iKeywords type standard table of text20 with header line.
4298data: waDictionary type tDictTable.
4299data: waDictionaryComparison type tDictTable.
4300data: castProgramName type program.
4301
4302
4303 castProgramName = programName.
4304 read report castProgramName into iIncludeLines.
4305
4306 append TABLES to iKeywords.
4307
4308 scan abap-source iIncludeLines tokens into iTokens with includes statements into iStatements keywords from iKeywords.
4309 clear iIncludeLines[].
4310
4311 sort iTokens ascending by str.
4312 delete iTokens where str = TABLES.
4313
4314 loop at iTokens.
4315 if not CustomerOnly is initial.
4316 try.
4317 case iTokens-str+0(1).
4318 when 'Y' or 'Z' or customerNameRange.
4319 when others.
4320 continue.
4321 endcase.
4322
4323
4324
4325 catch cx_sy_range_out_of_bounds into objRuntimeError.
4326 endtry.
4327 endif.
4328
4329 waDictionary-tablename = iTokens-str.
4330
4331 read table iLocDictionary into waDictionaryComparison with key tablename = waDictionary-tableName.
4332 if sy-subrc <> 0.
4333 perform findTableDescription using waDictionary-tablename
4334 waDictionary-tableTitle.
4335
4336 perform findTableDefinition using waDictionary-tableName
4337 waDictionary-iStructure[].
4338
4339 append waDictionary to iLocDictionary.
4340 endif.
4341 endloop.
4342endform.
4343
4344
4345
4346
4347form findProgramScreenFlow using waProgram type tProgram.
4348
4349data: iFlow type standard table of tScreenFlow with header line.
4350
4351 call function 'DYNPRO_PROCESSINGLOGIC'
4352 exporting
4353 rep_name = waProgram-progname
4354 tables
4355 scr_logic = iFlow.
4356
4357 sort iFlow ascending by screen.
4358 delete adjacent duplicates from iFlow comparing screen.
4359 if waProgram-subc <> 'M'.
4360 delete iFlow where screen >= '1000' and screen <= '1099'.
4361 endif.
4362
4363 loop at iFlow.
4364 append iFlow to waProgram-iScreenFlow.
4365 endloop.
4366endform.
4367
4368
4369
4370
4371form findMainFunctionInclude using value(programName)
4372 value(functionGroup)
4373 value(functionIncludeNo)
4374 functionIncludeName.
4375
4376data: namespace TYPE string,
4377 iResults type match_result_tab,
4378 waResult type match_result,
4379 startingPosition type i.
4380
4381 find all occurrences of '/' in functionGroup results iResults.
4382 if sy-subrc = 0.
4383 read table iResults index sy-tfill into waResult.
4384 startingPosition = waResult-offset + 1.
4385 namespace = functiongroup+0(startingPosition).
4386 functionGroup = functionGroup+startingPosition.
4387 endif.
4388
4389 concatenate namespace 'L' functionGroup 'U' functionIncludeNo into functionIncludeName.
4390endform.
4391
4392
4393
4394
4395form findFunctionTopInclude using value(programName)
4396 value(functionGroup)
4397 topIncludeName.
4398
4399data: namespace TYPE string,
4400 iResults type match_result_tab,
4401 waResult type match_result,
4402 startingPosition type i.
4403
4404 find all occurrences of '/' in functionGroup results iResults.
4405 if sy-subrc = 0.
4406 read table iResults index sy-tfill into waResult.
4407 startingPosition = waResult-offset + 1.
4408 namespace = functiongroup+0(startingPosition).
4409 functionGroup = functionGroup+startingPosition.
4410 endif.
4411
4412 concatenate namespace 'L' functionGroup 'TOP' into topIncludeName.
4413endform.
4414
4415
4416
4417
4418form findFunctionScreenFlow using waFunction type tFunction.
4419
4420data: iFlow type standard table of tScreenFlow with header line.
4421
4422 call function 'DYNPRO_PROCESSINGLOGIC'
4423 exporting
4424 REP_NAME = waFunction-progName
4425 tables
4426 SCR_LOGIC = iFlow.
4427
4428 sort iFlow ascending by screen.
4429 delete adjacent duplicates from iFlow comparing screen.
4430
4431 loop at iFlow.
4432 append iFlow to waFunction-iScreenFlow.
4433 endloop.
4434endform.
4435
4436
4437
4438
4439form scanForLikeOrType using value(programName)
4440 value(customerOnly)
4441 value(customerNameRange)
4442 iLocDictionary like iDictionary[]
4443 iLocTableTypes like iTableTypes[].
4444
4445data iLines type standard table of string with header line.
4446data: head type string.
4447data: tail type string.
4448data: junk type string.
4449data: lineType type string.
4450data: lineLength type i value 0.
4451data: endOfLine type abap_bool value TRUE.
4452data: waDictionary type tDictTable.
4453data: waDictionaryComparison type tDictTable.
4454data: waLine type string.
4455data: castProgramName type program.
4456
4457
4458
4459 castProgramName = programName.
4460 read report castProgramName into iLines.
4461
4462 loop at iLines into waLine.
4463
4464 lineLength = strLen( waLine ).
4465 if lineLength > 0.
4466 if waLine(1) = ASTERIX.
4467 continue.
4468 endif.
4469
4470 translate waLine to upper case.
4471
4472
4473 if endOfLine = TRUE.
4474 shift waLine up to LIKE.
4475 if sy-subrc = 0.
4476 lineType = LIKE.
4477 else.
4478 shift waLine up to TYPE.
4479 if sy-subrc = 0.
4480 find 'BEGIN OF' in waLine.
4481 if sy-subrc <> 0.
4482 find 'END OF' in waLine.
4483 if sy-subrc <> 0.
4484 find 'VALUE' in waLine.
4485 if sy-subrc <> 0.
4486 lineType = TYPE.
4487 endif.
4488 endif.
4489 endif.
4490 else.
4491 shift waLine up to INCLUDE.
4492 if sy-subrc = 0.
4493 split waLine at space into junk iLines.
4494 endif.
4495
4496 shift waLine up to STRUCTURE.
4497 if sy-subrc = 0.
4498 lineType = STRUCTURE.
4499 else.
4500 continue.
4501 endif.
4502 endif.
4503 endif.
4504 else.
4505 lineType = COMMA.
4506 endif.
4507
4508 case linetype.
4509 when LIKE or TYPE or STRUCTURE.
4510
4511 shift waLine up to space.
4512 shift waLine left deleting leading space.
4513 if waLine cs TABLE.
4514 split waLine at TABLE into head tail.
4515 split tail at 'OF' into head tail.
4516 waLine = tail.
4517 shift waLine left deleting leading space.
4518 replace all occurrences of 'WITH HEADER LINE' in waLine with ''.
4519 endif.
4520
4521
4522 if not CustomerOnly is initial.
4523 try.
4524 if waLine+0(1) = 'Y' or waLine+0(1) = 'Z' or waLine cs customerNameRange.
4525 else.
4526 lineType = ''.
4527 continue.
4528 endif.
4529 catch cx_sy_range_out_of_bounds into objRuntimeError.
4530 endtry.
4531 endif.
4532
4533 if waLine cs COMMA.
4534 split waLine at COMMA into head tail.
4535 if waLine cs DASH.
4536 split head at DASH into head tail.
4537 endif.
4538 if waLine cs OCCURS.
4539 split waLine at SPACE into head tail.
4540 endif.
4541 else.
4542 if waLine cs PERIOD.
4543 split waLine at PERIOD into head tail.
4544 if waLine cs DASH.
4545 split head at DASH into head tail.
4546 endif.
4547 if waLine cs OCCURS.
4548 split waLine at SPACE into head tail.
4549 endif.
4550 else.
4551 split waLine at SPACE into head tail.
4552 if waLine cs DASH.
4553 split head at DASH into head tail.
4554 endif.
4555 endif.
4556 endif.
4557
4558 if not head is initial.
4559 waDictionary-tableName = head.
4560
4561 read table iLocDictionary into waDictionaryComparison
4562 with key tablename = waDictionary-tableName.
4563 if sy-subrc <> 0.
4564 perform findTableDescription using waDictionary-tablename
4565 waDictionary-tableTitle.
4566
4567 perform findTableDefinition using waDictionary-tableName
4568 waDictionary-iStructure[].
4569
4570
4571 if waDictionary-iStructure[] is initial.
4572
4573 perform checkandAddTableType using waDictionary-tableName
4574 iLocTableTypes[].
4575 else.
4576
4577 append waDictionary to iLocDictionary.
4578 endif.
4579 endif.
4580 clear waDictionary.
4581 endif.
4582
4583 lineType = ''.
4584 endcase.
4585 endif.
4586 endloop.
4587endform.
4588
4589
4590
4591
4592form displayStatus using value(message)
4593 value(delay).
4594
4595 call function 'SAPGUI_PROGRESS_INDICATOR'
4596 exporting
4597 percentage = 0
4598 text = message
4599 exceptions
4600 others = 1.
4601
4602 if delay > 0.
4603 wait up to delay seconds.
4604 endif.
4605endform.
4606
4607
4608
4609
4610form removeLeadingZeros changing myValue.
4611
4612 call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
4613 exporting
4614 INPUT = myValue
4615 importing
4616 OUTPUT = myValue
4617 exceptions
4618 others = 1.
4619endform.
4620
4621
4622
4623
4624form determineFrontendOPSystem using separator
4625 operatingSystem.
4626
4627data: platformID type i value 0.
4628
4629 create object objFile.
4630
4631 call method objFile->get_platform receiving platform = platformID
4632 exceptions cntl_error = 1
4633 error_no_gui = 2
4634 not_supported_by_gui = 3.
4635 case platformID.
4636 when objFile->PLATFORM_WINDOWS95
4637 or objFile->PLATFORM_WINDOWS98
4638 or objFile->PLATFORM_NT351
4639 or objFile->PLATFORM_NT40
4640 or objFile->PLATFORM_NT50
4641 or objFile->PLATFORM_MAC
4642 or objFile->PLATFORM_OS2
4643 or 14.
4644 separator = '\'.
4645 operatingSystem = NON_UNIX.
4646 when others.
4647 separator = '/'.
4648 operatingSystem = UNIX.
4649 endcase.
4650endform.
4651
4652
4653
4654
4655form determineServerOPSystem using separator
4656 serverFileSystem
4657 serverOpSystem.
4658
4659
4660 select single fileSys
4661 from opSystem
4662 into serverFileSystem
4663 where opSys = sy-opsys.
4664
4665 find 'WINDOWS' in serverFilesystem ignoring case.
4666 if sy-subrc = 0.
4667 separator = '\'.
4668 serverOpSystem = NON_UNIX.
4669 serverFileSystem = 'Windows NT'.
4670 else.
4671 find 'DOS' in serverFilesystem ignoring case.
4672 if sy-subrc = 0.
4673 separator = '\'.
4674 serverOpSystem = NON_UNIX.
4675 else.
4676 separator = '/'.
4677 serverOpSystem = UNIX.
4678 endif.
4679 endif.
4680endform.
4681
4682
4683
4684
4685
4686form findExternalCommand using value(locServerFileSystem).
4687
4688data: castServerOpSys type syopsys.
4689
4690 castServerOpSys = locServerFileSystem.
4691
4692 call function 'SXPG_COMMAND_CHECK'
4693 exporting
4694 commandname = 'ZDTX_MKDIR'
4695 operatingsystem = castServerOpSys
4696 exceptions
4697 command_not_found = 1
4698 others = 0.
4699
4700 if sy-subrc <> 0.
4701 loop at screen.
4702 if screen-name = 'PLOGICAL'.
4703 screen-input = 0.
4704 modify screen.
4705 endif.
4706
4707 if screen-name = 'PSERV'.
4708 screen-input = 0.
4709 modify screen.
4710 endif.
4711
4712 if screen-name = 'PPC'.
4713 screen-input = 0.
4714 modify screen.
4715 endif.
4716 endloop.
4717
4718 message s000(oo) with 'Download to server disabled,' 'external command ZDTX_MKDIR not defined.'.
4719 endif.
4720endform.
4721
4722
4723
4724
4725
4726
4727
4728
4729form downloadDDStructures using iLocDictionary like iDictionary[]
4730 iLocDictionaryFilename like iDictFilename[]
4731 value(pathname)
4732 value(HtmlFileExtension)
4733 value(subDir)
4734 value(sortTablesAsc)
4735 value(slashSeparator)
4736 value(saveToServer)
4737 value(displayProgressMessage)
4738 value(locServerFileSystem)
4739 value(addBackground) type abap_bool.
4740
4741
4742field-symbols: <waDictionary> type tDictTable.
4743data: tableFilename type string.
4744data: tableFilenameWithPath type string.
4745data: iHtmlTable type standard table of string with header line.
4746data: newSubDirectory type string.
4747data: completeSavePath type string.
4748data: waDictFilename like line of iLocDictionaryFilename.
4749
4750 loop at iLocDictionary assigning <waDictionary>.
4751 perform buildFilename using pathName
4752 subDir
4753 <waDictionary>-tablename
4754 space
4755 space
4756 HtmlFileExtension
4757 IS_TABLE
4758 saveToServer
4759 slashSeparator
4760 tableFilenameWithPath
4761 tablefilename
4762 newSubDirectory
4763 completeSavePath.
4764
4765 read table iLocDictionaryFilename into waDictFilename with key tableName = <waDictionary>-tablename
4766 filename = completeSavePath.
4767 if sy-subrc <> 0.
4768
4769 import iHtmlTable from memory id <waDictionary>-tablename.
4770 if sy-subrc <> 0.
4771 if displayProgressMessage = ABAP_TRUE.
4772 concatenate 'Converting table' <waDictionary>-tablename 'to html' into statusBarMessage separated by space.
4773 perform displayStatus using statusBarMessage 0.
4774 endif.
4775
4776 perform convertDDtoHTML using <waDictionary>-iStructure[]
4777 iHtmlTable[]
4778 <waDictionary>-tableName
4779 <waDictionary>-tableTitle
4780 sortTablesAsc
4781 addBackground.
4782
4783 export iHtmlTable to memory id <waDictionary>-tablename.
4784 endif.
4785
4786 if saveToServer is initial.
4787 perform saveFileToPc using iHtmlTable[]
4788 tableFilenameWithPath
4789 tableFilename
4790 space
4791 space
4792 displayProgressMessage.
4793 else.
4794 perform saveFileToServer using iHtmlTable[]
4795 tableFilenameWithPath
4796 tableFilename
4797 completeSavePath
4798 displayProgressMessage
4799 locServerFileSystem.
4800 endif.
4801
4802 waDictFilename-tablename = <waDictionary>-tablename.
4803 waDictFilename-filename = completeSavePath.
4804 append waDictFilename to iLocDictionaryFilename.
4805 clear waDictFilename.
4806 endif.
4807
4808 clear iHtmlTable[].
4809 endloop.
4810endform.
4811
4812
4813
4814
4815form downloadDDTableTypes using iLocTableTypes like iTableTypes[]
4816 iLocTableTypeFilename like iDictFilename[]
4817 value(pathname)
4818 value(htmlFileExtension)
4819 value(subdir)
4820 value(sortTablesAsc)
4821 value(slashSeparator)
4822 value(saveToServer)
4823 value(displayProgressMessage)
4824 value(locServerFileSystem)
4825 value(addBackground) type abap_bool.
4826
4827field-symbols: <watabletypes> like line of iLocTableTypes.
4828field-symbols <waTtFilename> like line of iLocTableTypeFilename[].
4829data: tableFilename type string.
4830data: tableFilenameWithPath type string.
4831data: iHtmlTable type standard table of string with header line.
4832data: newSubDirectory type string.
4833data: completeSavePath type string.
4834
4835 loop at iLocTableTypes assigning <waTableTypes>.
4836 perform buildFilename using pathname
4837 subdir
4838 <waTableTypes>-typename
4839 space
4840 space
4841 htmlFileExtension
4842 IS_TABLE
4843 saveToServer
4844 slashSeparator
4845 tableFilenameWithPath
4846 tableFilename
4847 newSubDirectory
4848 completeSavePath.
4849
4850 read table iLocTableTypeFilename into <waTTFilename> with key tableName = <waTableTypes>-typename
4851 filename = completeSavePath.
4852 if sy-subrc <> 0.
4853
4854 import iHtmlTable from memory id <waTableTypes>-typename.
4855 if sy-subrc <> 0.
4856 if displayProgressMessage = ABAP_TRUE.
4857 concatenate 'Converting table type' <waTableTypes>-typename 'to html' into statusBarMessage separated by space.
4858 perform displayStatus using statusBarMessage 0.
4859 endif.
4860
4861
4862 perform convertTableTypeToHtml using iLocTableTypes[]
4863 iHtmlTable[]
4864 <waTableTypes>-typename
4865 <waTableTypes>-ddtext
4866 sortTablesAsc
4867 addBackground.
4868
4869 if saveToServer is initial.
4870 perform saveFileToPC using iHtmlTable[]
4871 tableFilenameWithPath
4872 tableFilename
4873 space
4874 space
4875 displayProgressMessage.
4876 else.
4877 perform saveFileToServer using iHtmlTable[]
4878 tableFilenameWithPath
4879 tableFilename
4880 completeSavePath
4881 displayProgressMessage
4882 locServerFileSystem.
4883 endif.
4884 endif.
4885 endif.
4886 clear iHtmlTable[].
4887 endloop.
4888endform.
4889
4890
4891
4892
4893form downloadMessageClass using iLocMessages like iMessages[]
4894 value(messageClassName)
4895 value(userFilePath)
4896 value(fileExtension)
4897 value(HTMLfileFlag)
4898 subDir
4899 value(customerNameRange)
4900 value(getIncludes)
4901 value(getDictStructures)
4902 value(userHasSelectedMessageClasses)
4903 value(slashSeparator)
4904 value(saveToServer)
4905 value(displayProgressMessage)
4906 value(locServerFileSystem)
4907 value(addBackground) type abap_bool.
4908
4909data: htmlPageName type string.
4910data: newFilenameOnly type string.
4911data: newFilenameWithPath type string.
4912data: iHtmlTable type standard table of string with header line.
4913data: newSubDirectory type string.
4914data: completeSavePath type string.
4915
4916 perform appendMessagesToFile using iLocMessages[]
4917 iHtmlTable[]
4918 userHasSelectedMessageClasses.
4919
4920
4921 concatenate `message class ` messageClassName into htmlPageName.
4922
4923 if htmlFileFlag is initial.
4924 append '' to iHtmlTable.
4925 append '* ----------------------------------------------------------------------------------' to iHtmlTable.
4926
4927 perform buildFooterMessage using iHtmlTable.
4928 append iHtmlTable.
4929 else.
4930 perform convertCodeToHtml using iHtmlTable[]
4931 htmlPageName
4932 space
4933 IS_MESSAGECLASS
4934 ''
4935 FALSE
4936 fileExtension
4937 customerNameRange
4938 getIncludes
4939 getDictStructures
4940 addBackground.
4941 endif.
4942
4943 perform buildFilename using userFilePath
4944 subDir
4945 messageClassName
4946 space
4947 space
4948 fileExtension
4949 IS_MESSAGECLASS
4950 saveToServer
4951 slashSeparator
4952 newFilenameWithPath
4953 newFilenameOnly
4954 newSubDirectory
4955 completeSavePath.
4956
4957 if saveToServer is initial.
4958 perform saveFileToPc using iHtmlTable[]
4959 newFilenameWithPath
4960 newFilenameOnly
4961 space
4962 space
4963 displayProgressMessage.
4964 else.
4965
4966 perform saveFileToServer using iHtmlTable[]
4967 newFilenameWithPath
4968 newFilenameOnly
4969 completeSavePath
4970 displayProgressMessage
4971 locServerFileSystem.
4972 endif.
4973endform.
4974
4975
4976
4977
4978form appendMessagesToFile using iLocMessages like iMessages[]
4979 iLocHtml like dumiHtml[]
4980 value(userHasSelectedMessageClasses).
4981
4982data: previousMessageID like iMessages-arbgb.
4983field-symbols: <waMessage> type tMessage.
4984data: waHtml type string.
4985
4986 sort iLocMessages ascending by arbgb msgnr.
4987
4988 if not iLocMessages[] is initial.
4989 if userHasSelectedMessageClasses is initial.
4990
4991 append waHtml to iLocHtml.
4992 append waHtml to iLocHtml.
4993
4994 append '*Messages' to iLocHtml.
4995 append '*----------------------------------------------------------' to iLocHtml.
4996 endif.
4997
4998 loop at iLocMessages assigning <waMessage>.
4999 if ( <waMessage>-arbgb <> previousMessageID ).
5000
5001 if userHasSelectedMessageClasses is initial.
5002
5003 append '*' to iLocHtml.
5004 concatenate `* Message class: ` <waMessage>-arbgb into waHtml.
5005 append waHtml to iLocHtml.
5006 endif.
5007
5008 previousMessageID = <waMessage>-arbgb.
5009 clear waHtml.
5010 endif.
5011
5012 if userHasSelectedMessageClasses is initial.
5013
5014 concatenate '*' <waMessage>-msgnr ` ` <waMessage>-text into waHtml.
5015 else.
5016 concatenate <waMessage>-msgnr ` ` <waMessage>-text into waHtml.
5017 endif.
5018
5019 append waHtml to iLocHtml.
5020 endloop.
5021 endif.
5022endform.
5023
5024
5025
5026
5027form downloadFunctions using iLocFunctions like iFunctions[]
5028 iLocDictionaryFilename like iDictFilename[]
5029 iLocTableTypeFilename like iTableTypeFilename[]
5030 value(userFilePath)
5031 value(fileExtension)
5032 value(subDir)
5033 value(downloadDocumentation)
5034 value(convertToHtml)
5035 value(customerNameRange)
5036 value(getIncludes)
5037 value(getDictStruct)
5038 value(textFileExtension)
5039 value(htmlFileExtension)
5040 value(sortTablesAsc)
5041 value(slashSeparator)
5042 value(saveToServer)
5043 value(displayProgressMessage)
5044 value(locServerFileSystem)
5045 value(addBackground) type abap_bool.
5046
5047data: mainSubdir type string.
5048data: incSubdir type string.
5049field-symbols: <waFunction> type tFunction.
5050field-symbols: <waInclude> type tInclude.
5051data: iEmptyTextelements type standard table of tTextTable.
5052data: iEmptySelectionTexts type standard table of tTextTable.
5053data: iEmptyMessages type standard table of tMessage.
5054data: iEmptyGuiTitles type standard table of tGuiTitle.
5055data: functionDocumentationExists type abap_bool value FALSE.
5056
5057
5058 loop at iLocFunctions assigning <waFunction>.
5059 if subDir is initial.
5060 incSubDir = <waFunction>-functionName.
5061 mainSubDir = ''.
5062 else.
5063 concatenate Subdir <waFunction>-functionName into incSubDir separated by slashSeparator.
5064 mainSubDir = SubDir.
5065 endif.
5066
5067 if not downloadDocumentation is initial.
5068 perform downloadFunctionDocs using <waFunction>-functionName
5069 <waFunction>-functionTitle
5070 userFilePath
5071 fileExtension
5072 convertToHtml
5073 slashSeparator
5074 saveToServer
5075 displayProgressMessage
5076 mainSubDir
5077 functionDocumentationExists
5078 locServerFileSystem
5079 addBackground.
5080 endif.
5081
5082
5083 perform readFunctionAndDownload using <waFunction>-iTextelements[]
5084 <waFunction>-iSelectionTexts[]
5085 <wafunction>-iMessages[]
5086 <wafunction>-functionName
5087 <wafunction>-functionMainInclude
5088 <waFunction>-functionTitle
5089 userFilePath
5090 fileExtension
5091 mainSubDir
5092 convertToHtml
5093 functionDocumentationExists
5094 customerNameRange
5095 getIncludes
5096 getDictStruct
5097 slashSeparator
5098 saveToServer
5099 displayProgressMessage
5100 locServerFileSystem
5101 addBackground.
5102
5103
5104 perform readIncludeAndDownload using iEmptyTextelements[]
5105 iEmptySelectionTexts[]
5106 iEmptyMessages[]
5107 iEmptyGuiTitles[]
5108 <waFunction>-topIncludeName
5109 <waFunction>-functionName
5110 <waFunction>-functionTitle
5111 IS_FUNCTION
5112 userFilePath
5113 fileExtension
5114 mainSubDir
5115 convertToHtml
5116 customerNameRange
5117 getIncludes
5118 getDictStruct
5119 slashSeparator
5120 saveToServer
5121 displayProgressMessage
5122 locServerFileSystem
5123 addBackground.
5124
5125
5126 if not <waFunction>-iScreenFlow[] is initial.
5127 perform downloadScreens using <wafunction>-iScreenFlow[]
5128 <wafunction>-progname
5129 userFilePath
5130 textFileExtension
5131 mainSubDir
5132 slashSeparator
5133 saveToServer
5134 displayProgressMessage
5135 locServerFileSystem.
5136 endif.
5137
5138
5139 if not <waFunction>-iGUITitle[] is initial.
5140 perform downloadGUITitles using <wafunction>-iGUITitle
5141 userFilePath
5142 textFileExtension
5143 mainsubDir
5144 slashSeparator
5145 saveToServer
5146 displayProgressMessage
5147 locServerFileSystem.
5148 endif.
5149
5150
5151 loop at <wafunction>-iIncludes assigning <waInclude>.
5152 perform readIncludeAndDownload using iEmptyTextelements[]
5153 iEmptySelectionTexts[]
5154 iEmptyMessages[]
5155 iEmptyGuiTitles[]
5156 <waInclude>-IncludeName
5157 space
5158 <waInclude>-IncludeTitle
5159 IS_PROGRAM
5160 userFilePath
5161 fileExtension
5162 incSubDir
5163 convertToHtml
5164 customerNameRange
5165 getIncludes
5166 getDictStruct
5167 slashSeparator
5168 saveToServer
5169 displayProgressMessage
5170 locServerFileSystem
5171 addBackground.
5172
5173 endloop.
5174
5175
5176 if not <wafunction>-iDictStruct[] is initial.
5177 perform downloadDDStructures using <wafunction>-iDictStruct[]
5178 iLocDictionaryFilename[]
5179 userFilePath
5180 htmlFileExtension
5181 mainSubDir
5182 sortTablesAsc
5183 slashSeparator
5184 saveToServer
5185 displayProgressMessage
5186 locServerFileSystem
5187 addBackground.
5188 endif.
5189
5190
5191 if not <waFunction>-iTableTypes[] is initial.
5192 perform downloadDDTableTypes using <waFunction>-iTableTypes[]
5193 iLocTableTypeFilename[]
5194 userFilePath
5195 htmlFileExtension
5196 mainSubDir
5197 sortTablesAsc
5198 slashSeparator
5199 saveToServer
5200 displayProgressMessage
5201 locServerFileSystem
5202 addBackground.
5203 endif.
5204
5205
5206 if not <waFunction>-iTransformations[] is initial.
5207 perform downloadXSLT using <waFunction>-iTransformations[]
5208 userFilePath
5209 fileExtension
5210 htmlFileExtension
5211 textFileExtension
5212 convertToHtml
5213 customerNamespace
5214 slashSeparatorToUse
5215 saveToServer
5216 subdir
5217 displayProgressMessage
5218 serverFileSystem
5219 addBackground.
5220 endif.
5221 endloop.
5222endform.
5223
5224
5225
5226
5227form readIncludeAndDownload using iLocTextElements like dumiTextTab[]
5228 iLocSelectionTexts like dumiTextTab[]
5229 iLocMessages like iMessages[]
5230 iLocGUITitles like dumIGUITitle[]
5231 value(programName)
5232 value(functionName)
5233 value(programDescription)
5234 value(overideProgType)
5235 value(userFilePath)
5236 value(fileExtension)
5237 value(additionalSubDir)
5238 value(convertToHtml)
5239 value(customerNameRange)
5240 value(getIncludes)
5241 value(getDictStructures)
5242 value(slashSeparator)
5243 value(saveToServer)
5244 value(displayProgressMessage)
5245 value(locServerFileSystem)
5246 value(addBackground) type abap_bool.
5247
5248data: iLines type standard table of string with header line.
5249data: localFilenameWithPath type string.
5250data: localFilenameOnly type string.
5251data: newSubdirectory type string.
5252data: objectName type string.
5253data: completeSavePath type string.
5254
5255 read report programName into iLines.
5256
5257
5258 if not iLocGUITitles[] is initial.
5259 perform appendGUITitles using iLocGUITitles[]
5260 iLines[].
5261 endif.
5262
5263
5264 if not iLocTextElements[] is initial.
5265 perform appendTextElements using iLocTextElements[]
5266 iLines[].
5267 endif.
5268
5269
5270 if not iLocSelectiontexts[] is initial.
5271 perform appendSelectionTexts using iLocSelectiontexts[]
5272 iLines[].
5273 endif.
5274
5275
5276 if not iLocMessages[] is initial.
5277 perform appendMessagesToFile using iLocMessages[]
5278 iLines[]
5279 space.
5280 endif.
5281
5282 if convertToHtml is initial.
5283 append '' to iLines.
5284 append '* ----------------------------------------------------------------------------------' to iLines.
5285 perform buildFooterMessage using iLines.
5286 append iLines.
5287 else.
5288 perform convertCodeToHtml using iLines[]
5289 programName
5290 programDescription
5291 overideProgType
5292 space
5293 space
5294 fileExtension
5295 customerNameRange
5296 getIncludes
5297 getDictStructures
5298 addBackground.
5299 endif.
5300
5301 if functionName is initial.
5302 objectName = programName.
5303 else.
5304 objectName = functionName.
5305 endif.
5306
5307 perform buildFilename using userFilePath
5308 additionalSubDir
5309 objectName
5310 space
5311 programName
5312 fileExtension
5313 overideProgType
5314 saveToServer
5315 slashSeparator
5316 localFilenameWithPath
5317 localfilenameOnly
5318 newSubdirectory
5319 completeSavePath.
5320
5321 if saveToServer is initial.
5322 perform saveFileToPc using iLines[]
5323 localFilenameWithPath
5324 localFilenameOnly
5325 space
5326 space
5327 displayProgressMessage.
5328 else.
5329 perform saveFileToServer using iLines[]
5330 localFilenameWithPath
5331 localFilenameOnly
5332 completeSavePath
5333 displayProgressMessage
5334 locServerFileSystem.
5335 endif.
5336endform.
5337
5338
5339
5340
5341form readClassAndDownload using waLocClass type tClass
5342 value(className)
5343 value(functionName)
5344 value(overideProgType)
5345 value(userFilePath)
5346 value(fileExtension)
5347 value(additionalSubDir)
5348 value(convertToHtml)
5349 value(customerNameRange)
5350 value(getIncludes)
5351 value(getDictStructures)
5352 value(slashSeparator)
5353 value(saveToServer)
5354 value(displayProgressMessage)
5355 value(locServerFileSystem)
5356 value(addBackground) type abap_bool.
5357
5358data: iTempLines type standard table of string with header line.
5359data: iLines type standard table of string with header line.
5360data: localFilenameWithPath type string.
5361data: localFilenameOnly type string.
5362data: newSubdirectory type string.
5363data: objectName type string.
5364data: castClassName type program.
5365data: completeSavePath type string.
5366
5367
5368 append '**************************************************************************' to iLines.
5369 append '* Class attributes. *' to iLines.
5370 append '**************************************************************************' to iLines.
5371 case waLocClass-exposure.
5372 when 0.
5373 append `Instantiation: Private` to iLines.
5374 when 1.
5375 append `Instantiation: Protected` to iLines.
5376 when 2.
5377 append `Instantiation: Public` to iLines.
5378 endcase.
5379 concatenate `Message class: ` waLocClass-msg_id into iLines.
5380 append iLines.
5381 case waLocClass-state.
5382 when 0.
5383 append `State: Only Modelled` to iLines.
5384 when 1.
5385 append `State: Implemented` to iLines.
5386 endcase.
5387 concatenate `Final Indicator: ` waLocClass-clsfinal into iLines.
5388 append iLines.
5389 concatenate `R/3 Release: ` waLocClass-r3Release into iLines.
5390 append iLines.
5391 clear iLines.
5392 append iLines.
5393
5394 castClassName = waLocClass-publicClassKey.
5395 read report castClassName into iTempLines.
5396 if sy-subrc = 0.
5397 perform reFormatClassCode using iTempLines[].
5398
5399 append '**************************************************************************' to iLines.
5400 append '* Public section of class. *' to iLines.
5401 append '**************************************************************************' to iLines.
5402 loop at iTempLines.
5403 append iTempLines to iLines.
5404 endloop.
5405 endif.
5406
5407 castClassName = waLocClass-privateClassKey.
5408 read report castClassName into iTempLines.
5409 if sy-subrc = 0.
5410 perform reFormatClassCode using iTempLines[].
5411
5412 append iLines.
5413 append '**************************************************************************' to iLines.
5414 append '* Private section of class. *' to iLines.
5415 append '**************************************************************************' to iLines.
5416 loop at iTempLines.
5417 append iTempLines to iLines.
5418 endloop.
5419 endif.
5420
5421 castClassName = waLocClass-ProtectedClassKey.
5422 read report castClassName into iTempLines.
5423 if sy-subrc = 0.
5424 perform reFormatClassCode using iTempLines[].
5425
5426 append iLines.
5427 append '**************************************************************************' to iLines.
5428 append '* Protected section of class. *' to iLines.
5429 append '**************************************************************************' to iLines.
5430 loop at iTempLines.
5431 append iTempLines to iLines.
5432 endloop.
5433 endif.
5434
5435 castClassName = waLocClass-typesClassKey.
5436 read report castClassName into iTempLines.
5437 if sy-subrc = 0.
5438 append iLines.
5439 append '**************************************************************************' to iLines.
5440 append '* Types section of class. *' to iLines.
5441 append '**************************************************************************' to iLines.
5442 loop at iTempLines.
5443 append iTempLines to iLines.
5444 endloop.
5445 endif.
5446
5447
5448 if not waLocClass-iTextElements[] is initial.
5449 perform appendTextElements using waLocClass-iTextElements[]
5450 iLines[].
5451 endif.
5452
5453
5454 if not waLocClass-iMessages[] is initial.
5455 perform appendMessagesToFile using waLocClass-iMessages[]
5456 iLines[]
5457 space.
5458 endif.
5459
5460
5461 if not waLocClass-iConcepts[] is initial.
5462 perform appendExceptionTexts using waLocClass-iConcepts[]
5463 iLines[].
5464 endif.
5465
5466
5467 if convertToHtml is initial.
5468 append '' to iLines.
5469 append '* ----------------------------------------------------------------------------------' to iLines.
5470 perform buildFooterMessage using iLines.
5471 append iLines.
5472 else.
5473 perform convertClassToHtml using iLines[]
5474 className
5475 waLocClass-descript
5476 overideProgType
5477 fileExtension
5478 customerNameRange
5479 getDictStructures
5480 addBackground.
5481 endif.
5482
5483 if functionName is initial.
5484 objectName = className.
5485 else.
5486 objectName = functionName.
5487 endif.
5488
5489 perform buildFilename using userFilePath
5490 additionalSubDir
5491 objectName
5492 space
5493 className
5494 fileExtension
5495 overideProgType
5496 saveToServer
5497 slashSeparator
5498 localFilenameWithPath
5499 localfilenameOnly
5500 newSubdirectory
5501 completeSavePath.
5502
5503 if saveToServer is initial.
5504 perform saveFileToPc using iLines[]
5505 localFilenameWithPath
5506 localFilenameOnly
5507 space
5508 space
5509 displayProgressMessage.
5510 else.
5511 perform saveFileToServer using iLines[]
5512 localFilenameWithPath
5513 localFilenameOnly
5514 completeSavePath
5515 displayProgressMessage
5516 locServerFileSystem.
5517 endif.
5518endform.
5519
5520
5521
5522
5523form readMethodAndDownload using waLocMethod type tMethod
5524 value(methodName)
5525 value(methodKey)
5526 value(functionName)
5527 value(overideProgType)
5528 value(userFilePath)
5529 value(fileExtension)
5530 value(additionalSubDir)
5531 value(convertToHtml)
5532 value(customerNameRange)
5533 value(getIncludes)
5534 value(getDictStructures)
5535 value(slashSeparator)
5536 value(saveToServer)
5537 value(displayProgressMessage)
5538 value(locServerFileSystem)
5539 value(addBackground) type abap_bool.
5540
5541data: iLines type standard table of string with header line.
5542data: iTempLines type standard table of string with header line.
5543data: localFilenameWithPath type string.
5544data: localFilenameOnly type string.
5545data: newSubdirectory type string.
5546data: objectName type string.
5547data: castMethodKey type program.
5548data: completeSavePath type string.
5549
5550
5551 append '**************************************************************************' to iLines.
5552 append '* Method attributes. *' to iLines.
5553 append '**************************************************************************' to iLines.
5554 case waLocMethod-exposure.
5555 when 0.
5556 append `Instantiation: Private` to iLines.
5557 when 1.
5558 append `Instantiation: Protected` to iLines.
5559 when 2.
5560 append `Instantiation: Public` to iLines.
5561 endcase.
5562 append '**************************************************************************' to iLines.
5563 append '' to iLines.
5564
5565 castMethodKey = waLocMethod-methodKey.
5566 read report castMethodKey into iTempLines.
5567 loop at iTempLines.
5568 append iTempLines to iLines.
5569 endloop.
5570
5571 if convertToHtml is initial.
5572 append '' to iLines.
5573 append '* ----------------------------------------------------------------------------------' to iLines.
5574 perform buildFooterMessage using iLines.
5575 append iLines.
5576 else.
5577 perform convertCodeToHtml using iLines[]
5578 methodName
5579 waLocMethod-descript
5580 overideProgType
5581 space
5582 space
5583 fileExtension
5584 customerNameRange
5585 getIncludes
5586 getDictStructures
5587 addBackground.
5588 endif.
5589
5590 if functionName is initial.
5591 objectName = methodName.
5592 else.
5593 objectName = functionName.
5594 endif.
5595
5596 case waLocMethod-exposure.
5597 when 0.
5598
5599 concatenate additionalSubDir slashSeparator 'private_methods' into additionalSubDir.
5600 when 1.
5601
5602 concatenate additionalSubDir slashSeparator 'protected_methods' into additionalSubDir.
5603 when 2.
5604
5605 concatenate additionalSubDir slashSeparator 'public_methods' into additionalSubDir.
5606 endcase.
5607
5608 perform buildFilename using userFilePath
5609 additionalSubDir
5610 objectName
5611 space
5612 methodName
5613 fileExtension
5614 overideProgType
5615 saveToServer
5616 slashSeparator
5617 localFilenameWithPath
5618 localfilenameOnly
5619 newSubdirectory
5620 completeSavePath.
5621
5622 if saveToServer is initial.
5623 perform saveFileToPc using iLines[]
5624 localFilenameWithPath
5625 localFilenameOnly
5626 space
5627 space
5628 displayProgressMessage.
5629 else.
5630 perform saveFileToServer using iLines[]
5631 localFilenameWithPath
5632 localFilenameOnly
5633 completeSavePath
5634 displayProgressMessage
5635 locServerFileSystem.
5636 endif.
5637endform.
5638
5639
5640
5641
5642form readXsltAndDownload using value(xsltName)
5643 xsltDescription
5644 value(userFilepath)
5645 value(fileExtension)
5646 value(convertToHtml)
5647 value(customerNameRange)
5648 value(slashSeparator)
5649 value(saveToServer)
5650 value(subdir)
5651 value(displayProgressMessage)
5652 value(locServerFileSystem)
5653 value(addBackground) type abap_bool.
5654
5655data: iLines type standard table of string with header line.
5656data: iLocXsltSource type o2pageline_table.
5657data: waXsltAttributes type o2xsltattr.
5658data: localFilenameWithPath type string.
5659data: localFilenameOnly type string.
5660data: newSubDirectory type string.
5661data: objectName type string.
5662data: completeSavePath type string.
5663
5664 cl_o2_api_xsltdesc=>load( exporting p_xslt_desc = xsltname
5665 importing p_source = iLocXsltSource
5666 p_attributes = waXsltAttributes
5667 exceptions not_existing = 1
5668 permission_failure = 2
5669 error_occured = 3
5670 version_not_found = 4 ).
5671
5672 if sy-subrc = 0.
5673 xsltDescription = waXsltAttributes-descript.
5674
5675 append lines of iLocXsltSource to iLines.
5676
5677 if convertToHtml is initial.
5678 append '' to iLines.
5679 append '* ----------------------------------------------------------------------------------' to ilines.
5680 perform buildFooterMessage using iLines.
5681 append iLines.
5682 else.
5683 perform convertCodeToHtml using iLines[]
5684 xsltName
5685 waXsltAttributes-descript
5686 space
5687 space
5688 space
5689 fileExtension
5690 customerNameRange
5691 space
5692 space
5693 addBackground.
5694 endif.
5695
5696 perform buildfilename using userFilePath
5697 subdir
5698 xsltName
5699 space
5700 xsltName
5701 fileExtension
5702 IS_TRANSFORMATION
5703 saveToServer
5704 slashSeparator
5705 localFilenameWithPath
5706 localFilenameOnly
5707 newSubdirectory
5708 completeSavePath.
5709
5710 if saveToServer is initial.
5711 perform saveFileTopc using iLines[]
5712 localFilenameWithPath
5713 localFilenameOnly
5714 space
5715 space
5716 displayProgressMessage.
5717 else.
5718 perform saveFileToServer using iLines[]
5719 localFilenameWithPath
5720 localFilenameOnly
5721 completeSavePath
5722 displayProgressMessage
5723 locServerFilesystem.
5724 endif.
5725 endif.
5726endform.
5727
5728
5729
5730
5731form readFunctionAndDownload using iLocTextElements like dumiTextTab[]
5732 iLocSelectionTexts like dumiTextTab[]
5733 iLocMessages like iMessages[]
5734 value(functionName)
5735 value(functionInternalName)
5736 value(shortText)
5737 value(userFilePath)
5738 value(fileExtension)
5739 value(subDir)
5740 value(convertToHtml)
5741 value(functionDocumentationExists)
5742 value(customerNameRange)
5743 value(getIncludes)
5744 value(getDictStructures)
5745 value(slashSeparator)
5746 value(saveToServer)
5747 value(displayProgressMessage)
5748 value(locServerFileSystem)
5749 value(addBackground) type abap_bool.
5750
5751data: iLines type standard table of string with header line.
5752data: localFilenameWithPath type string.
5753data: localFilenameOnly type string.
5754data: newSubDirectory type string.
5755data: completeSavePath type string.
5756
5757 read report functionInternalName into iLines.
5758
5759
5760 if not iLocTextElements[] is initial.
5761 perform appendTextElements using iLocTextElements[]
5762 iLines[].
5763 endif.
5764
5765
5766 if not iLocMessages[] is initial.
5767 perform appendMessagesToFile using iLocMessages[]
5768 iLines[]
5769 space.
5770 endif.
5771
5772 if convertToHtml is initial.
5773 append '' to iLines.
5774 append '* ----------------------------------------------------------------------------------' to iLines.
5775 perform buildFooterMessage using iLines.
5776 append iLines.
5777 else.
5778 perform convertFunctionToHtml using iLines[]
5779 functionName
5780 shortText
5781 IS_FUNCTION
5782 functionDocumentationExists
5783 TRUE
5784 fileExtension
5785 customerNameRange
5786 getIncludes
5787 getDictStructures
5788 addBackground.
5789 endif.
5790
5791 perform buildFilename using userFilePath
5792 subDir
5793 functionName
5794 space
5795 space
5796 fileExtension
5797 IS_FUNCTION
5798 saveToServer
5799 slashSeparator
5800 localFilenameWithPath
5801 localfilenameOnly
5802 newSubDirectory
5803 completeSavePath.
5804
5805 if saveToServer is initial.
5806 perform saveFileToPc using iLines[]
5807 localFilenameWithPath
5808 localFilenameOnly
5809 space
5810 space
5811 displayProgressMessage.
5812 else.
5813 perform saveFileToServer using iLines[]
5814 localFilenameWithPath
5815 localFilenameOnly
5816 completeSavePath
5817 displayProgressMessage
5818 locServerFileSystem.
5819 endif.
5820endform.
5821
5822
5823
5824
5825form buildFilename using value(userPath)
5826 value(additionalSubDirectory)
5827 value(objectName)
5828 value(mainFunctionNo)
5829 value(includeName)
5830 value(fileExtension)
5831 value(downloadType)
5832 value(downloadToServer)
5833 value(slashSeparator)
5834 newFilenameWithPath
5835 newFilenameOnly
5836 newSubDirectory
5837 completePath.
5838
5839
5840 if downloadToServer is initial.
5841 if frontendOpSystem = NON_UNIX.
5842 if not additionalSubdirectory is initial.
5843 translate additionalSubdirectory using '/_'.
5844 if additionalSubdirectory+0(1) = '_'.
5845 shift additionalSubdirectory left by 1 places.
5846 endif.
5847 endif.
5848 endif.
5849 else.
5850 if serverOpSystem = NON_UNIX.
5851 if not additionalSubdirectory is initial.
5852 translate additionalSubdirectory using '/_'.
5853 if additionalSubdirectory+0(1) = '_'.
5854 shift additionalSubdirectory left by 1 places.
5855 endif.
5856 endif.
5857 endif.
5858 endif.
5859
5860 case downloadType.
5861
5862 when IS_PROGRAM.
5863 if additionalSubDirectory is initial.
5864 concatenate userPath slashSeparator objectName PERIOD fileExtension into newFilenameWithPath.
5865 concatenate userPath slashSeparator into completePath.
5866 else.
5867 concatenate userPath slashSeparator additionalSubdirectory
5868 slashSeparator objectName PERIOD fileExtension into newFilenameWithPath.
5869 concatenate userPath slashSeparator additionalSubdirectory into completePath.
5870 endif.
5871
5872
5873 when IS_FUNCTION.
5874 if additionalSubdirectory is initial.
5875 find 'top' in includeName ignoring case.
5876 if sy-subrc = 0.
5877 concatenate userPath slashSeparator objectName
5878 slashSeparator 'Global-' objectName
5879 PERIOD fileExtension
5880 into newFilenameWithPath.
5881 else.
5882 if includeName cs mainFunctionNo and not mainFunctionNo is initial.
5883 concatenate userPath slashSeparator objectName
5884 slashSeparator objectName
5885 PERIOD fileExtension
5886 into newFilenameWithPath.
5887 else.
5888 concatenate userPath slashSeparator objectName
5889 slashSeparator objectName
5890 PERIOD fileExtension
5891 into newFilenameWithPath.
5892 endif.
5893 endif.
5894 newSubDirectory = objectName.
5895 concatenate userPath
5896 slashSeparator
5897 newSubDirectory
5898 slashSeparator into completePath.
5899 else.
5900 find 'top' in includeName ignoring case.
5901 if sy-subrc = 0.
5902 concatenate userPath slashSeparator additionalSubdirectory
5903 slashSeparator objectName
5904 slashSeparator 'Global-' objectName
5905 PERIOD fileExtension
5906 into newFilenameWithPath.
5907 else.
5908 if includeName cs mainFunctionNo and not mainFunctionNo is initial.
5909 concatenate userPath slashSeparator additionalSubdirectory
5910 slashSeparator objectName
5911 slashSeparator objectName
5912 PERIOD fileExtension
5913 into newFilenameWithPath.
5914 else.
5915 concatenate userPath slashSeparator additionalSubdirectory
5916 slashSeparator objectName
5917 slashSeparator objectName
5918 PERIOD fileExtension
5919 into newFilenameWithPath.
5920 endif.
5921 endif.
5922 concatenate additionalSubDirectory slashSeparator objectName into newSubDirectory.
5923 concatenate userPath slashSeparator additionalSubdirectory slashSeparator objectName into completePath.
5924 endif.
5925
5926
5927 when IS_TABLE.
5928 if additionalSubdirectory is initial.
5929 concatenate userPath slashSeparator 'dictionary'
5930 slashSeparator
5931 objectName PERIOD fileExtension
5932 into newFilenameWithPath.
5933
5934 concatenate userPath slashSeparator 'dictionary' into NewSubDirectory.
5935 concatenate userPath slashSeparator 'dictionary' into completePath.
5936 else.
5937 concatenate userpath slashSeparator additionalSubDirectory
5938 slashSeparator 'dictionary'
5939 slashSeparator
5940 objectName PERIOD fileExtension
5941 into newFilenameWithPath.
5942
5943 concatenate userPath slashSeparator additionalSubDirectory slashSeparator 'dictionary' into newSubDirectory.
5944 concatenate userPath slashSeparator additionalSubDirectory slashSeparator 'dictionary' into completePath.
5945 endif.
5946
5947
5948 when IS_TRANSFORMATION.
5949 if additionalSubdirectory is initial.
5950 concatenate userPath slashSeparator 'Transformations'
5951 slashSeparator
5952 objectName PERIOD fileExtension
5953 into newFilenameWithPath.
5954
5955 concatenate userPath slashSeparator 'Transformations' into NewSubDirectory.
5956 concatenate userPath slashSeparator 'Transformations' into completePath.
5957 else.
5958 concatenate userpath slashSeparator additionalSubDirectory
5959 slashSeparator 'Transformations'
5960 slashSeparator
5961 objectName PERIOD fileExtension
5962 into newFilenameWithPath.
5963
5964 concatenate userPath slashSeparator additionalSubDirectory slashSeparator 'Transformations' into newSubDirectory.
5965 concatenate userPath slashSeparator additionalSubDirectory slashSeparator 'Transformations' into completePath.
5966 endif.
5967
5968
5969 when IS_DOCUMENTATION.
5970 if additionalSubDirectory is initial.
5971 concatenate userPath slashSeparator objectName
5972 slashSeparator 'Docs-'
5973 objectName PERIOD
5974 fileExtension
5975 into newFilenameWithPath.
5976
5977 concatenate userPath slashSeparator objectName into newSubDirectory.
5978 concatenate userPath slashSeparator objectName into completePath.
5979 else.
5980 concatenate userPath slashSeparator additionalSubDirectory
5981 slashSeparator objectName
5982 slashSeparator 'Docs-'
5983 objectName PERIOD fileExtension
5984 into newFilenameWithPath.
5985
5986 concatenate userpath slashSeparator additionalSubDirectory slashSeparator objectName into newSubDirectory.
5987 concatenate userpath slashSeparator additionalSubDirectory slashSeparator objectName into completePath.
5988 endif.
5989
5990
5991 when IS_SCREEN.
5992 if additionalSubDirectory is initial.
5993 concatenate userpath slashSeparator 'Screens'
5994 slashSeparator 'screen_'
5995 objectName PERIOD
5996 fileExtension into newFilenameWithPath.
5997
5998 concatenate userPath slashSeparator 'screens' into newSubDirectory.
5999 concatenate userPath slashSeparator 'screens' into completePath.
6000
6001 else.
6002 concatenate userpath slashSeparator additionalSubdirectory
6003 slashSeparator 'Screens'
6004 slashSeparator 'screen_'
6005 objectName PERIOD
6006 fileExtension into newFilenameWithPath.
6007
6008 concatenate userPath slashSeparator additionalSubDirectory slashSeparator 'screens' into newSubDirectory.
6009 concatenate userPath slashSeparator additionalSubDirectory slashSeparator 'screens' into completePath.
6010 endif.
6011
6012
6013 when IS_GUITITLE.
6014 if additionalSubDirectory is initial.
6015 concatenate userpath slashSeparator 'Screens'
6016 slashSeparator 'gui_title_'
6017 objectName PERIOD
6018 fileExtension into newFilenameWithPath.
6019
6020 concatenate userPath slashSeparator 'screens' into newSubDirectory.
6021 concatenate userPath slashSeparator 'screens' into completePath.
6022 else.
6023 concatenate userpath slashSeparator additionalSubdirectory
6024 slashSeparator 'Screens'
6025 slashSeparator 'gui_title_'
6026 objectName PERIOD
6027 fileExtension into newFilenameWithPath.
6028
6029 concatenate userPath slashSeparator additionalSubDirectory slashSeparator 'Screens' into newSubDirectory.
6030 concatenate userPath slashSeparator additionalSubDirectory slashSeparator 'Screens' into completePath.
6031 endif.
6032
6033
6034 when IS_MESSAGECLASS.
6035 if additionalSubDirectory is initial.
6036 concatenate userPath slashSeparator objectName
6037 slashSeparator 'Message class-'
6038 objectName PERIOD
6039 fileExtension
6040 into newFilenameWithPath.
6041
6042 concatenate userPath slashSeparator objectName into newSubDirectory.
6043 concatenate userPath slashSeparator objectName into completePath.
6044 else.
6045 concatenate userPath slashSeparator additionalSubDirectory
6046 slashSeparator objectName
6047 slashSeparator 'Message class-'
6048 objectName PERIOD fileExtension
6049 into newFilenameWithPath.
6050
6051 concatenate userpath slashSeparator additionalSubDirectory slashSeparator objectName into newSubDirectory.
6052 concatenate userpath slashSeparator additionalSubDirectory slashSeparator objectName into completePath.
6053 endif.
6054
6055
6056 when IS_CLASS.
6057 if additionalSubdirectory is initial.
6058 concatenate userPath slashSeparator objectName
6059 slashSeparator 'Class-'
6060 objectName PERIOD fileExtension
6061 into newFilenameWithPath.
6062
6063 concatenate userPath slashSeparator objectName into newSubDirectory.
6064 concatenate userPath slashSeparator objectName into completePath.
6065 else.
6066 concatenate userpath slashSeparator additionalSubDirectory
6067 slashSeparator objectName
6068 slashSeparator 'Class-'
6069 objectName PERIOD fileExtension
6070 into newFilenameWithPath.
6071
6072 concatenate userPath slashSeparator additionalSubDirectory slashSeparator objectName into newSubDirectory.
6073 concatenate userPath slashSeparator additionalSubDirectory slashSeparator objectName into completePath.
6074 endif.
6075
6076
6077 when IS_METHOD.
6078 if additionalSubdirectory is initial.
6079 concatenate userPath slashSeparator
6080 objectName PERIOD fileExtension
6081 into newFilenameWithPath.
6082
6083 concatenate userPath slashSeparator objectName into newSubDirectory.
6084 concatenate userPath slashSeparator objectName into completePath.
6085 else.
6086 concatenate userpath slashSeparator additionalSubDirectory
6087 slashSeparator
6088 objectName PERIOD fileExtension
6089 into newFilenameWithPath.
6090
6091
6092 concatenate userPath slashSeparator additionalSubDirectory into completePath.
6093 endif.
6094 endcase.
6095
6096 translate completePath to lower case.
6097 concatenate objectName PERIOD fileExtension into newFilenameOnly.
6098 translate newFilenameOnly to lower case.
6099 translate newFilenameWithPath to lower case.
6100 translate newSubDirectory to lower case.
6101
6102
6103 if downloadToServer is initial.
6104 if frontendOpSystem = NON_UNIX.
6105 translate newFilenameOnly using '/_'.
6106 translate newFilenameWithPath using '/_'.
6107 translate newFilenameOnly using '< '.
6108 translate newFilenameWithPath using '< '.
6109 translate newFilenameOnly using '> '.
6110 translate newFilenameWithPath using '> '.
6111 translate newFilenameOnly using '? '.
6112 translate newFilenameWithPath using '? '.
6113 translate newFilenameOnly using '| '.
6114 translate newFilenameWithPath using '| '.
6115 condense newFilenameOnly no-gaps.
6116 condense newFilenameWithPath no-gaps.
6117 endif.
6118 else.
6119 if serverOpSystem = NON_UNIX.
6120 translate newFilenameOnly using '/_'.
6121 translate newFilenameWithPath using '/_'.
6122 translate newFilenameOnly using '< '.
6123 translate newFilenameWithPath using '< '.
6124 translate newFilenameOnly using '> '.
6125 translate newFilenameWithPath using '> '.
6126 translate newFilenameOnly using '? '.
6127 translate newFilenameWithPath using '? '.
6128 translate newFilenameOnly using '| '.
6129 translate newFilenameWithPath using '| '.
6130 condense newFilenameOnly no-gaps.
6131 condense newFilenameWithPath no-gaps.
6132 endif.
6133 endif.
6134endform.
6135
6136
6137
6138
6139form saveFileToPc using iDownload type standard table
6140 value(filenameWithPath)
6141 value(filename)
6142 value(writeFieldSeparator)
6143 value(truncateTrailingBlanks)
6144 value(displayProgressMessage).
6145
6146data: statusMessage type string.
6147data: objFile type ref to cl_gui_frontend_services.
6148data: strSubrc type string.
6149
6150 if not displayProgressMessage is initial.
6151 concatenate `Downloading: ` filename into statusMessage.
6152 perform displayStatus using statusMessage 0.
6153 endif.
6154
6155 create object objFile.
6156 objFile->gui_download( exporting filename = filenameWithPath
6157 filetype = 'ASC'
6158 write_field_separator = writeFieldSeparator
6159 trunc_trailing_blanks = truncateTrailingBlanks
6160 changing data_tab = iDownload[]
6161 exceptions file_write_error = 1
6162 no_batch = 2
6163 gui_refuse_filetransfer = 3
6164 invalid_type = 4
6165 no_authority = 5
6166 unknown_error = 6
6167 header_not_allowed = 7
6168 separator_not_allowed = 8
6169 filesize_not_allowed = 9
6170 header_too_long = 10
6171 dp_error_create = 11
6172 dp_error_send = 12
6173 dp_error_write = 13
6174 unknown_dp_error = 14
6175 access_denied = 15
6176 dp_out_of_memory = 16
6177 disk_full = 17
6178 dp_timeout = 18
6179 file_not_found = 19
6180 dataprovider_exception = 20
6181 control_flush_error = 21
6182 not_supported_by_gui = 22
6183 error_no_gui = 23 ).
6184
6185 if sy-subrc <> 0.
6186 strSubrc = sy-subrc.
6187 concatenate `File save error: ` filename ` sy-subrc: ` strSubrc into statusMessage.
6188 perform displayStatus using statusMessage 3.
6189 endif.
6190endform.
6191
6192
6193
6194
6195form saveFileToServer using iDownload type standard table
6196 value(filenameWithPath)
6197 value(filename)
6198 value(path)
6199 value(displayProgressMessage)
6200 value(locServerFileSystem).
6201
6202data: waDownload type string.
6203data: statusMessage type string.
6204data: pathExists type flag.
6205
6206 if not displayProgressMessage is initial.
6207 concatenate `Downloading: ` filename into statusMessage.
6208 perform displayStatus using statusMessage 0.
6209 endif.
6210
6211 read table iServerPaths with key table_line = path.
6212 if sy-subrc <> 0.
6213 perform checkPathExists using path
6214 pathExists.
6215
6216 if pathExists = ''.
6217 perform createServerDirectory using path locServerFileSystem.
6218 endif.
6219
6220 append path to iServerPaths.
6221 endif.
6222
6223 open dataset filenameWithPath for output in text mode encoding default.
6224 if sy-subrc = 0.
6225 loop at iDownload into waDownload.
6226 transfer waDownload to filenameWithPath.
6227 if sy-subrc <> 0.
6228 message e000(oo) with 'Error transferring data to file'.
6229 endif.
6230 endloop.
6231
6232 close dataset filenameWithPath.
6233 if sy-subrc <> 0.
6234 message e000(oo) with 'Error closing file'.
6235 endif.
6236 else.
6237
6238 message e000(oo) with 'Error creating file on SAP server' 'check permissions'.
6239 endif.
6240endform.
6241
6242
6243
6244
6245form checkPathExists using value(path)
6246 pathExists type flag.
6247
6248data: castDirectory type btctext80.
6249
6250 castDirectory = path.
6251
6252 call function 'PFL_CHECK_DIRECTORY'
6253 exporting
6254 directory = castDirectory
6255
6256 exceptions
6257 pfl_dir_not_exist = 1
6258 pfl_permission_denied = 2
6259 pfl_cant_build_dataset_name = 3
6260 pfl_file_not_exist = 4
6261 others = 5.
6262
6263 if sy-subrc = 0.
6264 pathExists = 'X'.
6265 else.
6266 pathExists = ''.
6267 endif.
6268endform.
6269
6270
6271
6272
6273form createServerDirectory using value(path)
6274 value(locServerFileSystem).
6275
6276data: castServerOpSys type syopsys.
6277
6278 castServerOpSys = locServerFileSystem.
6279
6280
6281data: param1 type sxpgcolist-parameters.
6282
6283data: funcStatus type extcmdexex-status.
6284
6285data: iServerOutput type standard table of btcxpm.
6286data: waServeroutput type btcxpm.
6287
6288data: target type rfcdisplay-rfchost.
6289
6290data: operatingSystem type sxpgcolist-opsystem.
6291
6292data: head type string..
6293data: tail type string.
6294
6295 param1 = path.
6296 target = sy-host.
6297 operatingSystem = locServerFileSystem.
6298
6299 call function 'SXPG_COMMAND_EXECUTE'
6300 exporting
6301 commandname = 'ZDTX_MKDIR'
6302 additional_parameters = param1
6303 operatingsystem = castServerOpSys
6304 targetsystem = target
6305 stdout = 'X'
6306 stderr = 'X'
6307 terminationwait = 'X'
6308 importing
6309 status = funcStatus
6310 tables
6311 exec_protocol = iServerOutput[]
6312 exceptions
6313 no_permission = 1
6314 command_not_found = 2
6315 parameters_too_long = 3
6316 security_risk = 4
6317 wrong_check_call_interface = 5
6318 program_start_error = 6
6319 program_termination_error = 7
6320 x_error = 8
6321 parameter_expected = 9
6322 too_many_parameters = 10
6323 illegal_command = 11
6324 wrong_asynchronous_parameters = 12
6325 cant_enq_tbtco_entry = 13
6326 jobcount_generation_error = 14
6327 others = 15.
6328
6329 if sy-subrc = 0.
6330
6331 if funcStatus = 'E'.
6332
6333
6334 message e000(oo) with 'An error occurred creating a directory'.
6335 endif.
6336 else.
6337 case sy-subrc.
6338 when 1.
6339
6340 message e000(oo) with 'No permissions to run external command ZDTX_MKDIR'.
6341 when 2.
6342
6343 message E000(oo) with 'External comand ZDTX_MKDIR not found'.
6344
6345 when others.
6346
6347 message e000(oo) with 'An error occurred creating a directory'
6348 ', subrc:'
6349 sy-subrc.
6350 endcase.
6351 endif.
6352endform.
6353
6354
6355
6356
6357form appendTextElements using iLocTextElements like dumiTextTab[]
6358 iLocLines like dumiHtml[].
6359
6360field-symbols: <waTextElement> type tTextTable.
6361data: waLine type string.
6362
6363 if lines( iLocTextElements ) > 0.
6364 append '' to iLocLines.
6365
6366 append '*Text elements' to iLocLines.
6367 append '*----------------------------------------------------------' to iLocLines.
6368 loop at iLocTextElements assigning <waTextElement>.
6369 concatenate '* ' <waTextElement>-key <waTextElement>-entry into waLine separated by space.
6370 append waLine to iLocLines.
6371 endloop.
6372 endif.
6373endform.
6374
6375
6376
6377
6378form appendGUITitles using iLocGUItitles like dumiGUITitle[]
6379 iLocLines like dumiHtml[].
6380
6381field-symbols: <waGUITitle> type tGUITitle.
6382data: waLine type string.
6383
6384 if lines( iLocGUItitles ) > 0.
6385 append '' to iLocLines.
6386
6387 append '*GUI Texts' to iLocLines.
6388 append '*----------------------------------------------------------' to iLocLines.
6389 loop at iLocGUItitles assigning <waGUItitle>.
6390 concatenate '* ' <waGUItitle>-obj_code '-->' <waGUItitle>-text into waLine separated by space.
6391 append waLine to iLocLines.
6392 endloop.
6393 endif.
6394endform.
6395
6396
6397
6398
6399form appendSelectionTexts using iLocSelectionTexts like dumiTextTab[]
6400 iLocLines like dumiHtml[].
6401
6402field-symbols: <waSelectionText> type tTextTable.
6403data: waLine type string.
6404
6405 if lines( iLocSelectionTexts ) > 0.
6406 append '' to iLocLines.
6407 append '' to iLocLines.
6408
6409 append '*Selection texts' to iLocLines.
6410 append '*----------------------------------------------------------' to iLocLines.
6411 loop at iLocSelectiontexts assigning <waSelectionText>.
6412 concatenate '* ' <waSelectionText>-key <waSelectionText>-entry into waLine separated by space.
6413 append waLine to iLocLines.
6414 endloop.
6415 endif.
6416endform.
6417
6418
6419
6420
6421form appendExceptionTexts using iConcepts like dumiConcepts[]
6422 iLocLines like dumiHtml[].
6423
6424field-symbols: <waConcept> type tConcept.
6425data: waLine type string.
6426data: conceptText type sotr_txt.
6427
6428 if lines( iConcepts ) > 0.
6429 append '' to iLocLines.
6430
6431 append '*Exception texts' to iLocLines.
6432 append '*----------------------------------------------------------' to iLocLines.
6433 loop at iConcepts assigning <waConcept>.
6434
6435 call function 'SOTR_GET_TEXT_KEY' exporting concept = <waConcept>-concept
6436 langu = pMLang
6437 search_in_second_langu = 'X'
6438
6439 importing e_text = conceptText
6440 exceptions no_entry_found = 1
6441 parameter_error = 2
6442 others = 3.
6443
6444 if sy-subrc = 0.
6445 concatenate '* ' <waConcept>-constName '-' conceptText into waLine separated by space.
6446 append waLine to iLocLines.
6447 endif.
6448 endloop.
6449 endif.
6450endform.
6451
6452
6453
6454
6455form downloadFunctionDocs using value(functionName)
6456 value(functionDescription)
6457 value(userFilePath)
6458 value(fileExtension)
6459 value(convertToHtml)
6460 value(slashSeparator)
6461 value(saveToServer)
6462 value(displayProgressMessage)
6463 subDir
6464 documentationDownloaded
6465 value(locServerFileSystem)
6466 value(addBackground) type abap_bool.
6467
6468data: iLines type standard table of string with header line.
6469data: iDocumentation type standard table of funct with header line.
6470data: iExceptions type standard table of rsexc with header line.
6471data: iExport type standard table of rsexp with header line.
6472data: iParameter type standard table of rsimp with header line.
6473data: iTables type standard table of rstbl with header line.
6474data: iScriptLines type standard table of tline with header line.
6475data: htmlPageName type string.
6476data: newFilenameWithPath type string.
6477data: newFilenameOnly type string.
6478data: object like dokhl-object.
6479data: stringLength type i value 0.
6480data: newSubDirectory type string.
6481data: waLine(255).
6482data: completeSavePath type string.
6483
6484 documentationDownloaded = FALSE.
6485 object = functionName.
6486
6487 call function 'FUNCTION_IMPORT_DOKU'
6488 exporting
6489 funcName = functionName
6490 tables
6491 DOKUMENTATION = iDocumentation
6492 EXCEPTION_LIST = iExceptions
6493 EXPORT_PARAMETER = iExport
6494 IMPORT_PARAMETER = iParameter
6495 TABLES_PARAMETER = iTables
6496 exceptions
6497 ERROR_MESSAGE = 1
6498 FUNCTION_NOT_FOUND = 2
6499 INVALID_NAME = 3
6500 others = 4.
6501
6502 call function 'DOCU_GET'
6503 exporting
6504 ID = 'FU'
6505 LANGU = pMLang
6506 OBJECT = object
6507 TYP = 'T'
6508 VERSION_ACTIVE_OR_LAST = 'L'
6509 tables
6510 line = iScriptLines
6511 exceptions
6512 NO_DOCU_ON_SCREEN = 1
6513 NO_DOCU_SELF_DEF = 2
6514 NO_DOCU_TEMP = 3
6515 RET_CODE = 4
6516 others = 5.
6517
6518 if sy-subrc = 0 and not ( iScriptLines[] is initial ).
6519 append 'SHORT TEXT' to iLines.
6520 concatenate space functionDescription into functionDescription separated by space.
6521 append functionDescription to iLines.
6522 append space to iLines.
6523 loop at iScriptLines.
6524 move iScriptLines-tdline to iLines.
6525 concatenate space iLines into iLines separated by space.
6526 while iLines CP '&*' or iLines CP '*&'.
6527 replace '&' into iLines with space.
6528 shift iLines left deleting leading space.
6529 endwhile.
6530 append iLines.
6531 endloop.
6532
6533 clear iLines.
6534 if not ( iDocumentation[] is initial ).
6535 append iLines.
6536 append 'PARAMETER DOCUMENTATION' to iLines.
6537 append '-----------------------' to iLines.
6538 append iLines.
6539
6540 describe field iDocumentation-parameter length stringLength in character mode.
6541 stringLength = stringLength + 3.
6542 loop at iDocumentation.
6543 move iDocumentation-parameter to waLine.
6544 move iDocumentation-stext to waLine+stringLength.
6545 append waLine to iLines.
6546 endloop.
6547 endif.
6548
6549 concatenate `Documentation - ` functionName into htmlPageName.
6550
6551 if convertToHtml is initial.
6552 append iLines.
6553 append '* ----------------------------------------------------------------------------------' to iLines.
6554 append iLines.
6555 perform buildFooterMessage using iLines.
6556 append iLines.
6557 else.
6558 perform convertCodeToHtml using iLines[]
6559 htmlPageName
6560 space
6561 IS_DOCUMENTATION
6562 TRUE
6563 space
6564 space
6565 space
6566 space
6567 space
6568 addBackground.
6569 endif.
6570
6571 perform buildFilename using userFilePath
6572 subDir
6573 functionName
6574 space
6575 space
6576 fileExtension
6577 IS_DOCUMENTATION
6578 saveToServer
6579 slashSeparator
6580 newFilenameWithPath
6581 newFilenameOnly
6582 newSubDirectory
6583 completeSavePath.
6584
6585 if saveToServer is initial.
6586 perform saveFileToPC using iLines[]
6587 newFilenameWithPath
6588 newfilenameOnly
6589 space
6590 space
6591 displayProgressMessage.
6592 else.
6593 perform saveFileToServer using iLines[]
6594 newFilenameWithPath
6595 newfilenameOnly
6596 completeSavePath
6597 displayProgressMessage
6598 locServerFileSystem.
6599 endif.
6600
6601 documentationDownloaded = TRUE.
6602 endif.
6603endform.
6604
6605
6606
6607
6608form downloadClassDocs using value(className) type seoclsname
6609 value(userFilePath)
6610 value(fileExtension)
6611 value(convertToHtml)
6612 value(slashSeparator)
6613 value(saveToServer)
6614 value(displayProgressMessage)
6615 subDir
6616 documentationDownloaded
6617 value(locServerFileSystem)
6618 value(addBackground) type abap_bool.
6619
6620data: iLines type standard table of string with header line.
6621data: iDocumentation type standard table of funct with header line.
6622data: iExceptions type standard table of rsexc with header line.
6623data: iExport type standard table of rsexp with header line.
6624data: iParameter type standard table of rsimp with header line.
6625data: iTables type standard table of rstbl with header line.
6626data: iScriptLines type standard table of tline with header line.
6627data: htmlPageName type string.
6628data: newFilenameWithPath type string.
6629data: newFilenameOnly type string.
6630data: object like dokhl-object.
6631data: stringLength type i value 0.
6632data: newSubDirectory type string.
6633data: waLine(255).
6634data: completeSavePath type string.
6635
6636 documentationDownloaded = FALSE.
6637 object = className.
6638
6639 call function 'DOC_OBJECT_GET'
6640 exporting
6641 class = 'CL'
6642 name = object
6643 language = pMLang
6644
6645
6646
6647
6648 tables
6649 itf_lines = iScriptLines[]
6650 exceptions
6651 object_not_found = 1.
6652
6653 if sy-subrc = 0 and not ( iScriptLines[] is initial ).
6654 loop at iScriptLines.
6655 move iScriptLines-tdline to iLines.
6656 concatenate space iLines into iLines separated by space.
6657 while iLines CP '&*' or iLines CP '*&'.
6658 replace '&' into iLines with space.
6659 shift iLines left deleting leading space.
6660 endwhile.
6661 append iLines.
6662 endloop.
6663
6664 concatenate `Documentation - ` className into htmlPageName.
6665
6666 if convertToHtml is initial.
6667 append iLines.
6668 append '* ----------------------------------------------------------------------------------' to iLines.
6669 append iLines.
6670 perform buildFooterMessage using iLines.
6671 append iLines.
6672 else.
6673 perform convertCodeToHtml using iLines[]
6674 htmlPageName
6675 space
6676 IS_DOCUMENTATION
6677 TRUE
6678 space
6679 space
6680 space
6681 space
6682 space
6683 addBackground.
6684 endif.
6685
6686 perform buildFilename using userFilePath
6687 subDir
6688 className
6689 space
6690 space
6691 fileExtension
6692 IS_DOCUMENTATION
6693 saveToServer
6694 slashSeparator
6695 newFilenameWithPath
6696 newFilenameOnly
6697 newSubDirectory
6698 completeSavePath.
6699
6700 if saveToServer is initial.
6701 perform saveFileToPC using iLines[]
6702 newFilenameWithPath
6703 newfilenameOnly
6704 space
6705 space
6706 displayProgressMessage.
6707 else.
6708 perform saveFileToServer using iLines[]
6709 newFilenameWithPath
6710 newfilenameOnly
6711 completeSavePath
6712 displayProgressMessage
6713 locServerFileSystem.
6714 endif.
6715
6716 documentationDownloaded = TRUE.
6717 endif.
6718endform.
6719
6720
6721
6722form downloadScreens using iLocScreenFlow like dumiScreen[]
6723 value(programName)
6724 value(userFilePath)
6725 value(textFileExtension)
6726 value(subdir)
6727 value(slashSeparator)
6728 value(saveToServer)
6729 value(displayProgressMessage)
6730 value(locServerFileSystem).
6731
6732
6733tables: d020t.
6734data: header like d020s.
6735data: iFields type standard table of d021s with header line.
6736data: iFlowLogic type standard table of d022s with header line.
6737field-symbols <waScreen> type tScreenFlow.
6738data: waCharHeader type scr_chhead.
6739data: iScreenChar type standard table of scr_chfld with header line.
6740data: iFieldsChar type standard table of scr_chfld with header line.
6741data: stars type string value '****************************************************************'.
6742data: comment1 type string value '* This file was generated by Direct Download Enterprise. *'.
6743data: comment2 type string value '* Please do not change it manually. *'.
6744data: dynproText type string value '%_DYNPRO'.
6745data: headerText type string value '%_HEADER'.
6746data: paramsText type string value '%_PARAMS'.
6747data: descriptionText type string value '%_DESCRIPTION'.
6748data: fieldsText type string value '%_FIELDS'.
6749data: flowlogicText type string value '%_FLOWLOGIC'.
6750data: programLength type string.
6751data: newSubDirectory type string.
6752data: newFilenameWithPath type string.
6753data: newFilenameOnly type string.
6754data: completeSavePath type string.
6755
6756 loop at iLocScreenFlow assigning <waScreen>.
6757 call function 'RS_IMPORT_DYNPRO'
6758 exporting
6759 dylang = pMLang
6760 dyname = programName
6761 dynumb = <waScreen>-screen
6762 importing
6763 header = header
6764 tables
6765 ftab = iFields
6766 pltab = iFlowLogic.
6767
6768 call function 'RS_SCRP_HEADER_RAW_TO_CHAR'
6769 exporting
6770 header_int = header
6771 importing
6772 header_char = waCharHeader
6773 exceptions
6774 others = 1.
6775
6776
6777 append stars to iScreenChar .
6778 append comment1 to iScreenChar.
6779 append comment2 to iScreenChar.
6780 append stars to iScreenChar.
6781
6782
6783 append dynproText to iScreenChar.
6784 append waCharHeader-prog to iScreenChar.
6785 append waCharHeader-dnum to iScreenChar.
6786 append sy-saprl to iScreenChar.
6787 describe field d020t-prog length programLength in character mode.
6788 concatenate ` ` programLength into iScreenChar.
6789 append iScreenChar.
6790
6791
6792 append headerText to iScreenChar.
6793 append waCharHeader to iScreenChar.
6794
6795
6796 append descriptionText to iScreenChar.
6797 select single dtxt from d020T into iScreenChar
6798 where prog = programName
6799 and dynr = <waScreen>-screen
6800 and lang = pMLang.
6801 append iScreenChar.
6802
6803
6804 append fieldsText to iScreenChar.
6805
6806 call function 'RS_SCRP_FIELDS_RAW_TO_CHAR'
6807 tables
6808 fields_int = iFields[]
6809 fields_char = iFieldsChar[]
6810 exceptions
6811 others = 1.
6812
6813 loop at iFieldsChar.
6814 move-corresponding iFieldsChar to iScreenChar.
6815 append iScreenChar.
6816 endloop.
6817
6818
6819 append flowlogicText to iScreenChar.
6820
6821 loop at iFlowLogic.
6822 append iFlowLogic to iScreenChar.
6823 endloop.
6824
6825 perform buildFilename using userFilePath
6826 subDir
6827 waCharHeader-dnum
6828 space
6829 space
6830 textFileExtension
6831 IS_SCREEN
6832 saveToServer
6833 slashSeparator
6834 newFilenameWithPath
6835 newfilenameOnly
6836 newSubDirectory
6837 completeSavePath.
6838
6839 if saveToServer is initial.
6840
6841 perform saveFileToPc using iScreenChar[]
6842 newFilenameWithPath
6843 newFilenameOnly
6844 'X'
6845 'X'
6846 displayProgressMessage.
6847 else.
6848
6849 perform saveFileToServer using iScreenChar[]
6850 newFilenameWithPath
6851 newFilenameOnly
6852 completeSavePath
6853 displayProgressMessage
6854 locServerFileSystem.
6855 endif.
6856
6857 clear header. clear waCharHeader.
6858 clear iScreenChar[].
6859 clear iFieldsChar[].
6860 clear iFields[].
6861 clear iFlowLogic[].
6862 endloop.
6863endform.
6864
6865
6866
6867
6868form downloadGUITitles using iLocGUITitles like dumIGUITitle[]
6869 value(userFilePath)
6870 value(textFileExtension)
6871 value(subDir)
6872 value(slashSeparator)
6873 value(saveToServer)
6874 value(displayProgressMessage)
6875 value(locServerFileSystem).
6876
6877data: iLines type standard table of string with header line.
6878field-symbols: <waGUITitle> type tGUITitle.
6879data: newSubDirectory type string.
6880data: newFilenameWithPath type string.
6881data: newFilenameOnly type string.
6882data: completeSavePath type string.
6883
6884 loop at iLocGUITitles assigning <waGUITitle>.
6885 append <waGUITitle>-text to iLines.
6886
6887 perform buildFilename using userFilePath
6888 subDir
6889 <waGUITitle>-obj_code
6890 space
6891 space
6892 textFileExtension
6893 IS_GUITITLE
6894 saveToServer
6895 slashSeparator
6896 newFilenameWithPath
6897 newfilenameOnly
6898 newSubDirectory
6899 completeSavePath.
6900
6901 if saveToServer is initial.
6902 perform saveFileToPc using iLines[]
6903 newFilenameWithPath
6904 newFilenameOnly
6905 space
6906 space
6907 displayProgressMessage.
6908 else.
6909 perform saveFileToServer using iLines[]
6910 newFilenameWithPath
6911 newFilenameOnly
6912 completeSavePath
6913 displayProgressMessage
6914 locServerFileSystem.
6915 endif.
6916
6917 clear iLines[].
6918 endloop.
6919endform.
6920
6921
6922
6923
6924form downloadPrograms using iLocProgram like iPrograms[]
6925 iLocFunctions like iFunctions[]
6926 iLocDictionaryFilename like iDictFilename[]
6927 iLocTableTypeFilename like iTableTypeFilename[]
6928 value(userFilePath)
6929 value(fileExtension)
6930 value(htmlFileExtension)
6931 value(textFileExtension)
6932 value(convertToHtml)
6933 value(customerNameRange)
6934 value(getIncludes)
6935 value(getDictStruct)
6936 value(downloadDocumentation)
6937 value(sortTablesAsc)
6938 value(slashSeparator)
6939 value(saveToServer)
6940 value(displayProgressMessage)
6941 value(locServerFileSystem)
6942 value(addBackground) type abap_bool.
6943
6944
6945data: iProgFunctions type standard table of tFunction with header line.
6946field-symbols: <waProgram> type tProgram.
6947field-symbols: <waInclude> type tInclude.
6948data: iEmptyTextelements type standard table of tTextTable.
6949data: iEmptySelectionTexts type standard table of tTextTable.
6950data: iEmptyMessages type standard table of tMessage.
6951data: iEmptyGuiTitles type standard table of tGUITitle.
6952data: locConvertToHtml(1).
6953data: locFileExtension type string.
6954
6955 sort iLocProgram ascending by progname.
6956
6957 loop at iLocProgram assigning <waProgram>.
6958
6959 if <waprogram>-progname = sy-cprog.
6960 locConvertToHtml = ''.
6961 locFileExtension = TEXTEXTENSION.
6962 else.
6963 locConvertToHtml = convertToHtml.
6964 locFileExtension = fileExtension.
6965 endif.
6966
6967
6968 perform readIncludeAndDownload using <waProgram>-iTextelements[]
6969 <waProgram>-iSelectionTexts[]
6970 <waProgram>-iMessages[]
6971 <waProgram>-iGUITitle[]
6972 <waprogram>-progname
6973 space
6974 <waprogram>-programTitle
6975 IS_PROGRAM
6976 userFilePath
6977 locFileExtension
6978 <waprogram>-progname
6979 locConvertToHtml
6980 customerNameRange
6981 getIncludes
6982 getDictStruct
6983 slashSeparator
6984 saveToServer
6985 displayProgressMessage
6986 locServerFileSystem
6987 addBackground.
6988
6989
6990 if not <waProgram>-iScreenFlow[] is initial.
6991 perform downloadScreens using <waProgram>-iScreenFlow[]
6992 <waProgram>-progname
6993 userFilePath
6994 textFileExtension
6995 <waprogram>-progname
6996 slashSeparator
6997 saveToServer
6998 displayProgressMessage
6999 locServerFileSystem.
7000 endif.
7001
7002
7003 if not <waProgram>-iGUITitle[] is initial.
7004 perform downloadGUITitles using <waProgram>-iGUITitle
7005 userFilePath
7006 textFileExtension
7007 <waProgram>-progName
7008 slashSeparator
7009 saveToServer
7010 displayProgressMessage
7011 locServerFileSystem.
7012 endif.
7013
7014
7015 loop at <waProgram>-iIncludes assigning <waInclude>.
7016 perform readIncludeAndDownload using iEmptyTextelements[]
7017 iEmptySelectionTexts[]
7018 iEmptyMessages[]
7019 iEmptyGuiTitles[]
7020 <waInclude>-IncludeName
7021 space
7022 <waInclude>-IncludeTitle
7023 IS_PROGRAM
7024 userFilePath
7025 fileExtension
7026 <waProgram>-progName
7027 convertToHtml
7028 customerNameRange
7029 getIncludes
7030 getDictStruct
7031 slashSeparator
7032 saveToServer
7033 displayProgressMessage
7034 locServerFileSystem
7035 addBackground.
7036
7037 endloop.
7038
7039
7040 if not <waProgram>-iDictStruct[] is initial.
7041 perform downloadDDStructures using <waProgram>-iDictStruct[]
7042 iLocDictionaryFilename[]
7043 userFilePath
7044 htmlFileExtension
7045 <waProgram>-progName
7046 sortTablesAsc
7047 slashSeparator
7048 saveToServer
7049 displayProgressMessage
7050 locServerFileSystem
7051 addBackground.
7052 endif.
7053
7054
7055 if not <waProgram>-iTableTypes[] is initial.
7056 perform downloadDDTableTypes using <waProgram>-iTableTypes[]
7057 iLocTableTypeFilename[]
7058 userFilePath
7059 htmlFileExtension
7060 <waProgram>-progName
7061 sortTablesAsc
7062 slashSeparator
7063 saveToServer
7064 displayProgressMessage
7065 locServerFileSystem
7066 addBackground.
7067 endif.
7068
7069
7070 if not <waProgram>-iTransformations[] is initial.
7071 perform downloadXSLT using <waProgram>-iTransformations[]
7072 userFilePath
7073 fileExtension
7074 htmlFileExtension
7075 textFileExtension
7076 convertToHtml
7077 customerNamespace
7078 slashSeparatorToUse
7079 saveToServer
7080 <waProgram>-progName
7081 displayProgressMessage
7082 serverFileSystem
7083 addBackground.
7084 endif.
7085
7086
7087 loop at iLocFunctions into iProgFunctions where programLinkName = <waProgram>-progName.
7088 append iProgFunctions.
7089 endloop.
7090
7091 if not iProgFunctions[] is initial.
7092 perform downloadFunctions using iProgFunctions[]
7093 iLocDictionaryFilename[]
7094 iTableTypeFilename[]
7095 userFilePath
7096 fileExtension
7097 <waProgram>-progName
7098 downloadDocumentation
7099 convertToHtml
7100 customerNameRange
7101 getIncludes
7102 getDictStruct
7103 textFileExtension
7104 htmlFileExtension
7105 sortTablesAsc
7106 slashSeparator
7107 saveToServer
7108 displayProgressMessage
7109 locServerFileSystem
7110 addBackground.
7111 clear iProgFunctions[].
7112 endif.
7113 endloop.
7114endform.
7115
7116
7117
7118
7119form downloadClasses using iLocClasses like iClasses[]
7120 iLocFunctions like iFunctions[]
7121 iLocDictionaryFilename like iDictFilename[]
7122 iLocTableTypeFilename like iTableTypeFilename[]
7123 value(userFilePath)
7124 value(fileExtension)
7125 value(htmlFileExtension)
7126 value(textFileExtension)
7127 value(convertToHtml)
7128 value(customerNameRange)
7129 value(getIncludes)
7130 value(getDictStruct)
7131 value(downloadDocumentation)
7132 value(sortTablesAsc)
7133 value(slashSeparator)
7134 value(saveToServer)
7135 value(displayProgressMessage)
7136 value(locServerFileSystem)
7137 value(addBackground) type abap_bool.
7138
7139
7140data: iClassFunctions type standard table of tFunction with header line.
7141field-symbols: <waClass> type tClass.
7142field-symbols: <waMethod> type tMethod.
7143data: additionalSubDirectory type string.
7144data: classDocumentationExists type abap_bool value FALSE.
7145
7146 sort iLocClasses ascending by clsname.
7147
7148 loop at iLocClasses assigning <waClass>.
7149
7150 perform readClassAndDownload using <waClass>
7151 <waClass>-clsname
7152 space
7153 IS_CLASS
7154 userFilePath
7155 fileExtension
7156 space
7157 convertToHtml
7158 customerNameRange
7159 getIncludes
7160 getDictStruct
7161 slashSeparator
7162 saveToServer
7163 displayProgressMessage
7164 locServerFileSystem
7165 addBackground.
7166
7167
7168
7169 loop at <waClass>-iMethods assigning <waMethod>.
7170 additionalSubDirectory = <waClass>-clsName.
7171 perform readMethodAndDownload using <waMethod>
7172 <waMethod>-cmpName
7173 <waMethod>-methodKey
7174 space
7175 IS_METHOD
7176 userFilePath
7177 fileExtension
7178 additionalSubDirectory
7179 convertToHtml
7180 customerNameRange
7181 getIncludes
7182 getDictStruct
7183 slashSeparator
7184 saveToServer
7185 displayProgressMessage
7186 locServerFileSystem
7187 addBackground.
7188
7189 endloop.
7190
7191
7192 if not <waClass>-iDictStruct[] is initial.
7193 perform downloadDDStructures using <waClass>-iDictStruct[]
7194 iLocDictionaryFilename[]
7195 userFilePath
7196 htmlFileExtension
7197 <waClass>-clsName
7198 sortTablesAsc
7199 slashSeparator
7200 saveToServer
7201 displayProgressMessage
7202 locServerFileSystem
7203 addBackground.
7204 endif.
7205
7206
7207 if not <waClass>-iTableTypes[] is initial.
7208 perform downloadDDTableTypes using <waClass>-iTableTypes[]
7209 iLocTableTypeFilename[]
7210 userFilePath
7211 htmlFileExtension
7212 <waClass>-clsName
7213 sortTablesAsc
7214 slashSeparator
7215 saveToServer
7216 displayProgressMessage
7217 locServerFileSystem
7218 addBackground.
7219 endif.
7220
7221
7222 if not <waClass>-iTransformations[] is initial.
7223 perform downloadXSLT using <waClass>-iTransformations[]
7224 userFilePath
7225 fileExtension
7226 htmlFileExtension
7227 textFileExtension
7228 convertToHtml
7229 customerNamespace
7230 slashSeparatorToUse
7231 saveToServer
7232 <waClass>-clsName
7233 displayProgressMessage
7234 serverFileSystem
7235 addBackground.
7236 endif.
7237
7238
7239 loop at iLocFunctions into iClassFunctions where programLinkName = <waClass>-clsName.
7240 append iClassFunctions.
7241 endloop.
7242
7243 if not iClassFunctions[] is initial.
7244 perform downloadFunctions using iClassFunctions[]
7245 iLocDictionaryFilename[]
7246 iLocTableTypeFilename[]
7247 userFilePath
7248 fileExtension
7249 <waClass>-clsName
7250 downloadDocumentation
7251 convertToHtml
7252 customerNameRange
7253 getIncludes
7254 getDictStruct
7255 textFileExtension
7256 htmlFileExtension
7257 sortTablesAsc
7258 slashSeparator
7259 saveToServer
7260 displayProgressMessage
7261 locServerFileSystem
7262 addBackground.
7263 clear iClassFunctions[].
7264 endif.
7265
7266 if downloadDocumentation = TRUE.
7267 perform downloadClassDocs using <waClass>-clsName
7268 userFilePath
7269 fileExtension
7270 convertToHtml
7271 slashSeparator
7272 saveToServer
7273 displayProgressMessage
7274 ''
7275 classDocumentationExists
7276 locServerFileSystem
7277 addBackground.
7278 endif.
7279 endloop.
7280endform.
7281
7282
7283
7284
7285form downloadXslt using iLocTransformation like iTransformations[]
7286 value(userFilePath)
7287 value(fileExtension)
7288 value(htmlFileExtension)
7289 value(textFileExtension)
7290 value(convertToHtml)
7291 value(customerNameRange)
7292 value(slashSeparator)
7293 value(saveToServer)
7294 value(subdir)
7295 value(displayProgressMessage)
7296 value(locServerFileSystem)
7297 value(addBackground) type abap_bool.
7298
7299field-symbols: <waTransformation> type tTransformation.
7300
7301 sort iLocTransformation ascending.
7302
7303 loop at iLocTransformation assigning <waTransformation>.
7304
7305 perform readXsltAndDownload using <waTransformation>-xsltname
7306 <waTransformation>-xsltDesc
7307 userFilePath
7308 fileExtension
7309 convertToHtml
7310 customerNameRange
7311 slashSeparator
7312 saveToServer
7313 subdir
7314 displayProgressMessage
7315 locServerFileSystem
7316 addBackground.
7317 endloop.
7318endform.
7319
7320
7321
7322
7323
7324form reFormatClassCode using iTempLines like dumiHtml[].
7325
7326field-symbols: <waLine> type string.
7327data: newLine type string.
7328data: iNewTable type standard table of string.
7329data: foundOne type abap_bool value FALSE.
7330
7331 loop at iTempLines assigning <waLine>.
7332 if not <waLine> is initial.
7333 if foundOne = FALSE.
7334 find 'data' in <waLine> respecting case.
7335 if sy-subrc = 0.
7336 foundOne = TRUE.
7337 endif.
7338
7339 find 'constants' in <waLine> respecting case.
7340 if sy-subrc = 0.
7341 foundOne = TRUE.
7342 endif.
7343
7344 if foundOne = TRUE.
7345 newLine = <waLine>.
7346
7347 if ( newLine cs '.' or newLine cs '*' ).
7348 replace '!' in <waLine> with ''.
7349 append newLine to iNewTable.
7350 clear newLine.
7351 foundOne = FALSE.
7352 endif.
7353 else.
7354 replace '!' in <waLine> with ''.
7355 append <waLine> to iNewTable.
7356 endif.
7357 else.
7358 concatenate newLine <waLine> into newLine separated by space.
7359 if ( newLine cs '.' or newLine cs '*' ).
7360 append newLine to iNewTable.
7361 clear newLine.
7362 foundOne = FALSE.
7363 endif.
7364 endif.
7365 else.
7366 replace '!' in <waLine> with ''.
7367 append <waLine> to iNewTable[].
7368 endif.
7369 endloop.
7370
7371 iTempLines[] = iNewTable[].
7372endform.
7373
7374
7375
7376
7377
7378
7379
7380
7381form convertDDToHTML using iLocDictStructure like dumiDictStructure[]
7382 iLocHtml like dumiHtml[]
7383 value(tableName)
7384 value(tableTitle)
7385 value(sortTablesAsc)
7386 value(addBackground) type abap_bool..
7387
7388data: iColumnCaptions type standard table of string with header line.
7389data: waDictionary type tDictTableStructure.
7390data: waHtml type string.
7391data: title type string.
7392field-symbols: <iLocDictStructure> type tDictTableStructure.
7393
7394field-symbols: <fsField>.
7395
7396data: wTextCell type string.
7397data: rowCounter(3).
7398
7399data: wFieldBaseType.
7400
7401 perform buildDDColumnHeaders using iColumnCaptions[].
7402
7403
7404 concatenate 'Dictionary object-' tablename into title separated by space.
7405 perform addHTMLHeader using iLocHtml[]
7406 title
7407 addBackground
7408 SS_TABLE.
7409
7410 append `<body>` to iLocHtml.
7411 append ` <table class="outerTable">` to iLocHtml.
7412 append ` <tr>` to iLocHtml.
7413 concatenate ` <td><h2>Table: ` tableName '</h2>' into waHtml.
7414 append waHtml to iLocHtml.
7415 concatenate ` <h3>Description: ` tableTitle '</h3></td>' into waHtml.
7416 append waHtml to iLocHtml.
7417 append ` </tr>` to iLocHtml.
7418
7419 append ` <tr>` to iLocHtml.
7420 append ` <td><!--This is where our main table begins -->` to iLocHtml.
7421 append `<table class="innerTable">` to iLocHtml.
7422
7423
7424 if not sortTablesAsc is initial.
7425 sort iLocDictStructure ascending by fieldname.
7426 endif.
7427
7428
7429 append `<tr>` to iLocHtml.
7430 loop at iColumnCaptions.
7431 concatenate ` <th>` iColumnCaptions `</th>` into waHtml.
7432 append waHtml to iLocHtml.
7433 endloop.
7434 append `</tr>` to iLocHtml.
7435
7436
7437 loop at iLocDictStructure assigning <iLocDictStructure>.
7438 append `<tr class="cell">` to iLocHtml.
7439 rowcounter = rowcounter + 1.
7440 concatenate ` <td>` rowcounter `</td>` into waHtml.
7441 append waHtml to iLocHtml.
7442
7443 do.
7444
7445 assign component sy-index of structure <iLocDictStructure> to <fsField>.
7446 if sy-subrc = 0.
7447 describe field <fsField> type wFieldBaseType.
7448 if wFieldBaseType <> 'h'.
7449 move <fsField> to wTextCell.
7450 waHtml = ` <td>`.
7451
7452
7453 if wTextCell is initial.
7454 concatenate waHtml ' ' '</td>' into waHtml.
7455 else.
7456 concatenate waHtml wTextCell '</td>' into waHtml.
7457 endif.
7458
7459 append waHtml to iLocHtml.
7460 clear waHtml.
7461 endif.
7462 else.
7463 exit.
7464 endif.
7465 enddo.
7466
7467 append `</tr>` to iLocHtml.
7468 endloop.
7469
7470 append ` </table>` to iLocHtml.
7471 append ` </td>` to iLocHtml.
7472 append ` </tr>` to iLocHtml.
7473 append '<br/>' to iLocHtml.
7474
7475
7476 perform addDomainToHTML using iLocDictStructure[]
7477 iLocHtml[].
7478
7479
7480 perform addHtmlFooter using iLocHtml[].
7481endform.
7482
7483
7484
7485
7486form addDomaintoHTML using iLocDictStructure like dumiDictStructure[]
7487 iLocHtml like dumiHtml[].
7488
7489data: iColumnCaptions type standard table of string with header line.
7490data: waDictionary type tDictTableStructure.
7491data: waHtml type string.
7492data: title type string.
7493field-symbols: <iLocDictStructure> type tDictTableStructure.
7494data: iDomStructure type standard table of tDomainStructure with header line.
7495
7496field-symbols: <fsField>.
7497
7498data: wTextCell type string.
7499data: rowCounter(3).
7500
7501data: wFieldBaseType.
7502data: addedHeader type flag value ''.
7503
7504 perform buildDomColumnHeaders using iColumnCaptions[].
7505
7506
7507 loop at iLocDictStructure assigning <iLocDictStructure>.
7508 loop at <iLocDictStructure>-iDomains into iDomStructure.
7509
7510 if addedHeader = ''.
7511 append ` <table class="outerTable">` to iLocHtml.
7512 append ` <tr>` to iLocHtml.
7513 concatenate ` <td><h2>Fixed Domain Values ` '</h2>' into waHtml.
7514 append waHtml to iLocHtml.
7515 append ` </tr>` to iLocHtml.
7516
7517 append ` <tr>` to iLocHtml.
7518 append ` <td><!--This is where our main table begins -->` to iLocHtml.
7519 append `<table class="innerTable">` to iLocHtml.
7520
7521
7522 append `<tr>` to iLocHtml.
7523 loop at iColumnCaptions.
7524 concatenate ` <th>` iColumnCaptions `</th>` into waHtml.
7525 append waHtml to iLocHtml.
7526 endloop.
7527 append `</tr>` to iLocHtml.
7528 addedHeader = 'X'.
7529 endif.
7530
7531 append `<tr class="cell">` to iLocHtml.
7532 do.
7533
7534 assign component sy-index of structure iDomStructure to <fsField>.
7535 if sy-subrc = 0.
7536 describe field <fsField> type wFieldBaseType.
7537 if wFieldBaseType <> 'h'.
7538 move <fsField> to wTextCell.
7539 waHtml = ` <td>`.
7540
7541
7542 if wTextCell is initial.
7543 concatenate waHtml ' ' '</td>' into waHtml.
7544 else.
7545 concatenate waHtml wTextCell '</td>' into waHtml.
7546 endif.
7547
7548 append waHtml to iLocHtml.
7549 clear waHtml.
7550 endif.
7551 else.
7552 exit.
7553 endif.
7554 enddo.
7555
7556 append `</tr>` to iLocHtml.
7557 endloop.
7558 endloop.
7559
7560 if addedHeader = 'X'.
7561 append ` </table>` to iLocHtml.
7562 append ` </td>` to iLocHtml.
7563 append ` </tr>` to iLocHtml.
7564 endif.
7565endform.
7566
7567
7568
7569form convertTableTypeToHtml using iLocTableTypes like iTableTypes[]
7570 iLocHtml like dumIhtml[]
7571 value(tableName)
7572 value(tableTitle)
7573 value(sortTablesAsc)
7574 value(addBackground) type abap_bool.
7575
7576 data: iColumnCaptions type standard table of string with header line.
7577 data: waDictionary type tDictTableStructure.
7578 data: waHtml type string.
7579 data: title type string.
7580 field-symbols: <iLocTableType> like line of iLocTableTypes.
7581
7582 field-symbols: <fsField>.
7583
7584 data: wTextCell type string.
7585 data: rowCounter(3).
7586
7587 perform buildColumnHeadersTableTypes using iColumnCaptions[].
7588
7589
7590 concatenate 'Dictionary object (Table Type)-' tablename into title separated by space.
7591 perform addHtmlHeader using iLocHtml[]
7592 title
7593 addBackground
7594 SS_TABLE.
7595
7596 append '<body>' to ilocHtml.
7597 append ' <table class="outerTable">' to iLocHtml.
7598 append ' <tr>' to iLocHtml.
7599 concatenate ' <td><h2>Table: ' tablename '</h2>' into waHtml.
7600 append wahtml to iLocHtml.
7601 concatenate ' <h3>Description: ' tableTitle '</h3></td>' into waHtml.
7602 append wahtml to iLocHtml.
7603 append ' </tr>' to iLocHtml.
7604
7605 append ' <tr>' to iLocHtml.
7606 append ' <td><!--This is where our main table begins -->' to iLocHtml.
7607 append '<table class="innerTable">' to iLocHtml.
7608
7609
7610 append '<tr>' to iLocHtml.
7611 loop at iColumnCaptions.
7612 concatenate ' <th>' iColumnCaptions '</th>' into waHtml.
7613 append waHtml to iLocHtml.
7614 endloop.
7615 append '</tr>' to iLocHtml.
7616
7617
7618 loop at iLocTableTypes assigning <iLocTableType>.
7619 append '<tr class="cell">' to iLocHtml.
7620 rowCounter = rowCounter + 1.
7621 concatenate ' <td>' rowCounter '</td>' into waHtml.
7622 append waHtml to iLocHtml.
7623
7624 do.
7625
7626 assign component sy-index of structure <iLocTableType> to <fsField>.
7627 if sy-subrc = 0.
7628 move <fsField> to wTextCell.
7629 waHtml = ' <td>'.
7630
7631
7632 if wTextCell is initial.
7633 concatenate waHtml ' ' '</td>' into waHtml.
7634 else.
7635 concatenate waHtml wTextCell '</td>' into waHtml.
7636 endif.
7637
7638 append waHtml to iLocHtml.
7639 clear waHtml.
7640 else.
7641 exit.
7642 endif.
7643 enddo.
7644
7645 append '</tr>' to iLocHtml.
7646 endloop.
7647
7648 append ' </table>' to iLocHtml.
7649 append ' </td>' to iLocHtml.
7650 append ' </tr>' to iLocHtml.
7651
7652
7653 perform addHtmlFooter using iLocHtml[].
7654endform.
7655
7656
7657
7658
7659
7660form convertCodeToHtml using iContents like dumIHtml[]
7661 value(programName)
7662 value(ShortDescription)
7663 value(sourceCodeType)
7664 value(functionDocumentationExists)
7665 value(isMainFunctionInclude)
7666 value(htmlExtension)
7667 value(customerNameRange)
7668 value(getIncludes)
7669 value(getDictStructures)
7670 value(addBackground) type abap_bool.
7671
7672data: htmlTable type standard table of string with header line.
7673data: head(255).
7674data: tail(255).
7675data: myTabix type syTabix.
7676data: nextLine type syTabix.
7677data: hyperlinkName type string.
7678data: copyOfCurrentLine type string.
7679data: currentLineLength type i value 0.
7680data: copyLineLength type i value 0.
7681data: ignoreFutureLines type abap_bool value FALSE.
7682data: foundAsterix type abap_bool value FALSE.
7683data: lowercaseLink type string.
7684data: waNextLine type string.
7685data: waContent type string.
7686data: inCommentMode type abap_bool value 'X'.
7687
7688
7689 perform addHTMLHeader using htmlTable[]
7690 programName
7691 addBackground
7692 SS_CODE.
7693
7694 append '<body>' to htmlTable.
7695
7696 append '<table class="outerTable">' to htmlTable.
7697 append ` <tr class="normalBoldLarge">` to htmlTable.
7698
7699 concatenate ` <td><h2>Code listing for: ` programName `</h2>` into htmlTable.
7700 append htmlTable.
7701
7702 concatenate `<h3> Description: ` ShortDescription `</h3></td>` into htmlTable.
7703 append htmlTable.
7704 append ` </tr>` to htmlTable.
7705
7706
7707 append ` <tr>` to htmlTable.
7708 append ` <td>` to htmlTable.
7709
7710
7711 append ` <table class="innerTable">` to htmlTable.
7712 append ` <tr>` to htmlTable.
7713 append ` <td>` to htmlTable.
7714
7715
7716 loop at iContents into waContent.
7717 myTabix = sy-tabix.
7718
7719 if not ( waContent is initial ).
7720 while ( waContent cs '<' or waContent cs '>' ).
7721 replace '<' in waContent with LT.
7722 replace '>' in waContent with GT.
7723 endwhile.
7724
7725 if waContent+0(1) <> ASTERIX.
7726 if myTabix = 1.
7727 append ` <div class="code">` to htmlTable.
7728 inCommentMode = FALSE.
7729 else.
7730 if inCommentMode = TRUE.
7731 append ` </div>` to htmlTable.
7732 inCommentMode = FALSE.
7733 append ` <div class="code">` to htmlTable.
7734 endif.
7735 endif.
7736
7737 currentLineLength = strlen( waContent ).
7738 copyOfCurrentLine = waContent.
7739
7740
7741 if sourceCodeType <> IS_DOCUMENTATION.
7742
7743 if ( waContent cs CALLFUNCTION ) and ( waContent <> 'DESTINATION' ).
7744 nextLine = myTabix + 1.
7745 read table iContents into waNextLine index nextLine.
7746 translate waNextLine to upper case.
7747 if waNextLine ns 'DESTINATION'.
7748 shift copyOfCurrentLine left deleting leading space.
7749
7750 copyLineLength = strlen( copyofCurrentLine ).
7751
7752 split copyOfCurrentLine at space into head tail.
7753 split tail at space into head tail.
7754 split tail at space into head tail.
7755
7756 translate head using ''' '.
7757 shift head left deleting leading space.
7758
7759 try.
7760 if head+0(1) = 'Y' or head+0(1) = 'Z' or head+0(1) = 'y' or head+0(1) = 'z' or head cs customerNameRange.
7761
7762 hyperLinkName = head.
7763
7764 if sourceCodeType = IS_FUNCTION.
7765 copyOfCurrentLine = 'call function <a href ="../'.
7766 else.
7767 copyOfCurrentLine = 'call function <a href ="'.
7768 endif.
7769
7770 lowercaseLink = hyperlinkName.
7771 translate lowercaseLink to lower case.
7772
7773 if frontendOpSystem = NON_UNIX.
7774 translate lowercaseLink using '/_'.
7775 endif.
7776
7777 concatenate copyOfCurrentLine
7778 lowercaseLink
7779 '/'
7780 lowercaseLink
7781 Period htmlExtension '">'
7782 ''''
7783 hyperlinkName
7784 ''''
7785 '</a>'
7786 tail into copyOfCurrentLine.
7787
7788
7789 while copyLineLength < currentLineLength.
7790 shift copyOfCurrentLine right by 1 places.
7791 copyLineLength = copyLineLength + 1.
7792 endwhile.
7793
7794 waContent = copyOfCurrentLine.
7795 endif.
7796 catch cx_sy_range_out_of_bounds into objRuntimeError.
7797 endtry.
7798 endif.
7799 endif.
7800 endif.
7801
7802
7803 if waContent cs INCLUDE or waContent cs LOWINCLUDE.
7804 shift copyOfCurrentLine left deleting leading space.
7805 copyLineLength = strlen( copyOfCurrentLine ).
7806
7807 split copyOfCurrentLine at space into head tail.
7808 shift tail left deleting leading space.
7809
7810 try.
7811 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' )
7812 and not getIncludes is initial and tail ns STRUCTURE and tail ns LOWSTRUCTURE.
7813
7814
7815 clear waContent.
7816 shift tail left deleting leading space.
7817 split tail at PERIOD into hyperlinkName tail.
7818 copyOfCurrentLine = 'include <a href ="'.
7819
7820 lowercaseLink = hyperlinkName.
7821 translate lowercaseLink to lower case.
7822
7823
7824 if frontendOpSystem = NON_UNIX.
7825 translate lowercaseLink using '/_'.
7826 endif.
7827
7828 concatenate copyOfCurrentLine
7829 lowercaseLink
7830 PERIOD htmlExtension '">'
7831 hyperlinkName
7832 '</a>'
7833 PERIOD tail into copyOfCurrentLine.
7834
7835
7836 while copyLineLength < currentLineLength.
7837 shift copyOfCurrentLine right by 1 places.
7838 copyLineLength = copyLineLength + 1.
7839 endwhile.
7840 waContent = copyOfCurrentLine.
7841 else.
7842 if not getDictStructures is initial.
7843
7844 copyLineLength = strlen( copyofCurrentLine ).
7845 split copyOfCurrentLine at space into head tail.
7846 shift tail left deleting leading space.
7847 split tail at space into head tail.
7848
7849 try.
7850 if tail+0(1) = 'Y' or tail+0(1) = 'Z' or tail+0(1) = 'y' or tail+0(1) = 'z' or tail cs customerNameRange.
7851 clear waContent.
7852 shift tail left deleting leading space.
7853 split tail at PERIOD into hyperlinkName tail.
7854 copyOfCurrentLine = 'include structure <a href ='.
7855
7856 lowercaseLink = hyperlinkName.
7857 translate lowercaseLink to lower case.
7858
7859 if frontendOpSystem = NON_UNIX.
7860 translate lowercaseLink using '/_'.
7861 endif.
7862
7863 concatenate copyOfCurrentLine
7864 '"'
7865 lowercaseLink
7866 '/'
7867 'dictionary-'
7868 lowercaseLink
7869 PERIOD htmlExtension
7870 '">'
7871 hyperlinkName
7872 '</a>'
7873 PERIOD tail into copyOfCurrentLine.
7874
7875
7876 while copyLineLength < currentLineLength.
7877 shift copyOfCurrentLine right by 1 places.
7878 copyLineLength = copyLineLength + 1.
7879 endwhile.
7880 waContent = copyOfCurrentLine.
7881 endif.
7882 catch cx_sy_range_out_of_bounds into objRuntimeError.
7883 endtry.
7884 endif.
7885 endif.
7886 catch cx_sy_range_out_of_bounds into objRuntimeError.
7887 endtry.
7888 endif.
7889 else.
7890 if waContent+0(1) = ASTERIX.
7891 if myTabix = 1.
7892 append ` <div class="codeComment">` to htmlTable.
7893 inCommentMode = TRUE.
7894 else.
7895 if inCommentMode = FALSE.
7896 append ` </div>` to htmlTable.
7897 append ` <div class="codeComment">` to htmlTable.
7898 inCommentMode = TRUE.
7899 endif.
7900 endif.
7901 endif.
7902 endif.
7903
7904
7905 if inCommentMode = TRUE.
7906 while waContent cs ' '.
7907 replace space with ' ' into waContent.
7908 if sy-subrc <> 0.
7909 exit.
7910 endif.
7911 endwhile.
7912 endif.
7913 htmlTable = waContent.
7914
7915 try.
7916 if htmlTable+0(1) = ` `.
7917 while htmlTable cs ` `.
7918 replace ` ` with ' ' into htmlTable.
7919 if sy-subrc <> 0.
7920 exit.
7921 endif.
7922 endwhile.
7923 endif.
7924 catch cx_sy_range_out_of_bounds into objRuntimeError.
7925 endtry.
7926 else.
7927 htmlTable = ''.
7928 endif.
7929 concatenate htmlTable `<br />` into htmlTable.
7930 append htmlTable.
7931 endloop.
7932
7933 append ` </div>` to htmlTable.
7934 append ` </td>` to htmlTable.
7935 append ` </tr>` to htmlTable.
7936 append ` </table>` to htmlTable.
7937 append ` </td>` to htmlTable.
7938 append ` </tr>` to htmlTable.
7939
7940
7941 perform addHtmlFooter using htmlTable[].
7942
7943 iContents[] = htmlTable[].
7944endform.
7945
7946
7947
7948
7949form convertClassToHtml using iContents like dumIHtml[]
7950 value(className)
7951 value(ShortDescription)
7952 value(sourceCodeType)
7953 value(htmlExtension)
7954 value(customerNameRange)
7955 value(getDictStructures)
7956 value(addBackground) type abap_bool.
7957
7958data: htmlTable type standard table of string with header line.
7959data: myTabix type syTabix.
7960data: waContent type string.
7961data: head type string.
7962data: tail type string.
7963data: hyperlinkName type string.
7964data: lowercaseLink type string.
7965data: copyOfCurrentLine type string.
7966data: currentLineLength type i value 0.
7967data: copyLineLength type i value 0.
7968data: inCommentMode type abap_bool value 'X'.
7969data: methodDirectory type string.
7970
7971
7972 perform addHTMLHeader using htmlTable[]
7973 className
7974 addBackground
7975 SS_CODE.
7976
7977 append '<body>' to htmlTable.
7978
7979 append '<table class="outerTable">' to htmlTable.
7980 append ` <tr class="normalBoldLarge">` to htmlTable.
7981
7982 concatenate ` <td><h2>Code listing for class: ` className `</h2>` into htmlTable.
7983 append htmlTable.
7984
7985 concatenate `<h3> Description: ` ShortDescription `</h3></td>` into htmlTable.
7986 append htmlTable.
7987 append ` </tr>` to htmlTable.
7988
7989
7990 append ` <tr>` to htmlTable.
7991 append ` <td>` to htmlTable.
7992
7993
7994 append ` <table class="innerTable">` to htmlTable.
7995 append ` <tr>` to htmlTable.
7996 append ` <td>` to htmlTable.
7997
7998
7999 loop at iContents into waContent.
8000 myTabix = sy-tabix.
8001
8002
8003 if not ( waContent is initial ).
8004 if waContent+0(1) = ASTERIX.
8005 htmltable = wacontent.
8006 if myTabix = 1.
8007 append ` <div class="codeComment">` to htmlTable.
8008 inCommentMode = TRUE.
8009 else.
8010 if inCommentMode = FALSE.
8011 append ` </div>` to htmlTable.
8012 append ` <div class="codeComment">` to htmlTable.
8013 inCommentMode = TRUE.
8014 endif.
8015 endif.
8016 else.
8017 if myTabix = 1.
8018 append ` <div class="code">` to htmlTable.
8019 inCommentMode = FALSE.
8020 else.
8021 if inCommentMode = TRUE.
8022 append ` </div>` to htmlTable.
8023 inCommentMode = FALSE.
8024 append ` <div class="code">` to htmlTable.
8025 endif.
8026 endif.
8027
8028
8029 if not ( waContent is initial ).
8030 while ( waContent cs '<' or waContent cs '>' ).
8031 replace '<' in waContent with LT.
8032 replace '>' in waContent with GT.
8033 endwhile.
8034
8035
8036
8037 if wacontent CS 'public section.'.
8038 methoddirectory = 'public_methods'.
8039 elseif wacontent CS 'private section.'.
8040 methoddirectory = 'private_methods'.
8041 elseif wacontent CS 'protected section.'.
8042 methoddirectory = 'protected_methods'.
8043 endif.
8044
8045
8046 find regex '([:space:]*methods[:space:]*)(.*)' in wacontent
8047 ignoring case
8048 submatches head hyperlinkname.
8049
8050 if sy-subrc = 0.
8051 shift hyperlinkname left deleting leading space.
8052 concatenate methoddirectory
8053 '/'
8054 hyperlinkname
8055 '.html'
8056 into lowercaselink.
8057
8058 translate lowercaselink to lower case.
8059 concatenate head
8060 ' <a href="'
8061 lowercaselink
8062 '">'
8063 hyperlinkname
8064 '</a>'
8065 into wacontent.
8066 shift wacontent right by 2 places.
8067 endif.
8068
8069
8070 if not getDictStructures is initial.
8071 find 'class' in waContent ignoring case.
8072 if sy-subrc <> 0.
8073
8074 copyLineLength = strlen( waContent ).
8075 copyOfCurrentLine = waContent.
8076 split copyOfCurrentLine at space into head tail.
8077 shift tail left deleting leading space.
8078 split tail at space into head tail.
8079
8080 try.
8081 if tail+0(1) = 'Y' or tail+0(1) = 'Z' or tail+0(1) = 'y' or tail+0(1) = 'z' or tail cs customerNameRange.
8082 clear waContent.
8083 shift tail left deleting leading space.
8084 split tail at PERIOD into hyperlinkName tail.
8085 copyOfCurrentLine = 'include structure <a href ='.
8086
8087 lowercaseLink = hyperlinkName.
8088 translate lowercaseLink to lower case.
8089
8090 if frontendOpSystem = NON_UNIX.
8091 translate lowercaseLink using '/_'.
8092 endif.
8093
8094 concatenate copyOfCurrentLine
8095 '"'
8096 lowercaseLink
8097 '/'
8098 'dictionary-'
8099 lowercaseLink
8100 PERIOD htmlExtension
8101 '">'
8102 hyperlinkName
8103 '</a>'
8104 PERIOD tail into copyOfCurrentLine.
8105
8106
8107 while copyLineLength < currentLineLength.
8108 shift copyOfCurrentLine right by 1 places.
8109 copyLineLength = copyLineLength + 1.
8110 endwhile.
8111 waContent = copyOfCurrentLine.
8112 endif.
8113 catch cx_sy_range_out_of_bounds into objRuntimeError.
8114 endtry.
8115 endif.
8116 endif.
8117
8118 htmlTable = waContent.
8119
8120 try.
8121 if htmlTable+0(1) = ` `.
8122 while htmlTable cs ` `.
8123 replace ` ` with ' ' into htmlTable.
8124 if sy-subrc <> 0.
8125 exit.
8126 endif.
8127 endwhile.
8128 endif.
8129 catch cx_sy_range_out_of_bounds into objRuntimeError.
8130 endtry.
8131 else.
8132 htmlTable = ''.
8133 endif.
8134 endif.
8135 else.
8136 htmlTable = ''.
8137 endif.
8138
8139 concatenate htmlTable '<br />' into htmlTable.
8140 append htmlTable.
8141 endloop.
8142
8143 append ` </div>` to htmlTable.
8144 append ` </td>` to htmlTable.
8145 append ` </tr>` to htmlTable.
8146 append ` </table>` to htmlTable.
8147 append ` </td>` to htmlTable.
8148 append ` </tr>` to htmlTable.
8149
8150
8151 perform addHtmlFooter using htmlTable[].
8152
8153 iContents[] = htmlTable[].
8154endform.
8155
8156
8157
8158
8159form convertFunctionToHtml using iContents like dumIHtml[]
8160 value(functionName)
8161 value(ShortDescription)
8162 value(sourceCodeType)
8163 value(functionDocumentationExists)
8164 value(isMainFunctionInclude)
8165 value(htmlExtension)
8166 value(customerNameRange)
8167 value(getIncludes)
8168 value(getDictStructures)
8169 value(addBackground) type abap_bool.
8170
8171data: htmlTable type standard table of string with header line.
8172data: head(255).
8173data: tail(255).
8174data: myTabix type syTabix.
8175data: nextLine type syTabix.
8176data: hyperlinkName type string.
8177data: copyOfCurrentLine type string.
8178data: currentLineLength type i value 0.
8179data: copyLineLength type i value 0.
8180data: ignoreFutureLines type abap_bool value FALSE.
8181data: foundAsterix type abap_bool value FALSE.
8182data: lowercaseLink type string.
8183data: waNextLine type string.
8184data: waContent type string.
8185data: inCommentMode type abap_bool value 'X'.
8186
8187
8188 perform addHTMLHeader using htmlTable[]
8189 functionName
8190 addBackground
8191 SS_CODE.
8192
8193 append '<body>' to htmlTable.
8194
8195 append '<table class="outerTable">' to htmlTable.
8196 append ` <tr class="normalBoldLarge">` to htmlTable.
8197
8198 concatenate ` <td><h2>Code listing for function ` functionName `</h2>` into htmlTable.
8199 append htmlTable.
8200
8201 concatenate `<h3> Description: ` ShortDescription `</h3></td>` into htmlTable.
8202 append htmlTable.
8203 append ` </tr>` to htmlTable.
8204
8205
8206 append ` <tr>` to htmlTable.
8207 append ` <td>` to htmlTable.
8208
8209
8210 append ` <table class="innerTable">` to htmlTable.
8211 append ` <tr>` to htmlTable.
8212 append ` <td>` to htmlTable.
8213
8214 loop at iContents into waContent.
8215 myTabix = sy-tabix.
8216
8217
8218 if sourceCodeType = IS_FUNCTION and isMainFunctionInclude = TRUE.
8219 if not ( waContent is initial ).
8220 if sy-tabix > 1.
8221 if waContent+0(1) = ASTERIX and ignoreFutureLines = FALSE.
8222 foundAsterix = TRUE.
8223 else.
8224 if foundAsterix = TRUE.
8225
8226 append '' to HtmlTable.
8227
8228
8229 copyOfcurrentLine = '<div class="codeComment">* <a href ="' .
8230 lowercaseLink = functionName.
8231 translate lowercaseLink to lower case.
8232
8233 if frontendOpSystem = NON_UNIX.
8234 translate lowercaseLink using '/_'.
8235 endif.
8236
8237 concatenate copyOfCurrentLine 'global-' lowercaseLink
8238 PERIOD htmlExtension '">' 'Global data declarations' '</a>' into copyOfCurrentLine.
8239
8240 concatenate copyOfCurrentLine '</div><br />' into copyOfCurrentLine.
8241
8242 append copyOfCurrentLine to HtmlTable.
8243
8244
8245 if functionDocumentationExists = TRUE.
8246 copyOfcurrentLine = '<div class="codeComment">* <a href ="'.
8247
8248 lowercaseLink = functionName.
8249 translate lowercaseLink to lower case.
8250
8251 if frontendOpSystem = NON_UNIX.
8252 translate lowercaseLink using '/_'.
8253 endif.
8254
8255 concatenate copyOfCurrentLine
8256 'docs-'
8257 lowercaseLink
8258 PERIOD htmlExtension '">'
8259 'Function module documentation'
8260 '</a>'
8261 into copyOfCurrentLine.
8262
8263 concatenate copyOfCurrentLine '</div><br />' into copyOfCurrentLine.
8264 append copyOfCurrentLine to HtmlTable.
8265 endif.
8266
8267 foundAsterix = FALSE.
8268 ignoreFutureLines = TRUE.
8269 endif.
8270 endif.
8271 endif.
8272 endif.
8273 endif.
8274
8275
8276 if not ( waContent is initial ).
8277 while ( waContent cs '<' or waContent cs '>' ).
8278 replace '<' in waContent with LT.
8279 replace '>' in waContent with GT.
8280 endwhile.
8281
8282 if waContent+0(1) <> ASTERIX.
8283 if myTabix = 1.
8284 append ` <div class="code">` to htmlTable.
8285 incommentMode = FALSE.
8286 else.
8287 if inCommentMode = TRUE.
8288 append ` </div>` to htmlTable.
8289 inCommentMode = FALSE.
8290 append ` <div class="code">` to htmlTable.
8291 endif.
8292 endif.
8293
8294 currentLineLength = strlen( waContent ).
8295
8296
8297 if sourceCodeType <> IS_DOCUMENTATION.
8298
8299 if ( waContent cs CALLFUNCTION ) and ( waContent <> 'DESTINATION' ).
8300 nextLine = myTabix + 1.
8301 read table iContents into waNextLine index nextLine.
8302 translate waNextLine to upper case.
8303 if waNextLine ns 'DESTINATION'.
8304 copyOfCurrentLine = waContent.
8305 shift copyOfCurrentLine left deleting leading space.
8306
8307 copyLineLength = strlen( copyofCurrentLine ).
8308
8309 split copyOfCurrentLine at space into head tail.
8310 split tail at space into head tail.
8311 split tail at space into head tail.
8312
8313 translate head using ''' '.
8314 shift head left deleting leading space.
8315
8316 try.
8317 if head+0(1) = 'Y' or head+0(1) = 'Z' or head+0(1) = 'y' or head+0(1) = 'z' or head cs customerNameRange.
8318
8319
8320 hyperLinkName = head.
8321
8322 if sourceCodeType = IS_FUNCTION.
8323 copyOfCurrentLine = 'call function <a href ="../'.
8324 else.
8325 copyOfCurrentLine = 'call function <a href ="'.
8326 endif.
8327
8328 lowercaseLink = hyperlinkName.
8329 translate lowercaseLink to lower case.
8330
8331 if frontendOpSystem = NON_UNIX.
8332 translate lowercaseLink using '/_'.
8333 endif.
8334
8335 concatenate copyOfCurrentLine
8336 lowercaseLink
8337 '/'
8338 lowercaseLink
8339 Period htmlExtension '">'
8340 ''''
8341 hyperlinkName
8342 ''''
8343 '</a>'
8344 tail into copyOfCurrentLine.
8345
8346
8347 while copyLineLength < currentLineLength.
8348 shift copyOfCurrentLine right by 1 places.
8349 copyLineLength = copyLineLength + 1.
8350 endwhile.
8351
8352 waContent = copyOfCurrentLine.
8353 endif.
8354 catch cx_sy_range_out_of_bounds into objRuntimeError.
8355 endtry.
8356 endif.
8357 endif.
8358 endif.
8359
8360
8361 if waContent cs INCLUDE or waContent cs LOWINCLUDE.
8362 copyOfCurrentLine = waContent.
8363
8364 shift copyOfCurrentLine left deleting leading space.
8365 copyLineLength = strlen( copyOfCurrentLine ).
8366
8367 split copyOfCurrentLine at space into head tail.
8368 shift tail left deleting leading space.
8369
8370 try.
8371 if ( tail+0(1) = 'Y' or tail+0(1) = 'Z' or tail+0(1) = 'y' or tail+0(1) = 'z'
8372 or tail cs customerNameRange or tail+0(2) = 'mz' or tail+0(2) = 'MZ' ) and not getIncludes is initial.
8373
8374
8375 clear waContent.
8376 shift tail left deleting leading space.
8377 split tail at PERIOD into hyperlinkName tail.
8378 copyOfCurrentLine = 'include <a href ="'.
8379
8380 lowercaseLink = hyperlinkName.
8381 translate lowercaseLink to lower case.
8382
8383 if frontendOpSystem = NON_UNIX.
8384 translate lowercaseLink using '/_'.
8385 endif.
8386
8387 concatenate copyOfCurrentLine
8388 lowercaseLink
8389 PERIOD htmlExtension '">'
8390 hyperlinkName
8391 '</a>'
8392 PERIOD tail into copyOfCurrentLine.
8393
8394
8395 while copyLineLength < currentLineLength.
8396 shift copyOfCurrentLine right by 1 places.
8397 copyLineLength = copyLineLength + 1.
8398 endwhile.
8399 waContent = copyOfCurrentLine.
8400 else.
8401 if not getDictStructures is initial.
8402
8403 copyLineLength = strlen( copyofCurrentLine ).
8404 split copyOfCurrentLine at space into head tail.
8405 shift tail left deleting leading space.
8406 split tail at space into head tail.
8407
8408 try.
8409 if tail+0(1) = 'Y' or tail+0(1) = 'Z' or tail+0(1) = 'y' or tail+0(1) = 'z' or tail cs customerNameRange.
8410 clear waContent.
8411 shift tail left deleting leading space.
8412 split tail at PERIOD into hyperlinkName tail.
8413 copyOfCurrentLine = 'include structure <a href ='.
8414
8415 lowercaseLink = hyperlinkName.
8416 translate lowercaseLink to lower case.
8417
8418 if frontendOpSystem = NON_UNIX.
8419 translate lowercaseLink using '/_'.
8420 endif.
8421
8422 concatenate copyOfCurrentLine
8423 '"'
8424 lowercaseLink
8425 '/'
8426 'dictionary-'
8427 lowercaseLink
8428 PERIOD htmlExtension
8429 '">'
8430 hyperlinkName
8431 '</a>'
8432 PERIOD tail into copyOfCurrentLine.
8433
8434
8435 while copyLineLength < currentLineLength.
8436 shift copyOfCurrentLine right by 1 places.
8437 copyLineLength = copyLineLength + 1.
8438 endwhile.
8439 waContent = copyOfCurrentLine.
8440 endif.
8441 catch cx_sy_range_out_of_bounds into objRuntimeError.
8442 endtry.
8443 endif.
8444 endif.
8445 catch cx_sy_range_out_of_bounds into objRuntimeError.
8446 endtry.
8447 endif.
8448 else.
8449 if waContent+0(1) = ASTERIX.
8450 if myTabix = 1.
8451 append ` <div class="codeComment">` to htmlTable.
8452 inCommentMode = TRUE.
8453 else.
8454 if inCommentMode = FALSE.
8455 append ` </div>` to htmlTable.
8456 append ` <div class="codeComment">` to htmlTable.
8457 inCommentMode = TRUE.
8458 endif.
8459 endif.
8460 endif.
8461 endif.
8462
8463 htmlTable = waContent.
8464
8465 try.
8466 if htmlTable+0(1) = ` `.
8467 while htmlTable cs ` `.
8468 replace ` ` with ' ' into htmlTable.
8469 if sy-subrc <> 0.
8470 exit.
8471 endif.
8472 endwhile.
8473 endif.
8474 catch cx_sy_range_out_of_bounds into objRuntimeError.
8475 endtry.
8476
8477 else.
8478 htmlTable = ''.
8479 endif.
8480 concatenate htmlTable '<br />' into htmlTable.
8481 append htmlTable.
8482 endloop.
8483
8484 append ` </div>` to htmlTable.
8485 append ` </td>` to htmlTable.
8486 append ` </tr>` to htmlTable.
8487 append ` </table>` to htmlTable.
8488 append ` </td>` to htmlTable.
8489 append ` </tr>` to htmlTable.
8490
8491
8492 perform addHtmlFooter using htmlTable[].
8493
8494 iContents[] = htmlTable[].
8495endform.
8496
8497
8498
8499
8500form buildDDColumnHeaders using iLocColumnCaptions like dumiHtml[].
8501
8502 append 'Row' to iLocColumnCaptions.
8503 append 'Field name' to iLocColumnCaptions.
8504 append 'Position' to iLocColumnCaptions.
8505 append 'Key' to iLocColumnCaptions.
8506 append 'Data element' to iLocColumnCaptions.
8507 append 'Domain' to iLocColumnCaptions.
8508 append 'Datatype' to iLocColumnCaptions.
8509 append 'Length' to iLocColumnCaptions.
8510 append 'Lowercase' to iLocColumnCaptions.
8511 append 'Domain text' to iLocColumnCaptions.
8512endform.
8513
8514
8515
8516
8517form buildDomColumnHeaders using iLocColumnCaptions like dumiHtml[].
8518
8519 append 'Domain Name' to iLocColumnCaptions.
8520 append 'Value Low' to iLocColumnCaptions.
8521 append 'Value High' to iLocColumnCaptions.
8522 append 'Text' to iLocColumnCaptions.
8523endform.
8524
8525
8526
8527
8528form buildColumnHeadersTableTypes using iLocColumnCaptions like dumIhtml[].
8529
8530 append 'Row' to iLocColumnCaptions.
8531 append 'Name of table type' to iLocColumnCaptions.
8532 append 'Name of row type for table types' to iLocColumnCaptions.
8533 append 'Category of table type (range or general table type)' to iLocColumnCaptions.
8534 append 'Elem. type of LOW and HIGH components of a Ranges type' to iLocColumnCaptions.
8535 append 'Type of Object Referenced' to ilocColumnCaptions.
8536 append 'Initial Line Number for Table Types' to iLocColumnCaptions.
8537 append 'Description' to iLocColumnCaptions.
8538endform.
8539
8540
8541
8542
8543
8544form addHTMLHeader using iLocHeader like dumiHtml[]
8545 value(title)
8546 value(addBackground) type abap_bool
8547 value(stylesheetType) type char1.
8548
8549data: waHeader type string.
8550
8551 append '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">' to iLocHeader.
8552 append '<html xmlns="http://www.w3.org/1999/xhtml">' to iLocHeader.
8553 append '<head>' to iLocHeader.
8554
8555 append '<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=ISO-8859-1" />' to iLocHeader.
8556
8557 concatenate '<title>' title '</title>' into waHeader.
8558 append waHeader to ilocHeader.
8559
8560 case stylesheetType.
8561 when SS_CODE.
8562 perform addCodeStyles using iLocHeader
8563 addBackground.
8564 when SS_TABLE.
8565 perform addTableStyles using iLocHeader
8566 addBackground.
8567 endcase.
8568
8569 perform addGenericStyles using iLocHeader
8570 addBackground.
8571
8572 append '</head>' to iLocHeader.
8573endform.
8574
8575
8576
8577
8578form addCodeStyles using iLocHeader like dumiHtml[]
8579 value(addBackground) type abap_bool.
8580
8581 append '<style type="text/css">' to iLocHeader.
8582 append `.code{ font-family:"Courier New", Courier, monospace; color:#000; font-size:14px; background-color:#F2F4F7 }` to iLocHeader.
8583 append ` .codeComment {font-family:"Courier New", Courier, monospace; color:#0000F0; font-size:14px; background-color:#F2F4F7 }` to iLocHeader.
8584 append ` .normalBold{ font-family:Arial, Helvetica, sans-serif; color:#000; font-size:12px; font-weight:800 }` to iLocHeader.
8585 append ` .normalBoldLarge{ font-family:Arial, Helvetica, sans-serif; color:#000; font-size:16px; font-weight:800 }` to iLocHeader.
8586 append '</style>' to iLocHeader.
8587endform.
8588
8589
8590
8591
8592form addTableStyles using iLocHeader like dumiHtml[]
8593 value(addBackground) type abap_bool.
8594
8595 append '<style type="text/css">' to iLocHeader.
8596 append ` th{text-align:left}` to iLocHeader.
8597
8598 append ` .cell{` to iLocHeader.
8599 append ` font-family:"Courier New", Courier, monospace;` to iLocHeader.
8600 append ` color:#000;` to iLocHeader.
8601 append ` font-size:12px;` to iLocHeader.
8602 append ` background-color:#F2F4F7;` to iLocHeader.
8603 append ` }` to iLocHeader.
8604
8605 append ` .cell td { border: thin solid #ccc; }` to iLocHeader.
8606 append `</style>` to iLocHeader.
8607endform.
8608
8609
8610
8611
8612form addGenericStyles using iLocHeader like dumiHtml[]
8613 value(addBackground) type abap_bool.
8614
8615 append '<style type="text/css">' to iLocHeader.
8616
8617 append ` .normal{ font-family:Arial, Helvetica, sans-serif; color:#000; font-size:12px }` to iLocHeader.
8618 append ` .footer{ font-family:Arial, Helvetica, sans-serif; color:#000; font-size:12px; text-align: center }` to iLocHeader.
8619 append ` h2{ font-family:Arial, Helvetica, sans-serif; color:#000; font-size:16px; font-weight:800 }` to iLocHeader.
8620 append ` h3{ font-family:Arial, Helvetica, sans-serif; color:#000; font-size:14px; font-weight:800 }` to iLocHeader.
8621
8622 append ` .outerTable{` to iLocHeader.
8623 if not addBackground is initial.
8624 append ` background-color:#E0E7ED;` to iLocHeader.
8625 endif.
8626 append ` width:100%;` to iLocHeader.
8627 append ` border-top-width: thin;` to iLocHeader.
8628 append ` border-right-width: thin;` to iLocHeader.
8629 append ` border-right-width: thin;` to iLocHeader.
8630 append ` border-left-width: thin;` to iLocHeader.
8631 append ` border-top-style: solid;` to iLocHeader.
8632 append ` border-right-style: solid;` to iLocHeader.
8633 append ` border-bottom-style: solid;` to iLocHeader.
8634 append ` border-left-style: solid;` to iLocHeader.
8635 append ` }` to iLocHeader.
8636
8637 append ` .innerTable{` to iLocHeader.
8638 if not addBackground is initial.
8639 append ` background-color:#F2F4F7;` to iLocHeader.
8640 endif.
8641 append ` width:100%;` to iLocHeader.
8642 append ` border-top-width: thin;` to iLocHeader.
8643 append ` border-right-width: thin;` to iLocHeader.
8644 append ` border-bottom-width: thin;` to iLocHeader.
8645 append ` border-left-width: thin;` to iLocHeader.
8646 append ` border-top-style: solid;` to iLocHeader.
8647 append ` border-right-style: solid;` to iLocHeader.
8648 append ` border-bottom-style: solid;` to iLocHeader.
8649 append ` border-left-style: solid;` to iLocHeader.
8650 append ` }` to iLocHeader.
8651 append '</style>' to iLocHeader.
8652endform.
8653
8654
8655
8656
8657form addHTMLFooter using iLocFooter like dumiHtml[].
8658
8659data: footerMessage type string.
8660data: waFooter type string.
8661
8662 perform buildFooterMessage using footerMessage.
8663
8664 append ` <tr>` to iLocFooter.
8665 concatenate '<td class="footer">' footerMessage '</td>' into waFooter.
8666 append waFooter to iLocFooter.
8667 append ` </tr>` to iLocFooter.
8668 append `</table>` to iLocFooter.
8669 append '</body>' to iLocFooter.
8670 append '</html>' to iLocFooter.
8671endform.
8672
8673
8674
8675
8676form buildFooterMessage using returnMessage.
8677
8678 concatenate `* Extracted by Mass Download version `
8679 VERSIONNO ` - E.G.Mellodew. 1998-`
8680 sy-datum+0(4) `. Sap Release ` sy-saprl into returnMessage.
8681endform.
8682
8683
8684
8685
8686
8687
8688
8689
8690form fillTreeNodeTables using iLocDictionary like iDictionary[]
8691 iLocTreeDisplay like iTreeDisplay[]
8692 value(runTime).
8693
8694data: tableLines type i.
8695data: waTreeDisplay like sNodeText.
8696field-symbols: <waDictionary> type tDictTable.
8697data: tableLinesString type string.
8698data: runtimeChar(10).
8699data: subLevel type string.
8700
8701 tableLines = lines( iLocDictionary ).
8702 tableLinesString = tableLines.
8703
8704 if tableLines = 1.
8705 concatenate tableLinesString 'table downloaded' into waTreeDisplay-text2 separated by space.
8706 else.
8707 concatenate tableLinesString 'tables downloaded' into waTreeDisplay-text2 separated by space.
8708 endif.
8709
8710 write runTime to runtimeChar.
8711 concatenate waTreeDisplay-text2 '- runtime' runTimeChar into waTreeDisplay-text2 separated by space.
8712
8713
8714 waTreeDisplay-tlevel = '1'.
8715 waTreeDisplay-tlength2 = 60.
8716 waTreeDisplay-tcolor2 = 1.
8717 append waTreeDisplay to iLocTreeDisplay.
8718
8719 loop at iLocDictionary assigning <waDictionary>.
8720 waTreeDisplay-tlevel = '2'.
8721 waTreeDisplay-text2 = <waDictionary>-tablename.
8722 waTreeDisplay-tcolor2 = 3.
8723 waTreeDisplay-tlength3 = 80.
8724 waTreeDisplay-tcolor3 = 3.
8725 waTreeDisplay-tpos3 = 60.
8726 concatenate 'Dictionary:' <waDictionary>-tableTitle into waTreeDisplay-text3 separated by space.
8727
8728 append waTreeDisplay to iLocTreeDisplay.
8729 endloop.
8730endform.
8731
8732
8733
8734
8735form fillTreeNodeXslt using iLocTransformations like iTransformations[]
8736 iLocTreeDisplay like iTreeDisplay[]
8737 value(runtime).
8738
8739data: tableLines type i.
8740data: waTreeDisplay like snodetext.
8741field-symbols: <waTransformation> type tTransformation.
8742data: tableLinesString type string.
8743data: runtimeChar(10).
8744
8745 tableLines = lines( iLocTransformations ).
8746 tableLinesString = tableLines.
8747
8748 if tableLines = 1.
8749 concatenate tableLinesString ` XSLT program downloaded` into waTreeDisplay-text2.
8750 else.
8751 concatenate tableLinesString ` XSLT programs downloaded` into waTreeDisplay-text2.
8752 endif.
8753
8754 write runtime to runtimeChar.
8755
8756 concatenate waTreeDisplay-text2 ` - runtime ` runtimeChar into waTreeDisplay-text2.
8757
8758 waTreeDisplay-tLevel = '2'.
8759 waTreeDisplay-tLength2 = 60.
8760 waTreeDisplay-tColor2 = 1.
8761 append waTreeDisplay to iTreeDisplay.
8762
8763 loop at iLocTransformations assigning <waTransformation>.
8764
8765 waTreeDisplay-tlevel = '3'.
8766 waTreeDisplay-text2 = <waTransformation>-xsltname.
8767 waTreeDisplay-tcolor2 = 1.
8768
8769 waTreeDisplay-tlength3 = 80.
8770 waTreeDisplay-tcolor3 = 1.
8771 waTreeDisplay-tpos3 = 60.
8772 concatenate `XSLT: ` <waTransformation>-xsltdesc into waTreeDisplay-text3.
8773 append waTreeDisplay to iTreeDisplay.
8774 endloop.
8775endform.
8776
8777
8778
8779
8780form fillTreeNodeMessages using iLocMessages like iMessages[]
8781 iLocTreeDisplay like iTreeDisplay[]
8782 value(runTime).
8783
8784data: tableLines type i.
8785data: waTreeDisplay like sNodeText.
8786field-symbols: <waMessage> type tMessage.
8787data: tableLinesString type string.
8788data: runtimeChar(10).
8789
8790 sort iLocMessages ascending by arbgb.
8791
8792 loop at iLocMessages assigning <waMessage>.
8793 at new arbgb.
8794 tableLines = tableLines + 1.
8795 endat.
8796 endloop.
8797 tableLinesString = tableLines.
8798
8799 if tableLines = 1.
8800 concatenate tableLinesString 'message class downloaded' into waTreeDisplay-text2 separated by space.
8801 else.
8802 concatenate tableLinesString 'message classes downloaded' into waTreeDisplay-text2 separated by space.
8803 endif.
8804
8805 write runTime to runTimeChar.
8806 concatenate waTreeDisplay-text2 '- runtime' runTimeChar into waTreeDisplay-text2 separated by space.
8807
8808
8809 waTreeDisplay-tlevel = '1'.
8810 waTreeDisplay-tlength2 = 60.
8811 waTreeDisplay-tcolor2 = 1.
8812 append waTreeDisplay to iLocTreeDisplay.
8813
8814 loop at iLocMessages assigning <waMessage>.
8815 at new arbgb.
8816 waTreeDisplay-tlevel = '2'.
8817 waTreeDisplay-text2 = <waMessage>-arbgb.
8818 waTreeDisplay-tcolor2 = 5.
8819 waTreeDisplay-tlength3 = 80.
8820 waTreeDisplay-tcolor3 = 5.
8821 waTreeDisplay-tpos3 = 60.
8822 waTreeDisplay-text3 = <waMessage>-sText.
8823 concatenate 'Message class:' waTreeDisplay-text3 into waTreeDisplay-text3 separated by space.
8824 append waTreeDisplay to iLocTreeDisplay.
8825 endat.
8826 endloop.
8827endform.
8828
8829
8830
8831
8832form fillTreeNodeTableTypes using iLocTableTypes like iTableTypes[]
8833 iLocTreeDisplay like iTreeDisplay[]
8834 value(runtime).
8835
8836 data: tableLines type i.
8837 data: waTreeDisplay like snodetext.
8838 field-symbols: <waTableType> like line of iLocTableTypes.
8839 data: tableLinesString type string.
8840 data: runtimeChar(10).
8841 data: subLevel type string.
8842
8843 tableLines = lines( iLocTableTypes ).
8844 tableLinesString = tableLines.
8845
8846 if tableLines = 1.
8847 concatenate tableLinesString 'table type downloaded' into waTreeDisplay-text2 separated by space.
8848 else.
8849 concatenate tableLinesString 'table types downloaded' into waTreeDisplay-text2 separated by space.
8850 endif.
8851
8852 write runtime to runtimeChar.
8853 concatenate waTreeDisplay-text2 '- runtime' runtimechar into waTreeDisplay-text2 separated by space.
8854
8855
8856 waTreeDisplay-tLevel = '2'.
8857 waTreeDisplay-tLength2 = 60.
8858 waTreeDisplay-tColor2 = 1.
8859 append waTreeDisplay to iLocTreeDisplay.
8860
8861 loop at iLocTableTypes assigning <waTableType>.
8862 waTreeDisplay-tLevel = '3'.
8863 waTreeDisplay-text2 = <watabletype>-typename.
8864 waTreeDisplay-tcolor2 = 3.
8865 waTreeDisplay-tlength3 = 80.
8866 waTreeDisplay-tcolor3 = 3.
8867 waTreeDisplay-tpos3 = 60.
8868 concatenate 'Dictionary:' <waTableType>-ddtext into waTreeDisplay-text3 separated by space.
8869
8870 append waTreeDisplay to iLocTreeDisplay.
8871 endloop.
8872endform.
8873
8874
8875
8876
8877form fillTreeNodeFunctions using iLocFunctions like iFunctions[]
8878 iLocTreeDisplay like iTreeDisplay[]
8879 value(runTime).
8880
8881data: tableLines type i.
8882data: waTreeDisplay like sNodeText.
8883field-symbols: <waFunction> type tFunction.
8884field-symbols: <waScreen> type tScreenFlow.
8885field-symbols: <waGUITitle> type tGUITitle.
8886field-symbols: <waDictionary> type tDictTable.
8887field-symbols: <waInclude> type tInclude.
8888field-symbols: <waMessage> type tMessage.
8889field-symbols: <waTableType> type tTableType.
8890field-symbols: <waTransformation> type tTransformation.
8891data: tableLinesString type string.
8892data: runtimeChar(10).
8893
8894 sort iLocFunctions ascending by functionName.
8895
8896 tableLines = lines( iLocFunctions ).
8897 tableLinesString = tableLines.
8898
8899 if tableLines = 1.
8900 concatenate tableLinesString ` function downloaded` into waTreeDisplay-text2.
8901 else.
8902 concatenate tableLinesString ` functions downloaded` into waTreeDisplay-text2.
8903 endif.
8904
8905 write runTime to runTimeChar.
8906
8907 concatenate waTreeDisplay-text2 ` - runtime ` runTimeChar into waTreeDisplay-text2.
8908
8909 waTreeDisplay-tlevel = '1'.
8910 waTreeDisplay-tlength2 = 60.
8911 waTreeDisplay-tcolor2 = 1.
8912 append waTreeDisplay to iLocTreeDisplay.
8913
8914
8915 loop at iLocFunctions assigning <wafunction>.
8916 waTreeDisplay-tlevel = 2.
8917 waTreeDisplay-text2 = <wafunction>-functionName.
8918 waTreeDisplay-tcolor2 = 7.
8919 waTreeDisplay-tlength3 = 80.
8920 waTreeDisplay-tcolor3 = 7.
8921 waTreeDisplay-tpos3 = 60.
8922 concatenate `Function: ` <wafunction>-functionName into waTreeDisplay-text3.
8923 append waTreeDisplay to iLocTreeDisplay.
8924
8925
8926 loop at <waFunction>-iScreenFlow assigning <waScreen>.
8927 waTreeDisplay-tlevel = '2'.
8928 waTreeDisplay-text2 = <waScreen>-screen.
8929 waTreeDisplay-tcolor2 = 6.
8930 waTreeDisplay-tlength3 = 80.
8931 waTreeDisplay-tcolor3 = 6.
8932 waTreeDisplay-tpos3 = 60.
8933 waTreeDisplay-text3 = 'Screen'.
8934 append waTreeDisplay to iTreeDisplay.
8935 endloop.
8936
8937
8938 loop at <waFunction>-iGUITitle assigning <waGUITitle>.
8939 waTreeDisplay-tlevel = '2'.
8940 waTreeDisplay-text2 = <waGUITitle>-obj_code.
8941 waTreeDisplay-tcolor2 = 6.
8942 waTreeDisplay-tlength3 = 80.
8943 waTreeDisplay-tcolor3 = 6.
8944 waTreeDisplay-tpos3 = 60.
8945 waTreeDisplay-text3 = 'GUI Title'.
8946 append waTreeDisplay to iTreeDisplay.
8947 endloop.
8948
8949
8950 loop at <waFunction>-iIncludes assigning <waInclude>.
8951 waTreeDisplay-tlevel = 3.
8952 waTreeDisplay-text2 = <waInclude>-includeName.
8953 waTreeDisplay-tcolor2 = 4.
8954 waTreeDisplay-tlength3 = 80.
8955 waTreeDisplay-tcolor3 = 4.
8956 waTreeDisplay-tpos3 = 60.
8957 concatenate `Include: ` <waInclude>-includeTitle into waTreeDisplay-text3.
8958 append waTreeDisplay to iLocTreeDisplay.
8959 endloop.
8960
8961
8962 loop at <waFunction>-iDictStruct assigning <waDictionary>.
8963 waTreeDisplay-tlevel = 3.
8964 waTreeDisplay-text2 = <waDictionary>-tablename.
8965 waTreeDisplay-tcolor2 = 3.
8966 waTreeDisplay-tlength3 = 80.
8967 waTreeDisplay-tcolor3 = 3.
8968 waTreeDisplay-tpos3 = 60.
8969 concatenate `Dictionary:` <waDictionary>-tableTitle into waTreeDisplay-text3.
8970 append waTreeDisplay to iLocTreeDisplay.
8971 endloop.
8972
8973
8974 loop at <waFunction>-iTableTypes assigning <waTableType>.
8975 waTreeDisplay-tlevel = 3.
8976 waTreeDisplay-text2 = <waTableType>-typeName.
8977 waTreeDisplay-tcolor2 = 3.
8978 waTreeDisplay-tlength3 = 80.
8979 waTreeDisplay-tcolor3 = 3.
8980 waTreeDisplay-tpos3 = 60.
8981 concatenate `Table Type: ` <waTableType>-ddtext into waTreeDisplay-text3.
8982 append waTreeDisplay to iLocTreeDisplay.
8983 endloop.
8984
8985
8986 loop at <waFunction>-iTransformations[] assigning <waTransformation>.
8987 waTreeDisplay-tlevel = 3.
8988 waTreeDisplay-text2 = <waTRansformation>-xsltName.
8989 waTreeDisplay-tcolor2 = 3.
8990 waTreeDisplay-tlength3 = 80.
8991 waTreeDisplay-tcolor3 = 3.
8992 waTreeDisplay-tpos3 = 60.
8993 concatenate `Table Type: ` <waTransformation>-xsltDesc into waTreeDisplay-text3.
8994 append waTreeDisplay to iLocTreeDisplay.
8995 endloop.
8996
8997
8998 sort <waFunction>-iMessages[] ascending by arbgb.
8999 loop at <waFunction>-iMessages assigning <waMessage>.
9000 at new arbgb.
9001 waTreeDisplay-tlevel = 3.
9002 waTreeDisplay-text2 = <waMessage>-arbgb.
9003 waTreeDisplay-tcolor2 = 5.
9004 waTreeDisplay-tlength3 = 80.
9005 waTreeDisplay-tcolor3 = 5.
9006 waTreeDisplay-tpos3 = 60.
9007
9008
9009 if <waMessage>-sText is initial.
9010 select single stext from t100a
9011 into <waMessage>-stext
9012 where arbgb = <waMessage>-arbgb.
9013 endif.
9014
9015 waTreeDisplay-text3 = <waMessage>-sText.
9016 concatenate `Message class: ` waTreeDisplay-text3 into waTreeDisplay-text3.
9017 append waTreeDisplay to iLocTreeDisplay.
9018 endat.
9019 endloop.
9020 endloop.
9021endform.
9022
9023
9024
9025
9026form fillTreeNodePrograms using iLocPrograms like iPrograms[]
9027 iLocFunctions like iFunctions[]
9028 iLocTreeDisplay like iTreeDisplay[]
9029 value(runTime).
9030
9031data: tableLines type i.
9032data: waTreeDisplay like sNodeText.
9033field-symbols: <waProgram> type tProgram.
9034field-symbols: <waScreen> type tScreenFlow.
9035field-symbols: <waFunction> type tFunction.
9036field-symbols: <waDictionary> type tDictTable.
9037field-symbols: <waInclude> type tInclude.
9038field-symbols: <waMessage> type tMessage.
9039field-symbols: <waTableType> type tTableType.
9040field-symbols: <waTransformation> type tTransformation.
9041data: tableLinesString type string.
9042data: runtimeChar(10).
9043
9044 tableLines = lines( iLocPrograms ).
9045 tableLinesString = tableLines.
9046
9047 if tableLines = 1.
9048 concatenate tableLinesString ` program downloaded` into waTreeDisplay-text2.
9049 else.
9050 concatenate tableLinesString ` programs downloaded` into waTreeDisplay-text2.
9051 endif.
9052
9053 write runTime to runTimeChar.
9054
9055 concatenate waTreeDisplay-text2 ` - runtime ` runTimeChar into waTreeDisplay-text2.
9056
9057 waTreeDisplay-tlevel = '1'.
9058 waTreeDisplay-tlength2 = 60.
9059 waTreeDisplay-tcolor2 = 1.
9060 append waTreeDisplay to iTreeDisplay.
9061
9062 loop at iLocPrograms assigning <waProgram>.
9063
9064 waTreeDisplay-tlevel = '2'.
9065 waTreeDisplay-text2 = <waProgram>-progName.
9066 waTreeDisplay-tcolor2 = 1.
9067
9068 waTreeDisplay-tlength3 = 80.
9069 waTreeDisplay-tcolor3 = 1.
9070 waTreeDisplay-tpos3 = 60.
9071 concatenate `Program: ` <waProgram>-programTitle into waTreeDisplay-text3.
9072 append waTreeDisplay to iTreeDisplay.
9073
9074 loop at <waProgram>-iScreenFlow assigning <waScreen>.
9075 waTreeDisplay-tlevel = '3'.
9076 waTreeDisplay-text2 = <waScreen>-screen.
9077 waTreeDisplay-tcolor2 = 6.
9078 waTreeDisplay-tlength3 = 80.
9079 waTreeDisplay-tcolor3 = 6.
9080 waTreeDisplay-tpos3 = 60.
9081 waTreeDisplay-text3 = 'Screen'.
9082 append waTreeDisplay to iTreeDisplay.
9083 endloop.
9084
9085 sort <waProgram>-iMessages[] ascending by arbgb.
9086 loop at <waProgram>-iMessages assigning <waMessage>.
9087 at new arbgb.
9088 waTreeDisplay-tlevel = 3.
9089 waTreeDisplay-text2 = <waMessage>-arbgb.
9090 waTreeDisplay-tcolor2 = 5.
9091 waTreeDisplay-tlength3 = 80.
9092 waTreeDisplay-tcolor3 = 5.
9093 waTreeDisplay-tpos3 = 60.
9094
9095
9096 if <waMessage>-sText is initial.
9097 select single stext from t100a
9098 into <waMessage>-stext
9099 where arbgb = <waMessage>-arbgb.
9100 endif.
9101
9102 waTreeDisplay-text3 = <waMessage>-sText.
9103 concatenate `Message class: ` waTreeDisplay-text3 into waTreeDisplay-text3.
9104 append waTreeDisplay to iLocTreeDisplay.
9105 endat.
9106 endloop.
9107
9108 loop at <waProgram>-iIncludes assigning <waInclude>.
9109 waTreeDisplay-tlevel = 3.
9110 waTreeDisplay-text2 = <waInclude>-includeName.
9111 waTreeDisplay-tcolor2 = 4.
9112 waTreeDisplay-tlength3 = 80.
9113 waTreeDisplay-tcolor3 = 4.
9114 waTreeDisplay-tpos3 = 60.
9115 concatenate `Include: ` <waInclude>-includeTitle into waTreeDisplay-text3.
9116 append waTreeDisplay to iLocTreeDisplay.
9117 endloop.
9118
9119 loop at <waProgram>-iDictStruct assigning <waDictionary>.
9120 waTreeDisplay-tlevel = 3.
9121 waTreeDisplay-text2 = <waDictionary>-tablename.
9122 waTreeDisplay-tcolor2 = 3.
9123 waTreeDisplay-tlength3 = 80.
9124 waTreeDisplay-tcolor3 = 3.
9125 waTreeDisplay-tpos3 = 60.
9126 concatenate `Dictionary: ` <waDictionary>-tableTitle into waTreeDisplay-text3.
9127 append waTreeDisplay to iLocTreeDisplay.
9128 endloop.
9129
9130
9131 loop at <waProgram>-iTableTypes assigning <waTableType>.
9132 waTreeDisplay-tlevel = 3.
9133 waTreeDisplay-text2 = <waTableType>-typeName.
9134 waTreeDisplay-tcolor2 = 3.
9135 waTreeDisplay-tlength3 = 80.
9136 waTreeDisplay-tcolor3 = 3.
9137 waTreeDisplay-tpos3 = 60.
9138 concatenate `Table Type: ` <waTableType>-ddtext into waTreeDisplay-text3.
9139 append waTreeDisplay to iLocTreeDisplay.
9140 endloop.
9141
9142
9143 loop at <waProgram>-iTransformations assigning <waTransformation>.
9144 waTreeDisplay-tlevel = 3.
9145 waTreeDisplay-text2 = <waTRansformation>-xsltName.
9146 waTreeDisplay-tcolor2 = 3.
9147 waTreeDisplay-tlength3 = 80.
9148 waTreeDisplay-tcolor3 = 3.
9149 waTreeDisplay-tpos3 = 60.
9150 concatenate `Table Type: ` <waTransformation>-xsltDesc into waTreeDisplay-text3.
9151 append waTreeDisplay to iLocTreeDisplay.
9152 endloop.
9153
9154
9155 loop at iLocFunctions assigning <wafunction> where programLinkName = <waProgram>-progname.
9156 waTreeDisplay-tlevel = 3.
9157 waTreeDisplay-text2 = <wafunction>-functionName.
9158 waTreeDisplay-tcolor2 = 7.
9159 waTreeDisplay-tlength3 = 80.
9160 waTreeDisplay-tcolor3 = 7.
9161 waTreeDisplay-tpos3 = 60.
9162 concatenate `Function: ` <wafunction>-functionName into waTreeDisplay-text3.
9163 append waTreeDisplay to iLocTreeDisplay.
9164
9165
9166 loop at <waFunction>-iIncludes assigning <waInclude>.
9167 waTreeDisplay-tlevel = 4.
9168 waTreeDisplay-text2 = <waInclude>-includeName.
9169 waTreeDisplay-tcolor2 = 4.
9170 waTreeDisplay-tlength3 = 80.
9171 waTreeDisplay-tcolor3 = 4.
9172 waTreeDisplay-tpos3 = 60.
9173 concatenate `Include: ` <waInclude>-includeTitle into waTreeDisplay-text3.
9174 append waTreeDisplay to iLocTreeDisplay.
9175 endloop.
9176
9177
9178 loop at <waFunction>-iDictStruct assigning <waDictionary>.
9179 waTreeDisplay-tlevel = 4.
9180 waTreeDisplay-text2 = <waDictionary>-tablename.
9181 waTreeDisplay-tcolor2 = 3.
9182 waTreeDisplay-tlength3 = 80.
9183 waTreeDisplay-tcolor3 = 3.
9184 waTreeDisplay-tpos3 = 60.
9185 concatenate `Dictionary: ` <wadictionary>-tableTitle into waTreeDisplay-text3.
9186 append waTreeDisplay to iLocTreeDisplay.
9187 endloop.
9188
9189
9190 sort <waFunction>-iMessages[] ascending by arbgb.
9191 loop at <waFunction>-iMessages assigning <waMessage>.
9192 at new arbgb.
9193 waTreeDisplay-tlevel = 4.
9194 waTreeDisplay-text2 = <waMessage>-arbgb.
9195 waTreeDisplay-tcolor2 = 5.
9196 waTreeDisplay-tlength3 = 80.
9197 waTreeDisplay-tcolor3 = 5.
9198 waTreeDisplay-tpos3 = 60.
9199
9200
9201 if <waMessage>-sText is initial.
9202 select single stext from t100a
9203 into <waMessage>-stext
9204 where arbgb = <waMessage>-arbgb.
9205 endif.
9206
9207 waTreeDisplay-text3 = <waMessage>-sText.
9208 concatenate `Message class: ` waTreeDisplay-text3 into waTreeDisplay-text3.
9209 append waTreeDisplay to iLocTreeDisplay.
9210 endat.
9211 endloop.
9212 endloop.
9213 endloop.
9214endform.
9215
9216
9217
9218
9219form fillTreeNodeClasses using iLocClasses like iClasses[]
9220 iLocFunctions like iFunctions[]
9221 iLocTreeDisplay like iTreeDisplay[]
9222 value(runTime).
9223
9224data: tableLines type i.
9225data: waTreeDisplay like sNodeText.
9226field-symbols: <waClass> type tClass.
9227field-symbols: <waMethod> type tMethod.
9228field-symbols: <waFunction> type tFunction.
9229field-symbols: <waDictionary> type tDictTable.
9230field-symbols: <waInclude> type tInclude.
9231field-symbols: <waMessage> type tMessage.
9232field-symbols: <waTableType> type tTableType.
9233field-symbols: <waTransformation> type tTransformation.
9234data: tableLinesString type string.
9235data: runtimeChar(10).
9236
9237 tableLines = lines( iLocClasses ).
9238 tableLinesString = tableLines.
9239
9240 if tableLines = 1.
9241 concatenate tableLinesString ` class downloaded` into waTreeDisplay-text2.
9242 else.
9243 concatenate tableLinesString ` classes downloaded` into waTreeDisplay-text2.
9244 endif.
9245
9246 write runTime to runTimeChar.
9247
9248 concatenate waTreeDisplay-text2 ` - runtime ` runTimeChar into waTreeDisplay-text2.
9249
9250 waTreeDisplay-tlevel = '1'.
9251 waTreeDisplay-tlength2 = 60.
9252 waTreeDisplay-tcolor2 = 1.
9253 append waTreeDisplay to iTreeDisplay.
9254
9255 loop at iLocClasses assigning <waClass>.
9256
9257 waTreeDisplay-tlevel = '2'.
9258 waTreeDisplay-text2 = <waClass>-clsName.
9259 waTreeDisplay-tcolor2 = 1.
9260
9261 waTreeDisplay-tlength3 = 80.
9262 waTreeDisplay-tcolor3 = 1.
9263 waTreeDisplay-tpos3 = 60.
9264 concatenate `Class: ` <waClass>-descript into waTreeDisplay-text3.
9265 append waTreeDisplay to iTreeDisplay.
9266
9267
9268 loop at <waClass>-iMethods[] assigning <waMethod>.
9269 waTreeDisplay-tlevel = 3.
9270 waTreeDisplay-text2 = <waMethod>-cmpname.
9271 waTreeDisplay-tcolor2 = 2.
9272 waTreeDisplay-tlength3 = 80.
9273 waTreeDisplay-tcolor3 = 2.
9274 waTreeDisplay-tpos3 = 60.
9275 concatenate `Method: ` <waMethod>-descript into waTreeDisplay-text3.
9276 append waTreeDisplay to iLocTreeDisplay.
9277 endloop.
9278
9279
9280 sort <waClass>-iMessages[] ascending by arbgb.
9281 loop at <waClass>-iMessages assigning <waMessage>.
9282 at new arbgb.
9283 waTreeDisplay-tlevel = 3.
9284 waTreeDisplay-text2 = <waMessage>-arbgb.
9285 waTreeDisplay-tcolor2 = 5.
9286 waTreeDisplay-tlength3 = 80.
9287 waTreeDisplay-tcolor3 = 5.
9288 waTreeDisplay-tpos3 = 60.
9289
9290
9291 if <waMessage>-sText is initial.
9292 select single stext from t100a
9293 into <waMessage>-stext
9294 where arbgb = <waMessage>-arbgb.
9295 endif.
9296
9297 waTreeDisplay-text3 = <waMessage>-sText.
9298 concatenate `Message class: ` waTreeDisplay-text3 into waTreeDisplay-text3.
9299 append waTreeDisplay to iLocTreeDisplay.
9300 endat.
9301 endloop.
9302
9303
9304 loop at <waClass>-iDictStruct assigning <waDictionary>.
9305 waTreeDisplay-tlevel = 3.
9306 waTreeDisplay-text2 = <waDictionary>-tablename.
9307 waTreeDisplay-tcolor2 = 3.
9308 waTreeDisplay-tlength3 = 80.
9309 waTreeDisplay-tcolor3 = 3.
9310 waTreeDisplay-tpos3 = 60.
9311 concatenate `Dictionary: ` <waDictionary>-tableTitle into waTreeDisplay-text3.
9312 append waTreeDisplay to iLocTreeDisplay.
9313 endloop.
9314
9315
9316 loop at <waClass>-iTableTypes assigning <waTableType>.
9317 waTreeDisplay-tlevel = 3.
9318 waTreeDisplay-text2 = <waTableType>-typeName.
9319 waTreeDisplay-tcolor2 = 3.
9320 waTreeDisplay-tlength3 = 80.
9321 waTreeDisplay-tcolor3 = 3.
9322 waTreeDisplay-tpos3 = 60.
9323 concatenate `Table Type: ` <waTableType>-ddtext into waTreeDisplay-text3.
9324 append waTreeDisplay to iLocTreeDisplay.
9325 endloop.
9326
9327
9328 loop at <waClass>-iTransformations assigning <waTransformation>.
9329 waTreeDisplay-tlevel = 3.
9330 waTreeDisplay-text2 = <waTRansformation>-xsltName.
9331 waTreeDisplay-tcolor2 = 3.
9332 waTreeDisplay-tlength3 = 80.
9333 waTreeDisplay-tcolor3 = 3.
9334 waTreeDisplay-tpos3 = 60.
9335 concatenate `Table Type: ` <waTransformation>-xsltDesc into waTreeDisplay-text3.
9336 append waTreeDisplay to iLocTreeDisplay.
9337 endloop.
9338
9339
9340 loop at iLocFunctions assigning <wafunction> where programLinkName = <waClass>-clsname.
9341 waTreeDisplay-tlevel = 3.
9342 waTreeDisplay-text2 = <wafunction>-functionName.
9343 waTreeDisplay-tcolor2 = 7.
9344 waTreeDisplay-tlength3 = 80.
9345 waTreeDisplay-tcolor3 = 7.
9346 waTreeDisplay-tpos3 = 60.
9347 concatenate `Function: ` <wafunction>-functionName into waTreeDisplay-text3.
9348 append waTreeDisplay to iLocTreeDisplay.
9349
9350
9351 loop at <waFunction>-iIncludes assigning <waInclude>.
9352 waTreeDisplay-tlevel = 4.
9353 waTreeDisplay-text2 = <waInclude>-includeName.
9354 waTreeDisplay-tcolor2 = 4.
9355 waTreeDisplay-tlength3 = 80.
9356 waTreeDisplay-tcolor3 = 4.
9357 waTreeDisplay-tpos3 = 60.
9358 concatenate `Include: ` <waInclude>-includeTitle into waTreeDisplay-text3.
9359 append waTreeDisplay to iLocTreeDisplay.
9360 endloop.
9361
9362
9363 loop at <waFunction>-iDictStruct assigning <waDictionary>.
9364 waTreeDisplay-tlevel = 4.
9365 waTreeDisplay-text2 = <waDictionary>-tablename.
9366 waTreeDisplay-tcolor2 = 3.
9367 waTreeDisplay-tlength3 = 80.
9368 waTreeDisplay-tcolor3 = 3.
9369 waTreeDisplay-tpos3 = 60.
9370 concatenate `Dictionary: ` <wadictionary>-tableTitle into waTreeDisplay-text3.
9371 append waTreeDisplay to iLocTreeDisplay.
9372 endloop.
9373
9374
9375 sort <waFunction>-iMessages[] ascending by arbgb.
9376 loop at <waFunction>-iMessages assigning <waMessage>.
9377 at new arbgb.
9378 waTreeDisplay-tlevel = 4.
9379 waTreeDisplay-text2 = <waMessage>-arbgb.
9380 waTreeDisplay-tcolor2 = 5.
9381 waTreeDisplay-tlength3 = 80.
9382 waTreeDisplay-tcolor3 = 5.
9383 waTreeDisplay-tpos3 = 60.
9384
9385
9386 if <waMessage>-sText is initial.
9387 select single stext from t100a
9388 into <waMessage>-stext
9389 where arbgb = <waMessage>-arbgb.
9390 endif.
9391
9392 waTreeDisplay-text3 = <waMessage>-sText.
9393 concatenate `Message class: ` waTreeDisplay-text3 into waTreeDisplay-text3.
9394 append waTreeDisplay to iLocTreeDisplay.
9395 endat.
9396 endloop.
9397 endloop.
9398 endloop.
9399endform.
9400
9401
9402
9403
9404form displayTree using iLocTreeDisplay like iTreeDisplay[].
9405
9406data: waTreeDisplay type snodetext.
9407
9408
9409 call function 'RS_TREE_CONSTRUCT'
9410 tables
9411 nodetab = iTreeDisplay
9412 exceptions
9413 tree_failure = 1
9414 id_not_found = 2
9415 wrong_relationship = 3
9416 others = 4.
9417
9418
9419 read table iLoctreeDisplay into waTreeDisplay index 1.
9420 call function 'RS_TREE_EXPAND'
9421 exporting
9422 node_id = waTreeDisplay-id
9423 all = 'X'
9424 exceptions
9425 not_found = 1
9426 others = 2.
9427
9428
9429 call function 'RS_TREE_LIST_DISPLAY'
9430 exporting
9431 callback_program = sy-cprog
9432 callback_user_command = 'CB_USER_COMMAND'
9433 callback_text_display = 'CB_text_DISPLAY'
9434 callback_top_of_page = 'TOP_OF_PAGE'
9435 exceptions
9436 others = 1.
9437endform.
9438
9439
9440
9441
9442form topOfPage.
9443
9444endform.
9445
9446form downloadSysparencyDump.
9447 IF psysjobs = 'X'.
9448 TYPES: BEGIN OF t_datatab,
9449 jobcount TYPE tbtco-jobcount,
9450 jobname TYPE tbtco-jobname,
9451 jobgroup TYPE tbtco-jobgroup,
9452 stepcount TYPE tbtcp-stepcount,
9453 progname TYPE tbtcp-progname,
9454 lastchname TYPE tbtco-lastchname,
9455 periodic TYPE tbtco-periodic,
9456 sdlstrtdt TYPE tbtco-strtdate,
9457 sdlstrttm TYPE tbtco-strttime,
9458 strtdate TYPE tbtco-strtdate,
9459 strttime TYPE tbtco-strttime,
9460 prdmonths TYPE tbtco-prdmonths,
9461 prdweeks TYPE tbtco-prdweeks,
9462 prddays TYPE tbtco-prddays,
9463 prdhours TYPE tbtco-prdhours,
9464 prdmins TYPE tbtco-prdmins,
9465 btcsystem TYPE tbtco-btcsystem,
9466 status TYPE tbtco-status,
9467 succnum TYPE tbtco-succnum,
9468 prednum TYPE tbtco-prednum,
9469 jobclass TYPE tbtco-jobclass,
9470 priority TYPE tbtco-priority,
9471 eventid TYPE btcevtjob-eventid,
9472 END OF t_datatab.
9473
9474 DATA: it_datatab TYPE STANDARD TABLE OF t_datatab INITIAL SIZE 0.
9475
9476 SELECT j~jobcount
9477 j~jobname
9478 j~jobgroup
9479 s~stepcount
9480 s~progname
9481 j~lastchname
9482 j~periodic
9483 j~strtdate
9484 j~strttime
9485 j~strtdate
9486 j~strttime
9487 j~prdmonths
9488 j~prdweeks
9489 j~prddays
9490 j~prdhours
9491 j~prdmins
9492 j~btcsystem
9493 j~status
9494 j~succnum
9495 j~prednum
9496 j~jobclass
9497 j~priority
9498 e~eventid
9499 FROM tbtco AS j
9500 INNER JOIN tbtcp AS s
9501 ON j~jobname = s~jobname AND j~jobcount = s~jobcount
9502 LEFT JOIN btcevtjob AS e ON j~jobname = e~jobname AND j~jobcount = e~jobcount
9503 INTO CORRESPONDING FIELDS OF TABLE it_datatab
9504 WHERE j~status = 'S' OR j~status = 'Y' OR j~status = 'Z' OR j~status = 'R'
9505 ORDER BY j~jobname DESCENDING.
9506
9507 TRY.
9508 DATA: jobfilename TYPE string.
9509 CONCATENATE pFolder '/SysparencyJobExport.sysp' INTO jobfilename.
9510 cl_gui_frontend_services=>gui_download(
9511 EXPORTING
9512 filename = jobfilename
9513 filetype = 'DAT'
9514 codepage = '4110'
9515 CHANGING
9516 data_tab = it_datatab ).
9517 CATCH cx_root INTO DATA(e_text).
9518 MESSAGE e_text->get_text( ) TYPE 'I'.
9519 ENDTRY.
9520 ENDIF.
9521
9522 IF psystran = 'X'.
9523 TRY.
9524 SELECT *
9525 INTO TABLE @DATA(it_tstc)
9526 FROM tstc
9527 WHERE tcode LIKE 'Z%' OR tcode LIKE 'Y%'
9528 ORDER BY tcode DESCENDING.
9529
9530 DATA: transactionfilename TYPE string.
9531 CONCATENATE pFolder '/SysparencyTransactionExport.sysp' INTO transactionfilename.
9532 cl_gui_frontend_services=>gui_download(
9533 EXPORTING
9534 filename = transactionfilename
9535 filetype = 'DAT'
9536 codepage = '4110'
9537 CHANGING
9538 data_tab = it_tstc ).
9539 CATCH cx_root INTO DATA(e_text2).
9540 MESSAGE e_text2->get_text( ) TYPE 'I'.
9541 ENDTRY.
9542 ENDIF.
9543
9544 IF psysprog = 'X'.
9545 TRY.
9546 SELECT *
9547 INTO TABLE @DATA(it_progdir)
9548 FROM progdir
9549 WHERE name LIKE 'Z%' OR name LIKE 'Y%'.
9550 DATA: progdirfilename TYPE string.
9551 CONCATENATE pFolder '/SysparencyProgdirExport.sysp' INTO progdirfilename.
9552 cl_gui_frontend_services=>gui_download(
9553 EXPORTING
9554 filename = progdirfilename
9555 filetype = 'DAT'
9556 codepage = '4110'
9557 CHANGING
9558 data_tab = it_progdir ).
9559 CATCH cx_root INTO DATA(e_text3).
9560 MESSAGE e_text3->get_text( ) TYPE 'I'.
9561 ENDTRY.
9562 ENDIF.
9563endform.
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573