Cross Check Ledger balances from tables data for trial balance checking in MSD axapta

If you are facing any amount mismatch problem in trial balance report then you can cross check data with ledgertrans and ledgerbalancedimtrans table.

You can check amount dimension wise. You can get hints from below query.

select Sum(AmountMST) from _LedgerTrans group by AccountNum,transdate,Dimension[1],Dimension[2]

select sum(DebitMst),Sum(CreditMst) from _LedgerBalancesDimTrans where LedgerBalancesDimTrans.AccountNum ==_LedgerTrans.AccountNum &&
_LedgerBalancesDimTrans.transdate==_LedgerTrans.transdate &&
_LedgerBalancesDimTrans.Dimension[1]==_LedgerTrans.Dimension[1] &&

amt= _LedgerBalancesDimTrans.DebitMST + _LedgerBalancesDimTrans.CreditMST