cuiwenyuan
20th March 2006, 08:08
i want to export the data from PO header and PO lines in one exchange scheme. how to do?
appreciate your help, thanks in advanced.

please see below SQL inquiry:

select
whinp100.item,
whinp100.qana,
whinp100.date,
whinp100.orno,
whinp100.pono,
tcibd001.citg,
tcibd001.cuni,
tdpur400.ratp(1),
tdpur401.cwar,
tdpur400.ccur,
tdpur401.pric,
tdpur401.cupp,
tdpur400.otbp,
tdpur400.cotp,
tdipu001.suti,
tdipu001.sutu,
tdpur400.ccon,
tccom001.nama,
tdpur401.txta
from tcibd001,tdpur400,tdpur401,whinp100,tdipu001,tccom001
where
tcibd001.citg >= tcibd001.citg.f and
tcibd001.citg <= tcibd001.citg.t and
whinp100.item >= whinp100.item.f and
whinp100.item <= whinp100.item.t and
whinp100.date >= whinp100.date.f and
whinp100.date <= whinp100.date.t and
whinp100.orno >= whinp100.orno.f and
whinp100.orno <= whinp100.orno.t and
tdpur400.otbp >= tdpur400.otbp.f and
tdpur400.otbp <= tdpur400.otbp.t and
tdpur400.cotp >= tdpur400.cotp.f and
tdpur400.cotp <= tdpur400.cotp.t and
tcibd001.kitm >= tcibd001.kitm.f and
tcibd001.kitm <= tcibd001.kitm.t and
tdpur401.cwar >= tdpur401.cwar.f and
tdpur401.cwar <= tdpur401.cwar.t and
tdpur400.ratp(1) >= tdpur400.ratp(1).f and
tdpur400.ratp(1) <= tdpur400.ratp(1).t and
whinp100.koor = 2 and
tdipu001.item = tdpur401.item and
tcibd001.item = whinp100.item and
tdpur400.orno = whinp100.orno and
tdpur401.orno = whinp100.orno and
tdpur401.pono = whinp100.pono and
tdpur401.sqnb = whinp100.ponb and
tdpur400.ccon = tccom001.emno
order by
whinp100.item,
whinp100.date

mgakhar
21st March 2006, 21:45
Hi,
You can use 1 exchange scheme, however, you will need to maintain 2 ascii files and 2 batches - one for each table.

If you require the output to be in the same file then you may want to use SQL Queries - ttadv3180m000 - in Baan 4. Hopefully the session code is same for Baan 5 as well.

Hope this helps.

MG.