Skip to Content

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

SAP B1 crystal report: Customer Receivable Aging report

Hi All, I want to write a Customer Receivable Aging report in crystal report. I was using query to union open AR crdit memo and AR invoice. but, I foggot to add incomming payment ORCT. I really have trouble to get Customer Receivable Aging report . Can anyone help me? thanks Is that I did in wrong direction?

SELECT OINV.DocEntry,OINV.DocNum,OINV.ObjType,OINV.CardCode,OCRD.CntctPrsn,OCRD.fax,OINV.NumAtCard,OINV.Address,OCTG.PymntGroup

,OINV.CardName,OINV.DocDate,OINV.DocDueDate,OINV.DocCur,OINV.DocTotalFC,

OINV.DocTotal, (OINV.DocTotal-OINV.PaidToDate) as AmountAUD

FROM SAPLIVE.dbo.OINV OINV join SAPLIVE.dbo.OCTG OCTG

On OINV.GroupNum=OCTG.GroupNum

join SAPLIVE.dbo.OCRD OCRD

On OINV.CardCode=OCRD.CardCode

WHERE OINV.CANCELED='N' AND OINV.DocStatus='O' AND (OINV.DocTotal-OINV.PaidToDate)>0

union

SELECT ORIN.DocEntry,ORIN.DocNum,ORIN.ObjType,ORIN.CardCode,OCRD.CntctPrsn,OCRD.fax,ORIN.NumAtCard,ORIN.Address,OCTG.PymntGroup

,ORIN.CardName,ORIN.DocDate,ORIN.DocDueDate,ORIN.DocCur,ORIN.DocTotalFC,

ORIN.DocTotal,(ORIN.DocTotal-ORIN.PaidToDate)as AmountAUD

FROM SAPLIVE.dbo.ORIN ORIN join SAPLIVE.dbo.OCTG OCTG

On ORIN.GroupNum=OCTG.GroupNum

join SAPLIVE.dbo.OCRD OCRD

On ORIN.CardCode=OCRD.CardCode

WHERE ORIN.CANCELED='N' AND ORIN.DocStatus='O' AND (ORIN.DocTotal-ORIN.PaidToDate)

Former Member

Helpful Answer

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