cancel
Showing results for 
Search instead for 
Did you mean: 

SAPB1 authorisations restrcit users by warehouse

former_member230931
Participant
0 Kudos

Hi All,

Is it possible to restrict users to transact and access data/reports to certain warehouses in SAP?

Also have the BOYUM add-on if that helps

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

narayanis
Active Contributor

Hi,

In SQL server, under Database --> Your Company DB --> Programmability --> Stored Procedure --> SBO_SP_TransactionNotification --> Right Click --> Modify

write following code.

if @object_type = 17 and @transaction_type in ('A' , 'U')

Begin

if exists(Select * from ordr inner join RDR1 on Ordr.Docentry = RDR1.DocEntry where (ordr.UserSign = 1 or ordr.UserSign2 = 1) and RDR1.WhsCode <> 102 and ORDR.DocEntry = @list_of_cols_val_tab_del)

Begin

set @error = -50 Set

@error_message = 'You Are Not Authorized To Transact On This Warehouse'

End

End

This worked when i tried punching a sales order by manager. According to this code, manager is not allowed to transact on warehouse number 102. Likewise you can repeat the logic for different object types as per your need.

Hope this will help you.

Regards

Pradnya

narayanis
Active Contributor
0 Kudos

Hi,

Under Administration --> Setup --> General --> User Defaults --> Defaults, you can set a default warehouse.

In case of multiple warehouses to be assigned, you will have to go for SPTN.

Regards

Pradnya