Hi All,
I need your expertise to jive this query with me.
I need to produce a query in foreign currency .
at this moment, I only match between tdpur400 and tdpur401 because user want it to line items and request to have in home currency .
I use currency from tdpur400 and line items from tdpur401.
at moment, I didn't do anything with exchange rate.
however, I'm stuck because this query print hundred of lines despite 7 lines order. I have rectified but still not resolve.
Please help me at least I can display the order lines correct then we go to forex calculation .
below in text the query
--------------------------------------------------------------
select
tdpur401.orno, | Purchase Order
tdpur401.odat, | Order Date
tccom100.nama, | Name
tdpur401.item, | Item
tcibd001.dsca, | Description
tdpur401.qoor, | Ordered Quantity
tdpur401.cuqp, | Purchase Unit
tdpur401.pric, | Price
tdpur401.oamt, | Order Amount
tdpur400.ccur | Currency
from
tccom100, | Business Partners
tcibd001, | Items - General
tcmcs008, | Currency Rates
tdpur400, | Purchase Orders
tdpur401 | Purchase Order Lines
where
tdpur401.odat >= tdpur401.odat.f and
tdpur401.odat <= tdpur401.odat.t and
tdpur400.ccur = tcmcs008.ccur and
tdpur401.cvat = "NOIMP" and
tdpur401.item = tcibd001.item and
tdpur401.oltp <> tdgen.oltp.detail and
tdpur401.oltp <> tdgen.oltp.backorder and
tdpur401.orno = tdpur400.orno and
tdpur401.otbp = tccom100.bpid
----------------------------------------------------------------------------
Thank you
I need your expertise to jive this query with me.
I need to produce a query in foreign currency .
at this moment, I only match between tdpur400 and tdpur401 because user want it to line items and request to have in home currency .
I use currency from tdpur400 and line items from tdpur401.
at moment, I didn't do anything with exchange rate.
however, I'm stuck because this query print hundred of lines despite 7 lines order. I have rectified but still not resolve.
Please help me at least I can display the order lines correct then we go to forex calculation .
below in text the query
--------------------------------------------------------------
select
tdpur401.orno, | Purchase Order
tdpur401.odat, | Order Date
tccom100.nama, | Name
tdpur401.item, | Item
tcibd001.dsca, | Description
tdpur401.qoor, | Ordered Quantity
tdpur401.cuqp, | Purchase Unit
tdpur401.pric, | Price
tdpur401.oamt, | Order Amount
tdpur400.ccur | Currency
from
tccom100, | Business Partners
tcibd001, | Items - General
tcmcs008, | Currency Rates
tdpur400, | Purchase Orders
tdpur401 | Purchase Order Lines
where
tdpur401.odat >= tdpur401.odat.f and
tdpur401.odat <= tdpur401.odat.t and
tdpur400.ccur = tcmcs008.ccur and
tdpur401.cvat = "NOIMP" and
tdpur401.item = tcibd001.item and
tdpur401.oltp <> tdgen.oltp.detail and
tdpur401.oltp <> tdgen.oltp.backorder and
tdpur401.orno = tdpur400.orno and
tdpur401.otbp = tccom100.bpid
----------------------------------------------------------------------------
Thank you