1 DATA:gt_dba_sellist TYPE TABLE OF vimsellist,
2 gt_excl_cua_funct TYPE TABLE OF vimexclfun,
3 gt_x_header TYPE TABLE OF vimdesc,
4 gt_x_namtab TYPE TABLE OF vimnamtab,
5 gt_dpl_sellist TYPE TABLE OF vimsellist.
6
7 DATA:lockuser TYPE sy-uname,
8 answer(1) TYPE c.
9
10 CALL FUNCTION 'VIEW_GET_DDIC_INFO'
11 EXPORTING
12 viewname = p_name
13 TABLES
14 sellist = gt_dba_sellist
15 x_header = gt_x_header
16 x_namtab = gt_x_namtab
17 EXCEPTIONS
18 no_tvdir_entry = 1
19 table_not_found = 2
20 OTHERS = 3.
21
22 CALL FUNCTION 'VIEW_ENQUEUE'
23 EXPORTING
24 view_name = p_name
25 action = 'E'
26 enqueue_mode = 'E'
27 EXCEPTIONS
28 foreign_lock = 1
29 system_failure = 2
30 table_not_found = 5
31 client_reference = 7.
32
33 IF sy-subrc NE 0.
34 MESSAGE 'Data locked' TYPE 'S' DISPLAY LIKE 'E'.
35 RETURN.
36 ENDIF.
37
38 CALL FUNCTION 'VIEW_MAINTENANCE'
39 EXPORTING
40 view_action = 'U'
41 view_name = p_name
42 TABLES
43 dba_sellist = gt_dba_sellist
44 excl_cua_funct = gt_excl_cua_funct
45 x_header = gt_x_header
46 x_namtab = gt_x_namtab
47 EXCEPTIONS
48 missing_corr_number = 1
49 no_database_function = 2
50 no_editor_function = 3
51 no_value_for_subset_ident = 4
52 OTHERS = 5.
53
54 CALL FUNCTION 'VIEW_ENQUEUE'
55 EXPORTING
56 view_name = p_name
57 action = 'D'
58 enqueue_mode = 'E'
59 EXCEPTIONS
60 foreign_lock = 1
61 system_failure = 2
62 table_not_found = 5
63 client_reference = 7.
04-30
2812