2008 Jul 29 9:22 AM
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?.
2008 Jul 29 9:25 AM
2008 Jul 29 9:27 AM
Hi Hema,
[http://help.sap.com/saphelp_nw04s/helpdata/en/52/67129f439b11d1896f0000e8322d00/content.htm]
Regards,
Sravanthi
2008 Jul 29 9:28 AM
Hi,
Check this links:
http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbaccb35c111d1829f0000e829fbfe/content.htm
Regards
Adil
2008 Jul 29 9:29 AM
Hi,
generally we usee authority check, to check wether the user has the authority to access.
hope this link may help you.
http://help.sap.com/saphelp_nw04s/helpdata/en/52/67129f439b11d1896f0000e8322d00/content.htm
http://members.tripod.com/sap_abap/authorit.htm
http://articles.techrepublic.com.com/5100-10878_11-5110893.html
2008 Jul 29 9:30 AM
hi for restricting the access for the users it is generally used this is used with the fm 'AUTHORITY_CHECK'..
2008 Jul 29 9:36 AM
2008 Jul 29 10:23 AM
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