Eigenschaften | Quelltext
Titel | PREPARE_CORR |
Originalsprache | DE | Deutsch
Erstellt | 27.10.1998 |  | SAP |
Letzte Änderung | 23.06.2003 |  | SAP |
Status | aktiv |
Attribute
Typ | Include-Programm |
Status | Testprogramm |
Anwendung | Basis (System) |
Paket | SVIM | Basis Viewmaintenance
| Editorsperre
txt
    1
    *---------------------------------------------------------------------*
    2
    *       FORM PREPARE_CORR                                             *
    3
    *---------------------------------------------------------------------*
    4
    *       prepare command file tables (E070, E071)                      *
    5
    *---------------------------------------------------------------------*
    6
    FORM prepare_corr.
    7
      DATA: x030l_sadr type x030l,
    8
            pc_objtype LIKE objs-objecttype,
    9
            pc_maint_mode(1) TYPE c.
    10
    11
      CHECK x_header-flag NE vim_transport_denied.
    12
      CHECK maint_mode EQ transportieren OR"transport mode or change mode
    13
            vim_client_state EQ vim_log.   "and logging required
    14
      IF <status>-tr_alrchkd EQ 'x'.
    15
    * send warning if generic transport is required "HCG and no BCset import
    16
        IF x_header-generictrp NE space and vim_import_profile NE 'X'.
    17
          MESSAGE i141(sv) WITH vim_max_trsp_keylength
    18
                                vim_max_trsp_identical_key
    19
                                x_header-maxtrkeyln.
    20
        ELSEIF x_header-genertxtrp NE space and vim_import_profile NE 'X'.
    21
          MESSAGE i141(sv) WITH vim_max_trsp_keylength
    22
                                vim_max_trsp_identical_key
    23
                                x_header-maxtrtxkln.
    24
        ENDIF.
    25
        DESCRIBE TABLE vim_corr_objtab.
    26
        IF sy-tfill GT 0.                  "save objects in corr_keytab
    27
          CLEAR corr_keytab.
    28
          MOVE x_header-viewname TO corr_keytab-mastername.
    29
          LOOP AT vim_corr_objtab.
    30
            IF vim_corr_objtab-lockable EQ space.
    31
              corr_keytab-mastertype = vim_unlockable_object.
    32
            ELSE.
    33
              corr_keytab-mastertype = vim_lockable_object.
    34
            ENDIF.
    35
            MOVE: vim_corr_objtab-pgmid    TO corr_keytab-pgmid,
    36
                  vim_corr_objtab-object   TO corr_keytab-object,
    37
    *             VIM_CORR_OBJTAB-OBJ_NAME TO CORR_KEYTAB-OBJNAME,
    38
                  vim_corr_objtab-objfunc  TO corr_keytab-objfunc,
    39
            vim_corr_objtab-activity TO corr_keytab-activity. "UF738595/2001
    40
            sy-fdpos = strlen( vim_corr_objtab-obj_name ).
    41
            IF sy-fdpos GT vim_71k_name_length.
    42
              corr_keytab-objname = vim_long_objname.
    43
              corr_keytab-tabkey  = vim_corr_objtab-obj_name.
    44
            ELSE.
    45
              corr_keytab-objname = vim_corr_objtab-obj_name.
    46
            ENDIF.
    47
            READ TABLE corr_keytab
    48
                       WITH KEY pgmid      = corr_keytab-pgmid
    49
                                object     = corr_keytab-object
    50
                                objname    = corr_keytab-objname
    51
                                objfunc    = corr_keytab-objfunc
    52
                                mastertype = corr_keytab-mastertype
    53
                                mastername = corr_keytab-mastername
    54
                       TRANSPORTING NO FIELDS.
    55
            CHECK sy-subrc NE 0.
    56
            IF vim_corr_objtab-trkorr EQ space.
    57
              MOVE: <status>-corr_nbr    TO corr_keytab-trkorr,
    58
                    <status>-corr_nbr    TO vim_corr_objtab-trkorr.
    59
              MODIFY vim_corr_objtab.
    60
            ELSE.
    61
              corr_keytab-trkorr = vim_corr_objtab-trkorr.
    62
            ENDIF.
    63
            corr_keytab-flag = 'V'.
    64
            APPEND corr_keytab.
    65
          ENDLOOP.
    66
        ENDIF.                             "sy-tfill
    67
      ENDIF.                               "<status>-tr_alrchkd eq 'x'.
    68
      IF maint_mode EQ transportieren.
    69
        MOVE 'X' TO get_corr_keytab.
    70
        IF <status>-keytbinvld EQ space.
    71
          LOOP AT vim_corr_objtab WHERE lockable EQ space.
    72
            LOOP AT corr_keytab WHERE mastertype EQ vim_corr_objtab-object
    73
                                 AND mastername EQ vim_corr_objtab-obj_name.
    74
              EXIT.
    75
            ENDLOOP.
    76
            IF sy-subrc EQ 0.
    77
              CLEAR get_corr_keytab.
    78
            ENDIF.
    79
          ENDLOOP.
    80
        ELSE.
    81
          LOOP AT vim_corr_objtab WHERE lockable EQ space.
    82
            LOOP AT corr_keytab WHERE mastertype EQ vim_corr_objtab-object
    83
                                 AND mastername EQ vim_corr_objtab-obj_name.
    84
              DELETE corr_keytab.
    85
            ENDLOOP.
    86
          ENDLOOP.
    87
        ENDIF.
    88
      ENDIF.
    89
      MOVE <status>-corr_nbr TO <status>-l_corr_nbr.
    90
      <status>-tr_alrchkd = 'X'.
    91
      IF ( status-action EQ transportieren OR
    92
           vim_client_state EQ vim_log ) AND
    93
         x_header-adrnbrflag EQ 'O' AND sadr_namtab_read EQ space.
    94
        CALL FUNCTION 'DDIF_NAMETAB_GET'
    95
          EXPORTING
    96
            tabname           = 'SADR'
    97
          IMPORTING
    98
            X030L_WA          = x030l_sadr
    99
          EXCEPTIONS
    100
            OTHERS            = 2.
    101
        IF sy-subrc EQ 0.
    102
          MOVE 'X' TO sadr_namtab_read.
    103
          sadr_keylen = x030l_sadr-keylen
    104
                         / cl_abap_char_utilities=>charsize.
    105
    * Übrgangslösung Adreßtabellen SADR2...SADR5 zu 3.0A Anfang
    106
          IF x_header-bastab EQ space.
    107
            pc_objtype = 'V'.
    108
          ELSE.
    109
            pc_objtype = 'S'.
    110
          ENDIF.
    111
          CALL FUNCTION 'VIEW_CHECK_OBJ_LIST_FOR_ADDR'
    112
            EXPORTING
    113
              objectname                     = x_header-viewname
    114
              objecttype                     = pc_objtype
    115
            EXCEPTIONS
    116
              not_all_address_tables_in_list = 01.
    117
          IF sy-subrc NE 0. "regenerating of object list required
    118
            pc_maint_mode = x_header-bastab.
    119
            TRANSLATE pc_maint_mode USING ' VXS'.
    120
            CALL FUNCTION 'OBJ_GENERATE'
    121
              EXPORTING
    122
                iv_objectname    = x_header-viewname
    123
                iv_objecttype    = pc_maint_mode
    124
                iv_maint_mode    = aendern
    125
                iv_no_correction = 'X'
    126
              EXCEPTIONS
    127
                OTHERS           = 5.
    128
          ENDIF.
    129
    * Übrgangslösung Adreßtabellen SADR2...SADR5 zu 3.0A Ende
    130
        ELSE.
    131
          RAISE nametab_get_failed.
    132
        ENDIF.
    133
      ENDIF.
    134
    ENDFORM.                    "PREPARE_CORR