Eigenschaften | Quelltext
Titel | VIM_EXTERNAL_EDIT |
Originalsprache | DE | Deutsch
Erstellt | 27.10.1998 |  | SAP |
Letzte Änderung | 01.07.2002 |  | SAP |
Status | aktiv |
Attribute
Typ | Include-Programm |
Status | Testprogramm |
Anwendung | Basis (System) |
Paket | SVIM | Basis Viewmaintenance
| Editorsperre
txt
    1
    *---------------------------------------------------------------------*
    2
    *       FORM VIM_EXTERNAL_EDIT                                        *
    3
    *---------------------------------------------------------------------*
    4
    *       ........                                                      *
    5
    *---------------------------------------------------------------------*
    6
    FORM vim_external_edit.
    7
      TYPES: vee_sellist LIKE vimsellist OCCURS 10.
    8
      DATA: ee_rc TYPE i, upd_flags(3) TYPE c, del_flags(3) TYPE c,
    9
          h_flag(1) TYPE c, repmode_safe(1) TYPE c, specmode_safe(1) TYPE c,
    10
            extmode_safe(1) TYPE c, vee_results LIKE vimmodres, h_ix TYPE i.
    11
      FIELD-SYMBOLS: <h_sellist> TYPE vee_sellist, <hf> TYPE ANY.
    12
    13
      IF maint_mode EQ anzeigen.
    14
        vee_results-rc_udl = vee_results-rc_ins = vee_results-rc_upd =
    15
        vee_results-rc_del = vee_results-rc_tin = vee_results-rc_del = 8.
    16
        vim_results_of_ext_mod = vee_results.
    17
        EXIT.
    18
      ENDIF.
    19
      MOVE: aendern TO upd_flags, neuer_eintrag TO upd_flags+1,
    20
            kopieren TO upd_flags+2,
    21
            geloescht TO del_flags, update_geloescht TO del_flags+1,
    22
            neuer_geloescht TO del_flags+2.
    23
      repmode_safe = replace_mode. replace_mode = 'X'.
    24
      specmode_safe = vim_special_mode. vim_special_mode = vim_upgrade.
    25
      extmode_safe = vim_external_mode. vim_external_mode = 'X'.
    26
      maxlines = 1.
    27
      clear <status>-bcfixdelinfosent.
    28
      LOOP AT extract.
    29
        IF <xact> EQ zurueckholen.
    30
          h_flag = status-delete. status-delete = geloescht.
    31
          PERFORM vim_mark_and_process USING sy-tabix 'UNDO'
    32
                                             vee_results-nbr_of_udl
    33
                                             vee_results-rc_udl.
    34
          status-delete = h_flag.
    35
          ee_rc = vee_results-rc_udl.
    36
        ELSEIF <xact> CO upd_flags.
    37
          IF <xact> EQ kopieren.
    38
            h_ix = sy-tabix + 1.
    39
            vim_extcopy_mode = 'X'.
    40
            <xact> = neuer_eintrag.
    41
            ASSIGN <vim_ck_sellist> TO <h_sellist>.
    42
            LOOP AT <h_sellist> INTO dpl_sellist
    43
                                WHERE value EQ space AND initial EQ space.
    44
    * check if sellist is filled completely & fill it if not
    45
              READ TABLE x_namtab INDEX dpl_sellist-tabix.
    46
              IF sy-subrc EQ 0.
    47
                IF x_header-bastab = space.
    48
    * view
    49
                  ASSIGN COMPONENT x_namtab-viewfield
    50
                   OF STRUCTURE <vim_total_struc> TO <hf>.
    51
                ELSE.
    52
                  IF x_namtab-texttabfld NE space.
    53
    * Type S: text field
    54
                    ASSIGN COMPONENT x_namtab-viewfield
    55
                     OF STRUCTURE <vim_ext_txt_struc> TO <hf>.
    56
                  ELSE.
    57
    * Type S: key field
    58
                    ASSIGN COMPONENT x_namtab-viewfield
    59
                     OF STRUCTURE <vim_extract_struc> TO <hf>.
    60
                  ENDIF.
    61
                ENDIF.
    62
    *            ASSIGN TOTAL+X_NAMTAB-POSITION(X_NAMTAB-FLENGTH) TO <HF>.
    63
                READ TABLE extract INTO total INDEX h_ix.
    64
                dpl_sellist-value = <hf>.
    65
                IF <hf> EQ space. dpl_sellist-initial = 'X'. ENDIF.
    66
                CLEAR dpl_sellist-converted.
    67
                MODIFY <h_sellist> FROM dpl_sellist.
    68
              ENDIF.
    69
            ENDLOOP.
    70
          ENDIF.
    71
          h_flag = <xact>.
    72
          PERFORM vim_modify_view_entry USING sy-tabix ee_rc.
    73
          CLEAR vim_extcopy_mode.
    74
          DELETE extract.                                       "190298
    75
          IF ee_rc EQ 0.
    76
            IF h_flag EQ neuer_eintrag.
    77
              ADD 1 TO vee_results-nbr_of_ins.
    78
            ELSE.
    79
              ADD 1 TO vee_results-nbr_of_upd.
    80
            ENDIF.
    81
          ELSE.
    82
            IF h_flag EQ neuer_eintrag.
    83
              vee_results-rc_ins = ee_rc.
    84
            ELSE.
    85
              vee_results-rc_upd = ee_rc.
    86
            ENDIF.
    87
          ENDIF.
    88
        ELSEIF <xact> CO del_flags.
    89
          PERFORM vim_mark_and_process USING sy-tabix 'DELE'
    90
                                             vee_results-nbr_of_del
    91
                                             vee_results-rc_del.
    92
          ee_rc = vee_results-rc_del.
    93
        ELSEIF <xact> EQ task_add.
    94
          PERFORM vim_mark_and_process USING sy-tabix 'TRIN'
    95
                                             vee_results-nbr_of_tin
    96
                                             vee_results-rc_tin.
    97
          ee_rc = vee_results-rc_tin.
    98
        ELSEIF <xact> EQ task_del.
    99
          PERFORM vim_mark_and_process USING sy-tabix 'TREX'
    100
                                             vee_results-nbr_of_tex
    101
                                             vee_results-rc_tex.
    102
          ee_rc = vee_results-rc_tex.
    103
        ENDIF.
    104
        IF ee_rc EQ 8. EXIT. ENDIF.
    105
        IF <status>-bcfixdelinfosent EQ 'X'.
    106
          <status>-bcfixdelinfosent = 'Y'.
    107
        ENDIF.
    108
      ENDLOOP.
    109
      clear <status>-bcfixdelinfosent.
    110
      vim_results_of_ext_mod = vee_results.
    111
    * CLEAR: REPLACE_MODE, VIM_SPECIAL_MODE, VIM_EXTERNAL_MODE.
    112
      replace_mode = repmode_safe. vim_special_mode = specmode_safe.
    113
      vim_external_mode = extmode_safe.
    114
    ENDFORM.                               "external_edit