*---------------------------------------------------------------------* * FORM LISTE_LOESCHE * *---------------------------------------------------------------------* * ........ * *---------------------------------------------------------------------* FORM liste_loesche. DATA: rec LIKE sy-subrc, delete_fix_value(1) TYPE c, entry_contains_fix_val(1) TYPE c, w_field TYPE vimty_fields_type, bc_fix_del_info_sent(1) TYPE c VALUE ' '. READ TABLE extract INDEX firstline. IF x_header-delmdtflag <> space. (x_header-keylen) = . ENDIF. * vim_old_viewkey = . counter = 0. LOOP AT extract. CHECK EQ markiert. * -------Authority check before deleting fix values from BC-Sets------ delete_fix_value = vim_bc_chng_allowed. IF vim_bc_chng_allowed = space. "fix field changeability forced READ TABLE vim_bc_entry_list INTO vim_bc_entry_list_wa WITH TABLE KEY viewname = x_header-viewname keys = . IF sy-subrc = 0. CLEAR entry_contains_fix_val. LOOP at vim_bc_entry_list_wa-fields into w_field. IF w_field-flag = vim_profile_fix. entry_contains_fix_val = 'X'. ENDIF. ENDLOOP. IF entry_contains_fix_val = 'X'. IF bc_fix_del_info_sent EQ SPACE AND -bcfixdelinfosent NE 'Y'."HCG: del dependent VCL bc_fix_del_info_sent = 'X'. -bcfixdelinfosent = 'X'. MESSAGE i177(SV). ENDIF. ELSE. delete_fix_value = 'X'. ENDIF. ELSE. delete_fix_value = 'X'. ENDIF. ENDIF. CHECK delete_fix_value EQ 'X'. * -------------------------------------------------------------"HCG--- READ TABLE total WITH KEY BINARY SEARCH. rec = sy-tabix. IF x_header-existency EQ 'M'. "no mainkey delete allowed PERFORM check_if_entry_can_be_deleted. IF sy-subrc NE 0. = uebergehen. ignored_entries_exist = 'X'. MODIFY extract. = uebergehen. MODIFY total INDEX rec. CONTINUE. ENDIF. ENDIF. PERFORM delete_check_keyrange. CASE sy-subrc. WHEN 0. WHEN 4. CONTINUE. WHEN 8. EXIT. ENDCASE. counter = counter + 1. PERFORM logical_delete_from_total USING rec. IF x_header-delmdtflag NE space. IF vim_special_mode NE vim_upgrade. PERFORM check_if_entry_is_to_display USING 'L' space . ELSE. CLEAR sy-subrc. ENDIF. CASE sy-subrc. WHEN 0. DELETE extract. WHEN 4. = . CLEAR . (x_header-keylen) = . * vim_old_viewkey = . = . * vim_mainkey = . rec = 8. LOOP AT total. PERFORM select USING -selected. CHECK sy-subrc EQ 0. CHECK EQ AND ( vim_mkey_after_exists EQ space OR EQ ). "same mainkey * CHECK EQ AND * ( vim_mkey_after_exists EQ space OR * EQ ). extract = total. PERFORM mod_extract_and_mainkey_tab USING 'M' 0. CLEAR rec. EXIT. ENDLOOP. IF rec NE 0. DELETE extract. ENDIF. ENDCASE. ELSE. DELETE extract. ENDIF. mark_total = mark_total - 1. mark_extract = mark_extract - 1. ENDLOOP. CHECK vim_special_mode NE vim_upgrade. DESCRIBE TABLE extract LINES maxlines. IF status-action EQ hinzufuegen. SUBTRACT nbr_of_added_dummy_entries FROM maxlines. ENDIF. IF ignored_entries_exist EQ space AND maxlines GT 0. MESSAGE s011(sv) WITH counter. ELSE. MESSAGE i011(sv) WITH counter. ENDIF. IF x_header-delmdtflag <> space. = . ENDIF. * = vim_old_viewkey. READ TABLE extract WITH KEY . IF sy-subrc NE 8. rec = firstline + looplines - 1. IF sy-tabix GT rec OR nextline GT maxlines. nextline = sy-tabix. ENDIF. ELSE. nextline = 1. ENDIF. IF maxlines EQ 0 AND status-action EQ hinzufuegen. status-action = aendern. title-action = aendern. l = 1. o = 0. ENDIF. CLEAR vim_old_viewkey. TRANSLATE vim_no_mainkey_exists USING vim_no_mkey_not_procsd_patt. ENDFORM.