Skip to Content
0

Need to block Delivery note creation on a Particular Binlocation

Jun 08, 2017 at 07:57 AM

43

avatar image

Dear Experts

i need a SPT to block Delivery Note when it is created on a system Default Bin Location.

i created and tried it, but not working

Pls see my SPT and help me by editing the same

Regards

IF @transaction_type IN ('A','U') AND @Object_type = '15'
BEGIN
	IF EXISTS (SELECT T0.DocEntry FROM DLN1 T0 INNER JOIN ODLN T1 ON T1.DocEntry = T1.DocEntry
				WHERE T0.AllocBinC = 'MN-WH-SYSTEM-BIN-LOCATION' and 
				T0.DocEntry = @list_of_cols_val_tab_del)
	BEGIN
		SET @error = 21
		SET @error_message = ' Transcation from the Selected Bin is not Allowed/For any Clarification Pls contact you System Administrator'
	END
END



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

2 Answers

Best Answer
Rizki Wicaksana Jun 08, 2017 at 10:43 PM
0

Hi,

USE IT IN [SBO_SP_TransactionNotification]


Try This :

IF @transaction_type IN ('A','U') AND @Object_type = '15'
BEGIN
IF EXISTS (
SELECT T0.DocEntry
FROM ODLN t0 INNER JOIN DLN1 t1 ON (t0.DocEntry=t1.DocEntry)
INNER JOIN OITM t3 ON t1.ItemCode=t3.ItemCode
INNER JOIN OILM t4 ON (t0.DocEntry=t4.DocEntry AND t0.ObjType=t4.TransType AND t1.LineNum=t4.DocLineNum)
INNER JOIN OBTL t5 ON t5.MessageID=t4.MessageID
INNER JOIN OBIN t6 on t5.BinAbs=t6.AbsEntry
WHERE T6.BinCode = 'MN-WH-SYSTEM-BIN-LOCATION' and
T0.DocEntry = @list_of_cols_val_tab_del
)
BEGIN
SET @error = -1
SET @error_message = ' Transcation from the Selected Bin is not Allowed/For any Clarification Pls contact you System Administrator'
END
END


Hope this helps :)

Regards,

Rizki Wicaksana

Share
10 |10000 characters needed characters left characters exceeded
Balaji Selvaraj Jun 08, 2017 at 09:53 AM
0

Dear Shahan,

Is this default bin is used at stock in warding or other transaction.

Regards:

Balaji.S

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Dear Mr. Selvaraj

what we plan is Will make GRN and receive all the items in this Bin Location, and will move items from this Bin Location to other (Exact Location as per the Show room User Decide ) , but if any of the Stock is pending or didn't move from default to the exact bin location and if end user try to sell it from this DEFAULT Bin location using Delivery Note, it should be blocked

This is our Scenario

Regards

0

Hi,

You can use the Transaction Restriction option with "outbound" under Bin Master data.

Regards:

Balaji.S

0