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

authorisation check?

Former Member
0 Likes
467

HI all,

I have some BOMs in ITAB.

i need to check whether the user has acces to BOMS using AUTHORISATION OBJECT <b>C_ASUE</b>.

i have BOMs auth group MBPU.

by using these tewo how can i check weather user have access or not?

vkr.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
445

hi,

choose the button 'Pattern" beside pretty printer.

then choose autority check radio button

there u pass ur authorization object.

u will get it.

thanks

3 REPLIES 3
Read only

varma_narayana
Active Contributor
0 Likes
445

Hi

You have to use the Authorization object in Authority-check statement for this..

Steps to implement authorization checks:

1. Creating Authorization object in SU21. (If it is not existing already)

Assign the Fields here

This is done by ABAP resource.

2. Creating authorizations using these Auth Objects. (PFCG)

This is done by BASIS.

3. Assigning these authorizations to users (SU01)

This is done by BASIS.

4. Checking the Authorization of a user in a program

This is done by ABAP resource

using the Statement called AUTHORITY-CHECK in a program. (Thru PATTERN)

This statement accepts the Values for the Fields and if a suitable authorization found in the User profile then it returns SY-SUBRC = 0.

<b>REWARD IF HELPFUL</b>

Read only

Former Member
0 Likes
445

Hi,

<b>example:</b>

program an AUTHORITY-CHECK.

AUTHORITY-CHECK OBJECT <authorization object>

ID <authority field 1> FIELD <field value 1>.

ID <authority field 2> FIELD <field value 2>.

...

ID <authority-field n> FIELD <field value n>.

The OBJECT parameter specifies the authorization object.

The ID parameter specifies an authorization field (in the authorization object).

The FIELD parameter specifies a value for the authorization field.

If the SY-SUBRC is ZETO then the user has the authority else User does not have the Authorization

Regards

Sudheer

Read only

Former Member
0 Likes
446

hi,

choose the button 'Pattern" beside pretty printer.

then choose autority check radio button

there u pass ur authorization object.

u will get it.

thanks