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

Regarding authority-check

Former Member
0 Likes
631

Hi Experts

I am trying a small example to know how authority check works.

When i check the sy-subrc , its value is 12.That means this is not in the user master record.

Please suggest me how do i solve this.

Below is the coding where

" I do not want to give authorization to display the data"

******

parameters : p_connid like spfli-connid,

p_carrid like spfli-carrid.

authority-check object 'ZFLIGHT123'

ID 'CONNID' field p_connid

ID 'CARRID' field p_carrid

ID 'ACTVT' field '03'.

if sy-subrc <> 0. exit.endif.

SELECT SINGLE * FROM spfli INTO spfli_wa WHERE carrid = p_carrid AND connid = p_connid.

pls suggest me.

Regards

Samir.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
606

Hi Samir,

Please check the link,

Regards,

Hema.

    • Reward points if it is useful.

Hi Experts

I am trying a small example to know how authority check works.

When i check the sy-subrc , its value is 12.That means this is not in the user master record.

Please suggest me how do i solve this.

Below is the coding where

" I do not want to give authorization to display the data"

******

parameters : p_connid like spfli-connid,

p_carrid like spfli-carrid.

authority-check object 'ZFLIGHT123'

ID 'CONNID' field p_connid

ID 'CARRID' field p_carrid

ID 'ACTVT' field '03'.

if sy-subrc <> 0. exit.endif.

SELECT SINGLE * FROM spfli INTO spfli_wa WHERE carrid = p_carrid AND connid = p_connid.

pls suggest me.

Regards

Samir.

4 REPLIES 4
Read only

Former Member
0 Likes
606

Hi Samir,

You don't have a role in which the object 'ZFLIGHT123' is included (Use transaction SU01 to update your user with the relevant role).

Regards,

John.

Read only

Former Member
0 Likes
607

Hi Samir,

Please check the link,

Regards,

Hema.

    • Reward points if it is useful.

Read only

Former Member
0 Likes
606

Double click on ZFLIGHT123 and check for teh authority specified.

Read only

Former Member
0 Likes
606

Hi,

Have you created the Authorization Object ZFLIGHT123 in SU21 Transaction?

You have to create the object and fields.

Then if you assign values in program it works.

Regards,

Anji