Eigenschaften | Quelltext
Titel | CHECK_IF_ENTRY_IS_TO_DISPLAY |
Originalsprache | DE | Deutsch
Erstellt | 27.10.1998 |  | SAP |
Letzte Änderung | 10.03.2003 |  | SAP |
Status | aktiv |
Attribute
Typ | Include-Programm |
Status | Testprogramm |
Anwendung | Basis (System) |
Paket | SVIM | Basis Viewmaintenance
| Editorsperre
txt
    1
    *---------------------------------------------------------------------*
    2
    *       FORM CHECK_IF_ENTRY_IS_TO_DISPLAY                             *
    3
    *---------------------------------------------------------------------*
    4
    * <--- SY_SUBRC - 0: display entry, expanded mode or new entry        *
    5
    *               - 4: display entry, collapsed mode and actual entry   *
    6
    *               - 8: don't display entry, collapsed mode              *
    7
    *---------------------------------------------------------------------*
    8
    FORM check_if_entry_is_to_display USING value(key_local) TYPE char01
    9
                                            value(key_in)    TYPE any
    10
                                            value(mod_flag)  TYPE char01
    11
                                            value(begdate)   TYPE d.
    12
      DATA: rec TYPE i, act_entry_flag(1) TYPE c.
    13
      LOCAL: total, extract.
    14
      FIELD-SYMBOLS: <key_x> TYPE x, <key_h> TYPE x.
    15
    16
    17
      CLEAR: <table1_wa>.
    18
      <f1_wax> = <f1_x>.
    19
      ASSIGN: key_in TO <key_h> CASTING,
    20
              <key_h>(x_header-keylen) TO <key_x>.
    21
      MOVE <key_x> TO <f1_x>.
    22
      IF mod_flag NE space AND
    23
         x_header-delmdtflag EQ 'E' AND begdate LE sy-datum AND
    24
         <vim_enddate_mask> GE sy-datum OR x_header-delmdtflag EQ 'B' AND
    25
         begdate GE sy-datum AND <vim_enddate_mask> LE sy-datum.
    26
        act_entry_flag = 'X'.
    27
      ENDIF.
    28
      LOOP AT vim_collapsed_mainkeys FROM vim_coll_mainkeys_beg_ix.
    29
        CHECK <vim_collapsed_mkey_bfx> = <vim_f1_beforex>.
    30
    *                                 WHERE mkey_bf EQ <vim_f1_before>.
    31
        IF vim_mkey_after_exists NE space.
    32
          CHECK <vim_collapsed_key_afx> EQ <vim_f1_afterx>.
    33
    *      CHECK <vim_collapsed_key_af> EQ <vim_f1_after>.
    34
        ENDIF.
    35
        vim_last_coll_mainkeys_ix = sy-tabix.
    36
        IF act_entry_flag NE space.
    37
          IF mod_flag EQ 'D'.
    38
            READ TABLE extract WITH KEY <vim_collapsed_keyx>
    39
                               TRANSPORTING NO FIELDS.
    40
            IF sy-subrc EQ 0.
    41
              DELETE extract INDEX sy-tabix.
    42
            ENDIF.
    43
          ENDIF.
    44
          IF <key_x> NE <vim_collapsed_keyx>.
    45
    *      IF key_in NE vim_collapsed_mainkeys-mainkey.
    46
            <vim_collapsed_keyx> = <key_x>.
    47
    *        vim_collapsed_mainkeys-mainkey = key_in.
    48
            <vim_xtotal_key> = <key_x>.
    49
            if <vim_collapsed_mkey_bfx> ne <vim_tot_mkey_beforex>.
    50
              <vim_collapsed_mkey_bfx> = <vim_tot_mkey_beforex>.
    51
            endif.
    52
    *        vim_collapsed_mainkeys-mkey_bf = <vim_tot_mkey_before>.
    53
            MODIFY vim_collapsed_mainkeys.
    54
          ENDIF.
    55
          rec = 4.
    56
        ELSE.
    57
          IF <key_x> NE <vim_collapsed_keyx>.
    58
    *      IF key_in NE vim_collapsed_mainkeys-mainkey.
    59
            rec = 8.
    60
          ELSE.
    61
            rec = 4.
    62
          ENDIF.
    63
        ENDIF.
    64
        EXIT.
    65
      ENDLOOP.
    66
      IF sy-subrc NE 0.
    67
        CLEAR rec.
    68
      ENDIF.
    69
      IF key_local NE space.
    70
        <f1_x> = <f1_wax>.
    71
      ENDIF.
    72
      sy-subrc = rec.
    73
    ENDFORM.                               "check_if_entry_is_to_display