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

Former Member
0 Likes
736

authority-check object 'myobj'.

id 'lifnr' field '101' .

for the above stmt authority check is created. but validation was not success. pls fix

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
700

authority-check object 'MYOBJ'.

id 'LIFNR' field '101' .

TRY UPPERCASE.

authority-check object 'myobj'.

id 'lifnr' field '101' .

for the above stmt authority check is created. but validation was not success. pls fix

4 REPLIES 4
Read only

Former Member
0 Likes
701

authority-check object 'MYOBJ'.

id 'LIFNR' field '101' .

TRY UPPERCASE.

Read only

Former Member
0 Likes
700
    authority-check object 'Z_PLNT_AUT'
             id 'ACTVT' field '03'
             id 'WERKS' field i_auth_werks-werks.

    if sy-subrc ne 0 .
      message e398(00) with
       'User' sy-uname 'not authorised for Plant : ' i_auth_werks-werks.

check this, if u have any doubts let me know.

Regards

Prabhu

Read only

Former Member
0 Likes
700

Hi Uma,

Check with the following Code:

AUTHORITY-CHECK OBJECT 'myobj'

ID 'ACTVT' FIELD '101'

ID 'CUSTTYPE' FIELD 'lifnr'.

IF SY-SUBRC <> 0.

MESSAGE E...

ENDIF.

Read only

Former Member
0 Likes
700

Hi Uma,

the FM 'authority-check' is not used for creating Authorization objects.Its being used for checking the authorization whether a perticular user has got authorization for a perticular object or not.

If you want to create a new authorozation object

follow the steps.

1.)From the SAP initial screen

GOTO

Tools->ABAPworkbench->Development->

Othertools->Authorozation Objects.

Then first create the Authorization Fields for which data elements u want to check authorizations.

Then create Authorization Object and give all of ur authorization fields there.

Then it will create an authorization Object

Then ur administrator will add this authorization object to the corresponding user in SU01.

Then u can check this authorization by calling the FM 'authority-check ' by passing the object value that u have created recently and the field name that u have also created recently.

Hope now u understand this perfectly.

if its upto ur satisfactory level then reward me points Pls.

Regards

Manas Ranjan Panda.