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

problem with authority_check

Former Member
0 Likes
1,466

Any one suggest me what values i have to pass to

FM AUTHORITY_CHECK.

USER = SAPUSER

object = ?

field = ?

value = ?

its so urgent.

Regards,

Rajesh.

10 REPLIES 10
Read only

Former Member
0 Likes
1,393

Hi rajesh,

here a short example:

AUTHORITY-CHECK OBJECT 'F_KNA1_BUK'

ID 'BUKRS' FIELD T001-BUKRS

ID 'ACTVT' FIELD '03'.

IF SY-SUBRC <> 0.

MESSAGE E010 WITH 'No Authority'.

ENDIF.

Regards, Dieter

Look via F1 on AUTHORITY-CHECK in the Docu.

Regards, Dieter

Message was edited by:

Dieter Gröhn

Read only

Former Member
0 Likes
1,393

hi Rajesh,

CALL FUNCTION 'AUTHORITY_CHECK'
EXPORTING
field1 = 'TCD' "MDM
object = 'S_TCODE'
user = sy-uname
value1 = 'ZMEN'
EXCEPTIONS
user_dont_exist = 1
user_is_authorized = 2
user_not_authorized = 3
user_is_locked = 4
OTHERS = 5.

Check out this thread for reference ..

regards,

Santosh

Read only

0 Likes
1,393

Hi

Actually i need the Authority Check for Purchase Orders and Sales Orders.

Thats why when i am trying to execute AUTHORITY_CHECK Function Module in SE37 Tcode it is asking me the values of Username, Object,Field1,Value1.

But how can we provide those values?

from where we have to get these values?

Can you guide me how to get these? and plz provide me the values for these SalesOrder and Purchase Order.

PLZ Its Urgent

Regds

Raj

Read only

0 Likes
1,393

Hi Rajesh,

Go to se84 --> go to other objects --> select authorization object --> Give authorization object name --> execute

It will retrieve all values of activity codes and fields.

<b>Finding authorization object

-


suppose you want to find autorization object for ME21(purchaseorder)

go to se93

give transaction code as ME21

choose 'display ' button

there you can find authorization object --(M_BEST_EKO)

Finding all activities of an authorization object

-


Goto SE84

go to other objects --> choose authorization object

give autorization object as M_BEST_EKO

execute

double click on authority object

click on 'Permitted activities'

you can the find the following activities

01 Create or generate

02 Change

03 Display

04 Print, edit messages

06 Delete

08 Display change documents

09 Display prices

75 Remove

76 Enter</b>

Regards

Bhupal Reddy

Read only

0 Likes
1,393

Hi,

From where we can get this Authorization Object.

PLZ provide me such objects for SalesOrders and Purchase Orders if Possible

Regds

Raj

Read only

0 Likes
1,393

Hi rajesh,

I'm not what ur trying to achieve. Are you planning to use this authority check in any of your custom programs.

IF YES , ASK THE SECURITY ERSON TO CREATE AN AUTHORIZATION OBJECT WITH THE USER NAME , ACTIVITY AND SALESORDER T-CODE.

tHEN YOU CAN CALL IT IN YOUR PROGRAM AND PASS USER NAME AS SY-UNAME AND ACTVITY AS

01 FOR CREATE, O2 FOR CHANGE AND SALES ORDER I.E T-CODE OR ANYTHING.

IF YOU WANT TO MAKE USE OF STANDARD IF ONE EXISTS THEN SEARCH IN T-CODE SU21 UNDER SD CLASS . DOUBLE CLICK ON THIS YOU WILL THE AUTH OBJECT AND YOU HAVE CALL THE APPRORIATE AUTH OBJECT IN YOUR CODE.

let me know if you want to create one if in case your security person is not available.

Thanks

Read only

0 Likes
1,393

Hi,

Actually I need to know what are the authorised purchase orders for an logon user.

Similarly i need the same for sales orders also.

Regards,

Rajesh.

Read only

0 Likes
1,393

Hi,

Here there are no Basis Security person to give the Object, Field and vlaues.

I don't know what i have to give in order to execute this Authority_Check Function Module for checking " who are the valid/authorised users for viewing Purchase Orders"

Suppose there are 100 Purchase Orders in an SAP Server can we provide authorisation 20 for some users 30 for some users and remaining 50 for some other users.

Is it possible to check who are the Authorised users for these Purchasse Orders using AUTHORITY_CHECK function Module by passing the values of Object,Field1,Value1.

If it is possible can you provide what are the values i have to give for

OBJECT1----


?

FIELD1----


?

VALUE1----


?

PLZ SHARE YOUR IDEAS

Regards

Raj

Read only

Former Member
0 Likes
1,393

hi rajesh,

We can use the authotity check.. for somany object to restict the user run the purticular Application..

When we are using this we need to pass the Object ID and and the Field name..

authority-activety--- 01 to create 02- to change and 03- to disply authorization,

As Dieter and santhos told u can use that.

Read only

Former Member
0 Likes
1,393

Hi rajesh,

you have to find the real object you need.

in SE38 goto EDIT PATTERN, select AUTHORITY CHECK

and select the OBJECT you need.

here are two examples. In se84 you find more Information of the Objects.

AUTHORITY-CHECK OBJECT 'M_BEST_EKG'

ID 'ACTVT' FIELD '__________'

ID 'EKGRP' FIELD '__________'.

*

AUTHORITY-CHECK OBJECT 'V_VBAK_VKO'

ID 'VKORG' FIELD '__________'

ID 'VTWEG' FIELD '__________'

ID 'SPART' FIELD '__________'

ID 'ACTVT' FIELD '__________'.

regards, Dieter

i think there are no Object for one SalesOrders

or one Purchase Orders

Regards, Dieter

Message was edited by:

Dieter Gröhn