Properties SourceCde
txt
1
*---------------------------------------------------------------------*
2
*       FORM JUSTIFY_ACTION_MODE                                      *
3
*---------------------------------------------------------------------*
4
* ggf. VIEW_ACTION aendern und View entsperren                        *
5
*---------------------------------------------------------------------*
6
FORM justify_action_mode.
7
  DATA: action_changed(1) TYPE c, assigned(1) TYPE c.
8
  DATA: i_statetab LIKE adrstatus OCCURS 0 WITH HEADER LINE,
9
        i_messnbr LIKE sy-msgno.
10
 
11
  FIELD-SYMBOLS: <f_fld_value> TYPE any.  " XB H612358
12
 
13
  IF fcode = vim_read_text.            "SW Textimp ...
14
    PERFORM vim_read_texttab_all_langus.
15
    EXIT.
16
  ENDIF.                               "... SW Textimp
17
 
18
* XB H612358B
19
* check if the time-field exists: Yes, then reset initial value.
20
    LOOP AT x_namtab WHERE datatype = 'TIMS'.
21
      ASSIGN COMPONENT x_namtab-viewfield of STRUCTURE <initial>
22
           TO <f_fld_value>.
23
      IF <f_fld_value> <> SPACE.
24
        CLEAR <f_fld_value> WITH SPACE.
25
      ENDIF.
26
    ENDLOOP.
27
* XB H612358B
28
 
29
  IF x_header-selection EQ space.
30
    DESCRIBE TABLE dba_sellist.
31
    IF sy-tfill GT 0.
32
      MOVE 'X' TO x_header-selection.
33
      MODIFY x_header INDEX 1.
34
*      IF last_view_info EQ view_name.                       "UF443580b
35
** <initial> not yet filled in INITIALISIEREN
36
*        PERFORM vim_set_init_from_sellist USING x_header-maintview
37
*                                                x_namtab[]
38
*                                                dba_sellist[]
39
*                                                vim_hidden
40
*                                          CHANGING <initial>.
41
*      ENDIF.                                                "UF443580e
42
    ELSE.
43
      DESCRIBE TABLE dpl_sellist.
44
      IF sy-tfill GT 0.
45
        MOVE 'X' TO x_header-selection.
46
        MODIFY x_header INDEX 1.
47
      ENDIF.
48
    ENDIF.
49
  ELSEIF x_header-selection = 'X'.     "XB BCEK064860 begin
50
*<inital> not filled because the F3. XB int4436226
51
    DESCRIBE TABLE dba_sellist.
52
    IF sy-tfill GT 0.
53
      IF last_view_info EQ view_name.                       "UF443580b
54
* <initial> not yet filled in INITIALISIEREN
55
* because with F3 the last_view_info exists.
56
        PERFORM vim_set_init_from_sellist USING x_header-maintview
57
                                                x_namtab[]
58
                                                dba_sellist[]
59
                                                vim_hidden
60
                                          CHANGING <initial>.
61
      ENDIF.                                    "UF443580e
62
    ENDIF.           "XB BCEK064860 end
63
  ENDIF.
64
  IF x_header-adrnbrflag NE space.
65
* 4.0: check if new version of address maintenance must be used
66
    CALL FUNCTION 'ADDR_TSADRV_READ'
67
      EXPORTING
68
        ddic_tablename  = vim_addr_basetable
69
        ddic_fieldname  = vim_addr_bastab_field
70
      IMPORTING
71
        tsadrv_wa       = vim_tsadrv
72
      EXCEPTIONS
73
        entry_not_found = 1.
74
    IF sy-subrc NE 0.                  "no tsadrv entry found...
75
      IF x_header-adrnbrflag EQ 'N'.   "new version requires entry
76
        MESSAGE i287(am) WITH vim_addr_basetable vim_addr_bastab_field.
77
        CLEAR x_header-adrnbrflag. MODIFY x_header INDEX 1.
78
      ELSE. "old version runs but is old fashioned....
79
        IF vim_system_type EQ 'SAP'.   "sap system
80
          MESSAGE i290(am) WITH vim_addr_basetable  "...send message
81
                                vim_addr_bastab_field.
82
        ELSE.
83
          MESSAGE i291(am) WITH vim_addr_basetable  "...send message
84
                                vim_addr_bastab_field.
85
        ENDIF.
86
      ENDIF.
87
    ELSE.                              "entry found....
88
      IF vim_tsadrv-addr_group IS INITIAL. "...but not complete
89
*       I_TSADRV-ADDR_GROUP = 'CA01'. "default: Customizing Address
90
        IF x_header-adrnbrflag EQ 'N'. "new version
91
          i_messnbr = '292'.
92
        ELSE.                          "old version
93
          IF vim_system_type EQ 'SAP'. "sap system
94
            i_messnbr = '288'.
95
          ELSE.                        "customer system
96
            i_messnbr = '289'.
97
          ENDIF.
98
        ENDIF.
99
        MESSAGE ID 'AM' TYPE 'I' NUMBER i_messnbr
100
                        WITH vim_addr_basetable
101
                             vim_addr_bastab_field
102
                             vim_tsadrv-tablename
103
                             vim_tsadrv-fieldname.
104
        CLEAR x_header-adrnbrflag. MODIFY x_header INDEX 1.
105
      ELSE.                            "entry in TSADRV is complete
106
        vim_addr_group = vim_tsadrv-addr_group.
107
        IF x_header-adrnbrflag EQ 'O'.
108
          CALL FUNCTION 'ADDR_GET_STATUS_INFO'
109
            TABLES
110
              status_table = i_statetab.
111
          READ TABLE i_statetab WITH KEY
112
               constant = vim_tsadrv-addr_group.
113
          IF sy-subrc NE 0. CLEAR i_statetab-value. ENDIF.
114
          TRANSLATE i_statetab-value USING ' OXN'.
115
          x_header-adrnbrflag = i_statetab-value.
116
          MODIFY x_header INDEX 1.
117
        ENDIF.
118
      ENDIF.
119
    ENDIF.
120
  ENDIF.
121
  PERFORM vim_process_assigns.
122
  IF <status>-initializd EQ space.     "not processed yet
123
* reset dropdown lists
124
    CALL FUNCTION 'VRM_REFRESH_VALUES'.
125
    IF x_header-frm_af_ini NE space.   "user exit exists AND
126
* set environment for user exit.
127
      ASSIGN dba_sellist-*sys* TO <vim_sellist>.
128
      vim_enqueue_range = x_header-subsetflag. assigned = 'X'.
129
* perform user exit -> 3.0B processed in JUSTIFY_ACTION_MODE
130
      PERFORM (x_header-frm_af_ini) IN PROGRAM (sy-repid).
131
    ENDIF.
132
* backup DBA_SELLIST
133
*    REFRESH vim_dba_sel_kept.                        "UF210200b
134
*    APPEND LINES OF dba_sellist TO vim_dba_sel_kept.
135
* remove multiple values for subsets
136
    DELETE dba_sellist WHERE ddic = 'M'.
137
    DESCRIBE TABLE dba_sellist.
138
    IF sy-tfill GT 0.
139
      READ TABLE dba_sellist INDEX sy-tfill.
140
      CLEAR dba_sellist-and_or.
141
      MODIFY dba_sellist INDEX sy-tabix.
142
    ENDIF.                                                  "UF210200e
143
  ENDIF.
144
  IF view_action EQ aendern AND
145
     function EQ switch_to_update_mode AND
146
     vim_enq_s_u_rc NE 0.
147
    MOVE anzeigen TO view_action. action_changed = 'X'.
148
  ENDIF.
149
  IF x_header-existency EQ rdonly AND  "read only view
150
     ( view_action EQ aendern OR       "update or
151
       view_action EQ transportieren )."transport request
152
    MOVE anzeigen TO view_action. action_changed = 'X'.
153
    MESSAGE i044(sv).
154
  ENDIF.
155
  IF <status>-corr_nbr EQ vim_locked_in_corr AND "object locked and
156
     ( view_action EQ aendern OR       "update or
157
       view_action EQ transportieren )."transport request
158
    MOVE anzeigen TO view_action. action_changed = 'X'.
159
  ENDIF.
160
  IF view_action EQ aendern.
161
    IF vim_last_objh_view NE view_name.
162
      PERFORM vim_set_ale_edit_lock.
163
    ENDIF.
164
    IF vim_ale_edit_lock NE space.
165
      MOVE anzeigen TO view_action. action_changed = 'X'.
166
*     MESSAGE I044(SV).
167
      MESSAGE ID vim_ale_msgid TYPE 'I' NUMBER vim_ale_msgno
168
              WITH vim_ale_msgv1 vim_ale_msgv2
169
                   vim_ale_msgv3 vim_ale_msgv4.
170
    ENDIF.
171
  ENDIF.
172
  IF x_header-frm_on_aut NE space AND  "4.5a: support indiv. auth. chck
173
     <status>-initializd EQ space.     "not processed yet
174
    vim_auth_action = view_action.
175
    vim_auth_event = vim_auth_initial_check.
176
    ASSIGN dba_sellist[] TO <vim_auth_sellist>.
177
    PERFORM (x_header-frm_on_aut) IN PROGRAM.
178
    IF vim_auth_rc NE 0.
179
      MESSAGE ID vim_auth_msgid TYPE 'I' NUMBER vim_auth_msgno
180
              WITH vim_auth_msgv1 vim_auth_msgv2
181
                   vim_auth_msgv3 vim_auth_msgv4.
182
      CASE vim_auth_rc.
183
        WHEN 4.                        "show only
184
          MOVE anzeigen TO view_action. action_changed = 'X'.
185
        WHEN 8.                        "exit
186
          RAISE missing_corr_number.
187
      ENDCASE.
188
    ENDIF.
189
  ENDIF.
190
  IF action_changed NE space.
191
    IF assigned EQ space.
192
      ASSIGN dba_sellist-*sys* TO <vim_sellist>.
193
      vim_enqueue_range = x_header-subsetflag.
194
    ENDIF.
195
    PERFORM enqueue USING 'D' x_header-frm_af_enq. "dequeue view
196
  ENDIF.
197
  IF x_header-texttbexst <> space.     "SW Texttransl
198
    PERFORM vim_actualize_d0100.
199
  ENDIF.
200
ENDFORM.                    "justify_action_mode