Subracting dates at report level , to get difference in days.

Hi team,
I have 2 Key figure End date & start date & I need to present a difference between these dates in form of days .
Firstly it is possible at report level , by using process value as date [DATE] on both the end & start date fields , later subtract start date from end date.
I am nt sure whether out put wil b accurate .
Is there any functional module already existing tht cn , give the difference between dates in no of days?

Hi all,
about this procedure, my questions are:
1) can this procedure be applied if start and end date are attributes of a given infoobject?
2) if "yes" on point "1)", how can you avoid aggregation? In this case, summarization is not meaninful. Example: a given project have a "start date" and an "end date", so the difference between these dates is project duration. In a cube multiple records refers to the same project hence these dates should not be summarized
3) does these procedure work on a multiprovider?
My questions arises because I'm trying to compute with dates on a multiprovider, dates are attributes and unfortunately it seems not to work.
Any help?
Thx!
LJ

Similar Messages

  • How to get difference in days between 2 dates excluding weekends

    Hi all,
    i have a requirement, to calculate the difference between 2 dates, in days.
    eg: 01/08/2007 and 05/08/2007.
         Difference = 4 days.
    But here my actual requirement is i have to calculate this difference excluding weekends (saturday n sundays).
    eg: 01/08/2007 -
    Thursday
         05/08/2007 -
    Monday
    so now Difference = 2 days.
    Please help me regarding this.
    Points will be rewarded for helpfull answers.
    Thanks in Advance.
    Regards,
    Vineel

    see these codes of rich
    report zrich_0003.
    data: begin of itab occurs 0,
          datum type sy-datum,
          end of itab.
    data: weekday like dtresr-weekday.
    data: number_lines type i.
    parameters: p_sdatum type sy-datum,
                p_edatum type sy-datum.
    itab-datum = p_sdatum.
    append itab.
    do.
      if itab-datum = p_edatum.
        exit.
      endif.
      itab-datum = itab-datum + 1.
      call function 'DATE_TO_DAY'
           exporting
                date    = itab-datum
           importing
                weekday = weekday.
      if weekday = 'Sat.'
        or weekday = 'Sunday'.
        continue.
      endif.
      append itab.
    enddo.
    describe table itab lines number_lines.
    write:/ 'Number of days between dates is', number_lines.
    and
    report zrich_0001.
    parameters: p_start type sy-datum,
                p_end   type sy-datum.
    data: idays type table of   rke_dat with header line.
    data: workingdays type i.
    call function 'RKE_SELECT_FACTDAYS_FOR_PERIOD'
         exporting
              i_datab               = p_start
              i_datbi               = p_end
              i_factid              = 'P8'  " Fact Calender ID
         tables
              eth_dats              = idays
         exceptions
              date_conversion_error = 1
              others                = 2.
    describe table idays lines workingdays.
    write:/ workingdays.
    I want to find the No.of working days between the two dates
    regards,
    srinivas

  • Mismatiching the Data in Reporting level.

    Hi Every One,
    I have ODS like ZMP_REL,THIS ODS FETCHING THE DATA FROM R/3 SIDE.AFTER GETTING THE DATA ,WHEN WE DESIGN A REPORT ON THIS ODS, IN REPORT THE DATA WILL BE MISMATCHED.
    EXAMPLE LIKE:
    I HAVE OBJECT LIKE:  ZADD1
                                        MUMBAI
                                        GOVA
                                        AMERICA..........
    i HAVE ANOTHER OBJECT LIKE:  ZADD2
                                                          CONSUL
                                                          ADD CONSUL....
    THE ABOVE ARE THE TWO OBJECTS ,IN THAT CASE WHEN WE DESIGN A REPORT ZADD1--THIS OBJECT GETTING THE DATA FROM ZADD2. 
    IF ANY ONE KNOWS CAN YOU TELL ME THE EXACT SOLUTION,WITH EXAMPLE.
    REGARDS
    CHETANS.

    Hi.
    This is not correct forum (Business Planning) for such question.
    May I recommend you to post your question to [BI General forum |Business Intelligence Old Forum (Read Only Archive) ;?
    Regards.

  • PO Delivery date at Item level is getting modified by Delivery date in PR

    Hi Experts,
    I am using BAPI_PO_CREATE1 for creating Purchase Order. I am passing delivery date (item level) in parameter
    POSCHEDULE of the  Bapi but the on creation of the PO it does not take the value that I passed in delivery date field
    ,however it takes the delivery date from Purchase requisition (the preceding document).
    Please let me know how can I fix this issue, It should take the date that I passed in the Bapi.
    Thanks & Regards,
    Sushant Singh

    Hi,
    In the X-Structure 'POSCHEDULEX' set 'X' in 'PO_ITEMX'.                  
    Please check in your system the following data:                          
    Check that the X-fields in structure POSCHEDULEx are set Correctly and  that the key fields item number and schedule number are equal in  PoSchedule and PoScheduleX.                                                                               
    Example:                                                                 
    POSCHEDULE                                                               
    PO_ITEM  00010                                                           
    SCHED_LINE  001                                                          
    DEL_DATCAT_EXT                                                           
    DELIVERY_DATE 10/13/2010                                                
    QUANTITY  2                                                              
    DELIV_TIME                                                               
    STAT_DATE  10/13/2010                                                                               
    Structure POSCHEDULEX                                                    
    PO_ITEM  00010                                                           
    SCHED_LINE  001                                                          
    PO_ITEMX  X                                                              
    SCHED_LINEX  X                                                           
    DEL_DATCAT_EXT                                                           
    DELIVERY_DATE X                                                          
    QUANTITY  X                                                              
    DELIV_TIME                                                               
    STAT_DATE  X                                                                               
    Please also make sure that all line items of PO should have at least one delivery schedule.                           
    Regards,
    Mauro

  • Issue with date reporting level

    guys,i need help with a field. ok so i have a date like 04/09/09 and i have another field which contains '3' now i need to subtract this 3 from the date on reporting level.  so my result should be 04/06/09. how can i accomplish this task? thanks.

    Hi,
    You can do it by using Formula variable on Date Field.
    Create Formula variable on Date Field
    Process by = Replacement path
    Reference Cha = Your date field
    In Replacement tab:
    Replace variable with = InfoObejct
    Replace with  = Key
    Use interval = This you need to set properly       " This is importent for you
    Offset setting = From & TO = check it and set properly. " This is importent for you
    Then display it in columns and do teh substracion with another formula.
    Thanks
    Reddy

  • Creating a dynamic report level formula in Analysis

    Hello Experts,
    I have a requirement in Analysis to create a report level formula for "Number of days a Product has been on Backorder" which is a calculation based on existing report objects/elements i.e Current Date - Sales Order Creation Date.  The problems that I'm facing right now with this are :
    a) How to set up Analysis to only select current date automatically each time the report is run as oppose to selecting the current date manually each time ?
    b) How do i write the formula that adjusts the Column/Row(with the formula) itself if more objects are added into the report or moved out of the report.
    Please help folks.
    Thanks
    Gaurav

    Gaurav:
    a) How to set up Analysis to only select current date automatically each time the report is run as oppose to selecting the current date manually each time ?
    Why not do this in the BEx Query Designer?
    As for part b, I am not following; please include screen shots.

  • Error creating comments in at report level

    Hi Experts!
    We are facing this problem when we try to create a comment on the report when it is running as a web application. On saving the document at the report level we get the error
    'Cannot read content from IConnent instance. Error: You are not authorized to create a document'.
    We are on Netweaver 2004s, SPS 09 BI 7.0. the steps we have already undertaken are:
    1. Checked the service pack to be at SPS 09 (SAP Notes 947209)
    2. Assigned Super_admin role access to user on the Public Documents folder in KM
    3. Ensured that infoobject 0TCAKYFNM as well as other 0TCA* objects are all active.
    But none of these have worked.
    But, when we are trying to create and save comments at a value level (for a field value), they can be saved.
    Please let us know if you know of any other solution to this problem. This is very urgent. Suitable reward points will be awarded.
    Thanks
    Sushmita

    Did you check the box in the query designer to read documents?
    Ravi Thothadri

  • Text data is not displaying at Report level for an Infoobject Item name

    Hi All,
    Texts data is maintained at Info object level but text information is not displaying at Report level for an object.  I have set the property at query level as "Text", but at report level it is displaying key values of the object, not displaying texts information.  This problem occured in QA(Quality) system but not replicated in Production system.  I have checked all properties at backend and query level and compared the same between QA and Production system didn't find any difference.
    Please suggest what might be the cause: at report level it is displaying key values instead of the textual information even text data is mainintained at backend.  In production it is displaying textal data for the IO.
    Thanks in advance.

    Hi All,
    Thanks for your valuable information.  I have changed the setting under Advanced tab as "Master data" for Access type for results values, but didn't solved the problem still it showing key information for the IO.
    In Production system the report displaying texts information for the IO, but in QA its displaying key information. The problem exits only in QA, its working fine in DEv and Production.
    As per my understanding might be the issue with Patches will be checking with Basis team on the same.
    Please suggest if you have any alternatives to fix the issue.

  • APEX CSS - How do I get data in report columns to wrap?

    I found information here http://www.orafaq.com/wiki/APEX_FAQ
    About How do I get data in report columns to wrap?
    This works and another way to do it is by adding the CSS directly into the
    Home>Application Builder>Application 137>Page 1>Report Attributes>Column Attributes page
    in the Column Formatting area. I added 'white-space:normal' and this works in FF but in
    IE it has a different behavior.
    In FireFox
    testasdgadhad
    gadfadgadgadg
    adgafhsrgjsgnsfg
    nsdfbadfafhafha
    dfhadfh
    In Internet Explorer
    testasdgadhad gadfadgadgadg adgafhsrgjsgnsfg nsdfbadfafhafha dfhadfh
    Is there a way to force it so it display in IE the same way that it displays in FF?
    The correct display format is FF.
    Thanks,
    Nestor :)

    I have try this because I found it during a search and it makes no difference in IE.
    This is what I am using now 'display: block; width: 100px;max-width:100px;white-space:normal'
    I also tried 'display:block; width:500px'
    If I use the values 'normal' or 'pre' for white-space' it works in FireFox but not in IE, The display block
    does not seem to make a difference. It seems that all I need is 'white-space:normal' but again
    it does not works on IE.
    Thanks,
    Nestor :-)

  • How can get difference between 2 dates in the form of days

    how can get difference between 2 dates in the form of days

    Hi,
    Check the following program:
    REPORT ZDATEDIFF.
    DATA: EDAYS   LIKE VTBBEWE-ATAGE,
          EMONTHS LIKE VTBBEWE-ATAGE,
          EYEARS  LIKE VTBBEWE-ATAGE.
    PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
                TODATE   LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
    call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
      exporting
        i_date_from          = FROMDATE
        i_date_to            = TODATE
      I_FLG_SEPARATE       = ' '
      IMPORTING
        E_DAYS               = EDAYS
        E_MONTHS             = EMONTHS
        E_YEARS              = EYEARS.
    WRITE:/ 'Difference in Days   ', EDAYS.
    WRITE:/ 'Difference in Months ', EMONTHS.
    WRITE:/ 'Difference in Years  ', EYEARS.
    INITIALIZATION.
    FROMDATE = SY-DATUM - 60.
    Regards,
    Bhaskar

  • Changing date format at reporting level

    Hello,
    Will u plz tell me how can i change the date format at reporting level?
    I want to display date in dd/mm/yyyy, but by default its showing mm/dd/yyyy.
    Delta is already loaded in the system, so i don't want to disturb regular data loading.
    Is there any way so that i can change the format of date.
    Plz help me out.
    Thanks,
    Regards,
    Steve

    Hi steve
    There r so many postings on the same topic
    go through these previous threads
    date format
    Date format
    u can find solution
    regards
    Ravi Kiran

  • Logic at reporting level to compare two dates .

    Dear Friends,
    I have a scenario here , where i have a counter keyfigure in my DSO which has constant value 1 . there is two dates : Stock issue date & stock receipt date .  At the reporting level , in selection screen there is an input on stock receipt date . Now i want to show key figure counter for which stock issue date lies between the stock receipt date which the user enters .
    Kindly suggest on this matter .
    Thanks & regards,
    Ashutosh Singh

    1. Create a customer exit variable on Stock issue date. Pass on the value the user enters through exit to this variable.
    2. Create a New formula with the counter keyfigure and restrict it based on the customr exit variable.
    This will work correctly if Stock issue date and stock receipt date are not displayed in the report.
    If it is displayed, then if the stock issue date lies between the stock receipt date it will have the value as 1 else 0.
    Hope this helps.
    rgds, Ghuru

  • Report on delivery data in item level for list of po

    Dear all
             How to take Report on delivery data in item level for list of po
    regards
    M.Chandra mohan

    You can check any of the standard reports like ME2M with the selection variant as "PO where GR exists"

  • How to get Difference of a Result set in reports

    Hello,
    I am trying to get difference (variance) of sales in past year and current year. Below is the report which accumulates the sales for 2013 and 2014 and also accumulates the Sales for both year , but how can we get the difference of sales in Years. Any ideas really appreciated.
    Thank you,
    Pavan

    Harish,
    I tried creating Some restriction Key figures and calculated key figures as I want this by every month as well. Not a straight forward (easy)way. I had to create many Key figures.
    I really appreciate your response.
    Thank you,
    Pavan.

  • Need help in copying Invoice date to lower level item in Sales order report

    Hello Experts,
    I am debugging into one Sales order report.I need little bit help.The report is displaying Invoice Date for
    Sales order Billing documents for Higher item in Bill of Material Structures.But as per user requirement,
    I am supposed to show the Invoice date for lower level items also.The field for Higher level item is 'UEPOS'.
    I want to copy the Invoice date for Higher level item to lower level item. Can you please guide me in the logic?
    Thanking you in anticipation.
    Best Regards,
    Harish

    Hi BreakPoint,
    Thanks for the information.
    I have applied the same way but it is showing only lower line items now.
    Invoice dates for Higher level items are not there.
    I am pasting the code here which I have applied.
    Then you can give me more guidence.
    This is to be done only for 'ZREP' sales orders.
    if w_vbak-auart EQ 'ZREP' and w_vbak-uepos is not INITIAL.
                          read table t_final into w_final_ZREP with key vbeln = w_vbak-vbeln
                                                                        posnr = w_vbak-uepos.
                             w_final-erdat_i = w_final_ZREP-erdat_i.
                             else.
                    if w_vbak-auart EQ 'ZREP' and w_vbak-uepos is INITIAL.
                      w_final-erdat_i = w_invdate.
                    endif.
                    endif.
    Can you please sugest me changes here?
    Best Regards,
    Harish
    Edited by: joshihaa on Jul 13, 2010 6:22 PM

Maybe you are looking for