1 |
2 |
3 |
4 |
5 |
6 |
7 | FORM corr_upd. |
8 | DATA: ko200 LIKE ko200, cu_e071k_tab LIKE e071k OCCURS 100, |
9 | cu_e071_tab LIKE e071 OCCURS 10, cu_trpar LIKE trpar_int OCCURS 1, |
10 | cu_trmess LIKE trmess_int OCCURS 1, cu_tadir LIKE tadir, |
11 | cu_e071_htb LIKE e071 OCCURS 10, cu_dderr LIKE dderr, |
12 | cu_corr_keytab_safe LIKE corr_keytab OCCURS 50, |
13 | cu_corr_keyhtb LIKE corr_keytab OCCURS 50, |
14 | lockable_objects_exist(1) TYPE c, e071_safe LIKE e071, |
15 | cu_ko200_tab LIKE ko200 OCCURS 10, cu_last_corr LIKE e071-trkorr, |
16 | w_cu_ko200 LIKE ko200, |
17 | corr_for_insert LIKE e071-trkorr, rc LIKE sy-subrc, |
18 | cu_new_locks LIKE strlocktab OCCURS 10, cu_begix TYPE i, |
19 | cu_hobjfunc(1) TYPE c, cu_tdevc LIKE tdevc, |
20 | cu_order_type LIKE e070-trfunction, cu_obj_not_chkd(1) TYPE c, |
21 | cu_task_type LIKE e070-trfunction, cu_appendable(1) TYPE c, |
22 | cu_request TYPE trwbo_request, cu_category LIKE vim_syst, |
23 | cu_corr_objtab LIKE LINE OF vim_corr_objtab OCCURS 0, |
24 | cu_last_cat LIKE vim_syst, cu_h_flag(1) TYPE c, |
25 | cu_h_e071 LIKE e071, cuiorder LIKE e071-trkorr, |
26 | cuitask LIKE e071-trkorr. |
27 | |
28 | DATA: lt_edt_objects TYPE tredt_objects, |
29 | ls_edt_object TYPE LINE OF tredt_objects. |
30 | FIELD-SYMBOLS: <ls_e071> TYPE e071. |
31 | |
32 | FIELD-SYMBOLS: <vim_corr_objtab> LIKE vim_corr_objtab, |
33 | <e071> LIKE e071. |
34 | |
35 | CHECK maint_mode EQ transportieren OR vim_client_state EQ vim_log. |
36 | CHECK x_header-flag NE vim_transport_denied. |
37 | cu_h_flag = x_header-flag. |
38 | IF vim_corr_obj_viewname NE x_header-viewname. |
39 | REFRESH vim_corr_objtab. |
40 | ELSE. |
41 | cu_corr_objtab = vim_corr_objtab[]. |
42 | ENDIF. |
43 | e071_safe = e071. |
44 | CLEAR e071. |
45 | LOOP AT corr_keytab WHERE mastername EQ x_header-viewname |
46 | AND ( mastertype EQ vim_unlockable_object |
47 | OR mastertype EQ vim_lockable_object ). |
48 | MOVE: corr_keytab-trkorr TO e071-trkorr, "fill object tab |
49 | corr_keytab-pgmid TO e071-pgmid, |
50 | corr_keytab-object TO e071-object, |
51 |
52 | corr_keytab-objfunc TO e071-objfunc, |
53 | corr_keytab-activity TO e071-activity. "UF738595/2001 |
54 | IF corr_keytab-objname EQ vim_long_objname. |
55 | e071-obj_name = corr_keytab-tabkey. |
56 | ELSE. |
57 | e071-obj_name = corr_keytab-objname. |
58 | ENDIF. |
59 | APPEND e071 TO cu_e071_tab. |
60 | READ TABLE vim_corr_objtab WITH KEY pgmid = e071-pgmid |
61 | object = e071-object |
62 | obj_name = e071-obj_name |
63 | TRANSPORTING NO FIELDS. |
64 | IF sy-subrc NE 0. "entry not found... |
65 |
66 | MOVE-CORRESPONDING e071 TO vim_corr_objtab. "UNICODE |
67 | IF corr_keytab-mastertype EQ vim_unlockable_object. |
68 |
69 | vim_corr_objtab-lockable = space. |
70 | ELSE. |
71 |
72 | vim_corr_objtab-lockable = lockable_objects_exist = 'X'. |
73 | ENDIF. |
74 | APPEND vim_corr_objtab. |
75 | IF corr_keytab-flag EQ 'V'. |
76 | IF vim_corr_obj_viewname NE x_header-viewname. |
77 | APPEND vim_corr_objtab TO cu_corr_objtab. |
78 | ENDIF. |
79 | ELSE. |
80 | cu_obj_not_chkd = 'X'. |
81 | ENDIF. |
82 | ELSEIF corr_keytab-mastertype EQ vim_lockable_object. |
83 | lockable_objects_exist = 'X'. |
84 | ENDIF. |
85 | ENDLOOP. |
86 | LOOP AT cu_e071_tab INTO e071. |
87 | LOOP AT corr_keytab WHERE mastertype EQ e071-object |
88 | AND mastername EQ e071-obj_name |
89 | AND pgmid EQ vim_deleted_key. |
90 | corr_keytab-pgmid = transporter. "collect all keys to |
91 | APPEND corr_keytab TO cu_e071k_tab. "delete for all objects |
92 | DELETE corr_keytab. |
93 | ENDLOOP. |
94 | ENDLOOP. |
95 | vim_corr_obj_viewname = x_header-viewname. |
96 |
97 | LOOP AT corr_keytab. |
98 | IF x_header-flag NE space AND x_header-frm_e071 EQ space AND |
99 | ( x_header-frm_e071ka NE space OR x_header-frm_e071ks NE space ). |
100 | IF corr_keytab-objname EQ vim_long_objname. |
101 | READ TABLE cu_e071_tab WITH KEY |
102 | object = corr_keytab-object |
103 | obj_name = corr_keytab-tabkey |
104 | TRANSPORTING NO FIELDS. |
105 | ELSE. |
106 | READ TABLE cu_e071_tab WITH KEY |
107 | object = corr_keytab-object |
108 | obj_name = corr_keytab-objname |
109 | TRANSPORTING NO FIELDS. |
110 | ENDIF. |
111 | IF sy-subrc EQ 0. "delete corr_keytab anyway |
112 | DELETE corr_keytab. |
113 | ENDIF. |
114 | ELSE. |
115 | READ TABLE cu_e071_tab WITH KEY |
116 | object = corr_keytab-mastertype |
117 | obj_name = corr_keytab-mastername |
118 | TRANSPORTING NO FIELDS. |
119 | ENDIF. |
120 | CHECK sy-subrc NE 0. |
121 | APPEND corr_keytab TO cu_corr_keytab_safe. |
122 | DELETE corr_keytab. |
123 | ENDLOOP. |
124 | IF maint_mode EQ aendern AND lockable_objects_exist EQ space AND |
125 | cu_obj_not_chkd NE space. |
126 |
127 | LOOP AT cu_e071_tab ASSIGNING <e071>. "UNICODE |
128 | MOVE-CORRESPONDING <e071> TO w_cu_ko200. "UNICODE |
129 | APPEND w_cu_ko200 TO cu_ko200_tab. "UNICODE |
130 |
131 | ENDLOOP. "UNICODE |
132 | CALL FUNCTION 'TR_OBJECTS_CHECK' |
133 |
134 |
135 | IMPORTING |
136 | we_order = cuiorder |
137 | we_task = cuitask |
138 | we_objects_appendable = cu_appendable |
139 | TABLES |
140 | wt_ko200 = cu_ko200_tab |
141 | wt_e071k = corr_keytab |
142 | EXCEPTIONS |
143 | cancel_edit_other_error = 1 |
144 | show_only_other_error = 2 |
145 | OTHERS = 3. |
146 | IF sy-subrc NE 0 OR cu_appendable EQ space. |
147 | rc = sy-subrc. |
148 | LOOP AT cu_corr_keytab_safe INTO corr_keytab. |
149 | APPEND corr_keytab. |
150 | ENDLOOP. |
151 | e071 = e071_safe. vim_corr_objtab[] = cu_corr_objtab. |
152 | IF rc NE 0. |
153 | MESSAGE ID sy-msgid |
154 | TYPE 'I' |
155 | NUMBER sy-msgno |
156 | WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. |
157 | RAISE saving_correction_failed. |
158 | ELSE. |
159 | sy-subrc = rc. |
160 | EXIT. |
161 | ENDIF. |
162 | ELSEIF cuiorder NE space OR cuitask NE space. |
163 | <status>-order_nbr = cuiorder. |
164 | <status>-corr_nbr = cuitask. |
165 | ENDIF. |
166 | REFRESH cu_ko200_tab. |
167 | ENDIF. "may be objects are not yet checked |
168 | IF maint_mode EQ aendern AND lockable_objects_exist NE space OR |
169 | maint_mode EQ transportieren AND cu_obj_not_chkd NE space. |
170 | IF cu_obj_not_chkd NE space. |
171 |
172 | CLEAR vim_last_source_system. |
173 | LOOP AT vim_corr_objtab WHERE lockable NE space. |
174 | READ TABLE cu_corr_objtab |
175 | WITH KEY pgmid = vim_corr_objtab-pgmid |
176 | object = vim_corr_objtab-object |
177 | obj_name = vim_corr_objtab-obj_name |
178 | TRANSPORTING NO FIELDS. |
179 | CHECK sy-subrc NE 0. |
180 | e071 = vim_corr_objtab. |
181 | PERFORM check_lockable_object USING e071 rc. |
182 | IF rc NE 0 OR x_header-flag EQ vim_transport_denied. |
183 | x_header-flag = cu_h_flag. MODIFY x_header INDEX 1. |
184 | MESSAGE i162(sv) WITH vim_corr_objtab-pgmid |
185 | vim_corr_objtab-object |
186 | vim_corr_objtab-obj_name. |
187 | IF maint_mode EQ aendern. |
188 | rc = 9. EXIT. |
189 | ELSE. |
190 | DELETE vim_corr_objtab. |
191 | ENDIF. |
192 | ENDIF. |
193 | ENDLOOP. |
194 | DESCRIBE TABLE vim_corr_objtab. |
195 | IF maint_mode EQ aendern AND rc NE 0 OR sy-tfill EQ 0. |
196 |
197 | LOOP AT cu_corr_keytab_safe INTO corr_keytab. |
198 | APPEND corr_keytab. |
199 | ENDLOOP. |
200 | e071 = e071_safe. |
201 | RAISE saving_correction_failed. |
202 | ENDIF. |
203 | ENDIF. "cu_obj_not_chckd ne space |
204 | IF <status>-corr_nbr EQ space. |
205 | LOOP AT vim_corr_objtab INTO e071. |
206 | CALL FUNCTION 'TR_CHECK_TYPE' |
207 | EXPORTING |
208 | wi_e071 = e071 |
209 | IMPORTING |
210 | we_tadir = cu_tadir |
211 | we_category = cu_category. |
212 | CHECK cu_category EQ vim_syst OR cu_category EQ vim_cust_syst OR |
213 | cu_category EQ vim_appl. |
214 | cu_last_cat = vim_syst. cu_h_e071 = e071. |
215 | ENDLOOP. |
216 | IF cu_last_cat EQ space. |
217 | cu_category = vim_cust. |
218 | ELSE. |
219 | cu_category = cu_last_cat. e071 = cu_h_e071. |
220 | ENDIF. |
221 | CALL FUNCTION 'TRINT_GET_REQUEST_TYPE' |
222 |
223 | EXPORTING |
224 | iv_pgmid = e071-pgmid |
225 | iv_object = e071-object |
226 | iv_obj_name = e071-obj_name |
227 | iv_category = cu_category |
228 | is_tadir = cu_tadir |
229 | is_tdevc = cu_tdevc |
230 |
231 | IMPORTING |
232 | ev_request_type = cu_order_type |
233 | ev_task_type = cu_task_type |
234 |
235 | EXCEPTIONS |
236 | internal_error = 1 |
237 | no_request_needed = 2 |
238 | cts_initialization_failure = 3 |
239 | OTHERS = 4. |
240 | CASE sy-subrc. |
241 | WHEN 0. |
242 | WHEN 2. |
243 | cu_order_type = 'K'. |
244 | cu_task_type = 'S'. |
245 | WHEN OTHERS. |
246 | LOOP AT cu_corr_keytab_safe INTO corr_keytab. |
247 | APPEND corr_keytab. |
248 | ENDLOOP. |
249 | e071 = e071_safe. vim_corr_objtab[] = cu_corr_objtab. |
250 | MESSAGE ID sy-msgid |
251 | TYPE 'I' |
252 | NUMBER sy-msgno |
253 | WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. |
254 | RAISE saving_correction_failed. |
255 | ENDCASE. |
256 | DO. |
257 | CALL FUNCTION 'TRINT_ORDER_CHOICE' |
258 | EXPORTING |
259 | wi_order_type = cu_order_type |
260 | wi_task_type = cu_task_type |
261 | wi_category = cu_category |
262 | wi_cli_dep = space |
263 | IMPORTING |
264 | we_order = <status>-order_nbr |
265 | we_task = <status>-corr_nbr |
266 | TABLES |
267 | wt_e071 = cu_e071_tab |
268 | wt_e071k = corr_keytab |
269 | EXCEPTIONS |
270 | no_correction_selected = 1 |
271 | display_mode = 2 |
272 | object_append_error = 3 |
273 | recursive_call = 4 |
274 | OTHERS = 5. |
275 | IF sy-subrc NE 0. |
276 |
277 | LOOP AT cu_corr_keytab_safe INTO corr_keytab. |
278 | APPEND corr_keytab. |
279 | ENDLOOP. |
280 | e071 = e071_safe. vim_corr_objtab[] = cu_corr_objtab. |
281 | IF sy-subrc NE 1. |
282 | MESSAGE ID sy-msgid |
283 | TYPE 'I' |
284 | NUMBER sy-msgno |
285 | WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. |
286 | ENDIF. |
287 | RAISE saving_correction_failed. |
288 | ENDIF. "sy-subrc ne 0 |
289 | IF maint_mode EQ transportieren. |
290 |
291 | CALL FUNCTION 'ENQUEUE_E_TRKORR' |
292 | EXPORTING |
293 | trkorr = <status>-corr_nbr |
294 |
295 | EXCEPTIONS |
296 | foreign_lock = 01 |
297 | system_failure = 02. |
298 | CASE sy-subrc. |
299 | WHEN 0. |
300 | WHEN 1. |
301 | MESSAGE s092(sv) WITH <status>-corr_nbr. "Korr. wirdger.bearb. |
302 | CONTINUE. |
303 | WHEN 2. |
304 | MESSAGE a095(sv) WITH <status>-corr_nbr. "Systemfehler |
305 | CONTINUE. |
306 | ENDCASE. |
307 | <status>-corr_enqud = 'X'. |
308 | EXIT. |
309 | ELSE. "change mode |
310 | EXIT. |
311 | ENDIF. "maint_mode eq transportieren |
312 | ENDDO. |
313 | ENDIF. "<status>-corr_nbr eq space. |
314 |
315 | LOOP AT cu_e071_tab INTO e071 WHERE trkorr EQ space. |
316 | e071-trkorr = <status>-corr_nbr. |
317 | MODIFY cu_e071_tab FROM e071. |
318 | LOOP AT vim_corr_objtab WHERE pgmid = e071-pgmid |
319 | AND object = e071-object |
320 | AND obj_name = e071-obj_name. |
321 | vim_corr_objtab-trkorr = <status>-corr_nbr. |
322 | MODIFY vim_corr_objtab. EXIT. |
323 | ENDLOOP. |
324 | sy-fdpos = strlen( e071-obj_name ). |
325 | IF sy-fdpos GT vim_71k_name_length. |
326 | READ TABLE corr_keytab WITH KEY pgmid = e071-pgmid |
327 | object = e071-object |
328 | objname = vim_long_objname |
329 | tabkey = e071-obj_name. |
330 | ELSE. |
331 | READ TABLE corr_keytab WITH KEY pgmid = e071-pgmid |
332 | object = e071-object |
333 | objname = e071-obj_name. |
334 | ENDIF. |
335 | IF sy-subrc EQ 0. |
336 | corr_keytab-trkorr = <status>-corr_nbr. |
337 | MODIFY corr_keytab INDEX sy-tabix. |
338 | ENDIF. |
339 | ENDLOOP. |
340 | ENDIF. |
341 | IF maint_mode EQ transportieren OR lockable_objects_exist NE space. |
342 | SORT cu_e071_tab BY trkorr. |
343 | LOOP AT cu_e071_tab INTO e071 WHERE objfunc NE 'D'. |
344 | cu_begix = sy-tabix + 1. |
345 | EXIT. |
346 | ENDLOOP. |
347 | IF sy-subrc EQ 0. |
348 | APPEND e071 TO cu_e071_htb. |
349 | LOOP AT corr_keytab WHERE mastertype EQ e071-object |
350 | AND mastername EQ e071-obj_name. |
351 | APPEND corr_keytab TO cu_corr_keyhtb. |
352 | ENDLOOP. |
353 | cu_last_corr = e071-trkorr. |
354 | LOOP AT cu_e071_tab INTO e071 FROM cu_begix WHERE objfunc NE 'D'. |
355 | IF e071-trkorr NE cu_last_corr. |
356 |
357 | LOOP AT cu_e071_htb ASSIGNING <ls_e071>. |
358 | MOVE-CORRESPONDING <ls_e071> TO ls_edt_object. |
359 | APPEND ls_edt_object TO lt_edt_objects. |
360 | ENDLOOP. |
361 | CALL FUNCTION 'TR_EC_CUST_ORIG_LANG' |
362 | EXPORTING |
363 | it_objects = lt_edt_objects |
364 | iv_checkmode = ' ' |
365 | iv_dialog = 'X' |
366 | CHANGING |
367 | ct_keys = cu_corr_keyhtb |
368 | EXCEPTIONS |
369 | cancel = 1 |
370 | display_only = 2 |
371 | OTHERS = 3. |
372 | IF sy-subrc <> 0. |
373 |
374 |
375 | ENDIF. |
376 |
377 | CALL FUNCTION 'TRINT_APPEND_TO_COMM_ARRAYS' |
378 | EXPORTING |
379 | wi_trkorr = cu_last_corr |
380 | TABLES |
381 | wt_e071 = cu_e071_htb |
382 | wt_e071k = cu_corr_keyhtb |
383 | wt_trmess_int = cu_trmess |
384 | wt_trpar_int = cu_trpar |
385 | EXCEPTIONS |
386 | OTHERS = 08. |
387 | IF sy-subrc NE 0. |
388 |
389 | LOOP AT cu_corr_keytab_safe INTO corr_keytab. |
390 | APPEND corr_keytab. |
391 | ENDLOOP. |
392 | e071 = e071_safe. vim_corr_objtab[] = cu_corr_objtab. |
393 | MESSAGE ID sy-msgid |
394 | TYPE 'I' |
395 | NUMBER sy-msgno |
396 | WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. |
397 | RAISE saving_correction_failed. |
398 | ENDIF. |
399 | REFRESH: cu_e071_htb, cu_corr_keyhtb. |
400 | cu_last_corr = e071-trkorr. |
401 | ENDIF. |
402 | APPEND e071 TO cu_e071_htb. |
403 | LOOP AT corr_keytab WHERE mastertype EQ e071-object |
404 | AND mastername EQ e071-obj_name. |
405 | APPEND corr_keytab TO cu_corr_keyhtb. |
406 | ENDLOOP. |
407 | ENDLOOP. |
408 | ENDIF. "sy-subrc of loop at e071_tab |
409 | DESCRIBE TABLE cu_e071_htb. |
410 | IF sy-tfill NE 0. |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 | LOOP AT cu_e071_htb ASSIGNING <ls_e071>. |
491 | MOVE-CORRESPONDING <ls_e071> TO ls_edt_object. |
492 | APPEND ls_edt_object TO lt_edt_objects. |
493 | ENDLOOP. |
494 | CALL FUNCTION 'TR_EC_CUST_ORIG_LANG' |
495 | EXPORTING |
496 | it_objects = lt_edt_objects |
497 | iv_checkmode = ' ' |
498 | iv_dialog = 'X' |
499 | CHANGING |
500 | ct_keys = cu_corr_keyhtb |
501 | EXCEPTIONS |
502 | cancel = 1 |
503 | display_only = 2 |
504 | OTHERS = 3. |
505 | IF sy-subrc <> 0. |
506 |
507 |
508 | ENDIF. |
509 |
510 | CALL FUNCTION 'TRINT_APPEND_TO_COMM_ARRAYS' |
511 | EXPORTING |
512 | wi_trkorr = e071-trkorr |
513 | TABLES |
514 | wt_e071 = cu_e071_htb |
515 | wt_e071k = cu_corr_keyhtb |
516 | wt_trmess_int = cu_trmess |
517 | wt_trpar_int = cu_trpar |
518 |
519 |
520 | EXCEPTIONS |
521 | key_check_keysyntax_error = 1 |
522 | ob_check_obj_error = 2 |
523 | tr_lockmod_failed = 3 |
524 | tr_lock_enqueue_failed = 4 |
525 | tr_wrong_order_type = 5 |
526 | tr_order_update_error = 6 |
527 | file_access_error = 7 |
528 | ob_no_systemname = 8 |
529 | OTHERS = 9. |
530 | IF sy-subrc NE 0. |
531 |
532 | LOOP AT cu_corr_keytab_safe INTO corr_keytab. |
533 | APPEND corr_keytab. |
534 | ENDLOOP. |
535 | e071 = e071_safe. vim_corr_objtab[] = cu_corr_objtab. |
536 | MESSAGE ID sy-msgid |
537 | TYPE 'I' |
538 | NUMBER sy-msgno |
539 | WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. |
540 | RAISE saving_correction_failed. |
541 | ENDIF. |
542 | ENDIF. |
543 | IF maint_mode EQ transportieren. |
544 |
545 | LOOP AT cu_e071_tab INTO e071 WHERE objfunc NE space. |
546 | IF e071-objfunc EQ 'K'. |
547 | CALL FUNCTION 'TRINT_DELETE_COMM_KEYS' |
548 | EXPORTING |
549 | wi_e071 = e071 |
550 | wi_trkorr = <status>-corr_nbr |
551 | TABLES |
552 | wt_e071k = cu_e071k_tab |
553 | EXCEPTIONS |
554 | e070_update_error = 01 |
555 | keys_protected = 02 |
556 | order_already_released = 03 |
557 | unallowed_ordertyp = 04 |
558 | user_not_owner = 05 |
559 | wrong_client = 06. |
560 | IF sy-subrc NE 0. |
561 |
562 | LOOP AT cu_corr_keytab_safe INTO corr_keytab. |
563 | APPEND corr_keytab. |
564 | ENDLOOP. |
565 | e071 = e071_safe. vim_corr_objtab[] = cu_corr_objtab. |
566 |
567 | MESSAGE ID sy-msgid |
568 | TYPE 'I' |
569 | NUMBER sy-msgno |
570 | WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. |
571 | RAISE saving_correction_failed. |
572 | ELSE. |
573 |
574 | LOOP AT corr_keytab WHERE mastertype EQ e071-object |
575 | AND mastername EQ e071-obj_name. |
576 | EXIT. |
577 | ENDLOOP. |
578 | ENDIF. "sy-subrc of function call |
579 | ELSEIF e071-objfunc EQ 'D'. |
580 | sy-subrc = 8. |
581 | ELSE. |
582 | CLEAR sy-subrc. |
583 | ENDIF. "e071-objfunc |
584 | IF sy-subrc NE 0. |
585 |
586 | cu_hobjfunc = e071-objfunc. |
587 | cu_request-objects = cu_e071_tab. |
588 | cu_request-objects_filled = 'X'. |
589 | CALL FUNCTION 'TRINT_DELETE_COMM_OBJECT_KEYS' |
590 | EXPORTING |
591 | is_e071_delete = e071 |
592 | iv_dialog_flag = ' ' |
593 |
594 |
595 | CHANGING |
596 | cs_request = cu_request |
597 | EXCEPTIONS |
598 | OTHERS = 8. |
599 | |
600 | IF sy-subrc NE 0. |
601 |
602 | LOOP AT cu_corr_keytab_safe INTO corr_keytab. |
603 | APPEND corr_keytab. |
604 | ENDLOOP. |
605 | e071 = e071_safe. vim_corr_objtab[] = cu_corr_objtab. |
606 | MESSAGE ID sy-msgid |
607 | TYPE 'I' |
608 | NUMBER sy-msgno |
609 | WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. |
610 | RAISE saving_correction_failed. |
611 | ENDIF. "sy-subrc of function call corr_delete_entry. |
612 | IF sy-subrc EQ 0 AND "del. was successful or entry didn't ex. |
613 | cu_hobjfunc EQ 'D'. "and no table entry |
614 | DELETE cu_corr_keytab_safe |
615 | WHERE pgmid EQ e071-pgmid AND object EQ e071-object |
616 | AND ( objname EQ e071-obj_name OR |
617 | objname EQ vim_long_objname AND |
618 | tabkey EQ e071-obj_name ) |
619 | AND objfunc EQ e071-objfunc. |
620 | ENDIF. |
621 | ENDIF. "sy-subrc for deletion |
622 | ENDLOOP. |
623 | CLEAR: <status>-keytbmodfd, <status>-upd_flag. |
624 | MESSAGE s096(sv) WITH <status>-corr_nbr. |
625 | ENDIF. "maint_mode eq transportieren. |
626 | ELSE. |
627 |
628 | ASSIGN vim_corr_objtab TO <vim_corr_objtab>. |
629 | LOOP AT vim_corr_objtab. |
630 | MOVE-CORRESPONDING <vim_corr_objtab> TO w_cu_ko200. "UNICODE |
631 | APPEND w_cu_ko200 TO cu_ko200_tab. "UNICODE |
632 | ENDLOOP. |
633 | IF <status>-order_nbr NE space. |
634 | corr_for_insert = <status>-order_nbr. |
635 | ELSE. |
636 | corr_for_insert = <status>-corr_nbr. |
637 | ENDIF. |
638 | |
639 | CALL FUNCTION 'TR_OBJECTS_INSERT' |
640 | EXPORTING |
641 |
642 | wi_order = corr_for_insert |
643 | IMPORTING |
644 | we_order = <status>-order_nbr |
645 | we_task = <status>-corr_nbr |
646 | TABLES |
647 | wt_ko200 = cu_ko200_tab |
648 | wt_e071k = corr_keytab |
649 | EXCEPTIONS |
650 | cancel_edit_other_error = 4 |
651 | show_only_other_error = 6 |
652 | OTHERS = 8. |
653 | IF sy-subrc NE 0. |
654 | rc = sy-subrc. |
655 |
656 | LOOP AT cu_corr_keytab_safe INTO corr_keytab. |
657 | APPEND corr_keytab. |
658 | ENDLOOP. |
659 | e071 = e071_safe. vim_corr_objtab[] = cu_corr_objtab. |
660 | IF rc GT 4. |
661 |
662 | MESSAGE ID sy-msgid |
663 | TYPE 'I' |
664 | NUMBER sy-msgno |
665 | WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. |
666 | ENDIF. |
667 | RAISE saving_correction_failed. |
668 | ENDIF. |
669 | PERFORM vim_synchronizer_call |
670 | USING |
671 | cu_ko200_tab[] |
672 | corr_keytab[] |
673 | space. |
674 | ENDIF. "maint_mode eq transportieren or lockable_objects_exist ne spac |
675 |
676 | IF maint_mode EQ aendern. |
677 | IF x_header-flag NE space AND x_header-frm_e071 EQ space AND |
678 | ( x_header-frm_e071ks NE space OR x_header-frm_e071ka NE space ). |
679 | REFRESH corr_keytab. |
680 | ELSE. |
681 | DELETE corr_keytab WHERE mastertype NE vim_unlockable_object |
682 | AND mastertype NE vim_lockable_object. |
683 | ENDIF. |
684 | ENDIF. |
685 |
686 | LOOP AT cu_corr_keytab_safe INTO corr_keytab. |
687 | IF corr_keytab-mastername EQ x_header-viewname AND |
688 | ( corr_keytab-mastertype EQ vim_unlockable_object OR |
689 | corr_keytab-mastertype EQ vim_lockable_object ). |
690 | corr_keytab-trkorr = <status>-corr_nbr. |
691 | ENDIF. |
692 | APPEND corr_keytab. |
693 | ENDLOOP. |
694 | SUBTRACT sy-subrc FROM sy-subrc. |
695 | e071 = e071_safe. |
696 | LOOP AT vim_corr_objtab. |
697 | READ TABLE cu_corr_objtab WITH KEY pgmid = vim_corr_objtab-pgmid |
698 | object = vim_corr_objtab-object |
699 | obj_name = vim_corr_objtab-obj_name |
700 | TRANSPORTING NO FIELDS. |
701 | CHECK sy-subrc NE 0. "delete added entries |
702 | DELETE vim_corr_objtab. |
703 | ENDLOOP. |
704 | e071-trkorr = <status>-corr_nbr. |
705 | last_corr_number = <status>-l_corr_nbr = <status>-corr_nbr. |
706 | CLEAR <status>-keytbmodfd. |
707 | FREE: cu_e071k_tab, cu_trmess, cu_trpar, cu_e071_tab, |
708 | cu_corr_keytab_safe, cu_ko200_tab, cu_e071_htb, cu_new_locks. |
709 | ENDFORM. "corr_upd |