1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | FORM check_if_entry_is_to_display USING value(key_local) TYPE char01 |
9 | value(key_in) TYPE any |
10 | value(mod_flag) TYPE char01 |
11 | value(begdate) TYPE d. |
12 | DATA: rec TYPE i, act_entry_flag(1) TYPE c. |
13 | LOCAL: total, extract. |
14 | FIELD-SYMBOLS: <key_x> TYPE x, <key_h> TYPE x. |
15 | |
16 | |
17 | CLEAR: <table1_wa>. |
18 | <f1_wax> = <f1_x>. |
19 | ASSIGN: key_in TO <key_h> CASTING, |
20 | <key_h>(x_header-keylen) TO <key_x>. |
21 | MOVE <key_x> TO <f1_x>. |
22 | IF mod_flag NE space AND |
23 | x_header-delmdtflag EQ 'E' AND begdate LE sy-datum AND |
24 | <vim_enddate_mask> GE sy-datum OR x_header-delmdtflag EQ 'B' AND |
25 | begdate GE sy-datum AND <vim_enddate_mask> LE sy-datum. |
26 | act_entry_flag = 'X'. |
27 | ENDIF. |
28 | LOOP AT vim_collapsed_mainkeys FROM vim_coll_mainkeys_beg_ix. |
29 | CHECK <vim_collapsed_mkey_bfx> = <vim_f1_beforex>. |
30 |
31 | IF vim_mkey_after_exists NE space. |
32 | CHECK <vim_collapsed_key_afx> EQ <vim_f1_afterx>. |
33 |
34 | ENDIF. |
35 | vim_last_coll_mainkeys_ix = sy-tabix. |
36 | IF act_entry_flag NE space. |
37 | IF mod_flag EQ 'D'. |
38 | READ TABLE extract WITH KEY <vim_collapsed_keyx> |
39 | TRANSPORTING NO FIELDS. |
40 | IF sy-subrc EQ 0. |
41 | DELETE extract INDEX sy-tabix. |
42 | ENDIF. |
43 | ENDIF. |
44 | IF <key_x> NE <vim_collapsed_keyx>. |
45 |
46 | <vim_collapsed_keyx> = <key_x>. |
47 |
48 | <vim_xtotal_key> = <key_x>. |
49 | if <vim_collapsed_mkey_bfx> ne <vim_tot_mkey_beforex>. |
50 | <vim_collapsed_mkey_bfx> = <vim_tot_mkey_beforex>. |
51 | endif. |
52 |
53 | MODIFY vim_collapsed_mainkeys. |
54 | ENDIF. |
55 | rec = 4. |
56 | ELSE. |
57 | IF <key_x> NE <vim_collapsed_keyx>. |
58 |
59 | rec = 8. |
60 | ELSE. |
61 | rec = 4. |
62 | ENDIF. |
63 | ENDIF. |
64 | EXIT. |
65 | ENDLOOP. |
66 | IF sy-subrc NE 0. |
67 | CLEAR rec. |
68 | ENDIF. |
69 | IF key_local NE space. |
70 | <f1_x> = <f1_wax>. |
71 | ENDIF. |
72 | sy-subrc = rec. |
73 | ENDFORM. "check_if_entry_is_to_display |