2009 May 02 8:23 AM
Hi all
loop at it_bukrs.
AUTHORITY-CHECK OBJECT 'ZBUKRS'
ID 'ACTVT' FIELD '03'
ID 'BUKRS' FIELD IT_BUKRS-BUKRS.
IF SY-SUBRC NE 0.
delete it_bukrs.
endif.
endloop.
if it_bukrs[] is initial.
message e001(zfi).
endif.
*BUILD COMPANY CODE RANGE TABLE OF available company code
loop at it_bukrs.
s_bukrs-sign = 'I'.
s_bukrs-option = 'EQ'.
s_bukrs-low = it_bukrs-bukrs.
append s_bukrs.endloop.
delete adjacent duplicates from s_bukrs comparing all fields.
above code is not working properly ae every time message is display.
'ZBUKRS' this object is created by me. I have confusion as this OBJECT given by functional guy.But in my scenerio it is not provided so i have created in SU20.Is it the right process for AUTHORITY-CHECK OBJECT. As I am knew for this please suggest me the right approach as to make authorization on company code.
thanks
babbal
2009 May 02 8:38 AM
Hi,
If the object doens't exist, you have to create as you noticed. You must use SU21 to create ZBURKS, or look for the simillar one if there is any. SU20 doens't have to be maintained as long as autorization fields (BUKRS) exists. And I guess they do.
Next Basis guy has to be infomed that this object is created and that certain group of users must have this authorization added to their user profile.
In this way you can test whether AUTORITY-CHECK return sy-subrc ne 0 an you know if someone is allowed to access this object for certain combination of field values (so called AUTORIZATION). If no activity is done from Basis guy, no user will have this object amoung his/her autoriztions, hence you will always get that all users are not allowed to access it. Please remeber that, this is important.
To conclude:
- You create ana tuorization object
- Basis guy take cares of adding it to user master data
- You take care of testing this object in the program (using AUTORITY-CHECK).
Regards
Marcin
Hi all
loop at it_bukrs.
AUTHORITY-CHECK OBJECT 'ZBUKRS'
ID 'ACTVT' FIELD '03'
ID 'BUKRS' FIELD IT_BUKRS-BUKRS.
IF SY-SUBRC NE 0.
delete it_bukrs.
endif.
endloop.
if it_bukrs[] is initial.
message e001(zfi).
endif.
*BUILD COMPANY CODE RANGE TABLE OF available company code
loop at it_bukrs.
s_bukrs-sign = 'I'.
s_bukrs-option = 'EQ'.
s_bukrs-low = it_bukrs-bukrs.
append s_bukrs.endloop.
delete adjacent duplicates from s_bukrs comparing all fields.
above code is not working properly ae every time message is display.
'ZBUKRS' this object is created by me. I have confusion as this OBJECT given by functional guy.But in my scenerio it is not provided so i have created in SU20.Is it the right process for AUTHORITY-CHECK OBJECT. As I am knew for this please suggest me the right approach as to make authorization on company code.
thanks
babbal
2009 May 02 8:38 AM
Hi,
If the object doens't exist, you have to create as you noticed. You must use SU21 to create ZBURKS, or look for the simillar one if there is any. SU20 doens't have to be maintained as long as autorization fields (BUKRS) exists. And I guess they do.
Next Basis guy has to be infomed that this object is created and that certain group of users must have this authorization added to their user profile.
In this way you can test whether AUTORITY-CHECK return sy-subrc ne 0 an you know if someone is allowed to access this object for certain combination of field values (so called AUTORIZATION). If no activity is done from Basis guy, no user will have this object amoung his/her autoriztions, hence you will always get that all users are not allowed to access it. Please remeber that, this is important.
To conclude:
- You create ana tuorization object
- Basis guy take cares of adding it to user master data
- You take care of testing this object in the program (using AUTORITY-CHECK).
Regards
Marcin
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |