Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

authority check

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

Did you regenerate SAP_ALL after making the autorization object?

Former Member
0 Kudos

hi,

check with this

AUTHORITY-CHECK OBJECT 'Z_VBKA_VKD'

ID 'ACTVT' FIELD '03'

ID 'VKBUR' FIELD VBAK-VKBUR.

cheers,

sasi

Former Member
0 Kudos

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

Former Member
0 Kudos

have u updated user master

thanks