Properties SourceCde
txt
1
*&---------------------------------------------------------------------*
2
*&  Include           ZSOFTCOPY_T                                      *
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
* t
31
*-----------------------------------------------------------------------
32
FORM t.
33
*Message Classes
34
  PERFORM t_r3tr_msag.
35
*Authorization Oject
36
  PERFORM t_r3tr_tobj.
37
*SET/GET Parameters
38
  PERFORM t_r3tr_para.
39
*Transactions
40
  PERFORM t_r3tr_tran.
41
ENDFORM.                    "t
42
 
43
 
44
*-----------------------------------------------------------------------
45
* t_r3tr_msag                                   Message Classes
46
*-----------------------------------------------------------------------
47
FORM t_r3tr_msag.
48
 
49
  DATA:
50
  ls_ti TYPE st_textinput,
51
  lt_attr TYPE it_textinput,
52
  lt_box TYPE it_textinput,
53
  l_arbgb TYPE arbgb,
54
  l_bname TYPE xubname,
55
  l_name_text TYPE ad_namtext,
56
  ls_t100a TYPE t100a,
57
  l_laiso TYPE laiso,
58
  l_sptxt TYPE sptxt,
59
  lt_html TYPE it_string,
60
  ls_tabstrip TYPE st_tabstrip,
61
  lt_tabstrip TYPE it_tabstrip,
62
  lt_t100 TYPE STANDARD TABLE OF t100,
63
  ls_t100ext TYPE st_t100ext,
64
  lt_t100ext TYPE it_t100ext,
65
  lt_doc TYPE it_string.
66
 
67
  FIELD-SYMBOLS:
68
  <ls_ztadir> TYPE st_ztadir,
69
  <ls_t100> TYPE t100,
70
  <ls_t100ext> TYPE st_t100ext.
71
 
72
  LOOP AT gt_ztadir ASSIGNING <ls_ztadir>
73
      WHERE pgmid = 'R3TR'
74
      AND object = 'MSAG'
75
      AND downloaded = abap_false.
76
 
77
    CLEAR:
78
    ls_ti,
79
    ls_t100a.
80
 
81
    REFRESH:
82
    lt_attr,
83
    lt_box,
84
    lt_html,
85
    lt_t100,
86
    lt_t100ext,
87
    lt_tabstrip,
88
    lt_doc.
89
 
90
    l_arbgb = <ls_ztadir>-obj_name.
91
 
92
    SELECT SINGLE * FROM t100a INTO ls_t100a
93
        WHERE arbgb = l_arbgb.
94
*TabStrip
95
    PERFORM get_tabstrip
96
      USING 'T_R3TR_MSAG' space
97
      CHANGING lt_tabstrip.
98
*Attributes
99
*   Package
100
    CLEAR ls_ti.
101
    ls_ti-name = txt_package.
102
    ls_ti-value = <ls_ztadir>-devclass.
103
    ls_ti-input = abap_true.
104
    APPEND ls_ti TO lt_attr.
105
*   Last changed by
106
    CLEAR ls_ti.
107
    ls_ti-name = txt_last_changed_by___3.
108
    ls_ti-value = ls_t100a-lastuser.
109
    l_bname = ls_t100a-lastuser.
110
    PERFORM get_user
111
      USING l_bname
112
      CHANGING l_name_text.
113
    ls_ti-value_text = l_name_text.
114
    ls_ti-value_ext_space = abap_true.
115
    ls_ti-input = abap_true.
116
    ls_ti-has_value_ext = abap_true.
117
    APPEND ls_ti TO lt_attr.
118
*   Changed on
119
    CLEAR ls_ti.
120
    ls_ti-name = txt_changed_on.
121
    PERFORM get_date
122
      USING
123
        ls_t100a-ldate
124
      CHANGING
125
        ls_ti-value.
126
    ls_ti-value_ext_space = abap_true.
127
    ls_ti-input = abap_true.
128
    ls_ti-has_value_ext = abap_true.
129
    APPEND ls_ti TO lt_attr.
130
*   Last changed at
131
    CLEAR ls_ti.
132
    ls_ti-name = txt_last_changed_at.
133
    PERFORM get_time
134
      USING
135
        ls_t100a-ltime
136
      CHANGING
137
        ls_ti-value.
138
    ls_ti-value_ext_space = abap_true.
139
    ls_ti-input = abap_true.
140
    ls_ti-has_value_ext = abap_true.
141
    APPEND ls_ti TO lt_attr.
142
*Attributes - Box
143
*   Original lang.
144
    CLEAR ls_ti.
145
    ls_ti-name = txt_original_lang.
146
    PERFORM get_spras
147
      USING ls_t100a-masterlang
148
      CHANGING l_laiso l_sptxt.
149
    ls_ti-value = l_laiso.
150
    ls_ti-value_text = l_sptxt.
151
    ls_ti-value_ext_space = abap_true.
152
    ls_ti-input = abap_true.
153
    ls_ti-has_value_ext = abap_true.
154
    APPEND ls_ti TO lt_box.
155
*   Person respons.
156
    CLEAR ls_ti.
157
    ls_ti-name = txt_person_respons.
158
    ls_ti-value = ls_t100a-respuser.
159
    l_bname = ls_t100a-respuser.
160
    PERFORM get_user
161
      USING l_bname
162
      CHANGING l_name_text.
163
    ls_ti-value_text = l_name_text.
164
    ls_ti-value_ext_space = abap_true.
165
    ls_ti-input = abap_true.
166
    ls_ti-has_value_ext = abap_true.
167
    APPEND ls_ti TO lt_box.
168
*   Short text
169
    CLEAR ls_ti.
170
    ls_ti-name = txt_short_text___1.
171
    ls_ti-value = <ls_ztadir>-descript.
172
    ls_ti-input = abap_true.
173
    APPEND ls_ti TO lt_box.
174
*Messages
175
    SELECT * FROM t100 INTO TABLE lt_t100
176
        WHERE arbgb = l_arbgb
177
        AND sprsl = sy-langu.
178
    LOOP AT lt_t100 ASSIGNING <ls_t100>.
179
      CLEAR ls_t100ext.
180
*     T100U
181
      SELECT SINGLE name datum FROM t100u
182
          INTO (ls_t100ext-name,ls_t100ext-datum)
183
          WHERE arbgb = <ls_t100>-arbgb
184
          AND msgnr = <ls_t100>-msgnr.
185
      l_bname = ls_t100ext-name.
186
      IF NOT l_bname IS INITIAL.
187
        PERFORM get_user
188
          USING l_bname
189
          CHANGING ls_t100ext-name_text.
190
        PERFORM get_date
191
          USING ls_t100ext-datum
192
          CHANGING ls_t100ext-datum_text.
193
      ENDIF.
194
*     Documentation
195
      CALL FUNCTION 'DOCU_OBJECT_NAME_CONCATENATE'
196
        EXPORTING
197
          docu_id  = 'NA'
198
          element  = <ls_t100>-arbgb
199
          addition = <ls_t100>-msgnr
200
        IMPORTING
201
          object   = ls_t100ext-object_name
202
        EXCEPTIONS
203
          OTHERS   = 0.
204
      CALL FUNCTION 'DOCU_SELFDEF_READ'
205
        EXPORTING
206
          object_id   = 'NA'
207
          object_name = ls_t100ext-object_name
208
        IMPORTING
209
          selfdef     = ls_t100ext-selfdef
210
        EXCEPTIONS
211
          OTHERS      = 0.
212
      IF NOT ls_t100ext-selfdef IS INITIAL.
213
        ls_t100ext-no_docu = abap_true.
214
      ELSE.
215
        ls_t100ext-ltext = '-->'.
216
        CONCATENATE 'switchContent(''' ls_t100ext-object_name ''')'
217
            INTO ls_t100ext-ltext_onclick.
218
        CLEAR ls_tabstrip.
219
        ls_tabstrip-id = ls_t100ext-object_name.
220
        ls_tabstrip-hidden = abap_true.
221
        APPEND ls_tabstrip TO lt_tabstrip.
222
      ENDIF.
223
      APPEND ls_t100ext TO lt_t100ext.
224
    ENDLOOP.
225
*HTML
226
    PERFORM html_main_header
227
      USING
228
        tpt_msag
229
        txt_message_class
230
        <ls_ztadir>-obj_name
231
        txt_active___1
232
        space
233
        space
234
        space
235
        lt_tabstrip
236
        gt_link
237
      CHANGING
238
        lt_html.
239
*   Attributes
240
    PERFORM html_add_textinput_subbox
241
      USING
242
        lt_attr
243
        txt_attributes___2
244
        lt_box
245
        'ATTRIBUTES'
246
        abap_true
247
      CHANGING
248
        lt_html.
249
*   Messages
250
    PERFORM html_add_table
251
      USING
252
        'MSAG_MESS'
253
        lt_t100
254
        lt_t100ext
255
        'MESSAGES'
256
        abap_false
257
      CHANGING
258
        lt_html.
259
*   Documentation
260
    LOOP AT lt_t100ext ASSIGNING <ls_t100ext>
261
        WHERE no_docu = abap_false.
262
      PERFORM get_docu
263
        USING
264
          'NA'
265
          <ls_t100ext>-object_name
266
          'E'
267
        CHANGING
268
          lt_doc.
269
      PERFORM html_add_doc
270
        USING
271
          lt_doc
272
          <ls_t100ext>-object_name
273
          abap_false
274
        CHANGING
275
          lt_html.
276
    ENDLOOP.
277
*
278
    PERFORM html_main_footer
279
      USING
280
        lt_html.
281
 
282
    PERFORM download
283
      USING
284
        lt_html
285
        <ls_ztadir>-pgmid
286
        <ls_ztadir>-object
287
        <ls_ztadir>-obj_name
288
        gc_extension_htm
289
        abap_true.
290
    <ls_ztadir>-downloaded = abap_true.
291
  ENDLOOP.
292
 
293
ENDFORM.                                                    "r3tr_msag
294
 
295
 
296
*-----------------------------------------------------------------------
297
* t_r3tr_tobj                                   Authorization Object
298
*-----------------------------------------------------------------------
299
FORM t_r3tr_tobj.
300
 
301
  DATA:
302
  l_objct TYPE xuobject,
303
  ls_tobj TYPE tobj,
304
  ls_ti TYPE st_textinput,
305
  lt_attr TYPE it_textinput,
306
  lt_box TYPE it_textinput,
307
  lt_actvt_attr TYPE it_textinput,
308
  lt_actvt TYPE it_textinput,
309
  lt_tactz TYPE STANDARD TABLE OF tactz,
310
  l_xutxt TYPE xutxt30,
311
  lt_html TYPE it_string,
312
  l_ctext TYPE xutext,
313
  l_bname TYPE xubname,
314
  l_name_text TYPE ad_namtext,
315
  l_field TYPE tobj-fiel1,
316
  l_text TYPE as4text,
317
  l_has_actvt TYPE flag,
318
  lt_doc TYPE it_string,
319
  lt_tabstrip TYPE it_tabstrip,
320
  l_javascript TYPE string.
321
 
322
  FIELD-SYMBOLS:
323
  <ls_ztadir> TYPE st_ztadir,
324
  <ls_tactz> TYPE tactz,
325
  <ls_tabstrip> TYPE st_tabstrip.
326
 
327
*TabStrip
328
  PERFORM get_tabstrip
329
    USING 'T_R3TR_TOBJ' space
330
    CHANGING lt_tabstrip.
331
 
332
  LOOP AT gt_ztadir ASSIGNING <ls_ztadir>
333
      WHERE pgmid = 'R3TR'
334
      AND object = 'SUSO'
335
      AND downloaded = abap_false.
336
 
337
    CLEAR:
338
    l_objct,
339
    ls_tobj,
340
    ls_ti,
341
    l_ctext,
342
    l_bname,
343
    l_name_text,
344
    l_has_actvt,
345
    l_javascript.
346
 
347
    REFRESH:
348
    lt_attr,
349
    lt_box,
350
    lt_actvt_attr,
351
    lt_actvt,
352
    lt_tactz,
353
    lt_doc,
354
    lt_html.
355
 
356
    l_objct = <ls_ztadir>-obj_name.
357
 
358
    SELECT SINGLE * FROM tobj INTO ls_tobj
359
        WHERE objct = l_objct.
360
 
361
    SELECT SINGLE ctext FROM tobct INTO l_ctext
362
        WHERE oclss = ls_tobj-oclss
363
        AND langu = sy-langu.
364
 
365
*Attributes
366
*   Class
367
    CLEAR ls_ti.
368
    ls_ti-name = txt_class.
369
    ls_ti-value = ls_tobj-oclss.
370
    ls_ti-value_ext = l_ctext.
371
    ls_ti-input = abap_true.
372
    ls_ti-has_value_ext = abap_true.
373
    APPEND ls_ti TO lt_attr.
374
*   Author
375
    CLEAR ls_ti.
376
    ls_ti-name = txt_autor.
377
    ls_ti-value = ls_tobj-bname.
378
    l_bname = ls_tobj-bname.
379
    PERFORM get_user
380
      USING l_bname
381
      CHANGING l_name_text.
382
    ls_ti-value_text = l_name_text.
383
    ls_ti-input = abap_true.
384
    APPEND ls_ti TO lt_attr.
385
*Attributes - Box
386
    DO 10 TIMES VARYING l_field
387
        FROM ls_tobj-fiel1 NEXT ls_tobj-fiel2.
388
      CLEAR:
389
      l_text,
390
      ls_ti.
391
      IF NOT l_field IS INITIAL.
392
        IF l_field = 'ACTVT'.
393
          l_has_actvt = abap_true.
394
        ENDIF.
395
        CALL FUNCTION 'AUTH_FIELD_GET_INFO'
396
          EXPORTING
397
            fieldname = l_field
398
          IMPORTING
399
            text      = l_text.
400
      ENDIF.
401
      ls_ti-value = l_field.
402
      ls_ti-value_ext = l_text.
403
      ls_ti-has_value_ext = abap_true.
404
      ls_ti-no_name = abap_true.
405
      ls_ti-input = abap_true.
406
      APPEND ls_ti TO lt_box.
407
    ENDDO.
408
*Documentation
409
    PERFORM get_docu
410
      USING
411
        'UO'
412
        l_objct
413
        'E'
414
      CHANGING
415
        lt_doc.
416
*Activities
417
    SELECT * FROM tactz INTO TABLE lt_tactz
418
        WHERE brobj = l_objct.
419
    SORT lt_tactz BY actvt.
420
    LOOP AT lt_tactz ASSIGNING <ls_tactz>.
421
      SELECT SINGLE ltext FROM tactt INTO l_xutxt
422
          WHERE actvt = <ls_tactz>-actvt
423
          AND spras = sy-langu.
424
      CLEAR ls_ti.
425
      ls_ti-name = <ls_tactz>-actvt.
426
      ls_ti-value = abap_true.
427
      ls_ti-flag = abap_true.
428
      ls_ti-description = l_xutxt.
429
      APPEND ls_ti TO lt_actvt.
430
    ENDLOOP.
431
*Activities - Attributes
432
    CLEAR ls_ti.
433
    ls_ti-name = txt_conversion_for_authorizati.
434
    ls_ti-value = ls_tobj-conversion.
435
    ls_ti-flag = abap_true.
436
    APPEND ls_ti TO lt_actvt_attr.
437
    CLEAR ls_ti.
438
    ls_ti-name = txt_activity.
439
    IF l_has_actvt = abap_true.
440
      ls_ti-value = 'ACTVT'.
441
    ENDIF.
442
    ls_ti-input = abap_true.
443
    APPEND ls_ti TO lt_actvt_attr.
444
*Tabstrip
445
    LOOP AT lt_tabstrip ASSIGNING <ls_tabstrip>.
446
      <ls_tabstrip>-empty = abap_false.
447
      CASE <ls_tabstrip>-id.
448
        WHEN 'DOC'.
449
          IF lt_doc IS INITIAL.
450
            <ls_tabstrip>-empty = abap_true.
451
          ENDIF.
452
      ENDCASE.
453
    ENDLOOP.
454
*** HTML
455
    IF NOT lt_doc IS INITIAL.
456
      l_javascript = 'makeDivSize(''DOC'');'.
457
    ENDIF.
458
    PERFORM html_main_header
459
      USING
460
        tpt_tobj
461
        txt_object
462
        <ls_ztadir>-obj_name
463
        space
464
        txt_text
465
        <ls_ztadir>-descript
466
        l_javascript
467
        lt_tabstrip
468
        gt_link
469
      CHANGING
470
        lt_html.
471
*Attributes
472
    PERFORM html_add_textinput_subbox
473
      USING
474
        lt_attr
475
        txt_authorization_fields
476
        lt_box
477
        'ATTRIBUTES'
478
        abap_true
479
      CHANGING
480
        lt_html.
481
*Activities
482
    PERFORM html_add_textinput_subbox
483
      USING
484
        lt_actvt_attr
485
        txt_values
486
        lt_actvt
487
        'ACTVT'
488
        abap_false
489
      CHANGING
490
        lt_html.
491
*Documentation
492
    IF NOT lt_doc IS INITIAL
493
    OR g_empty_tab = gc_empty_tab_display.
494
      PERFORM html_add_doc
495
        USING
496
          lt_doc
497
          'DOC'
498
          abap_false
499
        CHANGING
500
          lt_html.
501
    ENDIF.
502
*
503
    PERFORM html_main_footer
504
      USING
505
        lt_html.
506
 
507
    PERFORM download
508
      USING
509
        lt_html
510
        <ls_ztadir>-pgmid
511
        <ls_ztadir>-object
512
        <ls_ztadir>-obj_name
513
        gc_extension_htm
514
        abap_true.
515
    <ls_ztadir>-downloaded = abap_true.
516
  ENDLOOP.
517
 
518
ENDFORM.                                                    "r3tr_tobj
519
 
520
 
521
*-----------------------------------------------------------------------
522
* t_r3tr_para                                   SET/GET Parameters
523
*-----------------------------------------------------------------------
524
FORM t_r3tr_para.
525
 
526
  DATA:
527
  ls_ti TYPE st_textinput,
528
  lt_ti TYPE it_textinput,
529
  l_filename TYPE string,
530
  lt_html TYPE it_string.
531
 
532
  FIELD-SYMBOLS:
533
  <ls_ztadir> TYPE st_ztadir.
534
 
535
  LOOP AT gt_ztadir ASSIGNING <ls_ztadir>
536
      WHERE pgmid = 'R3TR'
537
      AND object = 'PARA'
538
      AND downloaded = abap_false.
539
 
540
    REFRESH:
541
    lt_html,
542
    lt_ti.
543
 
544
    CLEAR ls_ti.
545
    ls_ti-name = txt_parameter_id.
546
    ls_ti-value = <ls_ztadir>-obj_name.
547
    ls_ti-input = abap_true.
548
    APPEND ls_ti TO lt_ti.
549
 
550
    CLEAR ls_ti.
551
    ls_ti-name = txt_text.
552
    ls_ti-value = <ls_ztadir>-descript.
553
    ls_ti-input = abap_true.
554
    APPEND ls_ti TO lt_ti.
555
 
556
    l_filename = <ls_ztadir>-obj_name.
557
    PERFORM encode_uri_link CHANGING l_filename.
558
    PERFORM replace_all
559
      USING '%' 'x'
560
      CHANGING l_filename.
561
 
562
    PERFORM replace_all
563
      USING '<' '-'
564
      CHANGING l_filename.
565
    PERFORM replace_all
566
      USING '>' '-'
567
      CHANGING l_filename.
568
    PERFORM encode_uri
569
      CHANGING l_filename.
570
 
571
*** HTML
572
    PERFORM html_main_popupheader
573
      USING
574
        txt_component_information
575
      CHANGING
576
        lt_html.
577
*   Content
578
    PERFORM html_add_textinputnodiv
579
      USING
580
        lt_ti
581
      CHANGING
582
        lt_html.
583
*   Footer
584
    PERFORM html_main_popupfooter
585
      CHANGING lt_html.
586
*   Download
587
    PERFORM download
588
      USING
589
        lt_html
590
        <ls_ztadir>-pgmid
591
        <ls_ztadir>-object
592
        l_filename
593
        gc_extension_htm
594
        abap_true.
595
 
596
  ENDLOOP.
597
 
598
ENDFORM.                                                    "r3tr_para
599
 
600
 
601
*-----------------------------------------------------------------------
602
* t_r3tr_tran                                   Transactions
603
*-----------------------------------------------------------------------
604
FORM t_r3tr_tran.
605
 
606
  DATA:
607
  ls_tran TYPE st_transaction,
608
  ls_tstc TYPE tstc,
609
  ls_tstc_tmp TYPE tstc,
610
  lt_tstca TYPE STANDARD TABLE OF tstca,
611
  ls_tstcc TYPE tstcc,
612
  l_param TYPE tcdparam,
613
  l_tcode TYPE tcode,
614
  l_gui_title TYPE string,
615
  ls_ti TYPE st_textinput,
616
  lt_defval TYPE it_textinput,
617
  lt_gui_support TYPE it_textinput,
618
  lt_para TYPE it_transaction_para,
619
  ls_para TYPE st_transaction_para,
620
  lt_html TYPE it_string,
621
  l_off TYPE i,
622
  l_length TYPE i,
623
  l_str TYPE string,
624
  lt_str TYPE it_string,
625
  lt_tabstrip TYPE it_tabstrip.
626
 
627
  CONSTANTS:
628
  lc_hex_tra TYPE x VALUE '00',               " Transaktion         T
629
  lc_hex_men TYPE x VALUE '01',               " Bereichsmenue       M
630
  lc_hex_par TYPE x VALUE '02',               " Parametertrans.     P
631
  lc_hex_rep TYPE x VALUE '80',               " Report              R
632
  lc_hex_rpv TYPE x VALUE '10',               " Report  mit Variante
633
  lc_hex_obj TYPE x VALUE '08',               " Objekttransaktionen
634
  lc_hex_chk TYPE x VALUE '04',               " mit Pruefobjekt
635
  lc_oo_program(9)            VALUE '\PROGRAM=',
636
  lc_oo_class(7)              VALUE '\CLASS=',
637
  lc_oo_method(8)             VALUE '\METHOD=',
638
  lc_oo_tcode LIKE tstc-tcode VALUE 'OS_APPLICATION'.
639
 
640
  FIELD-SYMBOLS:
641
  <ls_ztadir> TYPE st_ztadir,
642
  <ls_tstca> TYPE tstca,
643
  <l_pervas> TYPE ANY.
644
 
645
  LOOP AT gt_ztadir ASSIGNING <ls_ztadir>
646
      WHERE pgmid = 'R3TR'
647
      AND object = 'TRAN'
648
      AND downloaded = abap_false.
649
 
650
    CLEAR:
651
    ls_para,
652
    ls_tran,
653
    ls_ti,
654
    ls_tstc,
655
    ls_tstc_tmp,
656
    ls_tstcc,
657
    l_param,
658
    l_tcode,
659
    l_gui_title,
660
    l_off,
661
    l_length,
662
    l_str.
663
 
664
    REFRESH:
665
    lt_tstca,
666
    lt_defval,
667
    lt_gui_support,
668
    lt_para,
669
    lt_html,
670
    lt_str,
671
    lt_tabstrip.
672
 
673
 
674
    l_tcode = <ls_ztadir>-obj_name.
675
 
676
    SELECT SINGLE * FROM tstc INTO ls_tstc
677
        WHERE tcode = l_tcode.
678
    ls_tran-pgmna = ls_tstc-pgmna.
679
    ls_tran-dypno = ls_tstc-dypno.
680
    IF ls_tstc-arbgb <> '&&'.
681
      ls_tran-trans_var = abap_true.
682
    ENDIF.
683
 
684
    SELECT * FROM tstca INTO TABLE lt_tstca
685
        WHERE tcode = l_tcode.
686
    LOOP AT lt_tstca ASSIGNING <ls_tstca>.
687
      ls_tran-objct = <ls_tstca>-objct.
688
      EXIT.
689
    ENDLOOP.
690
 
691
    SELECT SINGLE * FROM tstcc INTO ls_tstcc
692
        WHERE tcode = l_tcode.
693
    IF ls_tstcc-s_webgui = '2'.
694
      ls_tran-clf_ewt = abap_true.
695
      ls_tran-clf_profi = abap_false.
696
    ELSE.
697
      ls_tran-clf_ewt = abap_false.
698
      ls_tran-clf_profi = abap_true.
699
    ENDIF.
700
    ASSIGN COMPONENT 'S_PERVAS' OF STRUCTURE ls_tstcc TO <l_pervas>.
701
    IF <l_pervas> IS ASSIGNED.
702
      ls_tran-clf_pervas = <l_pervas>.
703
      UNASSIGN <l_pervas>.
704
    ENDIF.
705
    ls_tran-clf_service = ls_tstcc-s_service.
706
*Parameter
707
    SELECT SINGLE param FROM tstcp INTO l_param
708
        WHERE tcode = l_tcode.
709
 
710
    CASE l_param(1).
711
      WHEN '\'.
712
        IF l_param CS lc_oo_program.
713
          l_off = sy-fdpos + 9.
714
          l_length = strlen( l_param ) - l_off.
715
          l_str = l_param+l_off(l_length).
716
          IF l_str CA '\'.
717
            ls_tran-pgmna = l_str+0(sy-fdpos).
718
          ELSE.
719
            ls_tran-pgmna = l_str.
720
          ENDIF.
721
        ENDIF.
722
        IF l_param CS lc_oo_class.
723
          l_off = sy-fdpos + 7.
724
          l_length = strlen( l_param ) - l_off.
725
          l_str = l_param+l_off(l_length).
726
          IF l_str CA '\'.
727
            ls_tran-classname = l_str+0(sy-fdpos).
728
          ELSE.
729
            ls_tran-classname = l_str.
730
          ENDIF.
731
        ENDIF.
732
        IF l_param CS lc_oo_method.
733
          l_off = sy-fdpos + 8.
734
          l_length = strlen( l_param ) - l_off.
735
          l_str = l_param+l_off(l_length).
736
          IF l_str CA '\'.
737
            ls_tran-method = l_str+0(sy-fdpos).
738
          ELSE.
739
            ls_tran-method = l_str.
740
          ENDIF.
741
        ENDIF.
742
        IF NOT ls_tstc-pgmna IS INITIAL.
743
          ls_tran-local = abap_true.
744
        ENDIF.
745
      WHEN '@'.
746
        l_off = 1.
747
        IF l_param(2) = '@@'.
748
          l_off = 2.
749
          ls_tran-ind_vari = abap_true.
750
        ENDIF.
751
        IF l_param CA space. ENDIF.
752
        l_length = sy-fdpos - l_off.
753
        ls_tran-def_call_tcode = l_param+l_off(l_length).
754
 
755
        l_off = l_off + l_length + 1.
756
        l_length = strlen( l_param ).
757
        SUBTRACT l_off FROM l_length.
758
        ls_tran-variant = l_param+l_off(l_length).
759
      WHEN '/'.
760
        IF l_param+1(1) = '*'.
761
          ls_tran-def_skip_1 = abap_true.
762
        ENDIF.
763
 
764
        IF l_param CA space. ENDIF.
765
        l_length = sy-fdpos.
766
        IF l_length > 2.
767
          SUBTRACT 2 FROM l_length.
768
          ls_tran-def_call_tcode = l_param+2(l_length).
769
          SELECT SINGLE * FROM tstc INTO ls_tstc_tmp
770
              WHERE tcode = ls_tran-def_call_tcode.
771
          IF sy-subrc = 0.
772
            "...
773
          ENDIF.
774
 
775
          IF l_param CA '='.
776
            l_off = 3 + l_length.
777
            l_length = strlen( l_param ).
778
            SUBTRACT l_off FROM l_length.
779
            l_str = l_param+l_off(l_length).
780
 
781
            SPLIT l_str AT ';' INTO TABLE lt_str.
782
            LOOP AT lt_str INTO l_str.
783
              IF l_str CA '='.
784
                CLEAR ls_para.
785
                SPLIT l_str AT '=' INTO
786
                    ls_para-para_field ls_para-para_value.
787
                APPEND ls_para TO lt_para.
788
              ENDIF.
789
            ENDLOOP.
790
          ENDIF.
791
        ENDIF.
792
      WHEN OTHERS.
793
        IF l_param CA '='.
794
          SPLIT l_param AT ';' INTO TABLE lt_str.
795
          LOOP AT lt_str INTO l_str.
796
            IF l_str CA '='.
797
              CLEAR ls_para.
798
              SPLIT l_str AT '=' INTO
799
                  ls_para-para_field ls_para-para_value.
800
              APPEND ls_para TO lt_para.
801
            ENDIF.
802
          ENDLOOP.
803
        ENDIF.
804
    ENDCASE.
805
***
806
    SELECT SINGLE ttext FROM tstct INTO ls_tran-ttext
807
        WHERE sprsl = sy-langu
808
        AND tcode = l_tcode.
809
***
810
    IF ls_tstc-cinfo O lc_hex_rep.       "report transaction
811
      ls_tran-ttype = gc_tcode_report.
812
      l_gui_title = tpt_tran_repo.
813
      IF ls_tran-dypno IS INITIAL.
814
        ls_tran-dypno = '1000'.
815
      ENDIF.
816
      IF ls_tstc-cinfo O lc_hex_rpv AND NOT l_param IS INITIAL.
817
        ls_tran-repo_vari = l_param.
818
      ENDIF.
819
    ELSEIF ls_tstc-cinfo O lc_hex_obj.   "object transaction
820
      ls_tran-ttype = gc_tcode_object.
821
      l_gui_title = tpt_tran_obj.
822
      IF ls_tran-def_call_tcode = lc_oo_tcode.
823
        ls_tran-trframe = abap_true.
824
      ENDIF.
825
    ELSEIF ls_tstc-cinfo O lc_hex_par.   "parameter transaction
826
      ls_tran-ttype = gc_tcode_parameter.
827
      l_gui_title = tpt_tran_param.
828
      IF NOT l_param IS INITIAL
829
      AND l_param(1) = '@'.                 "variant transaction
830
        ls_tran-ttype = gc_tcode_variant.
831
        l_gui_title = tpt_tran_vari.
832
      ELSEIF ls_tran-def_call_tcode = lc_oo_tcode.
833
        "object transaction
834
        ls_tran-ttype = gc_tcode_object.
835
        l_gui_title = tpt_tran_obj.
836
        ls_tran-trframe = abap_true.
837
      ENDIF.
838
    ELSEIF ls_tstc-cinfo O lc_hex_men.   "menue
839
    ELSE.                                   "dialog transaction
840
      ls_tran-ttype = gc_tcode_dialog.
841
      l_gui_title = tpt_tran_dialog.
842
    ENDIF.
843
 
844
    IF NOT ls_tran-def_call_tcode IS INITIAL
845
    AND ( ls_tstcc IS INITIAL OR ls_tstcc = l_tcode )
846
    AND ls_tran-ttype <> gc_tcode_object.
847
      ls_tran-clf_inhe = abap_true.
848
      SELECT SINGLE * FROM tstcc INTO ls_tstcc
849
          WHERE tcode = ls_tran-def_call_tcode.
850
      IF ls_tstcc-s_webgui = '2'.
851
        ls_tran-clf_ewt = abap_true.
852
        ls_tran-clf_profi = abap_false.
853
      ELSE.
854
        ls_tran-clf_ewt = abap_false.
855
        ls_tran-clf_profi = abap_true.
856
      ENDIF.
857
      ASSIGN COMPONENT 'S_PERVAS' OF STRUCTURE ls_tstcc TO <l_pervas>.
858
      IF <l_pervas> IS ASSIGNED.
859
        ls_tran-clf_pervas = <l_pervas>.
860
        UNASSIGN <l_pervas>.
861
      ENDIF.
862
      ls_tran-clf_service = ls_tstcc-s_service.
863
    ENDIF.
864
 
865
*Default values for
866
    CLEAR ls_ti.
867
    ls_ti-name = txt_transaction.
868
    ls_ti-value = ls_tran-def_call_tcode.
869
    ls_ti-input = abap_true.
870
    APPEND ls_ti TO lt_defval.
871
    CLEAR ls_ti.
872
    ls_ti-name = txt_skip_initial_screen.
873
    ls_ti-value = ls_tran-def_skip_1.
874
    ls_ti-flag = abap_true.
875
    APPEND ls_ti TO lt_defval.
876
    CLEAR ls_ti.
877
    ls_ti-name = txt_screen.
878
    ls_ti-value = ls_tran-dypno.
879
    ls_ti-input = abap_true.
880
    ls_ti-has_value_ext = abap_true.
881
    ls_ti-value_ext_space = abap_true.
882
    APPEND ls_ti TO lt_defval.
883
    CLEAR ls_ti.
884
    ls_ti-name = txt_from_module_pool.
885
    ls_ti-value = ls_tran-pgmna.
886
    ls_ti-input = abap_true.
887
    APPEND ls_ti TO lt_defval.
888
*GUI support
889
    CLEAR ls_ti.
890
    ls_ti-name = txt_sapgui_for_html.
891
    ls_ti-flag = abap_true.
892
    IF NOT ls_tstcc-s_webgui IS INITIAL.
893
      ls_ti-value = abap_true.
894
    ENDIF.
895
    APPEND ls_ti TO lt_gui_support.
896
    CLEAR ls_ti.
897
    ls_ti-name = txt_sapgui_for_java.
898
    ls_ti-flag = abap_true.
899
    ls_ti-value = ls_tstcc-s_platin.
900
    APPEND ls_ti TO lt_gui_support.
901
    CLEAR ls_ti.
902
    ls_ti-name = txt_sapgui_for_windows.
903
    ls_ti-flag = abap_true.
904
    ls_ti-value = ls_tstcc-s_win32.
905
    APPEND ls_ti TO lt_gui_support.
906
 
907
*** HTML
908
    PERFORM html_main_header
909
      USING
910
        l_gui_title
911
        txt_transaction_code
912
        <ls_ztadir>-obj_name
913
        space
914
        txt_package
915
        <ls_ztadir>-devclass
916
        'makeDivSize(''TRANSACTION'');'
917
        lt_tabstrip
918
        gt_link
919
      CHANGING
920
        lt_html.
921
*Transaction
922
    PERFORM html_add_transaction
923
      USING
924
        ls_tran
925
        lt_tstca
926
        lt_defval
927
        lt_gui_support
928
        lt_para
929
        'TRANSACTION'
930
        abap_true
931
      CHANGING
932
        lt_html.
933
*
934
    PERFORM html_main_footer
935
      USING
936
        lt_html.
937
 
938
    PERFORM download
939
      USING
940
        lt_html
941
        <ls_ztadir>-pgmid
942
        <ls_ztadir>-object
943
        <ls_ztadir>-obj_name
944
        gc_extension_htm
945
        abap_true.
946
    <ls_ztadir>-downloaded = abap_true.
947
  ENDLOOP.
948
ENDFORM.                                                    "r3tr_tran