Properties SourceCde
txt
1
*&--------------------------------------------------------------------*
2
*&      Form  RESET_ENTRIES                                           *
3
*&--------------------------------------------------------------------*
4
* restore the last saved version for the marked entries of EXTRACT    *
5
*---------------------------------------------------------------------*
6
* --> RE_MODE requested mode: L - all marked entries, D - single entry*
7
*---------------------------------------------------------------------*
8
FORM RESET_ENTRIES USING VALUE(RE_MODE).
9
  DATA: TEXTTAB_MOD(1) TYPE C.         "SW Texttransl
10
 
11
  VIM_SPECIAL_MODE = VIM_RESET.
12
  CASE RE_MODE.
13
    WHEN LIST_BILD.
14
      MOVE: 0 TO REFCNT, 0 TO NEWCNT, 0 TO ORGCNT.
15
      LOOP AT EXTRACT.
16
        CLEAR TEXTTAB_MOD.
17
        CHECK <XMARK> EQ MARKIERT.
18
        MOVE SY-TABIX TO INDEX.
19
        ADD 1 TO NEWCNT.
20
        CHECK <XACT> NE NEUER_EINTRAG.
21
        ADD 1 TO ORGCNT.
22
        IF X_HEADER-TEXTTBEXST <> SPACE.             "SW Texttransl ..
23
          PERFORM VIM_TEXTTAB_MODIF_FOR_KEY CHANGING TEXTTAB_MOD.
24
        ENDIF.
25
        IF X_HEADER-BASTAB NE SPACE AND X_HEADER-TEXTTBEXST NE SPACE.
26
          CHECK <XACT> NE ORIGINAL OR <XACT_TEXT> NE ORIGINAL
27
                                   OR TEXTTAB_MOD = 'X'.
28
        ELSE.
29
          CHECK <XACT> NE ORIGINAL OR TEXTTAB_MOD = 'X'.
30
        ENDIF.
31
        PERFORM PROCESS_ENTRY_RESET USING INDEX.
32
      ENDLOOP.
33
      NEWCNT = NEWCNT - ORGCNT.
34
      ORGCNT = ORGCNT - REFCNT.
35
      IF ORGCNT EQ 0 AND NEWCNT EQ 0.
36
        MESSAGE S016(SV) WITH REFCNT.
37
      ELSE.
38
        IF ORGCNT NE 0 AND NEWCNT NE 0.
39
          MESSAGE S040(SV) WITH REFCNT ORGCNT NEWCNT.
40
        ELSE.
41
          IF ORGCNT NE 0.
42
            MESSAGE S041(SV) WITH REFCNT ORGCNT.
43
          ELSE.
44
            MESSAGE S042(SV) WITH REFCNT NEWCNT.
45
          ENDIF.
46
        ENDIF.
47
      ENDIF.
48
      PERFORM PROCESS_AFTER_ENTRY_RESET.
49
    WHEN DETAIL_BILD.
50
      READ TABLE EXTRACT INDEX NEXTLINE. "Extract-WA i.VCL-Kontext n. ok
51
      PERFORM PROCESS_ENTRY_RESET USING NEXTLINE.
52
      MESSAGE S017(SV).
53
      PERFORM PROCESS_AFTER_ENTRY_RESET.
54
      CLEAR VIM_OLD_VIEWKEY.
55
      TRANSLATE VIM_NO_MAINKEY_EXISTS USING VIM_NO_MKEY_NOT_PROCSD_PATT.
56
  ENDCASE.
57
  CLEAR VIM_SPECIAL_MODE.
58
ENDFORM.                               "reset_entries