1 |
2 |
3 |
4 |
5 |
6 | FORM anzg_to_aend. |
7 | DATA: rc LIKE sy-subrc, dummy TYPE scpr_id, value(200) TYPE c, |
8 | value_is_external TYPE xfeld, lfieldname TYPE fnam_____4, |
9 | keyvalues TYPE occheckkeyflds, w_keyvalue TYPE occheckkey, |
10 | oc_rangetab TYPE TABLE OF vimsellist, lines TYPE i, |
11 | any_substflds_initial TYPE xfeld, field1 LIKE sy-msgv1, |
12 | field2 LIKE sy-msgv2, field3 LIKE sy-msgv3, |
13 | field4 LIKE sy-msgv4. |
14 | FIELD-SYMBOLS: <w_dba_sel> TYPE vimsellist, <x_namtab> TYPE vimnamtab, |
15 | <value> TYPE c. |
16 | |
17 | IF status-action NE anzeigen AND status-action NE transportieren. |
18 | MESSAGE i001(sv). |
19 | ELSE. |
20 | IF status-action EQ anzeigen. |
21 |
22 | IF x_header-newgener EQ space. "4.5a: support individual auth.chck |
23 | CALL FUNCTION 'VIEW_AUTHORITY_CHECK' |
24 | EXPORTING |
25 | view_action = aendern |
26 | view_name = view_name |
27 | no_warning_for_clientindep = vim_no_warning_for_cliindep |
28 | CHANGING |
29 | org_crit_inst = vim_oc_inst |
30 | EXCEPTIONS |
31 | no_authority = 8 |
32 | no_clientindependent_authority = 9 |
33 | no_linedependent_authority = 11. |
34 | rc = sy-subrc. |
35 | IF sy-subrc = 11. |
36 | MOVE: sy-msgid TO vim_auth_msgid, |
37 | sy-msgno TO vim_auth_msgno, |
38 | sy-msgv1 TO vim_auth_msgv1, |
39 | sy-msgv2 TO vim_auth_msgv2, |
40 | sy-msgv3 TO vim_auth_msgv3, |
41 | sy-msgv4 TO vim_auth_msgv4. |
42 | ENDIF. |
43 | ENDIF. |
44 | IF x_header-frm_on_aut NE space. |
45 | vim_auth_action = aendern. |
46 | vim_auth_event = vim_auth_switch_to_update_mode. |
47 | ASSIGN <vim_ck_sellist> TO <vim_auth_sellist>. |
48 | PERFORM (x_header-frm_on_aut) IN PROGRAM. |
49 | IF vim_auth_rc NE 0. rc = 10. ENDIF. |
50 | ENDIF. |
51 | ENDIF. |
52 | CASE rc. |
53 | WHEN 0. |
54 | IF NOT vim_oc_inst IS INITIAL AND vim_called_by_cluster = space. |
55 |
56 |
57 |
58 | INSERT LINES OF dba_sellist[] INTO TABLE oc_rangetab. |
59 | LOOP AT x_namtab ASSIGNING <x_namtab> WHERE keyflag <> space |
60 | AND readonly = subset. |
61 | DELETE oc_rangetab WHERE viewfield = <x_namtab>-viewfield. |
62 | ENDLOOP. |
63 | IF sy-subrc = 0. |
64 | DESCRIBE TABLE oc_rangetab LINES lines. |
65 | if lines > 0. |
66 | READ TABLE oc_rangetab ASSIGNING <w_dba_sel> INDEX lines. |
67 | CLEAR <w_dba_sel>-and_or. |
68 | endif. |
69 | ENDIF. |
70 | CALL METHOD vim_oc_inst->check_oc_auth_vim_sellist |
71 | EXPORTING |
72 | sellist = oc_rangetab |
73 | action = '02' |
74 |
75 |
76 | EXCEPTIONS |
77 | no_auth = 1 |
78 | OTHERS = 2. |
79 | IF sy-subrc <> 0. |
80 | MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno |
81 | WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. |
82 | EXIT. |
83 | ENDIF. |
84 | IF x_header-subsetflag <> space. |
85 |
86 | CALL METHOD vim_oc_inst->build_key_value_tab |
87 | EXPORTING |
88 | entry = <initial> |
89 | IMPORTING |
90 | keyvalues = keyvalues. |
91 | LOOP AT keyvalues INTO w_keyvalue. |
92 | READ TABLE x_namtab ASSIGNING <x_namtab> |
93 | WITH KEY viewfield = w_keyvalue-keyname. |
94 | CHECK <x_namtab>-readonly <> subset. |
95 | DELETE keyvalues. |
96 | ENDLOOP. |
97 | CALL METHOD vim_oc_inst->check_oc_authority |
98 | EXPORTING |
99 | activity = '02' |
100 | CHANGING |
101 | key_values = keyvalues |
102 | EXCEPTIONS |
103 | no_auth = 1 |
104 | key_incomplete = 2 |
105 |
106 | OTHERS = 4. |
107 | IF sy-subrc = 1. |
108 | MOVE: sy-msgv1 TO field1, sy-msgv2 TO field2, |
109 | sy-msgv3 TO field3, sy-msgv4 TO field4. |
110 |
111 | MESSAGE i763(sv) WITH field1 field2 field3 field4. |
112 |
113 | LOOP AT keyvalues INTO w_keyvalue WHERE noauth <> space. |
114 | READ TABLE dba_sellist ASSIGNING <w_dba_sel> |
115 | WITH KEY viewfield = w_keyvalue-keyname. |
116 | CLEAR: <w_dba_sel>-value, <w_dba_sel>-initial, |
117 | <w_dba_sel>-from_auth. "UF210200 |
118 | ENDLOOP. |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 | CALL FUNCTION 'TABLE_RANGE_INPUT' |
136 | EXPORTING |
137 | table = x_header-viewname |
138 | oc_inst = vim_oc_inst |
139 | TABLES |
140 | sellist = dba_sellist |
141 | x_header = x_header |
142 | x_namtab = x_namtab |
143 | EXCEPTIONS |
144 | cancelled_by_user = 1 |
145 | no_input = 2 |
146 | OTHERS = 3. |
147 | IF sy-subrc <> 0. |
148 | EXIT. |
149 | ENDIF. |
150 |
151 |
152 | ENDIF. |
153 | ELSE. |
154 |
155 |
156 | MESSAGE s764(sv). |
157 |
158 | ENDIF. "subsets exist |
159 | ENDIF. "oc exists |
160 | IF status-action EQ transportieren. |
161 | function = switch_transp_to_upd_mode. |
162 | CLEAR <status>-crcntsknwn. |
163 | IF <status>-corr_enqud NE space. |
164 | CALL FUNCTION 'DEQUEUE_E_TRKORR' |
165 | EXPORTING |
166 | trkorr = <status>-corr_nbr. |
167 |
168 | CLEAR <status>-corr_enqud. |
169 | ENDIF. |
170 | IF x_header-cursetting NE space. |
171 | CLEAR: vim_corr_obj_viewname, <status>-tr_alrchkd. |
172 | ENDIF. |
173 | ELSE. |
174 | CLEAR vim_corr_obj_viewname. |
175 | IF <status>-prof_found = vim_profile_found "UF profileb |
176 | AND vim_pr_records = 0. |
177 |
178 | PERFORM get_pr_nbr_records USING vim_profile_values |
179 | x_header |
180 | CHANGING rc |
181 | dummy |
182 | vim_pr_records |
183 | vim_pr_tab |
184 | vim_pr_fields. |
185 |
186 | PERFORM get_profile_status CHANGING vim_pr_tab |
187 | vim_pr_fields. |
188 | PERFORM bcset_key_check_in_total. |
189 | ENDIF. "UF profileb |
190 | ENDIF. |
191 |
192 |
193 | vim_next_screen = 0. vim_leave_screen = 'X'. |
194 | WHEN 8. "no authority for update |
195 | MESSAGE i051(sv). "only show allowed |
196 | WHEN 9. |
197 | MESSAGE ID 'TB' TYPE 'I' NUMBER 109. "no cli-indep auth |
198 | WHEN 10 OR 11. |
199 | MESSAGE ID vim_auth_msgid TYPE 'I' NUMBER vim_auth_msgno |
200 | WITH vim_auth_msgv1 vim_auth_msgv2 vim_auth_msgv3 |
201 | vim_auth_msgv4. |
202 | ENDCASE. |
203 | ENDIF. |
204 | ENDFORM. |