ZIOIEXCEL
ZIOIEXCEL
ZIOIEXCEL
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
*----------------------------------------------------------------------*
*
INCLUDE ZIOIEXCEL
*
*----------------------------------------------------------------------*
* Instantiates the control framework using i_oi_document factory.
* Excapsulates SAP Office Integration specific functionality. Uses the
* i_oi_document_proxy class to create the document link then
* uses the i_oi_table collection for transporting SAP internal tables
* from the server to the client for display in the active document
* server.
INCLUDE <CTLDEF>.
"General Definitions For Controls (CET)
* Platform- and application-indep. Office integration
INCLUDE OFFICEINTEGRATIONINCLUDE.
CLASS COIEXCEL DEFINITION.
PUBLIC SECTION.
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
* Cleanup
METHOD DESTROY.
IF NOT H_TABLES IS INITIAL.
CALL METHOD H_TABLES->REMOVE_ALL_TABLES
IMPORTING RETCODE = S_RETCODE.
FREE H_TABLES.
ENDIF.
IF NOT H_FACTORY IS INITIAL.
CALL METHOD H_FACTORY->STOP_FACTORY.
FREE H_FACTORY.
ENDIF.
FREE H_DOCUMENT.
CALL FUNCTION 'CONTROL_EXIT'.
ENDMETHOD.
*
METHOD ON_CLOSE_DOCUMENT.
for event on_close_document of i_oi_document_proxy.
IF NOT H_DOCUMENT IS INITIAL.
CALL METHOD H_DOCUMENT->CLOSE_DOCUMENT
IMPORTING RETCODE = S_RETCODE.
CALL METHOD C_OI_ERRORS=>SHOW_MESSAGE
EXPORTING TYPE = 'E'.
ENDIF.
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
*
*
message id 'mo' type 'S' number '001' with 'Enter selection table.'.
ENDMETHOD.
METHOD CREATEDOCUMENT.
importing s_doctitle type c
exporting s_retcode type t_oi_ret_string.
IF NOT H_DOCUMENT IS INITIAL.
CALL METHOD H_DOCUMENT->CREATE_DOCUMENT
EXPORTING OPEN_INPLACE = ' '
DOCUMENT_TITLE = S_DOCTITLE
IMPORTING RETCODE = S_RETCODE.
CALL METHOD C_OI_ERRORS=>SHOW_MESSAGE EXPORTING TYPE = 'E'.
ENDIF.
ENDMETHOD.
METHOD TRANSFERTABLE.
importing s_tblname type c
exporting retcode type t_oi_ret_string
changing i_tab type table
IF H_TABLES IS INITIAL.
CALL METHOD H_FACTORY->GET_TABLE_COLLECTION
IMPORTING TABLE_COLLECTION = H_TABLES
RETCODE = S_RETCODE.
CALL METHOD C_OI_ERRORS=>SHOW_MESSAGE EXPORTING TYPE = 'E'.
ENDIF.
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
ENDMETHOD.
* Specific method for use in the ZBTableListGeneration program.
* Simplifies the dynamic program creation
METHOD LAUNCHSE16.
*
importing c_tblname type c
*
c_filepath type c
*
changing tbl_tab type table
CALL METHOD ME->TRANSFERTABLE
EXPORTING S_TABLENAME = C_TBLNAME
IMPORTING RETCODE = S_RETCODE
CHANGING I_TAB = TBL_TAB.
CALL METHOD ME->OPENDOCUMENT
EXPORTING FILEURL = C_FILEPATH.
ENDMETHOD.
ENDCLASS.
"COIEXCEL Implemetation