Eigenschaften | Quelltext
Titel | VIM_ASSIGN_MAINKEY_AFTER |
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 VIM_ASSIGN_MAINKEY_AFTER                                 *
    3
    *---------------------------------------------------------------------*
    4
    * assign symbols to after-date-part of mainkey                        *
    5
    *---------------------------------------------------------------------*
    6
    FORM vim_assign_mainkey_after USING value(vama_tabix) TYPE i.
    7
      DATA: vama_ix TYPE i, length TYPE i.
    8
      FIELD-SYMBOLS: <x_namtab> TYPE vimnamtab.
    9
    10
      vama_ix = vama_tabix + 1.
    11
      READ TABLE x_namtab ASSIGNING <x_namtab> INDEX vama_ix.
    12
      IF sy-subrc EQ 0 AND                 "entry found and
    13
       <x_namtab>-texttabfld EQ space AND  "key continues
    14
       <x_namtab>-position LT x_header-keylen. "after date field
    15
        vama_ix = x_header-keylen - <x_namtab>-position.
    16
        ASSIGN: <table1_x>+<x_namtab>-position(vama_ix)
    17
                                  TO <vim_f1_afterx>,
    18
                <vim_h_coll_mkey>+<x_namtab>-position(vama_ix)
    19
                                  TO <vim_collapsed_key_afx>,
    20
                <vim_h_mkey>+<x_namtab>-position(vama_ix)
    21
                                  TO <vim_mkey_afterx>,
    22
                <vim_h_old_mkey>+<x_namtab>-position(vama_ix)
    23
                                  TO <vim_old_mkey_afterx>. " TYPE 'C'.
    24
        IF x_header-generictrp <> 'X'.
    25
    ** charlike key or non-unicode-system (FS is only assigned for
    26
    ** downward compatibility).
    27
          length = <x_namtab>-position
    28
                    DIV cl_abap_char_utilities=>charsize.
    29
          vama_ix = vama_ix DIV cl_abap_char_utilities=>charsize.
    30
          ASSIGN: <table1>+length(vama_ix)
    31
                                    TO <vim_f1_after>,
    32
                  vim_collapsed_mainkeys-mainkey+length(vama_ix)
    33
                                    TO <vim_collapsed_key_af>,
    34
                  vim_mainkey+length(vama_ix)
    35
                                    TO <vim_mkey_after>,
    36
                  vim_old_viewkey+length(vama_ix)
    37
                                    TO <vim_old_mkey_after>.
    38
        ELSE.
    39
          ASSIGN: <vim_f1_afterx> TO <vim_f1_after>,
    40
                  <vim_collapsed_key_afx> TO <vim_collapsed_key_af>,
    41
                  <vim_mkey_afterx> TO <vim_mkey_after>,
    42
                  <vim_old_mkey_afterx> TO <vim_old_mkey_after>.
    43
        ENDIF.
    44
        vim_mkey_after_exists = 'X'.
    45
        CLEAR vim_no_mainkey_exists.
    46
      ELSE.
    47
        CLEAR vim_mkey_after_exists.
    48
      ENDIF.
    49
    ENDFORM.                               "vim_asign_mainkey_after