Properties SourceCde
txt
1
*&--------------------------------------------------------------------*
2
*&      Form  PROCESS_ENTRY_RESET                                     *
3
*&--------------------------------------------------------------------*
4
* refresh entry from database                                         *
5
*---------------------------------------------------------------------*
6
* --> PER_INDEX current index for modifying EXTRACT                   *
7
*---------------------------------------------------------------------*
8
FORM PROCESS_ENTRY_RESET USING VALUE(PER_INDEX) TYPE I.
9
  DATA: PRT_FRKY_SAFE(255) TYPE C, PER_HF TYPE I,
10
        REFCNT_SAFE TYPE I.
11
 
12
  REFCNT_SAFE = REFCNT.
13
  PERFORM MOVE_EXTRACT_TO_VIEW_WA.
14
  IF <XACT> NE ORIGINAL OR             "SW Texttransl
15
     ( X_HEADER-BASTAB NE SPACE AND X_HEADER-TEXTTBEXST NE SPACE
16
                                AND <XACT_TEXT> NE ORIGINAL ).
17
 
18
*   check if the <vim_prtfky_wa> is assigned. If the field belong
19
*   EZN & KEY, the field will be assinged.
20
    IF vim_prtfky_assigned NE ' '.          "XB 07.2002 Y6BK009849
21
    IF X_HEADER-PTFRKYEXST NE SPACE.
22
      MOVE <VIM_PRTFKY_WA> TO PRT_FRKY_SAFE.
23
    ENDIF.
24
    ENDIF.
25
 
26
    IF X_HEADER-FRM_RP_ORG NE SPACE.
27
      PERFORM (X_HEADER-FRM_RP_ORG) IN PROGRAM (SY-REPID).
28
    ELSE.
29
      IF X_HEADER-BASTAB NE SPACE.
30
        PERFORM (VIM_TB_READ_SINGLE_FORM) IN PROGRAM (SY-REPID).
31
      ELSE.
32
        PER_HF = STRLEN( X_HEADER-MAINTVIEW ).
33
        IF PER_HF LE 10.
34
          MOVE X_HEADER-MAINTVIEW TO VIM_READ_SINGLE_FORM-VIEWNAME.
35
          PERFORM (VIM_READ_SINGLE_FORM) IN PROGRAM.
36
        ELSE.
37
          MOVE X_HEADER-MAINTVIEW TO VIM_READ_SINGLE_FORM_40-VIEWNAME.
38
          PERFORM (VIM_READ_SINGLE_FORM_40) IN PROGRAM.
39
        ENDIF.
40
      ENDIF.
41
    ENDIF.
42
    IF SY-SUBRC NE 0.
43
      IF X_HEADER-FRM_RP_ORG EQ SPACE.
44
        RAISE IMPOSSIBLE_ERROR.        "entry not found
45
      ENDIF.
46
    ELSE.
47
 
48
*   check if the <vim_prtfky_wa> is assigned. If the field belong
49
*   EZN & KEY, the field will be assinged.
50
      IF vim_prtfky_assigned NE ' '.          "XB 07.2002  Y6BK009849
51
      IF X_HEADER-PTFRKYEXST NE SPACE AND                      "SW
52
         <VIM_PRTFKY_WA> NE PRT_FRKY_SAFE.
53
        PERFORM CONSISTENCY_PRT_FRKY_FIELDS USING 'X'.
54
        ENDIF.
55
      ENDIF.
56
 
57
      IF X_HEADER-DELMDTFLAG NE SPACE.
58
        PERFORM TEMPORAL_DELIMITATION.
59
      ENDIF.
60
      PERFORM MODIFY_TABLES USING PER_INDEX.
61
      IF PER_INDEX NE 0.
62
        ADD 1 TO REFCNT.
63
      ENDIF.
64
    ENDIF.
65
 
66
  ENDIF.                               "SW Texttransl ..
67
  IF X_HEADER-TEXTTBEXST <> SPACE.     "SW Texttransl ..
68
    IF X_HEADER-FRM_TL_ORG NE SPACE.
69
      PERFORM (X_HEADER-FRM_TL_ORG) IN PROGRAM (SY-REPID).
70
    ELSE.
71
      PERFORM VIM_READ_TEXTTAB_ENTRY.
72
    ENDIF.
73
    IF REFCNT_SAFE = REFCNT AND SY-SUBRC = 0.
74
      ADD 1 TO REFCNT.
75
      CLEAR <STATUS>-UPD_FLAG.
76
      IF <XMARK> EQ MARKIERT.
77
        SUBTRACT: 1 FROM <STATUS>-MK_XT,
78
                  1 FROM <STATUS>-MK_TO.
79
        <XMARK> = NICHT_MARKIERT.
80
        IF PER_INDEX <> 0.
81
          MODIFY EXTRACT INDEX PER_INDEX.
82
        ENDIF.
83
        READ TABLE TOTAL WITH KEY <VIM_xEXTRACT_KEY> BINARY SEARCH.
84
        <MARK> = NICHT_MARKIERT.
85
        MODIFY TOTAL INDEX SY-TABIX.
86
      ENDIF.
87
    ENDIF.
88
  ENDIF.                               ".. Texttransl
89
ENDFORM.                               "process_entry_reset