Skip to Content
1
Former Member
Feb 26, 2014 at 11:22 AM

HANA SAP B1 - correlated subquery cannot have TOP or ORDER BY

2310 Views

hello All

I have the following query in SAP B1 HANA. I cannot execute the SBO TRNS NOTIFICATION stored procedure, I get this error :

Message was edited by: Janice Middleton This is MY CODE IN SAP HANA SBO TRNS NOTIFICATION :

IF :Object_type = '15' AND (:transaction_type = 'A') THEN

UPDATE DLN1

SET DLN1."U_CN" = (SELECT TOP 1 T0."BatchNum" FROM IBT1 T0 INNER JOIN DLN1 T1 ON T0."ItemCode" = T1."ItemCode" AND T0."BaseLinNum" = T1."LineNum" AND T0."BaseEntry" = T1."DocEntry" AND T0."BaseType" = '15' AND DLN1."DocEntry" =:list_of_cols_val_tab_del)

WHERE DLN1."DocEntry" = :list_of_cols_val_tab_del;

ERROR : SAP DBTech JDBC: [309]: correlated subquery cannot have TOP or ORDER BY


please can someone help ASAP.

Thanks in advance