Eigenschaften | Quelltext
Titel | SoftCopy - fugr |
Originalsprache | DE | Deutsch
Erstellt | 03.01.2013 |  | CREYTZ |
Letzte Änderung | 23.02.2021 |  | CREYTZ |
Status | aktiv |
Attribute
Typ | Include-Programm |
Status | Produktives Kundenprogramm |
Anwendung |  |
Berechtigungsgruppe |  |
Paket | ZSOFTCOPY | SoftCopy
| Editorsperre
txt
    1
    *&---------------------------------------------------------------------*
    2
    *&  Include           ZSOFTCOPY_FUGR                                   *
    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
    * fugr
    31
    *-----------------------------------------------------------------------
    32
    FORM fugr.
    33
    *FUGR
    34
      PERFORM fugr_r3tr_fugr.
    35
    *INCL
    36
      PERFORM fugr_r3tr_includes.
    37
    *MOD
    38
      PERFORM fugr_r3tr_modules.
    39
    *Screen
    40
      PERFORM fugr_r3tr_screen.
    41
    42
    ENDFORM.                    "fugr
    43
    44
    45
    *-----------------------------------------------------------------------
    46
    * fugr_get_feldtab
    47
    *-----------------------------------------------------------------------
    48
    FORM fugr_get_feldtab
    49
      USING
    50
        is_d020s TYPE d020s
    51
        it_d021s TYPE it_d021s
    52
        it_d023x TYPE d023s_xtab
    53
        is_dynpro_release TYPE st_dynpro_release
    54
      CHANGING
    55
        ct_feld TYPE it_feld
    56
        ct_feld_redef TYPE it_feld_redef.
    57
    58
      DATA:
    59
      ls_d021s_res1 LIKE d021s_res1,
    60
      ls_feld TYPE feld,
    61
      ls_feld_redef TYPE st_feld_redef,
    62
      ls_func_old TYPE st_dynpro_function_old,
    63
      ls_func_new TYPE st_dynpro_function_new,
    64
      l_length TYPE i,
    65
      l_strlen TYPE i.
    66
    67
      FIELD-SYMBOLS:
    68
      <ls_d021s> TYPE d021s,
    69
      <ls_d023x> TYPE d023s_xh,
    70
      <l_recentry> TYPE ANY.
    71
    72
      CONSTANTS:
    73
      lc_flg1ddf TYPE x VALUE '20',
    74
      lc_flg1ddm TYPE x VALUE '10',
    75
      lc_flg1edt TYPE x VALUE '80',
    76
      lc_flg1scr TYPE x VALUE '01',
    77
      lc_flg3obl TYPE x VALUE '20',
    78
      lc_fmb1ges TYPE x VALUE '20',
    79
      lc_fmb1out TYPE x VALUE '01',
    80
      lcs_dynpro_rel_400 TYPE st_dynpro_release VALUE '4.00',
    81
      lcs_dynpro_rel_401 TYPE st_dynpro_release VALUE '4.01',
    82
      lcs_dynpro_rel_402 TYPE st_dynpro_release VALUE '4.02',
    83
      lcs_dynpro_rel_46a TYPE st_dynpro_release VALUE '4.60',
    84
      lcs_dynpro_rel_610 TYPE st_dynpro_release VALUE '6.10'.
    85
    86
    87
      REFRESH:
    88
      ct_feld,
    89
      ct_feld_redef.
    90
    91
    92
      LOOP AT it_d021s ASSIGNING <ls_d021s>.
    93
        CLEAR ls_d021s_res1.
    94
        CLEAR ls_feld.
    95
        CLEAR ls_feld_redef.
    96
        CLEAR ls_func_new.
    97
        CLEAR ls_func_old.
    98
    99
        ls_d021s_res1 = <ls_d021s>-res1.
    100
    101
        ls_feld-name = <ls_d021s>-fnam.
    102
        ls_feld-dynnr = is_d020s-dnum.
    103
        ls_feld-line = <ls_d021s>-line.
    104
    105
        IF ( <ls_d021s>-lanf <> 0 AND <ls_d021s>-ltyp = 'T' )
    106
        OR ( <ls_d021s>-ltyp = 'I' AND <ls_d021s>-fill = 'P' )
    107
        OR <ls_d021s>-ltyp = 'S'.
    108
          ls_feld-coln = <ls_d021s>-coln.
    109
        ELSE.
    110
          ls_feld-coln = <ls_d021s>-coln - 1.
    111
        ENDIF.
    112
    113
        ls_feld-leng = <ls_d021s>-leng.
    114
    115
        ls_feld-vleng = 1.
    116
        IF <ls_d021s>-didx <= 0.
    117
          IF <ls_d021s>-stxt(1) = '@'.
    118
            IF <ls_d021s>-leng > 2.
    119
              ls_feld-vleng = <ls_d021s>-leng - 2.
    120
            ENDIF.
    121
          ELSE.
    122
            IF <ls_d021s>-leng > 1.
    123
              ls_feld-vleng = <ls_d021s>-leng.
    124
            ENDIF.
    125
          ENDIF.
    126
        ELSE.
    127
          IF <ls_d021s>-fill CA 'TBSUIR'.
    128
            ls_feld-vleng = <ls_d021s>-leng.
    129
          ELSE.
    130
            IF <ls_d021s>-flg1 Z lc_flg1edt.
    131
              IF <ls_d021s>-ltyp CA 'TP'.
    132
                ls_feld-vleng = <ls_d021s>-didx.
    133
              ELSE.
    134
                IF <ls_d021s>-didx > 0.
    135
                  ls_feld-vleng = <ls_d021s>-didx.
    136
                ELSE.
    137
                  ls_feld-vleng = <ls_d021s>-leng.
    138
                ENDIF.
    139
              ENDIF.
    140
            ELSE.
    141
              ls_feld-vleng = <ls_d021s>-didx.
    142
            ENDIF.
    143
          ENDIF.
    144
        ENDIF.
    145
    146
        ls_feld-high = 1.
    147
        IF <ls_d021s>-didx > 0
    148
        AND <ls_d021s>-fill CA 'TBSUIR'.
    149
          ls_feld-high = <ls_d021s>-didx.
    150
        ENDIF.
    151
    152
        IF <ls_d021s>-flg1 O lc_flg1edt
    153
        AND <ls_d021s>-flg1 O lc_flg1scr
    154
        AND <ls_d021s>-fill NA 'TSI'.
    155
          ls_feld-scroll = abap_true.
    156
        ELSE.
    157
          ls_feld-scroll = abap_false.
    158
        ENDIF.
    159
        IF <ls_d021s>-type = 'STRG'
    160
        OR <ls_d021s>-type = 'RSTR'
    161
        OR <ls_d021s>-type = 'SSTR'.
    162
          ls_feld-scroll = abap_true.
    163
        ENDIF.
    164
    165
        IF <ls_d021s>-flg1 O lc_flg1ddf.
    166
          ls_feld-dict = abap_true.
    167
        ELSE.
    168
          ls_feld-dict = abap_false.
    169
        ENDIF.
    170
    171
        IF <ls_d021s>-flg1 O lc_flg1edt.
    172
          IF <ls_d021s>-flg1 O lc_flg1ddf
    173
          AND <ls_d021s>-flg1 O lc_flg1ddm.
    174
            ls_feld-dmod = abap_true.
    175
          ENDIF.
    176
        ELSE.
    177
          IF <ls_d021s>-flg1 O lc_flg1ddf.
    178
            IF <ls_d021s>-ityp = '4'.
    179
              ls_feld-dmod = '4'.
    180
            ELSE.
    181
              IF <ls_d021s>-ityp = '1'
    182
              OR <ls_d021s>-ityp = '2'
    183
              OR <ls_d021s>-ityp = '3'.
    184
                IF <ls_d021s>-flg1 O lc_flg1ddm.
    185
                  ls_feld-dmod = <ls_d021s>-ityp.
    186
                ELSE.
    187
                  ls_feld-dmod = 'V'.
    188
                ENDIF.
    189
              ELSEIF <ls_d021s>-ityp = '0'.
    190
                IF <ls_d021s>-flg1 O lc_flg1ddm.
    191
                  ls_feld-dmod = 'F'.
    192
                ELSE.
    193
                  ls_feld-dmod = 'V'.
    194
                ENDIF.
    195
              ELSE.
    196
                ls_feld-dmod = 'F'.
    197
              ENDIF.
    198
            ENDIF.
    199
          ENDIF.
    200
        ENDIF.
    201
    202
        ls_feld-grp1 = <ls_d021s>-grp1.
    203
        ls_feld-grp2 = <ls_d021s>-grp2.
    204
        ls_feld-grp3 = <ls_d021s>-grp3.
    205
        ls_feld-grp4 = <ls_d021s>-grp4.
    206
    207
        IF <ls_d021s>-ltyp = 'L'.
    208
          ls_feld-loop = <ls_d021s>-lrep.
    209
          IF is_d020s-valp = <ls_d021s>-lanf.
    210
            ls_feld-ltyp = 'Var'.
    211
          ELSE.
    212
            ls_feld-ltyp = 'Fix'.
    213
          ENDIF.
    214
        ENDIF.
    215
    216
        IF <ls_d021s>-fmb1 O lc_fmb1ges.
    217
          ls_feld-fobl = 'N'.
    218
        ELSEIF <ls_d021s>-flg3 O lc_flg3obl.
    219
          ls_feld-fobl = 'O'.
    220
          ls_feld-fein = abap_true.
    221
        ELSE.
    222
          ls_feld-fein = abap_true.
    223
          ASSIGN COMPONENT 'RECENTRY' OF STRUCTURE ls_d021s_res1
    224
            TO <l_recentry>.
    225
          IF <l_recentry> IS ASSIGNED AND NOT <l_recentry> IS INITIAL.
    226
            ls_feld-fobl = 'R'.
    227
          ENDIF.
    228
          UNASSIGN <l_recentry>.
    229
        ENDIF.
    230
        PERFORM get_dom_value_text
    231
          USING 'SCRPFOBL' ls_feld-fobl
    232
          CHANGING ls_feld_redef-fobl.
    233
    234
        IF <ls_d021s>-fill <> 'R'.
    235
          ls_feld-fout = abap_true.
    236
        ENDIF.
    237
    238
        PERFORM fugr_get_feld_fill_na_btisu
    239
          USING <ls_d021s> is_dynpro_release
    240
          CHANGING ls_feld.
    241
    242
        ls_feld-colr = <ls_d021s>-colr.
    243
        ls_feld-mtch = <ls_d021s>-dmac.
    244
        ls_feld-waer = <ls_d021s>-wnam.
    245
    246
        IF is_dynpro_release <= lcs_dynpro_rel_400.
    247
          ls_func_old = <ls_d021s>-dmac.
    248
          ls_feld-fcod  = ls_func_old-code.
    249
          ls_feld-ptype = ls_func_old-type.
    250
        ELSEIF is_dynpro_release <= lcs_dynpro_rel_402.
    251
          ls_func_new  = <ls_d021s>-dmac.
    252
          ls_feld-fcod  = ls_func_new-code.
    253
          ls_feld-ptype = ls_func_new-type.
    254
        ELSE.
    255
          ls_feld-fcod  = ls_d021s_res1-funccode.
    256
          ls_feld-ptype = ls_d021s_res1-functype.
    257
        ENDIF.
    258
    259
        IF ls_d021s_res1-ctmenuflg = abap_true.
    260
          ls_feld-ctmenust = abap_true.
    261
          ls_feld-ctmenuprog = ls_d021s_res1-ctmenuprog.
    262
          ls_feld-ctmenustat = ls_d021s_res1-ctmenustat.
    263
        ELSE.
    264
          ls_feld-ctmenudy = abap_true.
    265
          ls_feld-ctmenuonct = ls_d021s_res1-ctmenustat.
    266
        ENDIF.
    267
    268
        READ TABLE it_d023x ASSIGNING <ls_d023x>
    269
            WITH KEY cccustom = <ls_d021s>-fnam.
    270
        IF sy-subrc = 0.
    271
          ls_feld-ccname = <ls_d023x>-ccname.
    272
        ENDIF.
    273
    274
        CALL FUNCTION 'RS_SCRP_GET_FIELD_TYPE_TEXT'
    275
          EXPORTING
    276
            field                    = <ls_d021s>
    277
            text_kind                = 'SHORT'
    278
          IMPORTING
    279
            field_type_without_modif = ls_feld-gtyp
    280
          EXCEPTIONS
    281
            OTHERS                   = 1.
    282
    283
        ls_feld-stxt = <ls_d021s>-stxt.
    284
        ls_feld-dropfrom = ls_d021s_res1-dropval.
    285
        IF ls_d021s_res1-dropdown = 'D'.
    286
          CASE ls_d021s_res1-dropstyle.
    287
            WHEN 'K'.
    288
              ls_feld-dropdown = ls_d021s_res1-dropstyle.
    289
            WHEN OTHERS.
    290
              ls_feld-dropdown = ls_d021s_res1-droptyp.
    291
          ENDCASE.
    292
          PERFORM get_dom_value_text
    293
              USING 'SCRPCOTYPE' ls_feld-dropdown
    294
              CHANGING ls_feld_redef-dropdown.
    295
        ENDIF.
    296
    297
        IF <ls_d021s>-colr = '8'.
    298
          ls_feld-extend = 'N'.
    299
        ELSEIF <ls_d021s>-colr = '7'.
    300
          ls_feld-extend = 'C'.
    301
        ENDIF.
    302
    303
        IF <ls_d021s>-fill CA 'BTSUI'.
    304
          ls_feld-hierarchy = '+ '.
    305
        ENDIF.
    306
        IF <ls_d021s>-ltyp CA 'TSI'.
    307
          ls_feld-hierarchy = ' -'.
    308
        ENDIF.
    309
    310
        PERFORM fugr_get_feld_icon
    311
          USING
    312
            <ls_d021s>
    313
          CHANGING
    314
            ls_feld.
    315
    316
        ls_feld-prog = is_d020s-prog.
    317
        ls_feld-dnum = is_d020s-dnum.
    318
    319
    *post processing
    320
        CASE <ls_d021s>-ltyp.
    321
          WHEN 'O'.  "OK-Code
    322
            ls_feld-type = ' OK '.
    323
            ls_feld-line = '0'.
    324
            ls_feld-coln = '0'.
    325
            ls_feld-leng = ls_feld-vleng.
    326
            ls_feld-fein = abap_undefined.
    327
            ls_feld-fout = abap_undefined.
    328
            ls_feld-oout = abap_undefined.
    329
            ls_feld_redef-fobl = space.
    330
            ls_feld-fixf = abap_false.
    331
          WHEN OTHERS.
    332
            ls_feld-type = <ls_d021s>-type.
    333
        ENDCASE.
    334
    335
        CASE <ls_d021s>-fill.
    336
          WHEN 'C'.  "Checkbutton
    337
            ls_feld-scroll = abap_undefined.
    338
            ls_feld-icon_x = abap_undefined.
    339
            ls_feld_redef-fobl = space.
    340
            ls_feld-fixf = abap_false.
    341
          WHEN 'P'.  "Pushbutton
    342
            ls_feld-scroll = abap_undefined.
    343
            ls_feld_redef-fobl = space.
    344
          WHEN 'R'.  "Frame
    345
            ls_feld-fout = abap_true.
    346
            ls_feld-scroll = abap_undefined.
    347
            ls_feld_redef-fobl = space.
    348
          WHEN 'T'.
    349
            ls_feld_redef-fobl = space.
    350
        ENDCASE.
    351
    352
        CASE ls_feld-gtyp.
    353
          WHEN 'Check'.
    354
            IF <ls_d021s>-ityp = '0'.
    355
              ls_feld-scroll = abap_undefined.
    356
              ls_feld-fein = abap_false.
    357
              ls_feld-fout = abap_false.
    358
              ls_feld-oout = abap_false.
    359
              ls_feld-type = space.
    360
              ls_feld-icon_x = abap_undefined.
    361
              ls_feld_redef-fobl = space.
    362
              ls_feld-paid = space.
    363
              ls_feld-cmbfoc = abap_false.
    364
              ls_feld-ucnv = space.
    365
            ENDIF.
    366
          WHEN 'CuCtr'.
    367
            ls_feld-scroll = abap_undefined.
    368
            ls_feld-fein = abap_false.
    369
            ls_feld-fout = abap_false.
    370
            ls_feld-oout = abap_false.
    371
            ls_feld-type = space.
    372
            ls_feld-icon_x = abap_undefined.
    373
            ls_feld_redef-fobl = space.
    374
            ls_feld-paid = space.
    375
            ls_feld-cmbfoc = abap_false.
    376
            ls_feld-ucnv = space.
    377
          WHEN 'Frame'.
    378
            ls_feld-scroll = abap_undefined.
    379
            ls_feld-icon_x = abap_undefined.
    380
            IF ls_feld-stxt CN ' _'.
    381
              ls_feld-fein = abap_false.
    382
              ls_feld-fout = abap_false.
    383
              ls_feld-oout = abap_false.
    384
              ls_feld-type = space.
    385
              ls_feld_redef-fobl = space.
    386
              ls_feld-paid = space.
    387
              ls_feld-cmbfoc = abap_false.
    388
              ls_feld-ucnv = space.
    389
            ENDIF.
    390
          WHEN 'I/O'.
    391
            IF is_dynpro_release <= lcs_dynpro_rel_402.
    392
              ls_feld-fixf = abap_false.
    393
            ENDIF.
    394
          WHEN 'Push'.
    395
            ls_feld-scroll = abap_undefined.
    396
            ls_feld-mtch = space.
    397
            IF <ls_d021s>-flg1 Z lc_flg1edt.
    398
              ls_feld-fein = abap_false.
    399
              ls_feld-fout = abap_false.
    400
              ls_feld-oout = abap_false.
    401
              ls_feld-type = space.
    402
              ls_feld-icon_x = abap_undefined.
    403
              ls_feld_redef-fobl = space.
    404
              ls_feld-paid = space.
    405
              ls_feld-cmbfoc = abap_false.
    406
              ls_feld-ucnv = space.
    407
            ENDIF.
    408
          WHEN 'Radio'.
    409
            ls_feld-scroll = abap_undefined.
    410
            ls_feld-icon_x = abap_undefined.
    411
            ls_feld_redef-fobl = space.
    412
            IF ls_feld-fcod IS INITIAL.
    413
              ls_feld-fein = abap_false.
    414
              ls_feld-fout = abap_false.
    415
              ls_feld-oout = abap_false.
    416
              ls_feld-type = space.
    417
              ls_feld-icon_x = abap_undefined.
    418
              ls_feld_redef-fobl = space.
    419
              ls_feld-paid = space.
    420
              ls_feld-cmbfoc = abap_false.
    421
              ls_feld-ucnv = space.
    422
            ENDIF.
    423
          WHEN 'SubSc'.
    424
            ls_feld-scroll = abap_undefined.
    425
            ls_feld-icon_x = abap_undefined.
    426
            ls_feld_redef-fobl = space.
    427
            IF ls_feld-fcod IS INITIAL.
    428
              ls_feld-fein = abap_false.
    429
              ls_feld-fout = abap_false.
    430
              ls_feld-oout = abap_false.
    431
              ls_feld-type = space.
    432
              ls_feld-icon_x = abap_undefined.
    433
              ls_feld_redef-fobl = space.
    434
              ls_feld-paid = space.
    435
              ls_feld-cmbfoc = abap_false.
    436
              ls_feld-ucnv = space.
    437
            ENDIF.
    438
          WHEN 'Table'.
    439
            ls_feld-fein = abap_false.
    440
            ls_feld-fout = abap_false.
    441
            ls_feld-oout = abap_false.
    442
            ls_feld-type = space.
    443
            ls_feld-dict = abap_false.
    444
            ls_feld-dmod = abap_false.
    445
          WHEN 'TbStr'.
    446
            ls_feld-scroll = abap_undefined.
    447
            ls_feld-fein = abap_false.
    448
            ls_feld-fout = abap_false.
    449
            ls_feld-oout = abap_false.
    450
            ls_feld-type = space.
    451
            ls_feld-icon_x = abap_undefined.
    452
            ls_feld_redef-fobl = space.
    453
            ls_feld-paid = space.
    454
            ls_feld-cmbfoc = abap_false.
    455
            ls_feld-ucnv = space.
    456
          WHEN 'Text'.
    457
            ls_feld-scroll = abap_undefined.
    458
            ls_feld-fein = abap_false.
    459
            ls_feld-fout = abap_false.
    460
            ls_feld-oout = abap_false.
    461
            ls_feld-type = space.
    462
            ls_feld-icon_x = abap_undefined.
    463
            ls_feld_redef-fobl = space.
    464
            ls_feld-paid = space.
    465
            ls_feld-cmbfoc = abap_false.
    466
            ls_feld-ucnv = space.
    467
            IF ls_feld-fixf = abap_false
    468
            AND ls_feld-hell = abap_false
    469
            AND ls_feld-unsi = abap_false
    470
            AND <ls_d021s>-ltyp = space
    471
            AND ls_feld-labelright = abap_false
    472
            AND <ls_d021s>-flg1 <> '00'.
    473
              ls_feld-labelleft = abap_true.
    474
            ENDIF.
    475
        ENDCASE.
    476
    477
        IF NOT ls_feld-stxt IS INITIAL.
    478
          IF ls_feld-stxt NA '_'.
    479
            l_length = <ls_d021s>-leng.
    480
            IF l_length > 132.
    481
              l_length = 132.
    482
            ENDIF.
    483
            l_strlen = strlen( ls_feld-stxt ).
    484
            WHILE l_strlen < l_length.
    485
              CONCATENATE ls_feld-stxt '_' INTO ls_feld-stxt.
    486
              l_strlen = strlen( ls_feld-stxt ).
    487
            ENDWHILE.
    488
          ENDIF.
    489
          IF <ls_d021s>-fill = 'R'.
    490
            l_strlen = strlen( ls_feld-stxt ).
    491
            l_length = l_strlen - 2.
    492
            IF l_length > 0.
    493
              ls_feld-stxt = ls_feld-stxt+0(l_length).
    494
            ENDIF.
    495
          ENDIF.
    496
        ENDIF.
    497
    498
        APPEND ls_feld TO ct_feld.
    499
        APPEND ls_feld_redef TO ct_feld_redef.
    500
      ENDLOOP.
    501
    ENDFORM.                    "get_feldtab
    502
    503
    504
    *-----------------------------------------------------------------------
    505
    * fugr_get_feld_fill_na_btisu
    506
    *-----------------------------------------------------------------------
    507
    FORM fugr_get_feld_fill_na_btisu
    508
      USING
    509
        is_d021s TYPE d021s
    510
        is_dynpro_release TYPE st_dynpro_release
    511
      CHANGING
    512
        cs_feld TYPE feld.
    513
    514
      DATA:
    515
      ls_d021s_res1 LIKE d021s_res1.
    516
    517
      CONSTANTS:
    518
      lc_flg1ddf TYPE x VALUE '20',
    519
      lc_flg1edt TYPE x VALUE '80',
    520
      lc_flg1osb TYPE x VALUE '04',
    521
      lc_flg2gks TYPE x VALUE '02',
    522
      lc_flg2gpa TYPE x VALUE '08',
    523
      lc_flg2jus TYPE x VALUE '20',
    524
      lc_flg2nrs TYPE x VALUE '40',
    525
      lc_flg2spa TYPE x VALUE '04',
    526
      lc_flg2str TYPE x VALUE '80',
    527
      lc_flg3fdu TYPE x VALUE '02',
    528
      lc_flg3fix TYPE x VALUE '40',
    529
      lc_flg3fku TYPE x VALUE '08',
    530
      lc_flg3for TYPE x VALUE '04',
    531
      lc_flg3out TYPE x VALUE '80',
    532
      lc_fmb1d23 TYPE x VALUE '02',
    533
      lc_fmb1dnk TYPE x VALUE '04',
    534
      lc_fmb1fix TYPE x VALUE '40',
    535
      lc_fmb1ges TYPE x VALUE '20',
    536
      lc_fmb1hll TYPE x VALUE '08',
    537
      lc_fmb1out TYPE x VALUE '01',
    538
      lc_fmb2cmb TYPE x VALUE '08',
    539
      lc_fmb2cmi TYPE x VALUE '04',
    540
      lc_fmb2cmu TYPE x VALUE '10',
    541
      lcs_dynpro_rel_400 TYPE st_dynpro_release VALUE '4.00',
    542
      lcs_dynpro_rel_401 TYPE st_dynpro_release VALUE '4.01',
    543
      lcs_dynpro_rel_402 TYPE st_dynpro_release VALUE '4.02',
    544
      lcs_dynpro_rel_46a TYPE st_dynpro_release VALUE '4.60',
    545
      lcs_dynpro_rel_610 TYPE st_dynpro_release VALUE '6.10'.
    546
    547
    548
      CHECK is_d021s-fill NA 'BTISU'.
    549
    550
      ls_d021s_res1 = is_d021s-res1.
    551
    552
      IF is_d021s-flg2 O lc_flg2str.
    553
        cs_feld-fstr = abap_true.
    554
      ENDIF.
    555
      IF is_d021s-flg2 O lc_flg2nrs.
    556
        cs_feld-fnrs = abap_true.
    557
      ENDIF.
    558
      IF is_d021s-flg2 O lc_flg2gks.
    559
        cs_feld-fgks = abap_true.
    560
      ENDIF.
    561
      IF is_d021s-flg3 O lc_flg3fix.
    562
        cs_feld-ffix = abap_true.
    563
      ENDIF.
    564
      IF is_d021s-flg1 O lc_flg1osb.
    565
        cs_feld-fosb = abap_true.
    566
      ENDIF.
    567
      IF is_d021s-flg2 O lc_flg2jus.
    568
        cs_feld-fjus = abap_true.
    569
      ENDIF.
    570
      IF is_d021s-fill = '0'.
    571
        cs_feld-fill = abap_true.
    572
      ENDIF.
    573
      IF is_d021s-flg2 O lc_flg2gpa.
    574
        cs_feld-fgpa = abap_true.
    575
      ENDIF.
    576
      IF is_d021s-flg2 O lc_flg2spa.
    577
        cs_feld-fspa = abap_true.
    578
      ENDIF.
    579
      IF is_d021s-flg1 O lc_flg1ddf
    580
      AND is_d021s-flg3 O lc_flg3for
    581
      AND is_d021s-flg3 Z lc_flg3fdu
    582
      AND is_d021s-flg3 Z lc_flg3fku.
    583
        cs_feld-ffky = 'X'.
    584
      ENDIF.
    585
      IF is_d021s-flg1 O lc_flg1edt.
    586
        IF is_d021s-fmb1 Z lc_fmb1ges.
    587
          cs_feld-fein = abap_true.
    588
        ELSE.
    589
          cs_feld-fein = abap_false.
    590
        ENDIF.
    591
        IF is_d021s-flg3 O lc_flg3out.
    592
          cs_feld-fout = abap_true.
    593
        ELSE.
    594
          cs_feld-fout = abap_false.
    595
        ENDIF.
    596
        IF is_d021s-fmb1 O lc_fmb1out.
    597
          cs_feld-oout = abap_true.
    598
        ELSE.
    599
          cs_feld-oout = abap_false.
    600
        ENDIF.
    601
      ENDIF.
    602
      cs_feld-paid = is_d021s-paid.
    603
      cs_feld-ucnv = is_d021s-ucnv.
    604
      IF is_d021s-fmb1 O lc_fmb1hll.
    605
        cs_feld-hell = abap_true.
    606
      ENDIF.
    607
      IF is_d021s-fmb1 O lc_fmb1dnk.
    608
        cs_feld-unsi = abap_true.
    609
      ENDIF.
    610
      IF is_d021s-fmb1 O lc_fmb1d23.
    611
        cs_feld-no3d = abap_true.
    612
      ENDIF.
    613
      IF is_dynpro_release <= lcs_dynpro_rel_402.
    614
        IF cs_feld-oout = abap_true
    615
        AND cs_feld-fout = abap_true
    616
        AND is_d021s-flg3 Z lc_flg3out.
    617
          cs_feld-fixf = abap_true.
    618
        ELSEIF cs_feld-oout = abap_false
    619
        AND is_d021s-fmb1 O lc_fmb1out.
    620
          cs_feld-fixf = abap_true.
    621
        ENDIF.
    622
      ENDIF.
    623
      IF is_d021s-fmb1 O lc_fmb1fix.
    624
        cs_feld-fixf = abap_true.
    625
      ENDIF.
    626
      cs_feld-labelleft = ls_d021s_res1-labelleft.
    627
      cs_feld-labelright = ls_d021s_res1-labelright.
    628
      cs_feld-dblclick = ls_d021s_res1-dblclick.
    629
    630
      IF is_d021s-fill <> 'P'
    631
      AND is_d021s-dmac <> space.
    632
        cs_feld-cmbfoc = abap_true.
    633
      ENDIF.
    634
    635
      IF is_d021s-fmb2 Z lc_fmb2cmb.
    636
        cs_feld-cmbfoc = abap_false.
    637
      ELSE.
    638
        cs_feld-cmbfoc  = abap_true.
    639
      ENDIF.
    640
      IF is_d021s-fmb2 Z lc_fmb2cmu
    641
      AND is_d021s-fmb2 Z lc_fmb2cmi.
    642
        cs_feld-cmbtast = space.
    643
      ELSEIF is_d021s-fmb2 O lc_fmb2cmu
    644
      AND is_d021s-fmb2 O lc_fmb2cmi.
    645
        cs_feld-cmbtast = '0'.
    646
      ELSEIF is_d021s-fmb2 O lc_fmb2cmu
    647
      AND is_d021s-fmb2 Z lc_fmb2cmi.
    648
        cs_feld-cmbtast = '1'.
    649
      ELSEIF is_d021s-fmb2 Z lc_fmb2cmu
    650
      AND is_d021s-fmb2 O lc_fmb2cmi.
    651
        cs_feld-cmbtast = '2'.
    652
      ENDIF.
    653
    ENDFORM.                    "get_feld_fill_na_btisu
    654
    655
    656
    *-----------------------------------------------------------------------
    657
    * fugr_get_feld_icon
    658
    *-----------------------------------------------------------------------
    659
    FORM fugr_get_feld_icon
    660
      USING
    661
        is_d021s TYPE d021s
    662
      CHANGING
    663
        cs_feld TYPE feld.
    664
    665
      DATA:
    666
      l_icon_id_pure(2) TYPE c,
    667
      ls_icon TYPE icon,
    668
      ls_icont TYPE icont,
    669
      l_id_and_param(132) TYPE c,
    670
      l_is_non_icon TYPE flag,
    671
      l_pos_at TYPE i,
    672
      l_quick_is TYPE flag,
    673
      l_strlen TYPE i.
    674
    675
      FIELD-SYMBOLS:
    676
      <l_fs> TYPE ANY.
    677
    678
      CONSTANTS:
    679
      lc_flg1edt TYPE x VALUE '80'.
    680
    681
    682
      CHECK is_d021s-stxt(1) = '@'.
    683
    684
      ASSIGN is_d021s-stxt+1(*) TO <l_fs>.
    685
      IF <l_fs> CA '@'.
    686
        l_pos_at = sy-fdpos + 1.
    687
        l_id_and_param = <l_fs>(sy-fdpos).
    688
        IF l_id_and_param CS '\Q'.
    689
          l_quick_is = abap_true.
    690
          SPLIT l_id_and_param AT '\Q'
    691
                INTO l_icon_id_pure
    692
                     cs_feld-icon_q.
    693
          CONCATENATE '@' l_icon_id_pure '@'
    694
                INTO cs_feld-icon.
    695
        ELSE.
    696
          l_quick_is = abap_false.
    697
          CONCATENATE '@' l_id_and_param '@'
    698
                INTO cs_feld-icon.
    699
        ENDIF.
    700
        IF cs_feld-icon = '@@'.
    701
          CLEAR cs_feld-icon.
    702
          l_is_non_icon = abap_true.
    703
        ENDIF.
    704
        SELECT SINGLE * FROM icon INTO ls_icon
    705
            WHERE id = cs_feld-icon.
    706
        IF sy-subrc = 0.
    707
          SELECT SINGLE * FROM icont INTO ls_icont
    708
              WHERE id = cs_feld-icon
    709
              AND langu = sy-langu.
    710
          cs_feld-icon_n = ls_icon-name.
    711
        ELSE.
    712
          cs_feld-icon_n = space.
    713
        ENDIF.
    714
        IF cs_feld-icon_q IS INITIAL
    715
        AND l_quick_is = abap_false.
    716
          cs_feld-icon_q = ls_icont-quickinfo.
    717
        ENDIF.
    718
        l_pos_at = l_pos_at + 1.
    719
        ASSIGN is_d021s-stxt+l_pos_at(*) TO <l_fs>.
    720
        l_strlen = strlen( <l_fs> ).
    721
        IF l_strlen > 0.
    722
          IF l_is_non_icon = abap_true.
    723
          ELSE.
    724
            l_pos_at = l_pos_at + 1.
    725
          ENDIF.
    726
          cs_feld-stxt = is_d021s-stxt+l_pos_at.
    727
        ELSE.
    728
          cs_feld-stxt = space.
    729
        ENDIF.
    730
      ENDIF.
    731
      UNASSIGN <l_fs>.
    732
    733
      IF cs_feld-icon = '@00@'
    734
      AND is_d021s-flg1 O lc_flg1edt.
    735
        cs_feld-icon_x = abap_true.
    736
      ENDIF.
    737
    ENDFORM.                    "get_feld_icon
    738
    739
    740
    *-----------------------------------------------------------------------
    741
    * fugr_r3tr_fugr                                Function group
    742
    *-----------------------------------------------------------------------
    743
    FORM fugr_r3tr_fugr.
    744
    745
      DATA:
    746
      l_progname TYPE progname,
    747
      lt_tabstrip TYPE it_tabstrip,
    748
      ls_ti TYPE st_textinput,
    749
      lt_attributes TYPE it_textinput,
    750
      lt_documentation TYPE it_string,
    751
      ls_progdir TYPE progdir,
    752
      ls_tadir TYPE tadir,
    753
      l_name TYPE ad_namtext,
    754
      lt_html TYPE it_string.
    755
    756
      FIELD-SYMBOLS:
    757
      <ls_ztadir> TYPE st_ztadir,
    758
      <ls_tabstrip> TYPE st_tabstrip.
    759
    760
    *Tabstrip
    761
      PERFORM get_tabstrip
    762
        USING 'FUGR_R3TR_FUGR' space
    763
        CHANGING lt_tabstrip.
    764
    765
      LOOP AT gt_ztadir ASSIGNING <ls_ztadir>
    766
          WHERE pgmid = 'R3TR'
    767
          AND object = 'FUGR'
    768
          AND futype = gc_futype_group
    769
          AND downloaded = abap_false.
    770
        <ls_ztadir>-downloaded = abap_true.
    771
    772
        CLEAR:
    773
        l_name,
    774
        l_progname,
    775
        ls_progdir,
    776
        ls_tadir.
    777
    778
        REFRESH:
    779
        lt_attributes,
    780
        lt_documentation,
    781
        lt_html.
    782
    783
        CALL FUNCTION 'RS_TADIR_TO_PROGNAME'
    784
          EXPORTING
    785
            object   = <ls_ztadir>-object
    786
            obj_name = <ls_ztadir>-obj_name
    787
          IMPORTING
    788
            progname = l_progname.
    789
    790
        SELECT SINGLE * FROM progdir INTO ls_progdir
    791
          WHERE name = l_progname.
    792
        SELECT SINGLE * FROM tadir INTO ls_tadir
    793
          WHERE pgmid = 'R3TR'
    794
          AND object = 'FUGR'
    795
          AND obj_name = <ls_ztadir>-obj_name.
    796
    797
    *Attributes
    798
    *   Function group
    799
        CLEAR ls_ti.
    800
        ls_ti-name = txt_function_group.
    801
        ls_ti-input = abap_true.
    802
        ls_ti-value = <ls_ztadir>-obj_name.
    803
        APPEND ls_ti TO lt_attributes.
    804
    *   Description
    805
        CLEAR ls_ti.
    806
        ls_ti-name = txt_short_text___1.
    807
        ls_ti-input = abap_true.
    808
        ls_ti-value = <ls_ztadir>-descript.
    809
        APPEND ls_ti TO lt_attributes.
    810
    *   Empty row
    811
        CLEAR ls_ti.
    812
        ls_ti-space = abap_true.
    813
        APPEND ls_ti TO lt_attributes.
    814
    *   Person responsible
    815
        CLEAR ls_ti.
    816
        ls_ti-name = txt_person_responsible___1.
    817
        ls_ti-input = abap_true.
    818
        ls_ti-value = ls_tadir-author.
    819
        PERFORM get_user
    820
          USING
    821
            ls_tadir-author
    822
          CHANGING
    823
            l_name.
    824
        ls_ti-value_text = l_name.
    825
        APPEND ls_ti TO lt_attributes.
    826
    *   Package
    827
        CLEAR ls_ti.
    828
        ls_ti-name = txt_package.
    829
        ls_ti-input = abap_true.
    830
        ls_ti-value = ls_tadir-devclass.
    831
        APPEND ls_ti TO lt_attributes.
    832
    *   Application
    833
        CLEAR ls_ti.
    834
        ls_ti-name = txt_application.
    835
        ls_ti-input = abap_true.
    836
        ls_ti-value = ls_progdir-appl.
    837
        APPEND ls_ti TO lt_attributes.
    838
    *   Status
    839
        CLEAR ls_ti.
    840
        ls_ti-name = txt_status.
    841
        ls_ti-input = abap_true.
    842
        IF ls_progdir-state = 'A'.
    843
          ls_ti-value = txt_activated.
    844
        ELSE.
    845
          ls_ti-value = txt_inactive.
    846
        ENDIF.
    847
        APPEND ls_ti TO lt_attributes.
    848
    *   Program status
    849
        CLEAR ls_ti.
    850
        ls_ti-name = txt_program_status.
    851
        ls_ti-input = abap_true.
    852
        ls_ti-value = ls_progdir-rstat.
    853
        PERFORM get_dom_value_text
    854
          USING 'RSTAT' ls_progdir-rstat
    855
          CHANGING ls_ti-value_text.
    856
        APPEND ls_ti TO lt_attributes.
    857
    *   Editor lock
    858
        CLEAR ls_ti.
    859
        ls_ti-name = txt_editor_lock.
    860
        ls_ti-flag = abap_true.
    861
        ls_ti-value = ls_progdir-edtx.
    862
        APPEND ls_ti TO lt_attributes.
    863
    *   Fixed point arithmetic
    864
        CLEAR ls_ti.
    865
        ls_ti-name = txt_fixed_point_arithmetic.
    866
        ls_ti-flag = abap_true.
    867
        ls_ti-value = ls_progdir-fixpt.
    868
        APPEND ls_ti TO lt_attributes.
    869
    *   Unicode checks active
    870
        CLEAR ls_ti.
    871
        ls_ti-name = txtt_unicode_checks_active.
    872
        ls_ti-flag = abap_true.
    873
        ls_ti-value = ls_progdir-uccheck.
    874
        APPEND ls_ti TO lt_attributes.
    875
    *Documentation
    876
        PERFORM get_docu
    877
          USING
    878
            'RE'
    879
            l_progname
    880
            'E'
    881
          CHANGING
    882
            lt_documentation.
    883
    ***Tabstrip
    884
        LOOP AT lt_tabstrip ASSIGNING <ls_tabstrip>.
    885
          <ls_tabstrip>-empty = abap_false.
    886
          CASE <ls_tabstrip>-id.
    887
            WHEN 'DOCUMENTATION'.
    888
              IF lt_documentation IS INITIAL.
    889
                <ls_tabstrip>-empty = abap_true.
    890
              ENDIF.
    891
          ENDCASE.
    892
        ENDLOOP.
    893
    894
    *** HTML
    895
        PERFORM html_main_header
    896
          USING
    897
            tpt_fugr_fugr
    898
            space
    899
            <ls_ztadir>-obj_name
    900
            space
    901
            space
    902
            space
    903
            'makeDivSize(''MAIN_PROG'');makeDivSize(''DOCUMENTATION'');'
    904
            lt_tabstrip
    905
            gt_link
    906
          CHANGING
    907
            lt_html.
    908
    *   Attributes
    909
        PERFORM html_add_textinput
    910
          USING
    911
            lt_attributes
    912
            'ATTRIBUTES'
    913
            abap_true
    914
          CHANGING
    915
            lt_html.
    916
    *Main program
    917
        PERFORM add_report_sourcecode
    918
          USING
    919
            l_progname
    920
            l_progname
    921
            gc_extension_txt
    922
            abap_true
    923
            <ls_ztadir>
    924
            'MAIN_PROG'
    925
            abap_false
    926
          CHANGING
    927
            lt_html.
    928
    *Documentation
    929
        IF NOT lt_documentation IS INITIAL
    930
        OR g_empty_tab = gc_empty_tab_display.
    931
          PERFORM html_add_doc
    932
            USING
    933
              lt_documentation
    934
              'DOCUMENTATION'
    935
              abap_false
    936
            CHANGING
    937
              lt_html.
    938
        ENDIF.
    939
    *
    940
        PERFORM html_main_footer
    941
          USING
    942
            lt_html.
    943
    944
        PERFORM download
    945
          USING
    946
            lt_html
    947
            <ls_ztadir>-pgmid
    948
            <ls_ztadir>-object
    949
            l_progname
    950
            gc_extension_htm
    951
            abap_true.
    952
      ENDLOOP.
    953
    954
    ENDFORM.                                                    "r3tr_fugr
    955
    956
    957
    *-----------------------------------------------------------------------
    958
    * fugr_r3tr_includes                            Includes
    959
    *-----------------------------------------------------------------------
    960
    FORM fugr_r3tr_includes.
    961
    962
      DATA:
    963
      lt_tabstrip TYPE it_tabstrip,
    964
      lt_html TYPE it_string,
    965
      ls_attributes TYPE st_attributes,
    966
      lt_ti TYPE it_textinput,
    967
      lt_ti_box TYPE it_textinput,
    968
      ls_ti TYPE st_textinput,
    969
      l_masterlang TYPE masterlang,
    970
      l_filename TYPE string,
    971
      ls_trdir TYPE trdir,
    972
      l_laiso TYPE laiso,
    973
      l_sptxt TYPE sptxt,
    974
      l_name TYPE ad_namtext,
    975
      l_text TYPE as4text,
    976
      l_atext TYPE appltxt.
    977
    978
      FIELD-SYMBOLS:
    979
      <ls_ztadir> TYPE st_ztadir.
    980
    981
    *Tabstrip
    982
      PERFORM get_tabstrip
    983
        USING 'FUGR_R3TR_INCLUDES' space
    984
        CHANGING lt_tabstrip.
    985
    986
      LOOP AT gt_ztadir ASSIGNING <ls_ztadir>
    987
          WHERE pgmid = 'R3TR'
    988
          AND object = 'FUGR'
    989
          AND futype = gc_futype_include
    990
          AND downloaded = abap_false.
    991
    992
        CLEAR:
    993
        ls_attributes,
    994
        ls_trdir,
    995
        l_text,
    996
        l_atext.
    997
    998
        REFRESH:
    999
        lt_html,
    1000
        lt_ti,
    1001
        lt_ti_box.
    1002
    1003
        SELECT SINGLE * FROM trdir INTO ls_trdir
    1004
            WHERE name = <ls_ztadir>-progname.
    1005
        IF sy-subrc <> 0.
    1006
          <ls_ztadir>-subrc = sy-subrc.
    1007
          CONTINUE.
    1008
        ENDIF.
    1009
    1010
    *Attributes
    1011
    *   Title
    1012
        CLEAR ls_ti.
    1013
        ls_ti-name = txt_title.
    1014
        ls_ti-value = <ls_ztadir>-descript.
    1015
        ls_ti-value_double_length = abap_true.
    1016
        ls_ti-input = abap_true.
    1017
        APPEND ls_ti TO lt_ti.
    1018
    *   Original Language
    1019
        CLEAR ls_ti.
    1020
        ls_ti-name = txt_original_language.
    1021
        l_masterlang = ls_trdir-rload.
    1022
        IF l_masterlang IS INITIAL.
    1023
          l_masterlang = <ls_ztadir>-masterlang.
    1024
        ENDIF.
    1025
        PERFORM get_spras
    1026
          USING
    1027
            l_masterlang
    1028
          CHANGING
    1029
            l_laiso
    1030
            l_sptxt.
    1031
        ls_ti-value = l_laiso.
    1032
        ls_ti-description = l_sptxt.
    1033
        ls_ti-input = abap_true.
    1034
        APPEND ls_ti TO lt_ti.
    1035
    *   Space
    1036
        CLEAR ls_ti.
    1037
        ls_ti-space = abap_true.
    1038
        APPEND ls_ti TO lt_ti.
    1039
    *   Created
    1040
        CLEAR ls_ti.
    1041
        ls_ti-name = txt_created.
    1042
        PERFORM get_date
    1043
          USING
    1044
            ls_trdir-cdat
    1045
          CHANGING
    1046
            ls_ti-value.
    1047
        ls_ti-value_ext = ls_trdir-cnam.
    1048
        PERFORM get_user
    1049
          USING
    1050
            ls_trdir-cnam
    1051
          CHANGING
    1052
            l_name.
    1053
        ls_ti-value_ext_text = l_name.
    1054
        ls_ti-has_value_ext = abap_true.
    1055
        ls_ti-input = abap_true.
    1056
        APPEND ls_ti TO lt_ti.
    1057
    *   Last changed by
    1058
        CLEAR ls_ti.
    1059
        ls_ti-name = txt_last_changed_by___1.
    1060
        PERFORM get_date
    1061
          USING
    1062
            ls_trdir-udat
    1063
          CHANGING
    1064
            ls_ti-value.
    1065
        ls_ti-value_ext = ls_trdir-unam.
    1066
        PERFORM get_user
    1067
          USING
    1068
            ls_trdir-unam
    1069
          CHANGING
    1070
            l_name.
    1071
        ls_ti-value_ext_text = l_name.
    1072
        ls_ti-input = abap_true.
    1073
        ls_ti-has_value_ext = abap_true.
    1074
        APPEND ls_ti TO lt_ti.
    1075
    *   Status
    1076
        CLEAR ls_ti.
    1077
        ls_ti-name = txt_status.
    1078
        ls_ti-value = txt_active___1.
    1079
        APPEND ls_ti TO lt_ti.
    1080
    *Attributes - Box
    1081
    *   Type
    1082
        CLEAR ls_ti.
    1083
        ls_ti-name = txt_type___1.
    1084
        PERFORM get_dom_value_text
    1085
          USING
    1086
            'SUBC'
    1087
            ls_trdir-subc
    1088
          CHANGING
    1089
            ls_ti-value.
    1090
        ls_ti-input = abap_true.
    1091
        APPEND ls_ti TO lt_ti_box.
    1092
    *   Status
    1093
        CLEAR ls_ti.
    1094
        ls_ti-name = txt_status.
    1095
        PERFORM get_dom_value_text
    1096
          USING
    1097
            'RSTAT'
    1098
            ls_trdir-rstat
    1099
          CHANGING
    1100
            ls_ti-value.
    1101
        ls_ti-input = abap_true.
    1102
        APPEND ls_ti TO lt_ti_box.
    1103
    *   Application
    1104
        CLEAR ls_ti.
    1105
        ls_ti-name = txt_application.
    1106
        SELECT SINGLE atext FROM taplt INTO l_atext
    1107
          WHERE appl = ls_trdir-appl
    1108
          AND sprsl = sy-langu.
    1109
        ls_ti-value = l_atext.
    1110
        ls_ti-input = abap_true.
    1111
        APPEND ls_ti TO lt_ti_box.
    1112
    *   Space
    1113
        CLEAR ls_ti.
    1114
        ls_ti-space = abap_true.
    1115
        APPEND ls_ti TO lt_ti_box.
    1116
    *   Package
    1117
        CLEAR ls_ti.
    1118
        ls_ti-name = txt_package.
    1119
        ls_ti-value = <ls_ztadir>-devclass.
    1120
        PERFORM get_devclass
    1121
          USING
    1122
            <ls_ztadir>-devclass
    1123
          CHANGING
    1124
            l_text.
    1125
        ls_ti-description = l_text.
    1126
        ls_ti-input = abap_true.
    1127
        APPEND ls_ti TO lt_ti_box.
    1128
    *   Space
    1129
        CLEAR ls_ti.
    1130
        ls_ti-space = abap_true.
    1131
        APPEND ls_ti TO lt_ti_box.
    1132
    *   Editor lock
    1133
        CLEAR ls_ti.
    1134
        ls_ti-name = txt_editor_lock.
    1135
        ls_ti-value = ls_trdir-edtx.
    1136
        ls_ti-flag = abap_true.
    1137
        APPEND ls_ti TO lt_ti_box.
    1138
    *** HTML
    1139
        PERFORM html_main_header
    1140
          USING
    1141
            tpt_fugr_incl
    1142
            space "l_name_field
    1143
            <ls_ztadir>-progname
    1144
            txt_active___1
    1145
            space
    1146
            space
    1147
            'makeDivSize(''SOURCECODE'');'
    1148
            lt_tabstrip
    1149
            gt_link
    1150
          CHANGING
    1151
            lt_html.
    1152
    *   Attributes
    1153
        PERFORM html_add_textinput_subbox
    1154
          USING
    1155
            lt_ti
    1156
            txt_attributes___2
    1157
            lt_ti_box
    1158
            'ATTRIBUTES'
    1159
            abap_false
    1160
          CHANGING
    1161
            lt_html.
    1162
    *  Source code
    1163
        PERFORM add_report_sourcecode
    1164
          USING
    1165
            <ls_ztadir>-progname
    1166
            <ls_ztadir>-progname
    1167
            gc_extension_txt
    1168
            abap_false
    1169
            <ls_ztadir>
    1170
            'SOURCECODE'
    1171
            abap_true
    1172
          CHANGING
    1173
            lt_html.
    1174
    *
    1175
        PERFORM html_main_footer
    1176
          USING
    1177
            lt_html.
    1178
    1179
        PERFORM download
    1180
          USING
    1181
            lt_html
    1182
            <ls_ztadir>-pgmid
    1183
            <ls_ztadir>-object
    1184
            <ls_ztadir>-progname
    1185
            gc_extension_htm
    1186
            abap_true.
    1187
        <ls_ztadir>-downloaded = abap_true.
    1188
      ENDLOOP.
    1189
    ENDFORM.                                                    "r3tr_incl
    1190
    1191
    1192
    *-----------------------------------------------------------------------
    1193
    * fugr_r3tr_modules                             Funktionsbausteine
    1194
    *-----------------------------------------------------------------------
    1195
    FORM fugr_r3tr_modules.
    1196
    1197
      DATA:
    1198
      ls_tabstrip TYPE st_tabstrip,
    1199
      lt_tabstrip TYPE it_tabstrip,
    1200
      lt_classification TYPE it_textinput,
    1201
      ls_classification TYPE st_textinput,
    1202
      lt_processing_type TYPE it_access,
    1203
      ls_processing_type TYPE st_access,
    1204
      lt_general_data TYPE it_textinput,
    1205
      ls_general_data TYPE st_textinput,
    1206
      lt_html TYPE it_string,
    1207
      lt_ptfdir TYPE STANDARD TABLE OF tfdir,
    1208
      ls_ptfdir TYPE tfdir,
    1209
      lt_ptftit TYPE STANDARD TABLE OF tftit,
    1210
      ls_ptftit TYPE tftit,
    1211
      lt_pfunct TYPE STANDARD TABLE OF funct,
    1212
      ls_pfunct TYPE funct,
    1213
      lt_penlfdir TYPE STANDARD TABLE OF enlfdir,
    1214
      ls_penlfdir TYPE enlfdir,
    1215
      lt_ptrdir TYPE STANDARD TABLE OF trdir,
    1216
      ls_ptrdir TYPE trdir,
    1217
      lt_pfupararef TYPE STANDARD TABLE OF sfupararef,
    1218
      lt_uincl TYPE it_abaptxt255,
    1219
      lt_vsmodisrc TYPE STANDARD TABLE OF smodisrc,
    1220
      lt_vsmodilog TYPE STANDARD TABLE OF smodilog,
    1221
      lt_parameter TYPE it_parameter,
    1222
      ls_parameter TYPE st_parameter,
    1223
      lt_importing TYPE it_parameter,
    1224
      lt_exporting TYPE it_parameter,
    1225
      lt_changing TYPE it_parameter,
    1226
      lt_table TYPE it_parameter,
    1227
      lt_exception TYPE it_parameter,
    1228
      l_kind TYPE char1,
    1229
      lt_doku TYPE it_string,
    1230
      lt_documentation TYPE it_string,
    1231
      lt_sourcecode TYPE it_string,
    1232
      l_sourcecode TYPE string,
    1233
      l_namtext TYPE ad_namtext,
    1234
      l_javascript TYPE string,
    1235
      l_id TYPE string,
    1236
      l_filename TYPE string,
    1237
      l_on TYPE flag,
    1238
      l_areat TYPE areat.
    1239
    1240
      FIELD-SYMBOLS:
    1241
      <ls_tabstrip> TYPE st_tabstrip,
    1242
      <ls_ztadir> TYPE st_ztadir,
    1243
      <ls_parameter> TYPE st_parameter,
    1244
      <ls_pfupararef> TYPE sfupararef,
    1245
      <ls_uincl> TYPE st_abaptxt255.
    1246
    1247
    1248
      LOOP AT gt_ztadir ASSIGNING <ls_ztadir>
    1249
          WHERE pgmid = 'R3TR'
    1250
          AND object = 'FUGR'
    1251
          AND futype = gc_futype_module
    1252
          AND downloaded = abap_false.
    1253
        <ls_ztadir>-downloaded = abap_true.
    1254
    1255
        CLEAR:
    1256
        ls_classification,
    1257
        ls_general_data,
    1258
        l_javascript,
    1259
        ls_parameter,
    1260
        ls_penlfdir,
    1261
        ls_pfunct,
    1262
        ls_processing_type,
    1263
        ls_ptfdir,
    1264
        ls_ptftit,
    1265
        ls_ptrdir,
    1266
        l_sourcecode,
    1267
        l_areat.
    1268
    1269
        REFRESH:
    1270
        lt_changing,
    1271
        lt_classification,
    1272
        lt_exception,
    1273
        lt_exporting,
    1274
        lt_general_data,
    1275
        lt_html,
    1276
        lt_importing,
    1277
        lt_parameter,
    1278
        lt_processing_type,
    1279
        lt_sourcecode,
    1280
        lt_table,
    1281
        lt_uincl.
    1282
    1283
        CALL FUNCTION 'FUNC_GET_OBJECT'
    1284
          EXPORTING
    1285
            funcname   = <ls_ztadir>-funcname
    1286
            r3state    = 'A'
    1287
          TABLES
    1288
            ptfdir     = lt_ptfdir
    1289
            ptftit     = lt_ptftit
    1290
            pfunct     = lt_pfunct
    1291
            penlfdir   = lt_penlfdir
    1292
            ptrdir     = lt_ptrdir
    1293
            pfupararef = lt_pfupararef
    1294
            uincl      = lt_uincl
    1295
            vsmodisrc  = lt_vsmodisrc
    1296
            vsmodilog  = lt_vsmodilog
    1297
          EXCEPTIONS
    1298
            OTHERS     = 1.
    1299
        IF sy-subrc <> 0.
    1300
          <ls_ztadir>-subrc = sy-subrc.
    1301
          CONTINUE.
    1302
        ENDIF.
    1303
    1304
        IF NOT lt_ptfdir IS INITIAL.
    1305
          READ TABLE lt_ptfdir INTO ls_ptfdir INDEX 1.
    1306
        ENDIF.
    1307
        IF NOT lt_ptftit IS INITIAL.
    1308
          READ TABLE lt_ptftit INTO ls_ptftit INDEX 1.
    1309
        ENDIF.
    1310
        IF NOT lt_penlfdir IS INITIAL.
    1311
          READ TABLE lt_penlfdir INTO ls_penlfdir INDEX 1.
    1312
        ENDIF.
    1313
        IF NOT lt_ptrdir IS INITIAL.
    1314
          READ TABLE lt_ptrdir INTO ls_ptrdir INDEX 1.
    1315
        ENDIF.
    1316
    1317
    *Attributes - Classification
    1318
        ls_classification-name = txt_function_group.
    1319
        ls_classification-value = ls_penlfdir-area.
    1320
        ls_classification-input = abap_true.
    1321
        ls_classification-has_value_ext = abap_true.
    1322
        SELECT SINGLE areat FROM tlibt INTO l_areat
    1323
            WHERE area = <ls_ztadir>-obj_name
    1324
            AND spras = sy-langu.
    1325
        ls_classification-value_ext = l_areat.
    1326
        APPEND ls_classification TO lt_classification.
    1327
        CLEAR ls_classification.
    1328
        ls_classification-name = txt_short_text___1.
    1329
        ls_classification-value = ls_ptftit-stext.
    1330
        ls_classification-input = abap_true.
    1331
        APPEND ls_classification TO lt_classification.
    1332
    1333
    *Attributes - Processing type
    1334
        ls_processing_type-ddtext = txt_normal_function_module.
    1335
        IF ls_ptfdir-fmode IS INITIAL AND ls_ptfdir-utask IS INITIAL.
    1336
          ls_processing_type-checked = abap_true.
    1337
        ELSE.
    1338
          ls_processing_type-checked = abap_true.
    1339
        ENDIF.
    1340
        APPEND ls_processing_type TO lt_processing_type.
    1341
        ls_processing_type-ddtext = txt_remote_enabled_module.
    1342
        IF NOT ls_ptfdir-fmode IS INITIAL.
    1343
          ls_processing_type-checked = abap_true.
    1344
        ELSE.
    1345
          ls_processing_type-checked = abap_true.
    1346
        ENDIF.
    1347
        APPEND ls_processing_type TO lt_processing_type.
    1348
        ls_processing_type-ddtext = txt_update_module.
    1349
        IF NOT ls_ptfdir-utask IS INITIAL.
    1350
          ls_processing_type-checked = abap_true.
    1351
        ELSE.
    1352
          ls_processing_type-checked = abap_true.
    1353
        ENDIF.
    1354
        APPEND ls_processing_type TO lt_processing_type.
    1355
    1356
        ls_processing_type-ddtext = txt_start_immed.
    1357
        ls_processing_type-sub = '1'.
    1358
        IF ls_ptfdir-utask IS INITIAL OR ls_ptfdir-utask = '1'.
    1359
          ls_processing_type-checked = abap_true.
    1360
        ELSE.
    1361
          ls_processing_type-checked = abap_false.
    1362
        ENDIF.
    1363
        APPEND ls_processing_type TO lt_processing_type.
    1364
        ls_processing_type-ddtext = txt_immediate_start_no_restart.
    1365
        ls_processing_type-sub = '1'.
    1366
        IF ls_ptfdir-utask = '3'.
    1367
          ls_processing_type-checked = abap_true.
    1368
        ELSE.
    1369
          ls_processing_type-checked = abap_false.
    1370
        ENDIF.
    1371
        APPEND ls_processing_type TO lt_processing_type.
    1372
        ls_processing_type-ddtext = txt_start_delayed.
    1373
        ls_processing_type-sub = '1'.
    1374
        IF ls_ptfdir-utask = '2'.
    1375
          ls_processing_type-checked = abap_true.
    1376
        ELSE.
    1377
          ls_processing_type-checked = abap_false.
    1378
        ENDIF.
    1379
        APPEND ls_processing_type TO lt_processing_type.
    1380
        ls_processing_type-ddtext = txt_coll_run.
    1381
        ls_processing_type-sub = '1'.
    1382
        IF ls_ptfdir-utask = '5'.
    1383
          ls_processing_type-checked = abap_true.
    1384
        ELSE.
    1385
          ls_processing_type-checked = abap_false.
    1386
        ENDIF.
    1387
        APPEND ls_processing_type TO lt_processing_type.
    1388
    1389
    *Attributes - General Data
    1390
        ls_general_data-name = txt_person_responsible___1.
    1391
        ls_general_data-input = abap_true.
    1392
        ls_general_data-value = ls_ptrdir-cnam.
    1393
        PERFORM get_user
    1394
          USING
    1395
            ls_ptrdir-cnam
    1396
          CHANGING
    1397
            l_namtext.
    1398
        ls_general_data-value_text = l_namtext.
    1399
        APPEND ls_general_data TO lt_general_data.
    1400
        CLEAR ls_general_data.
    1401
        ls_general_data-name = txt_last_changed_by___2.
    1402
        ls_general_data-input = abap_true.
    1403
        ls_general_data-value = ls_ptrdir-unam.
    1404
        PERFORM get_user
    1405
          USING
    1406
            ls_ptrdir-unam
    1407
          CHANGING
    1408
            l_namtext.
    1409
        ls_general_data-value_text = l_namtext.
    1410
        APPEND ls_general_data TO lt_general_data.
    1411
        CLEAR ls_general_data.
    1412
        ls_general_data-name = txt_changed_on.
    1413
        ls_general_data-input = abap_true.
    1414
        PERFORM get_date USING ls_ptrdir-udat
    1415
                        CHANGING ls_general_data-value.
    1416
        APPEND ls_general_data TO lt_general_data.
    1417
        ls_general_data-name = txt_package.
    1418
        ls_general_data-input = abap_true.
    1419
        ls_general_data-value = <ls_ztadir>-devclass.
    1420
        APPEND ls_general_data TO lt_general_data.
    1421
        ls_general_data-name = txt_program_name.
    1422
        ls_general_data-input = abap_true.
    1423
        ls_general_data-value = ls_ptfdir-pname.
    1424
        APPEND ls_general_data TO lt_general_data.
    1425
        ls_general_data-name = txt_include_name.
    1426
        ls_general_data-input = abap_true.
    1427
        ls_general_data-value = ls_ptrdir-name.
    1428
        APPEND ls_general_data TO lt_general_data.
    1429
        ls_general_data-name = txt_original_language.
    1430
        ls_general_data-input = abap_true.
    1431
        ls_general_data-value = ls_ptftit-spras.
    1432
        APPEND ls_general_data TO lt_general_data.
    1433
        IF NOT ls_ptfdir-freedate IS INITIAL
    1434
        AND ls_ptfdir-freedate > 19000101.
    1435
          ls_general_data-name = txt_internally_released_on.
    1436
          PERFORM get_date USING ls_ptfdir-freedate
    1437
                          CHANGING ls_general_data-value.
    1438
          ls_general_data-input = abap_true.
    1439
        ELSE.
    1440
          ls_general_data-name = txt_not_released.
    1441
          ls_general_data-value = space.
    1442
          ls_general_data-input = abap_false.
    1443
        ENDIF.
    1444
        APPEND ls_general_data TO lt_general_data.
    1445
        CLEAR ls_general_data.
    1446
        ls_general_data-name = txt_edit_lock.
    1447
        ls_general_data-flag = abap_true.
    1448
        ls_general_data-value = ls_ptrdir-edtx.
    1449
        APPEND ls_general_data TO lt_general_data.
    1450
        ls_general_data-name = txt_global.
    1451
        ls_general_data-flag = abap_true.
    1452
        ls_general_data-value = ls_penlfdir-global.
    1453
        APPEND ls_general_data TO lt_general_data.
    1454
    1455
    *Parameter
    1456
        SORT lt_pfupararef BY pposition.
    1457
        LOOP AT lt_pfupararef ASSIGNING <ls_pfupararef>.
    1458
          CLEAR ls_parameter.
    1459
          l_kind = 'P'.
    1460
          IF <ls_pfupararef>-paramtype = 'X'.
    1461
            l_kind = 'X'.
    1462
          ENDIF.
    1463
          ls_parameter-name = <ls_pfupararef>-parameter.
    1464
          IF <ls_pfupararef>-type = abap_true.
    1465
            ls_parameter-typing = 'TYPE'.
    1466
          ELSEIF <ls_pfupararef>-ref_class = abap_true.
    1467
            ls_parameter-typing = 'TYPE REF TO'.
    1468
          ELSE.
    1469
            ls_parameter-typing = 'LIKE'.
    1470
          ENDIF.
    1471
          ls_parameter-structure = <ls_pfupararef>-structure.
    1472
          ls_parameter-defvalue = <ls_pfupararef>-defaultval.
    1473
          ls_parameter-optional = <ls_pfupararef>-optional.
    1474
          IF <ls_pfupararef>-reference = abap_false.
    1475
            ls_parameter-passvalue = abap_true.
    1476
          ENDIF.
    1477
          READ TABLE lt_pfunct INTO ls_pfunct
    1478
              WITH KEY parameter = <ls_pfupararef>-parameter
    1479
                       kind = l_kind
    1480
                       spras = sy-langu.
    1481
          IF sy-subrc <> 0.
    1482
            READ TABLE lt_pfunct INTO ls_pfunct
    1483
                WITH KEY parameter = <ls_pfupararef>-parameter
    1484
                         kind = l_kind
    1485
                         spras = sy-langu.
    1486
          ENDIF.
    1487
          ls_parameter-stext = ls_pfunct-stext.
    1488
    *     Long Text
    1489
          ls_parameter-ltext_doku_obj = <ls_ztadir>-funcname.
    1490
          ls_parameter-ltext_doku_obj+30 = <ls_pfupararef>-parameter.
    1491
    1492
          SELECT SINGLE object FROM dokhl INTO ls_parameter-ltext_doku_obj
    1493
            WHERE id = 'FU'
    1494
            AND object = ls_parameter-ltext_doku_obj
    1495
            AND langu = sy-langu.
    1496
          IF sy-subrc = 0.
    1497
            ls_parameter-ltext = '-->'.
    1498
            CONCATENATE 'switchContent(''LTEXT_'
    1499
                    <ls_pfupararef>-parameter ''')'
    1500
                    INTO ls_parameter-ltext_onclick.
    1501
          ELSE.
    1502
            CLEAR ls_parameter-ltext_doku_obj.
    1503
          ENDIF.
    1504
    *     Append
    1505
          APPEND ls_parameter TO lt_parameter.
    1506
          CASE <ls_pfupararef>-paramtype.
    1507
            WHEN 'I'.  "Importing
    1508
              APPEND ls_parameter TO lt_importing.
    1509
            WHEN 'E'.  "Exporting
    1510
              APPEND ls_parameter TO lt_exporting.
    1511
            WHEN 'C'.  "Changing
    1512
              APPEND ls_parameter TO lt_changing.
    1513
            WHEN 'T'.  "Tables
    1514
              APPEND ls_parameter TO lt_table.
    1515
            WHEN 'X'.  "Exceptions
    1516
              APPEND ls_parameter TO lt_exception.
    1517
          ENDCASE.
    1518
        ENDLOOP.
    1519
    1520
    *Documentation
    1521
        PERFORM get_docu
    1522
          USING
    1523
            'FU'
    1524
            <ls_ztadir>-funcname
    1525
            'T'
    1526
          CHANGING
    1527
            lt_documentation.
    1528
    1529
    *SourceCode
    1530
        LOOP AT lt_uincl ASSIGNING <ls_uincl>.
    1531
          l_sourcecode = <ls_uincl>-line.
    1532
          APPEND l_sourcecode TO lt_sourcecode.
    1533
        ENDLOOP.
    1534
    1535
    ***Tabstrip
    1536
        PERFORM get_tabstrip
    1537
          USING 'FUGR_R3TR_MODULES' space
    1538
          CHANGING lt_tabstrip.
    1539
    1540
        LOOP AT lt_tabstrip ASSIGNING <ls_tabstrip>.
    1541
          <ls_tabstrip>-empty = abap_false.
    1542
          CASE <ls_tabstrip>-id.
    1543
            WHEN 'DOCUMENTATION'.
    1544
              IF lt_documentation IS INITIAL.
    1545
                <ls_tabstrip>-empty = abap_true.
    1546
              ENDIF.
    1547
            WHEN 'IMPORT'.
    1548
              IF lt_importing IS INITIAL.
    1549
                <ls_tabstrip>-empty = abap_true.
    1550
              ENDIF.
    1551
            WHEN 'EXPORT'.
    1552
              IF lt_exporting IS INITIAL.
    1553
                <ls_tabstrip>-empty = abap_true.
    1554
              ENDIF.
    1555
            WHEN 'CHANGING'.
    1556
              IF lt_changing IS INITIAL.
    1557
                <ls_tabstrip>-empty = abap_true.
    1558
              ENDIF.
    1559
            WHEN 'TABLES'.
    1560
              IF lt_table IS INITIAL.
    1561
                <ls_tabstrip>-empty = abap_true.
    1562
              ENDIF.
    1563
            WHEN 'EXCEPTIONS'.
    1564
              IF lt_exception IS INITIAL.
    1565
                <ls_tabstrip>-empty = abap_true.
    1566
              ENDIF.
    1567
            WHEN 'SOURCECODE'.
    1568
              IF lt_sourcecode IS INITIAL.
    1569
                <ls_tabstrip>-empty = abap_true.
    1570
              ENDIF.
    1571
          ENDCASE.
    1572
        ENDLOOP.
    1573
    1574
    *     Long text
    1575
        CONCATENATE
    1576
            'makeDivSize(''DOCUMENTATION'');'
    1577
            'makeDivSize(''SOURCECODE'');'
    1578
            INTO l_javascript.
    1579
        LOOP AT lt_parameter ASSIGNING <ls_parameter>
    1580
            WHERE ltext = '-->'.
    1581
          CLEAR ls_tabstrip.
    1582
          CONCATENATE 'LTEXT_' <ls_parameter>-name
    1583
              INTO ls_tabstrip-id.
    1584
          ls_tabstrip-hidden = abap_true.
    1585
          APPEND ls_tabstrip TO lt_tabstrip.
    1586
          CONCATENATE
    1587
              l_javascript
    1588
              'makeDivSize(''' ls_tabstrip-id ''');'
    1589
              INTO l_javascript.
    1590
        ENDLOOP.
    1591
    1592
    *** HTML
    1593
        PERFORM html_main_header
    1594
          USING
    1595
            tpt_fugr_fuba
    1596
            txt_function_module
    1597
            <ls_ztadir>-funcname
    1598
            txt_active___1
    1599
            space
    1600
            space
    1601
            l_javascript
    1602
            lt_tabstrip
    1603
            gt_link
    1604
          CHANGING
    1605
            lt_html.
    1606
    *   Attributes
    1607
        IF lt_sourcecode IS INITIAL
    1608
          AND g_empty_tab <> gc_empty_tab_display.
    1609
          l_on = abap_true.
    1610
        ELSE.
    1611
          l_on = abap_false.
    1612
        ENDIF.
    1613
        PERFORM html_add_box1ti_2rb_ti
    1614
          USING
    1615
            txt_classification
    1616
            lt_classification
    1617
            txt_processing_type
    1618
            'PTYPE'
    1619
            lt_processing_type
    1620
            txt_general_data
    1621
            lt_general_data
    1622
            'ATTRIBUTES'
    1623
            l_on
    1624
          CHANGING
    1625
            lt_html.
    1626
    *   Importing
    1627
        IF NOT lt_importing IS INITIAL
    1628
        OR g_empty_tab = gc_empty_tab_display.
    1629
          PERFORM html_add_table
    1630
            USING
    1631
              'MODU_IMPOR'
    1632
              lt_importing
    1633
              lt_importing
    1634
              'IMPORT'
    1635
              abap_false
    1636
            CHANGING
    1637
              lt_html.
    1638
        ENDIF.
    1639
    *   Exporting
    1640
        IF NOT lt_exporting IS INITIAL
    1641
        OR g_empty_tab = gc_empty_tab_display.
    1642
          PERFORM html_add_table
    1643
            USING
    1644
              'MODU_EXPOR'
    1645
              lt_exporting
    1646
              lt_exporting
    1647
              'EXPORT'
    1648
              abap_false
    1649
            CHANGING
    1650
              lt_html.
    1651
        ENDIF.
    1652
    *   Changing
    1653
        IF NOT lt_changing IS INITIAL
    1654
        OR g_empty_tab = gc_empty_tab_display.
    1655
          PERFORM html_add_table
    1656
            USING
    1657
              'MODU_IMPOR'
    1658
              lt_changing
    1659
              lt_changing
    1660
              'CHANGING'
    1661
              abap_false
    1662
            CHANGING
    1663
              lt_html.
    1664
        ENDIF.
    1665
    *   Tables
    1666
        IF NOT lt_table IS INITIAL
    1667
        OR g_empty_tab = gc_empty_tab_display.
    1668
          PERFORM html_add_table
    1669
            USING
    1670
              'MODU_TABLE'
    1671
              lt_table
    1672
              lt_table
    1673
              'TABLES'
    1674
              abap_false
    1675
            CHANGING
    1676
              lt_html.
    1677
        ENDIF.
    1678
    *   Exceptions
    1679
        IF NOT lt_exception IS INITIAL
    1680
        OR g_empty_tab = gc_empty_tab_display.
    1681
          PERFORM html_add_table
    1682
            USING
    1683
              'MODU_EXCEP'
    1684
              lt_exception
    1685
              lt_exception
    1686
              'EXCEPTIONS'
    1687
              abap_false
    1688
            CHANGING
    1689
              lt_html.
    1690
        ENDIF.
    1691
    *   SourceCode
    1692
        IF NOT lt_sourcecode IS INITIAL
    1693
        OR g_empty_tab = gc_empty_tab_display.
    1694
          IF g_add_sourcecode = abap_true.
    1695
            l_filename = <ls_ztadir>-funcname.
    1696
            PERFORM download
    1697
              USING
    1698
                lt_sourcecode
    1699
                <ls_ztadir>-pgmid
    1700
                <ls_ztadir>-object
    1701
                l_filename
    1702
                gc_extension_txt
    1703
                abap_false.
    1704
          ENDIF.
    1705
          PERFORM html_add_sourcecode
    1706
            USING
    1707
              lt_sourcecode
    1708
              l_filename
    1709
              space
    1710
              space
    1711
              gc_extension_txt
    1712
              'SOURCECODE'
    1713
              abap_true
    1714
            CHANGING
    1715
              lt_html.
    1716
        ENDIF.
    1717
    *   Documentation
    1718
        IF NOT lt_documentation IS INITIAL
    1719
        OR g_empty_tab = gc_empty_tab_display.
    1720
          PERFORM html_add_doc
    1721
            USING
    1722
              lt_documentation
    1723
              'DOCUMENTATION'
    1724
              abap_false
    1725
            CHANGING
    1726
              lt_html.
    1727
        ENDIF.
    1728
    *   Long texts
    1729
        LOOP AT lt_parameter ASSIGNING <ls_parameter>
    1730
            WHERE ltext = '-->'.
    1731
          REFRESH lt_doku.
    1732
          PERFORM get_docu
    1733
            USING
    1734
              'FU'
    1735
              <ls_parameter>-ltext_doku_obj
    1736
              'T'
    1737
            CHANGING
    1738
              lt_doku.
    1739
          PERFORM get_id
    1740
            USING 'LTEXT_' <ls_parameter>-name
    1741
            CHANGING l_id.
    1742
          PERFORM html_add_doc
    1743
          USING
    1744
            lt_doku
    1745
            l_id
    1746
            abap_false
    1747
          CHANGING
    1748
            lt_html.
    1749
        ENDLOOP.
    1750
    *
    1751
        PERFORM html_main_footer
    1752
          USING
    1753
            lt_html.
    1754
    1755
        PERFORM download
    1756
          USING
    1757
            lt_html
    1758
            <ls_ztadir>-pgmid
    1759
            <ls_ztadir>-object
    1760
            <ls_ztadir>-progname
    1761
            gc_extension_htm
    1762
            abap_true.
    1763
      ENDLOOP.
    1764
    ENDFORM.                    "fugr_r3tr_modules
    1765
    1766
    1767
    *-----------------------------------------------------------------------
    1768
    * fugr_r3tr_screen                              Screens
    1769
    *-----------------------------------------------------------------------
    1770
    FORM fugr_r3tr_screen.
    1771
    1772
      DATA:
    1773
      lt_tabstrip TYPE it_tabstrip,
    1774
      ls_dynpro_name TYPE st_dynpro_name,
    1775
      ls_d020s TYPE d020s,                    "screen header
    1776
      lt_d021s TYPE STANDARD TABLE OF d021s,  "field list
    1777
      lt_d022s TYPE STANDARD TABLE OF d022s,  "flow logic
    1778
      lt_d023s TYPE d023s_tab,                "matchcode information
    1779
      ls_d023sx TYPE d023s_x,
    1780
      lt_d023x TYPE d023s_xtab,
    1781
      lt_feld TYPE STANDARD TABLE OF feld,
    1782
      lt_feld_redef TYPE it_feld_redef,
    1783
      lt_source TYPE it_string,
    1784
      lt_html TYPE it_string,
    1785
      ls_attributes TYPE st_attributes,
    1786
      lt_access_screen_type TYPE it_access,
    1787
      ls_access TYPE st_access,
    1788
      lt_ti_settings TYPE it_textinput,
    1789
      lt_ti_other TYPE it_textinput,
    1790
      ls_ti TYPE st_textinput,
    1791
      l_date_last_generation TYPE d,
    1792
      l_time_last_generation TYPE t,
    1793
      l_lines TYPE sycurow,
    1794
      l_cols TYPE sycucol,
    1795
      l_filename TYPE string,
    1796
      ls_dynpro_release TYPE st_dynpro_release,
    1797
      l_dynpro_release(4) TYPE c,
    1798
      l_title TYPE string.
    1799
    1800
      FIELD-SYMBOLS:
    1801
      <ls_d022s> TYPE d022s,
    1802
      <ls_d023s> TYPE d023s,
    1803
      <ls_ztadir> TYPE st_ztadir,
    1804
      <l_x> TYPE x.
    1805
    1806
      CONSTANTS:
    1807
      lc_type_cntcmp TYPE scrpdytype VALUE 'CNTCMP    ',
    1808
      lc_milikmp TYPE x VALUE '40',
    1809
      lc_miliksc TYPE x VALUE '08',
    1810
      lc_milinog TYPE x VALUE '20',
    1811
      lc_milinot TYPE x VALUE '04'.
    1812
    1813
    1814
    *Tabstrip
    1815
      PERFORM get_tabstrip
    1816
        USING 'FUGR_R3TR_SCREEN' space
    1817
        CHANGING lt_tabstrip.
    1818
    1819
      LOOP AT gt_ztadir ASSIGNING <ls_ztadir>
    1820
          WHERE pgmid = 'R3TR'
    1821
          AND object = 'FUGR'
    1822
          AND futype = gc_futype_screen
    1823
          AND downloaded = abap_false.
    1824
    1825
        CLEAR:
    1826
        ls_access,
    1827
        ls_attributes,
    1828
        ls_d020s,
    1829
        ls_d023sx,
    1830
        l_dynpro_release,
    1831
        ls_ti.
    1832
    1833
        REFRESH:
    1834
        lt_access_screen_type,
    1835
        lt_d021s,
    1836
        lt_d022s,
    1837
        lt_d023s,
    1838
        lt_d023x,
    1839
        lt_feld,
    1840
        lt_feld_redef,
    1841
        lt_html,
    1842
        lt_source,
    1843
        lt_ti_settings,
    1844
        lt_ti_other.
    1845
    1846
        ls_dynpro_name-prog = <ls_ztadir>-progname.
    1847
        ls_dynpro_name-dnum = <ls_ztadir>-dynpronr.
    1848
        IMPORT DYNPRO ls_d020s lt_d021s lt_d022s lt_d023s
    1849
            ID ls_dynpro_name.
    1850
        IF sy-subrc <> 0.
    1851
          <ls_ztadir>-subrc = sy-subrc.
    1852
          CONTINUE.
    1853
        ENDIF.
    1854
    1855
        CALL FUNCTION 'RS_DYNPRO_RELEASE_GET'
    1856
          EXPORTING
    1857
            dynpro_header  = ls_d020s
    1858
          IMPORTING
    1859
            dynpro_release = l_dynpro_release
    1860
          EXCEPTIONS
    1861
            OTHERS         = 1.
    1862
        ls_dynpro_release = l_dynpro_release.
    1863
    1864
        LOOP AT lt_d023s ASSIGNING <ls_d023s> WHERE type = lc_type_cntcmp.
    1865
          ls_d023sx = <ls_d023s>-content.
    1866
          APPEND ls_d023sx-cccont TO lt_d023x.
    1867
        ENDLOOP.
    1868
    1869
    *Attributes
    1870
        ls_attributes-descript = <ls_ztadir>-descript.
    1871
        ls_attributes-devclass = <ls_ztadir>-devclass.
    1872
        PERFORM get_devclass
    1873
          USING
    1874
            <ls_ztadir>-devclass
    1875
          CHANGING
    1876
            ls_attributes-devclass_descr.
    1877
        PERFORM get_spras
    1878
          USING
    1879
            ls_d020s-spra
    1880
          CHANGING
    1881
            ls_attributes-laiso
    1882
            ls_attributes-sptxt.
    1883
        PERFORM get_date
    1884
          USING
    1885
            ls_d020s-dgen
    1886
          CHANGING
    1887
            ls_attributes-date_last_changed.
    1888
        PERFORM get_time
    1889
          USING
    1890
            ls_d020s-tgen
    1891
          CHANGING
    1892
            ls_attributes-time_last_changed.
    1893
    1894
        CALL FUNCTION 'RS_SCRP_GET_GEN_DATA'
    1895
          EXPORTING
    1896
            progname = ls_d020s-prog
    1897
            dynnr    = ls_d020s-dnum
    1898
          IMPORTING
    1899
            gen_date = l_date_last_generation
    1900
            gen_time = l_time_last_generation
    1901
          EXCEPTIONS
    1902
            OTHERS   = 1.
    1903
        PERFORM get_date
    1904
          USING
    1905
            l_date_last_generation
    1906
          CHANGING
    1907
            ls_attributes-date_last_generation.
    1908
        PERFORM get_time
    1909
          USING
    1910
            l_time_last_generation
    1911
          CHANGING
    1912
            ls_attributes-time_last_generation.
    1913
    *Attributes - Screen type
    1914
        CLEAR ls_access.
    1915
        ls_access-ddtext = txt_normal.
    1916
        ls_access-checked = abap_false.
    1917
        IF ls_d020s-type NA 'IMSWJ'.
    1918
          ls_access-checked = abap_true.
    1919
        ENDIF.
    1920
        APPEND ls_access TO lt_access_screen_type.
    1921
        ls_access-ddtext = txt_subscreen.
    1922
        ls_access-checked = abap_false.
    1923
        IF ls_d020s-type = 'I'.
    1924
          ls_access-checked = abap_true.
    1925
        ENDIF.
    1926
        APPEND ls_access TO lt_access_screen_type.
    1927
        ls_access-ddtext = txt_modal_dialog_box.
    1928
        ls_access-checked = abap_false.
    1929
        IF ls_d020s-type = 'M'.
    1930
          ls_access-checked = abap_true.
    1931
        ENDIF.
    1932
        APPEND ls_access TO lt_access_screen_type.
    1933
        ls_access-ddtext = txt_selection_screen.
    1934
        ls_access-checked = abap_false.
    1935
        IF ls_d020s-type CA 'SWJ'.
    1936
          ls_access-checked = abap_true.
    1937
        ENDIF.
    1938
        APPEND ls_access TO lt_access_screen_type.
    1939
    *Attributes - Settings
    1940
        CLEAR ls_ti.
    1941
        IF ls_d020s-type <> 'I'.
    1942
          ls_ti-name = txt_hold_data.
    1943
          ls_ti-flag = abap_true.
    1944
          ls_ti-value = ls_d020s-hdat.
    1945
          APPEND ls_ti TO lt_ti_settings.
    1946
        ENDIF.
    1947
        ASSIGN ls_d020s-mili TO <l_x> CASTING.
    1948
        ls_ti-name = txt_switch_off_runtime_compres.
    1949
        ls_ti-flag = abap_true.
    1950
        IF <l_x> O lc_milikmp.
    1951
          ls_ti-value = abap_false.
    1952
        ELSE.
    1953
          ls_ti-value = abap_true.
    1954
        ENDIF.
    1955
        APPEND ls_ti TO lt_ti_settings.
    1956
        ls_ti-name = txt_template_non_executable.
    1957
        ls_ti-flag = abap_true.
    1958
        IF <l_x> O lc_milinog.
    1959
          ls_ti-value = abap_true.
    1960
        ELSE.
    1961
          ls_ti-value = abap_false.
    1962
        ENDIF.
    1963
        APPEND ls_ti TO lt_ti_settings.
    1964
        ls_ti-name = txt_hold_scroll_position.
    1965
        ls_ti-flag = abap_true.
    1966
        IF <l_x> O lc_miliksc.
    1967
          ls_ti-value = abap_true.
    1968
        ELSE.
    1969
          ls_ti-value = abap_false.
    1970
        ENDIF.
    1971
        APPEND ls_ti TO lt_ti_settings.
    1972
        ls_ti-name = txt_without_application_toolba.
    1973
        ls_ti-flag = abap_true.
    1974
        IF <l_x> O lc_milinot.
    1975
          ls_ti-value = abap_true.
    1976
        ELSE.
    1977
          ls_ti-value = abap_false.
    1978
        ENDIF.
    1979
        APPEND ls_ti TO lt_ti_settings.
    1980
    *Attributes - Other attributes
    1981
        CLEAR ls_ti.
    1982
        ls_ti-name = txt_next_screen.
    1983
        ls_ti-value = ls_d020s-fnum.
    1984
        ls_ti-input = abap_true.
    1985
        APPEND ls_ti TO lt_ti_other.
    1986
        ls_ti-name = txt_cursor_position.
    1987
        ls_ti-value = ls_d020s-cupo.
    1988
        ls_ti-input = abap_true.
    1989
        APPEND ls_ti TO lt_ti_other.
    1990
        ls_ti-name = txt_screen_group.
    1991
        ls_ti-value = ls_d020s-dgrp.
    1992
        ls_ti-input = abap_true.
    1993
        APPEND ls_ti TO lt_ti_other.
    1994
        ls_ti-name = txtt_lines_columns.
    1995
        ls_ti-name_suffix = txt_occupied.
    1996
        CALL FUNCTION 'RS_SCRP_GET_SCREEN_INFOS'
    1997
          EXPORTING
    1998
            progname = ls_d020s-prog
    1999
            dynnr    = ls_d020s-dnum
    2000
          IMPORTING
    2001
            lines    = l_lines
    2002
            columns  = l_cols
    2003
          EXCEPTIONS
    2004
            OTHERS   = 1.
    2005
        IF sy-subrc <> 0 OR l_lines > 999 OR l_cols > 999.
    2006
          l_lines = 0.
    2007
          l_cols = 0.
    2008
        ENDIF.
    2009
        ls_ti-value = l_lines.
    2010
        ls_ti-value_ext = l_cols.
    2011
        ls_ti-input = abap_true.
    2012
        ls_ti-has_value_ext = abap_true.
    2013
        APPEND ls_ti TO lt_ti_other.
    2014
        ls_ti-name = space.
    2015
        ls_ti-name_suffix = txt_maintenance.
    2016
        ls_ti-value = ls_d020s-noli.
    2017
        ls_ti-value_ext = ls_d020s-noco.
    2018
        ls_ti-input = abap_true.
    2019
        ls_ti-has_value_ext = abap_true.
    2020
        APPEND ls_ti TO lt_ti_other.
    2021
        CLEAR ls_ti.
    2022
        ls_ti-name = txtt_context_menu_form_on_ctme.
    2023
        READ TABLE lt_d023s ASSIGNING <ls_d023s>
    2024
            WITH KEY type = 'CTMENU'.
    2025
        IF sy-subrc = 0.
    2026
          ls_ti-value = <ls_d023s>-content.
    2027
        ENDIF.
    2028
        ls_ti-input = abap_true.
    2029
        UNASSIGN <ls_d023s>.
    2030
        APPEND ls_ti TO lt_ti_other.
    2031
    *   Element list
    2032
        PERFORM fugr_get_feldtab
    2033
          USING
    2034
            ls_d020s
    2035
            lt_d021s
    2036
            lt_d023x
    2037
            ls_dynpro_release
    2038
          CHANGING
    2039
            lt_feld
    2040
            lt_feld_redef.
    2041
    2042
    *SourceCode
    2043
        LOOP AT lt_d022s ASSIGNING <ls_d022s>.
    2044
          APPEND <ls_d022s>-line TO lt_source.
    2045
        ENDLOOP.
    2046
    2047
    *** HTML
    2048
        l_title = tpt_fugr_scr.
    2049
        PERFORM replace_single
    2050
          USING '#NAME_VALUE#' <ls_ztadir>-progname
    2051
          CHANGING l_title.
    2052
        PERFORM html_main_header
    2053
          USING
    2054
            l_title
    2055
            txt_screen_number
    2056
            <ls_ztadir>-dynpronr
    2057
            txt_active___1
    2058
            space
    2059
            space
    2060
            'makeDivSize(''FLOW_LOGIC'');'
    2061
            lt_tabstrip
    2062
            gt_link
    2063
          CHANGING
    2064
            lt_html.
    2065
    *   Attributes
    2066
        PERFORM html_add_attributes_3
    2067
          USING
    2068
            ls_attributes
    2069
            txt_screen_type
    2070
            'scrType'
    2071
            lt_access_screen_type
    2072
            txt_settings
    2073
            lt_ti_settings
    2074
            txt_other_attributes
    2075
            lt_ti_other
    2076
            'ATTRIBUTES'
    2077
            abap_false
    2078
          CHANGING
    2079
            lt_html.
    2080
    *   Element list - begin
    2081
        PERFORM html_add_container_begin
    2082
          USING
    2083
            lt_tabstrip
    2084
            'ELEMENT_LIST'
    2085
            abap_false
    2086
          CHANGING
    2087
            lt_html.
    2088
        PERFORM html_add_table
    2089
          USING
    2090
    *        lt_table_general_attr
    2091
            'SCRN_GENER'
    2092
            lt_feld_redef
    2093
            lt_feld
    2094
            'GENERAL_ATTR'
    2095
            abap_true
    2096
          CHANGING
    2097
            lt_html.
    2098
        PERFORM html_add_table
    2099
          USING
    2100
    *        lt_table_texts_io_templates
    2101
            'SCRN_IOTEM'
    2102
            lt_feld_redef
    2103
            lt_feld
    2104
            'TEXTS_IO_TEMPLATES'
    2105
            abap_false
    2106
          CHANGING
    2107
            lt_html.
    2108
        PERFORM html_add_table
    2109
          USING
    2110
    *        lt_table_special_attr
    2111
            'SCRN_SPECI'
    2112
            lt_feld_redef
    2113
            lt_feld
    2114
            'SPECIAL_ATTR'
    2115
            abap_false
    2116
          CHANGING
    2117
            lt_html.
    2118
        PERFORM html_add_table
    2119
          USING
    2120
    *        lt_table_display_attr
    2121
            'SCRN_DISPL'
    2122
            lt_feld_redef
    2123
            lt_feld
    2124
            'DISPLAY_ATTR'
    2125
            abap_false
    2126
          CHANGING
    2127
            lt_html.
    2128
        PERFORM html_add_table
    2129
          USING
    2130
    *        lt_table_mod_groups_func
    2131
            'SCRN_MODGR'
    2132
            lt_feld_redef
    2133
            lt_feld
    2134
            'MOD_GROUPS_FUNCTIONS'
    2135
            abap_false
    2136
          CHANGING
    2137
            lt_html.
    2138
        PERFORM html_add_table
    2139
          USING
    2140
    *        lt_table_references
    2141
            'SCRN_REFER'
    2142
            lt_feld_redef
    2143
            lt_feld
    2144
            'REFERENCES'
    2145
            abap_false
    2146
          CHANGING
    2147
            lt_html.
    2148
        PERFORM html_add_container_end
    2149
          CHANGING
    2150
            lt_html.
    2151
    *   Element list - end
    2152
    *   Flow logic
    2153
        CONCATENATE <ls_ztadir>-progname '-' <ls_ztadir>-dynpronr
    2154
            INTO l_filename.
    2155
        PERFORM html_add_sourcecode
    2156
          USING
    2157
            lt_source
    2158
            l_filename
    2159
            space
    2160
            space
    2161
            gc_extension_txt
    2162
            'FLOW_LOGIC'
    2163
            abap_true
    2164
          CHANGING
    2165
            lt_html.
    2166
        IF g_add_sourcecode = abap_true.
    2167
          PERFORM download
    2168
            USING
    2169
              lt_source
    2170
              <ls_ztadir>-pgmid
    2171
              <ls_ztadir>-object
    2172
              l_filename
    2173
              gc_extension_txt
    2174
              abap_false.
    2175
        ENDIF.
    2176
    *
    2177
        PERFORM html_main_footer
    2178
          USING
    2179
            lt_html.
    2180
    2181
        PERFORM download
    2182
          USING
    2183
            lt_html
    2184
            <ls_ztadir>-pgmid
    2185
            <ls_ztadir>-object
    2186
            l_filename
    2187
            gc_extension_htm
    2188
            abap_true.
    2189
        <ls_ztadir>-downloaded = abap_true.
    2190
      ENDLOOP.
    2191
    ENDFORM.                    "r3tr_screen