Average Daily Balancing

I have a requirement for a business unit to run on average daily balancing in GL. I have several other business units which do not require this. They can share chart of accounts and are all in the one currency. What is the recommendation in moving forward in r11 and r12, should I be looking at a different ledger for the average daily balancing business unit, or should I have just one? I presume having just one would cause much grief in performance due to not really requiring daily balances for 75% of my whole business.

I have a requirement for a business unit to run on average daily balancing in GL. I have several other business units which do not require this. They can share chart of accounts and are all in the one currency. What is the recommendation in moving forward in r11 and r12, should I be looking at a different ledger for the average daily balancing business unit, or should I have just one? I presume having just one would cause much grief in performance due to not really requiring daily balances for 75% of my whole business.

Similar Messages

  • Average Daily Balance Report

    Hi Guru,
    My SAP version is 4.5B. I would like to check is there any standard SAP program I can use to generate Average Daily Balance(ADB) in this version ?
    Hope to hear from you.
    Regards
    Andrew Tay

    Hi,
    Average Daily Balance Report is not available in SAP standard. If you want to create one more new report then
    create a Function Specification for the selection screen and output screen. Collect all the fields details with table name and mention the logic of the report and give it to ABAPER so that he/she can write a Technical Specification on the basis of
    your Functional Specification.
    Thanks & Regards
    R.K

  • Daily Average Cash Balance

    Hi All,
    I have this report icreated on FISL ODS where I have to define "Daily Average Cash Balance". User is not sure what contitutes this definition. I would really appreciate if somebodt can give me an idea about it.
    Thnx.

    hi did u get the answer for this.... even i have same senario where i have to give a report on cash balance

  • Acrobat Pro 6 Average Daily Production and Math.round problem

    Acrobat Pro 6 Average Daily Production and Math.round problem
    (Production.0) (154) (whole units) . (Production.1) (90) (fractional) / (divided by) 31 (days) results in (Average.0) (4)(whole units) . (Average.1) (10) (fractional) using :Math.round.� Noticed that 154 (whole units) . 85 through 99 (fractional) also show 4.10. (without Math.round : 5.00)
    Method:
    �Production.0� (whole units) . �Production .1� (fractional) / Days = (Average Daily Production) (�Average.0� (whole units) . (Average.1) (fractional)
    � Production.0 (value not calculated)�, � Production 1 (calculated) (event.value = util.printx("0099", (event.value)).substr(-2,2); � �Average.0 (value not calculate)�, and �Average.1 has following calculation:
    var punits = this.getField("Production.0");
    var pfrac = this.getField("Production.1");
    var average = 0.0;
    average = (punits.value + pfrac.value / 100) / this.getField("Days").value;
    this.getField("Average.0").value = average - average % 1;
    this.getField("Average.1").value = util.printx("0099", Math.round((average % 1 * 100))).substr(-2,2);
    �Math.round� appears to be a problem. Also, could you explain the purpose of �0099� . Anyway, why would 154.85 through 154.90 divided by 31 give 4,10. Also, their must be a better way, to find the average daily production. All you have to do is divided the production (whole. fractional) by the days, and display the average daily production as (whole. fractional). Any suggestions??

    There are a many loose ends in your question.
    First, I have never seen before a variable type called 'var'. Is it a java primitive or a class?
    Next, I cannot seem to find any class that has the printx method.
    When it comes to substr(-2,2), I get confused. First, I thought that it was a method of the String class, but I only got as far as substring(beginIndex, endIndex).
    If you really must break the production and average into pieces, try this:
    float average = (punits + pfrac/100) / days;
    int avg_units = (int)average;
    int avg_frac = (int)( (average - avg_units) * 100 );My guess is that util.printx("0099", x) formats x having two optional digits and two mandatory digits, showing 0-99 as 00-99, but allows to show numbers with three and four digits.
    154.85/31 = 4,9951612903225806451612903225806
    154.99/31= 4,9996774193548387096774193548387
    If you round the fraction of theese numbers multiplied by 100 ( = 99.51.. and 99.968...) you get 100, and this will be the output of printx. My guess for "4.10" is that substr(-2,2) returns the two first characters of the string, because the start index should not be zero. (According to java docs, substring throws an exception on a negative index, so what kind of class are you really using ??????)

  • Can I set up a form to carry over daily balances?

    I have Adobe X. I am required to complete a form accouning for daily activity. Currently, I have to write down the daily balances , open a form template, manually enter the previous daily balances as my new beginning balances. I then fill out the rest of the form with the current day's activity and Save As today's date. Is there any way to have this done automatically when I open a new form?

    Hi,
    Thanks for asking.  Sorry we don't support this workflow currently.
    Regards,
    Perry

  • Customer Daily Balances report

    Dear all,
    Is there any T Code to view daily balances of any customer. In short I want to see the customer balances at any key date and the balances should come on daily basis.
    Thanks in advances!!!
    Debasish

    DearAllen,
    FBL5N is the line item display of customer. I need to know the t code for daily balances say if I key in a range of date the report should look like below:
    Input date range 01.04.11 - 06.04.11
    01.04.11 - 5000 (Outstanding amount)
    02.04.11 - 12000
    03.04.11 - 12500
    04.04.11 - 15000
    05.04.11 - 16500
    06.04.11 - 17500
    And not the document wise details.
    Thanks,
    Debasish

  • How to get the GL Daily Balances for an Account

    Hi,
    We need to create a report to see the daily balances (as at date) from 11i GL.
    Our accounting periods are defined as calender months.
    Ex: Account Combination X.XXX.XXXX.XXX Balance as at 11-AUG-09
    Please let us know the tables which we need to query for this requirement.
    Thanks!

    Hello Nilaksha.
    You can use the following query. Modify the segment to be queried if you wish.
    SELECT cc.segment1||'.'||segment2||'.'||segment3||'.'||segment4 "Account",
    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 = <your set_of_books_id'
    AND cc.segment2 = 'your segment value'
    AND l.effective_date <= '30-nov-09'
    GROUP BY cc.segment1||'.'||segment2||'.'||segment3||'.'||segment4
    Hope this helps.
    Octavio

  • Average daily requirements in MD04

    Hi gurus,
    Can anybody please help me in understanding in how the system is calcualting the average daily requirements for the following settings of the coverage profile.
    Period indicator - Weeks (W)
    Number of periods - 12
    Type of period length - 1 (work days -factory calendar)
    Range of coverage in the first period:
    Min - 17, Target - 20, Max - 30.
    and rest of all the fields are empty in the coverage profile and also there for some materials which have this coverage profile attached have the service level at 99.9% on the materila master, I do not know if this informaiton might help us in debugging the calculation.
    Now here 17, 20 and 30 do they mean days or weeks?
    The requiremetns for the next 12 weeks are as follows (including this week)
    W 50/2010 (this week ends today) - 4360
    W 51/2010 (week of 20dec - only working days as per factory calendar are, 20, 21 and 22)-1248
    W 52/2010 (no requiremetns) - 0
    W 01/2011 - 2354
    W 02/2011 - 1542
    W 03/2011 - 5038
    W 04/2011 - 1520
    W 05/2011 - 4000
    W 06/2011 - 1856
    W 07/2011 - 2950
    W 08/2011 - 3150
    W 09/2011 - 5110
    W 10/2011 - 2550
    But the system is coming up with average daily requirements as follows in the same order as above
    W 50/2010 - 676.082
    W 51/2010 - 590.906
    W 01/2011 - 578.033
    W 02/2011 - 600.400
    W 03/2011 - 617.367
    W 04/2011 - 586.200
    W 05/211 - 607.467
    W 06/2011 - 588.475
    W 07/2011 - 594.441
    W 08/2011 - 576.983
    W 09/2011 - 569.356
    W 10/2011 - 513.288
    There are no holidays in the year 2011 weeks except saturday and sunday. Which are already accounted for in the calendar. Replies are greatly appreciated. PLease help and exaplain how the system is coming with abvoe average daily reqs in MD04
    Thanks
    Anusha

    Average daily requirements
    since you have given weeks it will first sum the next 12 weeks requirements.
    Now next it will calculate how many days are there in the next 12 weeks based on  your Type of per lenght and day per period setting as per your range of coverage profile.( Config OMiA)
    Now system will do the maths ( total requirements/Total days) - which will give you the per day average daily requirement .
    This is how the system calculates.
    Once it calcuates this then based on the number of days of stock you need to maintain it will increase the stock at the end of the period.
    kindly check with the above and let us know your feedback
    reg
    dsk

  • Average Daily Sales-Calc

    I am trying to create a member calc on an account. The account is Average daily sales. I want to average my sales for Level zero of time only for 42 days. The calendar day is my lev 0 of time. The problem I am running into is my calc is dynamic and takes forever to pull in Excel. CalcAvgsales=IF (@ISLEV(Time, 0))     @AVGRANGE (Skipnone,Sales, @CURRMBRRANGE (Time,Lev,0,-41,0));     ELSE     #Missing; ENDIFI would like to make this account stored but not sum up the lev 0 of time to lev 1 for the average daily sales account.

    This calc could be stored but if you did so, it would be easier to do it in a calc script as you have to consider calculation order problems.Something like this should work although is not tested (hoping essbase.com won't mess up formatting too much)... Calc All; (or whatever calc to ensure Sales is calculated at all levels)Set updatecalc off;"Average Sales"(if(@islev(Period,0))@AVGRANGE (Skipnone,Sales, @CURRMBRRANGE (Period,Lev,0,-5,0));else#missing;endif)Hope this helps.

  • Average Daily Requirement for a Material

    I'm looking for a function module or BAPI that will calculate the average daily requirement for a material.  Please point me in the right direction where I can obtain this calculation.
    Thanks

    I found this thread while performing a search.  While it is old, I thought it a good idea to provide the solution in case others are looking for the answer in the future.  Use FM MD_STOCK_REQUIREMENTS_LIST_API.  Table MDSUX will contain the average daily requirement as well as other useful data like target stock.

  • Average daily database growth

    Hi All,
    How can I find the average daily growth of a database for the last one year?
    Database version:11.2.0.2
    OS:HP-UX

    We generally use this query in our environment - Try this
    select tsname as "Tablespace", 
           tsize as "Curr Size(Mb)",
           tused as "Used (Mb)",
           tfree as "Free (Mb)",
           TMax as "Max Size (Mb)",
           val1 as "Delta 1hr",
           val2 as "Delta 1dy",
           val3 as "Delta 1wk",
           val4 as "Delta 1mnt",
           round((tused / tMax)*100,2) as "%Used of Max",
           round(((tused+val3) / tMax)*100,2) as "%UsedMax_+1wk",
           round(((tused+val4) / tMax)*100,2) as "%UsedMax_+1mnt",       
    case when ( (   (tused+val3)/tMax)*100 < 80) then 'NORMAL'
         when ( (   (tused+val3)/tMax)*100 between 80 and 90) then 'WARNING'
    else 'CRITICAL' end "Status +1Wk",
    case when ( (   (tused+val4)/tMax)*100 < 80) then 'NORMAL'
         when ( (   (tused+val4)/tMax)*100 between 80 and 90) then 'WARNING'
    else 'CRITICAL' end "Status +1Mnth"    
    from
    select tsname,
    round(tablespace_size*t2.block_size/ 1024/1024,2) TSize,
    round(tablespace_usedsize*t2.block_size/1024/1024,2) TUsed,
    round((tablespace_size-tablespace_usedsize)*t2.block_size/1024/1024,2) TFree,
    (select sum(decode(b.autoextensible,'YES',b.maxbytes, b.bytes))/1024/1024
      from dba_data_files b
      where b.tablespace_name = t2.tablespace_name
      group by b.tablespace_name) TMax,
    round(val1*t2.block_size/1024/1024,2) val1,
    round(val2*t2.block_size/1024/1024,2) val2,
    round(val3*t2.block_size/1024/1024,2) val3,
    round(val4*t2.block_size/1024/1024,2) val4
    from
    (select distinct tsname,
    t1.snap_id,
    rtime,
    tablespace_size,
    tablespace_usedsize,
    tablespace_usedsize-first_value(tablespace_usedsize) 
    over (partition by tablespace_id order by t1.snap_id rows 1 preceding) val1,
    tablespace_usedsize-first_value(tablespace_usedsize) 
    over (partition by tablespace_id order by t1.snap_id rows 24 preceding) val2,
    tablespace_usedsize-first_value(tablespace_usedsize) 
    over (partition by tablespace_id order by t1.snap_id rows 168 preceding) val3,
    tablespace_usedsize-first_value(tablespace_usedsize) 
    over (partition by tablespace_id order by t1.snap_id rows 720 preceding) val4
    from (select t1.tablespace_size, t1.snap_id, t1.rtime,t1.tablespace_id, 
                 t1.tablespace_usedsize-nvl(t3.space,0) tablespace_usedsize
         from dba_hist_tbspc_space_usage t1,
              dba_hist_tablespace_stat t2,
              (select ts_name,sum(space) space 
               from recyclebin group by ts_name) t3
         where t1.tablespace_id = t2.ts#
          and  t1.snap_id = t2.snap_id
          and  t2.tsname = t3.ts_name (+)) t1,
    dba_hist_tablespace_stat t2
    where t1.tablespace_id = t2.ts#
    and t1.snap_id = t2.snap_id) t1,
    dba_tablespaces t2
    where t1.tsname = t2.tablespace_name
    and t1.snap_id = (select max(snap_id) from dba_hist_snapshot)
    and t2.contents = 'PERMANENT');

  • Problem in calculating the Average Daily Requirement

    Hello all,
    I didn't understand how the system calculates the average daily requirement in Dynamic Safety Stock process. The following process flow in given in SAP notes to find how the system calculates the average daily requirement:
    1. The system uses the defined parameters to determine the number of days used for calculating the average daily requirements. If the period is defined as a week, the period length as standard days (5 days) and the number of periods as 2, the system divides the total of the requirements by 10 days.
    2. The system then calculates the total of the requirements for this period.
    The system takes into account all requirements in the current period, even requirements that lie in the past but are still in the current period. For example, if the planning run is carried out in the middle of the month, then those requirements that were planned at the beginning of the month are also included in the calculation of the average daily requirements.
    3. The average daily requirement is calculated using the formula:
    Requirements in the specified number of periods / Number of days within the total period length
    I have run MRP on 02/23/2009 and the following results are generated in stock requirement list of the component part:
    Date     Dependent Requirement     MMSA Schedule Lines Quantity
    3/3/2009     10     31
    3/11/2009     20     20
    3/31/2009     30     30
    4/14/2009     40     49
    4/22/2009     50     50
    4/29/2009     60     60
    5/11/2009     70     55
    5/21/2009     80     80

    Hi,
    In addition to my previous reply,
    If you did following setting -
    Range of coverage in first period -
    min - blank
    tgt - 7
    max - blank
    number of periods - blank
    The system will calculate the safety stock for 7 days for each period; i.e., 7*3=21 and it will generate plnd orders as
    week1 = 51
    week2 = 14+21 = 35
    week3 = 10+21 = 31
    week4 = 30+21 = 51
    If you want to restrict your calculation till 2 periods then make following settings -
    Range of coverage in first period -
    min - blank
    tgt - 7
    max - blank
    number of periods - 2
    Range of coverage in second period -
    Make all blank
    Range of coverage in the rest of the horizon -
    min - blank
    tgt - 3
    max - blank
    It means for first two weeks the safety stock will be 21 (equivalent to 7 days) and for rest of the horizon it will be 3*3 = 9 (equivalent to 3 days)
    The Plnd orders will be -
    week 1 = 51
    week 2 = 35
    week 3 = 14+9 = 23
    week 4 = 30+9 = 39
    and so on.
    Regards,
    Amol

  • How to build query to give daily balance across bank accounts? (to then plot in a graph)

    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
    etc

    You'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

  • 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
    radika

    Ok, 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

  • Special Ledger with FYV 365 periods (daily balance) / K4 in FI

    Hello,
    I have set up a ledger in the module Special Purpose Ledger. In FI the assigned company code has fyv K4. In SL fyv DB (which has 365 periods) is assigned to the company code. In customizing step "local periods" I specified period 1 to 365 for year 2010. In the actuals and totals table I see only TSL01 to TSL16 "Total of transactions of the period in transaction currency". Do I have to create fields 17-365 manually?
    Thanks for your advice.
    Arjan

    Hi Arjan,
    I am facing similar kind of problem.  Requesting you to help me crack this problem.  My client's requirement was on Daily Trial Balance.
    Regards
    Srichand

Maybe you are looking for