Last week I sent a quetion about an approval query.
This is the link
http://scn.sap.com/thread/3174007#
The answer Gordon gave me helped me alot.
Now I would like to add another condition to the query and i do not succeed.
The query which was build with Gordon's help is this :
"
SELECT distinct 'true'
FROM dbo.OINV T0
INNER JOIN dbo.OCRD T1 ON T0.CardCode = T1.CardCode
INNER JOIN dbo.OBPP T2 ON T1.Priority = T2.prioCode and T2.priocde = 2
WHERE T0.CardCode = $[oinv.CardCode"
The added condition is - the invoice should be only items invoice.
Can you please help me? thank you
Zipi Ganan
Hi,
Check this :
SELECT distinct 'true'
FROM dbo.OINV T0
INNER JOIN dbo.OCRD T1 ON T0.CardCode = T1.CardCode
INNER JOIN dbo.OBPP T2 ON T1.Priority = T2.prioCode and T2.priocde = 2
WHERE T0.CardCode = $[oinv.CardCode] and T0.Doctype ='I'
Kind Regards,
Jitin
SAP Business One Forum Team
thank you for your help. i've solved it in another way . here is my solution
"SELECT distinct 'true'
FROM dbo.OINV T0
INNER JOIN dbo.OCRD T1 ON T0.CardCode = T1.CardCode
WHERE $[OINV.docType] = 'I' and T1.priority = 2 and T0.CardCode = $[oinv.CardCode].
thanks again
Zipi Ganan