‎2010 Jun 28 11:43 AM
Hi,
My report contains one "Reprocess IDOC" Button.But this functionality should be restricted to some user.Only some users should be able to reprocess the idoc those having perticular role.So how should i use this restriction in my report or is there any authorization related change?Please help me out.
‎2010 Jun 28 11:58 AM
Hi,
In the Start of Selection
select * from agr_users (agr roles table is there) into wa where (role = your role that you want to check) where( username) = sy-uname.
If sy-subr ne 0.
message type 'I' with text-001 ( Where text-001) is " you dont have the authorisation to run this Program ".
endif.
With Regards,
Sumodh.P
‎2010 Jun 28 11:53 AM
Hi,
In INITIALIZATION event, add a check for the authorization,
Sample
AUTHORITY-CHECK OBJECT 'ZOBJECT''
ID 'ACTVT' FIELD '02'
ID 'AUTH' FIELD sy-uname.
IF sy-subrc NE 0.
MESSAGE e999 WITH text-010.
EXIT.
ENDIF.click F1 on AUTHORITY-CHECK for more info.
Regards
Bala krishna
‎2010 Jun 28 11:58 AM
Hi,
In the Start of Selection
select * from agr_users (agr roles table is there) into wa where (role = your role that you want to check) where( username) = sy-uname.
If sy-subr ne 0.
message type 'I' with text-001 ( Where text-001) is " you dont have the authorisation to run this Program ".
endif.
With Regards,
Sumodh.P
‎2010 Jun 28 11:58 AM
Hi,
the suggestion of creating your own authorisation object is a good one, but I think you only want the button excluded from your PF-STATUS when the user has no autotisation.
To do so check whether the user has authorisation. If not, add the function to the exlusion table and
SET PF-STATUS 'ZZZZ' EXCLUDING lt_excude_table.
Roy