Skip to Content

SBO_SP_TransactionNotification Query

Hello Experts,

I need a SBO_SP_TransactionNotification query that will block users from adding sales orders with Qty less than the Instock value in the warehouse and also it should allow users to add items in a particular warehouse which does not have any stock.

The item is not an inventory item and it is an empty bottle item.

Please treat this as urgent and assist.

Regards

Justice

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Feb 05 at 01:17 PM

    Hi,

    Try this,

    if @object_type = '17' and (@TRANSACTION_TYPE = 'A' OR @TRANSACTION_TYPE = 'U')

    begin

    If exists

    (SELECT T1.[DocEntry] FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.[DocEntry] = T1.[DocEntry] INNER JOIN OITM T2 ON T1.[ItemCode] = T2.[ItemCode] INNER JOIN OITW T3 ON T2.[ItemCode] = T3.[ItemCode] where t1.docentry = @list_of_cols_val_tab_del and T1.[WhsCode] = T3.[WhsCode] AND T2.[InvntItem] = 'Y' and T1.[Quantity] > T3.[OnHand])

    begin select @error = 1,

    @error_message = 'Ordered Qty is more than instock qty'

    end

    end

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 03 at 02:59 AM

    Hi,

    "The item is not an inventory item and it is an empty bottle item."--> Confirm items are inventory item or non-inventory items.

    If non-inventory items, how to check in-stock quantity?

    Regards,

    Nagarajan

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 03 at 10:13 AM

    It is not possible to maintain stock for non-inventory item

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 05 at 07:29 AM

    Nagarajan K ,

    The customer makes a sales order picking inventory items and one non-inventory item. He wants a validation query that will only check the qty not been more than the instock of the inventory item without blocking the non-inventory item since its instock is always zero.

    So I want a validation query that will ignore the non-inventory item and rather concentrate on the inventory item's qty > instock.

    Regards

    Justice

    Add comment
    10|10000 characters needed characters exceeded