‎2007 Jun 27 3:30 AM
Hi,
I've applied an authority-check to my customized program. What I did was, I've created an authorization object name 'ZFI_PGRM' in SU21 and tie it with authorization fields BUKRS, ACTVT. This authority-check will validate on the company code (BUKRS) entered from the selection screen. Below are my lines in the customized program :
DATA: text TYPE string,
m_text TYPE string.
text = 'You are not authorised for Company Code'.
DATA: t_t001 LIKE t001 OCCURS 0 WITH HEADER LINE..
SELECT * FROM t001
INTO TABLE t_t001
WHERE bukrs IN s_bukrs.
LOOP AT t_t001.
AUTHORITY-CHECK OBJECT 'ZFI_PGRM'
ID 'BUKRS' FIELD t_t001-bukrs
ID 'ACTVT' FIELD '03'.
IF sy-subrc <> 0.
CONCATENATE text t_t001-bukrs INTO m_text SEPARATED BY space.
ENDIF.
ENDLOOP.
At the same time BASIS tie the autorization object 'ZFI_PGRM' to the user role in order to access the program using PFCG. The problem now is the result that I'm getting always SY-SUBRC = 12 eventhough the user is allowed to access the company's report. Please help...
Haryati
‎2007 Jun 27 11:54 AM
Run transaction SU53 after the auth check fails and maybe it will give you a clue as to what is going on.
‎2007 Jun 27 11:54 AM
Run transaction SU53 after the auth check fails and maybe it will give you a clue as to what is going on.