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
Similar Messages
-
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 -
Issues with Account Balance Report in chart of accounts
Dear All,
What i need is to bring remarks of all the documents,in ref2 column of Account Balance Report.
What i thought is to create a new report but for that the i need to find the object id of the corresponding documents from orgin no column and fetch remarks from the main table of that object.But this solution is long and slow for retrieval of data.
Kindly suggest me what can i do achieve the above query .
Thanks
ParagHi,
in customizing view "replace account symbol" please add the special G/L Account that you are using for account symbol "0" in G/L account field.
Regards, Franz -
my account balance is $10.17 and i'm trying to buy the new arcarde fire album priced at 9.99 and iTunes is telling me that i have insufficent funds. i would appreciate some help. thank you
Dell Inspiron E1505 Windows XPYou will probably have to report that to ITMS customer service. I dough that anyone on the forum will have any ideas on what to do for that issue.
-
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 -
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 -
FF_5 - Issue with Account Balance option while processing BAI file
Hi All,
We are getting a runtime error while trying to process the same bank file again through transaction FF_5 with 'Account balance' option checked. And the message says 'The ABAP/4 Open SQL array insert results in duplicate database records.' with the command 'Insert_FEBPI'. This happens only when we have combination of uploaded and not uploaded statements in the bank file.
I could find a OSS note for the same issue but that was for the file format MT942. We are using BAI file format. Can some one please help me in this regard.
Thanks in advance!
Regards,
JalendharThis is standard SAP functionality. If there are no applicable notes, then you should open an OSS message.
Rob -
Issue in F.08 GL Account Balances
Dear All
I am using t-code F.08 GL Account Balances.
But I am not getting balances of some of the GL Accounts. ALthough when I execute FBL3N, that " Missing" GL Account is showing a balance. But in F.08 no such GL is shown.
Please advice.
Thanks & Regards
KanwaljitHi
It may be due to many reasons like some authorization were missing, input parameters are wrong, balance transfer not done from the previous year, etc.
Please cross verify the balance of FBL3N with FS10N too.
Regards -
Reg Gl account balance varies with Stock accounts(materials)
Hi All,
I got an issue to be solved.IN MB5L The G/L account Balance and the Stock accounts(Materials) varies. The client wants to have a report:
What are the reasons for which this variance occured?
What are the possibilities to solve this problem?
I have to ask them what kind of report they do need
want to.
Kindly revert back asap
Thank youThe reasons are like this:
a. Manual entries into the stock accounts
b. there have been movements where the system has done only material documents and no corresponding accounting documents have been created.
eg of a situation: You have V price set for the material. But you never maintained any price in the Material master. Then the system will not throw an error, it just creates the materil document without creating the accounting document
at the time of initial upload, there is high opportunity of such errors.
rectification:
a. develop a query linking the material document header and the BKPF reference field.
b. develop a query to list down the accounting document header information posted in these accounts. the reference procedure should be MKBF (i do not remember exactly?) But it fills with a particular value if its from MM. Check for all the documents that have been posted to these accounts without this parameter in the header. Here you go..
Regards
Anantha -
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 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 -
GL account balance not matching with the total stock value
Hi,
The GL account balance is not matching with the total stock value in report RM07MBSTfor stock in transit, Can anyone please let me know, where should, I look into to verify the reason for difference.
Quick response will be appreciated.
Thanks & RegardsI am able to solve this issue. My client has a customized report, which helped me to look into the details of stock in tranisit account. Stock in transit account actually include PPV and TPV alongwith standard cost.
-
Vendor & GL Account Balance - department wise
Hi All,
We have a requirement from the client to show the Vendor Account Balance department wise. The scenario is like this.
A single Vendor is operated by different sections of the Finance department like Raw Materials Bill passing section, Stores Bill passing Section, Works Bills Section, Operations Bill Section, Project Accounts Section etc
Each section has authorisation to posts the document in that vendor account and is responsible for the document it posts. Client wants to know how much balance is outstanding to/from the Vendor each section wise.
I think it is not practical to create separate Profit Centers for all the sections in the Finance department since there are many sections in the Finance department.
Please let me know how to address this issue.
Regards,
HariHi Ravi,
Thanks for your reply.
Client is not accepting any manual entry of section code.
He insists that either system should automatically derive the section name or there should be an option for the user to select the section code through F4 selection.
Regards..
Hari
Maybe you are looking for
-
Sales report for current month and year a go month
i could you please guide me builting report for current monthwise for current month and year a ago month report parameter month_year='06-2010' tables = sales and below are the table fields customer_id invoice_dt invoice_am thanks nhm
-
Quality inspection before goods are issued
Dear friends, We have got requirement that before Goods are issued all materials shall undergo Quality inspection and then materials are issued. How to map it in SAP. Please suggest Regards Canand
-
I tried updating my Ipad to ios 6 and got a error while during the process and now it says I have a Ipad that needs to be restored if I click restore I get The Ipad "Ipad" could not be restored. An unknown error occured (3014) how can I fix this issu
-
I just installed the Audigy 2 ZS on a PIII 800 with WIN 98 SE. I have a set of Klipsch 2. speakers (also new). The install went reasonably well, and the card plays .wav files, but ask it to play a cd or mp3 files and it sounds horrible. The only comp
-
After being away for two weeks my iMac wont send my Orange mail.
After being away on holiday for two weeks my iMac wont send my Orange mail. I get the message "The server "smtp.wanadoo.co.uk" refused to allow a connection on the default ports." I have not changed any setting, the email sends if I login to Webmail,