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
1,057

Can anyone please tell me what's meant by authority check and how it can be performed?.

Can anyone please tell me what's meant by authority check and how it can be performed?.

7 REPLIES 7
Read only

Former Member
0 Likes
904

hiii

please refer to following link

regards

twinkal

Read only

Former Member
0 Likes
904

Hi Hema,

[http://help.sap.com/saphelp_nw04s/helpdata/en/52/67129f439b11d1896f0000e8322d00/content.htm]

Regards,

Sravanthi

Read only

Former Member
Read only

Former Member
0 Likes
904
Read only

Former Member
0 Likes
904

hi for restricting the access for the users it is generally used this is used with the fm 'AUTHORITY_CHECK'..

Read only

Former Member
0 Likes
904

Hi Hema ,

Authority check are the object ...which we use to check the authority of user on particuler field .

suppose a report display purchase order and it's detail .....then we have to check whether the user

who is excuting the report has the authority to display the purchase order ......

below is small peice of code ....please check the code ...it will definetly help you to understand authority objects .......if feel any problem please ask ...

DATA: STR(132) TYPE C.

DATA:BEGIN OF I_T024E OCCURS 0,

EKORG LIKE EKKO-EKORG,

END OF I_T024E.

*Get all the relevant PO Pur. Org. in internal table i_T024E based

*on the values input by the user.

SELECT EKORG

FROM T024E

INTO TABLE I_T024E

WHERE EKORG IN S_EKORG.

IF SY-SUBRC <> 0.

MESSAGE E012 WITH TEXT-015.

ENDIF.

*Validate all the PO Pur. Org. Selected by the User for the Auth. Chk.

LOOP AT I_T024E.

AUTHORITY-CHECK OBJECT 'M_BEST_EKO'

ID 'ACTVT' FIELD '03'

ID 'EKORG' FIELD I_T024E-EKORG.

IF SY-SUBRC NE 0.

IF STR IS INITIAL.

CONCATENATE STR I_T024E-EKORG INTO STR SEPARATED BY ' '.

ELSE.

CONCATENATE STR I_T024E-EKORG INTO STR SEPARATED BY ','.

ENDIF.

I_AUTH_ERR_EKORG-EKORG = I_T024E-EKORG.

APPEND I_AUTH_ERR_EKORG.

ELSE.

  • Append all the relevant PO Pur. Org. to the itab r_ekorg

R_EKORG-SIGN = 'I'.

R_EKORG-OPTION = 'EQ'.

R_EKORG-LOW = I_T024E-EKORG.

APPEND R_EKORG.

CLEAR R_EKORG.

ENDIF.

ENDLOOP.

  • Raise the Information Message for the Purchase Org. for whom user

  • is not authorized to Display PO's.

IF NOT STR EQ SPACE.

MESSAGE I012 WITH TEXT-007 STR.

ENDIF.

Thanks and Regrds.

Priyank Dixit