Eigenschaften | Quelltext
Titel | CHECK_IF_ENTRY_CAN_BE_DELETED |
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 CHECK_IF_ENTRY_CAN_BE_DELETED                            *
    3
    *---------------------------------------------------------------------*
    4
    * check if entry of existency-M-table/view can be deleted             *
    5
    *---------------------------------------------------------------------*
    6
    * SY_SUBRC <-- 0: yes, deleteable, others: no, not deleteable         *
    7
    *---------------------------------------------------------------------*
    8
    FORM check_if_entry_can_be_deleted.
    9
      LOCAL: <f1_x>, total, <vim_xextract_key>.
    10
      DATA: hf TYPE i, rec TYPE i VALUE 8.
    11
    12
      <vim_xextract_key> = <f1_x> = <vim_xtotal_key>.
    13
      CLEAR <vim_enddate_mask>.
    14
      READ TABLE total WITH KEY <f1_x> BINARY SEARCH TRANSPORTING NO FIELDS.
    15
      hf = sy-tabix.
    16
      LOOP AT total FROM hf.
    17
        IF <vim_tot_mkey_beforex> NE <vim_f1_beforex> OR
    18
           ( vim_mkey_after_exists NE space AND
    19
             <vim_tot_mkey_afterx> NE <vim_f1_afterx> ).
    20
    *    IF <vim_tot_mkey_before> NE <vim_f1_before> OR
    21
    *       ( vim_mkey_after_exists NE space AND
    22
    *         <vim_tot_mkey_after> NE <vim_f1_after> ).
    23
          EXIT.
    24
        ENDIF.
    25
        CHECK <action> NE geloescht AND <action> NE neuer_geloescht AND
    26
              <action> NE update_geloescht AND
    27
              <vim_xtotal_key> NE <vim_xextract_key>.
    28
        CLEAR rec. EXIT.
    29
      ENDLOOP.
    30
      sy-subrc = rec.
    31
    ENDFORM.                               "check_if_entry_can_be_deleted