Properties SourceCde
txt
1
*&---------------------------------------------------------------------*
2
*&  Include           ZSOFTCOPY_PROG                                   *
3
*&                                                                     *
4
*&---------------------------------------------------------------------*
5
*&                                                                     *
6
*& This file is part of ZSOFTCOPY.                                     *
7
*&                                                                     *
8
*& ZSOFTCOPY is free software: you can redistribute it and/or modify   *
9
*& it under the terms of the GNU General Public License as published   *
10
*& by the Free Software Foundation, either version 3 of the License,   *
11
*& or any later version.                                               *
12
*&                                                                     *
13
*& ZSOFTCOPY is distributed in the hope that it will be useful,        *
14
*& but WITHOUT ANY WARRANTY; without even the implied warranty of      *
15
*& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       *
16
*& GNU General Public License for more details.                        *
17
*&                                                                     *
18
*& You should have received a copy of the GNU General Public License   *
19
*& along with ZDOWNLOAD. If not, see <http://www.gnu.org/licenses/>.   *
20
*&                                                                     *
21
*&---------------------------------------------------------------------*
22
*&                                                                     *
23
*&  Author:     Ruediger von Creytz     ruediger.creytz@globalbit.net  *
24
*&  Copyright:  globalBIT, LLC          http://www.globalbit.net       *
25
*&                                                                     *
26
*&---------------------------------------------------------------------*
27
 
28
 
29
*-----------------------------------------------------------------------
30
* prog
31
*-----------------------------------------------------------------------
32
FORM prog.
33
*INCL
34
  PERFORM prog_r3tr_incl.
35
*PROG
36
  PERFORM prog_r3tr_prog.
37
 
38
ENDFORM.                    "prog
39
 
40
 
41
*-----------------------------------------------------------------------
42
* prog_r3tr_incl                                Includes
43
*-----------------------------------------------------------------------
44
FORM prog_r3tr_incl.
45
 
46
  DATA:
47
  lt_tabstrip TYPE it_tabstrip,
48
  lt_html TYPE it_string,
49
  lt_ti TYPE it_textinput,
50
  lt_ti_box TYPE it_textinput,
51
  ls_ti TYPE st_textinput,
52
  l_masterlang TYPE masterlang,
53
  l_filename TYPE string,
54
  ls_trdir TYPE trdir,
55
  l_laiso TYPE laiso,
56
  l_sptxt TYPE sptxt,
57
  l_name TYPE ad_namtext,
58
  l_text TYPE as4text,
59
  l_atext TYPE appltxt.
60
 
61
  FIELD-SYMBOLS:
62
  <ls_ztadir> TYPE st_ztadir.
63
 
64
  PERFORM get_tabstrip
65
    USING 'PROG_R3TR_INCL' space
66
    CHANGING lt_tabstrip.
67
 
68
  LOOP AT gt_ztadir ASSIGNING <ls_ztadir>
69
      WHERE pgmid = 'R3TR'
70
      AND object = 'PROG'
71
      AND subc = 'I'
72
      AND downloaded = abap_false.
73
 
74
    CLEAR:
75
    ls_trdir,
76
    l_atext.
77
 
78
    REFRESH:
79
    lt_html,
80
    lt_ti,
81
    lt_ti_box.
82
 
83
    SELECT SINGLE * FROM trdir INTO ls_trdir
84
        WHERE name = <ls_ztadir>-progname.
85
    IF sy-subrc <> 0.
86
      <ls_ztadir>-subrc = sy-subrc.
87
      CONTINUE.
88
    ENDIF.
89
 
90
*Attributes
91
*   Title
92
    CLEAR ls_ti.
93
    ls_ti-name = txt_title.
94
    ls_ti-value = <ls_ztadir>-descript.
95
    ls_ti-value_double_length = abap_true.
96
    ls_ti-input = abap_true.
97
    APPEND ls_ti TO lt_ti.
98
*   Original Language
99
    CLEAR ls_ti.
100
    ls_ti-name = txt_original_language.
101
    l_masterlang = ls_trdir-rload.
102
    IF l_masterlang IS INITIAL.
103
      l_masterlang = <ls_ztadir>-masterlang.
104
    ENDIF.
105
    PERFORM get_spras
106
      USING
107
        l_masterlang
108
      CHANGING
109
        l_laiso
110
        l_sptxt.
111
    ls_ti-value = l_laiso.
112
    ls_ti-description = l_sptxt.
113
    ls_ti-input = abap_true.
114
    APPEND ls_ti TO lt_ti.
115
*   Space
116
    CLEAR ls_ti.
117
    ls_ti-space = abap_true.
118
    APPEND ls_ti TO lt_ti.
119
*   Created
120
    CLEAR ls_ti.
121
    ls_ti-name = txt_created.
122
    PERFORM get_date
123
      USING
124
        ls_trdir-cdat
125
      CHANGING
126
        ls_ti-value.
127
    ls_ti-value_ext = ls_trdir-cnam.
128
    PERFORM get_user
129
      USING
130
        ls_trdir-cnam
131
      CHANGING
132
        l_name.
133
    ls_ti-value_ext_text = l_name.
134
    ls_ti-has_value_ext = abap_true.
135
    ls_ti-input = abap_true.
136
    APPEND ls_ti TO lt_ti.
137
*   Last changed by
138
    CLEAR ls_ti.
139
    ls_ti-name = txt_last_changed_by___1.
140
    PERFORM get_date
141
      USING
142
        ls_trdir-udat
143
      CHANGING
144
        ls_ti-value.
145
    ls_ti-value_ext = ls_trdir-unam.
146
    PERFORM get_user
147
      USING
148
        ls_trdir-unam
149
      CHANGING
150
        l_name.
151
    ls_ti-value_ext_text = l_name.
152
    ls_ti-input = abap_true.
153
    ls_ti-has_value_ext = abap_true.
154
    APPEND ls_ti TO lt_ti.
155
*   Status
156
    CLEAR ls_ti.
157
    ls_ti-name = txt_status.
158
    ls_ti-value = txt_active___1.
159
    APPEND ls_ti TO lt_ti.
160
*Attributes - Box
161
*   Type
162
    CLEAR ls_ti.
163
    ls_ti-name = txt_type___1.
164
    PERFORM get_dom_value_text
165
      USING
166
        'SUBC'
167
        ls_trdir-subc
168
      CHANGING
169
        ls_ti-value.
170
    ls_ti-input = abap_true.
171
    APPEND ls_ti TO lt_ti_box.
172
*   Status
173
    CLEAR ls_ti.
174
    ls_ti-name = txt_status.
175
    PERFORM get_dom_value_text
176
      USING
177
        'RSTAT'
178
        ls_trdir-rstat
179
      CHANGING
180
        ls_ti-value.
181
    ls_ti-input = abap_true.
182
    APPEND ls_ti TO lt_ti_box.
183
*   Application
184
    CLEAR ls_ti.
185
    ls_ti-name = txt_application.
186
    SELECT SINGLE atext FROM taplt INTO l_atext
187
      WHERE appl = ls_trdir-appl
188
      AND sprsl = sy-langu.
189
    ls_ti-value = l_atext.
190
    ls_ti-input = abap_true.
191
    APPEND ls_ti TO lt_ti_box.
192
*   Authorization Group
193
    CLEAR ls_ti.
194
    ls_ti-name = txt_authorization_group.
195
    ls_ti-value = ls_trdir-secu.
196
    ls_ti-input = abap_true.
197
    APPEND ls_ti TO lt_ti_box.
198
*   Package
199
    CLEAR ls_ti.
200
    ls_ti-name = txt_package.
201
    ls_ti-value = <ls_ztadir>-devclass.
202
    PERFORM get_devclass
203
      USING
204
        <ls_ztadir>-devclass
205
      CHANGING
206
        l_text.
207
    ls_ti-description = l_text.
208
    ls_ti-input = abap_true.
209
    APPEND ls_ti TO lt_ti_box.
210
*   Space
211
    CLEAR ls_ti.
212
    ls_ti-space = abap_true.
213
    APPEND ls_ti TO lt_ti_box.
214
*   Editor lock
215
    CLEAR ls_ti.
216
    ls_ti-name = txt_editor_lock.
217
    ls_ti-value = ls_trdir-edtx.
218
    ls_ti-flag = abap_true.
219
    APPEND ls_ti TO lt_ti_box.
220
 
221
*** HTML
222
    PERFORM html_main_header
223
      USING
224
        tpt_fugr_incl
225
        space "l_name_field
226
        <ls_ztadir>-progname
227
        txt_active___1
228
        space
229
        space
230
        'makeDivSize(''SOURCECODE'');'
231
        lt_tabstrip
232
        gt_link
233
      CHANGING
234
        lt_html.
235
*   Attributes
236
    PERFORM html_add_textinput_subbox
237
      USING
238
        lt_ti
239
        txt_attributes___2
240
        lt_ti_box
241
        'ATTRIBUTES'
242
        abap_false
243
      CHANGING
244
        lt_html.
245
*  Source code
246
    PERFORM add_report_sourcecode
247
      USING
248
        <ls_ztadir>-progname
249
        <ls_ztadir>-progname
250
        gc_extension_txt
251
        abap_false
252
        <ls_ztadir>
253
        'SOURCECODE'
254
        abap_true
255
      CHANGING
256
        lt_html.
257
*
258
    PERFORM html_main_footer
259
      USING
260
        lt_html.
261
 
262
    PERFORM download
263
      USING
264
        lt_html
265
        <ls_ztadir>-pgmid
266
        <ls_ztadir>-object
267
        <ls_ztadir>-progname
268
        gc_extension_htm
269
        abap_true.
270
    <ls_ztadir>-downloaded = abap_true.
271
  ENDLOOP.
272
ENDFORM.                                                    "r3tr_incl
273
 
274
 
275
*-----------------------------------------------------------------------
276
* prog_r3tr_prog                                Programme, Includes
277
*-----------------------------------------------------------------------
278
FORM prog_r3tr_prog.
279
 
280
  DATA:
281
  lt_tabstrip TYPE it_tabstrip,
282
  lt_html TYPE it_string,
283
  ls_prog_inf TYPE rpy_prog,
284
  lt_include_tab TYPE STANDARD TABLE OF rpy_repo,
285
  lt_source_extended TYPE it_abaptxt255,
286
  ls_source_extended TYPE st_abaptxt255,
287
  lt_textelements TYPE STANDARD TABLE OF textpool,
288
  ls_textelements_addons TYPE st_textpool_addons,
289
  lt_text_symbols_addons TYPE it_textpool_addons,
290
  lt_selection_texts TYPE STANDARD TABLE OF textpool,
291
  lt_selection_texts_addons TYPE it_textpool_addons,
292
  lt_text_symbols TYPE STANDARD TABLE OF textpool,
293
  lt_list_titles TYPE it_textinput,
294
  lt_row_titles TYPE it_textinput,
295
  lt_doc TYPE it_string,
296
  lt_ti TYPE it_textinput,
297
  lt_ti_box TYPE it_textinput,
298
  ls_ti TYPE st_textinput,
299
  l_masterlang TYPE masterlang,
300
  l_filename TYPE string,
301
  lt_varid TYPE STANDARD TABLE OF varid,
302
  lt_params TYPE STANDARD TABLE OF vanz,
303
  lt_params_nonv TYPE STANDARD TABLE OF vanz,
304
  lt_selop TYPE STANDARD TABLE OF vanz,
305
  lt_selop_nonv TYPE STANDARD TABLE OF vanz,
306
  lt_objects TYPE STANDARD TABLE OF vanz,
307
  lt_valutab TYPE STANDARD TABLE OF rsparams,
308
  lt_variant TYPE it_variant,
309
  ls_variant TYPE st_variant,
310
  ls_trdir TYPE trdir,
311
  l_laiso TYPE laiso,
312
  l_sptxt TYPE sptxt,
313
  l_name TYPE ad_namtext,
314
  l_text TYPE as4text,
315
  l_atext TYPE appltxt,
316
  l_text01 TYPE grouptext,
317
  l_fu_param(30) TYPE c,
318
  lt_source TYPE abapsource OCCURS 0.
319
 
320
  FIELD-SYMBOLS:
321
  <ls_tabstrip> TYPE st_tabstrip,
322
  <ls_ztadir> TYPE st_ztadir,
323
  <ls_textelements> TYPE textpool,
324
  <ls_varid> TYPE varid,
325
  <ls_vanz> TYPE vanz,
326
  <ls_valutab> TYPE rsparams,
327
  <ls_source> LIKE LINE OF lt_source.
328
 
329
  PERFORM get_tabstrip
330
    USING 'PROG_R3TR_PROG' space
331
    CHANGING lt_tabstrip.
332
 
333
  SELECT SINGLE parameter FROM fupararef INTO l_fu_param
334
    WHERE funcname = 'RPY_PROGRAM_READ'
335
    AND r3state = 'A'
336
    AND parameter = 'SOURCE_EXTENDED'
337
    AND paramtype = 'T'.
338
 
339
  LOOP AT gt_ztadir ASSIGNING <ls_ztadir>
340
      WHERE pgmid = 'R3TR'
341
      AND object = 'PROG'
342
      AND subc = '1'
343
      AND downloaded = abap_false.
344
    <ls_ztadir>-downloaded = abap_true.
345
 
346
    CLEAR:
347
    ls_prog_inf,
348
    ls_trdir,
349
    ls_variant,
350
    l_atext.
351
 
352
    REFRESH:
353
    lt_html,
354
    lt_include_tab,
355
    lt_list_titles,
356
    lt_objects,
357
    lt_params,
358
    lt_params_nonv,
359
    lt_row_titles,
360
    lt_selection_texts,
361
    lt_selop,
362
    lt_selop_nonv,
363
    lt_source,
364
    lt_source_extended,
365
    lt_text_symbols,
366
    lt_text_symbols_addons,
367
    lt_textelements,
368
    lt_ti,
369
    lt_ti_box,
370
    lt_valutab,
371
    lt_variant,
372
    lt_varid.
373
 
374
    IF l_fu_param = 'SOURCE_EXTENDED'.
375
      CALL FUNCTION 'RPY_PROGRAM_READ'
376
        EXPORTING
377
          language            = sy-langu
378
          program_name        = <ls_ztadir>-obj_name
379
          with_includelist    = abap_true
380
          only_source         = abap_false
381
          only_texts          = abap_false
382
          read_latest_version = abap_true
383
          with_lowercase      = abap_true
384
        IMPORTING
385
          prog_inf            = ls_prog_inf
386
        TABLES
387
          include_tab         = lt_include_tab
388
          source_extended     = lt_source_extended
389
          textelements        = lt_textelements
390
        EXCEPTIONS
391
          OTHERS              = 1.
392
      IF sy-subrc <> 0.
393
        <ls_ztadir>-subrc = sy-subrc.
394
        CONTINUE.
395
      ENDIF.
396
    ELSE.
397
      CALL FUNCTION 'RPY_PROGRAM_READ'
398
        EXPORTING
399
          language            = sy-langu
400
          program_name        = <ls_ztadir>-obj_name
401
          with_includelist    = abap_true
402
          only_source         = abap_false
403
          only_texts          = abap_false
404
          read_latest_version = abap_true
405
          with_lowercase      = abap_true
406
        IMPORTING
407
          prog_inf            = ls_prog_inf
408
        TABLES
409
          include_tab         = lt_include_tab
410
          SOURCE              = lt_source
411
          textelements        = lt_textelements
412
        EXCEPTIONS
413
          OTHERS              = 1.
414
      IF sy-subrc <> 0.
415
        <ls_ztadir>-subrc = sy-subrc.
416
        CONTINUE.
417
      ENDIF.
418
      LOOP AT lt_source ASSIGNING <ls_source>.
419
        ls_source_extended = <ls_source>-line.
420
        APPEND ls_source_extended TO lt_source_extended.
421
      ENDLOOP.
422
    ENDIF.
423
    SELECT SINGLE * FROM trdir INTO ls_trdir
424
        WHERE name = <ls_ztadir>-progname.
425
*Documentation
426
    PERFORM get_docu
427
      USING
428
        'RE'
429
        <ls_ztadir>-obj_name
430
        'E'
431
      CHANGING
432
        lt_doc.
433
*Text Symbols
434
    LOOP AT lt_textelements ASSIGNING <ls_textelements>.
435
      CASE <ls_textelements>-id.
436
        WHEN 'H'.
437
          CLEAR ls_ti.
438
          ls_ti-value = <ls_textelements>-entry.
439
          ls_ti-input = abap_true.
440
          ls_ti-no_name = abap_true.
441
          APPEND ls_ti TO lt_row_titles.
442
        WHEN 'I'.
443
          CLEAR ls_textelements_addons.
444
          APPEND <ls_textelements> TO lt_text_symbols.
445
          ls_textelements_addons-strlen = strlen(
446
            <ls_textelements>-entry
447
          ).
448
          APPEND ls_textelements_addons TO lt_text_symbols_addons.
449
        WHEN 'S'.
450
          CLEAR ls_textelements_addons.
451
          IF <ls_textelements>-entry+0(1) = 'D'.
452
            <ls_textelements>-entry+0(1) = space.
453
            ls_textelements_addons-dict_ref = abap_true.
454
          ENDIF.
455
          CONDENSE <ls_textelements>-entry.
456
          APPEND ls_textelements_addons
457
            TO lt_selection_texts_addons.
458
          APPEND <ls_textelements> TO lt_selection_texts.
459
        WHEN 'T'.
460
          CLEAR ls_ti.
461
          ls_ti-value = <ls_textelements>-entry.
462
          ls_ti-input = abap_true.
463
          ls_ti-no_name = abap_true.
464
          APPEND ls_ti TO lt_list_titles.
465
      ENDCASE.
466
    ENDLOOP.
467
*Attributes
468
*   Title
469
    CLEAR ls_ti.
470
    ls_ti-name = txt_title.
471
    ls_ti-value = <ls_ztadir>-descript.
472
    ls_ti-value_double_length = abap_true.
473
    ls_ti-input = abap_true.
474
    APPEND ls_ti TO lt_ti.
475
*   Original Language
476
    CLEAR ls_ti.
477
    ls_ti-name = txt_original_language.
478
    l_masterlang = ls_prog_inf-masterlang.
479
    IF l_masterlang IS INITIAL.
480
      l_masterlang = <ls_ztadir>-masterlang.
481
    ENDIF.
482
    PERFORM get_spras
483
      USING
484
        l_masterlang
485
      CHANGING
486
        l_laiso
487
        l_sptxt.
488
    ls_ti-value = l_laiso.
489
    ls_ti-description = l_sptxt.
490
    ls_ti-input = abap_true.
491
    APPEND ls_ti TO lt_ti.
492
*   Space
493
    CLEAR ls_ti.
494
    ls_ti-space = abap_true.
495
    APPEND ls_ti TO lt_ti.
496
*   Created
497
    CLEAR ls_ti.
498
    ls_ti-name = txt_created.
499
    PERFORM get_date
500
      USING
501
        ls_prog_inf-creat_date
502
      CHANGING
503
        ls_ti-value.
504
    ls_ti-value_ext = ls_prog_inf-creat_user.
505
    PERFORM get_user
506
      USING
507
        ls_prog_inf-creat_user
508
      CHANGING
509
        l_name.
510
    ls_ti-value_ext_text = l_name.
511
    ls_ti-has_value_ext = abap_true.
512
    ls_ti-input = abap_true.
513
    APPEND ls_ti TO lt_ti.
514
*   Last changed by
515
    CLEAR ls_ti.
516
    ls_ti-name = txt_last_changed_by___1.
517
    PERFORM get_date
518
      USING
519
        ls_prog_inf-mod_date
520
      CHANGING
521
        ls_ti-value.
522
    ls_ti-value_ext = ls_prog_inf-mod_user.
523
    PERFORM get_user
524
      USING
525
        ls_prog_inf-mod_user
526
      CHANGING
527
        l_name.
528
    ls_ti-value_ext_text = l_name.
529
    ls_ti-input = abap_true.
530
    ls_ti-has_value_ext = abap_true.
531
    APPEND ls_ti TO lt_ti.
532
*   Status
533
    CLEAR ls_ti.
534
    ls_ti-name = txt_status.
535
    ls_ti-value = txt_active___1.
536
    APPEND ls_ti TO lt_ti.
537
*Attributes - Box
538
*   Type
539
    CLEAR ls_ti.
540
    ls_ti-name = txt_type___1.
541
    PERFORM get_dom_value_text
542
      USING
543
        'SUBC'
544
        ls_prog_inf-prog_type
545
      CHANGING
546
        ls_ti-value.
547
    ls_ti-input = abap_true.
548
    APPEND ls_ti TO lt_ti_box.
549
*   Status
550
    CLEAR ls_ti.
551
    ls_ti-name = txt_status.
552
    PERFORM get_dom_value_text
553
      USING
554
        'RSTAT'
555
        ls_prog_inf-status
556
      CHANGING
557
        ls_ti-value.
558
    ls_ti-input = abap_true.
559
    APPEND ls_ti TO lt_ti_box.
560
*   Application
561
    CLEAR ls_ti.
562
    ls_ti-name = txt_application.
563
    SELECT SINGLE atext FROM taplt INTO l_atext
564
      WHERE appl = ls_prog_inf-appl
565
      AND sprsl = sy-langu.
566
    ls_ti-value = l_atext.
567
    ls_ti-input = abap_true.
568
    APPEND ls_ti TO lt_ti_box.
569
*   Authorization Group
570
    CLEAR ls_ti.
571
    CLEAR l_text01.
572
    ls_ti-name = txt_authorization_group.
573
    ls_ti-value = ls_prog_inf-auth_group.
574
    SELECT SINGLE text01 FROM tpgpt INTO l_text01
575
      WHERE p_group = ls_prog_inf-auth_group
576
      AND langu = sy-langu.
577
    ls_ti-description = l_text01.
578
    ls_ti-input = abap_true.
579
    APPEND ls_ti TO lt_ti_box.
580
*   Package
581
    CLEAR ls_ti.
582
    ls_ti-name = txt_package.
583
    ls_ti-value = <ls_ztadir>-devclass.
584
    PERFORM get_devclass
585
      USING
586
        <ls_ztadir>-devclass
587
      CHANGING
588
        l_text.
589
    ls_ti-description = l_text.
590
    ls_ti-input = abap_true.
591
    APPEND ls_ti TO lt_ti_box.
592
*   Logical database
593
    CLEAR ls_ti.
594
    ls_ti-name = txt_logical_database.
595
    ls_ti-value = ls_prog_inf-dbname.
596
    ls_ti-input = abap_true.
597
    APPEND ls_ti TO lt_ti_box.
598
*   Selection screen version
599
    CLEAR ls_ti.
600
    ls_ti-name = txt_selection_screen_version.
601
    ls_ti-value = ls_prog_inf-selscreen.
602
    ls_ti-input = abap_true.
603
    APPEND ls_ti TO lt_ti_box.
604
*   Editor lock
605
    CLEAR ls_ti.
606
    ls_ti-name = txt_editor_lock.
607
    ls_ti-value = ls_trdir-edtx.
608
    ls_ti-flag = abap_true.
609
    ls_ti-flag_col = 1.
610
    APPEND ls_ti TO lt_ti_box.
611
*   Fixed point arithmetic
612
    CLEAR ls_ti.
613
    ls_ti-name = txt_fixed_point_arithmetic.
614
    ls_ti-value = ls_trdir-fixpt.
615
    ls_ti-flag = abap_true.
616
    ls_ti-flag_col = 2.
617
    APPEND ls_ti TO lt_ti_box.
618
*   Unicode checks active
619
    CLEAR ls_ti.
620
    ls_ti-name = txtt_unicode_checks_active.
621
    ls_ti-value = ls_trdir-uccheck.
622
    ls_ti-flag = abap_true.
623
    ls_ti-flag_col = 1.
624
    APPEND ls_ti TO lt_ti_box.
625
*   Start using variant
626
    CLEAR ls_ti.
627
    ls_ti-name = txt_start_using_variant.
628
    ls_ti-value = ls_trdir-sset.
629
    ls_ti-flag = abap_true.
630
    ls_ti-flag_col = 2.
631
    APPEND ls_ti TO lt_ti_box.
632
*Variants
633
    IF g_add_report_variants = abap_true.
634
      SELECT * FROM varid INTO TABLE lt_varid
635
          WHERE report = <ls_ztadir>-obj_name.
636
      LOOP AT lt_varid ASSIGNING <ls_varid>.
637
        READ TABLE gt_varid_broken TRANSPORTING NO FIELDS
638
            WITH KEY report = <ls_varid>-report
639
                     vari = <ls_varid>-variant.
640
        IF sy-subrc = 0.
641
          CONTINUE.
642
        ENDIF.
643
        CALL FUNCTION 'RS_VARIANT_CONTENTS'
644
          EXPORTING
645
            report        = <ls_varid>-report
646
            variant       = <ls_varid>-variant
647
          TABLES
648
            l_params      = lt_params
649
            l_params_nonv = lt_params_nonv
650
            l_selop       = lt_selop
651
            l_selop_nonv  = lt_selop_nonv
652
            valutab       = lt_valutab
653
            OBJECTS       = lt_objects
654
          EXCEPTIONS
655
            OTHERS        = 1.
656
        IF sy-subrc <> 0.
657
          CONTINUE.
658
        ENDIF.
659
        LOOP AT lt_valutab ASSIGNING <ls_valutab>.
660
          IF sy-tabix > 100.
661
            "too many entries may cause a timeout,
662
            "so better skip the rest...
663
            EXIT.
664
          ENDIF.
665
          CLEAR ls_variant.
666
          ls_variant-program = <ls_varid>-report.
667
          ls_variant-variant = <ls_varid>-variant.
668
          ls_variant-selname = <ls_valutab>-selname.
669
          PERFORM get_gui_kind
670
            USING <ls_valutab>-kind
671
            CHANGING ls_variant-kind.
672
          PERFORM get_gui_sign
673
            USING <ls_valutab>-sign
674
            CHANGING ls_variant-sign.
675
          PERFORM get_gui_operator
676
            USING <ls_valutab>-option
677
            CHANGING ls_variant-option.
678
          ls_variant-low = <ls_valutab>-low.
679
          ls_variant-high = <ls_valutab>-high.
680
          READ TABLE lt_params ASSIGNING <ls_vanz>
681
              WITH KEY name = <ls_valutab>-selname.
682
          IF sy-subrc <> 0 OR <ls_vanz>-text IS INITIAL.
683
            READ TABLE lt_params_nonv ASSIGNING <ls_vanz>
684
                WITH KEY name = <ls_valutab>-selname.
685
            IF sy-subrc <> 0 OR <ls_vanz>-text IS INITIAL.
686
              READ TABLE lt_selop ASSIGNING <ls_vanz>
687
                  WITH KEY name = <ls_valutab>-selname.
688
              IF sy-subrc <> 0 OR <ls_vanz>-text IS INITIAL.
689
                READ TABLE lt_selop_nonv ASSIGNING <ls_vanz>
690
                    WITH KEY name = <ls_valutab>-selname.
691
                IF sy-subrc <> 0 OR <ls_vanz>-text IS INITIAL.
692
                  READ TABLE lt_objects ASSIGNING <ls_vanz>
693
                      WITH KEY name = <ls_valutab>-selname.
694
                ENDIF.
695
              ENDIF.
696
            ENDIF.
697
          ENDIF.
698
          IF sy-subrc = 0.
699
            ls_variant-text = <ls_vanz>-text.
700
          ENDIF.
701
          APPEND ls_variant TO lt_variant.
702
        ENDLOOP.
703
      ENDLOOP.
704
    ENDIF.
705
***Tabstrip
706
    LOOP AT lt_tabstrip ASSIGNING <ls_tabstrip>.
707
      <ls_tabstrip>-empty = abap_false.
708
      CASE <ls_tabstrip>-id.
709
        WHEN 'LISTTITLE'.
710
          IF lt_list_titles IS INITIAL
711
          AND lt_row_titles IS INITIAL.
712
            <ls_tabstrip>-empty = abap_true.
713
          ENDIF.
714
        WHEN 'SELECTIONTEXTS'.
715
          IF lt_selection_texts IS INITIAL.
716
            <ls_tabstrip>-empty = abap_true.
717
          ENDIF.
718
        WHEN 'TEXTSYMBOLS'.
719
          IF lt_text_symbols IS INITIAL.
720
            <ls_tabstrip>-empty = abap_true.
721
          ENDIF.
722
        WHEN 'DOC'.
723
          IF lt_doc IS INITIAL.
724
            <ls_tabstrip>-empty = abap_true.
725
          ENDIF.
726
        WHEN 'VARIANT'.
727
          IF lt_variant IS INITIAL.
728
            <ls_tabstrip>-empty = abap_true.
729
            IF g_add_report_variants = abap_false.
730
              <ls_tabstrip>-hidden = abap_true.
731
            ENDIF.
732
          ENDIF.
733
      ENDCASE.
734
    ENDLOOP.
735
 
736
*** HTML
737
    PERFORM html_main_header
738
      USING
739
        tpt_prog_repo
740
        space "l_name_field
741
        <ls_ztadir>-obj_name
742
        txt_active___1
743
        space
744
        space
745
        'makeDivSize(''SOURCECODE'');makeDivSize(''DOC'');'
746
        lt_tabstrip
747
        gt_link
748
      CHANGING
749
        lt_html.
750
*  list and row titles
751
    IF NOT lt_list_titles IS INITIAL
752
    OR NOT lt_row_titles IS INITIAL
753
    OR g_empty_tab = gc_empty_tab_display.
754
      PERFORM html_add_box_textinput2ver
755
        USING
756
          txt_list_header
757
          lt_list_titles
758
          txt_column_heading
759
          lt_row_titles
760
          'LISTTITLE'
761
          abap_false
762
        CHANGING
763
          lt_html.
764
    ENDIF.
765
*  selection texts
766
    IF NOT lt_selection_texts IS INITIAL
767
    OR g_empty_tab = gc_empty_tab_display.
768
      PERFORM html_add_table
769
        USING
770
          'PROG_SELEC'
771
          lt_selection_texts
772
          lt_selection_texts_addons
773
          'SELECTIONTEXTS'
774
          abap_false
775
        CHANGING
776
          lt_html.
777
    ENDIF.
778
*  text symbols
779
    IF NOT lt_text_symbols IS INITIAL
780
    OR g_empty_tab = gc_empty_tab_display.
781
      PERFORM html_add_table
782
        USING
783
          'PROG_SYMBO'
784
          lt_text_symbols
785
          lt_text_symbols_addons
786
          'TEXTSYMBOLS'
787
          abap_false
788
        CHANGING
789
          lt_html.
790
    ENDIF.
791
*  variants
792
    IF g_add_report_variants = abap_true
793
    AND ( NOT lt_variant IS INITIAL
794
    OR g_empty_tab = gc_empty_tab_display ).
795
      PERFORM html_add_table
796
        USING
797
          'PROG_VARIA'
798
          lt_variant
799
          lt_variant
800
          'VARIANT'
801
          abap_false
802
        CHANGING
803
          lt_html.
804
    ENDIF.
805
*  documentation
806
    IF NOT lt_doc IS INITIAL
807
    OR g_empty_tab = gc_empty_tab_display.
808
      PERFORM html_add_doc
809
        USING
810
          lt_doc
811
          'DOC'
812
          abap_false
813
        CHANGING
814
          lt_html.
815
    ENDIF.
816
*  attributes
817
    PERFORM html_add_textinput_subbox
818
      USING
819
        lt_ti
820
        txt_attributes___2
821
        lt_ti_box
822
        'ATTRIBUTES'
823
        abap_false
824
      CHANGING
825
        lt_html.
826
*  source code
827
    PERFORM add_report_sourcecode
828
      USING
829
        <ls_ztadir>-obj_name
830
        <ls_ztadir>-obj_name
831
        gc_extension_txt
832
        abap_true
833
        <ls_ztadir>
834
        'SOURCECODE'
835
        abap_true
836
      CHANGING
837
        lt_html.
838
*
839
    PERFORM html_main_footer
840
      USING
841
        lt_html.
842
 
843
    PERFORM download
844
      USING
845
        lt_html
846
        <ls_ztadir>-pgmid
847
        <ls_ztadir>-object
848
        <ls_ztadir>-obj_name
849
        gc_extension_htm
850
        abap_true.
851
  ENDLOOP.
852
ENDFORM.                                                    "r3tr_prog