Number of days issue

Hello everyone,
Here is my problem.  My user wants to have the number of days in a report based of an interval dates from posting date. 
This is simple enough, i can just uses a formula variable to give the difference between the dates.
But, if the user desided to drop in the posting period into the results rows, the user would like each period to show only the days in that period.
So 01/05/2001 - 03/01/2001
Would show a total 49
If the user puts period in the results the user wants to see
Period 1    Period 2     Period 3
26             28          1
Any ideas?
Thanks!!

Hi,
It looks like your calculations doesn't depend on the date that the report is executed.
Aren't you able then to calculate that differences on the data upload writing the result to a new key figure?
If you have a record per each period then the solution is easy. If not... well then we'll have to think about another solution
Hope it helps.
Regards,
David.

Similar Messages

  • BW Query Designer  -  Replacement Path Issue - Need Number of Days

    The requirement is to have "Number of Days" (Key figure) by using the formula SY-DATUM MINUS General Availability Date.
    GA(General Availability (Date is Calculated Using a hidden Formula Variable with the Processing type u201CReplacement Pathu201D
    to convert the Free Characteristic 0WBS_ELEMT__CWBSUSR09 into the Date Format.
         The Sy-datum brought using another hidden Formula Variable with the Processing type u201CCustomer Exitu201D, after checking whether the Project Close date is in Future (after GA Date).
    There is SAP Note 1005772 available, it will be of Little Help.
    Rgds
    Venu

    Re: Years of Service
    Here is the similar scenario, but need help on how to resolve this issue.

  • Need to add number of days to users end date.

    Hi,
    I have a code where we are adding number of days(30) to current date and then updating user's end date in IDM DB.
    Now we have a requirement where we need to add number of days(30) to existing end date of user instead of adding to current date.
    *public String incrementDate(int daysToAdd)
         // Start date
         log.info("NotifyLastDayOfService::incrementDate(): Enter");
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd 00:00:00");
         Calendar c = Calendar.getInstance();
         c.add(Calendar.DATE, daysToAdd); // number of days to add
         String newDate = sdf.format(c.getTime());
         log.info("NotifyLastDayOfService::incrementDate(): Exit");
         return newDate;
    Have any body implemented this scenario?
    Please suggest.
    Thanks,
    Kalpana.

    Hi Nayan,
    Here is the code:
    System.out.println("----inside increment date method-----");     
              HashMap<String, String> hm = new HashMap<String, String>();
              HashMap<String,Date> modifyMap=new HashMap<String,Date>();
              SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd 00:00:00");
              tcResultSet usrList = null;
         String enddate = null;
         hm.put("Users.Key",usrKey );
         try {
         usrList = this.usrIntf.findUsers(hm);
         usrList.goToRow(0);
         Date endDate =usrList.getDate("Users.End Date");
         System.out.println("-----users end date-----"+endDate);
         String userEndDate=sdf.format(endDate);
         System.out.println("-----String value of users end date-----"+userEndDate);
         Calendar cal=null;
         System.out.println("-----Calender date-----"+cal);
         cal.setTime(endDate);
         System.out.println("-----end date-----"+endDate);
    cal.add(Calendar.DATE, Integer.parseInt(daysToAdd)); // number of days to add
    Date newEnddate = cal.getTime();
    System.out.println("-----new end date-----"+newEnddate);
    //usrList.setEndDate(Edate);
    modifyMap.put(userEndDate,newEnddate);
    usrIntf.updateUser(usrList, modifyMap);
    System.out.println("updated user's end date in OIM DB");
    //System.out.println("-----updated user's end date in OIM DB-----");
    logger.info("NotifyLastDayOfService::incrementDate(): Exit");
         System.out.println("-----new date-----");
         } catch (tcAPIException e) {
         logger.error("Error in finding end date for user" + e);
         } catch (tcColumnNotFoundException e) {
         logger.error("Error in finding end date for user" + e);
    In th log file, I can see that the code is not executing this line:
    cal.setTime(endDate);
    end date is of type Date and stores users end date from DB. Please help in resolving this issue.
    Thakns,
    Kalpana.

  • How to get "Number of days" in a report on 0PM_DS02

    Dear BI Gurus,
    I need to build  a query on the PM DSO - 0PM_DS02 (MTTR/MTBR).
    The query has 0Equipment in the rows
    The fields Available Time | Breakdown TIme | Utilised Time in the columns for the time granularity selected.
    The field Breakdown Time is the calcaulted key figure Actual Outage Time from the DSO.
    The field Utilised Time  is a formula = Available Time - Breakdown Time.
    The issue I am facing is regarding the field Available Time.
    In the report the user needs time granularity in Month and Year.
    Basically the logic for the field Available Time = Number of days in the time period selected * 24
    where 24 = number of hours in a day.
    Now my issue is when the time granularity is month , the field should have the number of days in the month the user selects from the selection screen and when the time granularity is year, the field should have number of days in that year.
    Also during the query execution period, when the user changes the time granularity the report should also change the calculation for this field.
    (I can bring an extra field to the DSO, which will bring the available number of days in a month for each record)
    Can you please guide me how to map this scenario.
    Many Thanks in Advance,
    With Warm Regards,
    Vineeth

    Hi All,
    Waiting for your suggestion on this?
    With Warm Regards,
    Vineeth

  • Numbers of days issue

    Hi experts,
    I have an issue getting the numbers of days of the month.
    Here's my scenario:
    - Number of days of the month is a KF (averdage) whitin the cube and it is calculated in the transformation
    - It has the number of day of the month for each day that the employe works.
    I have a calculated KF that has "Number of worked days / Numbers of days of month" and it works only when the employee is been shown.  If not, for ej. jus drilled down the month/year, the numbers of days of month are been sumarized when what I need is a constant number of days.
    Can anybody help me please?
    Thanks and regards,
    Claudio

    Hi,
    For Number of days create a formula and include the Number of days from cube and use Exception aggregation as Average based on Fiscal Year period. This will give you a standard number of days.
    Hope this helps

  • I wanted to know how do you calculate the number of days between two dates

    i wanted to know how do you calculate the number of days between two dates in java ? i get both the dates from the database. i guess there are many issues like leap year and Febuary having diff no of months ..etc.

    thanks..
    I solve my problem as
    public class MyExample {
        public static void main(String a[]) {
            String stdate = "2009-03-01";
            java.sql.Date currentDate = new java.sql.Date(System.currentTimeMillis());
            java.sql.Date preDate = java.sql.Date.valueOf(stdate);
            System.out.println(currentDate);
            System.out.println(preDate);
    //        int dateCom = preDate.compareTo(currentDate);
    //        System.out.println(dateCom);
            long diff = currentDate.getTime() - preDate.getTime();
            int days = (int) Math.floor(diff / (24 * 60 * 60 * 1000));
             System.out.println(days);
    }

  • Number of Days in Date and 7pm anomaly

    I have found a bizarre behavior with find the number of days for a date( since Jan. 1, 1970 ). I needed a way to calculate the number of days between two dates. I did this by using the getTime() method on the dates, then dividing them by one day in milliseconds (86400000). I then cast them to an int to trucate the decimals. This gave the number of days since Jan 1, 1970. I then subtracted the two 'number of days' values to get the number of days between the 2 dates.
    This was working fine until we ran into a problem of it returning one day to many in a seemingly random pattern. The problem ended up being that after 7pm dividing a date in milliseconds form by a day in milliseconds would return one more day, than if the date was before 7pm.
    example:
    November 1, 2004 00:00:00 = 1099288800000ms = 12723.25 days = 12723 truncated
    November 1, 2004 19:00:00 = 1099357200000ms = 12724.04 days = 12724 truncated
    Why is this? Why is 12am Nov 1 not an even number of days? Supposedly the Date class starts from Jan 1, 1970 00:00:00. If everyday is 86400000ms then this behavior shouldn't happen. Does anyone know why this anomaly happens?

    You need to take into account time zone. If you are at GMT+0 there is no problem (unless you switch to daylight sayings :)
    For example you can take a System.currentTimeMillis() and send it anywhere in the world and it would display locally with the right time.
    I guess you are at -5 hours from GMT. (Eastern time of the US/Canada timezone). The Date object makes corrections for timezone.
    So in England, the time would have been 0 at Jan 1 1970, 00:00:00
    Another thing you may need to worry about is daylight savings changes, which again are handled by the Date object.
    The simplest thing to do is use the Date object. If this is a performance issue you can do some tricks to reduce the impact. e.g. store the default Timezone and Local locale as constants and use these to build the Date object.

  • Prorate absence Quota monthly based on number of days worked.

    Hi All,
    I need to Generate Absence Quota Prorated Monthly on the following criteria.
    4.5 days Per month.
    0 - 5 day = 0.5
    6-10 days = 1.5days
    11- 15 days = 2.5 days
    16-20days = 3 days
    21 - 25 = 3.5 days
    26 and above = 4.5 days
    54 Quota Yearly entitlement
    Negative Time evaluation -
    Time evaluation run at end of the month.
    If use Base Entilement as .15 / days and daily accural in Table T559L ,
    then without any PCR quota is generated but for 31 days it generates 4.65 days and people joining middle of the month is not as per the criteria mentioned above ie as per number of day worked.
    Can any one guide me with the steps and PCR's required if any.
    Thanks
    Sethu

    Hi Dinesh,
    Thanks for your response. I have already created and  assigned it in T559L. The below is the Rounding rule.
    Lower inc     Upper     Target     Rollout
    0.00000 X     0.75000      0.15000 X
    0.90000 X     1.50000      1.50000 X
    1.65000 X     2.25000      2.50000 X
    2.40000 X     3.00000      3.00000 X
    3.90000 X     4.65000      4.50000 X
    As per my earlier thread description when i make it daily accural and assign this rounding rule then for 31 days it calculates 4.65 days and for people joining middle or last week of the month it is not prorating as per the requirement,
    Thanks
    Sethu

  • "No limit" not displaying for number of days to sync email

    I recently purchased 16GB iPad w/ retina display (MD513LL) running IOS 6.0.1
    I successfully set up MS Exchange email account, but it does not give me the option of "no limit" under number of days to sync.
    I read in a few prior posts that deleting the email accounting and setting it up again works, but I tried that at least 6 times (it worked for my new iPhone 5, but not the iPad).

    I might be wrong but I don't think so because I set up the same account on my iPhone 5 which allowed for the "no limit" option.

  • How to get PO and vendor payment term number of days??

    Hi Experts,
    I want to have a) Purchase order payment term number of days as well as
    b) vendor Payment term number of days.
    For  a) For  Purchase order payment term number of days I am using table EKKO and taking ZBD1T field which is giving payment
               term number of days.
              Is it correct??
          b) vendor Payment term number of days I am using table LFB1 field Zterm to take payment term key not number of days.
               Based on this key i will go to table T052 and find corresponding number of days as told MM consultants .
               But this is not BW work. We need one single table from which we can take the field or enhance the current extractor
              with that field.
    So is there any other option for (b)
    and Whether steps for (a) is correct???
    Please confirm this.
    Thanks in Advance,
    Uday Shankar.

    For a) For Purchase order payment term number of days I am using table EKKO and taking ZBD1T field which is giving payment
    term number of days.
    Is it correct??
    Payment terms for purchasing doesn't come delivered as part of the R3/ECC tables and is usually is added as a custom field to EKKO and populated via a User Exit. That looks to be the instance in your case because the field that you show as being the payment terms begins with a Z (custom fields begin with Y or Z). That appears, without being able to actually validate in your R3/ECC environment, to be the correct field to use. You would have to validate, however, with the end customer or your MM function consultant to be 100% certain. If this is the correct one to use, you're going to have to enhance the 2LIS_02_HDR extractor by enhancing the extraction structure and creating the User Exit to read it from EKKO and populate into the DataSource.
    b) vendor Payment term number of days I am using table LFB1 field Zterm to take payment term key not number of days.
    Based on this key i will go to table T052 and find corresponding number of days as told MM consultants .
    But this is not BW work. We need one single table from which we can take the field or enhance the current extractor
    with that field.
    You can enhance the 2LIS_02_HDR extractor with the Vendor Payment Terms by joining the following in your User Exit:
    EKKO-LIFNR = LFB1-LIFNR
    EKKO-BUKRS = LFB1-BUKRS
    LFB1-ZTERM = T052-ZTERM
    This could either be done in a SELECT statement in the User Exit to do this equi join, or you could create a view on your R3/ECC environment and SELECT from that view.

  • How to calculate the number of days until your next birthday. Only using current month, day and birth month and day.

    I'm trying to calculate the number of days until your next birthday. Only using current month, day and birth month and day. I can get close but i'm way off. When i enter in the next day, the amount of days is supposed to be 364. This is where I am having problems. I know my code is way off. I just need some guidance please!
    Attachments:
    D5.7_1.vi ‏8 KB

    I just had a little fun with the Time Record...
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    D5.7_1_BD.png ‏19 KB

  • PO number and material issued against this PO for subcontracting

    How to know the link in between the PO number and material issued against this PO for subcontracting.
    I have checked that PO history is not getting updated.
    Thanks,

    Hi,
    We have 2 different scenarios where you can post a goods issue to Subcontract Venodrs.
    Scenarios 1: You can post the goods issue against a subcontrac vendor with out referencing the Subcon PO from ME2O, at this stage we will be knowing what is the stock at subcontract vendor but we will not be knowing the issues against which and how much Quantities are posted.
    So when we are post goods receipt, then we will come to know the consuption quantities.
    Scenario: 2, If we use the delivery concept then we can track the goods issues against the subcon POs.
    If you really keen to track the material issued to Subcon vendor against a PO so better use with delivery.
    Thansk,
    Satya.

  • Credit Check on Open Items number of day

    Hi
    We have setup automatic credit control and all seems to work fine,  we now want to expandon this to include open items. So we have created a static block on open items.
    The next step was to only include open itesm that have been open for longer than 60 day, sowe have entered 60 in the number of day box.  But order are stillgoing on block due to this statoc check.
    We have 0 set in the max open items box.
    Do we need to enter anything in this box.  We want the check to only include open items older than 60 days and the credit limit not to go over the main customers credit limit
    Thanks
    Barry

    Hi,
    Could you please share the answer?
    Tawsif Chogle

  • Number of days customer is due to be maped in dunning notice PLD

    Hi All,
    In the Dunning Reprt PLD I want to print the number of days the Customer is due to company as the number of days due varries from customer to customer please give a solution. So that i want to map number of days from dunning wizard report in to the PLD.
    Regards & thanks for advance,
    Mobin.

    Hi Mobin
    One question first, the due days per customer does not make sense as there may be more than one document owing. I assume then that the oldest invoice must be used to calculate? This would be true at header level, but it will not be possible to place a field here to calculate from the rows. It might be possible to include a BP master UDF field here at print time, but this field would have to be updated manually on the BP masters with a query to get the maximum due date of open invoices and calculate their days overdue.
    For row level each document could have a number of days overdue and this should be rather easy to achieve. Add an extra column as formula field and use the following formula:
    ToNumber(F_203)-ToNumber(F_089)
    F_203 is my own hidden field at row level with the formula Date() in it. F_089 is the value date or due date on the row. You can also add a hidden field and refer to the database field you want to use for this date.
    I am still of course assuming that the dunning report you are referring to is the SAP standard dunning letter(s). If you are referring to a custom report, please let me know.
    Kind regards
    Peter Juby

  • Is it possible to add number of days to date?

    I am working on a form where I need to add number of days to a date and come up with a date.
    Header 1
    Header 2
    example date:  March 1, 2013
    + 30
    = march 31 2013                
    1. is this possible? Header1/cell 1 is a date field. Header 2/cell 1 is a dropdown field (30, 60, 90,120, custom),.
    Header2 cell2 not sure what field to use date or text?
    thank you

    Never mind I figured it out. Thanks

Maybe you are looking for

  • Can't open Pdf written with adobe V7 in Adobe V9 properly

    Hi,   I'm novice working with Pdf's. I have a task where we need to upgrade to Adobe Reader9 from Adobe Reader7. I'm able to open old pdf which works fine in Adobe Reader 7 but in Adobe Reader 9, I see the pdf broken into several fragment. Is there a

  • Alright, some serious problems (WRT54GS)

    Alright, here's my problem. I've tried searching many places and haven't really been able to get an answer to help me. I hope someone here can change my luck. Ok, so, I got this WRT54GS just a few days ago. Here's my problem. I tried to install it us

  • Satellite M70-360: CEekey.eke cannot run because its missing the dll

    I accidentally removed the ekecioctl.dll and now everytime I start my laptop (Satellite M70-360) I get an error message saying that de CEekey.eke cannot run because its missing the dll. Does anyone know where can I download the dll? Thanks

  • Error when interrupting hourly backups

    So I know you're supposed to be able to interrupt regular backups (by putting your mac to sleep, for example) and it just picks up where it stopped... But my Time Capsule doesn't seem to work that way. Every other time I interrupt it, when I come bac

  • I can't play videos on youtube when I'm signed into my account

    This problem just started today, prior to this I've had no problems with youtube. Earlier today, I tried to reload a video I had watched earlier and got the message "An error has occurred." I tried everything on youtube troubleshooting page, to no av