09-13-2007 2:31 AM
Hi,
I want to implement a report. This report has 2 radio buttons on the selection screen. I want to program the report so that only certain group of users can run the report with first radion button selection and another group of user can run with second radion button selection.
I dont want to create 2 transaction code. My question is do I need to create a custom authorization object. If so can you guide how?
Thanks for reading
09-13-2007 3:00 AM
You can create your own Custom Authorisation Object from transaction SU20.
After creating the Authorisation Object, use the code like this..
authority-check object 'ZBUKRS'
id 'BUKRS'
field ZES_MAIL-BUKRS.
if SY-SUBRC ne 0.
message E138(ZSM) with SY-UNAME ' not authorized ' 'to use this transaction'.
endif.
Regards
Gopi
09-13-2007 2:47 AM
Yes ,you have to create custom auth object .
check the below link for auth object :
Thanks
Seshu
09-13-2007 3:00 AM
You can create your own Custom Authorisation Object from transaction SU20.
After creating the Authorisation Object, use the code like this..
authority-check object 'ZBUKRS'
id 'BUKRS'
field ZES_MAIL-BUKRS.
if SY-SUBRC ne 0.
message E138(ZSM) with SY-UNAME ' not authorized ' 'to use this transaction'.
endif.
Regards
Gopi
09-13-2007 4:33 AM
It would really depend on whether you can distinguish those two groups of users some other way. For example, if you only want option "A" available to people who can (say) create sales orders then you could check in your code for access to the VA01 transaction via auth object S_TCODE.
Jonathan