Application Development and Automation 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: 
Read only

AUTHORITY-CHECK and return codes.

Former Member
0 Likes
2,752

Hi,

I'm trying to create authorization on some BSP pages.

The field contains the name of the BSP app. that you have access to.

So you would perhaps have 3 or 4 of this object assigned to you.

So far it looks like this.

AUTHORITY-CHECK OBJECT 'ZBSPAUTH'
             ID 'ZBSPAUTH' FIELD 'BPS VAR'.
if sy-subrc <> 0.
  _m_navigation->goto_page( 'no_auth.htm' ).
else.
....

Depending on which user i use i get different return codes.

Question 1:

Can anyone tell me what they mean?

0 = authority-check succesfull.

4 =

8 =

12 =

Question 2:

How does SAP-ALL work in this setup?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,549
4              User has no authorization in the SAP System for
               such an action. If necessary, change the user
               master record.
8              Too many parameters (fields, values). Maximum
               allowed is 10.
12             Specified object not maintained in the user
               master record.
16             No profile entered in the user master record.
24             The field names of the check call do not match
               those of an authorization. Either the
               authorization or the call is incorrect.
28             Incorrect structure for user master record.
32             Incorrect structure for user master record.
36             Incorrect structure for user master record.

Message was edited by:

Chandrasekhar Jagarlamudi

Hi,

I'm trying to create authorization on some BSP pages.

The field contains the name of the BSP app. that you have access to.

So you would perhaps have 3 or 4 of this object assigned to you.

So far it looks like this.

AUTHORITY-CHECK OBJECT 'ZBSPAUTH'
             ID 'ZBSPAUTH' FIELD 'BPS VAR'.
if sy-subrc <> 0.
  _m_navigation->goto_page( 'no_auth.htm' ).
else.
....

Depending on which user i use i get different return codes.

Question 1:

Can anyone tell me what they mean?

0 = authority-check succesfull.

4 =

8 =

12 =

Question 2:

How does SAP-ALL work in this setup?

8 REPLIES 8
Read only

Former Member
0 Likes
1,549

Hi Rasmus Stokholm ,

Question 1:

Can anyone tell me what they mean?

Sy-subrc = 0 -


Success

Sy-subrc = 4 -


Failure(known reason)

Sy-subrc = 8 -


Internal error(Unknown reason).

Thanks,

Reward If Helpful.

Read only

Former Member
0 Likes
1,550
4              User has no authorization in the SAP System for
               such an action. If necessary, change the user
               master record.
8              Too many parameters (fields, values). Maximum
               allowed is 10.
12             Specified object not maintained in the user
               master record.
16             No profile entered in the user master record.
24             The field names of the check call do not match
               those of an authorization. Either the
               authorization or the call is incorrect.
28             Incorrect structure for user master record.
32             Incorrect structure for user master record.
36             Incorrect structure for user master record.

Message was edited by:

Chandrasekhar Jagarlamudi

Read only

0 Likes
1,549

Thanks for the quick answers.

Regarding question 2.

My SAP-ALL user is getting SY-SUBRC = 4.

He should also be able to use the page but is denied access.

What should the check look like if he was to gain access?

Read only

Former Member
0 Likes
1,549

goto su01

give user name

click on Profiles tab

and double click on SAP_ALL and

checkout if the auth obj ZBSPAUTH is included in that

Read only

0 Likes
1,549

It is included and contains a ' * '

Read only

0 Likes
1,549

Hi,

It was a coding error the field name was 9ZBSPAUTH for some reason.

It is working now.

Thanks for your help

Read only

0 Likes
1,549

Hi

Check the Tcodes SU21 and PFCG whether the Authorization objects is assigned to the role/profile or not

Reward points for useful Answers

Regards

Anji

Read only

0 Likes
1,549

Try regenerate sap_all using transaction SU21 and execute program after logoff and login..