Query Active account balance
Hi Expert,
Is it possible to get active account balance (by passing parameter using 'create date') thorugh Query.
If possible post query.
By,
Kart
Hi 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
Similar Messages
-
We need a query for customer balance
Example :if i will give the from date 01.05.11 & to date 31.05.11 and from customer A & to customer E then in report data will display like Customer code ,Name, group,sales employee,last bill amt,last bill date,openning balance(from start to 30.04.11),total debit(from date 01.05.11 & to date 31.05.11 ),total credit(from date 01.05.11 & to date 31.05.11 ),last balance(31.05.11)
Please reply ASAPHi,
You have broken few forum rules already:
1. Never say ASAP on the forum. Here is a public forum. no one owe you anything
2. You have never close your threads properly
3. Sound like you are not B1 user. If you are, give your B1 version and PL
4. Even if you are B1 user, report forum is the right forum.
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 -
How to query the opening balance for an specific account for an spec. date
Hi all,
for my user query I need to calculate the opening balance for an cash account for an specific date.
Any ideas, how can I do this?
Or may be you know a field in an SBO table that already contains information I need...
Best Regards,
InnaHi Inna,
to find the opening balance for an account or a business partner, please see SAP Note [1114253|https://service.sap.com/sap/support/notes/1114253] :
Symptom
How to find the opening balance of a business partner or G/L account.
Other terms
Account, customer, supplier, vendor, creditor, debitor, start, initial, first, opening balance, business partner, G/L, SAP Business One
Reason and Prerequisites
Consulting
Solution
There are several possible approaches:
Approach 1 - Business Partner Opening Balance:
1. Go to Business Partners -> Business Partner Master Data -> find the Business Partner
2. Click on the orange link arrow next to the field 'Account Balance' in the header region of the window.
3. Untick the boxes next to 'Posting date from', 'Display' and 'Display Unreconciled Trans. Only'.
4. Click on the button 'Refresh'.
5. Find 'OB' in the column 'Origin', this is the opening balance journal entry.
Approach 2 - Business Partner Opening Balance:
1. Go to Business Partners -> Business Partner Master Data.
2. Click on the orange link arrow next to the field 'Account Balance' in the header region of the window.
3. Untick the boxes next to 'Posting date from', 'Display' and 'Display Unreconciled Trans. Only'.
4. Click on the button 'Refresh'.
5. Double click on the column header 'Posting Date' to find the earliest transaction on the business partner account. This transaction could be opening balance, verify this with the company accountant.
Approach 3 - G/L Account Opening Balance:
1. Go to Financials -> Chart of Accounts -> click on the account name once.
2. Click on the orange link arrow next to the field 'Balance'.
3. Untick the boxes next to 'Posting date from', 'Display' and 'Display Unreconciled Trans. Only'.
4. Click on the button 'Refresh'.
5. Find 'OB' in the column 'Origin', this is the opening balance journal entry.
Approach 4 - Business Partner and/or G/L Account Opening Balance:
1. If using SAP Business One 2005 SP01 or earlier, go to Reports -> Query Generator -> click on 'Execute'.
2. If using SAP Business One 2007 or later, go to Tools -> Queries -> Query Generator -> click on 'Execute'.
3. Ignore the red system message in the bottom of the screen.
4. Click on the pencil icon in the top left of the window, the field with 'SELECT *' will change colour to white, then yellow when activated by clicking in the field.
5. Copy the query below:
SELECT T0.[TransId], T0.[Debit], T0.[Credit] , T0.[CreatedBy], T0.[TransType] FROM [dbo].[JDT1] T0 WHERE T0.[TransType] = '-2' and T0.[ShortName] = '[%1]'
6. Click on 'Save' and give the query an appropriate name and select the appropriate category.
7. Click on 'Execute'.
8. Click on 'Existing Values'.
9. Select the G/L account or the Business Partner name from the list and click on 'OK'.
10. The system message 'Records retrieved by this query #' (# = number of records) will pop up. Click on 'OK'.
All the best,
Kerstin -
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 -
Hi Guys,
What is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10?
I have to write an AP Invoice Aging Report in Discoverer to show all unpaid invoices that have been transferred into GL... Business wants it to match one-to-one with the AP Trial Balance standard report...
Business wants to run the report for any date in a past...
The report has two parameters:
As Of Date - the same as As of Date for the AP Trial Report
Trial Balance Run Date - the date when Trial Balance was run...
Conditions are:
TRUNC(Invoice Date) <=TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
TRUNC(NVL(Payment Date,'01-JAN-5000')) > TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
TRUNC(Invoice Creation Date) <= TRUNC(NVL(TO_DATE(:Trial Balance Run Date),SYSDATE))
Distr Accounting Date <= TRUNC(NVL(TO_DATE(:As Of Date),SYSDATE))
NVL(Distr Creation Date,Invoice Creation Date) <= TRUNC(NVL(TO_DATE(:Trial Balance Run Date),SYSDATE))
Show_Flag = 'YES', where:
Show_Flag = CASE WHEN ( NVL(Cancelled Date,'01-JAN-1901') > NVL(:As Of Date,SYSDATE) AND NVL(Inv Amount Aud,0) = 0 ) THEN 'YES' ELSE ( CASE WHEN NVL(Inv Amount Aud,0) = 0 THEN 'NO' ELSE 'YES' END ) END
There is a difference between the logic of my report, and the logic of AP Trial Balance...
Could you please advise what I'm missing?
Thanks,
IanaWhat is the query for Accounts Payable Trial Balance (APXTRBAL) in 11.5.10? You can get the code by opening the report in Reports Builder and get the query.
Or, enable trace/debug as per (FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1]).
Thanks,
Hussein -
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 TennantGL_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. -
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 -
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 -
F.08 - G/L Account Balance
Hello All,
I am executing the report F.08 - G/L Account Balance. I am entering the data in selection parameters and executing the report. Now on the header level of the report, I am seeing Date and Time which i do not want to display.
Would you all please let me know the solution as i don't want to show data and time in report print.
Regards,
JigarHello,
Did you ever use business transaction event (BTE) before?
You can do it with BTE 00003210 in Process module.
I try to explain step by step how can you do that,
First of all, you must copy FM SAMPLE_PROCESS_00003210 to ZFI_PROCESS_00003210 via SE37 transaction.
Then go to FIBF -> Settings -> Products -> ... of a customer
Create a new line
Product : ZFI
Text : FI Developments
Active : tick checkbox
After that go to FIBF again -> Settings -> Process Modules -> ... of a customer
Create a new line
Process : 00003210
Ctr : Blank
Appl. : Blank
Function Module : ZFI_PROCESS_00003210
Product : ZFI
You can set break point on this FM and you can see system trigger when you execute F.08 report.
In ZFI_PROCESS_00003210 you must write some ABAP code for clearing date and time. Date and time values are in I_BHDGD-LINE1 .
I'm writting some sample code for you.
I hope it helps to you.
DATA : lv_fdpos LIKE sy-fdpos.
CLEAR : lv_fdpos.
SEARCH i_bhdgd-line1 FOR 'Time'.
lv_fdpos = sy-fdpos.
i_bhdgd+lv_fdpos(34) = ''.
Regards,
Burak -
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 -
Error in "Display G/L account balances" Fiori app
Hi experts,
I am getting below error while configuring the "Display G/L account balances" SAP Fiori app in our demo landscape. I am getting the similar error for all other 6 Finance apps that I am trying to configure.
Cannot call "Service"
GW error log says that this is an authorization error
The app was configured according to the standard SAP Fiori app configuration process, all services have been activated, roles have been created and assigned correctly to my user etc.
Here is also a su53 screenshot from backend SAP system
Below are the system details:
Gateway - SAP NW 7.4 SP10, UI for sFIN UIAPFI70 release 200(latest), SAP_UI SP11(latest)
Backend - SAP ECC 6.0 EhP 7 SP07, SAP_FIN 720(latest)
Do you have any pointers or ideas? Any help will be much appreciated!
Cheers,
AbhinavAbhinav,
How did you activate the Gateway service? (FAC*ENTITIES)
There seems to be some problems with Service registration. (/IWFND/MAINT_SERVICE)
In addition there seems to be problem with RFC authorization. -
GL account balance splitting in more than one line item in FSV
Friends,
While going through the FSV, gl account balance is splitting in more than one line item with same account name. But if we total the line items ultimately it is tallying with GL balance. What might be the reason. Why it is splitting the balance in more line items with same name and same account number.Dear,
You might be having Document Splitting Activation.with Bussiness Area/ Segment wise/Profit Center Wise. For this please Check - Path > Spro > SAP reference IMG > Financial Accounting (New) > General Ledger Accounting (New) > Business transactions > Document Splitting > Define Document Splitting Characteristics for General Ledger Accounting.
Please go through this & will be able see the Document Splitting is based on Bussiness Area/ Segment wise/Profit Center wise or may be both.
T & R,
Madhuri Panda -
Hello Friends,
Please can you let me know, if there is any transaction to generate a report on consumer ledger account.
I am aware of FPCC0002, but this generates a correspondence letter.
If there is a way out to get a output in report format.
Regards,
Charvi
Edited by: CharviS on Oct 11, 2011 11:13 AMHi Charvi
I don't think there's such a report in standard SAP.
However, it's not difficult to create a custom program to do it. The mass activity "Creation of Balanced Account Statements", transaction FPCC0002, uses function FKK_ACCOUNT_BALANCE_COMPUTE to determine the account balance of a customer (see event 0703, function FKK_SAMPLE_0703). So the custom program has to select all partner/accounts you want the balance for and call for each the function FKK_ACCOUNT_BALANCE_COMPUTE.
The function is not "fast", so in case you want the balance for a large customer set, I strongly recommend to execute such a report in parallel streams, for example as a mass activity.
Yep
Jürgen
Maybe you are looking for
-
I purchased stuff for a game I play, did not receive the stuff but money was taken from account, normally it goes through with no problem but tonight it just stopped Apple got the money but I did not get what I purchased
-
ADVC110 &cable box& capturing television using iMac/Leopard using iMovie
I bought the ADVC110 really only to have the television signal come right into a program (eitheriMovie or Final Cut)NOT to capture from VCR. I hooked up the ADVC w/ the cable box and manage to see the TV in the screen,, but I can't hear the audio whi
-
Hi... Is there any way to force OBI to join to the fact table when only one dimension is pulled into a query? For example, I have a generic date dimension with static dates loaded. Each date has its own alias. When I query a specific date, I only wan
-
Has anyone had success with Messaging Server 5.2 under Windows 2000 Server?
Just to be up front - we MUST use Windows 2000 - they're not giving me a choice to move to Solaris or Sun Hardware. Linux isn't even a choice, nor is WinNT. (I know, it's annoying). I've managed to get Directory Server 5.1 to run under windows 2000 w
-
Hello to All: We are converting several existing materials to split valuation. According to SAP documentation, to continue to use the same SAP material ID one cannot have any open SD documents, i.e. Releases, Orders, Deliveries at the time the conver