on 2020 Sep 23 1:35 PM
Hello friends, how are you? I have a little problem and I've been giving it a head for some time, I created an authorization scope (su20), a class for my object and an authorization object (su21), I assigned it to a role manually (pfcg) and I have that role, I wrote my simple code and when it executes it returns 4 that according to search and means “Authorization check not Success. One or more authorizations were found for the authorization object in the user master record and include the value sets, but not the specified values, or the wrong authorization fields or too many fields were specified. " Attached images of what he did:
su20 su20.png
su21

pfcg

code

i dpn't get it why if it comment id "ACTVT" sy-subrc returns 0 but when is not comment it returns 4 but i should receive 2 parameter that's the wey i created the object.
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Execute SU53 and check for the exact values checked as well as currently entered authorization in buffer, you could try toreset the authorization buffer from this transaction.
NB: For activity field did you try with '03' or DUMMY.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.