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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.