2007 Jul 10 8:13 PM
hello frns,
below is the code for authorizations,
the requirement is that ,
the authorization should be yes only
if all the bukrs are authorized for the user,
but now it is giving authorization even if one bukrs is valid.
AUTHORITY-CHECK OBJECT 'M_MATE_BUK'
ID 'ACTVT' DUMMY
ID 'BUKRS' FIELD P_FS.
IF SY-SUBRC = 0.
ZZ_EXIT = 'Y'.
ENDIF.
2007 Jul 10 8:18 PM
Hi,
v_auth = 'Y'.
Loop at i_t001w.
AUTHORITY-CHECK OBJECT 'M_MATE_BUK'
ID 'ACTVT' DUMMY
ID 'BUKRS' FIELD i_t001w-werks.
IF SY-SUBRC ne 0.
v_auth = 'N'.
ENDIF.
endloop.
After this loop if v_auth eq 'Y' that means user have authorisation
aRs
2007 Jul 10 8:22 PM
Hi,
In this case the authority check statement will check if user profile of user ( the user who logged in R/3) have object 'M_MATE_BUK' with field value BUKRS = P_FS. If this true then only this authorization will be passed otherwise not.
So just debug the code and see wht is the value for P_FS and check in SU01 if that user id has object 'M_MATE_BUK' with field value BUKRS = P_FS. If not then you need to ask security guy to add that particular value and object in user profile
Thanks,
Harkamal
2007 Jul 10 8:48 PM