Properties SourceCde
txt
1
*----------------------------------------------------------------------*
2
*   INCLUDE LSVIMFX2                                                   *
3
*----------------------------------------------------------------------*
4
*---------------------------------------------------------------------*
5
*       FORM DETAILBILD                                               *
6
*---------------------------------------------------------------------*
7
*       .........                                                     *
8
*---------------------------------------------------------------------*
9
FORM detailbild.
10
  IF status-mode NE list_bild OR status-type NE zweistufig.
11
    MESSAGE i001(sv).
12
    EXIT.
13
  ENDIF.
14
  nextline = firstline + l - 1.
15
  IF l EQ 0 OR nextline GT maxlines.
16
    MESSAGE s032(sv).
17
    MOVE firstline TO nextline.
18
    EXIT.
19
  ENDIF.
20
  IF mark_extract > 0.                 "ufdetailb
21
    PERFORM set_mark_only USING nextline.
22
  ENDIF.                               "ufdetaile
23
  IF x_header-delmdtflag NE space.
24
    TRANSLATE vim_no_mainkey_exists USING vim_no_mkey_not_procsd_patt.
25
  ENDIF.
26
  PERFORM process_detail_screen USING 'S'.
27
ENDFORM.
28
*---------------------------------------------------------------------*
29
*       FORM DETAIL_ABBRECHEN
30
**---------------------------------------------------------------------*
31
*       ........                                                      *
32
*---------------------------------------------------------------------*
33
FORM detail_abbrechen.
34
  IF replace_mode EQ space AND
35
     ( sy-datar NE space OR
36
       ( x_header-bastab EQ space OR x_header-texttbexst EQ space )
37
       AND <table1_x> NE <table2_x>
38
       OR  x_header-bastab NE space AND x_header-texttbexst NE space
39
       AND ( <table1_x> NE <vim_xextract_enti>
40
             OR <table1_xtext> NE <vim_xextract_text> ) ).
41
    CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
42
         EXPORTING
43
              titel          = svim_text_007
44
              textline1      = svim_text_009
45
              textline2      = svim_text_006
46
              defaultoption  = 'N'
47
              cancel_display = ' '
48
         IMPORTING
49
              answer         = answer.
50
    IF answer NE 'J'.
51
      EXIT.
52
    ENDIF.
53
  ENDIF.
54
  IF status-action EQ kopieren.
55
    SET SCREEN 0.
56
    LEAVE SCREEN.
57
  ENDIF.
58
  IF maxlines LE 1.
59
*   IF STATUS-ACTION EQ HINZUFUEGEN OR STATUS-ACTION EQ KOPIEREN.
60
    IF status-action EQ hinzufuegen.
61
      status-action = aendern.
62
      title-action  = aendern.
63
      CLEAR <status>-selected.
64
    ENDIF.
65
    PERFORM fill_extract.
66
    nextline = 1.
67
  ENDIF.
68
  neuer = 'N'.
69
  IF vim_single_entry_function EQ space.
70
    <status>-upd_flag = space.
71
    IF replace_mode EQ space AND vim_special_mode NE vim_delete.
72
      l = nextline - <status>-firstline + 1.
73
      IF l LE 0 OR l GT looplines.
74
        l = 1.
75
      ENDIF.
76
      nextline = <status>-firstline.
77
      SET SCREEN liste.
78
    ELSE.
79
      SET SCREEN 0. CLEAR vim_act_dynp_view.
80
    ENDIF.
81
  ELSE.                                "single_entry_function
82
    function = end. SET SCREEN 0. CLEAR vim_act_dynp_view.
83
    PERFORM update_status.
84
  ENDIF.
85
  LEAVE SCREEN.
86
ENDFORM.
87
*---------------------------------------------------------------------*
88
*       FORM DETAIL_BACK                                              *
89
*---------------------------------------------------------------------*
90
*       ........                                                      *
91
*---------------------------------------------------------------------*
92
FORM detail_back.
93
 
94
  DATA:count TYPE i.
95
 
96
  CASE status-action.
97
    WHEN aendern.
98
      PERFORM update_tab.
99
    WHEN hinzufuegen.
100
*      WRITE <f1> TO entry(x_header-keylen).
101
      move <f1_x> to <f1_wax>.
102
      PERFORM update_tab.
103
      neuer = 'N'.
104
*      SORT extract BY <vim_extract_key>.
105
      SORT extract BY <vim_xextract_key>.
106
*      MOVE entry TO <table1>.
107
*      READ TABLE extract WITH KEY <f1> BINARY SEARCH.
108
      READ TABLE extract WITH KEY <f1_x>.
109
      firstline = 1.
110
      IF sy-tabix GT looplines AND looplines GT 0.
111
        count = ( sy-tabix - firstline ) div looplines + 1.
112
        DO count TIMES.
113
          firstline = firstline + looplines - 1.
114
        ENDDO.
115
        MOVE firstline TO <status>-firstline.
116
      ENDIF.
117
      l = sy-tabix - firstline + 1.
118
      MOVE l TO <status>-cur_line.
119
      MOVE <initial> TO <table1>.
120
      IF x_header-bastab NE space AND x_header-texttbexst NE space.
121
        MOVE <text_initial_x> TO <table1_xtext>.
122
*        MOVE <text_initial> TO <table1_text>.
123
      ENDIF.
124
  ENDCASE.
125
  IF status-data EQ auswahldaten AND maxlines LE 1.
126
    <table1_wax> = <vim_xextract>.
127
    IF status-delete = geloescht.
128
      status-delete = nicht_geloescht.
129
      title-action  = aendern.
130
      PERFORM markiere_alle USING nicht_markiert.
131
    ENDIF.
132
    IF status-action EQ hinzufuegen.
133
      status-action = aendern.
134
      title-action  = aendern.
135
      CLEAR <status>-selected.
136
    ENDIF.
137
    IF x_header-delmdtflag NE space.
138
      <vim_h_mkey>(x_header-keylen) = <f1_x>.
139
      LOOP AT vim_collapsed_mainkeys. "WHERE mkey_bf EQ <vim_f1_before>.
140
        IF vim_collapsed_mainkeys-mkey_bf EQ space. "SW: wie liste_back
141
* change XB 11.06.02 BCEK060520/BCEK060521 ----------begin--------------
142
* if <vim_collapsed_mkey_bfx> should be changed, only when it isn't
143
* constant 4B00, that means data isn't at position 0.
144
          if <vim_collapsed_mkey_bfx> NE <vim_mkey_beforex>.
145
          <vim_collapsed_mkey_bfx> = <vim_collapsed_logkeyx>.
146
*          vim_collapsed_mainkeys-mkey_bf =
147
*                                       vim_collapsed_mainkeys-log_key.
148
          endif.
149
* change XB 11.06.02 BCEK060520/BCEK060521 ------------end--------------
150
          CLEAR vim_collapsed_mainkeys-log_key.
151
        ENDIF.                                              "SW
152
        <f1_x> = <vim_h_coll_mkey>.
153
*        <f1> = vim_collapsed_mainkeys-mainkey.
154
        <vim_enddate_mask> = space.
155
        <vim_h_coll_mkey> = <f1_x>.
156
*        vim_collapsed_mainkeys-mainkey = <f1>.
157
        MODIFY vim_collapsed_mainkeys.
158
      ENDLOOP.
159
      IF vim_delim_expa_excluded NE space.
160
        DELETE excl_cua_funct WHERE function EQ 'EXPA'.
161
        CLEAR vim_delim_expa_excluded.
162
      ENDIF.
163
      IF status-action = aendern AND title-action = hinzufuegen.
164
        title-action  = aendern.
165
      ENDIF.
166
    ENDIF.
167
    PERFORM fill_extract.
168
*    <table1> = entry(x_header-keylen).
169
*    READ TABLE extract WITH KEY <f1>.
170
    READ TABLE extract WITH KEY <f1_wax>.
171
    IF sy-subrc EQ 0.
172
      nextline = sy-tabix.
173
    ELSE.
174
      nextline = 1.
175
    ENDIF.
176
  ELSE.
177
    MOVE firstline TO nextline.
178
  ENDIF.
179
  vim_next_screen = liste. vim_leave_screen = 'X'.
180
ENDFORM.
181
*&--------------------------------------------------------------------*
182
*&      Form  DETAIL_EXIT_COMMAND                                     *
183
*&--------------------------------------------------------------------*
184
* handle exit commands on detail screen                               *
185
*&--------------------------------------------------------------------*
186
FORM detail_exit_command.
187
  DATA: answer.
188
  function = ok_code.
189
  CLEAR vim_old_viewkey.
190
  TRANSLATE vim_no_mainkey_exists USING vim_no_mkey_not_procsd_patt.
191
  CASE ok_code.
192
    WHEN 'ABR '.
193
      CLEAR ok_code.
194
      PERFORM detail_abbrechen.
195
    WHEN 'IGN '.
196
      PERFORM ignorieren.
197
    WHEN 'UPRF'.                       "UFprofileB
198
      CHECK vim_pr_activating = space.
199
*      IF SY-DATAR <> SPACE.
200
*        CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
201
*             EXPORTING
202
*                  TEXTLINE1      = SVIM_TEXT_PRF
203
*                  TEXTLINE2      = SVIM_TEXT_PRG
204
*                  TITEL          = SVIM_TEXT_PRE
205
*                  CANCEL_DISPLAY = ' '
206
*             IMPORTING
207
*                  ANSWER         = ANSWER.
208
*        IF ANSWER <> 'J'.
209
*          CLEAR: FUNCTION, OK_CODE.
210
*        ENDIF.
211
*      ENDIF.
212
      IF NOT function IS INITIAL.
213
        PERFORM vim_pr_mand_fields.
214
      ENDIF.
215
    WHEN 'GPRF'.
216
      CHECK vim_pr_activating = space.
217
      PERFORM vim_pr_mand_fields         .         "UFprofileE
218
  ENDCASE.
219
ENDFORM.                               "detail_exit_command
220
*---------------------------------------------------------------------*
221
*       FORM DETAIL_INIT                                              *
222
*---------------------------------------------------------------------*
223
*       ........                                                      *
224
*---------------------------------------------------------------------*
225
FORM detail_init.
226
  CONSTANTS: forward VALUE 'X'.
227
  IF function NE space.
228
    status-mode = detail_bild.
229
    title-mode  = detail_bild.
230
    IF <xmark> EQ markiert.
231
      status-mark = markiert.
232
    ELSE.
233
      status-mark = nicht_markiert.
234
    ENDIF.
235
    IF status-action NE kopieren AND neuer NE 'J'.
236
      IF <status>-selected = by_field_contents AND nextline > maxlines.
237
        nextline = 1.                  "377434/1999 UF011299
238
      ENDIF.
239
      IF x_header-subsetflag NE space AND replace_mode EQ space.
240
        PERFORM fill_subsetfields.
241
      ENDIF.
242
* ========== XB int225314/03 H601454 begin ==========
243
* maxlines must GT nextline in EXTRACT, otherweise the
244
* empty entry in EXTRACT will be readed.
245
      if nextline > maxlines.
246
        PERFORM read_table USING maxlines.
247
      else.
248
        PERFORM read_table USING nextline.
249
      endif.
250
* ========== XB int225314/03 H601454 end   ==========
251
      IF x_header-subsetflag NE space.
252
        PERFORM complete_subsetfields.
253
      ENDIF.
254
    ENDIF.
255
    IF vim_special_mode EQ vim_delimit.
256
      MOVE vim_sval_tab-value TO <vim_new_begdate>.
257
    ENDIF.
258
  ENDIF.
259
  CLEAR: vim_key_alr_checked, vim_keyrange_alr_checked.
260
  vim_act_dynp_view = x_header-viewname.
261
  PERFORM set_title USING title <name>.
262
  CASE replace_mode.
263
    WHEN space.
264
*     SET PF-STATUS STATUS EXCLUDING EXCL_CUA_FUNCT.
265
      IF neuer NE 'X'. "error in CHECK_KEY for timedep. objects
266
        IF vim_special_mode NE vim_delete.
267
          PERFORM set_pf_status USING status.
268
        ELSE.
269
          PERFORM set_pf_status USING 'REPLACE'.
270
        ENDIF.
271
      ENDIF.
272
    WHEN OTHERS.
273
*     SUPPRESS DIALOG.
274
*     SET PF-STATUS 'REPLACE'.
275
      PERFORM set_pf_status USING 'REPLACE'.
276
*     IF X_HEADER-BASTAB NE SPACE AND X_HEADER-TEXTTBEXST NE SPACE.
277
*     IF VIM_SPECIAL_MODE NE VIM_UPGRADE AND
278
*        X_HEADER-BASTAB NE SPACE AND X_HEADER-TEXTTBEXST NE SPACE.
279
*       IF REPLACE_TEXTTABLE_FIELD NE SPACE.
280
*         MOVE 'T' TO <STATUS>-UPD_FLAG.
281
*       ELSE.
282
*         MOVE 'E' TO <STATUS>-UPD_FLAG.
283
*       ENDIF.
284
*     ELSE.
285
*       MOVE 'X' TO <STATUS>-UPD_FLAG.
286
*     ENDIF.
287
*     EXIT.
288
  ENDCASE.
289
ENDFORM.
290
*---------------------------------------------------------------------*
291
*       FORM DETAIL_LOESCHE                                           *
292
*---------------------------------------------------------------------*
293
*       ........                                                      *
294
*---------------------------------------------------------------------*
295
FORM detail_loesche.
296
  DATA: tot_ix LIKE sy-tabix, rec LIKE sy-subrc,
297
        delete_fix_value(1) TYPE c,
298
        entry_contains_fix_val(1) TYPE c,
299
        w_field TYPE vimty_fields_type,
300
        bc_fix_del_info_sent(1) TYPE c VALUE ' '.
301
 
302
*   -------Authority check before deleting fix values from BC-Sets------
303
    delete_fix_value = vim_bc_chng_allowed.
304
    IF vim_bc_chng_allowed = space.  "fix field changeability forced
305
      READ TABLE vim_bc_entry_list INTO vim_bc_entry_list_wa
306
      WITH TABLE KEY viewname = x_header-viewname
307
      keys = <vim_xextract_key>.
308
      IF sy-subrc = 0.
309
        CLEAR entry_contains_fix_val.
310
        LOOP at vim_bc_entry_list_wa-fields into w_field.
311
          IF w_field-flag = vim_profile_fix.
312
            entry_contains_fix_val = 'X'.
313
          ENDIF.
314
        ENDLOOP.
315
        IF entry_contains_fix_val = 'X'.
316
          IF bc_fix_del_info_sent EQ SPACE AND
317
             <status>-bcfixdelinfosent NE 'Y'."HCG: del dependent VCL
318
            bc_fix_del_info_sent = 'X'.
319
            <status>-bcfixdelinfosent = 'X'.
320
            MESSAGE i177(SV).
321
          ENDIF.
322
        ELSE.
323
          delete_fix_value = 'X'.
324
        ENDIF.
325
      ELSE.
326
        delete_fix_value = 'X'.
327
      ENDIF.
328
    ENDIF.
329
    CHECK delete_fix_value EQ 'X'.
330
*   -------------------------------------------------------------"HCG---
331
  IF <xmark> NE uebergehen.
332
    READ TABLE total WITH KEY <vim_xextract_key> BINARY SEARCH.
333
    MOVE sy-tabix TO tot_ix.
334
    IF x_header-existency EQ 'M'.      "no mainkey delete allowed
335
      PERFORM check_if_entry_can_be_deleted.
336
      IF sy-subrc NE 0.
337
        <xmark> = uebergehen. ignored_entries_exist = 'X'.
338
        MODIFY extract INDEX nextline.
339
        <mark> = uebergehen.
340
        MODIFY total INDEX tot_ix.
341
        EXIT.
342
      ENDIF.
343
    ENDIF.
344
    PERFORM logical_delete_from_total USING tot_ix.
345
    IF <xmark> EQ markiert.
346
      mark_total  = mark_total - 1.
347
      mark_extract = mark_extract - 1.
348
    ENDIF.
349
    IF x_header-delmdtflag NE space.
350
      IF vim_special_mode NE vim_upgrade.
351
        PERFORM check_if_entry_is_to_display USING 'L' <vim_xtotal_key>
352
                                                   space <vim_begdate>.
353
      ELSE.
354
        CLEAR sy-subrc.
355
      ENDIF.
356
    ENDIF.
357
    IF x_header-delmdtflag EQ space OR sy-subrc LT 8.
358
      rec = sy-subrc.
359
      DELETE extract INDEX nextline.
360
      IF rec EQ 4.
361
        LOOP AT total.
362
          PERFORM select USING <status>-selected.
363
          CHECK sy-subrc EQ 0.
364
          CHECK <vim_tot_mkey_beforex> EQ <vim_old_mkey_beforex> AND
365
                ( vim_mkey_after_exists EQ space OR
366
                  <vim_tot_mkey_afterx> EQ <vim_old_mkey_afterx> ).
367
*          CHECK <vim_tot_mkey_before> EQ <vim_old_mkey_before> AND
368
*                ( vim_mkey_after_exists EQ space OR
369
*                  <vim_tot_mkey_after> EQ <vim_old_mkey_after> ).
370
          vim_mainkey = vim_old_viewkey.
371
          extract = total.
372
          PERFORM mod_extract_and_mainkey_tab USING 'I' nextline.
373
          EXIT.
374
        ENDLOOP.
375
      ENDIF.
376
    ENDIF.
377
    IF vim_special_mode EQ vim_upgrade.
378
      counter = 1.
379
      EXIT.
380
    ENDIF.
381
    IF ignored_entries_exist EQ space AND maxlines GT 1.
382
      MESSAGE s013(sv).
383
    ELSE.
384
      MESSAGE i013(sv).
385
    ENDIF.
386
  ENDIF.
387
  IF <status>-mark_only <> space.      "ufdetailb
388
    DESCRIBE TABLE extract LINES maxlines.
389
    IF mark_extract = 0.
390
* last marked entry deleted
391
      nextline = 1.
392
      vim_next_screen = liste. vim_leave_screen = 'X'.
393
    ELSE.
394
* search next marked entry
395
      nextline = nextline - 1.
396
      PERFORM get_marked_entry USING 'X'
397
                  CHANGING nextline
398
                           rec.
399
      IF rec <> 0.
400
* search previous marked entry
401
        nextline = nextline + 1.
402
        PERFORM get_marked_entry USING space
403
                    CHANGING nextline
404
                             rec.
405
      ENDIF.
406
      IF rec <> 0.
407
        nextline = 1. vim_next_screen = liste. vim_leave_screen = 'X'.
408
      ELSE.
409
        PERFORM get_page_and_position USING nextline
410
                                            looplines
411
                                      CHANGING firstline
412
                                               l.
413
      ENDIF.
414
    ENDIF.
415
 
416
  ELSE.                                "ufdetaile
417
    DESCRIBE TABLE extract LINES maxlines.
418
    IF maxlines EQ 0.
419
      nextline = 1.
420
      IF status-action EQ hinzufuegen.
421
        status-action = aendern.
422
        title-action = aendern.
423
      ENDIF.
424
      PERFORM fill_extract.
425
      vim_next_screen = liste. vim_leave_screen = 'X'.
426
    ENDIF.
427
    IF nextline GT maxlines.
428
      nextline = maxlines.
429
    ENDIF.
430
  ENDIF.                               "ufdetail
431
  READ TABLE total INDEX tot_ix.
432
  CLEAR vim_old_viewkey.
433
  TRANSLATE vim_no_mainkey_exists USING vim_no_mkey_not_procsd_patt.
434
ENDFORM.
435
*---------------------------------------------------------------------*
436
*       FORM DETAIL_MARKIERE                                          *
437
*---------------------------------------------------------------------*
438
*       ........                                                      *
439
*---------------------------------------------------------------------*
440
FORM detail_markiere.
441
  IF neuer EQ 'J'.
442
    EXIT.
443
  ENDIF.
444
  PERFORM update_tab.
445
* PERFORM MARKIERE USING FIRSTLINE.
446
  PERFORM markiere USING nextline.
447
  CLEAR function.
448
ENDFORM.
449
 
450
 
451
*---------------------------------------------------------------------*
452
*       FORM DETAIL_MARKIERTE                                         *
453
*---------------------------------------------------------------------*
454
*       UF300798 Detail-screen only with marked entries except line-
455
*                selection on list-screen
456
*---------------------------------------------------------------------*
457
FORM detail_markierte.
458
 
459
  DATA: rc LIKE sy-subrc.
460
 
461
  IF status-mode NE list_bild OR status-type NE zweistufig.
462
    MESSAGE i001(sv).
463
    EXIT.
464
  ENDIF.
465
  IF mark_extract = 0.
466
* no entries marked
467
    PERFORM detailbild.
468
    EXIT.
469
  ENDIF.
470
  <status>-mark_only = 'X'.
471
** current entry marked?
472
*  nextline = firstline + l - 1.
473
*  PERFORM check_marked USING nextline
474
*                       CHANGING rc.
475
*  IF rc <> 0.
476
* search first marked entry
477
  nextline = 0.
478
  PERFORM get_marked_entry USING 'X'
479
                           CHANGING nextline
480
                                    rc.
481
  IF rc <> 0. PERFORM detailbild. EXIT. ENDIF.
482
*  ENDIF.
483
  IF x_header-delmdtflag NE space.
484
    TRANSLATE vim_no_mainkey_exists USING vim_no_mkey_not_procsd_patt.
485
  ENDIF.
486
  PERFORM process_detail_screen USING 'S'.
487
ENDFORM.
488
 
489
*---------------------------------------------------------------------*
490
*       FORM DETAIL_PAI                                               *
491
*---------------------------------------------------------------------*
492
*       ........                                                      *
493
*---------------------------------------------------------------------*
494
* <--- NEXT_SCREEN - next screen to process                           *
495
* <--- LEAVE_SCREEN - flag: X - leave screen necessary                *
496
*---------------------------------------------------------------------*
497
FORM detail_pai.
498
  CLEAR: vim_next_screen, vim_leave_screen.
499
  MOVE: status-data TO <status>-st_data,
500
        status-mode TO <status>-st_mode,
501
        status-delete TO <status>-st_delete,
502
        status-action TO <status>-st_action,
503
        title         TO <status>-title,
504
        maxlines      TO <status>-maxlines,
505
        mark_extract  TO <status>-mk_xt,
506
        mark_total    TO <status>-mk_to,
507
        function      TO <status>-fcode.
508
  IF x_header-ptfrkyexst NE space.
509
    PERFORM consistency_prt_frky_fields USING 'X'.
510
  ENDIF.
511
* IF TEMPORAL_DELIMITATION_HAPPENED NE SPACE AND
512
*    STATUS-ACTION NE KOPIEREN.
513
  IF <status>-prof_found <> space.
514
    CLEAR vim_pr_fields_wa.            "UFprofiles
515
  ENDIF.
516
  IF vim_special_mode NE vim_upgrade AND
517
     temporal_delimitation_happened NE space AND
518
     status-action NE kopieren.
519
    PERFORM update_tab.
520
    PERFORM after_temporal_delimitation.
521
    CLEAR temporal_delimitation_happened.
522
    PERFORM check_if_entry_is_to_display USING 'L' <f1_x> space
523
                                               <vim_begdate>.
524
    IF status-action EQ hinzufuegen.
525
      IF function NE 'NEXT'.
526
        CASE sy-subrc.
527
          WHEN 0.                      "expanded mode or new entry
528
            PERFORM read_table USING nextline.
529
          WHEN 4.                      "collapsed mode and actual entry
530
            READ TABLE extract WITH KEY <f1_x>.
531
            nextline = sy-tabix.
532
            extract = total.
533
            CLEAR function.
534
          WHEN OTHERS.                 "collapsed mode and other entry
535
            LOOP AT extract.
536
              CHECK <vim_ext_mkey_beforex> EQ <vim_f1_beforex> AND
537
                    ( vim_mkey_after_exists EQ space OR
538
                    <vim_ext_mkey_afterx> EQ <vim_f1_afterx> ).
539
              nextline = sy-tabix.
540
              EXIT.
541
            ENDLOOP.
542
            extract = total.
543
            CLEAR function.
544
        ENDCASE.
545
      ENDIF.
546
    ELSE.
547
      IF sy-subrc EQ 0.
548
        ADD 1 TO exind.
549
        nextline = exind.
550
      ENDIF.
551
    ENDIF.
552
  ENDIF.
553
* FUNCTION = OK_CODE.
554
  CLEAR ok_code.
555
  IF replace_mode NE space AND
556
     ( vim_special_mode NE vim_upgrade OR
557
       NOT function IN exted_functions ).
558
    PERFORM update_tab.
559
*   SET SCREEN 0.
560
    vim_next_screen = 0. vim_leave_screen = 'X'.
561
    EXIT.
562
  ELSEIF vim_special_mode EQ vim_delete.
563
    vim_next_screen = 0. vim_leave_screen = 'X'. EXIT.
564
  ENDIF.
565
  IF vim_single_entry_function NE space AND function NE space.
566
    IF vim_single_entry_ins_key_input EQ space.
567
      TRANSLATE status-action USING 'AU'. status-data = gesamtdaten.
568
    ENDIF.
569
    IF function EQ 'UEBE'.
570
      function = 'ENDE'.
571
    ENDIF.
572
  ENDIF.
573
  CASE function.
574
    WHEN 'ADDR'.
575
      PERFORM address_maintain.
576
    WHEN 'AEND'.
577
      PERFORM anzg_to_aend.
578
    WHEN 'ALCO'.
579
      PERFORM selektiere USING transportieren.
580
    WHEN 'ALMK'.
581
      PERFORM selektiere USING markiert.
582
    WHEN 'ALNC'.
583
      PERFORM selektiere USING space.
584
    WHEN 'ALOE'.
585
      PERFORM selektiere USING geloescht.
586
    WHEN 'ALNW'.
587
      PERFORM selektiere USING neuer_eintrag.
588
    WHEN 'ANZG'.
589
      PERFORM update_tab.
590
      IF l EQ 0. MOVE: 1 TO l, 1 TO <status>-cur_line. ENDIF.
591
*        SET SCREEN 0. LEAVE SCREEN.
592
      vim_next_screen = 0. vim_leave_screen = 'X'.
593
    WHEN 'ATAB'.
594
      PERFORM update_tab.
595
      IF l EQ 0. MOVE: 1 TO l, 1 TO <status>-cur_line. ENDIF.
596
*     SET SCREEN 0. LEAVE SCREEN.
597
      vim_next_screen = 0. vim_leave_screen = 'X'.
598
    WHEN 'BCCH'.                       "change fix bc-set fields
599
      PERFORM vim_chng_fix_flds.
600
    WHEN 'BCSH'.                        " show fix bc-set fields
601
      PERFORM vim_bc_show_fix_flds.
602
    WHEN 'DELE'.
603
*     PERFORM DETAIL_LOESCHE.
604
      PERFORM loeschen.
605
      IF replace_mode NE space.
606
        <status>-mk_to = mark_total.
607
        <status>-mk_xt = mark_extract.
608
        vim_next_screen = 0. vim_leave_screen = 'X'.
609
        EXIT.
610
      ENDIF.
611
    WHEN 'DELM'.
612
      PERFORM delimitation.
613
    WHEN 'ENDE'.
614
      PERFORM update_tab.
615
      IF l EQ 0. MOVE: 1 TO l, 1 TO <status>-cur_line. ENDIF.
616
*     SET SCREEN 0. LEAVE SCREEN.
617
      vim_next_screen = 0. vim_leave_screen = 'X'.
618
    WHEN 'EXPA'.
619
*     perform ........
620
    WHEN 'FDOC'.                       "HW Functiondocu
621
      PERFORM show_function_docu.
622
      CLEAR function.
623
*    WHEN 'GPRF'.                       "UF Profile
624
* choose profile
625
*      CLEAR: <status>-prof_found, vim_pr_records.
626
*      PERFORM get_profiles USING <status>-prof_found.
627
    WHEN 'KOPE'.
628
      counter = 0.
629
      PERFORM kopiere.
630
    WHEN 'KOPF'.
631
*       IF X_HEADER-ADRNBRFLAG NE SPACE.
632
*         PERFORM ADDRESS_MAINTAIN.
633
*       ENDIF.
634
      PERFORM kopiere_eintrag USING <orig_key>.
635
    WHEN 'LANG'.                       "SW Texttransl
636
      PERFORM vim_set_languages.
637
      CLEAR function.
638
    WHEN 'MKEZ'.
639
      PERFORM detail_markiere.
640
    WHEN 'NEWL'.
641
      PERFORM update_tab.
642
      CLEAR <status>-mark_only.        "UFdetail
643
      PERFORM hinzufuegen.
644
    WHEN 'NEXT'.
645
      PERFORM naechster.
646
    WHEN 'ORDR'.
647
      PERFORM order_administration.
648
    WHEN 'ORGI'.
649
      PERFORM original_holen.
650
    WHEN 'POSI'.
651
      PERFORM popup_positionieren.
652
    WHEN 'PREV'.
653
      PERFORM voriger.
654
    WHEN 'PRMO'.
655
* 4.6A: obsolete, left only for individual status
656
      PERFORM update_tab.
657
      PERFORM list_alv.
658
    WHEN 'PROT'.
659
      PERFORM logs_analyse.
660
    WHEN 'PRST'.
661
      PERFORM update_tab.
662
      PERFORM list_alv.
663
    WHEN 'SAVE'.
664
      PERFORM update_tab.
665
      IF status-action EQ hinzufuegen.
666
        SORT extract BY <vim_xextract_key>.
667
*        READ TABLE extract WITH KEY extract BINARY SEARCH.
668
        READ TABLE extract WITH KEY <vim_xextract_key>.
669
        <status>-cur_line = l = sy-tabix - firstline + 1.
670
      ENDIF.
671
*     SET SCREEN 0. LEAVE SCREEN.
672
      vim_next_screen = 0. vim_leave_screen = 'X'.
673
    WHEN 'SCRF'.
674
      PERFORM update_tab.
675
      PERFORM vim_sapscript_form_maint.
676
    WHEN 'SEAR'.
677
      PERFORM update_tab.
678
      PERFORM suchen.
679
    WHEN 'SELU'.
680
      PERFORM selektiere USING aendern.
681
    WHEN 'TEXT'.
682
      PERFORM update_tab.
683
      PERFORM vim_multi_langu_text_maint.
684
    WHEN 'TREX'.
685
      MOVE geloescht TO corr_action.
686
      PERFORM update_corr.
687
      IF replace_mode NE space.
688
        <status>-mk_to = mark_total.
689
        <status>-mk_xt = mark_extract.
690
        vim_next_screen = 0. vim_leave_screen = 'X'.
691
        EXIT.
692
      ENDIF.
693
    WHEN 'TRIN'.
694
      MOVE hinzufuegen TO corr_action.
695
      PERFORM update_corr.
696
      IF replace_mode NE space.
697
        <status>-mk_to = mark_total.
698
        <status>-mk_xt = mark_extract.
699
        vim_next_screen = 0. vim_leave_screen = 'X'.
700
        EXIT.
701
      ENDIF.
702
    WHEN 'TRSP'.
703
*     SET SCREEN 0. LEAVE SCREEN.
704
      IF x_header-cursetting NE space AND
705
         x_header-flag EQ vim_transport_denied.
706
        x_header-flag = x_header-cursetting.
707
        TRANSLATE x_header-flag USING 'X YX'.
708
        MODIFY x_header INDEX 1.
709
      ENDIF.
710
      vim_next_screen = 0. vim_leave_screen = 'X'.
711
    WHEN 'UEBE'.
712
      PERFORM detail_back.
713
    WHEN 'UPRF'.
714
* activate chosen profile
715
*      PERFORM activate_profile CHANGING <status>-prof_found.
716
      message s175(SV).
717
    WHEN 'UNDO'.
718
*     PERFORM DETAIL_ZURUECKHOLEN.
719
      PERFORM zurueckholen.
720
      IF replace_mode NE space.
721
        <status>-mk_to = mark_total.
722
        <status>-mk_xt = mark_extract.
723
        vim_next_screen = 0. vim_leave_screen = 'X'.
724
        EXIT.
725
      ENDIF.
726
    WHEN '    '.
727
      IF vim_prt_fky_flds_updated NE space.
728
        CLEAR vim_prt_fky_flds_updated.
729
        PERFORM update_tab.
730
      ELSE.
731
        IF x_header-frm_h_flds NE space.
732
          PERFORM (x_header-frm_h_flds) IN PROGRAM.
733
        ENDIF.
734
        IF neuer EQ 'J' AND vim_key_alr_checked EQ space.
735
*          IF x_header-guidflag <> space.
736
*            PERFORM vim_make_guid.
737
*          ENDIF.
738
          IF x_header-frm_on_new NE space.
739
            PERFORM (x_header-frm_on_new) IN PROGRAM.
740
          ENDIF.
741
        ENDIF.
742
        PERFORM check_key.
743
      ENDIF.
744
    WHEN OTHERS.
745
      IF vim_called_by_cluster NE space.                    "SW Crtl ..
746
        CALL FUNCTION 'VIEWCLUSTER_NEXT_ACTION'
747
             EXPORTING
748
                  detail       = 'X'
749
             IMPORTING
750
                  leave_screen = vim_leave_screen
751
             CHANGING
752
                  fcode        = function.
753
        IF vim_leave_screen NE space.
754
          PERFORM update_tab.
755
          vim_next_screen = 0.
756
        ENDIF.
757
      ENDIF.                           ".. SW Ctrl
758
  ENDCASE.
759
ENDFORM.
760
 
761
*---------------------------------------------------------------------*
762
*       FORM DETAIL_ZURUECKHOLEN                                       *
763
*---------------------------------------------------------------------*
764
*       ........                                                      *
765
*---------------------------------------------------------------------*
766
FORM detail_zurueckholen.
767
  DATA: tot_ix LIKE sy-tabix, msg_type(1) TYPE c, msg_no LIKE sy-msgno,
768
        rc LIKE sy-subrc.
769
  IF x_header-delmdtflag NE space.
770
    counter = 1.
771
    PERFORM temporal_delimitation.
772
  ENDIF.
773
  IF <xmark> EQ markiert.
774
    mark_total  = mark_total - 1.
775
    mark_extract = mark_extract - 1.
776
  ENDIF.
777
  READ TABLE total WITH KEY <vim_xextract_key> BINARY SEARCH.
778
  MOVE sy-tabix TO tot_ix.
779
  PERFORM logical_undelete_total USING sy-tabix.
780
  IF temporal_delimitation_happened NE space.
781
    CLEAR vim_delim_entries.
782
    PERFORM check_if_entry_is_to_display USING 'L' <vim_xtotal_key>
783
                                               space <vim_begdate>.
784
    IF sy-subrc LT 8.
785
      vim_delim_entries-index3 = nextline.
786
      IF sy-subrc EQ 4.
787
        LOOP AT total.
788
          CHECK <action> EQ geloescht OR <action> EQ neuer_geloescht OR
789
                <action> EQ update_geloescht.
790
          CHECK <vim_tot_mkey_beforeX> EQ <vim_old_mkey_beforeX> AND
791
                ( vim_mkey_after_exists EQ space OR
792
                  <vim_tot_mkey_afterX> EQ <vim_old_mkey_afterX> ).
793
*          CHECK <vim_tot_mkey_before> EQ <vim_old_mkey_before> AND
794
*                ( vim_mkey_after_exists EQ space OR
795
*                  <vim_tot_mkey_after> EQ <vim_old_mkey_after> ).
796
          vim_delim_entries-index1 = sy-tabix.
797
          vim_delim_entries-index2 = vim_delim_entries-index3.
798
          EXIT.
799
        ENDLOOP.
800
      ENDIF.
801
      APPEND vim_delim_entries.
802
    ENDIF.
803
    PERFORM after_temporal_delimitation.
804
    CLEAR temporal_delimitation_happened.
805
  ELSE.
806
    IF replace_mode NE space AND vim_external_mode EQ space.
807
      extract = total.
808
      MODIFY extract INDEX nextline.   "no deletion in upgrade mode
809
    ELSE.
810
      DELETE extract INDEX nextline.
811
      SUBTRACT 1 FROM maxlines.
812
    ENDIF.
813
  ENDIF.
814
  IF replace_mode EQ space.
815
    IF counter GT 1. msg_no = '002'. ELSE. msg_no = '003'. ENDIF.
816
    IF ignored_entries_exist EQ space.
817
      msg_type = 'S'.
818
    ELSE.
819
      msg_type = 'W'.
820
    ENDIF.
821
    MESSAGE ID 'SV' TYPE msg_type NUMBER msg_no WITH counter.
822
    IF nextline NE 1 AND nextline GT maxlines.
823
      nextline = maxlines.
824
    ENDIF.
825
    IF maxlines EQ 0.
826
      title-action = aendern.
827
      status-delete = nicht_geloescht.
828
      vim_next_screen = liste. vim_leave_screen = 'X'.
829
    ELSEIF <status>-mark_only <> space.
830
      IF mark_extract = 0.
831
* last marked entry deleted
832
        nextline = 1.
833
        vim_next_screen = liste. vim_leave_screen = 'X'.
834
      ELSE.
835
* search next marked entry
836
        nextline = nextline - 1.
837
        PERFORM get_marked_entry USING 'X'
838
                    CHANGING nextline
839
                             rc.
840
        IF rc <> 0.
841
* search previous marked entry
842
          nextline = nextline + 1.
843
          PERFORM get_marked_entry USING space
844
                      CHANGING nextline
845
                               rc.
846
        ENDIF.
847
        IF rc <> 0.
848
          nextline = 1. vim_next_screen = liste. vim_leave_screen = 'X'.
849
        ELSE.
850
          PERFORM get_page_and_position USING nextline
851
                                              looplines
852
                                        CHANGING firstline
853
                                                 l.
854
        ENDIF.
855
      ENDIF.
856
    ENDIF.
857
    READ TABLE total INDEX tot_ix.
858
  ELSE.
859
    counter = 1.
860
  ENDIF.
861
  CLEAR vim_old_viewkey.
862
  TRANSLATE vim_no_mainkey_exists USING vim_no_mkey_not_procsd_patt.
863
ENDFORM.
864
 
865
*&---------------------------------------------------------------------*
866
*&      Form  GET_MARKED_ENTRY
867
*&---------------------------------------------------------------------*
868
*       Search marked entries in EXTRACT beginning at index p_index
869
*----------------------------------------------------------------------*
870
*      -->P_FORWARD  'X': search forward
871
*                    ' ': search backward
872
*      <--P_index    in: start from here (including)
873
*                    out: index of first marked entry found
874
*      <--P_RC       0: further marked entry found
875
*                    4: no further marked entry found
876
*----------------------------------------------------------------------*
877
FORM get_marked_entry USING    p_forward TYPE sychar01
878
                      CHANGING p_index LIKE sy-tabix
879
                               p_rc LIKE sy-subrc.
880
  DATA: bw_index LIKE sy-tabix.
881
 
882
  p_rc = 4.
883
  IF p_forward IS INITIAL.
884
* search backward
885
    bw_index = p_index - 1.
886
    WHILE bw_index > 0.
887
      READ TABLE extract INDEX bw_index.
888
      IF <xmark> = markiert.
889
        p_index = bw_index.
890
        CLEAR p_rc.
891
        EXIT.
892
      ENDIF.
893
      bw_index = bw_index - 1.
894
    ENDWHILE.
895
  ELSE.
896
* search forward.
897
    p_index = p_index + 1.
898
    LOOP AT extract FROM p_index.
899
      CHECK <xmark> = markiert.
900
      p_index = sy-tabix.
901
      CLEAR p_rc.
902
      EXIT.
903
    ENDLOOP.
904
    IF p_rc > 0.
905
      p_index = p_index - 1.
906
    ENDIF.
907
  ENDIF.
908
ENDFORM.                               " GET_MARKED_ENTRY
909
*---------------------------------------------------------------------*
910
*       FORM NAECHSTER                                                *
911
*---------------------------------------------------------------------*
912
*       ........                                                      *
913
*---------------------------------------------------------------------*
914
FORM naechster.
915
  DATA: last_list_pos LIKE sy-tabix, rc LIKE sy-subrc.
916
  IF status-action NE anzeigen AND status-action NE transportieren
917
  AND status-mode NE list_bild.
918
    PERFORM update_tab.
919
  ENDIF.
920
  IF <status>-mark_only = space.       "ufdetail
921
* jump to next entry
922
    nextline = nextline + 1.
923
    IF nextline GT maxlines.
924
      IF status-action NE hinzufuegen.
925
        nextline = maxlines.
926
        MESSAGE s008(sv).
927
        EXIT.
928
      ELSE.
929
        IF status-type EQ zweistufig AND
930
           status-mode EQ detail_bild.
931
          neuer = 'J'.
932
          MOVE <initial> TO <table1>.
933
          MOVE <table1> TO <vim_extract_struc>.
934
          IF x_header-bastab NE space AND x_header-texttbexst NE space.
935
            MOVE: <text_initial_x> TO <table1_xtext>,
936
                 <table1_xtext> TO <vim_xextract_text>.
937
*            MOVE: <text_initial_x> TO <table1_text>,
938
*                  <table1_text> TO <extract_text>.
939
          ENDIF.
940
          nextline = maxlines + 1.
941
        ELSE.
942
          nextline = nextline - 1.
943
          MESSAGE s008(sv).
944
        ENDIF.
945
      ENDIF.
946
    ENDIF.
947
  ELSE.                                "ufdetailb
948
* jump to next marked entry
949
    PERFORM get_marked_entry USING 'X'
950
                             CHANGING nextline
951
                                      rc.
952
    IF rc <> 0.
953
      MESSAGE s830(sv).
954
*   Letzter markierter Eintrag bereits erreicht.
955
      EXIT.
956
    ENDIF.
957
  ENDIF.                               "ufdetaile
958
  IF looplines = 0.
959
* coming from lower viewcluster-node
960
    l = nextline - firstline + 1.
961
    MOVE l TO <status>-cur_line.
962
  ELSEIF looplines = 1.
963
    firstline = l = 1.
964
    MOVE: firstline TO <status>-firstline,
965
          l         TO <status>-cur_line.
966
  ELSEIF looplines > 1.
967
    IF status-mode EQ detail_bild.
968
      last_list_pos = firstline + looplines - 1.
969
      IF nextline GT last_list_pos.
970
        IF <status>-mark_only = space. "ufdetail
971
          firstline = firstline + looplines - 1.
972
          l = 2.
973
        ELSE.                          "ufdetailb
974
          PERFORM get_page_and_position USING nextline
975
                                              looplines
976
                                        CHANGING firstline
977
                                                 l.
978
        ENDIF.                         "ufdetaile
979
        MOVE: firstline TO <status>-firstline,
980
              l         TO <status>-cur_line.
981
      ELSE.
982
        IF status-mode NE list_bild.
983
          l = nextline - firstline + 1.
984
          MOVE l TO <status>-cur_line.
985
        ENDIF.
986
      ENDIF.
987
    ENDIF.
988
  ENDIF.
989
ENDFORM.
990
*&---------------------------------------------------------------------*
991
*&      Form  SET_MARK_ONLY
992
*&---------------------------------------------------------------------*
993
*       Sets status flag if entry with index p_index is marked.
994
*----------------------------------------------------------------------*
995
*      -->P_index  EXTRACT-index
996
*----------------------------------------------------------------------*
997
FORM set_mark_only USING    p_index LIKE sy-tabix.
998
  DATA: rc LIKE sy-subrc.
999
  PERFORM check_marked USING p_index
1000
                       CHANGING rc.
1001
  IF rc = 0.
1002
    <status>-mark_only = 'X'.
1003
  ENDIF.
1004
ENDFORM.                               " SET_MARK_ONLY
1005
*---------------------------------------------------------------------*
1006
*       FORM PROCESS_DETAIL_SCREEN                                    *
1007
*---------------------------------------------------------------------*
1008
* process detail screen call                                          *
1009
*---------------------------------------------------------------------*
1010
* ---> MODE - C -> call mode (CALL SCREEN), S -> set mode (SET SCREEN)*
1011
*---------------------------------------------------------------------*
1012
FORM process_detail_screen USING value(mode) TYPE c.
1013
  DATA: modulpool LIKE trdir-name, no_input_happened(1) TYPE c,
1014
        state_action(1) TYPE c.
1015
  IF detail NE '0000'.
1016
    IF mode EQ 'S'.
1017
      SET SCREEN detail.
1018
      LEAVE SCREEN.
1019
    ELSE.
1020
      PERFORM vim_imp_call_screen USING detail.
1021
    ENDIF.
1022
  ELSE.
1023
    RAISE detail_scr_nbr_missing.
1024
  ENDIF.
1025
ENDFORM.
1026
*---------------------------------------------------------------------*
1027
*       FORM VORIGER                                                  *
1028
*---------------------------------------------------------------------*
1029
*       NEXTLINE:   Index of current entry in table EXTRACT
1030
*       FIRSTLINE:  EXTRACT-index of first line shown on list screen
1031
*       L:          Line number of list screen, where entry was chosen
1032
*                   via F2
1033
*       LOOPLINES:  Number of step loop lines in list screen
1034
*---------------------------------------------------------------------*
1035
FORM voriger.
1036
  DATA: rc LIKE sy-subrc, n TYPE i.
1037
 
1038
  IF status-action NE anzeigen AND status-action NE transportieren
1039
  AND status-mode NE list_bild.
1040
    PERFORM update_tab.
1041
  ENDIF.
1042
  IF <status>-mark_only = space.       "ufdetail
1043
* jump to previous entry
1044
    nextline = nextline - 1.
1045
    IF nextline LE 0.
1046
      nextline = 1.
1047
      MESSAGE s007(sv).
1048
    ELSEIF nextline LT firstline.
1049
* scroll upwards
1050
      IF looplines > firstline.
1051
* bumping into top of EXTRACT
1052
        firstline = 1.
1053
        l = nextline.
1054
      ELSE.
1055
        firstline = firstline - looplines + 1.
1056
        l = looplines - 1.
1057
      ENDIF.
1058
      MOVE: firstline TO <status>-firstline,
1059
           l         TO <status>-cur_line.
1060
    ELSE.
1061
      l = nextline - firstline + 1.
1062
      MOVE l TO <status>-cur_line.
1063
    ENDIF.
1064
  ELSE.                                "ufdetailb
1065
* jump to previous marked entry
1066
    n = nextline DIV ( looplines - 1 ).
1067
    PERFORM get_marked_entry USING space
1068
                             CHANGING nextline rc.
1069
    IF rc > 0.
1070
      MESSAGE s831(sv).
1071
*   Erster markierter Eintrag bereits erreicht.
1072
    ELSE.
1073
      IF nextline LT firstline.
1074
        PERFORM get_page_and_position USING nextline
1075
                                            looplines
1076
                                      CHANGING firstline
1077
                                               l.
1078
        MOVE: firstline TO <status>-firstline,
1079
              l         TO <status>-cur_line.
1080
      ELSE.
1081
        l = nextline - firstline + 1.
1082
        MOVE l TO <status>-cur_line.
1083
      ENDIF.
1084
    ENDIF.
1085
  ENDIF.                               "ufdetaile
1086
ENDFORM.
1087
*&---------------------------------------------------------------------*
1088
*&      Form  CHECK_MARKED
1089
*&---------------------------------------------------------------------*
1090
*       text
1091
*----------------------------------------------------------------------*
1092
*      -->P_P_INDEX  text
1093
*      <--P_RC  text
1094
*----------------------------------------------------------------------*
1095
FORM check_marked USING    p_index LIKE sy-tabix
1096
                  CHANGING p_rc LIKE sy-subrc.
1097
 
1098
  p_rc = 4.
1099
  READ TABLE extract INDEX p_index.
1100
  IF sy-subrc = 0 AND <xmark> = markiert. CLEAR p_rc. ENDIF.
1101
ENDFORM.                               " CHECK_MARKED
1102
*&---------------------------------------------------------------------*
1103
*&      Form  GET_PAGE_AND_POSITION
1104
*&---------------------------------------------------------------------*
1105
*       text
1106
*----------------------------------------------------------------------*
1107
*      -->P_LINE      line in EXTRACT
1108
*      -->P_LOOPLINES # lines in list screen
1109
*      <--P_FIRST     number of first line in list screen
1110
*      <--P_PAGELINE  number of line no. P_LINE in list screen
1111
*----------------------------------------------------------------------*
1112
FORM get_page_and_position USING    p_line LIKE sy-tabix
1113
                                    p_looplines LIKE sy-tabix
1114
                           CHANGING p_first LIKE sy-tabix
1115
                                    p_pageline LIKE sy-tabix.
1116
  DATA: m TYPE i.
1117
  m = p_line DIV ( p_looplines - 1 ).
1118
  p_first = m * ( p_looplines - 1 ) + 1.
1119
  p_pageline = p_line MOD ( p_looplines - 1 ).
1120
ENDFORM.                               " GET_PAGE_AND_POSITION
1121
 
1122
*---------------------------------------------------------------------*
1123
*       FORM  VIM_MODIFY_DETAIL_SCREEN                                *
1124
*---------------------------------------------------------------------*
1125
* Modifizieren der Screen-Attribute für das Detailbild                *
1126
*---------------------------------------------------------------------*
1127
FORM vim_modify_detail_screen.
1128
 
1129
  DATA: dummyflag TYPE xfeld.
1130
 
1131
  CLEAR vim_set_from_bc_pbo.
1132
* dataset from BC-set? --> get field parameters
1133
  IF replace_mode = space AND status-action = aendern
1134
   AND vim_bc_chng_allowed = space.    "force changeability
1135
    READ TABLE vim_bc_entry_list INTO vim_bc_entry_list_wa
1136
     WITH TABLE KEY viewname = x_header-viewname
1137
     keys = <vim_xextract_key>.
1138
    IF sy-subrc = 0.
1139
      vim_set_from_bc_pbo = 'X'.
1140
    ENDIF.
1141
  ENDIF.
1142
  LOOP AT SCREEN.
1143
    SPLIT screen-name AT '-' INTO vim_object vim_objfield. "Subviews ..
1144
    IF status-action EQ anzeigen OR status-action EQ transportieren OR
1145
       status-delete EQ geloescht.
1146
      screen-input = '0'.
1147
    ELSE.
1148
      IF screen-group1 EQ 'KEY' AND screen-required NE 0 AND
1149
         screen-input NE '0'.
1150
        screen-input = '0'.
1151
      ENDIF.
1152
      IF status-action EQ hinzufuegen OR
1153
         status-action EQ kopieren.
1154
        IF neuer CO 'XJ' .
1155
          IF screen-group1 EQ 'KEY'.
1156
            IF ( vim_single_entry_function NE 'INS' OR
1157
                 vim_single_entry_ins_key_input NE space ) AND
1158
               ( x_header-existency NE 'M' OR
1159
                 screen-name EQ vim_enddate_name ).
1160
              screen-input = '1'.
1161
            ENDIF.
1162
            IF vim_single_entry_function EQ 'INS'.
1163
              screen-request = '1'. sy-subrc = 8.
1164
            ENDIF.
1165
          ENDIF.
1166
          IF vim_special_mode EQ vim_upgrade AND function NE 'DELE'.
1167
            IF <status>-prof_found = vim_pr_into_view "UFprofiles begin
1168
             AND screen-group1 = 'KEY'.
1169
              PERFORM set_profile_key_attributes USING vim_objfield
1170
                                                 CHANGING screen-input
1171
                                                     vim_modify_screen.
1172
              CLEAR vim_modify_screen.
1173
            ENDIF.                     "UFprofiles end
1174
            screen-request = '1'. sy-subrc = 8.
1175
          ENDIF.
1176
        ENDIF.
1177
        IF vim_pr_activating <> space.
1178
          IF screen-required = '1'.
1179
* obligatory fields shall not stop profile import
1180
            screen-required = '0'.     "UFprofile
1181
          ENDIF.
1182
        ENDIF.
1183
      ELSE.
1184
        IF replace_mode NE space.
1185
          CASE vim_special_mode.
1186
            WHEN vim_replace.
1187
              IF screen-name EQ sel_field_for_replace_l.
1188
                screen-request = '1'. sy-subrc = 8.
1189
                IF screen-invisible = '1'.
1190
                  screen-input = '1'.
1191
                ENDIF.
1192
              ENDIF.
1193
            WHEN vim_upgrade.
1194
              IF NOT function IN exted_functions.
1195
                screen-request = '1'. sy-subrc = 8.
1196
              ENDIF.
1197
*             screen-input = '1'.
1198
          ENDCASE.
1199
        ELSE.
1200
          IF vim_special_mode EQ vim_delete.
1201
            screen-input = '0'.
1202
          ENDIF.
1203
          IF x_header-delmdtflag NE space AND
1204
             x_header-existency EQ 'U' AND
1205
             screen-name EQ vim_begdate_name.
1206
            screen-input = '0'.
1207
          ENDIF.
1208
        ENDIF.
1209
        IF status-action = aendern AND neuer <> 'J'.
1210
          IF vim_set_from_bc_pbo <> space.
1211
* Dataset comes from BC-set -> check field parameter
1212
            PERFORM vim_bc_logs_use USING    vim_objfield
1213
                                             vim_bc_entry_list_wa
1214
                                    CHANGING screen
1215
                                             dummyflag.
1216
          ENDIF.
1217
        ENDIF.
1218
      ENDIF. "status-action EQ hinzufuegen OR status-action EQ kopieren.
1219
    ENDIF.
1220
    IF <xmark> EQ markiert AND <status>-mark_only = space. "ufdetail
1221
      screen-intensified = '1'.
1222
    ENDIF.
1223
    IF vim_objfield <> space AND vim_object = x_header-maintview.
1224
      LOOP AT x_namtab WHERE viewfield = vim_objfield AND
1225
                             ( texttabfld = space OR keyflag = space ).
1226
        IF x_namtab-readonly = vim_hidden.
1227
          screen-active = '0'.
1228
        ELSEIF x_namtab-readonly = rdonly.
1229
          screen-input = '0'.
1230
        ENDIF.
1231
        EXIT.
1232
      ENDLOOP.
1233
    ENDIF.                             ".. Subviews
1234
    MODIFY SCREEN.
1235
  ENDLOOP.
1236
ENDFORM.                               "vim_modify_detail_screen