Eigenschaften | Quelltext
Titel | VIM_IMP_CALL_SCREEN |
Originalsprache | DE | Deutsch
Erstellt | 27.10.1998 |  | SAP |
Letzte Änderung | 11.03.2003 |  | SAP |
Status | aktiv |
Attribute
Typ | Include-Programm |
Status | Testprogramm |
Anwendung | Basis (System) |
Paket | SVIM | Basis Viewmaintenance
| Editorsperre
txt
    1
    *&--------------------------------------------------------------------*
    2
    *&      Form VIM_IMP_CALL_SCREEN                                      *
    3
    *&--------------------------------------------------------------------*
    4
    * ...                                                                 *
    5
    *&--------------------------------------------------------------------*
    6
    FORM vim_imp_call_screen USING vics_screen LIKE d020s-dnum.
    7
      DATA: program LIKE sy-repid, import_action LIKE sy-msgv4,
    8
            key_safe1 LIKE sy-msgv1, key_safe2 LIKE sy-msgv2,
    9
            key_safe3 LIKE sy-msgv3, key_safe TYPE vim_tabkey_c,
    10
            vics_xkeylen TYPE i.           ", vics_int_entsafe(4096) TYPE c.
    11
      LOCAL: imp_results.                  "SW  wg. rek. Aufruf im Cluster
    12
    13
      FIELD-SYMBOLS: <res_tabkey> TYPE x, <errkey> TYPE x.
    14
    15
      ASSIGN: imp_results-tabkey TO <res_tabkey> CASTING,
    16
              vim_profile_errorkey TO <errkey> CASTING.
    17
      CLEAR vim_view_wax.
    18
      IF vim_import_mode_active NE space.
    19
    *    VICS_INT_ENTSAFE = <TABLE1>.
    20
        <table1_wax> = <table1_x>.
    21
        PERFORM vim_set_impres_header.
    22
        PERFORM vim_convert_tabkey USING <f1_x> key_safe vics_xkeylen.
    23
    *    imp_results-tabkey = <f1>.
    24
        <res_tabkey> = <f1_x>.
    25
        key_safe1 = key_safe.
    26
        IF vics_xkeylen GT 50.
    27
          key_safe2 = key_safe+50.
    28
          IF vics_xkeylen GT 100.
    29
            key_safe3 = key_safe+100.
    30
          ENDIF.
    31
        ENDIF.
    32
        IF vim_called_by_cluster = 'X'.                         "SW
    33
          CONCATENATE '(' view_name ')' INTO key_safe3.         "SW
    34
        ENDIF.                                                  "SW
    35
        IF status-action EQ hinzufuegen.
    36
          import_action = 'INS'.
    37
        ELSEIF function EQ 'DELE'.
    38
          import_action = 'DEL'.
    39
        ELSEIF status-action EQ aendern.
    40
          import_action = 'UPD'.
    41
        ENDIF.
    42
        CLEAR: imp_results-import, vim_last_logged_message.
    43
        IF vim_import_profile = 'X'.
    44
    *      vim_profile_errorkey = <f1>.
    45
          <errkey>(x_header-keylen) = <f1_x>.
    46
        ELSE.
    47
          vim_import_no_message = 'X'.
    48
          PERFORM vim_process_message USING 'SV' 'S' 'S' '150' key_safe1
    49
                                          key_safe2 key_safe3 import_action.
    50
        ENDIF.
    51
      ENDIF.
    52
      IF vim_import_mode_active EQ space OR vim_no_dialog EQ space.
    53
        CALL SCREEN vics_screen.
    54
      ELSE.
    55
        program = sy-repid. CLEAR vim_import_no_message.
    56
        CALL FUNCTION 'VIEW_CALL_SCREEN'
    57
             EXPORTING
    58
                  screen_number = vics_screen
    59
                  program       = program
    60
             EXCEPTIONS
    61
                  error_message = 1.
    62
        IF sy-subrc NE 0.
    63
          CLEAR vim_act_dynp_view.
    64
          IF vim_last_logged_message-id NE sy-msgid OR
    65
             vim_last_logged_message-nbr NE sy-msgno.
    66
            vim_import_no_message = 'X'.
    67
            PERFORM vim_process_message USING sy-msgid sy-msgty sy-msgty
    68
                                              sy-msgno sy-msgv1 sy-msgv2
    69
                                              sy-msgv3 sy-msgv4.
    70
          ENDIF.
    71
          IF vim_import_forcemode EQ space.
    72
            ok_code = 'IGN '. neuer = 'N'.
    73
          ELSE.                            "force mode
    74
    *        <table1> = vics_int_entsafe.
    75
            <table1_x> = <table1_wax>.
    76
            CASE import_action.
    77
              WHEN 'UPD'.
    78
                <status>-upd_flag = 'X'. neuer = 'N'.
    79
                PERFORM update_tab.
    80
              WHEN 'INS'.
    81
                <status>-upd_flag = 'X'. neuer = 'J'.
    82
                PERFORM update_tab.
    83
              WHEN 'DEL'.
    84
                READ TABLE total WITH KEY <f1_x> BINARY SEARCH
    85
                                                 TRANSPORTING NO FIELDS.
    86
                IF sy-subrc EQ 0.
    87
                  PERFORM logical_delete_from_total USING sy-tabix.
    88
                ENDIF.
    89
            ENDCASE.
    90
          ENDIF.
    91
        ENDIF.
    92
        IF vim_import_profile = 'X'.
    93
          CLEAR vim_profile_errorkey.
    94
        ELSE.
    95
          vim_import_no_message = 'X'.
    96
          PERFORM vim_process_message USING 'SV' 'S' 'S' '151' key_safe1
    97
                                          key_safe2 key_safe3 import_action.
    98
        ENDIF.
    99
        CLEAR vim_import_no_message.
    100
      ENDIF.
    101
      IF vim_import_mode_active NE space.
    102
        IF ok_code EQ 'IGN ' OR function EQ 'ABR '. "error
    103
          imp_results-import-errors = 1.
    104
        ENDIF.
    105
        IF ok_code NE 'IGN' AND function NE 'ABR' OR
    106
           vim_import_forcemode NE space.
    107
          CASE import_action.
    108
            WHEN 'UPD'. imp_results-import-updated = 1.
    109
            WHEN 'INS'. imp_results-import-inserted = 1.
    110
            WHEN 'DEL'. imp_results-import-deleted = 1.
    111
          ENDCASE.
    112
        ENDIF.
    113
        APPEND imp_results.
    114
      ENDIF.
    115
    ENDFORM.                               "vim_imp_call_screen