Properties SourceCde
txt
1
*---------------------------------------------------------------------*
2
*       FORM MARKIERE_BLOCK                                           *
3
*---------------------------------------------------------------------*
4
*       ........                                                      *
5
*---------------------------------------------------------------------*
6
FORM MARKIERE_BLOCK.
7
  INDEX = FIRSTLINE + L - 1.
8
  IF L EQ 0 OR INDEX GT MAXLINES.
9
    MESSAGE S032(SV).
10
    EXIT.
11
  ENDIF.
12
  PERFORM MARKIERE USING INDEX.
13
  IF BLOCK_SW EQ MARKIERT.
14
    BLOCK_2 = INDEX.
15
    BLOCK_SW = NICHT_MARKIERT.
16
  ELSE.
17
    BLOCK_1 = INDEX.
18
    BLOCK_SW = MARKIERT.
19
    MESSAGE S066(SV).                  "Bitte Blockende markieren
20
    EXIT.
21
  ENDIF.
22
  COUNTER = 0.
23
  LOOP AT EXTRACT.
24
    COUNTER = COUNTER + 1.
25
    IF BLOCK_1 LE BLOCK_2.
26
      CHECK COUNTER BETWEEN BLOCK_1 AND BLOCK_2.
27
    ELSE.
28
      CHECK COUNTER BETWEEN BLOCK_2 AND BLOCK_1.
29
    ENDIF.
30
    READ TABLE TOTAL WITH KEY <VIM_xEXTRACT_KEY> BINARY SEARCH.
31
    IF <XMARK> NE MARKIERT.
32
      MARK_EXTRACT = MARK_EXTRACT + 1.
33
      MARK_TOTAL  = MARK_TOTAL  + 1.
34
    ENDIF.
35
    <XMARK> = MARKIERT.
36
    <MARK>  = MARKIERT.
37
    MODIFY TOTAL INDEX SY-TABIX.
38
    MODIFY EXTRACT.
39
  ENDLOOP.
40
ENDFORM.