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)