1 REPORT y4_b4_test18 NO STANDARD PAGE HEADING LINE-SIZE 255.
2
3 TABLES : tstc, "SAP Transaction Codes(SAP 事务代码)
4 tadir, "Directory of Repository Objects(资源库对象的目录)
5 modsapt, "SAP Enhancements - Short Texts(SAP增强-短文件)
6 sxs_attrt,"Exit: Definition side: Attributes, Text table
7 modact, "Modifications(修正)
8 trdir, "System table TRDIR(系统表 TRDIR)
9 tfdir, "Function Module(功能模块)
10 enlfdir, "Additional Attributes for Function Modules(功能模块的附加属性)
11 tstct. "Transaction Code Texts(事务代码文本)
12
13 DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE. "SMOD
14 DATA : itab LIKE tadir OCCURS 0 WITH HEADER LINE. "SE18-BADI
15 DATA : ktab LIKE tadir OCCURS 0 WITH HEADER LINE. "Enhancement implementation-ENHO
16 DATA : ltab LIKE tadir OCCURS 0 WITH HEADER LINE. "Enhancement Spot-ENHS
17 DATA : mtab LIKE tadir OCCURS 0 WITH HEADER LINE. "Composite Enhancement implementation-ENHC
18 DATA : field1(30).
19 DATA : v_devclass LIKE tadir-devclass.
20 DATA : t_count LIKE sy-tfill.
21 DATA: bdcdata_wa TYPE bdcdata,
22 bdcdata_tab TYPE TABLE OF bdcdata.
23
24 DATA opt TYPE ctu_params.
25
26 SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE TEXT-001.
27 SELECTION-SCREEN SKIP.
28 PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
29 SELECTION-SCREEN SKIP.
30 SELECTION-SCREEN END OF BLOCK a01.
31
32 START-OF-SELECTION.
33 CLEAR: itab,jtab.
34 REFRESH:itab,jtab.
35 SELECT SINGLE * FROM tstc WHERE tcode EQ p_tcode.
36 IF sy-subrc EQ 0.
37 SELECT SINGLE * FROM tadir
38 WHERE pgmid = 'R3TR'
39 AND object = 'PROG'
40 AND obj_name = tstc-pgmna.
41
42 MOVE : tadir-devclass TO v_devclass.
43 IF sy-subrc NE 0.
44 SELECT SINGLE * FROM trdir
45 WHERE name = tstc-pgmna.
46 IF trdir-subc EQ 'F'.
47 SELECT SINGLE * FROM tfdir
48 WHERE pname = tstc-pgmna.
49 SELECT SINGLE * FROM enlfdir
50 WHERE funcname = tfdir-funcname.
51 SELECT SINGLE * FROM tadir
52 WHERE pgmid = 'R3TR'
53 AND object = 'FUGR'
54 AND obj_name = enlfdir-area.
55 MOVE : tadir-devclass TO v_devclass.
56 ENDIF.
57 ENDIF.
58
59 SELECT * FROM tadir
60 INTO TABLE jtab
61 WHERE pgmid = 'R3TR'
62 AND object = 'SMOD'
63 AND devclass = v_devclass.
64 SELECT * FROM tadir
65 INTO TABLE itab
66 WHERE pgmid = 'R3TR'
67 AND object = 'SXSD'
68 AND devclass = v_devclass.
69 SELECT * FROM tadir
70 INTO TABLE ktab
71 WHERE pgmid = 'R3TR'
72 AND object = 'ENHO'
73 AND devclass = v_devclass.
74 SELECT * FROM tadir
75 INTO TABLE ltab
76 WHERE pgmid = 'R3TR'
77 AND object = 'ENHS'
78 AND devclass = v_devclass.
79 SELECT * FROM tadir
80 INTO TABLE mtab
81 WHERE pgmid = 'R3TR'
82 AND object = 'ENHC'
83 AND devclass = v_devclass.
84
85 SELECT SINGLE * FROM tstct
86 WHERE sprsl EQ sy-langu
87 AND tcode EQ p_tcode.
88
89 FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
90 WRITE:/(12) '事务代码 - ',
91 13(20) p_tcode,
92 34(10) '功能 - ' ,
93 45(50) tstct-ttext.
94 SKIP.
95 IF NOT jtab[] IS INITIAL.
96 WRITE:/(117) sy-uline.
97 FORMAT COLOR COL_HEADING INTENSIFIED ON.
98 WRITE:/1 sy-vline,
99 2 'Exit Name',
100 43 sy-vline ,
101 44 'Description',
102 117 sy-vline.
103 WRITE:/(117) sy-uline.
104
105 LOOP AT jtab.
106 CLEAR modsapt.
107 SELECT SINGLE * FROM modsapt
108 WHERE sprsl = sy-langu AND
109 name = jtab-obj_name.
110 FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
111 WRITE:/1 sy-vline,
112 2 jtab-obj_name HOTSPOT ON,
113 43 sy-vline ,
114 44 modsapt-modtext,
115 117 sy-vline.
116 ENDLOOP.
117 WRITE:/(117) sy-uline.
118 FORMAT COLOR COL_HEADING INTENSIFIED ON.
119 WRITE:/1 sy-vline,
120 2 'Badi Name(definition)',
121 43 sy-vline ,
122 44 'Description',
123 117 sy-vline.
124 WRITE:/(117) sy-uline.
125 LOOP AT itab.
126 CLEAR sxs_attrt.
127 SELECT SINGLE * FROM sxs_attrt
128 WHERE sprsl = sy-langu AND
129 exit_name = itab-obj_name.
130 FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
131 WRITE:/1 sy-vline,
132 2 itab-obj_name HOTSPOT ON,
133 43 sy-vline ,
134 44 sxs_attrt-text,
135 117 sy-vline.
136 ENDLOOP.
137
138 WRITE:/(117) sy-uline.
139 FORMAT COLOR COL_HEADING INTENSIFIED ON.
140 WRITE:/1 sy-vline,
141 2 'Enhancement Implementation',
142 43 sy-vline ,
143 44 'Description',
144 117 sy-vline.
145 WRITE:/(117) sy-uline.
146 LOOP AT ktab.
147 CLEAR sxs_attrt.
148 SELECT SINGLE * FROM sxs_attrt
149 WHERE sprsl = sy-langu AND
150 exit_name = ktab-obj_name.
151 FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
152 WRITE:/1 sy-vline,
153 2 ktab-obj_name HOTSPOT ON,
154 43 sy-vline ,
155 44 sxs_attrt-text,
156 117 sy-vline.
157 ENDLOOP.
158
159 WRITE:/(117) sy-uline.
160 FORMAT COLOR COL_HEADING INTENSIFIED ON.
161 WRITE:/1 sy-vline,
162 2 'Enhancement Spot',
163 43 sy-vline ,
164 44 'Description',
165 117 sy-vline.
166 WRITE:/(117) sy-uline.
167 LOOP AT ltab.
168 CLEAR sxs_attrt.
169 SELECT SINGLE * FROM sxs_attrt
170 WHERE sprsl = sy-langu AND
171 exit_name = ltab-obj_name.
172 FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
173 WRITE:/1 sy-vline,
174 2 ltab-obj_name HOTSPOT ON,
175 43 sy-vline ,
176 44 sxs_attrt-text,
177 117 sy-vline.
178 ENDLOOP.
179
180 WRITE:/(117) sy-uline.
181 FORMAT COLOR COL_HEADING INTENSIFIED ON.
182 WRITE:/1 sy-vline,
183 2 'Composite Enhancement Implementation',
184 43 sy-vline ,
185 44 'Description',
186 117 sy-vline.
187 WRITE:/(117) sy-uline.
188 LOOP AT mtab.
189 CLEAR sxs_attrt.
190 SELECT SINGLE * FROM sxs_attrt
191 WHERE sprsl = sy-langu AND
192 exit_name = mtab-obj_name.
193 FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
194 WRITE:/1 sy-vline,
195 2 mtab-obj_name HOTSPOT ON,
196 43 sy-vline ,
197 44 sxs_attrt-text,
198 117 sy-vline.
199 ENDLOOP.
200
201 WRITE:/(117) sy-uline.
202 CLEAR t_count.
203 DESCRIBE TABLE jtab.
204 t_count = sy-tfill.
205 DESCRIBE TABLE itab.
206 t_count = t_count + sy-tfill.
207 DESCRIBE TABLE ktab.
208 t_count = t_count + sy-tfill.
209 DESCRIBE TABLE ltab.
210 t_count = t_count + sy-tfill.
211 DESCRIBE TABLE mtab.
212 t_count = t_count + sy-tfill.
213
214 SKIP.
215 FORMAT COLOR COL_TOTAL INTENSIFIED ON.
216 WRITE:/ '用户出口数量:' , t_count.
217 ELSE.
218 FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
219 WRITE:/(95) '此TCode没有用户出口!'.
220 ENDIF.
221 ELSE.
222 FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
223 WRITE:/(95) '事务代码不存在!'.
224 ENDIF.
225
226 AT LINE-SELECTION.
227 GET CURSOR FIELD field1.
228 IF field1(4) EQ 'JTAB'.
229 SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
230 CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
231 ELSEIF field1(4) EQ 'ITAB'.
232 * SET PARAMETER ID 'EXN' FIELD sy-lisel+1(40).
233 * CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
234 CLEAR bdcdata_wa.
235 bdcdata_wa-program = 'SAPLSEXO'.
236 bdcdata_wa-dynpro = '0100'.
237 bdcdata_wa-dynbegin = 'X'.
238 APPEND bdcdata_wa TO bdcdata_tab.
239
240 CLEAR bdcdata_wa.
241 bdcdata_wa-fnam = 'BDC_CURSOR'.
242 bdcdata_wa-fval = 'G_ENHSPOTNAME'.
243 APPEND bdcdata_wa TO bdcdata_tab.
244
245 CLEAR bdcdata_wa.
246 bdcdata_wa-fnam = 'G_IS_BADI'.
247 bdcdata_wa-fval = 'X'.
248 APPEND bdcdata_wa TO bdcdata_tab.
249
250 CLEAR bdcdata_wa.
251 bdcdata_wa-fnam = 'BDC_OKCODE'.
252 bdcdata_wa-fval = '=ISSPOT'.
253 APPEND bdcdata_wa TO bdcdata_tab.
254
255 CLEAR bdcdata_wa.
256 bdcdata_wa-program = 'SAPLSEXO'.
257 bdcdata_wa-dynpro = '0100'.
258 bdcdata_wa-dynbegin = 'X'.
259 APPEND bdcdata_wa TO bdcdata_tab.
260
261 CLEAR bdcdata_wa.
262 bdcdata_wa-fnam = 'BDC_CURSOR'.
263 bdcdata_wa-fval = 'G_BADINAME'.
264 APPEND bdcdata_wa TO bdcdata_tab.
265 CLEAR bdcdata_wa.
266
267 bdcdata_wa-fnam = 'G_BADINAME'.
268 bdcdata_wa-fval = sy-lisel+1(40).
269 APPEND bdcdata_wa TO bdcdata_tab.
270
271 opt-dismode = 'E'.
272 opt-defsize = 'X'.
273
274 CALL TRANSACTION 'SE18' USING bdcdata_tab OPTIONS FROM opt.
275 REFRESH bdcdata_tab.
276 ELSEIF field1(4) EQ 'KTAB'.
277 * SET PARAMETER ID 'IMN_BADI' FIELD sy-lisel+1(40).
278 * CALL TRANSACTION 'SE19' AND SKIP FIRST SCREEN.
279 CLEAR bdcdata_wa.
280 bdcdata_wa-program = 'SAPLENHANCEMENTS'.
281 bdcdata_wa-dynpro = '0100'.
282 bdcdata_wa-dynbegin = 'X'.
283 APPEND bdcdata_wa TO bdcdata_tab.
284
285 CLEAR bdcdata_wa.
286 bdcdata_wa-fnam = 'BDC_CURSOR'.
287 bdcdata_wa-fval = 'RSEUX-CXH_VALUE'.
288 APPEND bdcdata_wa TO bdcdata_tab.
289
290 CLEAR bdcdata_wa.
291 bdcdata_wa-fnam = 'RSEUX-CXH'.
292 bdcdata_wa-fval = 'X'.
293 APPEND bdcdata_wa TO bdcdata_tab.
294
295 CLEAR bdcdata_wa.
296 bdcdata_wa-fnam = 'RSEUX-CXH_VALUE'.
297 bdcdata_wa-fval = sy-lisel+1(40).
298 APPEND bdcdata_wa TO bdcdata_tab.
299
300 * CLEAR bdcdata_wa.
301 * bdcdata_wa-fnam = 'BDC_OKCODE'.
302 * bdcdata_wa-fval = '/00'.
303 * APPEND bdcdata_wa TO bdcdata_tab.
304
305 opt-dismode = 'E'.
306 opt-defsize = 'X'.
307
308 CALL TRANSACTION 'SE20' USING bdcdata_tab OPTIONS FROM opt.
309 REFRESH bdcdata_tab.
310 ELSEIF field1(4) EQ 'LTAB'.
311 * SET PARAMETER ID 'ENHSPOT' FIELD sy-lisel+1(40).
312 * CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
313 CLEAR bdcdata_wa.
314 bdcdata_wa-program = 'SAPLENHANCEMENTS'.
315 bdcdata_wa-dynpro = '0100'.
316 bdcdata_wa-dynbegin = 'X'.
317 APPEND bdcdata_wa TO bdcdata_tab.
318
319 CLEAR bdcdata_wa.
320 bdcdata_wa-fnam = 'BDC_CURSOR'.
321 bdcdata_wa-fval = 'RSEUX-C_XS_VALUE'.
322 APPEND bdcdata_wa TO bdcdata_tab.
323
324 CLEAR bdcdata_wa.
325 bdcdata_wa-fnam = 'RSEUX-C_XS'.
326 bdcdata_wa-fval = 'X'.
327 APPEND bdcdata_wa TO bdcdata_tab.
328
329 CLEAR bdcdata_wa.
330 bdcdata_wa-fnam = 'RSEUX-C_XS_VALUE'.
331 bdcdata_wa-fval = sy-lisel+1(40).
332 APPEND bdcdata_wa TO bdcdata_tab.
333
334 * CLEAR bdcdata_wa.
335 * bdcdata_wa-fnam = 'BDC_OKCODE'.
336 * bdcdata_wa-fval = '/00'.
337 * APPEND bdcdata_wa TO bdcdata_tab.
338
339 opt-dismode = 'E'.
340 opt-defsize = 'X'.
341
342 CALL TRANSACTION 'SE20' USING bdcdata_tab OPTIONS FROM opt.
343 REFRESH bdcdata_tab.
344 ELSEIF field1(4) EQ 'MTAB'.
345 * SET PARAMETER ID 'IMN_BADI' FIELD sy-lisel+1(40).
346 CLEAR bdcdata_wa.
347 bdcdata_wa-program = 'SAPLENHANCEMENTS'.
348 bdcdata_wa-dynpro = '0100'.
349 bdcdata_wa-dynbegin = 'X'.
350 APPEND bdcdata_wa TO bdcdata_tab.
351
352 CLEAR bdcdata_wa.
353 bdcdata_wa-fnam = 'BDC_CURSOR'.
354 bdcdata_wa-fval = 'RSEUX-CXT_VALUE'.
355 APPEND bdcdata_wa TO bdcdata_tab.
356
357 CLEAR bdcdata_wa.
358 bdcdata_wa-fnam = 'RSEUX-CXT'.
359 bdcdata_wa-fval = 'X'.
360 APPEND bdcdata_wa TO bdcdata_tab.
361
362 CLEAR bdcdata_wa.
363 bdcdata_wa-fnam = 'RSEUX-CXT_VALUE'.
364 bdcdata_wa-fval = sy-lisel+1(40).
365 APPEND bdcdata_wa TO bdcdata_tab.
366
367 CLEAR bdcdata_wa.
368 bdcdata_wa-fnam = 'BDC_OKCODE'.
369 bdcdata_wa-fval = '/00'.
370 APPEND bdcdata_wa TO bdcdata_tab.
371
372 opt-dismode = 'E'.
373 opt-defsize = 'X'.
374
375 CALL TRANSACTION 'SE20' USING bdcdata_tab OPTIONS FROM opt.
376 REFRESH bdcdata_tab.
377 ENDIF.