Query G/L Account Balances
Can anyone help me determine which view to use in Oracle Financials to query the Actual G/L Account Balances?
I have used "GLBV_ACTUAL_BALANCES" but my results are suspicious (I have one account that returns a balance, when there is no balance for that account when viewed inside of Oracle Financials).
Thank you very much,
Craig Tennant
GL_BALANCES stores actual, budget, and encumbrance balances for detail and summary accounts.So pls try this table.
Note that the column ACTUAL_FLAG is either âAâ, âBâ, or âEâ for actual,budget,or encumbrance balances, respectively.
Similar Messages
-
Hi everyone. I wrote a query to get the balance for an internal bank account below:
select cba.bank_account_id, cba.bank_account_name, cba.bank_account_num,
cbau.bank_acct_use_id, (glb.period_net_dr - glb.period_net_cr) begin_balance,
hr_general.decode_organization(:p_org_id) company
from ce_bank_accounts cba, ce_bank_acct_uses_all cbau, gl_balances glb
where cbau.bank_account_id = cba.bank_account_id
and glb.period_name = 'SEP-10'
and cba.bank_account_id = :p_bank_account_id
and glb.code_combination_id = cba.asset_code_combination_id
The column begin _balance gives the opening balance. But if you notice, I am using period name is SEP-10. The problem is, my requirement is to get the balance between 2 dates. Say 10-JAN-2010 and 15-FEB-2010. How do I go about this?
ThanksI do not think thats possible from the GL_BALANCES table if we do not have a period for each day as the table stores data for a period and not for a day. The same reason we do not have a daily trial balance.
Will be happy to get a work-around !
Thx / Sid -
Query to Find Account Balances (Actual & Budgeted).
Hi
can any one suggest a query to list all GL (R12) Account (Segment2) Balances (Actual and Budgeted) for a given Enitity (Segment1) and Period.
Some accounts have sub-accounts with Parent child relationship. List should include all child accounts where ever balances exist.
or Pl. point me thread if it is already answered earlier in this forum.
Thanks,
T.
Edited by: user13072694 on May 28, 2010 2:15 PM
Edited by: user13072694 on May 28, 2010 2:19 PM
Edited by: user13072694 on May 28, 2010 2:25 PMHello.
See if this query helps you:
SELECT cc.segment2,
nvl(sum(bal.begin_balance_dr + bal.period_net_dr - bal.begin_balance_cr - bal.period_net_cr),0) "Actual Balance",
nvl(sum(balb.begin_balance_dr + balb.period_net_dr - balb.begin_balance_cr - balb.period_net_cr),0) "Budget Balance"
FROM gl_balances bal, gl_balances balb, gl_code_combinations cc
WHERE cc.code_combination_id = bal.code_combination_id
AND balb.code_combination_id = cc.code_combination_id
AND bal.set_of_books_id = <'your SOB id'>
AND balb.set_of_books_id = <'your SOB id'>
AND bal.period_name = <'your actual period name'>
AND balb.period_name = <'your budget period_name'>
AND bal.actual_flag = 'A'
AND balb.actual_flag = 'B'
AND bal.currency_code = <'you SOB currency code'>
AND balb.currency_code = <'your SOB currency code'>
GROUP by cc.segment2
Hope this helps,
Octavio -
SQL Query to get Account Balance in Oracle Apps
Hi All,
I have to use GL Account as a parameter in one of my concurrent programs but before that i need to ensure that the account parameter has no money in it.
If anyone can help me with a SQL query to find the same, it would be a great help.
Regards,
ShrutiHi;
Please follow Subject: Troubleshooting various Issues in Translation of Oracle General Ledger Doc ID: 296379.1 and also etrm site(etrm.oracle.com) for find out more details.
Regards
Helios -
Query Account Balance Last Month
Dear All,
I need your help...I want to make query that show account balance AR at level 4 at end of month of last month. For example this month is March, so I want to show account balance AR at level 4 at end of month Feb.
Thanks for your help
Edited by: Ho We I on Mar 3, 2009 3:47 AMHi Ho,
Try this out,
SELECT SUM(Debit-Credit) as Balance from JDT1 WHERE RefDate <= [%0] and Account = [%1]
Supply the first parameter with end date of the month and the second parameter with the account you want to check.
Regardless which account you want to query (i wondered why you want to check AR balance by the account, you can get it from Customer Aging Report instead), you can use the query for any accounts
Hope it helps.
Cheers,
Marini -
Query help on totalling 2 account balances
Hi Experts,
I have the following query:
SELECT SUM(T0.[SYSDeb] - T0.[SYSCred]) AS 'Production'
FROM JDT1 T0 INNER JOIN OJDT T1 ON T0.TransId = T1.TransId WHERE T0.[Account] = '_SYS00000000238' AND T0.[Account] = '_SYS00000000239'
If I add the second WHERE statement the query gives me no results. I want to see the total of the 2 account balances in this query.
Any help would be appreciated.
MarliHi Marli,
Try this:
SELECT SUM(T0.SYSDeb - T0.SYSCred) AS 'Production'
FROM JDT1 T0
WHERE T0.Account in ('_SYS00000000238','_SYS00000000239')
Thanks,
Gordon -
GL Account Balance Query Issue
Hi,
I'm trying to extract GL Balances in the following format
Company Segment(Segment2) || Account Number(Segment1) || Cost Center Segment4 || Account Descr || Actual Flag || Account Type || Activity || Activity in Period || Currency || Period End date || Account Balance
Here's my query :
SELECT gcc.segment4 "Company Segment",
gcc.segment1 "Account",
gcc.segment2 "Cost Center",
a1.description "Account Description",
-- a2.description Company_Description,
Decode(gcc.account_type,'A','Asset','E','Expense','L','Liability','O','Equity','R','Revenue') "Account Type",
Decode(gcc.enabled_flag,'Y','TRUE','FALSE') "Active Account",
Decode(abs(bal.Period_net_dr - bal.Period_net_cr),0,'FALSE','TRUE') "Activity in Period",
bal.actual_flag " Actual Flag",
bal.currency_code "Account Currency",
per.end_date "Period End Date",
SUM(( NVL(bal.PERIOD_NET_DR,0) + NVL(bal.BEGIN_BALANCE_DR,0))) - SUM(NVL(bal.PERIOD_NET_CR,0)+NVL(bal.BEGIN_BALANCE_CR,0)) -
SUM( NVL(bal.BEGIN_BALANCE_DR,0) - NVL(bal.BEGIN_BALANCE_CR,0)) "Account Balance"
FROM apps.fnd_flex_values_vl a1, --- For Account Segment
apps.fnd_flex_values_vl a2, -- For Cost Center
apps.gl_code_combinations gcc,
apps.gl_balances bal,
apps.gl_periods per
WHERE a1.flex_value = gcc.segment1
AND a2.flex_value = gcc.segment2
and a1.flex_value_set_id = 111111 -- Value set id for Account
---and a2.flex_value_set_id = 222222 -- Value set id for Cost Center
and gcc.code_combination_id = bal.code_combination_id
and bal.period_name = per.period_name
and gcc.segment1 in ('777777') --- Sample Account for testing only
--and gcc.segment2 in (222222)
and per.period_set_name ='GL_CALENDAR'
and bal.period_name ='SEP-13'
and bal.actual_flag='A'
group by gcc.segment4,
gcc.segment1,
gcc.segment2,
a1.description,
-- Decode(gcc.account_type,'A','Asset','E','Expense','L','Liability','O','Equity','R','Revenue'),
Decode(gcc.enabled_flag,'Y','TRUE','FALSE'),
Decode(abs(bal.Period_net_dr - bal.Period_net_cr),0,'FALSE','TRUE'),
bal.actual_flag,
bal.currency_code,
per.end_date
order by gcc.segment1,gcc.segment2
1) If I comment value set id 222222(Cost Center), then I'm getting 15 Records ,If I uncomment that I'm getting 10 records?Is there anything wrong with my queryAs I'm not displaying descriptions for cost center and company do I need to join fnd_flex_values_vl again or not ? 2) To check activity in particular period in this case for SEP-13,I'm using the following clause : Decode(abs(bal.Period_net_dr - bal.Period_net_cr),0,'FALSE','TRUE') Do I need to check ABS values also ro not?Hi,
You can do this with WD dynamic programming.
You can do with domodifyview badi for accounting component /SAPSRM/WDC_UI_DO_ACC.
You need to handle both views 'V_DO_ACCOUNTING' and 'V_DO_ACCOUNT_DETAIL' in the domodifyview badi implementation.
I am sending the sample code. How to attach the custom search help dynamically.
DATA lo_nd_comp_context TYPE REF TO if_wd_context_node.
DATA lo_nd_acc_context TYPE REF TO if_wd_context_node.
DATA lo_nd_info_acc TYPE REF TO if_wd_context_node_info.
DATA lv_value_help_mode TYPE i.
DATA lv_value_help TYPE string.
" Read Context
lo_nd_comp_context = wd_context->get_child_node( name = 'COMP_CONTEXT' ).
" get node info object of accounting node
IF lo_nd_acc_context IS BOUND.
lo_nd_info_acc = lo_nd_acc_context->get_node_info( ).
ENDIF.
" continue only if node info is supplied
IF lo_nd_info_acc IS BOUND.
" get current search help info
lo_nd_info_acc->get_attribute_value_help(
EXPORTING
name = 'G_L_ACCT'
IMPORTING
value_help_mode = lv_value_help_mode
value_help = lv_value_help
" Below this will add the custom search help from SRM .
lo_nd_info_acc->set_attribute_value_help(
EXPORTING
name = 'G_L_ACCT'
value_help_mode = 'BUS2121'
value_help = 'Z_F4-Your search help' " you own search help.
endif.
Regards,
Devi prasad -
Sql query to find the balances for a customer account wise.
Hi,
Could someone help me with the sql query to find the balances for each customer account wise. This is need to generate the report.
presently we are using this query, but the output doesnot return the expected result.
SELECT sum(nvl(ps.acctd_amount_due_remaining,0)) "Balance"
FROM ra_cust_trx_line_gl_dist_all gld,
gl_code_combinations c,
ar_payment_schedules_all ps,
RA_CUSTOMER_TRX_ALL rat,
ra_customers rc
WHERE c.CHART_OF_ACCOUNTS_ID = 101
and gld.code_combination_id = c.code_combination_id
and rat.CUSTOMER_TRX_ID=gld.CUSTOMER_TRX_ID
and rat.CUSTOMER_TRX_ID=ps.CUSTOMER_TRX_ID
and ps.customer_id=rc.customer_id
and ps.status='OP'
and ps.gl_date <= :PDATE
and ps.org_id=:PORGID
and ps.class in ('GUAR','INV','DM','DEP')
and c.SEGMENT4=:Account_id
and ps.customer_id=:Customer_id
Thanks in advance.
Kalyan.Can someone help us with this.
-
Hi Expert,
Is it possible to get active account balance (by passing parameter using 'create date') thorugh Query.
If possible post query.
By,
KartHi Gordon Du,
This query may not correct, actually i need -Chart of accountwise
Balance
such as 101010 - capital account = 200000
210101 - Bank account = 100002
SELECT T1.[AcctName], T0.[LineMemo] Detail, T0.RefDate 'Posting Date', T0.TransId 'Transaction Number', T2.[AcctName] OffsetAccount, T0.[Debit], T0.[Credit], T0.[Ref1], T0.[Ref2], '0' Balance FROM JDT1 T0 INNER JOIN OACT T1 ON T0.Account = T1.AcctCode INNER JOIN OACT T2 ON T0.[ContraAct] = T2.AcctCode WHERE (T1.[AcctName] = '[%1]' or '[%1]' = '') and (T0.[RefDate] >= '[%0]' or '[%0]' = '') and (T0.RefDate <= '[%2]' or '[%2]' = '')
by
kart -
How would one build a query to give daily balance across bank accounts? (to then plot in a graph)
Assumptions:
* There is a table TRANSACTIONS which includes columns TRANS_DATE, AMOUNT and BANK_ID. It does NOT include a column for balance. So current balance for a bank account is the sum of the AMOUNTs for that BANK_ID for example. Balance on date XX will be the sum
of all AMOUNTS for that BANK_ID for all TRANS_DATE's prior and including the date XX.
* There is not necessarily transactions on every day for each bank
* Table BANKS which has BANK_ID and TITLE
Would like a query that gives: Supply StartDate and EndDate for the query:
Date Bank1Balance Bank2Balance Bank3Balance TotalBalance
1/1/15 $100 $200 $100 $400
1/2/15 $200 $200 $100 $500
etcYou'll find examples of queries for computing balances in various contexts in Balances.zip in my public databases folder at:
https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
The queries in this little demo file return balances per transaction, however, whereas you appear to wish to return balances at close of business per day. This can easily be done by means of a subquery which sums all transactions to date. To return
balances for all dates regardless of whether or not any transactions have been undertaken on the day, an auxiliary calendar table can be introduced into the database to plug the gaps, The Calendar.zip file in my same OneDrive folder has means of generating
such a table.
With the introduction of an auxiliary calendar table into the database a query can then be written to return the balance per customer at close of business per day over the period 2009 - 2012 covered by the data in the Transactions table:
SELECT CustomerID, Firstname, LastName, calDate,
(SELECT SUM(TransactionAmount)
FROM Transactions
WHERE Transactions.CustomerID = Customers.CustomerID
AND Transactions.TransactionDate <= Calendar.calDate) AS Balance
FROM Calendar,Customers
WHERE calDate BETWEEN #2009-01-01# AND #2012-12-31#
ORDER BY CustomerID, CalDate;
Rows for each customer/date are returned by means of the Cartesian product of the Calendar and Customers tables (the latter analogous to your Banks table), and the subquery returns the balance at close of each day by correlating the Transactions table with
the Customers and Calendar tables, returning the sum of all transactions per customer up to and including the date in question. In this example credit and debit transactions are expressed as positive and negative values in a single column of course,
but where separate credit and debit columns are used its merely a case of summing (Credit-Debit), as done in some of the examples in my demo.
To return the data in a horizontal format per date I'd suggest the use of a report which returns one row per date, and within it a multi-column subreport in across-then down column layout, linking the subreport to the parent report on the date columns.
Ken Sheridan, Stafford, England -
Hi all,
Is it possible to retrieve the GL Account balances at a particular date by use of a user query?
Regards,
HenryHi Jitin,
The information I want to display is as follows:
__TODAY_ MTD YTD_
Sales (Branch A)
Sales (Branch B)
VAT
Stock (Branch A)
Stock (Branch B)
The management wants to see the above information without having to use the TB or Balance Sheet. Thanks
Rgds,
Henry -
How to show GL Account Balance amount in Ledger Report.
Hi,
We need to show General Ledger balance based transaction wise how we can show GL Account Balance where it will store which table and which filed.here below query is there here only I need to add balance after Total please guide me.
select T0.transid,T0.number,T2.seriesname,T0.refdate,T0.baseref,T1.account,T1.shortname,T3.acctname,T1.credit,T1.debit,T1.credit+T1.debit as Total,T3.CurrTotal,T0.ref1,T0.ref2,T1.ref3line,T0.memo,T1.paymentref, T1.ProfitCode, T1.OcrCode2, T1.OcrCode3,
T1.OcrCode4, T1.OcrCode5,T1.U_Naration as RowNarration,T0.U_naration as DocumentNarration from OJDT T0
inner join jdt1 T1 on T0.transid=T1.transid
inner join nnm1 T2 on T2.series=T0.series
inner join oact T3 on T3.acctcode=T1.account
where T3.acctcode='1030101003'
Regds,
Sampathhi sampath,
I giving u fair idea how to show g/l account balance
There is a field in JDT1 - journal entry rows - JDT1.DebCred which is indicator when g/l account
is debited / credited,it is filled with value D or C.
You can add Case syntax in existing query with condition JDT1.DebCred = 'D' then
JDT1.Debit + Opening/Closing balance and if JDT1.DebCred = 'C' then
JDT1.Credit - Opening/Closing balance.
It requires much time & effort to build this query.
Edited by: Jeyakanthan A on May 14, 2009 3:54 PM -
How to Query up Monthly Closing Balance on a Table of Transactions
Probably a simple question for an analytics wizard, but I'm not there yet...
Suppose I have a table of financial transactions named TX with TX_DATE and TX_AMOUNT columns and that some months may not have any transactions (i.e., there are gaps). I would like to know the best query for returning the closing monthly balance with no gaps. I suspect it will involve a trick I saw on asktom.oracle.com for generating the list of months between two dates, some outer join cleverness, the use of SUM(TX_AMOUNT) OVER (ORDER BY TX_DATE) or something to generate the running account balance, and some magic to pluck out the last balance amount for each month.
The trick I saw from askTom for generating a gap-less list of months looked like:
with date_range as
(select to_date('1/1/2007','mm/dd/yyyy') mindt, sysdate maxdt from dual)
select level, add_months(mindt,level-1) dt
from date_range
connect by level <= months_between(maxdt,mindt)+1
(assuming in this case the range of tx dates was Jan 1, 2007 through today).
Any assistance would be greatly appreciated.
Thanks,
BillSorry for the lack of clarity - by closing monthly balance, I mean I want the balance of the account as of the end of each month. So, you have to keep a running balance across the transactions (including a data point for months with no transactions) and then grab the running balance out for the latest transaction in each month. I have all but that last bit (which may be answered by another recent thread that I am reading). Here is what I have so far:
with date_range as
(select min(transaction_date) mindt, sysdate maxdt
from fz_transaction
where account_id = 320001
all_months as
(select level, add_months(mindt,level-1) dt
from date_range
connect by level <= months_between(maxdt,mindt)+1
gapless_transactions as
(select id, transaction_date, amount
from fz_transaction
where account_id = 320001
union all
select 1 id, dt transaction_date, 0 amount
from all_months
running_balance as
(select id, transaction_date, sum(amount) over (order by transaction_date, id) balance
from gapless_transactions
order by transaction_date desc, id desc
select * from running_balance
-- Working on this last part to pull out the last entry in each month...
Note that the UNION ALL in the gapless_transactions part throws in a bogus (but harmless in this computation) $0 transaction each month so I have no gaps in any month.
Perhaps there is a more elegant strategy, but I think I'm almost there... -
How to get On Account Balance for a Customer in Accounts Receivables(AR)
Hi,
Pls let me know how i can get the On Account Balance and Customer Balance for a particular customer in AR.
Pls let me if there is any SQL query or function availabe to get On Account Balance in AR.
Is On Account Balance and Customer balance is same in AR.
Pls let me know how i can get both the values.
regards
Udittry to join your query from these tables:
1.Customer - RA_CUSTOMERS_ALL
2.Customer Name - RA_CUSTOMERS_ALL
3. Ship to /Bill to & Location - HZ_CUST_ACCT_SITES_ALL and RA_TERRITORIES
4.Account Balance - AR_PAYMENT_SCHEDULES_ALL
5.Current Balance - AR_PAYMENT_SCHEDULES_ALL
if you additionally need aging try to set from here
a)1-30 Past - AR_PAYMENT_SCHEDULES_ALL
b)31-60 Past - AR_PAYMENT_SCHEDULES_ALL
c)Over 90 Past - AR_PAYMENT_SCHEDULES_ALL
This way you can achieve the outcome -
How to Print the Account Balance in Outgoing Payment PLD
Hello Experts
How to Print the Account Balance in Outgoing Payment PLD
Dixit PatelHi,
you can use udf in the outgoing payment to record the vendor's account balance and then using the query FMS ;
select balance from ocrd where cardcode = $[$4.0.0]
Assign the query in the UDF so that each time after entering the vendor code, the balance appears.
After add the payment, the balance is recorded.
In PLD, you can create the UDF field to make the balance appears in the outgoing report.
Rgds,
JimM
Maybe you are looking for
-
Installing Linux on Yoga Tablet 2 Pro 13" that comes with Android
Hello all, has anyone yet tried to install a Linux distribution on the Tablet 2 Pro 13" to replace the Android it comes with? Does the Android version of this tablet even boot from USB media, or is locked in some way? That tablet with Linux would jus
-
Hi Experts, We have a requirement to change the details of a customer. We are using BAPI, "BAPI_CUSTOMER_CHANGEFROMDATA". Change is happening when we try to change details like name, But when we try to change 'country' field, we are getting error say
-
Safari does not allow to install USB drivers downloaded from certain websites
Safari does not allow to install USB drivers from http://www.flymaster.net/Products/LIVE/tabid/143/Default.aspx I don't know what to do to allow downloads from www.flymaster.net to be installed.
-
The only way I can explain my predicament is by adding a snap shot. I have a cover (the grey area with the 1 on it). The problem is that, on the opposite side it is white. I do not want that white area on the left hand side, I want it to look like a
-
I would like to know what the perfomance issues if any the following code would cause: select single matnr from mean into lv_matnr where ean11 = lv_ean11 and