Properties SourceCde
txt
1
*&---------------------------------------------------------------------*
2
*&  Include           ZDB_DOWNLOAD_DO                                  *
3
*&                                                                     *
4
*&---------------------------------------------------------------------*
5
*&                                                                     *
6
*& This file is part of ZDB.                                           *
7
*&                                                                     *
8
*& ZDB_DOWNLOAD is free software: you can redistribute it and/or       *
9
*& modify it under the terms of the GNU General Public License as      *
10
*& published by the Free Software Foundation, either version 3 of the  *
11
*& License, or any later version.                                      *
12
*&                                                                     *
13
*& ZDB_DOWNLOAD 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
* form: download
31
*-----------------------------------------------------------------------
32
FORM download USING
33
                value(i_pack)
34
                value(i_tabname)
35
                value(i_extension)
36
                it_string TYPE it_string.
37
 
38
  DATA:
39
  l_infoline(80),
40
  l_uri TYPE string.
41
 
42
  PERFORM getfilename USING i_pack i_tabname i_extension
43
                      CHANGING l_uri.
44
 
45
  CALL FUNCTION 'GUI_DOWNLOAD'
46
    EXPORTING
47
      filename = l_uri
48
    TABLES
49
      data_tab = it_string
50
    EXCEPTIONS
51
      OTHERS   = 1.
52
 
53
  IF sy-subrc <> 0.
54
    CONCATENATE i_tabname '.' i_extension
55
      INTO l_infoline.
56
    CONCATENATE
57
      text-010 l_infoline
58
      INTO l_infoline SEPARATED BY space.
59
    WRITE: l_infoline, sy-subrc.
60
  ENDIF.
61
 
62
ENDFORM.                    "download
63
 
64
 
65
*-----------------------------------------------------------------------
66
* form: getFilename
67
*-----------------------------------------------------------------------
68
FORM getfilename USING
69
                   value(i_pack)
70
                   value(i_tabname)
71
                   value(i_extension)
72
                 CHANGING
73
                   c_uri TYPE string.
74
 
75
  DATA:
76
  f_infoline(80),
77
  f_delimiter TYPE string VALUE '\',
78
  f_dbl_delimiter TYPE string VALUE '\\'.
79
 
80
  CONCATENATE i_tabname '.' i_extension
81
    INTO f_infoline.
82
  CONCATENATE
83
      text-009 f_infoline
84
      INTO f_infoline SEPARATED BY space.
85
 
86
  CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
87
    EXPORTING
88
      text = f_infoline.
89
 
90
  CONCATENATE
91
      g_folder
92
      f_delimiter i_pack
93
      f_delimiter 'R3TR_TABL'
94
      f_delimiter i_tabname
95
      '.' i_extension
96
      INTO c_uri.
97
  PERFORM replace_all
98
    USING '/' f_delimiter
99
    CHANGING c_uri.
100
  WHILE c_uri CS f_dbl_delimiter.
101
    PERFORM replace_all
102
      USING f_dbl_delimiter f_delimiter
103
      CHANGING c_uri.
104
  ENDWHILE.
105
 
106
ENDFORM.                    "getFilename