Comparison of single dates and calculation based on these - index

Hello,
I need to report on the index of sales for a certain date with the sales for a certain date previous year.
An example could be having sales data 2000 EUR for 2007.08.02 in column A and sales data 1000 EUR for 2006.08.03 in columns B on the same row so that the two calendar days could be compared in column C (formula 2000/1000 = 2).
I need help with ideas of how to reach this. I have one info objectin cube containing posting date in format: 2007.08.02.
Clever ideas highly appreciated..
thanks,
F C

FC,since the offset differs depending on the year in the date, its not possible to hard code it in query designer..
but this can be done in customer exit.
1. Create a user entry variable and a  customer exit variable (single value or interval )
2. Fill in the values of customer exit variable from user entry variable using this logic
DATA: l_s_range TYPE rsr_s_rangesid,
      loc_var_range TYPE rrrangeexit,
      l_year TYPE n,
      l_date type sy-datum,
CASE i_vnam.
  WHEN '<custoemr exit varaible>'.
    IF i_step = 2.                    
      LOOP AT i_t_var_range INTO loc_var_range
                   WHERE vnam = '<user entry variable>'.
        l_date = loc_var_range-low.
        l_year = loc_var_range-low(4).
        Case l_year.
            when 2005.
                    l_date = l_date - 365.
            when 2006.
                    l_date = l_date - 364.
        Endcase.       
        l_s_range-low = l_date.
        l_s_range-opt   = 'EQ'.
        l_s_range-sign  = 'I'.
        APPEND l_s_range TO e_t_range.
        EXIT.
      ENDLOOP.
    ENDIF.
endcase.

Similar Messages

  • I am wondering why i am paying about 100$ for 1 line and 2gbs of data and now i see these commercials for 2 lines and 6gbs of data for 100$?

    I am wondering why i am paying about 100$ for 1 line and 2gbs of data and now i see these commercials for 2 lines and 6gbs of data for 100$??  Please explain.

    How To: Direct Message  and  AyaniB_VZW

  • Quantity of data and Calculation

    Hello,
    I've a Dataset like that:
    Number   -   Creation Date    -   Complete Date
    10001     -     25 Feb 2008    -   21 July 2008
    10002    -      25 Feb 2008    -   26 Feb 2008
    10003      -    20 June 2008   -   21 July 2008
    I'm looking to have a report counting Month by Month how many data were created and Complete:
    Month     -       Created      -       Complete
    Jan 2008      -        0          -              0
    Feb 2008       -       2          -              1
    June 2008      -       1            -            0
    July 2008       -       0           -             2
    Do you have any example of formula to set-up in Crystal Report ?
    Thanks in advance
    Alex
    Edited by: Alexandre VANNIER on Jul 22, 2008 3:29 PM

    For the 1st Proposal, I can't do a left outer joined because my extract come from a Java Bean, so the DataSet is unique without any Table link, so I don't know how to generate this Month fields.
    Concerning the Second proposal, I don't well understand how to do 2 types of Group,
          - I succeed to group by "Create Date" and Count, but I've no clue, how to re-use this count
          - How I can group again on a Second Parameter "Complete Date", then count and extract this value
    Thanks for your help

  • Why are date and time strings lost when indexing an array in a for loop

    Hi, 
    I have an application where i'm reformatting data from a spreadsheet for graphical display on a LabVIEW dashboard.
    the original spreadsheet has date and time values in separate columns, and i'm merging them and converting to a timestamp value.  But something's not working.  Does anyone know why the string value is lost when the array indexes into this for loop?
    Attachments:
    failed array index.png ‏142 KB

    Can you attach your VI with some typical values? (e.g. create in indicator on the 2D array, run your VI, then turn the indicator (now containing data) into a diagram constant). Place the FOR loop related code and that diagram constant into a new VI and attach it here.
    How many times does the FOR loop run? Could it be that the last element of each 1D array is an empty string? (unless you put a wait inside the FOR loop, you'll never see the other elements in the probe)
    LabVIEW Champion . Do more with less code and in less time .

  • Cannot change date and time settings, popup "These files can't be opened: Your internet security settings prevented..."

    When I try to change my date and time settings I get a Windows Security popup that reads: "These files can't be opened.  Your Internet security settings prevented one or more files from being opened. C:\Windows\system32\rundll32.exe"
    I have Windows 7 64 bit.  I also have McAfee SecurityCenter installed.  I have tried turning off my firewall temporarily, but the problem persists.  I am not sure if it is some type of virus.  If anyone could give me some information
    as to what could be causing this I would appreciate it.  Thanks in advance.

    Hi,
    Perhaps, this issue is caused by a sign of corruption.
    Please try to use sfc/scannow to check the System Files.
    Also, You may refer to the following link.
    http://www.sevenforums.com/general-discussion/71526-cant-change-date-time-2.html 
    Important Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

  • Change Log Table entries without Dates and How to Delete these entries !!

    Hello Experts,
    I was analyzing Change Log tables of some DSOs and figured out in some tables we don't have Date Column and some tables with date columns but many entries with "00/00/0000" date.
    Any ideas on this ? Any idea how records can get into the table without dates and if SAP provides a safe way to remove them (without dates) ?
    Many Thanks in advance, Please help.
    Regards,
    S. Patel

    Hi Sunil
    Date fileds 00/00/0000 means date are blank..that means either you did not get  them from source system or the transformation is not mapped.
    Do not delete change log selectively, that might affect your delta  loads.
    Rather delete  old change log ...
    From DSO administration ---use the main menu to choose Environment ® Delete Change Log Data.
    For more information you can check the log below.
    Cheers
    Anindya

  • Comparisons of Duration, Date and Time Values

    Hello,
    Is there way to simulate support for XPath 2.0 date/time comparison functions?
    (can I create a module to replace currently available XPath functions with my
    own?)
    Are there plans to fully support those functions?
    For example: func-date-less-than
    http://www.w3.org/TR/xquery-operators/#func-date-less-than
    ... snip ...
    ( time-less-than( time("12:00:00"), time("23:00:00+06:00") ) )
    ... snip ...
    Regards,
    Benjamin Shrom.

    Just use lt on the dates, dateTime and time elements
    <db>
         for $PB_BB.CUSTOMER_1 in document("PB-BB")/db/CUSTOMER
         where ($PB_BB.CUSTOMER_1/CUSTOMER_SINCE lt $#customer_since_cutoff of type
    xs:date)
         return
         <CUSTOMER>
              <CUSTOMER_ID>{ xf:data($PB_BB.CUSTOMER_1/CUSTOMER_ID) }</CUSTOMER_ID>
         </CUSTOMER>
    </db>
    - Mike
    "Benjamin Shrom" <[email protected]> wrote:
    >
    Hello,
    Is there way to simulate support for XPath 2.0 date/time comparison functions?
    (can I create a module to replace currently available XPath functions
    with my
    own?)
    Are there plans to fully support those functions?
    For example: func-date-less-than
    http://www.w3.org/TR/xquery-operators/#func-date-less-than
    ... snip ...
    ( time-less-than( time("12:00:00"), time("23:00:00+06:00") ) )
    ... snip ...
    Regards,
    Benjamin Shrom.

  • Date and Location-based reminders

    Can you create a location-based reminder that will only remind when you arrive at the location on a specific day? For example, every Wednesday you have to take out the trash. I would like to set a reminder when I arrive home, but not every time I arrive home, only on Wednesday, without having to set a time, just whenever I arrive home on a Wednesday.

    No I didn't ask Siri. If I can't do it via the interface provided I'm sure Siri can't do it either. Besides, how do you even structure the command? It wold be too complex.

  • TS3276 word, jpeg documents as attachments are arriving in the format of win.dat and I cannot access these attachments. How do I overcome this issue?

    I find when I receive emails the attachments are often un openable - mostly these are when I sent documents to myself from my microsoft machine to my apple ; what do I need to be able to do to read jpegs, word etc docs and also Publisher type docs.

    I find when I receive emails the attachments are often un openable - mostly these are when I sent documents to myself from my microsoft machine to my apple ; what do I need to be able to do to read jpegs, word etc docs and also Publisher type docs.

  • Report with characteristic and calculation in the rows

    Hi,
    I need to do a report that has to have in the rows a characteristic, a selection and calculation based in the result line of the characteristic, as presented following:
                 Column X Column Y ...
    Characteristic
            Result line
    Selection (hided)
    Calculation (Selection / Result line *100)
    Then its necessary to be possible to drill down to another characteristic.
    Please if you have done some report like this one please give me some ideas on how to do it.
    I'm thinking to make a workbook with two queries but this arise some issues in terms of the layout because I would need to put the query with the calculation above the other because otherwise it would be overwrote.
    I have some doubts also on how to make the drilldown possible???
    If you can help me I would be very grateful and I will assign points...
    Best regards,
    Ana

    Hi Ane,
    It seems little tricky here.
    Try this way to see all your values of  Asset class in single selection(Hope it works!!)
    Rows -> First Drag Asset Class
    Then create a structure jsut below this Char -> In New selection,define the name as you want & Use Asset Class as Restriction
    It should look like this in rows:
    Asset Class (Char)
    Structure
    Asset Class (Name of your selection - restricted with Asset class)
    Please check n lemme know if it works
    Sriman

  • Capturing system time and date and the time difference and date difference.

    Hello Experts,
    i have a requirement the i need to capture select query start time and date as i runthe program on midnight (ie) 11:55 p.m.
    I tried system fields sy-datum and sy-uzeit for capturing the system date and time when my program runs but it gets reset when the date changes.
    i tried get time field option but it is resetting the sy-datum to zero so i am able to capture the date of the next day and resulting in wrong calculation of time .
    please help with your valuable answers.
    Thank you,
    Srinivas.

    Hi,
    As per my understanding you want to fetch those data which are created between the program last run date time and current date time.
    If I am right please follow the below procedure.
    1. Create one custom table to store program name and program execution last date time
    2. at event INITIALIZATION populate to fields date and Time using the statement sy-datum
    initialization.
      v_curr_time = sy-uzeit.           " Current time
      v_curr_date = sy-datum.           " Current date
    3. Get the last run date and time from the above custom table.
    4. Do your logic.
    5. at last Update the custom table with current date and time based on the step two (Here do not take sy-datum like that, take the value in the global variable populated in step 2)
    Thanks
    Subhankar

  • Single Date Parameter, but using a date range for selection

    Post Author: fireman204
    CA Forum: Formula
    I'm fairly new to Crystal Reports, so be gentle with me.  I have a report that has 4 parameters.  The report asks for data for a specific month, the YTD data to the end of the selected month, and the same data from the previous year.  It seems there should be a way to enter a single parameter (ie., 2007-4-1), and off that date select all the data for the month, the current year to the end of that month, and then the data from the previous year for the same period.  I know this will be a formula field needed to select the data, but not sure how to get there from here.  Any ideas?  Thanks in advance!

    Post Author: SKodidine
    CA Forum: Formula
    It should be possible for you to create just one parameter to have the user input a single date and then create formulae to create the begin and end dates for the month, YTD and PYTD.  You can then use these formulae for record selection criteria.
    For example, if the user inputs a date of 2007-04-01 for the single parameter then create formulae such as:
    beginmonth
    datevar beginmonth;
    beginmonth := date(year({?My Parameter}),month({?My Parameter}),01);
    endmonth
    datevar endmonth;
    endmonth := cdLastDayOfMonth ({?My Parameter});
    To use the cdlastdayofmonth function, In the formula workshop window, click on "Repository Custom Functions" then under CRYSTAL and DATE right click on cdlastdayofmonth and click on ADD TO REPORT.  Once that is done, then create the above "endmonth" formula.  You should see this new function in your formula workshop window in the FUNCTIONS window under CUSTOM FUNCTIONS.
    beginytd
    datevar beginytd := date(year(currentdate),01,01);
    endytd
    datevar endytd;
    endytd := cdLastDayOfMonth ({?My Parameter});
    beginpytd
    datevar beginpytd := date((year(currentdate)-1),01,01);
    endpytd
    evaluateafter({@endytd});
    datevar endytd;
    datevar endpytd;
    endpytd := date(year(endytd)-1,month(endytd),day(endytd));
    In your record selection criteria, you can use the above formulae like this:
    in {@beginmonth} to {@endmonth}
    or
    in {@beginytd} to {@endytd}
    or
    in {@beginpytd} to {@endpytd};
    This is one way of doing it, perhaps others might pitch in with a more efficient way.

  • Multiple rows with single date

    I am using a CDC control task to extract and load data from our OLTP source to our Data Warehouse.
    For our Date dimension, we have a DateKey which is a
    DATETIME stamp (created using SSAS dimension wizard). Time is always 00:00:00 as a DATETIME
    value is required for populating the dates.
    Our fact table destination uses this DateKey as a FK.
    Our fact table OLTP data source contains multiple records with a single DATE and TIME field. This fine as I can convert the DATE field to a DATETIME using a derived column.
    However, as our Date dimension has granularity of a day, all we require for our fact table is the most recent daily record from our OLTP data source.
    At present, the data flow task is attempting to write all records and failing on PK constraint.
    How would I go about traversing all records for each date and loading only the most recent for that day? Is there a better way to go about this?

    If you wish to get only one record for today, you can simply use in your source query:
    SELECT TOP 1 ... FROM OLTPdata ORDER BY DEATETIMEcolumn DESC
    if you need one record for each date, you may use ranking functions:
    WITH Q AS (
    SELECT
    ROW_NUMBER() OVER (PARTITION BY CAST(DateTimeColumn AS DATE) ORDER BY DateTimeColumn DESC, some tie breaker column) AS ROWNUM,
    FROM  OLTPData
    SELECT * FROM Q WHERE ROWNUM=1

  • Date and Time Issue.

    I have date and time with different format , Need in Single date and Time format.
    Input
    13/03/15 09:09
    13/03/15 07:39
    13/03/15 08:09
    13/03/15 08:51
    3/13/15 09:39:14 AM
    3/13/15 09:38:14 AM
    3/13/15 09:37:59 AM
    3/13/2015 09:37:59 AM
    Problem with the below Output
    01/01/01 12:00 AM
    01/01/01 12:00 AM
    01/01/01 12:00 AM
    01/01/01 12:00 AM
    13/03/15 09:39 AM
    13/03/15 09:38 AM
    Output required in the below format for all of the above date and Time with proper date & time
    13/03/15 09:39 AM

    Indudhar,
    I don't know if the following will help or not, but hopefully you can see what I'm doing and modify it to give you the string format of the DateTime the way you want it:
    ption Strict On
    Option Explicit On
    Option Infer Off
    Public Class Form1
    Public Enum DateTimeFormat
    LongDateLongTime
    LongDateShortTime
    ShortDateLongTime
    ShortDateShortTime
    LongDateOnly
    ShortDateOnly
    LongTimeOnly
    ShortTimeOnly
    End Enum
    Private Sub Form1_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles MyBase.Load
    ' Test it here...
    Stop
    End Sub
    Private Function GetFormattedDateTimeString(ByVal dt As DateTime, _
    ByVal formatType As DateTimeFormat) As String
    Select Case formatType
    Case DateTimeFormat.LongDateLongTime
    Return String.Format("{0} {1}", _
    dt.ToLongDateString, _
    dt.ToLongTimeString)
    Case DateTimeFormat.LongDateOnly
    Return dt.ToLongDateString
    Case DateTimeFormat.LongDateShortTime
    Return String.Format("{0} {1}", _
    dt.ToLongDateString, _
    dt.ToShortTimeString)
    Case DateTimeFormat.LongTimeOnly
    Return dt.ToLongTimeString
    Case DateTimeFormat.ShortDateLongTime
    Return String.Format("{0} {1}", _
    dt.ToShortDateString, _
    dt.ToLongTimeString)
    Case DateTimeFormat.ShortDateOnly
    Return dt.ToShortDateString
    Case DateTimeFormat.ShortDateShortTime
    Return String.Format("{0} {1}", _
    dt.ToShortDateString, _
    dt.ToShortTimeString)
    Case DateTimeFormat.ShortTimeOnly
    Return dt.ToShortTimeString
    Case Else
    Return String.Empty
    End Select
    End Function
    End Class
    I hope that helps. :)
    Still lost in code, just at a little higher level.
    No Frank, Same Problem.....Kindly help me  X1 = 14/03/15 19:30
    I need time Diff of now and X1
    Dim myDateTime As DateTime = GetFormattedDateTimeString(X1, DateTimeFormat.ShortDateOnly)
    myDate = myDateTime.ToString("dd/MM/yy")
    myTime = myDateTime.ToString("hh:mm tt")
    Dim myDateTime1 As DateTime = Now
    Dim myDate1 = myDateTime1.ToString("dd/MM/yy")
    Dim myTime1 = myDateTime1.ToString("hh:mm tt")
    Dim diff As TimeSpan = myDateTime1.TimeOfDay - myDateTime.TimeOfDay
    Dim diffString As String = String.Format("{0:00}:{1:00}:{2:00}", _
    Math.Abs(diff.Hours), Math.Abs(diff.Minutes), Math.Abs(diff.Seconds))

  • How to know date and time information from Trace File defaultTrace.X.trc?

    Hi, all.
      i'm using EP 6.0 SP9 patch 1.
      As you know, default trace is written in the <SID>\JC00\j2ee\cluster\server0\log\defaultTrace.X.trc.
      By using the default trace formatter, it shows like the following sample messages.
    #1.5#0011110E7B2000590000000100000A100003EC71562E6EBC#1104396451585#com.sap.jms.server.ServerClientAdapter##com.sap.jms.server.ServerClientAdapter#Guest#18####716257115a3f11d9b73b0011110e7b20#SAPEngine_Application_Thread[impl:3]_23##0#0#Error#1#/Applications/JMS#Plain###JMS internal error at ServerClientAdapter! JMS Service is not started!#
      My questions are
      1. how do we retrieve the date and time information from the above message? It seems that this message has date and time info because LogViewer shows the date and time based on the above message.
      2. how do we change the above date format to easier one
    like "YYYY:MM:DD:hh:mm:ss"? i know that it can be configured from the Visual Admin --> Services --> Log Configurator but i don't know the exact place for the trace file.
      Thanks.

    Hi Sejoon,
    I use the standalone Logviewer to read the log files. Works great.
    "If you have an SAP Web Application Server Java 6.20 or below you may also get a standalone_logviewer.zip file at the SAP Service Marketplace at service.sap.com/download &#8594; SAP NetWeaver &#8594; Release ‘04. In this case JDK version 1.3 or higher must be installed on the system. The java version must be same on the server and the client.
    In the SAP Web AS Java 6.30 installation a folder named logviewer_standalone can be found under: <path Of J2EE installation>/<SysID>/JC<nr>/j2ee/admin/logviewer_standalone. Verify that the batch file logviewer.bat is installed in the directory logviewer-standalone.
    (source -> http://help.sap.com/saphelp_nw04/helpdata/en/e4/540c404a435509e10000000a1550b0/frameset.htm)
    Best wishes,
    Noel

Maybe you are looking for

  • Application shortcut for bookmarks toolbar not working on firefox for mac

    OS X allows users to assign shortcut keys to arbitrary menu items. I'm trying to add an application shortcut to firefox to show/hide the bookmarks toolbar (in my case, I'd like to use cmd-ctrl-L, but I've tried others too), however the shortcut key d

  • Showing start and end time in month view?   And email like notifications ?

    1- How to you set event so that they show the start and end time in month view? 2 - I have a little "1" on my iCal icon in the dock what does that mean? There is also a little one in the line of one of my calendars? I know I should know this but I am

  • Error when doing importing with impdp

    Hi, I tried to do export then import the schema from and to same schema. However, when doing export with expdp everything was okay. Problem begins when I tried to do importing by using impdp. I also tried to drop the current schema and created the ne

  • Installer Error of LabView Run Time Engine 6.0.2 "premature"

    I cannot Install the LabView Run Time Engine on a Computer which runs on Windows 2000. The Installation breaks on start with the Error Message: "Installation ended premature, because of an Error!" Does anyone know what to do is ? Thanks for Help

  • Oh no. nano not working. please help!

    i hadnt used it in a few days and when i got it, it wouldnt turn on. i quickly got scared and used the five Rs. still nothing. all i see on the screen is what seems to be an ipod Diagnostics menu, so it says. plus it is very very faint. you have to l