‎2008 May 15 9:54 AM
Hello all,
Is it possible to add an authorization object to a generated maintainance table view (to be used in sm30) so that the users can only see or add speficic entries to the table?
Thank you
Nuno Silva
‎2008 May 15 9:58 AM
Its possible.
Hope you know the screen number of your maintenance view.
While creating the maintenance view it will ask you for screen number other wise go to se11 and give the table name and go to utilities table maintenance generator THERE your can find the screen number double click ok that screen screen will be open in that PBO of the logic you can write your authorization code.
Hope it will help you.
Regards,
Madan.
‎2008 May 15 10:06 AM
HI,
do this way ... Go to Function Group source code Create a custom include and write the below custom code in a module
module check_autho.
* Authority Check
authority-check object 'M_RAHM_EKO'
id 'EKORG' field 'ZMP18-EKORG'
id 'ACTVT' field '01'
id 'ACTVT' field '02'
id 'ACTVT' field '04'
id 'ACTVT' field '09'.
if sy-subrc <> 0.
message e000(zz) with
'You are not authorized to update ZMP18 table for Purchase Org.' zmp18-ekorg.
endif.
endmodule.
In the PAI of flow logic of that overview screen after module set_update_flag on change request write the below custom code
module set_update_flag on chain-request.
endchain.
*Start
chain.
field zmp18-ekorg.
module check_autho.
endchain.
*End
‎2008 May 18 6:07 PM
Hello,
That allows me to check if the user as authorization to change/create that entry.
But is there a way to hide the entries that the user as no authorization for?
Thank you
Nuno Silva
‎2008 May 19 2:46 PM
to put authorizatuion u can do it in two ways..
either create views or put sm range in data elemnt..
reward if found useful
‎2008 May 19 7:24 PM
Hello,
I don't want to have to create views since then i would not be able to check them agains the authorization object.
What do you mean by "put sm range in data elemnt"?
Thank you
Nuno Silva
‎2008 May 22 10:54 AM
Hi Nuno,
Typically, the only auth objs allowed in View maintenance (SE54) were S_TABU_DIS and S_TABU_CLI. Later, the S_TABU_LIN was introduced.
Using S_TABU_LIN, you could maintain row-wise authorization for users, based on organizational units.
More info is available in help portal link - [S_TABU_LIN|http://help.sap.com/saphelp_47x200/helpdata/en/6d/56cdd3edabc14ebd1bc84dae20dec8/content.htm]
Check if this is useful in your case.
Cheers,
Rekha