‎2010 Mar 03 5:41 AM
Hi friencds,
I am using authority check fo r standard Tcode ME21N fo r Tax Code "YA". I am successfully able to authorise user but i am not able to restrict the user for "YA". I mean whatever taxcode i am taking it gives me the same error "NO AUTHORISATION.".
I need to restirct this to on
‎2010 Mar 03 5:44 AM
Are the roles maintained correctly ? What is the auth. object you are using to achieve this restriction ?
BR,
Suhas
‎2010 Mar 03 5:50 AM
Yes.. I am getting sy-subrc = 0 for the specific user. and sy-subrc = 12 for other users.
am sending you the code i used.
initial declaration
DATA : p_mwskz TYPE mseg-mwskz VALUE 'YA'.
.
.
.
IF pqid-mwskz ne ' '.
AUTHORITY-CHECK OBJECT 'Z_TAXCODE'
ID 'MWSKZ' FIELD 'YA'"P_MWSKZ
ID 'ACTVT' FIELD '*' .
IF SY-SUBRC = 0.
MESSAGE 'NO AUTHORIZATION' TYPE 'E'.
ENDIF.
endif.
‎2010 Mar 03 5:55 AM
You have coded it incorrectly my friend
IF pqid-mwskz ne ' '.
AUTHORITY-CHECK OBJECT 'Z_TAXCODE'
ID 'MWSKZ' FIELD 'YA'"P_MWSKZ
ID 'ACTVT' FIELD '*' .
IF SY-SUBRC NE 0. "Change this
MESSAGE 'NO AUTHORIZATION' TYPE 'E'.
ENDIF.
endif.Cheers,
Suhas
‎2010 Mar 03 6:00 AM
Hey suhas ,
It wont work as for any Tax Code its showing sy-subrc = 0.
I want user not to use the Tax Code YA .
‎2010 Mar 03 6:06 AM
>
> It wont work as for any Tax Code its showing sy-subrc = 0.
> I want user not to use the Tax Code YA .
Hello,
You have to ask your Basis guys to maintain this auth. object in the correct role & assign the proper tax codes to it.
Once the role(s) have been maintained successfully you can check if the auth. check is working correctly.
BR,
Suhas
‎2010 Mar 03 6:21 AM
Hey guys,
Thanks for our views.
I got my result. Actually i should have not used P_MWSKZ here.
I used pqid-mwskz which picked my value and gave me error for YA.
Thankx.
Sany..
‎2010 Mar 03 5:47 AM
Hi Santosh,
Did you check Transaction SU53 to see failed authorization ?
This might help you.
Regards
‎2010 Mar 03 5:53 AM
Hi srikanth ,
I checked in SU53 and it's showing.
The last authorization check was successful