Properties SourceCde
txt
1
*&---------------------------------------------------------------------*
2
*&  Include           ZSOFTCOPY__TRY_UNKNOWN                           *
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
* try_create_src_no_includes
31
*-----------------------------------------------------------------------
32
FORM try_create_src_no_includes
33
  USING
34
    it_src TYPE it_string
35
    value(i_src_name)
36
    value(i_progname)
37
  CHANGING
38
    ct_src_no_includes TYPE it_string.
39
 
40
  DATA:
41
  lt_abap TYPE abapsource OCCURS 0,
42
  lt_abap_no_includes TYPE abapsource OCCURS 0,
43
  ls_abap LIKE LINE OF lt_abap,
44
  ls_src TYPE string.
45
 
46
  REFRESH ct_src_no_includes.
47
 
48
  LOOP AT it_src INTO ls_src.
49
    ls_abap-line = ls_src.
50
    APPEND ls_abap TO lt_abap.
51
  ENDLOOP.
52
 
53
  CALL FUNCTION 'CREATE_SOURCE_WITHOUT_INCLUDES'
54
    EXPORTING
55
      source_i         = lt_abap
56
      source_name      = i_src_name
57
      global_check     = abap_true
58
      global_program   = i_progname
59
      replacing_source = space
60
    IMPORTING
61
      source_o         = lt_abap_no_includes
62
    EXCEPTIONS
63
      OTHERS           = 1.
64
 
65
  LOOP AT lt_abap_no_includes INTO ls_abap.
66
    ls_src = ls_abap-line.
67
    APPEND ls_src TO ct_src_no_includes.
68
  ENDLOOP.
69
ENDFORM.                    "try_create_src_no_includes
70
 
71
 
72
*-----------------------------------------------------------------------
73
* try_read_report
74
*-----------------------------------------------------------------------
75
FORM try_read_report
76
  USING
77
    value(i_progname)
78
  CHANGING
79
    ct_src TYPE it_string.
80
 
81
  TYPES:
82
  t_abap(72) TYPE c.
83
 
84
  DATA:
85
  lt_abap TYPE STANDARD TABLE OF t_abap WITH HEADER LINE,
86
  ls_abap TYPE t_abap,
87
  ls_src TYPE string.
88
 
89
  REFRESH ct_src.
90
 
91
  READ REPORT i_progname INTO lt_abap STATE 'A'.
92
  LOOP AT lt_abap INTO ls_abap.
93
    ls_src = ls_abap.
94
    APPEND ls_src TO ct_src.
95
  ENDLOOP.
96
ENDFORM.                    "try_read_report