Date Calculations on 360 days basis (30 days a month)

Does any body know how to get
difference between 2 dates on 360 days basis i.e 30 Days a month

Please ignore the previous post.
cal.set(DAY_OF_YEAR,360);
is used the set the current day of the year to 360, not the total number of days in year. The same goes with
cal.set(DAY_OF_MONTH,30);
which sets the current day of the month to 30.

Similar Messages

  • Dunning interest calculation - taking 360 days instead of 365 days

    Dear Friends,
    I have done the dunning customization and forms are generating properly including the days in arrears.  But for the dunning interest calculation, it is taking only 360 days instead of 365 days. Because of this, there is a difference in interest amount in dunning (F150 tcode) and interest calculation (FINT tcode).
    Please guide me how to resolve this issue.
    Thanks in advance for your help.
    Regards,
    Dwarak.

    hi
    check the below configuration.
    spro-
    interest calculations- global settings-
    prepare item interest calculation/prepare balance interest calculations.
    here you select calender type : G(365 days)
    chandra

  • Display data for last working day of month

    Hi
    I am trying to chart values for the last six years but only to plot the value for the last working day of the month, except for the current month where I am taking an average of the month so far. Everything I've tried has so far failed spectacularly. Has anyone resolved a similar problem?

    If I understand your dilemma correctly, you may want to create a cross-tab and then create the chart off of the cross-tab. Is the data in your tables that you want to chart on something like this:
             4/30   5/30   6/30   7/31   8/29       Sept.
    Row 1    20      30      10      25      20    (avg for month) 
    Row 2    5         10      8       15     15    (avg for month)
    etc.
    If so, 1) can you show an example of the data and 2) what kind of chart do you want to create?

  • Default value of date as first day of month

    Ho can I make my default value of date parameter as first day of month? {$SYSDATE()$} gives only current date and we can make it like {$SYSDATE()-7$} if we want to minus 7 days but how can we set the default value to first day of month?

    I got the answer...It is {$FIRST_DAY_OF_MONTH()$} instead of {$SYSDATE()$}

  • Baseline date calculation excluding non-Business days

    Hi,
    We have a requirement to exclude non-Business days while calculating Baseline date.
    Currently the Baseline Date being populated in the Accounting Document is Document date + 5days(including Holidays).
    For eg
    Current Scenario
    Document Date: 12th Feb 2008
    Baseline date: 17th feb 2008.
    Requirement:
    Document Date: 12th Feb 2008
    Baseline date: 19th feb 2008(Excluding Sat & Sun).
    Request you to share useful info in this regard.
    Thanks
    Binu

    Hi,
    Use user exit RV60FUS5 for these base line date calculations.
    Thanks
    Krishna.

  • Due date falls on 80 days from base line date ........but end of that month

    Hi All
    Can any one please guide me in creating a payment term
    The Base Line Date would be 80 days from Posting date ........... But end of that month
    Example
    Posting date 01.01.2009 so the base line date would be on 21st March
    01.01 ;          31.01 ;                            31 Days
    01.02 ;          28.02 ;                            28 Days
    01.03 ;          21.03 ;                            21 Days               80 Days              
    But due date should fall on end of that month 31st of march
    So irrespective of any day calculated as above in that month  it will always take the baseline date as last day of the month    
    Its Picking up the posting day as Baseline date from Transaction VA01 -> Additional data tab -> ETD ( Festinated Time of Departure)
    From this date it need to calculate the due date as above ( 80 day but last day of the month)
    Please Guide
    Many thanks in advance
    Aadi

    Hi Aditya,
    You may have to create 2 payment terms using the day limit option to meet this requirement.
    Follows the below steps -
    T-code OBB8
    Term 1
    Payment terms = xxxx (as you wish)
    Day limit = any number between 10-15 (you may fix an appropriate date as you think fit for your business)
    Default for baseline date = Posting date
    Payment terms/fixed date = 31
    Payment terms/additional months = 2
    Term 2
    Payment terms = same name as above
    Day limit = 31
    Default for baseline date = Posting date
    Payment terms/fixed date = 31
    Payment terms/additional months = 3
    Logic here is... for all invoices with posting date on or before 10th-15th of a month, 80th day will fall definitely on the 2nd month. Invoices with posting date after 15th, the 80th day will fall on the 3rd month.
    You have to take a concious decision on the day limit number. Because 80 days will not exactly work for all the months.
    Regards,
    Mike

  • Calculation of due date based on Business Days for FICA documents

    Hi All,
    I am working on project where SD - FICA integration is in picture. We post some charges through SD and FICA document gets posted on relevant Contract Account.
    Normally we create Sales Order using transaction VA01 and then we do Billing for this Sales Order through VF01. After billng is done, FICA document automatically gets generated.
    We have following requirement to be fulfilled.
    For the SD bills posted as above, I want to calculate due date of these bills based on Business Days for FICA document generated (SAP Standard calculate due date based on Calander days). We can use factory calander for calculating business days in relevant function module.
    I have checked in the system and it seems that event 1330 ( FM - ISU_DUE_DATE_DETERMINE) is not working in this scenario. Is there any other FM which I can use?
    Can anyone help me on this?
    Regards,
    Pradeep

    Hello Praeva ,
    The event 1330 has a sample FM FKK_SAMPLE_1330. It doesnt even have a Standard Function Module.
    You need to create a Installation-Specific FM and put your code to determine the Due Date based on the logic.
    Rgds
    Ram Kumar.

  • Date calculations based on working days

    I need to add date calculations to a worksheet to show the time elapsed between two actions.
    Just a straightforward subtraction works fine, but what I really need to be able to do is calculate the number of working days between the two point (as something taking 5 days over Christmas with the 2 bank holidays is different equivalent to something taking 3 days in a normal week)
    At the moment I'm exporting the data into excel for analysis of this, but would really like to be able to do it in Disco so that the end users can go straight to the report using viewer, rather than having to do the conversion for them.
    Is this possible?
    Cheers

    Hi,
    Every thing is possible, the Q is how complicated is it....
    My suggestion is to create a table with all the dates of the non-working days for ex:
    create a table with all the MON-THURSDAYS, union to this table the holidays you know of such as christmas and so on.
    After getting this table you can create a function that returns the number of working days between 1 date to another by subtracting the days exists in this table.
    I started with that, you are more then welcome to get ahead with it and let us know what happened...
    create table holiday
    D_date date,
    d_day varchar2(20)
    create or replace procedure holiday_proc is
    d_date date;
    begin
    d_date := trunc(sysdate);
    while d_date<'01-jan-2010'
    loop
    if to_char(trunc(d_date),'Day') not in ('Saturday ','Sunday ') then
    INSERT INTO Holiday (d_date,d_day)
    (select trunc(d_date),to_char(trunc(d_date),'Day') from dual);
    end if;
    d_date := d_date+1;
    end loop;
    commit;
    end holiday_proc;

  • Sales Order : Calcul delivery date with only working days

    HI,
    When I create sale order, the delivery date is calculed with the number of days mentionned in type of sale document. SAP add this number of days into the day's date.
    Is it possible to calculate this delivery date only with working days in the corporate calendar ???
    Thank's

    HI
    Delivery date in the Sales order will be calculated the calender only basedon the Transportation lead time and Pick/Pack time and excluding the holidays
    Please cross the same in your instance
    Regards,
    Ram.

  • Payment terms should calculate Payment due date based on working days

    Hi Experts,
    As we know that standard SAP calculates Payment due date= base line date + number of days maintained in payment terms. In this payment days are considered as calendar days and not the working days.
    Example: If base line date is Thursday, payment terms says 3 days then payment due date is calculated as Sunday ( which is not a working day as per the factory calendar I use). The requirement is that payment date should be calculated as following Tuesday considering Satuarday and Sunday are not working days as per the calendar.
    Can you please suggest how can we achieve this?
    Thanks,
    Ravi

    You can not acheive from config pooint of view but you can use BADI and get the solution
    use BAdI MRM_PAYMENT_TERMS to set terms of payment
    You can use this Business Add-In to change the following fields for the 
    terms of payment in the invoice document header:                        
    o  ZFBDT: Base date for due date calculation                            
    o  ZBD1T: Discount days 1                                               
    o  ZBD1P: Discount percentage 1                                         
    o  ZBD2T: Discount days 2                                               
    o  ZBD2P: Discount percentage 2                                         
    o  ZBD3T: Deadline for net condition                                    
    o  ZLSPR: Key for payment block

  • What are the Calculations of Compression days in MRP?

    Hi,
    Can anyone please explain me with example that what are the calculations for compression days calculated for planned orders?? I am using MRP planning.
    Thanks and Regards
    Farhan

    HI,
    compression days are the days by which lead time of your buy items gets compressed to fulfill the demand due dates.
    For ex,  Finished Good is having Due date ( as scheduled ship date/request date in SO)   on 15th of Feb, but the buy item used in this assembly has lead time of 20 days.
    Consider the plan is running today i.e. on 6th Feb, so buy item will be actually available  on 6+20=26th of  Feb,
    But your demand due date is 15th Feb, which needs to be met, so planning engine will suggest an exception for this buy item as 'Item with compression days'
    by compressing its lead time as 26th Feb-15th Feb=11days as compression days.
    Please mark this post as correct or helpful it serves your purpose.
    Thanks,
    Avinash

  • Day Limit, Fixed day/Additinal months & Baseline Date in Payment Terms-OBB8

    Hi Gurus,
    Please put some light on the following:-
    1. What is the relation between Day Limit & Baseline Date.
    2. What is the use or significance of Day Limit as far as Payment Term for Vendor/Customer is concerned?
    Thanks & regards,
    CS

    Hi,
    The day limit is used to process the document for due date determination based on the baseline date (document date, posting date etc. which is specified in payment term) of the documnt.
    For example, if you have defined first payment term P000 with the day limit as 15 and second P000 with day limit 31, then the documents having baseline date 15th or before will attract first payment term for due date calculation and documents with baseline date after 15 will attract second payment term for due date calculation.
    I hope the things are clear to you now.
    Regards,
    Gaurav

  • Display a Date that is 30 days ago from today

    Hi All, I want to display a Date that is 30 days ago from today, and I used Calendar object here is my code,
    Calendar to = Calendar.getInstance();
        String toYYYY = ""+to.get(Calendar.YEAR);
        String toMM = "" + (to.get(Calendar.MONTH) + 1) + "";
        String toDD = "" + to.get(Calendar.DAY_OF_MONTH);
        Calendar from = Calendar.getInstance();
        //I set the date to 30 days ago right here
        from.setTimeInMillis(to.getTimeInMillis() - 1000 * 60 * 60 * 24 * 30);
        String fromYYYY = "" + from.get(Calendar.YEAR);
        String fromMM = ""+ (from.get(Calendar.MONTH));
        String fromDD = ""+from.get(Calendar.DAY_OF_MONTH);
    System.out.println("toYYY is " + toYYYY);
        System.out.println("tomm is " + toMM);
        System.out.println("toDD is " + toDD);
        System.out.println("fromYYYY is " + fromYYYY);
        System.out.println("fromMM is " + fromMM);
        System.out.println("fromDD is " + fromDD);However, the display result is incorrect for the day that is 30 days ago, can somebody tell me what i did wrong, or rather, let me know if I should use something different to get the date that is 30 days ago
    thanks

    [url http://www.javaworld.com/jw-12-2000/jw-1229-dates.html]Calculating Java dates: Take the time to learn how to create and use dates
    [url http://www.javaalmanac.com/egs/java.util/CompDates.html]Comparing Dates
    [url http://www.javaalmanac.com/egs/java.text/FormatDate.html]Formatting a Date Using a Custom Format
    [url http://www.javaalmanac.com/egs/java.text/ParseDate.html]Parsing a Date Using a Custom Format

  • Calculation of Business day in OBIEE

    Hi,
    How to calculate the business day in OBIEE by excluding both weekends and public holidays.
    Please guide me

    If you want the "nth business day," here is something I prepared.
    Understanding the Concept in Layman Terms
    The first step to deriving the calculation is looking at a calendar. For our example, we will calculate the 6th business day of each month.
    1) Observation One: When the first day of the month is Saturday, the 6th business day occurs when “today’s date minus the first-day-of-the month equals 9.”
    2) Observation Two: When the first day of the month is Sunday, the 6th business day occurs when the above calculation equals 8.
    3) Observation Three: When the first day of the month is Monday – Friday, the 6th business day occurs when the above calculation equals 7.
    Building the SQL
    Below are the SQL statements that correspond to the above observations:
    4) When the first day of the month is Saturday…
    DAYOFWEEK(TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(CURRENT_DATE)*-1,CURRENT_DATE)) = 6 AND DAYOFMONTH(CURRENT_DATE)-DAYOFMONTH(TIMESTAMPADD(SQL_TSI_DAY,1,TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(CURRENT_DATE)*-1,CURRENT_DATE))) = 9
    5) When the first day of the month is Sunday…
    DAYOFWEEK(TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(CURRENT_DATE)*-1,CURRENT_DATE)) = 7 AND DAYOFMONTH(CURRENT_DATE)-DAYOFMONTH(TIMESTAMPADD(SQL_TSI_DAY,1,TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(CURRENT_DATE)*-1,CURRENT_DATE))) = 8
    6) When the first day of the month is Monday – Friday…
    DAYOFWEEK(TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(CURRENT_DATE)*-1,CURRENT_DATE)) NOT IN (6,7) AND DAYOFMONTH(CURRENT_DATE)-DAYOFMONTH(TIMESTAMPADD(SQL_TSI_DAY,1,TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(CURRENT_DATE)*-1,CURRENT_DATE))) = 7
    Putting the SQL Statements Together
    When any of the above conditions are true (“OR” between each condition), then (THEN) “today” is the 6TH business day; otherwise (ELSE) it is not the 6th business day. Below is the final SQL:
    CASE WHEN
    DAYOFWEEK(TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(CURRENT_DATE)*-1,CURRENT_DATE)) = 6 AND DAYOFMONTH(CURRENT_DATE)-DAYOFMONTH(TIMESTAMPADD(SQL_TSI_DAY,1,TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(CURRENT_DATE)*-1,CURRENT_DATE))) = *9*
    OR
    DAYOFWEEK(TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(CURRENT_DATE)*-1,CURRENT_DATE)) = 7 AND DAYOFMONTH(CURRENT_DATE)-DAYOFMONTH(TIMESTAMPADD(SQL_TSI_DAY,1,TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(CURRENT_DATE)*-1,CURRENT_DATE))) = *8*
    OR
    DAYOFWEEK(TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(CURRENT_DATE)*-1,CURRENT_DATE)) IN (1,2,3,4,5) AND DAYOFMONTH(CURRENT_DATE)-DAYOFMONTH(TIMESTAMPADD(SQL_TSI_DAY,1,TIMESTAMPADD(SQL_TSI_DAY,DAYOFMONTH(CURRENT_DATE)*-1,CURRENT_DATE))) = *7*
    THEN '6th Business Day' ELSE 'Not 6th Business Day' END
    Modifying the Query for the nth Business Day
    To modify the above SQL for the nth business day, change the numbers in bold to the appropriate values.

  • Create variant for VL10b for max delivery date higher than 30 days

    Hi expert,
    I want to create a variant for the transaction VL10b with a max delivery date higher than 30 days.
    The standard transaction make 30 days as default.
    How can a proceed?
    Thanks for your help.
    Regards,
    Haja

    Hi Haja,
    From the moment you run your variant via transaction VL10B, the delivery creation date
    range will get the values saved in your variant. In a second step, when you click
    on "Purchase Order" Tab, the system will re-determine the Delivery creation date
    range taken into account the fact that field CalcRuleDefltDlvCrDt is empty and that
    MaxDelivCreateDate (visible in the variant) is equal to 30.
    Please note, the date calculation is being influenced by 2 factors :
    -The MaxDelivCreateDate field whose default value can be modified in 2 different ways:
      a) either in customizing via transaction VL10CUC
           or
      b) manually, after unchecking the "Use list profile" check box in the user role of VL10.
          By doing this, the field will be made visible and can then be manually modified.
    Afterwards, the date calculation is also controlled by the rule defined in CalcRuleDefltDlvCrDt field. You can then possibly also set this field to blank or define your own calculation rule via an
    user-exit (include V50R_USEREXIT_PREPARE). If the rule is set to 2, then regardless of the
    value stored in MaxDelivCreateDate, the date range will only cover today and tomorrow.
    These are the only 2 influencing factors for the program (not the variable type in the variant). Please try any combination you may need and this should suit your needs.
    BR,
    Enrique

Maybe you are looking for