Eigenschaften | Quelltext
Titel | LOESCHEN |
Originalsprache | DE | Deutsch
Erstellt | 27.10.1998 |  | SAP |
Letzte Änderung | 13.11.2001 |  | SAP |
Status | aktiv |
Attribute
Typ | Include-Programm |
Status | Testprogramm |
Anwendung | Basis (System) |
Paket | SVIM | Basis Viewmaintenance
| Editorsperre
txt
    1
    *&--------------------------------------------------------------------*
    2
    *&      FORM LOESCHEN                                                 *
    3
    *&--------------------------------------------------------------------*
    4
    * Behandeln der Funktion 'DELE'                                       *
    5
    *---------------------------------------------------------------------*
    6
    FORM LOESCHEN.
    7
      DATA: NUMBER_OF_IGN_ENTR TYPE I, KEY_SAFE type VIM_tabKEY,
    8
            L_IGN_ENTR_EX(1) TYPE C.
    9
      IF STATUS-ACTION NE AENDERN AND STATUS-ACTION NE HINZUFUEGEN.
    10
        MESSAGE I001(SV).
    11
        EXIT.
    12
      ENDIF.
    13
      IF STATUS-MODE EQ DETAIL_BILD.
    14
    *   IF STATUS-ACTION EQ HINZUFUEGEN AND <XACT> NE NEUER_EINTRAG.
    15
        IF STATUS-ACTION EQ HINZUFUEGEN AND NEUER EQ 'J'.
    16
          MOVE <INITIAL> TO <TABLE1>.
    17
          IF X_HEADER-BASTAB NE SPACE AND X_HEADER-TEXTTBEXST NE SPACE.
    18
            MOVE <TEXT_INITIAL> TO <TABLE1_TEXT>.
    19
          ENDIF.
    20
          MESSAGE S013(SV).
    21
          CLEAR <STATUS>-UPD_FLAG.
    22
          EXIT.
    23
        ENDIF.
    24
        MOVE <XMARK> TO DETA_MARK_SAFE.
    25
        IF X_HEADER-DELMDTFLAG NE SPACE.
    26
          PERFORM CHECK_IF_ENTRY_IS_TO_DISPLAY USING 'L' <VIM_xEXTRACT_KEY>
    27
                                                     SPACE <VIM_BEGDATE>.
    28
          NUMBER_OF_IGN_ENTR = SY-SUBRC.
    29
          KEY_SAFE = <VIM_xEXTRACT_KEY>.
    30
        ENDIF.
    31
        IF X_HEADER-DELMDTFLAG EQ SPACE OR NUMBER_OF_IGN_ENTR LT 8.
    32
          READ TABLE EXTRACT INDEX NEXTLINE.
    33
        ELSE.
    34
          MOVE KEY_SAFE TO <VIM_xEXTRACT_KEY>.
    35
          READ TABLE TOTAL WITH KEY <VIM_xEXTRACT_KEY> BINARY SEARCH.
    36
          EXTRACT = TOTAL.
    37
        ENDIF.
    38
      ENDIF.
    39
      IF X_HEADER-FRM_BF_DEL NE SPACE.
    40
        PERFORM (X_HEADER-FRM_BF_DEL) IN PROGRAM (SY-REPID).
    41
      ENDIF.
    42
      IF VIM_CALLED_BY_CLUSTER NE SPACE.
    43
        PERFORM VIM_STORE_STATE_INFO.
    44
        CALL FUNCTION 'VIEWCLUSTER_DELETE_DEPENDENT'
    45
             EXPORTING
    46
                  VIEW_NAME         = X_HEADER-VIEWNAME
    47
                  STATUS_MODE       = STATUS-MODE
    48
                  WORKAREA          = EXTRACT
    49
                  NO_DIALOG         = VIM_EXTERNAL_MODE
    50
             IMPORTING
    51
                  IGN_ENTRIES_EXIST = L_IGN_ENTR_EX.
    52
        IF L_IGN_ENTR_EX NE SPACE.
    53
          IGNORED_ENTRIES_EXIST = L_IGN_ENTR_EX.
    54
        ENDIF.
    55
      ENDIF.
    56
      IF STATUS-MODE EQ LIST_BILD.
    57
        PERFORM LISTE_LOESCHE.
    58
      ELSE.
    59
    *   IF <STATUS>-DISPL_MODE EQ EXPANDED.
    60
    *     READ TABLE EXTRACT INDEX NEXTLINE.
    61
    *   ELSE.
    62
    *     READ TABLE TOTAL WITH KEY <F1> BINARY SEARCH.
    63
    *     EXTRACT = TOTAL.
    64
    *   ENDIF.
    65
        IF <XMARK> NE UEBERGEHEN.
    66
          PERFORM DELETE_CHECK_KEYRANGE.
    67
          IF SY-SUBRC EQ 0.
    68
            PERFORM DETAIL_LOESCHE.
    69
          ELSE.
    70
            COUNTER = 0.
    71
          ENDIF.
    72
        ELSE.
    73
          COUNTER = 0.
    74
        ENDIF.
    75
      ENDIF.
    76
      IF VIM_SPECIAL_MODE EQ VIM_UPGRADE AND COUNTER EQ 0.
    77
        FUNCTION = OK_CODE = 'IGN '.
    78
      ENDIF.
    79
      IF X_HEADER-FRM_AF_DEL NE SPACE.
    80
        PERFORM (X_HEADER-FRM_AF_DEL) IN PROGRAM (SY-REPID).
    81
      ELSE.
    82
        IF IGNORED_ENTRIES_EXIST NE SPACE.
    83
          PERFORM MARK_IGNORED_ENTRIES CHANGING NUMBER_OF_IGN_ENTR.
    84
          CHECK VIM_SPECIAL_MODE NE VIM_UPGRADE.
    85
          IF NUMBER_OF_IGN_ENTR EQ 1.
    86
            MESSAGE S115(SV). "Eintrag konnte nicht gelöscht werden
    87
          ELSEIF NUMBER_OF_IGN_ENTR GT 1.
    88
            MESSAGE S116(SV) WITH NUMBER_OF_IGN_ENTR.
    89
          ENDIF.
    90
        ENDIF.
    91
      ENDIF.
    92
    ENDFORM.                               " LOESCHEN