2010 Sep 01 6:40 AM
Dear All,
I am calling two authority check object M_MATE_MAR and M_MSEG_BMB in my report.
Now for a user if i see the Role the second object M_MSEG_BMB is maintained and the object M_MATE_MAR is not maintained.
Now in my program for the object M_MATE_MAR(as it is not maintained),my sy-subrc is returning 12,hence check faing and for
M_MSEG_BMB sy-subrc = 4 as check is failng.
My requirement is the user should not see some movement types irrespective of the material ,
If i pass a material in the selection screen report , movement type records are deleting fine along with that others are alos deleting becs of sy-subrc <> 0(sy-subrc = 12).so i get a blank report as output.
so wht should be done in my case.
Regards
2010 Sep 01 7:05 AM
2010 Sep 01 9:09 AM
what is the authority check result
sy-subrc = 4
sy-subrc = 12 means?
in which case user is authorized ?
2010 Sep 01 9:10 AM
what is the authority check result
sy-subrc = 4
sy-subrc = 12 means?
in which case user is authorized ?
12 means authorized or not?
2010 Sep 01 9:22 AM
Hi Rajendra,
When you hit F1 on the Authority-check,
If Sy-subrc = 4, Authorization check not successful. One or several authorizations were indeed found for the authorization object in the user master record and they include the value sets, but not the values specified, or incorrect or too many authorization fields were specified.
If Sy-subrc = 12, No authorization was found for the authorization object in the user master record.
When Sy-subrc = 24, Incorrect authorization fields or an incorrect number of authorization fields was found. This return value is no longer set since Release 6.20. Up to Release 4.6 it is set only if the profile parameter "auth/new_buffering" has a value less than 3.
When sy-subrc = 40, An invalid user ID has been entered in user.
Hope it helps.
Sujay
2010 Sep 01 9:26 AM
Hi Sujya ,
This i already found , but my question is when i calls this object in program and is sy-subrc = 12
then whether that user is authorized or not.?
Hope u understand my question
Regards
2010 Sep 01 9:30 AM
Hi,
If sy-subrc is anything but zero, the user is not authorized.
If sy-subrc = 4 will mean that for ex, User has authorization for display but he is trying to change which he is not authorized.
If sy-subrc = 12, he has none of the actvt mentioned in the authority check object.
Hope it helps.
Sujay
2010 Sep 01 9:35 AM
But the authorization object itself is not there in the user master then whta will be the sy-subrc value in tahts case?
And in that case he is authorized or not?
2010 Sep 01 10:00 AM
>
> But the authorization object itself is not there in the user master then what will be the sy-subrc value in tahts case?
As mentioned in the previous post the SY-SUBRC value will be set to 12.
And in that case he is authorized or not?
There must a reason why the auth. object is not maintained. If the user was supposed to view the data, activity field should be set to '03' (Display). If this is not maintained i don't think user should be given the view access as well.
Frankly this question should be directed to your Basis & Security team.
BR,
Suhas
2010 Sep 01 10:03 AM
Hi,
when sy-subrc = 12 means that the object is not maintained in the profile
In general, you must assign authorization object to role of user. Ask your basis to do it, if you had authorization to do it go to tcode PFCG.
You can find role assign to user master data in tcode SU01 -> ROles -> choose Role -> click on role button -> choose Authorization -> choose Display Authorization Data.
regards