Skip to Content
0

SP for Inventory Transfer blocking by Warehouse

Jul 02, 2017 at 03:54 AM

69

avatar image
Former Member

Dear experts,

Need a SP

I have 2 Warehouse named

1) A

2) B

I want to allow inventory transfer from warehouse A to Warehouse B

But I also want to block inventory transfer from warehouse B to warehouse A.

Thanks In advanced...

Regards

Rahul P.

rahulpathare@outlook.com

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Balaji Selvaraj Jul 03, 2017 at 04:08 AM
1
Try this to block from B to A warehouse


IF (@object_type= N'67') and @transaction_type= N'A' BEGIN IF EXISTS (SELECT T0.DocNum FROM dbo.OWTR T0 INNER JOIN WTR1 T1 ON T0.[DocEntry] = T1.[DocEntry] WHERE (T1.[FromWhsCod]='B'and T1.[WhsCode]='A' AND T0.DocEntry = @list_of_cols_val_tab_del)) BEGIN SET @error = 123 SET @error_message = 'Transfer Type for respective Whse not allowed, input please' END End

Regards:
Balaji.S
Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Dear Balaji Sir,

Thank you for reply sir.

I already create & linked this SP to my database. but it denied both transaction. that is A to B & B to A.

Regards

Rahul P.

0

I had given the condition for not allowing from B to A. This will not stop inventroy transfer from A to B.

WHERE(T1.[FromWhsCod]='B'and T1.[WhsCode]='A')

Regards:

Balaji.S

0