Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Searching By BP Properties

Is there any way to pull up BP Customers by Properties?

We would like to be able to select one or multiple properties and have a Query that pulls up the Customers that have these properties checked.

The Query should pull -

Acct #...Company Name...Total YTD Sales...Property

Thanks!

Mike

Former Member
Former Member replied

Mike,

Here you are:

SELECT T0.[CardCode] 'Acct #', T0.[CardName] 'Company Name', 
SUM(T1.[Debit] - T1.[Credit]) 'Total YTD Sales', T0.[QryGroup2] 
FROM OCRD T0, JDT1 T1 WHERE T0.[QryGroup2] = 'Y' and YEAR(T1.[RefDate]) = YEAR(GetDate()) 
and T0.[CardCode] = T1.[ShortName] AND T0.CardType = 'C' AND (T1.TransType = '13' OR T1.TransType = '14')
GROUP BY T0.[CardCode], T0.[CardName], T0.[QryGroup2]

You can replace 2 with any other number to get the other property report.

Thanks,

Gordon

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question