2006 Nov 03 1:28 PM
Hi All,
I am using AUTHORITY CHECK for company code
authority-check object 'F_BKPF_BUK'
id 'BUKRS' field p_bukrs
id 'ACTVT' field '03'
and i know that i can pass a value to the p_bukrs. can somebody let me know whether it accepts more than one value like
authority-check object 'F_BKPF_BUK'
id 'BUKRS' field s_bukrs
id 'ACTVT' field '03'.
p_bukrs is a parameter
s_bukrs will be select-options.
Thanks,
Kiran.
2006 Nov 03 1:31 PM
No, it does not work like that. What you can do if you need to check them all is to use a select-option, then hit against table T001 and get all of the company codes.
data: it001 type table of t001 with header line.
select-options: s_bukrs for t001-bukrs.
select * into table it001 from t001
where bukrs in s_bukrs.
Loop at it001.
* Do Authority Check here.
authority-check object 'F_BKPF_BUK'
id 'BUKRS' field <b>it001-bukrs</b>
id 'ACTVT' field '03'
endloop.Regards,
Rich Heilman
2006 Nov 03 1:31 PM
Hi kiran,
1. For multiple values of bukrs,
we have to call this authority-check
multiple times (for each bukrs).
2. If any of the time, sy-subrc is zero,
then we can assume that the user has the appropriate right.
regards,
amit m.
2006 Nov 03 1:31 PM
No, it does not work like that. What you can do if you need to check them all is to use a select-option, then hit against table T001 and get all of the company codes.
data: it001 type table of t001 with header line.
select-options: s_bukrs for t001-bukrs.
select * into table it001 from t001
where bukrs in s_bukrs.
Loop at it001.
* Do Authority Check here.
authority-check object 'F_BKPF_BUK'
id 'BUKRS' field <b>it001-bukrs</b>
id 'ACTVT' field '03'
endloop.Regards,
Rich Heilman
2006 Nov 03 1:33 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |