Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SM30 authorization

Former Member
0 Likes
1,526

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

6 REPLIES 6
Read only

Former Member
0 Likes
1,125

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.

Read only

Former Member
0 Likes
1,125

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
 

Read only

0 Likes
1,125

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

Read only

Former Member
0 Likes
1,125

to put authorizatuion u can do it in two ways..

either create views or put sm range in data elemnt..

reward if found useful

Read only

0 Likes
1,125

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

Read only

1,125

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