09-09-2021 8:00 AM
I need to know a query to execute G/L accounts balance with details. Especially it's an asset account and consists of A/P invoices and Capitalizations, JE, and Payment vouchers. I need to expand all the Row details in those A/P Invoices, Capitalizations, and JE's in that particular G/L account. I declined part of the query as follows and I can't design the whole query.
SELECT T2.Baseref, T0.[AcctCode],T0.[AcctName], T1.[TransId],T1.[Account], T1.[Debit], T1.[Credit], T1.[RefDate], T1.[CreatedBy], T1.[BaseRef] ,Acq1.itemcode as 'AC ItemCode' ,PCH1.ItemCode
FROM OACT T0
INNER JOIN JDT1 T1 ON T0.[AcctCode] = T1.[Account]
inner join OJDT T2 on T2.transid= T1.Transid
left outer join OACQ on T2.baseref= OACQ.Docnum and T2.transtype= 1470000049
left outer join ACQ1 on OACq.Docentry=ACQ1.docentry
left outer join OPCH on T2.baseref= OPCH.Docnum and T2.transtype= 18
left outer join PCH1 on OPCH.Docentry= PCh1.Docentry
WHERE T0.AcctCode='ANCA-100-200-20'
09-09-2021 8:00 AM
Welcome to the SAP Community! We wanted to give you the opportunity to take the tutorial to get started in SAP Community, as it provides tips for preparing questions that draw responses from our members.
Additionally, by adding a picture to your profile you encourage readers to respond to your question. Learn more about your profile using Profile Tutorial
Thank you!