Properties SourceCde
txt
1
*---------------------------------------------------------------------*
2
*       FORM SELEKTIERE                                               *
3
*---------------------------------------------------------------------*
4
*       ........                                                      *
5
*---------------------------------------------------------------------*
6
*  -->  PARAM                                                         *
7
*---------------------------------------------------------------------*
8
FORM selektiere USING param.
9
  DATA: rec LIKE sy-subrc VALUE 9, s_screenmode(1) TYPE c VALUE 'S'.
10
  IF status-action EQ hinzufuegen.
11
    status-action = aendern.
12
    title-action = aendern.
13
  ENDIF.
14
  IF status-mode EQ detail_bild.
15
    PERFORM update_tab.
16
  ENDIF.
17
  REFRESH extract. CLEAR vim_mainkey. l = 1.
18
  TRANSLATE vim_no_mainkey_exists USING vim_no_mkey_not_procsd_patt.
19
  LOOP AT total.
20
    PERFORM select USING param.
21
    CHECK sy-subrc EQ 0.
22
    IF x_header-delmdtflag NE space.
23
      PERFORM check_and_modify_mainkey_tab USING rec.
24
      IF rec NE 0.
25
        vim_coll_mainkeys_beg_ix = vim_last_coll_mainkeys_ix.
26
      ENDIF.
27
      CHECK rec LT 8.
28
      IF rec EQ 4. rec = 9. ENDIF.
29
    ENDIF.
30
    extract = total.
31
    APPEND extract.
32
  ENDLOOP.
33
  vim_coll_mainkeys_beg_ix = 1.
34
  IF rec NE 9 AND rec NE 0.
35
    PERFORM mod_extract_and_mainkey_tab USING 'A' 0.
36
  ENDIF.
37
  IF param EQ geloescht.
38
    status-delete = geloescht.
39
    title-action  = geloescht.
40
  ENDIF.
41
  <status>-selected = param.
42
  DESCRIBE TABLE extract LINES maxlines.
43
  status-data   = auswahldaten.
44
  title-data    = auswahldaten.
45
  nextline = 1.
46
  IF maxlines EQ 0.
47
    status-delete = nicht_geloescht.
48
    title-action  = nicht_geloescht.
49
    PERFORM fill_extract.
50
    PERFORM set_pf_status USING status.
51
    MESSAGE i004(sv).
52
    SET SCREEN liste.
53
    LEAVE SCREEN.
54
  ENDIF.
55
  IF maxlines EQ 1.
56
    MESSAGE s005(sv).
57
    IF vim_single_entry_function NE space.
58
      IF status-type EQ zweistufig.
59
        <status>-firstline = <status>-cur_line = nextline.
60
        PERFORM process_detail_screen USING 'C'.
61
      ELSE.
62
        CALL SCREEN liste.
63
      ENDIF.
64
    ELSE.
65
      IF status-type EQ zweistufig.
66
        <status>-firstline = <status>-cur_line = nextline.
67
        PERFORM process_detail_screen USING 'S'.
68
      ENDIF.
69
    ENDIF.
70
  ELSE.
71
    IF status-mode EQ detail_bild.
72
      vim_next_screen = liste. vim_leave_screen = 'X'.
73
    ENDIF.
74
    MESSAGE s006(sv) WITH maxlines.
75
  ENDIF.
76
ENDFORM.