Financial Reporter - equivalent SQL statement of FRAMTA("BALP")

Hi,

Does someone written and willing to share a SQL statement that is an equivalent of FRAMTA("BALP") from the Financial Reporter?

I am trying to figure out how our GL Inventory account is calculated.

I read one of the discussions to run trial balance and compare Inventory account with summing the TRANSCOST from ICIVAL table.

I ran a trial balance and the result says 214,419.95. However, when I sum up the TRANSCOST field the result is 253,392.91.

FRAMTA("BALP") from the Financial Reporter shows the same amount of 214,419.95 as the trial balance.

When I added the TRANSAMT of the GL Inventory account it gave me 422,521.34. (SELECT SUM(TRANSMT) FROM GLJED WHERE ACCTID = 13000).

My head can't handle how the trial balance amount and the FRAMTA("BALP") balances are calculated.

Your help is highly appreciated.