Skip to Content
avatar image
Former Member

Need to block Delivery note creation on a Particular Binlocation

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



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 08, 2017 at 10:43 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 08, 2017 at 09:53 AM

    Dear Shahan,

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

    Regards:

    Balaji.S

    Add comment
    10|10000 characters needed characters exceeded