Formula variable for date in report

Hi All,
I have to display the last date value of a particular date in the report.
For a better understanding,
I have Customer, Equipment, Service date, Amount
In the report, I have to display
Customer, Equipment, Last Service date, Last Service Amount.
I have created a formula variable (Formula variable for Service date) for Service date with Replacement path.
Replace Variable with Infoobject, Replace with Key, Dimension dates.
And in Key figures, I have created a formula (Last Service date) with Last value in the Aggregation using the "Formula variable for Service date".
The Last Service date is displayed as 'X' in the report since the Service date is not in the row. I cannot have the service date in the row either (not even by hiding the display).
Kindly tell me how to rectify this problem.
Thanks and Regards
Adhira Anand.

The X is appearing because, with the drill downs you have added, you have more than 1 date value to choose from when you attempt to aggregate.
Have you tried using APD instead of exception aggregation?
Have you built the exception aggregation calculated key figure globally or just locally (i.e. as a structure element)? It must be built globally to work properly.

Similar Messages

  • Formula Variable for Date/year not possible

    Hi, I have a query where I want to create a formula variable for a year that I can use in a user exit to populate other variables.  When I go to create a formula variable there is not option for a date or year variable.  I only see Amount; Quantity; Price; Number.  Is it possible just to create a formula variable for a year input without having a year time characteristic in the query?
    Thanks!

    I just ended up creating a Formual Variable as a number.  Thank You

  • Formula variable for dates

    Hi gurus,
    I am trying to fill a formula variable of type date via manual entry, but I cannot find which is the correct way to do it. I can introduce any other type of data (amount, prices...) via manual entry but I can´t do the same with dates. Any help about this??
    Thanx.

    Hi Ortiz,
    You can do it like this:
    1. Create one variable based on any date field.
    2. In you query In column create 1 selection, restrict any key figure with this variable (created above). In display property set Hide.
    3. Create 1 formula variable with processing type customer exit and choose dimension as date.
    4. Now in CMOD, write the below code for your formula variable:
    Suppose the source variable name is ZDATE1,
    Forumla var name is ZFinal_date
    Code it like this:
    when 'ZFinal_date'.
    READ TABLE i_t_var_range INTO wa_value WITH KEY vnam = 'ZDATE1'.
            wa_range-low    = wa_value-low.
            wa_range-opt    = 'EQ'.
            wa_range-sign   = 'I'.
            APPEND wa_range TO e_t_range.
    Now u will get the date inputed value in your formula cariable.
    5. Create 1 CKF and do the subtraction in there:
    if ur key figure name is KF1 then type forumal as:
    KF1 - ZFinal_date.
    Hopefully u wil get the desired output.
    Thanks
    Dipika

  • Formula variable for date calculations with date-characteristics (2004s)

    Hi SDN,
    I'd like to calculate the number of days between to date-characteristics. In 3.5, I was used to create 2 formula variables of the type 'replacement path', with 'date' as the dimension indicator. In my formula, I used the 'proces value as date' function for each variable, and I could perform calculations with them.
    I'm trying to do the same in 2004s. However, I can't create replacement path's with 'date' as a dimension indicator. So I use 'number' instead, but it doesn't work: my query shows 'x'.
    I can use the variables that I created using the 3.5 query designer as a workaround. But I hope there is a better solution.
    If other people experience the same problem, please respond. Then I know it's probably a bug.
    Kind regards,
    Daniel

    Daniel,
    Try to look at the formula variables defined before the upgrade and see what is different to the newly defined. I am guessing just the terminology used is different.
    If not the date value might be blank or something for one of the f-variables used. Try to display the formula variable values as KF in the query results and check what it is showing.
    I hope this helps.
    -Bala

  • Formula variable for a user input DATE value

    Hi All,
    I want to create Formula variable for a user input DATE value as I need to use it in a formula to compare between user entry date & date in the DSO. Does any body has any idea about it?
    I tried to create formula variable with manual entry but then I am not getting DATE option.
    Regards,
    Sonal

    Hi ,
    You have to create a formula variable in the formula.
    The formula variable in the general tab would have the reference characteristic as your date characteristic on which you have created a user entry variable or on which you intend to create a date entry variable.
    Give the proceesing type as replacement path.
    Next in Replacement path mention you would replace the variable with value of another variable.
    Mention the variable name.(This is the actual varaible created on the selection screen),
    Also mention you would replace only from value/to value of the variable.
    Check the following help link
    [Replacement path type formula variable|http://help.sap.com/saphelp_nw70/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm]
    Hope this helps,
    Best regards,
    Sunmit.

  • Create New Variable for COPA Drilldown Reports in KE3E

    Hi,
    How can we create a formula variable for COPA Drill down reports in KE3E? In standard global variables formula variable is not avaiable, I need to create a formula variables like ...from period, to period, last fiscal year and next fiscal year..
    While creating report in KE31/KE35 trying create local variables, but it doesn't.
    Can any body advise how can we create a new variables for  "from period, to period, last fiscal year and next fiscal year.."
    Thanks
    VS Rao

    Hi Rao
    For Period (From &To)
    1. KE3E
    2. Type of Var = Char Value
        Enter variable name, say, ZPERIOD
        Field Name = PERDE
        Replacement type = Entry
        Enter Description
        Parameter/selectop = Selection Option
    For Fiscal Year
        Type of Var = Char Value
        Enter variable name, say, ZGJAHR
        Field Name = GJAHR
        Replacement type = Entry
        Enter Description
        Parameter/selectop = Parameter
    For Next and Last Fiscal Year
    When you define your form in KE34/KE35
    Use the variable ZGJAHR in your report
    In the column for Next Year, Enter "ZGJAHR+1" as the local variable for GJAHR
    In the Column for Last year, Enter  "ZGJAHR-1" as the local variable for GJAHR
    Regards
    Ajay M

  • Need a Syatem variable for Executing the report by RFC.

    Hi Experts,
    Need a Syatem variable for Executing the report by RFC.
    what i mean to say is,i can execure the report directly ...then no issues.
    But if i execute the Report by RFC ,then i should put a condition with system variable...
    Please suggest me ,how can put a condition when i am executing the report through RFC.
    Thanks
    Babu

    Hello Friend,
    what I understood that you want to put some extra condition if that report is getting called from RFC...
    you can use the system variable SY-CPROG....it will hold the value of the report when it is geeting executing directly...
    but when it is getting executed therough RFC...it will hold that RFC name...
    Thanks
    Krish

  • Sytsem Variable for Check Register Report

    Hi all.
    Does any one know which Sytsem Variable for Check Register Report that will show the total for the FC amount.
    The one on our report now shows the System Variable 62 which is system currency

    Hi,
    I believe there is no other System Variable for Check Register Report.  It is because you can have many different currencies within the same report.  Just like Multi-currency BP, only LC can be used.
    If you check system information on the screen, you could also find this variable 62 there.
    Thanks,
    Gordon

  • Formula Variables for Report Painter

    Dear Experts,
    I have a Report Painter Report which displays month wise report in columns and now i want the report to be displayed based on the period mentioned in selection screen.
    Can someone please advice how do I do the same with use of Formula Variables.
    Regards,
    Rahul

    Go to the selection screen and press F1 and go to technical details to name the name of the screen field. example: 8A-VON (period from) and 8A-BIS (period to).
    In your report designer, you enter the those variable for the "period" characteristic and tick the variable ON/OFF checkbox.

  • Formula variable using date char - unable to use conditions

    Hello Experts,
    I am sure I am making a silly mistake here - but after spending lot of time I am unable to rectify this - please help if you can:
    I basically want the report to show only latest employee actions for a selected period (usually month).
    1. I am using formula variable that is based on 0CALDAY and defined as number.
    2. A calculated keyfigure uses this formula variable. Both calculated keyfigure and CALDAY char are included in the report / navigation.
    3. There is a condition defined using calculated keyfigure. No matter what logic I use, I just cannot use calculated keyfigure to filter records on the report. My original idea was to use Top N - 1 with char combination as 'Employee' to get me the latest employee records for each employee.
    Can anyone help spot where I am going wrong?
    Thanks.

    I haven't looked at that, but as a first guess idea- why not use the picker to get a date, then save it as a number of seconds from a given date?
    See:
    dateWithTimeIntervalSince1970:
    Creates and returns an NSDate object set to the given number of seconds from the first instant of 1 January 1970, GMT.
    + (id)dateWithTimeIntervalSince1970:(NSTimeInterval)seconds
    Or you could store it as a string, but I think the number would be easier.

  • Formula Variable for Current Time

    Friends,
    Is there any standard formula variable available to display Current Time in Report??..like we have 0F_ADAY to display current date..
    Thanks in advance..
    Regards,
    Yog

    I am not sure that standard fomula variable existed for the current time. But
    you can create a formula variable with customer exit processing type. Then write an exit with SY-UZEIT. you will get the current time.
    Hope it helps.
    Veerendra.

  • Replacement path variable for date not working

    We have a formula variable using replacement path (BEx 7.0) for a date field and after that we have calculated key figures to perform date difference calculations.
    This was working perfectly well until recently when the calculated key figures displayed an "X" instead of the value.
    The value seems to appear only when the date fields are drilled down in the report.SO this works like a formula instead.
    Is this just an unnatural case where something just stopped working ?
    We have checked the calculated key figures and the formula variables , they havent been changed in the recent past.
    Is there any other solution you could offer to get date differences without having the date fields in the rows ?
    Edited by: ABCD on Jul 29, 2009 2:28 PM

    How to use Replacement Path Variables to perform Date Calculations
    A Step-by-Step guide
    Have you ever wanted to perform calculations using dates defined as characteristics but have never worked out how it can be done? Replacement Path Variables are the key.
    Using Replacement Path in your Text and Formula variables, replace values held in a characteristic. The Characteristic value variables are replaced by the results of a query at run-time.
    The steps detailed below show a technique to enable a BEx query user to determine the number of days between two dates.
    Scenario:
    The group HR administrator wants a detailed line item report that lists all employee absences in a given period. The report is to show the employee number, the absence start date, together with the end date of the absence and show the number of calendar days the employee was absent.
    The good thing about using this technique is that no redesign work is needed from your technical BW team, no ABAP is involved and best of all, it quick and easy.
    Solution:
    For this example I created an ODS object called Absence that holds basic employee information along with individual absence record data.
    Follow the steps below:
    1.     Open the BEx Query Designer and create a new report on your chosen InfoProvider.
    2.     Drag the Employee, Valid from and Valid to characteristics into the Rows section of the screen.
    If needed, apply data selection restrictions to the characteristics as shown in Figure 1.
    3.     Right click on the Key Figures structure and select New Formula (Figure 1).
    Figure 1
    4.     
    5.     In the new formula window right click on Formula Variable and choose New Variable ( Figure 2 ).
    Figure 2
    6.     
    7.     The Variables Wizard will launch and will require you to specify the variable details.
    ( Click the NEXT button if the Introduction screen appears )
    8.     Enter the variable details on the General Information as shown in Figure 3 .
    Enter the Variable Name , Description and select Replacement Path in the Processing by field.
    Click the Next Button.
    Figure 3
    9.     
    10.     In the Characteristic screen (Figure 4) select the date characteristic that represents the first date to use in the calculation (From Date).
    Click the Next Button.
    Figure 4
    11.     
    12.     In the Replacement Path screen (Figure 5) select Key in the Replace Variable with field. Leave all the other options as they are (The offset values will be set automatically).
    Click the Next Button.
    Figure 5
    13.     
    14.     In the Currencies and Units screen (Figure 6) select Date as the Dimension ID.
    Click the Next button.
    Figure 6
    15.     
    16.     The Save Variable screen (Figure 7) displays a summary of the new variable.
    Click on the Finish button to save the variable.
    Figure 7
    17.     
    18.     Repeat steps 4 to 11 to create a second variable for the second date to be used in the calculation.
    In the example shown, the characteristic 0DATETO is used to create the variable ABSEND (Absence End Date).
    Define the Calculation
    We can now use our two new replacement variables to define our new calculated key figure that generates the number of absence days for each record.
    1.     You will now be back at the New Formula screen (Figure 8). Drag and drop the two new variables into the formula section of the screen and insert the subtract sign (u201C-u201C) between the two.
    2.     Give the new formula a description and click the formula syntax check button  to ensure the formula is valid.
    Figure 8
    3.     
    4.     The new calculated key figure will now show in the columns section of the BEx query designer (Figure 9).
    Figure 9
    5.     
    6.     Save the query and execute it.
    In the example shown the Number of Calendar Days Absent is calculated correctly. See the table of results below.
    Employee     Valid From     Valid To     Number of Calendar
    Days Absent
    50000001     17/04/2004      21/04/2004      4
    50000002     16/07/2004      29/09/2004      13
    50000003     07/01/2004      09/02/2004      33
    50000004     04/08/2004      05/08/2004      1
    Cheers:)
    Vivek

  • Formula Variable for Each Row

    Is there any way to make the formula variable take different values for different rows in a given report?  Our requirement is that each sales division in US will be approved of a certain percentage of rebate that it can use.  In the report one should see the net sales value after considering the % rebate.  For e.g., US has East, West, South, Central and Midwest Sales Divisions.  There are 5 product lines, prod1 to prod5.  The client will maintain a Z table for all the combinations of Sales division and Product line (i.e., East & prod1 - 10%, East & prod2 - 3%...  Midwest & prod5 - 5%).  Actual sales done in each sales division will not have these rebates considered.  So at the corporate level when the report is executed, the query should be able to apply the corresponding values to the actual sales.  Is it possible with BEx?  As far as I know, the user exit is not executed for each row.  Hope I was lucid enough to explain the problem at hand and if anyone has any effective ideas on this issue, please post your thoughts here.  Thanks a ton in advance.
    IS

    Hi,
    I doubt that you'll be able to do it in BEx.
    The easiest way is to include a rebate into your infoprovider.
    Best regards,
    Eugene

  • Condition formula variable on date key figure

    Hello, I would be grateful for any help on this
    I want to have a condition that has a user input formula variable
    But the Key Figure on which I want to base the condition is a Date
    And when you create the formula variable it allows only the following Dimensions :
    Amount
    Number
    Price
    Quantity
    ie Date is not one of the allowable Dimensions - is there any way round this apart from an Exit variable ?
    thanks
    Jon

    Hi,
    You have to create a formula variable with replacement path based on the date you want.
    so that you can get the date for calculation.so you can apply condition.
    check the following link
    http://help.sap.com/saphelp_nw04/helpdata/en/03/6ba03cc24efd1de10000000a114084/content.htm
    Regards,
    Ranganath

  • Formula variable - Maximum Date in result output

    Hello Guys,
    Scenario -
    Data in Cube
    *Reseller      Sales Date*
    RS1          01.01.2010
    RS1          01.01.2011
    RS1          01.01.2012
    RS2          01.01.2008
    RS2          01.01.2009
    RS2          01.01.2010
    Required Output - Display one record for each Reseller with recent Date.
    *Reseller      Sales Date*
    RS1          01.01.2012
    RS2          01.01.2010
    What I did till now --->
    Created a Formula and included a Formula Variable (replacement Path ref char - Sales Date) hence I got the date as keyfigure.
    Reseller      Sales Date     Sales Date Formula
    *RS1          01.01.2010     201,00,101*
    *RS1          01.01.2011     201,10,101*
    *RS1          01.01.2012     201,20,101*
    *RS2          01.01.2008     200,80,101*
    *RS2          01.01.2009     200,90,101*
    *RS2          01.01.2010     201,00,101*
    For the Sales Date Formula (Calculation tab - Calculate result as Maximum) to display the result as maximum.
    The issue is that when I remove the Sales Date from Drilldown the Sales Date Formula display X. I was expecting the result row to be displayed i.e  the maximum value for RS1 and RS2.
    Can you guide where I am going wrong... or any other method to achieve the above output is appreciated.
    -Amit

    Hi,
    Through replacement path you can achieve this.
    On row side put *Reseller.
    on Column side create a formula(and  on Aggregation Tab: Exception Aggregation: Last Value, Reference Characteristics: Sales Date)
    and there create formula variable and use replacement path.
    Details
    Type of variable: Formula
    Processing By: Replacement Path
    Reference Characteristics: Sales Date
    Replace variable with: InfoObject
    Replace With: Key
    Dimension: Date

Maybe you are looking for

  • Anyone here use the Camera / Framing behavior?

    I have a project with a few video clips in a 3d group. When I set one of the clips as the target of a camera's framing behavior, it doesn't frame the target. Rather, something waythehell off in z space. Sometimes the framing does catch the right targ

  • I can't install Itunes 7.4 or higher can anyone help me?

    Ok I have tried to install itunes 7.5 and all the installation goes ok till I try to actually open the program. when I do i get the following message :could not find SCARDDLG.dll reinstalling the application might repair this. I did try to reinstall

  • Convert system date into mm-dd-yyyy format

    Hi everyone, I am developing an web application in jsp.In my application when a client enters his information like name,email etc, they are copied into the database.What i need now is at the same time the system date also has to enter into the databa

  • Directory view of sub-pages

    I have a request from my client that I am not to sure how to do. They want to be able to pull up a zip file with layers of folders and sub-folders. They want one of two possibilities: 1) Create one region that would contain the main folder. They clic

  • 10.6.4 Won't Install

    I have a Mid 09 13" Macbook Pro. I was running 10.6.3, and everything was working fine. I downloaded the update (10.6.4), using the automatic update tool, and proceeded to install it. However, the install hung. For almost the last two hours, it's bee