Skip to Content
0
Sep 23 at 12:36 PM

SAP B1 Stored Procédure : aggregate function not allowed

204 Views

Hello

With SBO_SP_TRANSACTION_NOTIFICATION

I want to sum the quantity all items (INV1) and put them in an UDF (header level OINV) directly with HANA

Im Using this query

IF :object_type = '13'  AND (:transaction_type='A' or :transaction_type='U')
THEN
BEGIN
update OINV set OINV."U_TotalQuantities" = sum(INV1."Quantity") from INV1 , OINV where INV1."DocEntry"=:list_of_cols_val_tab_del AND OINV."DocEntry"=:list_of_cols_val_tab_del ;
END;
END IF;

But i have this error , aggregate function not allowed , can you please help ?

I changed the clause where by having , still have the error , can you please give me the correct code ? thanks