Properties SourceCde
txt
1
*---------------------------------------------------------------------*
2
*       MODULE SET_UPDATE_FLAG                                        *
3
*---------------------------------------------------------------------*
4
*       ........                                                      *
5
*---------------------------------------------------------------------*
6
MODULE set_update_flag.
7
  CHECK status-action NE anzeigen AND  "ignore wrong setted requestflags
8
        status-action NE transportieren. "due to individual F4 modules
9
  IF x_header-delmdtflag NE space AND
10
     status-type EQ einstufig AND
11
     status-mode EQ list_bild.         "only on list screen
12
* check if dates entered properly
13
    IF ( <vim_new_begdate> EQ vim_init_date OR
14
       <vim_enddate_mask> EQ vim_init_date ).
15
      MESSAGE e127(sv)."Bitte den Gültigkeitsbereich eingrenzen
16
    ENDIF.
17
    CLEAR sy-subrc.
18
    IF status-action EQ kopieren AND vim_special_mode NE vim_delimit.
19
     READ TABLE vim_copied_indices WITH KEY level = vim_copy_call_level
20
                                               ex_ix = nextline.
21
    ENDIF.
22
    IF sy-subrc NE 0 OR       "copy mode and entry not yet processed or
23
       ( status-action EQ hinzufuegen AND <xact> EQ leer ).  "new entry
24
      neuer = 'J'.
25
      IF x_header-guidflag <> space.
26
        PERFORM vim_make_guid using space.
27
      ENDIF.
28
      IF x_header-frm_on_new NE space.
29
        PERFORM (x_header-frm_on_new) IN PROGRAM.
30
      ENDIF.
31
      PERFORM check_key.
32
      neuer = 'N'.
33
    ENDIF.
34
  ENDIF.
35
  IF x_header-bastab NE space AND x_header-texttbexst NE space.
36
    TRANSLATE <status>-upd_flag USING ' ETX'.
37
  ELSE.
38
    <status>-upd_flag = 'X'.
39
  ENDIF.
40
* check in non key field entries violate selection conditions
41
  PERFORM check_nonkey.
42
 
43
ENDMODULE.
44
 
45
*---------------------------------------------------------------------*
46
*       MODULE DETAIL_EXIT_COMMAND                                    *
47
*---------------------------------------------------------------------*
48
*       ........                                                      *
49
*---------------------------------------------------------------------*
50
MODULE detail_exit_command.
51
  PERFORM detail_exit_command.
52
ENDMODULE.
53
 
54
*---------------------------------------------------------------------*
55
*       MODULE LISTE_EXIT_COMMAND                                     *
56
*---------------------------------------------------------------------*
57
*       ........                                                      *
58
*---------------------------------------------------------------------*
59
MODULE liste_exit_command.
60
  PERFORM liste_exit_command.
61
ENDMODULE.
62
 
63
*---------------------------------------------------------------------*
64
*       MODULE LISTE_AFTER_LOOP                                       *
65
*---------------------------------------------------------------------*
66
*       ........                                                      *
67
*---------------------------------------------------------------------*
68
MODULE liste_after_loop.
69
** Table-control !!!
70
  IF vim_tabctrl_active NE space.
71
    IF nextline NE <vim_tctrl>-top_line.
72
      nextline = <vim_tctrl>-top_line.
73
    ENDIF.
74
  ENDIF.
75
** Table-control !!!
76
  IF destpage NE 0.
77
    nextline = destpage. CLEAR destpage.
78
  ENDIF.
79
* IF TEMPORAL_DELIMITATION_HAPPENED NE SPACE.
80
  IF vim_special_mode NE vim_upgrade AND
81
     vim_special_mode NE vim_delimit AND
82
     temporal_delimitation_happened NE space.
83
    PERFORM after_temporal_delimitation.
84
    CLEAR: temporal_delimitation_happened, vim_old_viewkey.
85
    TRANSLATE vim_no_mainkey_exists USING vim_no_mkey_not_procsd_patt.
86
  ENDIF.
87
  IF function IN mark_functions AND mark_extract EQ 0.
88
    MESSAGE s026(sv).                  "Bitte vorher Einträge markieren
89
    LEAVE SCREEN.
90
  ENDIF.
91
  PERFORM update_status.
92
  IF vim_single_entry_function EQ 'INS' AND
93
     vim_single_entry_ins_key_input NE space AND
94
     status-action EQ hinzufuegen.
95
    PERFORM vim_single_entry_fill_sellist.
96
  ENDIF.
97
  CLEAR: vim_next_screen, vim_leave_screen.
98
  CASE function.
99
    WHEN 'ADDR'.
100
      PERFORM liste_address_maintain.
101
    WHEN 'AEND'.
102
      PERFORM anzg_to_aend.
103
    WHEN 'ALCO'.
104
      PERFORM selektiere USING transportieren.
105
    WHEN 'ALMK'.
106
      PERFORM selektiere USING markiert.
107
    WHEN 'ALNC'.
108
      PERFORM selektiere USING space.
109
    WHEN 'ALOE'.
110
      PERFORM selektiere USING geloescht.
111
    WHEN 'ALNW'.
112
      PERFORM selektiere USING neuer_eintrag.
113
    WHEN 'ANZG'.
114
      PERFORM aend_to_anzg.
115
      vim_next_screen = 0. vim_leave_screen = 'X'.
116
    WHEN 'ATAB'.
117
      vim_next_screen = 0. vim_leave_screen = 'X'.
118
    WHEN 'BACK'.
119
      IF status-mode EQ list_bild AND status-data EQ gesamtdaten OR
120
        vim_single_entry_function NE space.
121
        vim_next_screen = 0. vim_leave_screen = 'X'.
122
      ELSE.
123
        PERFORM liste_back.
124
      ENDIF.
125
    WHEN 'BCCH'.                       "change fix bc-set fields
126
      PERFORM vim_chng_fix_flds.
127
    WHEN 'BCSH'.                        " show fix bc-set fields
128
      PERFORM vim_bc_show_fix_flds.
129
    WHEN 'BCON'.
130
      PERFORM selektiere USING bcset_only. "show only data from bcset
131
    WHEN 'CMPO'.
132
      PERFORM upgrade USING 'O'.
133
    WHEN 'CMPR'.
134
      PERFORM upgrade USING 'R'.
135
    WHEN 'COMP'.
136
      PERFORM upgrade USING space.
137
    WHEN 'DELE'.
138
      PERFORM loeschen.
139
      IF replace_mode NE space.
140
        <status>-mk_to = mark_total.
141
        <status>-mk_xt = mark_extract.
142
        vim_next_screen = 0. vim_leave_screen = 'X'.
143
      ENDIF.
144
    WHEN 'DELM'.
145
      PERFORM delimitation.
146
    WHEN 'DETM'.                       "UFdetail
147
      PERFORM detail_markierte.
148
    WHEN 'DETA'.
149
      PERFORM detailbild.
150
    WHEN 'ENDE'.
151
      vim_next_screen = 0. vim_leave_screen = 'X'.
152
    WHEN 'EXPA'.
153
*     PERFORM TIME_DEPENDENT_DISPLAY_MODIF.
154
      IF x_header-delmdtflag EQ space.
155
        MESSAGE s001(sv). EXIT.
156
      ENDIF.
157
      PERFORM (vim_time_dep_dpl_modif_form) IN PROGRAM.
158
    WHEN 'FDOC'.                       "HW Functiondocu
159
      PERFORM show_function_docu.
160
*    WHEN 'GPRF'.                       "UF Profile
161
* choose profile
162
*      CLEAR: <status>-prof_found, vim_pr_records.
163
*      PERFORM get_profiles USING <status>-prof_found.
164
    WHEN 'KOPE'.
165
      counter = 0.
166
      PERFORM kopiere.
167
    WHEN 'KOPF'.
168
      SET SCREEN 0. LEAVE SCREEN.
169
    WHEN 'LANG'.                       "SW Texttransl
170
      PERFORM vim_set_languages.
171
    WHEN 'MKAL'.
172
      PERFORM markiere_alle USING markiert.
173
    WHEN 'MKBL'.
174
      PERFORM markiere_block.
175
    WHEN 'MKEZ'.
176
      PERFORM liste_markiere.
177
    WHEN 'MKLO'.
178
      PERFORM markiere_alle USING nicht_markiert.
179
    WHEN 'NEWL'.
180
      PERFORM hinzufuegen.
181
    WHEN 'NEXT'.
182
      PERFORM naechster.
183
    WHEN 'ORDR'.
184
      PERFORM order_administration.
185
    WHEN 'ORGI'.
186
      PERFORM original_holen.
187
    WHEN 'POSI'.
188
      PERFORM popup_positionieren.
189
    WHEN 'PREV'.
190
      PERFORM voriger.
191
    WHEN 'PRMO'.
192
* 4.6A: obsolete, left for individual status only
193
      PERFORM list_alv.
194
    WHEN 'PROT'.
195
      PERFORM logs_analyse.
196
    WHEN 'PRST'.
197
      PERFORM list_alv.
198
    WHEN 'P+  '.
199
      PERFORM blaettern.
200
    WHEN 'P-  '.
201
      PERFORM blaettern.
202
    WHEN 'P++ '.
203
      PERFORM blaettern.
204
    WHEN 'P-- '.
205
      PERFORM blaettern.
206
    WHEN 'REPL'.
207
      PERFORM replace.
208
    WHEN 'SAVE'.
209
      IF status-action EQ hinzufuegen.
210
*       SORT EXTRACT BY <VIM_EXTRACT_KEY>.  "not nec. anymore
211
        <status>-firstline = firstline = <status>-cur_line = l = 1.
212
      ENDIF.
213
      vim_next_screen = 0. vim_leave_screen = 'X'.
214
    WHEN 'SCRF'.
215
      PERFORM vim_sapscript_form_maint.
216
    WHEN 'SEAR'.
217
      PERFORM suchen.
218
    WHEN 'SELU'.
219
      PERFORM selektiere USING aendern.
220
*    WHEN 'SPRF'.                       "UF Profile
221
* show chosen profile
222
*      PERFORM get_profiles USING <status>-prof_found.
223
    WHEN 'TEXT'.                       "SW Texttransl
224
      PERFORM vim_multi_langu_text_maint.
225
    WHEN 'TREX'.
226
      MOVE geloescht TO corr_action.
227
      PERFORM update_corr.
228
      IF replace_mode NE space.
229
        <status>-mk_to = mark_total.
230
        <status>-mk_xt = mark_extract.
231
        vim_next_screen = 0. vim_leave_screen = 'X'.
232
      ENDIF.
233
    WHEN 'TRIN'.
234
      MOVE hinzufuegen TO corr_action.
235
      PERFORM update_corr.
236
      IF replace_mode NE space.
237
        <status>-mk_to = mark_total.
238
        <status>-mk_xt = mark_extract.
239
        vim_next_screen = 0. vim_leave_screen = 'X'.
240
      ENDIF.
241
    WHEN 'TRSP'.
242
      IF x_header-cursetting NE space AND
243
         x_header-flag EQ vim_transport_denied.
244
        x_header-flag = x_header-cursetting.
245
        TRANSLATE x_header-flag USING 'X YX'.
246
        MODIFY x_header INDEX 1.
247
      ENDIF.
248
      vim_next_screen = 0. vim_leave_screen = 'X'.
249
    WHEN 'UNDO'.
250
*     PERFORM LISTE_ZURUECKHOLEN.
251
      PERFORM zurueckholen.
252
      IF replace_mode NE space.
253
        <status>-mk_to = mark_total.
254
        <status>-mk_xt = mark_extract.
255
        vim_next_screen = 0. vim_leave_screen = 'X'.
256
      ENDIF.
257
    WHEN 'UPRF'.                       "UF Profile
258
* activate chosen profile
259
*      PERFORM activate_profile CHANGING <status>-prof_found.
260
      message s175(SV).
261
    WHEN '    '.
262
      IF vim_single_entry_function EQ 'INS' AND
263
         status-action EQ hinzufuegen.
264
        PERFORM liste_back.
265
      ENDIF.
266
      IF replace_mode NE space.
267
        vim_next_screen = 0. vim_leave_screen = 'X'.
268
      ENDIF.
269
    WHEN OTHERS.
270
      IF vim_called_by_cluster NE space.
271
        CALL FUNCTION 'VIEWCLUSTER_NEXT_ACTION'
272
             IMPORTING
273
                  leave_screen = vim_leave_screen
274
             CHANGING
275
                  fcode        = function.
276
        IF vim_leave_screen NE space.
277
          vim_next_screen = 0.
278
        ENDIF.
279
      ENDIF.
280
  ENDCASE.
281
  IF vim_leave_screen NE space.
282
    CLEAR: vim_leave_screen, vim_act_dynp_view.
283
    SET SCREEN vim_next_screen. LEAVE SCREEN.
284
  ENDIF.
285
ENDMODULE.
286
 
287
*---------------------------------------------------------------------*
288
*       MODULE LISTE_BEFORE_LOOP                                      *
289
*---------------------------------------------------------------------*
290
*       ........                                                      *
291
*---------------------------------------------------------------------*
292
MODULE liste_before_loop.
293
  GET CURSOR FIELD f LINE l OFFSET o.
294
  function = ok_code.
295
  CLEAR: ok_code, <status>-upd_flag.
296
  IF vim_special_mode EQ vim_delete.
297
    SET SCREEN 0. LEAVE SCREEN.
298
  ENDIF.
299
* PERFORM READ_TABLE USING FIRSTLINE.
300
  IF replace_mode EQ space.
301
*   SET PF-STATUS 'ERRORLIS'.
302
    PERFORM set_pf_status USING 'ERRORLIS'.
303
*   CLEAR <STATUS>-UPD_FLAG.
304
    neuer = 'N'.
305
    IF vim_called_by_cluster NE space.
306
      CALL FUNCTION 'VIEWCLUSTER_SET_OKCODE'
307
           EXPORTING
308
                ok_code = function.
309
    ENDIF.
310
  ENDIF.
311
ENDMODULE.
312
 
313
*---------------------------------------------------------------------*
314
*       MODULE DETAIL_PAI                                             *
315
*---------------------------------------------------------------------*
316
*       ........                                                      *
317
*---------------------------------------------------------------------*
318
MODULE detail_pai.
319
  CLEAR: vim_next_screen, vim_leave_screen.
320
  function = ok_code.
321
  PERFORM detail_pai.
322
  IF vim_leave_screen NE space.
323
    CLEAR: vim_leave_screen, vim_act_dynp_view.
324
    SET SCREEN vim_next_screen. LEAVE SCREEN.
325
  ENDIF.
326
ENDMODULE.
327
 
328
*---------------------------------------------------------------------*
329
*       MODULE DETAIL_SET_PFSTATUS                                    *
330
*---------------------------------------------------------------------*
331
*       ........                                                      *
332
*---------------------------------------------------------------------*
333
MODULE detail_set_pfstatus.
334
  IF replace_mode EQ space.
335
*   SET PF-STATUS 'ERROR'.
336
    PERFORM set_pf_status USING 'ERROR'.
337
  ENDIF.
338
  IF x_header-delmdtflag NE space.
339
    EXPORT ok_code TO MEMORY ID vim_memory_id_2.
340
  ENDIF.
341
ENDMODULE.
342
 
343
*---------------------------------------------------------------------*
344
*       MODULE LISTE_MARK_CHECKBOX                                    *
345
*---------------------------------------------------------------------*
346
*       ........                                                      *
347
*---------------------------------------------------------------------*
348
MODULE liste_mark_checkbox.
349
  CHECK <xact> NE leer.
350
  CLEAR answer.
351
  IF vim_marked NE space AND <xmark> NE markiert.
352
    MOVE: markiert TO <xmark>, markiert TO answer.
353
    ADD: 1 TO mark_total, 1 TO mark_extract.
354
  ELSEIF vim_marked EQ space AND <xmark> NE nicht_markiert.
355
    MOVE: nicht_markiert TO <xmark>, markiert TO answer.
356
    SUBTRACT: 1 FROM mark_total, 1 FROM mark_extract.
357
  ENDIF.
358
  IF <status>-upd_flag EQ space AND answer NE space.  "only mouse mark
359
    MOVE nextline TO index.
360
    READ TABLE total WITH KEY <vim_xextract_key> BINARY SEARCH.
361
    PERFORM vorhanden.
362
  ENDIF.
363
  CLEAR answer.
364
ENDMODULE.
365
 
366
*---------------------------------------------------------------------*
367
*       MODULE LISTE_INIT_WORKAREA                                    *
368
*---------------------------------------------------------------------*
369
*       ........                                                      *
370
*---------------------------------------------------------------------*
371
MODULE liste_init_workarea.
372
  IF replace_mode NE space.
373
    IF vim_special_mode EQ vim_upgrade.
374
      <table2_x> = <vim_xtotal>.
375
    ELSEIF vim_special_mode EQ vim_replace.
376
      CLEAR <replace_field>.
377
    ENDIF.
378
  ENDIF.
379
  PERFORM move_extract_to_view_wa.
380
  MOVE nextline TO exind.
381
  CLEAR vim_pr_activating.
382
  IF <xact> = profil_hinzufuegen.      "UFprofiles begin
383
* Set update flags
384
    <table2_x> = <initial_x>.
385
    <xact> = leer.
386
    vim_pr_activating = 'X'.
387
    MODIFY extract INDEX sy-stepl.
388
    IF x_header-bastab NE space AND x_header-texttbexst NE space.
389
      <status>-upd_flag = 'E'.
390
    ELSE.
391
      <status>-upd_flag = 'X'.
392
    ENDIF.
393
  ENDIF.                               "UFprofiles end
394
  CLEAR: vim_key_alr_checked, vim_keyrange_alr_checked.
395
ENDMODULE.
396
 
397
*---------------------------------------------------------------------*
398
*       MODULE LISTE_UPDATE_LISTE                                     *
399
*---------------------------------------------------------------------*
400
*       ........                                                      *
401
*---------------------------------------------------------------------*
402
MODULE liste_update_liste.
403
  CHECK status-action NE anzeigen.
404
  CHECK status-action NE transportieren.
405
  CHECK status-delete NE geloescht.
406
  IF ok_code NE 'IGN '.
407
    IF x_header-ptfrkyexst NE space.
408
      PERFORM consistency_prt_frky_fields
409
                                   USING vim_show_consistency_alert.
410
    ENDIF.
411
    CASE status-action.                "UFprofile
412
      WHEN kopieren.                   "UFprofile
413
     READ TABLE vim_copied_indices WITH KEY level = vim_copy_call_level
414
                                                  ex_ix = nextline.
415
        IF sy-subrc EQ 0.              "entry alr. processed
416
          <xact> = neuer_eintrag.
417
          PERFORM update_tab.
418
        ELSE.
419
          PERFORM kopiere_eintrag USING <orig_key>.
420
        ENDIF.
421
      WHEN OTHERS.
422
        PERFORM update_tab.
423
    ENDCASE.
424
  ELSE.
425
    PERFORM set_pf_status USING 'ERRORLIS'.
426
  ENDIF.
427
  IF replace_mode EQ space.
428
    CLEAR ok_code.
429
  ENDIF.
430
ENDMODULE.
431
 
432
*---------------------------------------------------------------------*
433
*       MODULE TEMP_DELIMITATION                                      *
434
*---------------------------------------------------------------------*
435
*       ........                                                      *
436
*---------------------------------------------------------------------*
437
MODULE temp_delimitation.
438
  DATA: td_addr_safe LIKE adrc-addrnumber.
439
  CHECK x_header-delmdtflag NE space.
440
* set update flag (if begdate not in the set_update_flag-chain)
441
  CHECK status-action NE anzeigen AND  "ignore wrong set requestflags
442
        status-action NE transportieren. "due to individual F4 modules
443
  IF x_header-bastab NE space AND x_header-texttbexst NE space.
444
    <status>-upd_flag = 'E'.
445
  ELSE.
446
    <status>-upd_flag = 'X'.
447
  ENDIF.
448
* process delimitation
449
  vim_begdate_entered = 'X'.
450
  PERFORM temporal_delimitation.
451
  IF temporal_delimitation_happened EQ 'X' AND
452
     x_header-delmdtflag EQ 'B'.
453
    IF x_header-adrnbrflag = space.
454
      MOVE: <vim_xtotal_key> TO <f1_x>,
455
            <vim_begdate> TO <vim_new_begdate>.
456
    ELSE.
457
      MOVE: <address_number> TO td_addr_safe,
458
            <vim_xtotal_key> TO <f1_x>,
459
            td_addr_safe TO <address_number>,
460
            <vim_begdate> TO <vim_new_begdate>.
461
    ENDIF.
462
  ENDIF.
463
ENDMODULE.
464
 
465
*---------------------------------------------------------------------*
466
*       MODULE CONSISTENCY                                            *
467
*---------------------------------------------------------------------*
468
*       ........                                                      *
469
*---------------------------------------------------------------------*
470
MODULE consistency.
471
  EXIT.
472
* CHECK STATUS-MODE NE DETAIL_BILD.
473
* PERFORM CONSISTENCY_PRT_FRKY_FIELDS USING 'X'.
474
ENDMODULE.                             "consistency
475
 
476
*&---------------------------------------------------------------------*
477
*&      Module  VCL_HELP_VALUES  INPUT
478
*&---------------------------------------------------------------------*
479
* Modul zum Ereignis 'Process On Value-Request' innerhalb der          *
480
* Viewcluster-Pflege:
481
* Realisierung von F4 auf ein Feld, dessen Prüftabelle im selben
482
* Viewcluster gepflegt wird.
483
*----------------------------------------------------------------------*
484
MODULE vcl_help_values INPUT.
485
  DATA: vcl_event(3) .
486
  CLEAR: f, vim_object, vim_objfield.
487
* POV-Module, die an List-Boxen hängen, werden schon zum Zeitpunkt
488
* CONTROL OUT gerufen. Hier kann das betroffene Feld nicht über
489
* die Cursor-Position ermittelt werden.
490
  CALL 'DY_GET_DYNPRO_EVENT' ID 'EVENT' FIELD vcl_event.
491
  IF sy-subrc = 0 AND vcl_event = 'OUT'.
492
*   Aufruf zum Zeitpunkt Control Output
493
    MESSAGE i538(sv) WITH vim_calling_cluster view_name.
494
    EXIT.
495
  ENDIF.
496
 
497
  IF status-mode = 'L'.                " Listbild
498
    GET CURSOR FIELD f LINE l.
499
  ELSE.                                " Detailbild
500
    GET CURSOR FIELD f.
501
  ENDIF.
502
  SPLIT f AT '-' INTO vim_object vim_objfield.
503
  IF vim_objfield IS INITIAL.
504
    MESSAGE s084(sv).
505
  ELSE.
506
    CALL FUNCTION 'VIEWCLUSTER_HELP_VALUES_NEW'
507
         EXPORTING
508
              object    = vim_object
509
              fieldname = vim_objfield
510
         EXCEPTIONS
511
              OTHERS    = 1.
512
    IF sy-subrc <> 0.
513
      MESSAGE s084(sv).
514
    ENDIF.
515
  ENDIF.
516
ENDMODULE.                             " VCL_HELP_VALUES  INPUT