Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Authority check help

Former Member
0 Likes
696

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.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
619

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

3 REPLIES 3
Read only

Former Member
619

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.

Read only

RichHeilman
Developer Advocate
Developer Advocate
620

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

Read only

0 Likes
619

Thanks a lot amit and Rich