Properties SourceCde
txt
1
*&--------------------------------------------------------------------*
2
*&      Form ZURUECKHOLEN                                             *
3
*&--------------------------------------------------------------------*
4
* Behandeln der Funktion 'UNDO'                                       *
5
*---------------------------------------------------------------------*
6
FORM zurueckholen.
7
 
8
  DATA: number_of_ign_entr TYPE i, key_safe TYPE tabl1024,
9
        z_ign_entr_ex(1) TYPE c, z_specmode_safe(1) TYPE c.
10
 
11
  IF status-action NE aendern OR status-delete NE geloescht.
12
    MESSAGE i001(sv).
13
    EXIT.
14
  ENDIF.
15
  CLEAR counter. z_specmode_safe = vim_special_mode.
16
  vim_special_mode = vim_undelete.
17
  IF status-mode EQ detail_bild.
18
    MOVE <xmark> TO deta_mark_safe.
19
    IF x_header-delmdtflag NE space.
20
      PERFORM check_if_entry_is_to_display USING 'L' <vim_xextract_key>
21
                                                 space <vim_begdate>.
22
      number_of_ign_entr = sy-subrc.
23
      key_safe = <vim_xextract_key>.
24
    ENDIF.
25
*   IF <STATUS>-DISPL_MODE EQ EXPANDED.
26
    IF x_header-delmdtflag EQ space OR number_of_ign_entr LT 8.
27
      READ TABLE extract INDEX nextline.
28
    ELSE.
29
      READ TABLE total WITH KEY key_safe BINARY SEARCH.
30
      extract = total.
31
    ENDIF.
32
  ENDIF.
33
  IF x_header-frm_bf_udl NE space.
34
    PERFORM (x_header-frm_bf_udl) IN PROGRAM (sy-repid).
35
  ENDIF.
36
  IF vim_called_by_cluster NE space.
37
    PERFORM vim_store_state_info.
38
    CALL FUNCTION 'VIEWCLUSTER_UNDO_DEPENDENT'
39
         EXPORTING
40
              view_name         = x_header-viewname
41
              status_mode       = status-mode
42
              workarea          = extract
43
              no_dialog         = vim_external_mode
44
         IMPORTING
45
              ign_entries_exist = z_ign_entr_ex.
46
    IF z_ign_entr_ex NE space.
47
      ignored_entries_exist = z_ign_entr_ex.
48
    ENDIF.
49
  ENDIF.
50
  IF status-mode EQ list_bild.
51
    PERFORM liste_zurueckholen.
52
  ELSE.
53
    IF <xmark> NE uebergehen.
54
      PERFORM detail_zurueckholen.
55
    ENDIF.
56
  ENDIF.
57
  IF replace_mode NE space AND counter EQ 0.
58
    function = ok_code = 'IGN '.
59
  ENDIF.
60
  IF x_header-frm_af_udl NE space.
61
    PERFORM (x_header-frm_af_udl) IN PROGRAM (sy-repid).
62
  ELSE.
63
    IF ignored_entries_exist NE space.
64
      PERFORM mark_ignored_entries CHANGING number_of_ign_entr.
65
      IF replace_mode EQ space.
66
        IF number_of_ign_entr EQ 1.
67
          MESSAGE s113(sv). "Eintrag konnte nicht zurückgeholt werden
68
        ELSEIF number_of_ign_entr GT 1.
69
          MESSAGE s114(sv) WITH number_of_ign_entr.
70
        ENDIF.
71
      ENDIF.
72
    ENDIF.
73
  ENDIF.
74
* CLEAR VIM_SPECIAL_MODE.
75
  vim_special_mode = z_specmode_safe.
76
ENDFORM.                               " ZURUECKHOLEN