cancel
Showing results for 
Search instead for 
Did you mean: 

Need to block Delivery note creation on a Particular Binlocation

Former Member
0 Kudos

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



Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

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

Answers (1)

Answers (1)

former_member312729
Active Contributor
0 Kudos

Dear Shahan,

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

Regards:

Balaji.S

Former Member
0 Kudos

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

former_member312729
Active Contributor
0 Kudos

Hi,

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

Regards:

Balaji.S