smusba
18th January 2009, 10:54
Hi Gurus,
the Query is :
"Take the data from tdrpl100 based on order date and check the status should be delivered and then check that order into tdsfl003 table if RPL order no is available then print it otherwise leave it blank.
Join between two table is RPL order no and warehouse and date. "
This is my script but i am not getting the required output. Please help..
I am getting output only from tdrpl100 only..not from tdsfl003
functions:
function read.main.table()
{
select tdrpl100.*
from tdrpl100
where tdrpl100.rwar = :rwar
and tdrpl100.dwar = :dwar
and tdrpl100.odat between :odat.f and :odat.t
and tdrpl100.srpl > 1
order by tdrpl100.orno
selectdo
select tdsfl003.*
from tdsfl003
where tdsfl003.orno = :tdrpl100.orno
and tdsfl003.rwar = :tdrpl100.rwar
and tdsfl003.dwar = :tdrpl100.dwar
and tdsfl003.trtp = "MREQ"
selectdo
tdsfl003.orno = tdrpl100.orno
tdsfl003.rwar = tdrpl100.rwar
tdsfl003.dwar = tdrpl100.dwar
selectempty
tdsfl003.orno = tdrpl100.orno
tdsfl003.rwar = tdrpl100.rwar
tdsfl003.dwar = tdrpl100.dwar
endselect
select tiitm001.*
from tiitm001
where tiitm001.item = :tdrpl100.item
selectdo
endselect
rprt_send()
endselect
}
I have attached two tables.
the Query is :
"Take the data from tdrpl100 based on order date and check the status should be delivered and then check that order into tdsfl003 table if RPL order no is available then print it otherwise leave it blank.
Join between two table is RPL order no and warehouse and date. "
This is my script but i am not getting the required output. Please help..
I am getting output only from tdrpl100 only..not from tdsfl003
functions:
function read.main.table()
{
select tdrpl100.*
from tdrpl100
where tdrpl100.rwar = :rwar
and tdrpl100.dwar = :dwar
and tdrpl100.odat between :odat.f and :odat.t
and tdrpl100.srpl > 1
order by tdrpl100.orno
selectdo
select tdsfl003.*
from tdsfl003
where tdsfl003.orno = :tdrpl100.orno
and tdsfl003.rwar = :tdrpl100.rwar
and tdsfl003.dwar = :tdrpl100.dwar
and tdsfl003.trtp = "MREQ"
selectdo
tdsfl003.orno = tdrpl100.orno
tdsfl003.rwar = tdrpl100.rwar
tdsfl003.dwar = tdrpl100.dwar
selectempty
tdsfl003.orno = tdrpl100.orno
tdsfl003.rwar = tdrpl100.rwar
tdsfl003.dwar = tdrpl100.dwar
endselect
select tiitm001.*
from tiitm001
where tiitm001.item = :tdrpl100.item
selectdo
endselect
rprt_send()
endselect
}
I have attached two tables.