09-27-2005 9:29 AM
hi!
i wrote authority check for an object.
the problrm is that i get always subrc = 12, eventhough
i have sap all.
this is the code
IF SY-TCODE = 'VA21' OR SY-TCODE = 'VA22' OR SY-TCODE = 'VA23'.
AUTHORITY-CHECK OBJECT 'Z_VBKA_VKD'
ID 'VKBUR' FIELD VBAK-VKBUR.
IF SY-SUBRC NE 0.
MESSAGE E016(ZSD).
ENDIF.
ENDIF.
why am i getting always subrc 12?
what is the syntax for field 'ACTVT'
if the values have to be between 01-04?
thanks
yifat
09-27-2005 9:33 AM
Hello Yifat,
the profil sap_all didn't contain your Customer object.
Create a new profil with your object and assign it to your user.
Regards
Frank Brackmann
09-27-2005 9:43 AM
Hi yifat,
below link might help you.
http://help.sap.com/saphelp_erp2004/helpdata/en/52/6712ac439b11d1896f0000e8322d00/frameset.htm
reward points for helpfull answers and close the thread if your question is solved.
regards
venu.
09-27-2005 9:50 AM
09-27-2005 9:59 AM
hi,
check with this
AUTHORITY-CHECK OBJECT 'Z_VBKA_VKD'
ID 'ACTVT' FIELD '03'
ID 'VKBUR' FIELD VBAK-VKBUR.
cheers,
sasi
09-27-2005 10:05 AM
Check which are the fields in Z_VBKA_VKD. This seems to be a custom authorization object . Your auth check should have all the fields and in the order in which they are defined even if you want some of them to be dummy.
AUTHORITY-CHECK OBJECT 'Z_VBKA_VKD'
ID VKBUR FIELD VBAK-VKBUR
ID name2 FIELD f2
ID name3 dummy.....
It seems you have actvt also defined in your object by dont want to control it , then try something.
AUTHORITY-CHECK OBJECT 'Z_VBKA_VKD'
ID VKBUR FIELD VBAK-VKBUR
ID ACTVT DUMMY.
Also sy-subrc 12 is when specified object not maintained in the user master record.
You will have to create an authorization for your custom object , attach it to a profile and then add this profile to a user master. You can take help from BASIS folks on this . This will have to be done for all users who will require to have this authorization.
Just by having SAP_ALL does not mean that you will have auth. of Custom developed auth. objects also.
Cheers
09-27-2005 10:07 AM