1
*---------------------------------------------------------------------*
2
* FORM VIM_SET_IMP_RESULTS *
3
4
* (re)set result of import for current entry *
5
6
* VALUE(VSIR_KEY) ---> key of current entry *
7
* VALUE(VSIR_ACTION) ---> action happened to current entry *
8
* - GELOESCHT OR UPDATE_GELOESCHT -> deleted *
9
* - AENDERN -> updated *
10
* - NEUER_EINTRAG -> inserted *
11
* - ORIGINAL -> unchanged*
12
* - SLCTR_IMP_ERROR -> error *
13
14
FORM vim_set_imp_results USING value(vsir_key)
15
value(vsir_action) LIKE tvdir-flag.
16
DATA: vsir_xkey TYPE vim_tabkey_c, vsir_xkeylen TYPE i,
17
vsir_rc TYPE i,
18
vsir_ix TYPE i.
19
20
PERFORM vim_set_impres_header.
21
PERFORM vim_convert_tabkey USING vsir_key vsir_xkey vsir_xkeylen.
22
imp_results-tabkey = vsir_xkey.
23
READ TABLE imp_results WITH KEY objtab = imp_results-objtab
24
tabkey = imp_results-tabkey.
25
vsir_rc = sy-subrc. vsir_ix = sy-tabix.
26
CLEAR imp_results-import.
27
CASE vsir_action.
28
WHEN geloescht OR update_geloescht.
29
imp_results-import-deleted = 1.
30
WHEN aendern.
31
imp_results-import-updated = 1.
32
WHEN neuer_eintrag.
33
imp_results-import-inserted = 1.
34
WHEN original.
35
imp_results-import-unchanged = 1.
36
WHEN OTHERS.
37
imp_results-import-errors = 1.
38
ENDCASE.
39
IF vsir_rc NE 0.
40
APPEND imp_results.
41
ELSE.
42
MODIFY imp_results INDEX vsir_ix.
43
ENDIF.
44
ENDFORM. "vim_set_imp_reults