Need help in creating a condition query in a pre-processing meth

No need to respond to this. I was able to accomplish this another way.

Thanks,

Mike



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
mike.numbers
Sent: Monday, March 25, 2013 11:20 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Need help in creating a condition query in a
pre-processing method directive





I have been asked to prevent receiving to stock more than any previous
operation has completed. To do that I am trying to create a condition query
that will read PartTran and accumulate the previous quantity received so I
can add the current transaction amount, then compare that to each of the
JobOper qtycompleted. My problem is in writing a condition query. I cannot
come up the code that will accumulate the quantity from PartTran. The manual
I am reading says I can use ABL and BAQ compliant query, but when I try to
add my second table I get the error message shown below. Any ideas on what I
am doing wrong?
Current code =
for each ttPartTran where ((ttPartTran.RowMod = 'A' or ttPartTran.RowMod =
'U') and ttPartTran.TranType = 'MFG-STK') no-lock.
for each PartTran where (PartTran.Company = ttPartTran.company and
PartTran.JobNum = ttPartTran.JobNum and PartTran.TranType = 'MFG-STK')
no-lock.
Accumulate PartTran.TranQty (Sub-Total).
end.
end.
Error message =
QUERY-PREPARE text must have 1 FOR EACH/PRESELECT for each query buffer.
(7325)

Epicor 9.04.507A
Mike





[Non-text portions of this message have been removed]
I have been asked to prevent receiving to stock more than any previous operation has completed. To do that I am trying to create a condition query that will read PartTran and accumulate the previous quantity received so I can add the current transaction amount, then compare that to each of the JobOper qtycompleted. My problem is in writing a condition query. I cannot come up the code that will accumulate the quantity from PartTran. The manual I am reading says I can use ABL and BAQ compliant query, but when I try to add my second table I get the error message shown below. Any ideas on what I am doing wrong?
Current code =
for each ttPartTran where ((ttPartTran.RowMod = 'A' or ttPartTran.RowMod = 'U') and ttPartTran.TranType = 'MFG-STK') no-lock.
for each PartTran where (PartTran.Company = ttPartTran.company and PartTran.JobNum = ttPartTran.JobNum and PartTran.TranType = 'MFG-STK') no-lock.
Accumulate PartTran.TranQty (Sub-Total).
end.
end.
Error message =
QUERY-PREPARE text must have 1 FOR EACH/PRESELECT for each query buffer. (7325)

Epicor 9.04.507A
Mike