Skip to Content

Block Delivery if the same item in Production order with status of R and P

Hi Experts,

Please see below SP which i am trying to block.

if :object_type='15' and (:transaction_type='A' or :transaction_type='U') THEN

SELECT ( SELECT T0."DocEntry" FROM ODLN T0 INNER JOIN DLN1 T1 ON T0."DocEntry" = T1."DocEntry" LEFT OUTER JOIN RDR1 T2 ON T1."BaseEntry" = T2."DocEntry" LEFT OUTER JOIN ORDR T3 ON T2."DocEntry" = T3."DocEntry" LEFT OUTER JOIN OWOR T4 ON T3."DocNum" = T4."OriginNum" AND T2."DocEntry" = T4."OriginAbs" AND T3."CardCode" = T4."CardCode" where T4."ItemCode" = T1."ItemCode" AND T4."OriginNum" = T3."DocNum" and T4."Status" in ('P', 'R') AND T0."DocEntry" = :list_of_cols_val_tab_del) INTO temp_var_0 FROM DUMMY;

IF :temp_var_0 > 0


error := 14989;

error_message := 'you can not make delivery because the production order is still open for this Item';



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers