Formula variable in structures

Hi,
My report displays material wise (With Hierachy) actual ,budget,LE Quantities in YTD, QTD.(  I used Structures.)
I am using 2 formula variables  to derive no of working days in month, no of working days gone based on the given input selection variable date(sy-date). formula to find % month gone (i.e no of working days gone/no of working days in month *100)
I used the variable exit code and derived properly ,It is coming fine.But  I have to display this values only once in the report.
If I use one more structure actual selection variable is itself is not coming when i execute the report.
Could you please suggest in this issue.
Thanks ,
Joseph

Hi,
Please read the following:
BEx Query Designer: Creating formula variables
You have loaded data into your InfoProvider. To be able to use sign reversal in reporting, you have to define a formula variable in the query definition:
       1.      You are in the Query Designer. Under Key Figures, use the context menu to choose New Formula. The Formula Builder opens.
       2.      Under Formula Variables, choose New Variable from the context menu. The variables wizard appears.
       3.      Enter a name and a short text for the variable. Choose Replacement Path as the processing type.
       4.      Choose your hierarchy basic characteristic.
       5.      Choose Hierarchy Attribute as the replacement. The attribute Sign Reversal is automatically displayed.
       6.      Save your formula variable. When defining the formula variable, you get the factor 1 or –1, with which you can multiply the required key figure.
Regards,
Subha
If you find it useful, pleae grant me points

Similar Messages

  • BEx Analyzer: Formula Variable with Replacement path change Month with Day

    Hi experts I'm facing this issue in BEx Analyzer.
    I need to have some dates in format DD/MM/YYYY in Index Structure, in order to do this I've created a formula variable with replacement path referenced to 0CALDAY characteristic.
    The formula works but it behaves in a strange way:
    if the day is higher than 12 the displaied result is correct (DD/MM/YYYY)
    if the day is lower or equal 12 the displaied result is wrong (MM/DD/YYYY)
    I'm on BW 7.01 SP6 and BEx Analyzer 7.10 SP12, excel 2007.
    anybody has faced this issue before?
    any help will be appreciated
    Daniele Cortopassi

    Hi Daniele,
    This seems pretty strange. Pls. redo validation with the dump data, as being a flat struture BEx does not apply any logic changes. May be it might have been MM/DD/YYYY format as in workbooks. Else you may change the property of 0calday display as "Text". Business Explorer > Display > KeyMaster Data/Texts > Texts (Plese check this option). If you are using some text table you may maintain the same using BI0/TCALDAY (Similar to BI0/TCALMONTH2). Guess it should be an excel based issue; if not you may try the same in WAD/Report designer to verify the nature of the issue. If you don't face these inconsistencies in WAD/RD then you may change excel formatting options. Lastly, please let us know if the infoobject has some predefined settings in RSA1 > Infoobject > (BEx) Properites.
    Thanks,
    Arun Bala

  • Regarding Calculated key figure on Formula variable.

    Hi Gurus
    I have a requirement. My business scinerio in E-recruiting is to find out no of days between requistion creation date and offer made date in each month of year.
    For example we have around 120 requistion created in calyender year .
    10 requistion in jan , 10 in feb , 10 in march , 10 april , ...........10 december.
    my client wants out put as
    jan       no of days between offer made date to requistion creation date.
    feb             ,,
    march        ,,
    april           ,,
    may           ,,
    june           ,,
    july            ,,
    december    ,,
    i have requistion , req creation date ,  offer made date , cal period , cal year , no of requistion in my data model.
    i am unable to this report.
    i have made structure in rows
    jan = no of requistion based on calperiod = 1,
    dec = no of requistion based on calperiod =12.
    in Columns
    i created a calculated keyfigure based on formula variable with replacement path of req created date and offer date.
    i am not getting the data. my guess is i went some where wrong. please give some advice where i am going wrong . plz help me on this
    thanks
    roopa

    Hi
    Thanks for your reply.
    Both req creation date and offered date are in the free characteristics of query.
    main problem for me is how to get no of days between offered date - req creation date in jan month.
    can you give me exact formula how to write it down in query builder
    <b> hi Banu ( Queen of reporting ) can you through ligth n this issue</b>
    Thanks
    Roopa
    Message was edited by:
            roopa chow
    Message was edited by:
            roopa chow
    null

  • Creation of 4 new formula variable in bex.

    Hi All,
    i have one requirement from my customer.Can you please suggest me to achieve on this.
    All,
    Please can 4 new Formula Variables be created in SAP BW for all relevant structures
    Can the Pipe Test Date, Gas On Date, Completed Date and Abandoned Date be all based on Working days rather than calendar days
    My queries to the above requirements is:
    1.Do we need to write a code in customer exit(EXIT_SAPLRRS0_001) to achieve this.
    Please advice.
    Regards,
    Sakthivel S

    Hi,
    Do you have Working days field or data in your system? I think you are talking about Factory calendar.
    You can create 4 Formula variables by taking reference chars as Pipe Test Date, Gas On Date, Completed Date and Abandoned Date
    Yes, you need to write CMOD code to consider Working days.
    Can you explain requirement much more clearly?
    Regards,
    Suman

  • Formula variable not displayed in proper format

    Hai,
         I used a keyfigure formula variable, that gets current date, in a query (In columns, key figure structure to calculate no. of days). The no. of days are calculated peoperly and everything is just perfect.
    But after executing the query, when I display text element=> variables, the system is displaying the variable as 20,060,803 as opposed to date format like 8/3/2006.
    Question: Is it how the date formula variable is displayed or there is a system error?
    I remember seeing it in date format.
    Can somebody comment on this or suggest a solution.
    I couldn't find notes on this too!

    In the restricted key figure formula definition, use the Data function "Process Value as Date DATE" and enclose your restricted key figure calculation inside the date parenthesis.
    I have another related problem.  I am trying to use dates to calculate 30 days before a (date formula variable), 60 days after, etc.  Some of the dates are calculating correctly, but some are just returning an X.  All appear to be extracting with the same format.
    Anyone have a similar problem?

  • 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.

  • Formula Variable

    Hi Guys,
    I have o calculate no. of days as a difference between 2 dates. I can use Formula Variable to do the same. I however cant't have both the dates in my report (in rows). Hence Formula variable doesnt work.
    Any other work around guys?
    Cheeers
    Kirk
    I promise to award points for all the helpful answers.

    hi,
    fo clarification:
    is it tht u cannot keep both the dates in rows or u cannot keep both the dates in the same query.
    if 1 dates is  in rows and another in column and if the formula variable(needs to be displayed only in columns)then u have one solution...
    to use :'Cell definition'.
    for this we need 2 structures.
    Create a structure in rows with selection date1 .
    create another structure in columns with the formula variable and date2.
    then press on define celll on the top bar of query design...and type ur formula in the intersection.
    if this is not wht u want ....
    mail me a screen shot with the description.
    id:[email protected]
    reward points if it helps.
    regards,
    Dhanya.

  • Is it possible to use charecterestic used in formula variable

    Got a boolean logic in a formula of the  structure in BEx, i could create a formula variable for date , it works .However, i have to bring payment method into the logic ,( e.g.. if the payment method is 'C'-weekly then late payment logic is different then if it is not weekly) , Any idea how to achieve this in BEx.

    You could create a key figure that always displays a fixed value example 1.
    You then restrict this individual key figure to payment method C.
    The key figure is now only 1 for payment method C.
    In your calculation you now say: if key figure = 1 then ... else ...
    If statements are not directly possible, you can only do if statemements indirectly by a similar formula:
    (key figure = 1) * value
    if key figure is one -> result of (key figure = 1) is 1
    1 multiplied by value = value
    if key figure is not one -> result of (key figure = 1) is 0
    0 multiplied by value = 0
    You now have an indirect if clause.
    Please assign points if this solved your problem,
    Best Regards,
    Filip

  • Problem in Formula in a structure

    Hi...
                 I have to define a formula in a structure. This has to pick up the version value from the selection criteria. When I use the Version alone in the formula I am able to run the query and it reads the version value , but when I use it in an expression along with other variables I get a message while executing the query that it is not able to recognize the version and in the report I get the variable itself in the header instead of the value of the version.
    Can any one please help me with this.
    Regds
    tanu

    Hi,
    To create this scenario, you need to create a query like this.
    Year     -
    PlnQty-ActQty-CKF1(PlnQty * ActQty)
    2007             -
    100-----30--
    3000
    2007             -
    200-----50--
    10000
    (2008 - 2007)----200---50--
    The collision occurs in the righthand bottom corner.
    To get this scenario, Keep the keyfigures in the columns as usual.
    But in the rows, you should not place the characters directly. Rather you have to create a structure.
    1) Create a structure.
    2) Right click on structure -> New selection -> Filter on year 2007.
    3) Create another selection for 2008.
    4) Create formulae ( 2008 - 2007 ).
    Here in the advanced properties, you will be able to see formulae collision settings and you can select whether this formulae should be used in the output or the competing formulae which is mentioned in the columns.
    Thanks,
    Krishnan

  • Formula Variable - Key of Cost Element (Query crashing)

    Hi everyone,
    I have created a formula variable which returns the Key of the Cost Element (0costelmnt) which resides in a Key figure structure. I have used this in a number of formula (If Cost Element = 50000 * (A * B) and its working fine.
    Formula Variable
    Formula Variable Properties
    My issue is that this query crashes constantlywhen you are in the Query Designer in both our Dev and Production environments, yet the query runs fine in the Analyser.
    The only thing I note is the icons in the key figure structure, some squares which are standard key figures / formulas and formula variables but my Cost Element Form Vari and the Bonus and Salary Increase Formula variables are represented by a triangle which normally means characteristics!!
    Any suggestions?
    With thanks
    Gill

    They query runs perfectly,  there are no null values in the output.
    I have already regenerated it and no change.  I do not have an issue with the output so RSRT is going to give me the same results as I get in the Analyser.
    The issue I have is that any changes I make in Query Designer, the programs shuts down.

  • BW 3.5 - Issue with formula variable with replacement path

    Dear experts,
    I'm facing an issue with formula variable with replacement path.
    Just to clarify, I know replacement paths is raising a lot of questions but I've been using this functionnality extensively in the past, both in 7.0 and 3.5, so I'm not looking for basic information about how to use it.
    I'm trying to setup a simple report that would show total values per plant of Purchase Order < 100 €
    To do so I've setup a calculated key figure as follow:
    VAR1 * ("PO value" < 100 ) * "PO value"
    VAR1 is a formula variable with replacement path on 'purchase order' and value attribute 'constant =1'.
    (The report has to show values summarized by plant but should not show the detail PO by PO, so I'm not looking at a solution based on condition)
    The report as characteristic "plant" in rows and my CKF in columns.
    Now let's take an example. I have 3 POs in Plant 1:
    PO1 -> 150€
    PO2 -> 90€
    PO3 -> 80€
    Because of the variable with replacement path, the result in my query should be:
    plant1 = 170 (even though characteristic "purchase order" is not in my rows, system should evaluate PO one by one and return values only for those two that are below 100).
    But the result coming is 320, which is wrong.
    I've done the same report on many other 3.5 systems and it worked perfectly, and I am not able to get proper support from SAP OSS who keep saying that this functionnality is not ready in 3.5 (although I've provided screenshot of this working on another 3.5 system!!! how frustrating...)
    They have also pointed to problems of Before and After aggregation but that has absolutely no impact. Once again, the scenario is working perfectly on other 3.5 systems with the same query design, so i'm sure it has nothing to do with Query Designer options.
    Would anyone have ever come to an equivalenet problem? I'm wondering whether the DB itself could not play a role in the variable with ref  characteristic 'constant =1' ...
    Any though is welcome!
    thanks

    Hi,
    The text variable is replaced when the exact date is clear for this key figure column according to the restriction.
    To achive this, please make sure that either the variable is directly restricted in the key figure selection, or that the date characteristic is in drilldown.
    Regards,
    Patricia

  • Error in creating Formula Variable

    Hi All:
    I'm having problems in creating formula variable. Trying to create FV on a characteristic using replacement path with attribute value , but the wierd part is it's not giving me any attributes it's just blank. Any help would be appreciated....
    Thanks,
    Manasa.

    Right click on the FM, create -> Characteristic -> attribute value -> but the attribute are not showing up.  This happens if the attribute is of key figure type. I was able to do this in another system (ASIA DEV) but now trying in Europe Dev.

  • Formula variable in Report painter

    Hi
    Normally when ever you create a formula varibale for year or period system will
    check the period and year from current system year and period(S001 and S002)
    I am looking for a solution where i can create variable which is independent of
    current year and period.
    Lets Say if i give 2006 and period 7(of 2006)system has to give results
    in the predefined columns like 2006 of period 7 and 2005 of period 7 and 2004 of period 7 and 2003 of period 7(I have 4 columns)
    Can any one tell me how to create this using the formual variable,which will allow
    me to select in the input screen any period and year and display the results  as per my own requirement.
    Thanks
    Lily

    Hi Ramachandra
    Sorry for late reply
    As per your reply,i am not still clear,can i put in more clear my question again
    Selection screen 
    Year-2006
    Period-6
    I have 5 columns ,can you specify me the formula for 5 columns in your reply.
    Column1- (it has to display 2nd  quarter of 2006)
    Column2-(it has to display 1nd  quarter of 2006)
    Column3-(it has to display 4nd  quarter of 2005)
    Column4-(it has to display 3nd  quarter of 2005)
    Column5-(it has to display 2nd  quarter of 2005)
    Pls specify me FYEAR and Period from and period to which formula variable i need
    to use,how many variables i need to create for this purpose.
    Keep in view that selction screen i can give 2006,or 2005 or 2007,but system has to display 5 quarters back data in in 5 columns.
    This is urgent,can you pls help.
    Thanks
    Lily

  • If condition in Formula variable

    Hi forum,
    Can anybody please help me write the formula below in formula variable.
    *If A >=0
    then
    result = (A/B100365)
    Else
    result = (A/B100365-1)
    Thanks in advance for the efforts.
    Regards,

    (A>=0)(A/B100365)+(A/B100365-1)
    do a formula check.
    Khaja

  • Default Value in Formula Variable - Inconsistent behaviour

    Hi,
    I am facing a very strange issue in a formula variable.
    I had created three formula variables with default values and the user (Power user who has the Bex access) was able to change the default value themselves for two of these variables.
    Now he wants to change all the three, so I have tried to check the issue and changed all the three for testing purpose.
    Now, he is unable to change any of them!!! Sad, now I cant even say that "You dont have the Auth to do so"
    Any clue? Anyone has faced similar issue.
    Any thoughts are highy welcome! Suddenly users wants to get this one URGENTLY, usually he used to access the report once in month. Now he wants to use the same once in half an hour
    We are on BI 7.0 with SP 24
    Any thoughts PLS
    Regards

    hi,
       probably you can refer to SAP Note 1413030 - SAPBWNews NW 7.x BW Add-On Frontend Patch 1300 - GUI 7.10 or maybe  SAP Note 1294382 - SAPBINews NW7.0  BI Add-On Frontend SP900 - GUI 7.1 that might help you in sorting out your problem, plus you can buy more time from the user as well
    regards
    laksh

Maybe you are looking for