Eigenschaften | Quelltext
Titel | CHECK_DYNAMIC_SELECT_OPTIONS |
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 CHECK_DYNAMIC_SELECT_OPTIONS                             *
    3
    *---------------------------------------------------------------------*
    4
    *       ........                                                      *
    5
    *---------------------------------------------------------------------*
    6
    FORM check_dynamic_select_options.
    7
      DATA: total_ix TYPE i VALUE '2', flag.
    8
      DATA: cdso_sellist LIKE vimsellist OCCURS 10,
    9
            oc_to_be_checked TYPE xfeld,
    10
            keyvalues TYPE occheckkeyflds,
    11
            activity TYPE xuval.
    12
      FIELD-SYMBOLS: <vim_tot_txt_struc_loc> TYPE ANY.
    13
    14
      IF x_header-delmdtflag NE space.
    15
        PERFORM build_mainkey_tab_0.
    16
      ENDIF.
    17
      IF x_header-subsetflag NE space.
    18
        MOVE 'R' TO <status>-sbsid_rcvd.
    19
        LOOP AT dba_sellist WHERE ddic CO vim_subset_marks
    20
                              AND value EQ space
    21
                              AND initial EQ space.
    22
          CLEAR <status>-sbsid_rcvd. EXIT.
    23
        ENDLOOP.
    24
      ENDIF.
    25
      READ TABLE total INDEX 1.
    26
      IF sy-subrc NE 0.
    27
        EXIT.
    28
      ENDIF.
    29
      IF NOT vim_oc_inst IS INITIAL.
    30
    * check authorisation for lines: only for conditions from authorisation
    31
    * which could not be included into dba_sellist
    32
        CALL METHOD vim_oc_inst->get_to_be_checked
    33
          IMPORTING
    34
            to_be_checked = oc_to_be_checked.
    35
        IF oc_to_be_checked <> space.
    36
          IF <status>-st_action = anzeigen.
    37
            activity = svorg_read.
    38
          ELSE.
    39
            activity = svorg_maint.
    40
          ENDIF.
    41
          LOOP AT total.
    42
            CALL METHOD vim_oc_inst->build_key_value_tab
    43
              EXPORTING
    44
                entry     = total
    45
              IMPORTING
    46
                keyvalues = keyvalues.
    47
            CALL METHOD vim_oc_inst->check_oc_authority
    48
              EXPORTING
    49
                activity        = activity
    50
              CHANGING
    51
                key_values      = keyvalues
    52
               EXCEPTIONS
    53
                 no_auth         = 1
    54
                 key_incomplete  = 2
    55
    *          WRONG_PARAMETER = 3
    56
                 OTHERS          = 4.
    57
            IF sy-subrc = 1.
    58
              DELETE total.
    59
    *       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    60
    *                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    61
            ENDIF.
    62
          ENDLOOP.
    63
        ENDIF.
    64
      ENDIF.
    65
      LOOP AT dba_sellist.
    66
        IF dba_sellist-ddic CO ddic_marks. "only ddic-limits
    67
          READ TABLE x_namtab INDEX dba_sellist-tabix.
    68
          IF x_namtab-texttabfld NE space OR x_header-bastab EQ space AND
    69
             x_namtab-bastabname NE x_header-roottab.
    70
            CLEAR dba_sellist-ddic.
    71
          ENDIF.
    72
        ENDIF.
    73
        APPEND dba_sellist TO cdso_sellist.
    74
      ENDLOOP.
    75
      IF x_header-bastab <> space AND x_header-texttbexst <> space.
    76
        ASSIGN <vim_tot_txt_struc> TO <vim_tot_txt_struc_loc>.
    77
      ELSE.
    78
        ASSIGN <vim_total_struc> TO <vim_tot_txt_struc_loc>.
    79
      ENDIF.
    80
      CALL FUNCTION 'TABLE_RANGE_CHECK'
    81
        EXPORTING
    82
          tabname                   = x_header-maintview
    83
          entry                     = total
    84
          entry_text                = <vim_tot_txt_struc_loc>
    85
          ddic                      = 'N'
    86
          key                       = 'N'
    87
          ignore_blank_subsetfields = 'J'
    88
        TABLES
    89
          x_namtab                  = x_namtab
    90
          x_header                  = x_header
    91
          sellist                   = cdso_sellist
    92
        EXCEPTIONS
    93
          entry_not_fits            = 1
    94
          no_value_for_subset_ident = 2.
    95
      CASE sy-subrc.
    96
        WHEN 0.
    97
          IF x_header-delmdtflag NE space.
    98
            PERFORM build_mainkey_tab_1. flag = 'X'.
    99
          ENDIF.
    100
        WHEN 1.
    101
          DELETE total INDEX 1.
    102
          SUBTRACT 1 FROM total_ix.
    103
        WHEN 2.
    104
          CLEAR <status>-sbsid_rcvd.
    105
      ENDCASE.
    106
      LOOP AT total FROM total_ix.
    107
        CALL FUNCTION 'TABLE_RANGE_CHECK'
    108
          EXPORTING
    109
            tabname                   = x_header-maintview
    110
            entry                     = total
    111
            entry_text                = <vim_tot_txt_struc_loc>
    112
            ddic                      = 'N'
    113
            key                       = 'N'
    114
            ignore_blank_subsetfields = 'J'
    115
          TABLES
    116
            x_namtab                  = x_namtab
    117
            x_header                  = x_header
    118
            sellist                   = cdso_sellist
    119
          EXCEPTIONS
    120
            entry_not_fits            = 1
    121
            no_value_for_subset_ident = 2.
    122
        CASE sy-subrc.
    123
          WHEN 0.
    124
            IF x_header-delmdtflag NE space.
    125
              PERFORM build_mainkey_tab_1. flag = 'X'.
    126
            ENDIF.
    127
          WHEN 1.
    128
            DELETE total.
    129
          WHEN 2.
    130
            CLEAR <status>-sbsid_rcvd.
    131
        ENDCASE.
    132
      ENDLOOP.
    133
      IF flag NE space.
    134
        PERFORM build_mainkey_tab_2.
    135
      ENDIF.
    136
    ENDFORM.                    "check_dynamic_select_options