1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | FORM CHECK_LOCKABLE_OBJECT USING CLO_E071 STRUCTURE E071 |
10 | CLO_RETURN TYPE I. |
11 | DATA: CLO_TADIR LIKE TADIR, CLO_DDERR LIKE DDERR, |
12 | CLO_LOCKED(1) TYPE C, CLO_LOCKABLE(1) TYPE C, |
13 | CLO_EDITABLE(1) TYPE C, CLO_LOCK_TASK LIKE E071-TRKORR, |
14 | CLO_LOCK_USER LIKE SY-UNAME, CLO_LOCK_ORDER LIKE E071-TRKORR, |
15 | CLO_TRANSPORTABLE(1) TYPE C, CLO_ICORR LIKE E070-TRKORR, |
16 | CLO_TE071 LIKE KO200 OCCURS 0, CLO_TTADIR LIKE TADIR OCCURS 0, |
17 | CLO_TE071K LIKE E071K OCCURS 0. |
18 | |
19 | APPEND CLO_E071 TO CLO_TE071. |
20 | CALL FUNCTION 'TR_EDIT_CHECK_OBJECTS_KEYS' |
21 | EXPORTING |
22 | WI_ORDER = CLO_E071-TRKORR |
23 | WI_WITH_DIALOG = 'R' |
24 |
25 | WI_SEND_MESSAGE = ' ' |
26 | IMPORTING |
27 |
28 | WE_TASK = CLO_E071-TRKORR |
29 |
30 |
31 |
32 | TABLES |
33 | WT_E071 = CLO_TE071 |
34 | WT_E071K = CLO_TE071K |
35 | WT_TADIR = CLO_TTADIR |
36 | EXCEPTIONS |
37 | CANCEL_EDIT_APPEND_ERROR_KEYS = 1 |
38 | CANCEL_EDIT_APPEND_ERROR_OBJCT = 2 |
39 | CANCEL_EDIT_APPEND_ERROR_ORDER = 3 |
40 | CANCEL_EDIT_BUT_SE01 = 4 |
41 | CANCEL_EDIT_NO_HEADER_OBJECT = 5 |
42 | CANCEL_EDIT_NO_ORDER_SELECTED = 6 |
43 | CANCEL_EDIT_REPAIRED_OBJECT = 7 |
44 | CANCEL_EDIT_SYSTEM_ERROR = 8 |
45 | CANCEL_EDIT_TADIR_MISSING = 9 |
46 | CANCEL_EDIT_TADIR_UPDATE_ERROR = 10 |
47 | CANCEL_EDIT_UNKNOWN_DEVCLASS = 11 |
48 | CANCEL_EDIT_UNKNOWN_OBJECTTYPE = 12 |
49 | CANCEL_EDIT_NO_CHECK_CALL = 13 |
50 | CANCEL_EDIT_CATEGORY_MIXTURE = 14 |
51 | CANCEL_EDIT_USER_AFTER_ERROR = 15 |
52 | CANCEL_EDIT_CUSTOM_OBJ_AT_SAP = 16 |
53 | CANCEL_EDIT_ACCESS_DENIED = 17 |
54 | SHOW_ONLY_CLOSED_SYSTEM = 18 |
55 | SHOW_ONLY_CONSOLIDATION_LEVEL = 19 |
56 | SHOW_ONLY_DDIC_IN_CUSTOMER_SYS = 20 |
57 | SHOW_ONLY_DELIVERY_SYSTEM = 21 |
58 | SHOW_ONLY_DIFFERENT_ORDERTYPES = 22 |
59 | SHOW_ONLY_DIFFERENT_TASKTYPES = 23 |
60 | SHOW_ONLY_ENQUEUE_FAILED = 24 |
61 | SHOW_ONLY_GENERATED_OBJECT = 25 |
62 | SHOW_ONLY_ILL_LOCK = 26 |
63 | SHOW_ONLY_LOCK_ENQUEUE_FAILED = 27 |
64 | SHOW_ONLY_MIXED_ORDERS = 28 |
65 | SHOW_ONLY_MIX_LOCAL_TRANSP_OBJ = 29 |
66 | SHOW_ONLY_NO_SHARED_REPAIR = 30 |
67 | SHOW_ONLY_OBJECT_LOCKED = 31 |
68 | SHOW_ONLY_REPAIRED_OBJECT = 32 |
69 | SHOW_ONLY_SHOW_CLIENT = 33 |
70 | SHOW_ONLY_TADIR_MISSING = 34 |
71 | SHOW_ONLY_UNKNOWN_DEVCLASS = 35 |
72 | SHOW_ONLY_CLOSED_CLIENT = 36 |
73 | SHOW_ONLY_CLOSED_ALE_OBJECT = 37 |
74 | SHOW_ONLY_UNALLOWED_SUPERUSER = 38 |
75 | SHOW_ONLY_NO_REPAIR_SYSTEM = 39 |
76 | SHOW_ONLY_NO_LICENSE = 40 |
77 | SHOW_ONLY_CENTRAL_BASIS = 41 |
78 | SHOW_ONLY_USER_AFTER_ERROR = 42 |
79 | SHOW_ONLY_OBJECT_NOT_PATCHABLE = 43. |
80 | IF SY-SUBRC NE 0. |
81 | MESSAGE ID SY-MSGID TYPE 'I' NUMBER SY-MSGNO |
82 | WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. |
83 | IF SY-SUBRC LE 17. |
84 | CLO_RETURN = 8. EXIT. |
85 | ELSE. |
86 | CLO_RETURN = 4. <STATUS>-CORR_NBR = VIM_LOCKED_IN_CORR. EXIT. |
87 | ENDIF. |
88 | ELSE. |
89 | READ TABLE CLO_TE071 INTO CLO_E071 INDEX 1. |
90 | READ TABLE CLO_TTADIR INTO CLO_TADIR INDEX 1. |
91 | IF CLO_TADIR-DEVCLASS IS INITIAL. |
92 | CALL FUNCTION 'TR_EDIT_CHECK_OBJECTS_KEYS' |
93 | EXPORTING |
94 | WI_ORDER = CLO_E071-TRKORR |
95 | WI_WITH_DIALOG = 'X' |
96 |
97 | WI_SEND_MESSAGE = ' ' |
98 | IMPORTING |
99 |
100 | WE_TASK = CLO_E071-TRKORR |
101 |
102 |
103 |
104 | TABLES |
105 | WT_E071 = CLO_TE071 |
106 | WT_E071K = CLO_TE071K |
107 | WT_TADIR = CLO_TTADIR |
108 | EXCEPTIONS |
109 | CANCEL_EDIT_APPEND_ERROR_KEYS = 1 |
110 | CANCEL_EDIT_APPEND_ERROR_OBJCT = 2 |
111 | CANCEL_EDIT_APPEND_ERROR_ORDER = 3 |
112 | CANCEL_EDIT_BUT_SE01 = 4 |
113 | CANCEL_EDIT_NO_HEADER_OBJECT = 5 |
114 | CANCEL_EDIT_NO_ORDER_SELECTED = 6 |
115 | CANCEL_EDIT_REPAIRED_OBJECT = 7 |
116 | CANCEL_EDIT_SYSTEM_ERROR = 8 |
117 | CANCEL_EDIT_TADIR_MISSING = 9 |
118 | CANCEL_EDIT_TADIR_UPDATE_ERROR = 10 |
119 | CANCEL_EDIT_UNKNOWN_DEVCLASS = 11 |
120 | CANCEL_EDIT_UNKNOWN_OBJECTTYPE = 12 |
121 | CANCEL_EDIT_NO_CHECK_CALL = 13 |
122 | CANCEL_EDIT_CATEGORY_MIXTURE = 14 |
123 | CANCEL_EDIT_USER_AFTER_ERROR = 15 |
124 | CANCEL_EDIT_CUSTOM_OBJ_AT_SAP = 16 |
125 | CANCEL_EDIT_ACCESS_DENIED = 17 |
126 | SHOW_ONLY_CLOSED_SYSTEM = 18 |
127 | SHOW_ONLY_CONSOLIDATION_LEVEL = 19 |
128 | SHOW_ONLY_DDIC_IN_CUSTOMER_SYS = 20 |
129 | SHOW_ONLY_DELIVERY_SYSTEM = 21 |
130 | SHOW_ONLY_DIFFERENT_ORDERTYPES = 22 |
131 | SHOW_ONLY_DIFFERENT_TASKTYPES = 23 |
132 | SHOW_ONLY_ENQUEUE_FAILED = 24 |
133 | SHOW_ONLY_GENERATED_OBJECT = 25 |
134 | SHOW_ONLY_ILL_LOCK = 26 |
135 | SHOW_ONLY_LOCK_ENQUEUE_FAILED = 27 |
136 | SHOW_ONLY_MIXED_ORDERS = 28 |
137 | SHOW_ONLY_MIX_LOCAL_TRANSP_OBJ = 29 |
138 | SHOW_ONLY_NO_SHARED_REPAIR = 30 |
139 | SHOW_ONLY_OBJECT_LOCKED = 31 |
140 | SHOW_ONLY_REPAIRED_OBJECT = 32 |
141 | SHOW_ONLY_SHOW_CLIENT = 33 |
142 | SHOW_ONLY_TADIR_MISSING = 34 |
143 | SHOW_ONLY_UNKNOWN_DEVCLASS = 35 |
144 | SHOW_ONLY_CLOSED_CLIENT = 36 |
145 | SHOW_ONLY_CLOSED_ALE_OBJECT = 37 |
146 | SHOW_ONLY_UNALLOWED_SUPERUSER = 38 |
147 | SHOW_ONLY_NO_REPAIR_SYSTEM = 39 |
148 | SHOW_ONLY_NO_LICENSE = 40 |
149 | SHOW_ONLY_CENTRAL_BASIS = 41 |
150 | SHOW_ONLY_USER_AFTER_ERROR = 42 |
151 | SHOW_ONLY_OBJECT_NOT_PATCHABLE = 43. |
152 | IF SY-SUBRC NE 0. |
153 | MESSAGE ID SY-MSGID TYPE 'I' NUMBER SY-MSGNO |
154 | WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. |
155 | IF SY-SUBRC LE 17. |
156 | CLO_RETURN = 8. EXIT. |
157 | ELSE. |
158 | CLO_RETURN = 4. <STATUS>-CORR_NBR = VIM_LOCKED_IN_CORR. EXIT. |
159 | ENDIF. |
160 | ELSE. |
161 | READ TABLE CLO_TE071 INTO CLO_E071 INDEX 1. |
162 | READ TABLE CLO_TTADIR INTO CLO_TADIR INDEX 1. |
163 | ENDIF. |
164 | ENDIF. |
165 | ENDIF. |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 | IF CLO_TADIR IS INITIAL. "may be no lockable object? |
255 | CALL FUNCTION 'TR_CHECK_OBJECT_LOCK' |
256 | EXPORTING |
257 | WI_OBJECT = CLO_E071-OBJECT |
258 | WI_OBJNAME = CLO_E071-OBJ_NAME |
259 | WI_PGMID = CLO_E071-PGMID |
260 | IMPORTING |
261 | WE_LOCKABLE_OBJECT = CLO_LOCKABLE |
262 | WE_LOCKED = CLO_LOCKED |
263 | WE_LOCK_TASK = CLO_LOCK_TASK |
264 | WE_LOCK_TASK_USER = CLO_LOCK_USER |
265 | WE_LOCK_ORDER = CLO_LOCK_ORDER |
266 | WE_OBJECT_EDITABLE = CLO_EDITABLE |
267 |
268 | WE_POSSIBLE_USER_EDIT_TASK = CLO_ICORR |
269 | EXCEPTIONS |
270 | EMPTY_KEY = 01 |
271 | NO_SYSTEMNAME = 02 |
272 | NO_SYSTEMTYPE = 03 |
273 | UNALLOWED_LOCK_ORDER = 04. |
274 | IF SY-SUBRC NE 0. |
275 | MESSAGE I095(SV) WITH E071-TRKORR. "Systemfehler |
276 |
277 | CLO_RETURN = 8. EXIT. |
278 | ENDIF. |
279 | IF CLO_LOCKABLE EQ SPACE. "yes no lockable object |
280 | VIM_CORR_OBJTAB-LOCKABLE = SPACE. |
281 | MODIFY VIM_CORR_OBJTAB. |
282 | EXIT. |
283 | ELSE. "inconsistent object. |
284 | MESSAGE I095(SV) WITH E071-TRKORR. "Systemfehler |
285 | CLO_RETURN = 8. EXIT. |
286 | ENDIF. |
287 | ENDIF. "clo_tadir is initial |
288 | CALL FUNCTION 'VIEW_GET_DEVCLASS_STATE' |
289 | EXPORTING |
290 | DEV_CLASS = CLO_TADIR-DEVCLASS |
291 | IMPORTING |
292 | TRANSPORT_POSSIBLE = CLO_TRANSPORTABLE |
293 | EXCEPTIONS |
294 | NOT_FOUND = 01. |
295 | IF CLO_TRANSPORTABLE EQ SPACE. "local object -> no transport |
296 | X_HEADER-FLAG = VIM_TRANSPORT_DENIED. |
297 | MODIFY X_HEADER INDEX 1. |
298 | ELSE. |
299 |
300 | IF VIM_LAST_SOURCE_SYSTEM EQ SPACE. |
301 | VIM_LAST_SOURCE_SYSTEM = CLO_TADIR-SRCSYSTEM. |
302 | ELSE. |
303 | IF CLO_TADIR-SRCSYSTEM EQ SY-SYSID. "if one object has sy-sysid |
304 | IF VIM_LAST_SOURCE_SYSTEM NE SY-SYSID."all objs must have sy-sys |
305 | MESSAGE I134(SV). "Inkonsistenz in Objektdefinition, nur Anzei |
306 |
307 |
308 | CLO_RETURN = 4. <STATUS>-CORR_NBR = VIM_LOCKED_IN_CORR. EXIT. |
309 | ENDIF. |
310 | ELSE. "if one object has another source system, all objects must |
311 | IF VIM_LAST_SOURCE_SYSTEM EQ SY-SYSID. "another source system |
312 | MESSAGE I134(SV). "Inkonsistenz in Objektdefinition, nur Anzei |
313 |
314 |
315 | CLO_RETURN = 4. <STATUS>-CORR_NBR = VIM_LOCKED_IN_CORR. EXIT. |
316 | ENDIF. |
317 | ENDIF. |
318 | ENDIF. |
319 | CALL FUNCTION 'TR_CHECK_OBJECT_LOCK' |
320 | EXPORTING |
321 | WI_OBJECT = CLO_E071-OBJECT |
322 | WI_OBJNAME = CLO_E071-OBJ_NAME |
323 | WI_PGMID = CLO_E071-PGMID |
324 | IMPORTING |
325 | WE_LOCKABLE_OBJECT = CLO_LOCKABLE |
326 | WE_LOCKED = CLO_LOCKED |
327 | WE_LOCK_TASK = CLO_LOCK_TASK |
328 | WE_LOCK_TASK_USER = CLO_LOCK_USER |
329 | WE_LOCK_ORDER = CLO_LOCK_ORDER |
330 | WE_OBJECT_EDITABLE = CLO_EDITABLE |
331 |
332 | WE_POSSIBLE_USER_EDIT_TASK = CLO_ICORR |
333 | EXCEPTIONS |
334 | EMPTY_KEY = 01 |
335 | NO_SYSTEMNAME = 02 |
336 | NO_SYSTEMTYPE = 03 |
337 | UNALLOWED_LOCK_ORDER = 04. |
338 | IF SY-SUBRC NE 0. |
339 | MESSAGE I095(SV) WITH E071-TRKORR. "Systemfehler |
340 |
341 | CLO_RETURN = 8. EXIT. |
342 | ENDIF. |
343 | IF CLO_LOCKABLE EQ SPACE. |
344 | VIM_CORR_OBJTAB-LOCKABLE = SPACE. |
345 | MODIFY VIM_CORR_OBJTAB. |
346 | EXIT. |
347 | ENDIF. |
348 | IF CLO_LOCKED NE SPACE. |
349 | IF CLO_EDITABLE EQ SPACE. |
350 | MESSAGE I132(SV) WITH CLO_LOCK_TASK CLO_LOCK_USER. |
351 |
352 |
353 | CLO_RETURN = 4. <STATUS>-CORR_NBR = VIM_LOCKED_IN_CORR. EXIT. |
354 | ELSE. |
355 |
356 | CLO_E071-TRKORR = CLO_ICORR. "4.0 Namespace |
357 | ENDIF. |
358 | ENDIF. "clo_locked |
359 | ENDIF. "devclass |
360 | IF <STATUS>-CORR_NBR NE SPACE AND CLO_E071-TRKORR NE SPACE. |
361 | IF CLO_E071-TRKORR NE <STATUS>-CORR_NBR. |
362 | IF <STATUS>-ORDER_NBR NE CLO_LOCK_ORDER. |
363 | MESSAGE I129(SV). "Zusammengehörige Objekte in verschied |
364 |
365 | CLO_RETURN = 4. <STATUS>-CORR_NBR = VIM_LOCKED_IN_CORR. EXIT. |
366 | ENDIF. |
367 | VIM_CORR_OBJTAB-TRKORR = CLO_E071-TRKORR. |
368 | MODIFY VIM_CORR_OBJTAB. |
369 | ENDIF. |
370 | ELSE. |
371 | IF <STATUS>-CORR_NBR EQ SPACE. |
372 | <STATUS>-CORR_NBR = CLO_E071-TRKORR. |
373 | <STATUS>-ORDER_NBR = CLO_LOCK_ORDER. |
374 | ENDIF. |
375 | ENDIF. |
376 | TRANSLATE <STATUS>-TR_ALRCHKD USING ' x'. |
377 | CLEAR CLO_RETURN. |
378 | ENDFORM. "check_lockable_object |