Average Balance
I am trying to convert Report Writer reports to BW. On the one of the Sections in the report in report writer the colum has Average Balance as the Basic Key figure. I would Like to know how to achive the same in BEx.
The Report Painter uses this formula to calculate the Average balance (correct me if I am wrong).
Consider Amounts as 100, 200 & 300 in Jan, Feb & Mar Jan 100
Feb (10031)/(3128)(20028/(31+28))
Mar (10031)/(312831))+ ((20028)/(312831))(300*31)/(3128+31))
and so on.
You have to restrict the amount with calmonth (I think it's enough to use an offset or a simple variable...I don't know if you need to start this calculation 12 months before the current...) and then build formula variables (12, one for each month) to have all the days per month) to use in this calculation!
Hope it helps!
Bye,
Roberto
Similar Messages
-
How to calculate Average balance for an account
Hi,
How to calculate average balance for an account for a particular period say for JAN-12 period and after the end of that period for another two days 01-feb-12 and 01-feb-12 ?
I'm using the following query :
SELECT cc.segment1||'-'||cc.segment2||'-'||cc.segment3||'-'||cc.segment4||'-'||cc.segment5||'-'||cc.segment6 "Account_XX",
nvl(sum(l.accounted_dr - l.accounted_cr),0) "Balance"
FROM gl_code_combinations cc,
gl_je_lines l
WHERE cc.code_combination_id = l.code_combination_id
AND l.set_of_books_id ='XX'
and code_combination_id = replace it with code combination_id for account_xx
AND l.effective_date <= '31-Jan-12' (january period end ??)
GROUP BY cc.segment1||'-'||cc.segment2||'-'||cc.segment3||'-'||cc.segment4||'-'||cc.segment5||'-'||cc.segment6
There are some discrepancies in "average balance" after end of month (Jan-12)?
How to calculate average balances for a particular account (Account_XX above)from end of month of Jan to first two days of february?
Thanks,
KiranKiran,
Please let me know first, is Average Balancing feature enabled in your GL Ledger?
Regards
Muhammad Ayaz -
Average Balances in General ledger.
Hi All,
The question may be silly and awkward - I am completely ignorant in GL
Our requirement is to calculate the monthly average balances for each code combination id (GL_BALANCES) after the month end.
One way is to calculate the average balance from daily balances.
Just wanted to know if it is already getting stored in any table.
Thanks in advance,
jeneeshthink there's no table storing the average daily balances as accounting is rather 'complex' - obey some standard. Say it, cash, unearned, accrued,..., and more.. that need special treatment... Suppose we can book the emplyoee salary today for salary paid next month..
-
Average Balances in GL-(Not a PL/SQL question - Related to Financials)
Hi All,
The question may be silly and awkward - I am completely ignorant in GL and tried a lot in Google..
Our requirement is to calculate the monthly average balances for each code combination id (GL_BALANCES) after the month end.
One way is to calculate the average balance from daily balances.
Just wanted to know if it is already getting stored in any table.
Thanks in advance,
jeneesh
Note: The question is already posted in Financial Services Forum.. ( Average Balances in General ledger. ). Sorry for duplicating.Hi,
jeneesh wrote:
... Note: The question is already posted in Financial Services Forum.. ( Average Balances in General ledger. ). Sorry for duplicating.Since you know it's wrong to post the same question twice, and you know where the correct forum is, don't the question here. Close this thread right away. -
ODS vs Cube Average Balance Scenario
Hi experts,
This is the scenario, Im going to extract the table FAGLFLEXA from R3 to obtain the daily movements of FI accounts, I have all that data on a ODS with the same fields, then I need to calculate the daily Balance and the Average Balance (Daily Balance / Day of month).
Im planning to have a InfoCube for reporting with dimensions(0Calday, 0Gl_Account, Segmentg...) and ratio (0Debit, 0Credit, 0Balance, ZAvgBalance).
Is it possible to create an ABAP routine to calculate the daily Balance and AvgBalance and insert that information on the InfoCube? or is only posible using ODs?
Thanks in advance.If your Balance and Average Daily Balance Key Figures are non-cumulative, then you should be able to create a routine in the Transformation from the DSO to InfoCube that calculates those two and overwrites whatever values are there for the previous day. However, if these are cumulative Key Figures, then you won't be able to do it at this level because it will sum the data instead of overwrite and therefore provide incorrect/inconsistent results. In the case of cumulative Key Figures, you're going to have to calculate it into the DSO and let the delta DTP, reading the change log, post the differences to these values in the InfoCube to maintain correctness.
-
Hi,
I have typical problem in FIAR Query. For the given Customer (say 1000170) having several Customer Classes like A, B, C etc.. and I need to find out AVERAGE BALANCE for Each Customer.
Eg: Customer 1000170
Customer Class: A = 100
B = 120
Average Balance: I need to get 110 But I am getting Summing value like 220)
Solution: Right click the Average Balance KF and chage to "Average" mode. I am getting the average value for all the customers in the Query, but not for the given customer.
Please advice meIm not sure i understand correctly but when calculating average you need to multiply line-item wise and then divide by the total. So you can make a new key fig called axb and do the multiplication in the transfer rules and divide to get the average in the query itself.
I hope I have answewed your question. -
Difference in the Balance between FS10N and Customer Balances in Local Curr
Hi,
When i am trying to match the Balances between FS10N and Customer Balances in Local Currency for the Period 8, we are getting the difference, The reconcilliaton Account was changed on 30.08.2010.
Please help Us in tracing the differences between FS10N and Customer Balances in Local Currency.
What could be the possible reasons for the differences..
ThanksHi Varshani,
Please use the program/report SAPF070 to compare or reconcile your AR with GL balances. You can use SAPF071 to correct any inconsistencies. Provided below documentation for these programs.
SAPF070 - Compare Documents and Account Transaction Figures
Description
This program compares debit and credit transaction figures in customer, vendor, and G/L accounts with the debit and credit totals from documents posted in the corresponding posting period (accounting reconciliation). The sales totals are also compared for customer and vendor accounts. There is no separate comparison for special G/L transactions.
A comparison for G/L accounts can be made in company code currency and in parallel currencies (such as group currency). A comparison for customer and vendor accounts can only be made in company code currency.
After the program has finished, a message is issued to the user that started the program. This message summarizes the results of the reconciliation.
Output
The program compares the totals of an account on a periodic basis. If the debit and credit total differs between account and documents, the account is printed with the debit and credit totals and the difference.
Differences in G/L accounts are shown per transaction currency. The first line shows the amount in local currency, the second line shows the amounts in transaction currency.
If a document which falls within the selection range is posted during the program run, the program is terminated since a reliable result can no longer be delivered.
SAPF071 - Adjust Balances after Comparing Documents/Transaction Figures
Description
If a financial accounting comparative analysis (SAPF190) or a comparison of documents and transaction figures (SAPF070) shows that there are differences between documents and transaction figures, you can use this program to make an adjustment. The documents form the basis for this adjustment. The program adjusts the (redundant) transaction figures, which are only totals of amounts from documents.
Requirements
All of the following listed requirements must be fulfilled:
1. A financial accounting comparative analysis (SAPF190) or a comparison of documents and transaction figures (SAPF070) must be made, and differences must be found between documents and transaction figures.
2. There must not be any inconsistent documents found. These are listed in both SAPF070 and SAPF190 as well as in this program.
3. There cannot be any problems in the other modules. Caution: You have to check this yourself. Financial Accounting may be correct but the other modules may not be, and this will adversely affect the program run.
4. You can only make the adjustment in the ledgers which are compared by program SAPF070. This is ledger 00 or a user-defined ledger for all parallel local currencies except the group currency. (The program displays these ledgers). You have to adjust any additional ledgers as well as average balance ledgers yourself.
5. No documents during the period in which you are adjusting transaction figures can be archived. Caution: You must ensure that these documents are not archived by establishing appropriate organizational rules and procedures.
Only use this program after consulting with SAP or after checking the prerequisites thoroughly.
You should adjust all differences together for a single company code. By setting the program parameters you can limit the adjustment to G/L currency types or to balances in subledgers.
It is advisable to execute a test run first, which will list any differences that are found.
Further notes - Authorizations
Repair program authorization group (F_005)
Company code authorization (F_BKPF_BUK)
Thanks
Venkata Ganesh Perumalla
Edited by: Venkata Ganesh Perumalla on Sep 28, 2010 1:30 PM -
Using a CC with a Balance Transfer without added interest cost
I have several cards on 0% or low APR BT Offers, and those CC have also made me offers for cash back if I use the card for purchases. How can you do this, if the card is already on a BT, without destroying the low APR on the BT? Easy. An important thing to understand about your credit card statement is that your statement balance can have multiple APR on several different portions of the balance. In this Bank of America example, I’ve got two separate 0% APR with different expiration dates, balance transfers left over from earlier at the purchase APR, and purchases at the standard purchase APR. The amounts shown are not the ending balance, but rather the average balance during the credit card statement period. (even this average balance isn’t exactly what the interest is charged on, because CC interest is charged on a daily percentage, resulting in daily compounding)Before Congress passed the CARD Act, most CC agreements would apply ALL payments to the lowest APR first, meaning in the above example the ~$8k on the two 0% APR would be paid first, all $8k, before even beginning to pay on the ~$500 at the purchase APR. This is a favorable purchase APR, but imagine if the purchase APR was at 19%? To make matters worse, the interest on the purchase APR items would usually add to the Purchase balance, and continue to compound the interest cost on the purchases until all the lower APR items were paid off however many months that took. Needless to say, in the old days it was not a good idea to use your credit card for regular purchases if you had a BT on the card. That all changed with the CARD Act a few years ago. Since the credit reforms of the CARD Act, credit card issuers are allowed to apply the minimum payment to the lowest APR items first. However, after the minimum payment, they must apply payments to the highest APR items. The minimum payment depends on statement balance, but is often only 1% to 2% of that statement balance. In the example above, the statement balance of almost $8k required a minimum payment of only $82. This would be applied to the approximately $8k 0% APR balance first. Any additional payments above the $82 for the month would be applied to the highest APR items next. Actual interest charges usually fall into the higher APR buckets. On the BofA cards, I get little offers for 10% cash back from certain national merchants. HairMasters, Starbucks, Buffalo Wild Wings, Papa Murphy’s, and several others are regularly available to add the offer to the card, use it at the merchant for one purchase, and get 10% cash back. With my Citi Diamond Preferred, I also had a $600 BT offer on the $1k CL, then got a 5% back on $500 of purchases in gas, groceries, restaurants and department stores. My Discover card had several thousand on a 0% BT, then they sent me a “spend $1,000, get $100 back” offer. My US Bank Cash+ has a low APR BT offer, and 5% categories for Department stores. How do you take advantage of the spend offers and not get interest charges? You usually have to accept / sign up for the spend offer, to add it to the card, so do that first. When you use the card for any of the offers, depending on the spend involved in the offer, just keep track of those as they post to your CC account online during the month. You have to wait until the charge amount actually posts to your credit card account, so it is no longer Pending. After it posts, it will be in the “Purchases” bucket of the daily interest charge calculations. Said differently, you cannot prepay these charges, you have to wait for the amounts to show up as Posted on your account online. It only takes a few days after you did the purchase, and you don’t have to wait until the statement cuts to see the amounts, but they do have to post to your account. After a few charges have posted, use the Make a Payment button on your credit card account to arrange an electronic payment from your checking account, to post the same day or in a few days. If you know when charges will hit, you can also schedule such a payment for a few days after, to allow time for the charges to post. Repeat this throughout the month if the spend offer is a long term thing. The amount of the payment you make must cover the Minimum Payment first. I’ll often just send over the minimum payment right after the statement prints, just to get it out of the way. I owe the amount, the BT needs to be paid off, and the Minimum Payment is a small amount anyway. I’ve also got Autopayments set up for all these accounts, which is intended to pay the BT offer over a schedule. I don’t use the Autopayment amount in my calculations of paying the purchase amount, although they would be applied to the purchase amounts. By paying the purchase soon after it posts, and after the minimum payment has been made, the interest rate clock never really gets started on the purchase amount. You may see a minimum interest charge of $0.50 if the card charges that, but often I don’t even get that amount if the payment is soon enough after the charge was posted. Chase Slate and Freedom cards are actually even easier. You can use the Blueprint Full Pay payment selector features to tell Slate the types of charges you want to include as pay in full, and they will add those new charges to your Blueprint payment to pay them above the minimum payment that is going toward the BT payment, and not accrue any additional Purchase interest. The Finish It allows you to set an additional amount you want to pay toward the BT (or purchase charges) principal over the minimum payment, to make the payments faster. So, the point of this is, if you have a BT offer on a card, you don’t have to effectively SD the card, it can be used for purchases to take advantage of special offers, or even for regular charges, without added interest cost.
tjhallow wrote:
But since I don't have any interest on balance transfers and purchases on my discover card right now I usually just make whatever I was making (before the charge) and then I add the new charges in there.If you're 0% on BT's and purchases then this thread really isn't relevant. This is for those that have 0% on BT and >0% on purchases. kdm31091 wrote:
Basically, all this is saying, unless I am missing something, is that if you make purchases and pay them off before statement (i.e. don't carry the extra balance on top of the BT amount) you won't pay interest, which is the case with any CC, whether on a BT or not. I don't see how the rewards offers make any difference here. You're just paying charges as you go to avoid interest accruing.It is basically the same whether there's a 0% offer or not. The OP started this thread to clarify for those that do have a 0% BT offer and still want to take advantage of rewards on the same card without impacting rewards by acrruing interest on new purchases. If the card has no rewards as an incentive for new purchases then it's easy enough just to SD the card until the 0% offer balance is paid off. my-own-fico wrote:
I'm not sure whether to agree, because if you pay the minimum following the statement date and then charge something that you soon pay off, we are talking about two different billing cycles. The billing cycles really don't matter aside from generating a new minimum payment as each cycle closes out. Regardless of cycle the minimum has to be covered first and then new purchases within the given cycle need to be paid off as quickly as possible. The minimum applies to the prior cycle. Additional payment(s) need to be made for purchases in the current cycle. -
Average doesn't change with deletion of tuples?
Hi there, I am using Oracle 11g EE. I'd appreciate if you could shed some light on my confusion. The following statement attempts to delete all tuples in the ACCOUNT table when the balance falls below the average balance in the ACCOUNT table:
delete from account where balance < (select avg (balance) from account);
I was taught that there is an issue with this because as we delete tuples from the table, the average balance changes. I ran this statement and encountered no issues.
It correctly deleted the tuples where balance is less than the initial average of the table.
The solutions suggested to fix the potential issue are as follows:
1. First, compute avgbalance and find all tuples to delete
2. Next, delete all tuples found above (without recomputing avg or retesting the tuples)
My question is, does the average really get changed in the (select avg (balance) from account) clause as we delete tuples?
I know how to solve this potential issue. Just don't quite understand why the statement in question works perfectly. I tried testing it out by inserting tuples that have balance close to the initial average. No issues there.
Thank you in advance!There's even more basic concepts involved
read consistency
A consistent view of data seen by a user. For example, in statement-level read consistency the set of data seen by a SQL statement remains constant throughout statement execution.
data consistency
A consistent view of the data by each user in a multiuser database.
SQL Processing for Application Developers
SET TRANSACTION
Regards
Etbin
something to play with
select rid,x,overall_average,running_average,
case when case when x < overall_average
then 'higher'
when x > overall_average
then 'lower'
else 'equal'
end !=
case when x < running_average
then 'higher'
when x > running_average
then 'lower'
else 'equal'
end
then case when x < overall_average
then 'higher'
when x > overall_average
then 'lower'
else 'equal'
end || ' ~ ' ||
case when x < running_average
then 'higher'
when x > running_average
then 'lower'
else 'equal'
end
end average_mismatch
from (select rid,x,
avg(x) over (order by rid rows between unbounded preceding and unbounded following) overall_average,
avg(x) over (order by rid) running_average
from (select level rid,100 + trunc(10 * dbms_random.normal) x
from dual
connect by level <= 20
RID
X
OVERALL_AVERAGE
RUNNING_AVERAGE
AVERAGE_MISMATCH
1
105
99.65
105
lower ~ equal
2
111
99.65
108
3
100
99.65
105.333333333333333333333333333333333333
lower ~ higher
4
102
99.65
104.5
lower ~ higher
5
108
99.65
105.2
6
87
99.65
102.166666666666666666666666666666666667
7
105
99.65
102.571428571428571428571428571428571429
8
114
99.65
104
9
85
99.65
101.888888888888888888888888888888888889
10
100
99.65
101.7
lower ~ higher
11
100
99.65
101.545454545454545454545454545454545455
lower ~ higher
12
109
99.65
102.166666666666666666666666666666666667
13
88
99.65
101.076923076923076923076923076923076923
14
89
99.65
100.214285714285714285714285714285714286
15
81
99.65
98.9333333333333333333333333333333333333
16
108
99.65
99.5
17
103
99.65
99.7058823529411764705882352941176470588
18
99
99.65
99.6666666666666666666666666666666666667
19
93
99.65
99.3157894736842105263157894736842105263
20
106
99.65
99.65
Message was edited by: Etbin
an example added -
Hello,
can anyone help how to get balance of some account, but in more detail.
I need to see detail of balance of some accounts by material.
I know that there is e.g. tcode FS10n, but when I drill down and add a column material into layout, there is nothing.
Any idea, please?
Thx
D.Hi, you can use these reports:
G/L Account Balances
S_ALR_87012277 G/L Account Balances
Totals and Balances
S_ALR_87012301 Totals and Balances
*Structured Account Balances *
S_ALR_87012279 Structured Account Balances
*Average Balances *
S_ALR_87012334 Local Currency, Period Version
S_ALR_87012335 Period Version Transaction Currency
S_ALR_87012336 Posting Date, Daily Version
S_ALR_87012337 Value Date Daily Version
S_ALR_87012338 Period Version Local Currency Year to Date
S_ALR_87012339 Period Version Transaction Currency Year to Date
*Line Items *
S_ALR_87012282 G/L Line Items, List for Printing
S_ALR_87012304 SAP Minimal Variant Open Items
Thank You
Javed -
Insert/updating each customers daily balance
hi frnds
I need one help.I having one table contains the transaction summary for customer for every day.Everyday it will update the current balance of customer with current days amount .
eg if customer 1 having netbalance as of yesterday is 100$ and there is a debit of 20$ and todays netbal is 80$ and adding 100$ on next days his balance will be 180$.I need to capture each days balance of each customer and store in one table to calculate average balance for month and how can i do it.
eg
Trans_sum
cust------tr_dt-------netbal
C001----06-dec-09----1300$
C002-----06-dec-09----34000$
C003-----06-dec-09----2000$
My requriement
I need to update each customers transactions separately for each day and need to keep 1 record for 1 month instead of adding 30 or 31 records(full days of month).How to insert each days net balance with date on particular columns.
Trans_Details
cust--Month-bal_dt1---bal1----bal_Dt2---bal2---bal_dt3---bal3---bal_dt4---bal4 .......bal_dt31....bal31
rgds
radikaOk, something like this:
MERGE INTO your_monthly_trans_balance mtb
USING (SELECT cust,
trunc(tr_date, 'mm') month_dt,
max(decode(to_char(tr_dt, 'dd'), '01', value)) day_1,
max(decode(to_char(tr_dt, 'dd'), '02', value)) day_2,
max(decode(to_char(tr_dt, 'dd'), '03', value)) day_3,
max(decode(to_char(tr_dt, 'dd'), '04', value)) day_4,
max(decode(to_char(tr_dt, 'dd'), '05', value)) day_5,
max(decode(to_char(tr_dt, 'dd'), '06', value)) day_6,
max(decode(to_char(tr_dt, 'dd'), '07', value)) day_7,
max(decode(to_char(tr_dt, 'dd'), '08', value)) day_8,
max(decode(to_char(tr_dt, 'dd'), '09', value)) day_9,
max(decode(to_char(tr_dt, 'dd'), '10', value)) day_10,
max(decode(to_char(tr_dt, 'dd'), '11', value)) day_11,
max(decode(to_char(tr_dt, 'dd'), '12', value)) day_12,
max(decode(to_char(tr_dt, 'dd'), '13', value)) day_13,
max(decode(to_char(tr_dt, 'dd'), '14', value)) day_14,
max(decode(to_char(tr_dt, 'dd'), '15', value)) day_15,
max(decode(to_char(tr_dt, 'dd'), '16', value)) day_16,
max(decode(to_char(tr_dt, 'dd'), '17', value)) day_17,
max(decode(to_char(tr_dt, 'dd'), '18', value)) day_18,
max(decode(to_char(tr_dt, 'dd'), '19', value)) day_19,
max(decode(to_char(tr_dt, 'dd'), '20', value)) day_20,
max(decode(to_char(tr_dt, 'dd'), '21', value)) day_21,
max(decode(to_char(tr_dt, 'dd'), '22', value)) day_22,
max(decode(to_char(tr_dt, 'dd'), '23', value)) day_23,
max(decode(to_char(tr_dt, 'dd'), '24', value)) day_24,
max(decode(to_char(tr_dt, 'dd'), '25', value)) day_25,
max(decode(to_char(tr_dt, 'dd'), '26', value)) day_26,
max(decode(to_char(tr_dt, 'dd'), '27', value)) day_27,
max(decode(to_char(tr_dt, 'dd'), '28', value)) day_28,
max(decode(to_char(tr_dt, 'dd'), '29', value)) day_29,
max(decode(to_char(tr_dt, 'dd'), '30', value)) day_30,
max(decode(to_char(tr_dt, 'dd'), '31', value)) day_31,
max(avg_monthly_balance) avg_monthly_balance
FROM (SELECT ydtb.cust,
gen_date.daily_dt tr_date,
nvl(value, last_value(value ignore nulls) over (partition by cust, trunc(gen_date.daily_dt, 'mm') order by gen_date.daily_dt)) value,
avg(nvl(value, 0)) over (partition by cust, trunc(gen_date.daily_dt, 'mm')) avg_monthly_balance
FROM (SELECT trunc(sysdate, 'mm') + level - 1 daily_dt
FROM dual
CONNECT BY level <= to_char(last_day(sysdate), 'dd') + 1) gen_date -- amend this if you need to pass in the month the data is gathered for
-- or gather for more than one months' worth of data
LEFT OUTER JOIN your_daily_trans_balance ydtb
PARTITION BY ydtb.cust ON (gen_date.daily_dt = ydtb.tr_dt)
WHERE gen_date.daily_dt < trunc(sysdate))
WHERE tr_date = max_date_in_month) dtb
ON (mtb.cust = dtb.cust and mtb.month_dt = dtb.month_dt)
WHEN MATCHED THEN
UPDATE SET mtb.day_1 = dtb.day_1,
mtb.day_1 = dtb.day_2,
mtb.day_1 = dtb.day_3,
mtb.day_1 = dtb.day_4,
mtb.day_1 = dtb.day_5,
mtb.day_1 = dtb.day_6,
mtb.day_1 = dtb.day_7,
mtb.day_1 = dtb.day_8,
mtb.day_1 = dtb.day_9,
mtb.day_1 = dtb.day_10,
mtb.day_1 = dtb.day_11,
mtb.day_1 = dtb.day_12,
mtb.day_1 = dtb.day_13,
mtb.day_1 = dtb.day_14,
mtb.day_1 = dtb.day_15,
mtb.day_1 = dtb.day_16,
mtb.day_1 = dtb.day_17,
mtb.day_1 = dtb.day_18,
mtb.day_1 = dtb.day_19,
mtb.day_1 = dtb.day_20,
mtb.day_1 = dtb.day_21,
mtb.day_1 = dtb.day_22,
mtb.day_1 = dtb.day_23,
mtb.day_1 = dtb.day_24,
mtb.day_1 = dtb.day_25,
mtb.day_1 = dtb.day_26,
mtb.day_1 = dtb.day_27,
mtb.day_1 = dtb.day_28,
mtb.day_1 = dtb.day_29,
mtb.day_1 = dtb.day_30,
mtb.day_1 = dtb.day_31,
mtb.avg_balance = dtb.avg_monthly_balance
WHEN NOT MATCHED THEN
INSERT (cust,
month_dt,
day_1,
day_2,
day_3,
day_4,
day_5,
day_6,
day_7,
day_8,
day_9,
day_10,
day_11,
day_12,
day_13,
day_14,
day_15,
day_16,
day_17,
day_18,
day_19,
day_20,
day_21,
day_22,
day_23,
day_24,
day_25,
day_26,
day_27,
day_28,
day_29,
day_30,
day_31,
avg_balance)
VALUES (dtb.cust,
dtb.month_dt,
dtb.day_1,
dtb.day_2,
dtb.day_3,
dtb.day_4,
dtb.day_5,
dtb.day_6,
dtb.day_7,
dtb.day_8,
dtb.day_9,
dtb.day_10,
dtb.day_11,
dtb.day_12,
dtb.day_13,
dtb.day_14,
dtb.day_15,
dtb.day_16,
dtb.day_17,
dtb.day_18,
dtb.day_19,
dtb.day_20,
dtb.day_21,
dtb.day_22,
dtb.day_23,
dtb.day_24,
dtb.day_25,
dtb.day_26,
dtb.day_27,
dtb.day_28,
dtb.day_29,
dtb.day_30,
dtb.day_31);NB, I've assumed that a) you have a table that has the daily transaction net balance stored - if you haven't, and you're having to calculate the balance yourself, then you'll need to do a sum(credit_and_debit_cols) grouped by trunc(tr_date) and cust.
I've also assumed that you're calculating the info for the current month, and may update daily. Ideally, you'd calculate once a month for the previous month, so you would need to amend the dates used to generate the monthly dates in the gen_date subquery. Also, I'm well aware that the last day of the month value will not be updated in the above query, but since you haven't given us details as to when and how often you're running the update, I'm leaving that as an exercise for you if you're going to be updating this month's data each day.
Also, the above is untested.
Edited by: Boneist on 07-Dec-2009 12:22 -
ICR: customer postings are not imported in ledger if they come from SD
Hello,
For process '002' I have created a Special Ledger but postings that come from "SD" (Sales and Distribution) with those Ref. Procedure are not transferred to the ledger:
VBAK Billing document
VBRK Billing document
When creating the Special Ledger I have configured the following transactions to the Ledger:
COFI Online-Posting from CO
GLA0 GL Act. Assessment:Integrative
GLD0 GL ActDistribution:Integrative
HRP1 HR Payroll
KOAE Actual Settlement CO External
KZRI Actual Imputed Interest
RFBU FI Postings
RFRK Reconciliation Posting CO->FI
RFT1 Travel Expenses
RMBL MM Material Debit/Credit
RMM1 Material Ledger Settlement
RMM2 Initialization Material Ledger
RMPR MM Material Price Change
RMRP MM Incoming Invoice
RMRU Goods Mvmnt fr Cmpltn Confrmtn
RMWA MM Goods Movement
RMWE MM Goods Receipt Purchase Ord.
RMWF MM Goods Receipt Prod.Order
RMWI MM Inventory Difference
RMWL MM Goods Issue Delivery
RMWQ Goods Movement Usage Decision
*SD00 SD billing Document*<-----
I expected that customer invoices posted from SD were transferred to the ledger but they do not.
Does anybody know how to get customer's invoices from SD transferred to the ledger?
Thanks in advance,
Rafael Barreda.Dear Ralph,
Yes I did analyze this issue with GCD1. I did a special diagnosis for ledger I2.
Origin of original document: Sales (SD)
Activity: SD00 - SD billing Document
The results were:
Ledger I2 ICR 002 Ledger
General information
X Global ledger
Ledger table FBICRC002T
Valuation 0 Legal Valuation
Average balance ledger Export Ledger
X Line items Debits/credits indicator
X Set up balance c/f Summarize
Currencies and quantities
X Store transaction currency
Second currency not defined Currency key
Third currency not defined Currency key
Store quantities Store additional quantities
Assignment information
Company code 1181 Global company 1181
Fiscal year variant K4 Chart of accounts PCGE
Activity SD00 Field grouping code Z001
Required posting
Technical information
Fiscal year 2010 Posting period 005
Period 005 Maximum periods 016
Offset 005 Blocking factor 016
Ledger selection conditions
&ZICR_002_I2
FALSE
I did not understand why selection coditions retuns "False". Rule ZICR_002_I2 is very simple and is as follows:
Acty Grouping Code - FI00 Ledger - I2
Trading partner not empty
And SD documents have got trading partner informed...
Thanks in advance.
Rafael Barreda -
hi experts
I am working on FI module cash weekly summary, in my output i should get particulars as
1-Apr to 7-Apr 85,610.00 5,38,474.00 1,73,860.00 Dr
8-Apr to 14-Apr 77.00 1,21,100.00 52,837.00 Dr
15-Apr to 21-Apr 45,685.00 52,077.00 46,445.00 Dr
1.here the dates should be calculated as 1-apr + 6 = 7-apr, etc according to the date what we enter in the selection screen. what ever date we enter it should be divided by 7 and the balance days should be displayed.
2. amount 85,610.00 is the sum of 1-apr to 7-apr, similarly the other calculations also
3. to find the highest amount among the selection screen date
iam attaching the specs and codes plz help me
thanks in advance
maaya
specs:-
Cash
Weekly Summary
1-Apr-2007 to 19-Jul-2007
Page 1
P a r t i c u l a r s Transactions Closing
Debit Credit Balance
Opening Balance 26,724.00 Dr
1-Apr to 7-Apr 6,85,610.00 5,38,474.00 1,73,860.00 Dr
8-Apr to 14-Apr 77.00 1,21,100.00 52,837.00 Dr
15-Apr to 21-Apr 45,685.00 52,077.00 46,445.00 Dr
22-Apr to 28-Apr 1,04,382.00 1,02,619.00 48,208.00 Dr
29-Apr to 5-May 3,01,532.00 2,78,110.00 71,630.00 Dr
6-May to 12-May 46,607.00 73,202.00 45,035.00 Dr
13-May to 19-May 91,607.00 1,01,719.00 34,923.00 Dr
20-May to 26-May 77,485.00 62,889.00 49,519.00 Dr
27-May to 2-Jun 62 ,411.00 69,738.00 42,192.00 Dr
3-Jun to 9-Jun 2,79,008.00 2,83,598.00 37,602.00 Dr
10-Jun to 16-Jun 1,02,153.00 93,729.00 46,026.00 Dr
17-Jun to 23-Jun 5,28,608.00 5,32,870.00 41,764.00 Dr
24-Jun to 30-Jun 43,333.00 46,299.00 38,798.00 Dr
1-Jul to 7-Jul 2,49,350.00 2,18,776.00 69,372.00 Dr
8-Jul to 14-Jul 27,095.00 58,599.00 37,868.00 Dr
15-Jul to 19-Jul 15,000.00 7,233.00 45,635.00 Dr
G r a n d T o t a l 26,59,943.00 26,41,032.00 45,635.00 Dr
A v e r a g e 1,66,246.44 1,65,064.50 55,107.13 Dr
Highest (dt. 19-Jun-2007) (dt. 19-Jun-2007) (dt.4-May-2007)
Balance 4,83,238.00 4,95,563.00 2,88,728.00 Dr
Lowest (dt. 14-Apr-2007) (dt. 14-Jul-2007) (dt. 2-Apr-2007)
Balance 77.00 533.00 23,724.00 Dr
my codings are as follows
*& Report ZCASH_WEEK
REPORT ZCASH_WEEK no standard page heading line-size 200.
tables: bkpf,
bseg,
skb1.
data: begin of it_skb1 occurs 0,
saknr like skb1-saknr,
end of it_skb1.
data: begin of it_bkpf occurs 0,
belnr like bkpf-belnr,
gjahr like bkpf-gjahr,
blart like bkpf-blart,
budat like bkpf-budat,
monat like bkpf-monat,
end of it_bkpf.
data: begin of it_bseg occurs 0,
budat like bseg-augdt,
date(60),
belnr like bseg-belnr,
koart like bseg-koart,
shkzg like bseg-shkzg,
dmbtr like bseg-dmbtr,
hkont like bseg-hkont,
end of it_bseg.
data : it_closedbal like it_bseg occurs 0 with header line.
data : Begin of it_data occurs 0,
budat like bkpf-budat,
debit like bseg-dmbtr,
credit like bseg-dmbtr,
clbal like bseg-dmbtr,
end of it_data.
data : Begin of it_clbal occurs 0,
budat like bkpf-budat,
debit like bseg-dmbtr,
credit like bseg-dmbtr,
end of it_clbal.
data : v_closedate like bkpf-budat,
v_closebal like bseg-dmbtr,
v_cldeb like bseg-dmbtr,
v_clcre like bseg-dmbtr,
v_days(3) , v_week(4),
v_budat like bkpf-budat,
v_date(60), v_date1(11), v_dat(7),
v_max_credit like bseg-dmbtr,
v_min_credit like bseg-dmbtr,
v_max_debit like bseg-dmbtr,
v_min_debit like bseg-dmbtr,
v_max_closebal like bseg-dmbtr,
v_min_closebal like bseg-dmbtr,
v_avg_credit like bseg-dmbtr,
v_avg_debit like bseg-dmbtr,
v_avg_closebal like bseg-dmbtr,
v_grd_credit like bseg-dmbtr,
v_grd_debit like bseg-dmbtr,
v_grd_closebal like bseg-dmbtr.
Selection-screen :begin of block b1.
Parameter: p_bukrs like bkpf-bukrs obligatory,
p_saknr like ska1-saknr.
p_hkont like bseg-hkont.
select-options: s_budat for bkpf-budat.
selection-screen end of block b1.
start-of-selection.
to fetch data.
perform get_data.
to calculate the days.
perform get_days.
to fetch the closing balance
perform get_CLOSEDBAL.
to display the output
perform get_output.
to get the grand total.
perform get_grandtot.
to get the average balance
Perform get_average.
to get the max & min balances
perform get_high_low_bal.
end-of-selection.
*& Form get_data
text
--> p1 text
<-- p2 text
FORM get_data .
select saknr from skb1 into table it_skb1 where bukrs = p_bukrs
and saknr = p_hkont.
select * from bkpf into corresponding fields of table it_bkpf
where bukrs = p_bukrs
and budat in s_budat.
select * from bseg into corresponding fields of table it_bseg
for all entries in it_bkpf
where belnr = it_bkpf-belnr and
hkont = p_hkont.
select * from bseg into corresponding fields of table it_bseg
for all entries in it_skb1
where hkont = it_skb1-saknr.
loop at it_bseg.
select single budat from bkpf into it_bseg-budat where belnr = it_bseg-belnr.
modify it_bseg.
endloop.
break-point.
***select max( dmbtr ) from it_bseg into v_max_credit where budat between s_budat-low and s_budat-high
shkzg = 'H'.
perform get_day.
**move the documents into itab where date lies between input dates low & high
loop at it_bseg. "where budat between s_budat-low and s_budat-high.
if it_bseg-budat >= s_budat-low or it_bseg-budat <= s_budat-high.
it_data-budat = it_bseg-budat.
if it_bseg-shkzg = 'H'.
move it_bseg-dmbtr to it_data-credit.
else.
move it_bseg-dmbtr to it_data-debit.
endif.
endif.
append it_data.
endloop.
**move the documents into itab_close one day less than low range ( s_budat-low - 1 )
v_closedate = s_budat-low - 7.
loop at it_bseg.
where budat between v_closedate and s_budat-low .
if it_bseg-budat >= v_closedate or it_bseg-budat <= s_budat-low.
move it_bseg-budat to it_clbal-budat.
if it_bseg-shkzg = 'H'.
move it_bseg-dmbtr to it_clbal-credit.
else.
move it_bseg-dmbtr to it_clbal-debit.
endif.
endif.
append it_clbal.
endloop.
ENDFORM. " get_data
*& Form get_days
text
--> p1 text
<-- p2 text
FORM get_days .
v_days = s_budat-high - s_budat-low.
v_week = v_days / 7.
*write:10 'days', v_days,
50 'week', v_week.
ENDFORM. " get_days
*& Form get_closedbal
text
--> p1 text
<-- p2 text
FORM get_closedbal .
*break-point.
loop at it_clbal.
*sum.
v_cldeb = v_cldeb + it_clbal-debit.
v_clcre = v_clcre + it_clbal-credit.
v_closebal = v_cldeb - v_clcre .
v_closebal = v_clcre - v_cldeb .
endloop.
skip 2.
*write: 'Opening Balance' , v_closebal.
ENDFORM. " get_closedbal
*& Form get_day
text
--> p1 text
<-- p2 text
FORM get_day .
*break-point.
loop at it_bseg.
v_budat = it_bseg-budat.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
INPUT = v_budat
IMPORTING
OUTPUT = v_date.
v_dat = v_date+0(6).
move v_dat to it_bseg-date.
write:/10 v_date , v_dat.
modify it_bseg.
endloop.
ENDFORM. " get_day
*& Form get_output
text
--> p1 text
<-- p2 text
FORM get_output.
WRITE : /60 'Cash'.
WRITE : /55 'Weekly Summary'.
WRITE : /30 v_budat-low, 50 v_budat-high.
write :/125 'Page 1'.
skip 1.
uline (135).
write : /5 'Particulars', 45 '|', 60 'Transactions', 120 'Closing'.
write : /45 sy-uline(71), 120'Balance'.
write : /45 '|', 55 'Debit', 90 'Credit', 115 '|'.
write : / sy-uline(135).
write : / 'Opening Balance' , 120 v_closebal.
write : / v_dat1.
*loop at it_data.
WRITE : /1 sy-vline, IT_DATA-
ENDFORM. " get_output
*& Form get_grandtot
text
--> p1 text
<-- p2 text
FORM get_grandtot .
break-point.
loop at it_data.
sum.
endloop.
move it_data-credit to v_grd_credit.
move it_data-debit to v_grd_debit.
v_grd_closebal = v_closebal + v_grd_debit - v_grd_credit.
uline.
write: 'Grand Total', 55 v_grd_credit, 90 v_grd_debit, 120 v_grd_closebal.
uline.
ENDFORM. " get_grandtot
*& Form get_average
text
--> p1 text
<-- p2 text
FORM get_average .
write:/ 'Average' ,55 v_avg_credit, 90 v_avg_debit, 120 v_avg_closebal.
skip 1.
ENDFORM. " get_average
*& Form get_high_low_bal
text
--> p1 text
<-- p2 text
FORM get_high_low_bal .
write:/ 'Highest',55 '(dt. )' , 90'(dt. )', 120 '(dt. )'.
write:/ 'balance',55 v_max_credit,90 v_max_debit, 120 v_max_closebal.
skip 1.
write:/ 'Lowest' , 55 '(dt. )' , 90'(dt. )', 120 '(dt. )'.
write:/ 'balance',55 v_min_credit,90 v_min_debit ,120 v_min_closebal.
uline.
ENDFORM. " get_high_low_balIf you have any suggestions that you think might enhance the Apple Watch you can send Apple your feedback here.
-
FI-SL Special Ledger Extractor (Delta not working) Issues
Hi,
We are creating extractor for Special Purpose Ledger using standard SAP methodology.
Step1: Goto Transaction BW01 --> select the Summary table ---> Check for total records and line Items and then execute. This results in extrators created for totals and Line Items.
Issue 1: The Summary table eg. ZLTST has special ledgers Z1, Z2 and ZA where Z1 and Z2 are for spot balances and ZA is for Average Balances, the issue is we dont see any extractor for ZA (we do see extractors created for Z1 and Z2 both totals and line Items)
Step 2: Goto transaction BW03 ---> select the totals extractor and double click
Issue 2: When you double click the check box to Activate Delta Update for Z1 and Z2 (totals) is disabled???
If anyone has configured Special Ledger Extractors in past for release 4.7 and higher please let me know the process to set up deltaHi Gilles,
As you are a FI-SL consultant, can you provide me peformance issues on FI-SL?
I posted a thread on New G/L and FI-SL performance
My apologizes to post that question on this thread.
Thank you
Bernard -
how is the status_code in gl_daily_rates set in front end of the oracle application.
The status_code has values 'c' and 'o'.
Regards
sudharshanHello.
Status_code 'C' indicates that the daily rate is not used by any set of books that has
average-balances enabled.
Status_code 'O' indicates that the daily rate is used by at least one set of books that
has average-balances enabled.
Status_code 'D' indicates that the rate is to be deleted.
Hope this helps.
Octavio
Maybe you are looking for
-
I have a new computer and want to move my Itunes libriarys to this new PC. How do I do this?
-
Download fees for a single folio using a professional edition
Hey guys, we are releasing a free monthly online magazine in the coming month, at first we considered the single edition option because of its 0$ download fees. the down side was that it wouldn't allow us to be available in the android market or on t
-
Can't get the DOM to output XML document tags in correct order.
I'm trying to output an XML document from the DOM using the DOMWriter class: new DOMWriter(document, filename, outputEncoding, encodingTag, getDocTypeString()); It refuses to output the tags in the correct order so my document always fails validation
-
Upgrade 11.2.0.1 to 11.2.0.2
Hi, I recently upgraded my oracle software from 11.2.0.1 to 11.2.0.2 sucessfully. But I got problem with sql code(search criteria), The same code is working on my previous version but in New version. Please look at the below code: SELECT DISTINCT BM.
-
Error when trying to upload attachment
Hi All We are on SRM 5.0 SRM Server 5.5. I am getting an error whenever I try to upload an attachment to either a shopping cart or a PO. When I select 'Search and Add' I get my pop-up that allows me to search for and then select my file. However whe