Eddie Monster
4th January 2005, 22:13
I am trying to get a query in a customized session script to mimic a Form Query in tdpur4533m000 by setting the status = 3 (maintain receipts).
I have two functions (below) that I am trying to get the same results as querying inside the Display Purchase Order Line Status session. I can't seem to get my script query to pull the same data.
I have a bad case of the flu and just can't see what I'm doing wrong. Can anyone offer help - my brains ache.
Thank you very much in advance!
function get.tdpur045.data()
{
select tdpur045.orno, tdpur045.pono, max(tdpur045.srnb)
from tdpur045
group by tdpur045.orno, tdpur045.pono
order by tdpur045.orno, tdpur045.pono
selectdo
get.tdpur045.spur()
| get.tiitm001.data()
if tdpur045.spur = 3 then | Awaiting Maintain Receipts
rprt_send()
else
| Do Nothing...
endif
selectempty
| Do Nothing...
endselect
}
function get.tdpur045.spur()
{
select tdpur045.spur
from tdpur045
where tdpur045.orno = :tdpur045.orno
and tdpur045.pono = :tdpur045.pono
and tdpur045.srnb = :tdpur045.srnb
selectdo
selectempty
tdpur045.spur = 99
endselect
I have two functions (below) that I am trying to get the same results as querying inside the Display Purchase Order Line Status session. I can't seem to get my script query to pull the same data.
I have a bad case of the flu and just can't see what I'm doing wrong. Can anyone offer help - my brains ache.
Thank you very much in advance!
function get.tdpur045.data()
{
select tdpur045.orno, tdpur045.pono, max(tdpur045.srnb)
from tdpur045
group by tdpur045.orno, tdpur045.pono
order by tdpur045.orno, tdpur045.pono
selectdo
get.tdpur045.spur()
| get.tiitm001.data()
if tdpur045.spur = 3 then | Awaiting Maintain Receipts
rprt_send()
else
| Do Nothing...
endif
selectempty
| Do Nothing...
endselect
}
function get.tdpur045.spur()
{
select tdpur045.spur
from tdpur045
where tdpur045.orno = :tdpur045.orno
and tdpur045.pono = :tdpur045.pono
and tdpur045.srnb = :tdpur045.srnb
selectdo
selectempty
tdpur045.spur = 99
endselect