‎2007 Jul 30 11:47 PM
hi friends,
below is the code, i am working on authorization object.
i dont know why, for all the comp codes i enter it is
giving the same,
answer not authorized. it is not that the compcode
i am entering is not authorized, if i change the <> to = ,
then it is giving unrestricted data,
whether authorized or not authorized.
AUTHORITY-CHECK OBJECT 'F_BKPF_BUK'
ID 'ACTVT' DUMMY
ID 'BUKRS' FIELD P_FS.
IF SY-SUBRC <> 0.
ZZ_EXIT_BUKRS = 'Y'.
ENDIF.
IF ZZ_EXIT_BUKRS EQ 'Y' .
MESSAGE E999(ZI) WITH 'NO AUTHORITY TO EXECUTE PROGRAM.....!!!'.
ENDIF.
can some one help.
thanks
‎2007 Jul 31 12:06 AM
Hi,
Whether you have auth for company code? please check thru RSUSR002. whether u have authorization to plant you are entering?
aRs
‎2007 Jul 31 12:35 AM
hi thank you for the reply,
but i have full access,
but id created for the user is not shown there.
so u mean that, there is a problem with authorization from basis people.
‎2007 Jul 31 12:48 AM
Hello Saritha,
You have to execute the program with other user login who does not have auth.
some times auth object will not work when you assign roles and profiles,you need logoff the system and relogin,then it should work.
anyhow check with debugging mode ,actvt is important field here.
Thanks
Seshu
‎2007 Jul 31 3:19 AM
Hi,
Try by clear ZZ_EXIT_BUKRS .
AUTHORITY-CHECK OBJECT 'F_BKPF_BUK'
ID 'ACTVT' DUMMY
ID 'BUKRS' FIELD P_FS.
clear ZZ_EXIT_BUKRS .
IF SY-SUBRC <> 0.
ZZ_EXIT_BUKRS = 'Y'.
ENDIF.
IF ZZ_EXIT_BUKRS EQ 'Y' .
MESSAGE E999(ZI) WITH 'NO AUTHORITY TO EXECUTE PROGRAM.....!!!'.
ENDIF.