cancel
Showing results for 
Search instead for 
Did you mean: 

Warehouse Restriction

Former Member
0 Kudos

Hi,

I would like restrict one of my raw material warehouse for all users  expect two users. If the will move the qty from RM to Others warehouse need to restrict for all the user expect two user how we will do that . is it any store procedure ?

Accepted Solutions (1)

Accepted Solutions (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please check this thread and try to modify as per your requirement.

Thanks.

Former Member
0 Kudos

My requirement is different. This is restrict only inventory transfer . my objective is Does not move and put any stock from a warehouse . only allowed for particular user.

Former Member
0 Kudos

I have created the Sp but here i need small changes . user sign 29, 30,67 when ever they make inventory transfer it should be work. but below SP working opposite. kindly correct this.

if (@object_type = '67') and (@transaction_type IN (  'A','U'))

BEGIN

  IF exists (select T1.DocEntry FROM OWTR T0

INNER JOIN WTR1 T1 ON T0.[DocEntry] = T1.[DocEntry]

  where T1.DocEntry =@list_of_cols_val_tab_del and t1.WhsCode='ExRm' and t0.UserSign in ('29','30','67'))

  Begin

     SET @error = 30

     SET @error_message =N'You are not authorized to Put the stock to this Warehouse'  

   end

END

Former Member
0 Kudos

Hi,

Try this out:

IF (@object_type = '67') and (@transaction_type IN (  'A','U'))

BEGIN

IF exists (select T1.DocEntry FROM OWTR T0

INNER JOIN WTR1 T1 ON T0.[DocEntry] = T1.[DocEntry]

WHERE T1.DocEntry =@list_of_cols_val_tab_del and t1.WhsCode='ExRm' and t0.UserSign not in ('29','30','67'))

 

  Begin


     SET @error = 30

     SET @error_message =N'You are not authorized to Put the stock to this Warehouse' 

   end

END

Regards,

KennedyT21
Active Contributor
0 Kudos

Hi ramesh

Try This

IF (@object_type = '67')

   AND (@transaction_type IN ('A', 'U'))

BEGIN

    IF EXISTS (

           SELECT T1.DocEntry

           FROM   OWTR T0

                  INNER JOIN WTR1 T1

                       ON  T0.[DocEntry] = T1.[DocEntry]

           WHERE  T1.DocEntry = @list_of_cols_val_tab_del

                  AND t1.WhsCode = 'ExRm'

                  AND t0.UserSign NOT  IN ('29', '30', '67')

       )

    BEGIN

        SET @error = 30

       

       

        SET @error_message =

            N'You are not authorized to Put the stock to this Warehouse'

    END

END

Regards

Kennedy

Former Member
0 Kudos

Hi Ramesh,

Try below SP with some modification.

if (@object_type = '67') and (@transaction_type IN (  'A','U'))

BEGIN

  IF exists (select T1.DocEntry FROM OWTR T0

INNER JOIN WTR1 T1 ON T0.[DocEntry] = T1.[DocEntry]

  where T1.DocEntry =@list_of_cols_val_tab_del and t1.WhsCode='ExRm' and t0.UserSign not in ('29','30','67'))

  Begin

     SET @error = 30

     SET @error_message =N'You are not authorized to Put the stock to this Warehouse' 

   end

END

Hope this helps

--

--

Regards::::

Atul Chakraborty

Answers (0)