1 *&---------------------------------------------------------------------*
2 *& Report ZRFI030
3 *&---------------------------------------------------------------------*
4 *&
5 *&---------------------------------------------------------------------*
6 REPORT zrfi030.
7
8 TABLES:t001 .
9
10 DATA:lt_sellist TYPE TABLE OF vimsellist,
11 lv_message TYPE char255,
12 lv_flag TYPE char1.
13
14 CLEAR lv_message .
15 CLEAR lv_flag .
16
17 SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text1.
18
19 SELECT-OPTIONS:s_bukrs FOR t001-bukrs OBLIGATORY.
20
21 SELECTION-SCREEN END OF BLOCK blk1.
22
23 SELECT bukrs
24 INTO TABLE @DATA(lt_t001)
25 FROM t001
26 WHERE bukrs IN @s_bukrs .
27
28 LOOP AT lt_t001 INTO DATA(ls_t001) .
29
30 AUTHORITY-CHECK OBJECT 'M_MATE_BUK'
31 ID 'BUKRS' FIELD ls_t001-bukrs .
32 IF sy-subrc <> 0.
33 MESSAGE '没有' && ls_t001-bukrs && '公司代码的权限' TYPE 'S' DISPLAY LIKE 'E' .
34 lv_flag = 'X' .
35 ENDIF.
36
37 ENDLOOP .
38
39 IF lv_flag = '' .
40
41 CALL FUNCTION 'VIEW_RANGETAB_TO_SELLIST'
42 EXPORTING
43 fieldname = 'BUKRS'
44 * APPEND_CONJUNCTION = ' '
45 TABLES
46 sellist = lt_sellist
47 rangetab = s_bukrs[].
48
49 CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
50 EXPORTING
51 action = 'U'
52 * CORR_NUMBER = ' '
53 * GENERATE_MAINT_TOOL_IF_MISSING = ' '
54 * SHOW_SELECTION_POPUP = ' '
55 view_name = 'ZTFI_0003'
56 * NO_WARNING_FOR_CLIENTINDEP = ' '
57 * RFC_DESTINATION_FOR_UPGRADE = ' '
58 * CLIENT_FOR_UPGRADE = ' '
59 * VARIANT_FOR_SELECTION = ' '
60 * COMPLEX_SELCONDS_USED = ' '
61 * CHECK_DDIC_MAINFLAG = ' '
62 * SUPPRESS_WA_POPUP = ' '
63 TABLES
64 dba_sellist = lt_sellist
65 * EXCL_CUA_FUNCT =
66 EXCEPTIONS
67 client_reference = 1
68 foreign_lock = 2
69 invalid_action = 3
70 no_clientindependent_auth = 4
71 no_database_function = 5
72 no_editor_function = 6
73 no_show_auth = 7
74 no_tvdir_entry = 8
75 no_upd_auth = 9
76 only_show_allowed = 10
77 system_failure = 11
78 unknown_field_in_dba_sellist = 12
79 view_not_found = 13
80 maintenance_prohibited = 14
81 OTHERS = 15.
82
83 ENDIF .