Skip to Content

SAPB1 authorisations restrcit users by warehouse

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Nov 21, 2016 at 11:14 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 21, 2016 at 05:30 AM

    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

    Add comment
    10|10000 characters needed characters exceeded