Analytical Account GL Detail query

Here is a template Analytical Accounting GL Detail query
select aa0.JRNENTRY,
        aa1.aaGLHdrID, aa1.aaGLDistID, aa1.INTERID, aa1.ACTINDX, aa1.DEBITAMT, aa1.CRDTAMNT,
        aa2.DEBITAMT, aa2.CRDTAMNT, aa2.aaAssignedPercent / 100 as assignedPct,
        aa3.aaTrxDimID, aa3.aaTrxCodeID,
        aa401.aaTrxDimCode, aa401.aaTrxDimCodeDescr,
        aa400.aaTrxDim, aaTrxDimDescr
    from AAG30000 aa0
        left join AAG30001 aa1 on aa0.aaGLHdrID = aa1.aaGLHdrID
        left join AAG30002 aa2 on aa2.aaGLHdrID = aa1.aaGLHdrID and aa2.aaGLDistID = aa1.aaGLDistID
        left join AAG30003 aa3 on aa3.aaGLHdrID = aa2.aaGLHdrID and aa3.aaGLAssignID = aa2.aaGLAssignID and aa2.aaGLDistID = aa3.aaGLDistID
        left join AAG00401 aa401 on aa401.aaTrxDimID = aa3.aaTrxDimID and aa401.aaTrxDimCodeID = aa3.aaTrxCodeID
        left join AAG00400 aa400 on aa400.aaTrxDimID = aa401.aaTrxDimID    
    where aa2.aaAssignedPercent <> 10000       

RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences