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.

Similar Messages

  • Can I use formula variable in description of a query

    Hello, I created a query to list top N of vendors by the number of PRs created using condition in the query. N will be entered by users according to what they like (could be, top 10, top 5...). My query works reasonable, but I want to use variable to have the query description changes to reflect the top number user wants to see. For example, currently my report name is "Top N Vendor of PRs". Is there any way I can let "N" dynamically changes everytime when user enter different N? "Top 5 Vendor of PRs", "Top 10 Vendor of PRs", .....
    Please help.
    Thanks.

    I am still struggling and need your help. Here is what I did:
    1. Created a formula variable, let's call "ZFM_VAR" from BEx. Processing by: Manually Input/Default Value. Choose YES for ready for input.
    2. Created a text variable called "ZTX_VAR" from BEx. Processing by: customer exit. Variable entry is Mandatory. Choose NO for ready for input.
    3. Wrote following code from enhancement EXIT_SAPLRRSO_001 include ZXRSRU01:
    data: w_i_t_var_range like rrrangeexit,
             l_s_range type rsr_s_rangesid.
    CASE i_vnam.
        WHEN 'ZTX_VAR'.
           IF i_step = 2. "after the popup
              CLEAR: w_i_t_var_range,l_s_range.
              READ TABLE i_t_var_range WITH KEY vnam = 'ZFM_VAR'.
                 l_s_range-opt = 'EQ'.
                 l_s_range-sign = 'I'.
                 l_s_range-low = w_i_t_var_range-low.
                APPEND l_s_range TO e_t_range.
          ENDIF.
    ENDCASE.
    After I am done the above 3 steps, I still didn't get the same value for ZTX_VAR as I entered in ZFM_VAR. When I run the function moduel in debugging mode, there is nothing in table i_t_var_range. Any ideas for what I missed or did wrong? If somebody can provide detailed instruction, that would be greatly appreciated.
    Thanks.
    Yingping

  • Formula Variable Error in BI7.0 Query Designer

    Dear All,
    I am getting the following error when using a formula variable with replacement path. Please help me on this.
    we are using BI7.0 SP level 13
    ABEND: Variable D30TEST0UIF40OXY0A5JZFO40 (D30TEST0UIF40OXY0A5JZFO40) does not exist or is incorrectly used 5OTGNQ295YVYORGW5NOBJ9NUP
    ABEND: Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION
    ABEND: Query ZFIGL_O02_Q002_7 could not be opened.
    Error when generating dataProvider
    Best Regards,
    SGK

    Hi Vikram
    It didn't seem relevant to my case but I downloaded it and it solved my issue.
    Thank you very much
    Shlomi

  • Variable : Key date of the query

    Hello Everyone,
    I would like to share couple of points with you all during this cool holiday season.
    I need to use variable for a  time dependent hierarchy. I have a variable and selected that. Again I want to restrict this hierarchy by using variable for key date of the query.
    I can select a variable for the hierarchy. But I am not able to restrict the hierarchy.  When I choose a varaible for "key date of the query" system responed with an error message ' For characteristic 0Date, enter value in permitted format'. So I am not able to select a variable for "key date of the query " and restrict the hierarchy to choose a node.
    Please share your valuable inputs.
    Thanks in advance
    RJ

    Hello,
    what is the variable name that you are using to restrict the hierarchy date?
    Regards,
    Daniel

  • Variable Authorizations for Cost elements (K_REPO_CCA)

    Hi everybody.
    I have a doubt regarding the posible options for an authorization on object K_REPO_CCA. Our system is R/3 version 5.0. Is it possible to create a variable, "$COST_ELEMENT" for example, and fill the values dinamically by a user_exit or maybe a z-program that reads in a Z-table??
    Did you know if this is possible?? If yes, do you know the user-exit??
    Many thanks and best regards.
    Ismael Bermúdez

    Hi,
    I would be really interested to find out more about what you did here.
    "<i>In fact at a client we determined the authorised cost centres at run time based on the users mapping to the HR org structure."</i>
    This sounds like exactly what we need at our organisation. We are a large company with around 40000 staff and have the following business requirement.
    - Cost centre reporting is expected to be hierarchical in nature but current Cost Centre structure in Australia is flat in structure.[/li]
    - Natural hierarchies already exist within the NAB by organisational structure: Total Company, Business, Zone, Region, Area and Branch.
    - As a high level requirement, cost centre data should only be available to the manager of the organisational unit that they are managing and any lower level organisational units. Managers should only be able to view their organisational unit costs or lower organisational unit costs. They should not be able to view cost centre data across structures (peer organisational units) or higher levels of responsibilities (parent organisational units).
    - The ability to access cost centre reporting data should take into account HR delegations and substitution processes. This also needs to take into account the granting of the correct authority to the delegated person to run reports.
    - One possible option is to utilise the A250 Cost Centre Manager relationship in SAP to facilitate the security for cost centre reports.
    I will be handling these requirements from a security perspective and would liike to achieve this without creating hundreds of roles and a maintenance nightmare.
    A finance version of structural authorisations would be good
    Any input would be greatly appreciated.
    Barb

  • BPS Variable-Cost Element is not displaying Text

    Dear Team,
    We have a peculiar issue one of the BPS Variable defined for Cost Element is not displaying text in one of the Planning Layouts.
    Another variable is displaying text in another layout.
    Surprisingly...when I reused the old variable in the new layout it is also not displaying the text.
    Am I missing something....appreciated your quick support.
    Thanks & Best Regards
    Srinivas

    Have you check the layout Lead-Column setting? Is it set to 'Key/Description'?

  • Difference between Formula, Formula Key Figure & Formula Variable

    Hi Experts,
    I have a basic question in my mind:
    1) What is the difference b/w Formula, Formula Variable, Formula Key Figure?
    2) What is the difference b/w Selection, Filter and Restriction?
    Can you pls explain with some scenarios? That will be helpful.
    Thanks in Advance.

    Hi,
    You are right, these are basic questions and can be learnt just by a little bit searching.So search the forum before posting such questions please.
    Nevertheless :
    http://wiki.sdn.sap.com/wiki/display/BI/CalculatedKeyFigure+RestrictedkeyfigureFilter
    http://help.sap.com/saphelp_nw04s/helpdata/en/61/d0b143aa26b849b4e79a859ea1d7d1/content.htm
    Scenario:
    You want to see the revenue that you get from Product A,B,C in the country of D and E.You also want to calculate a bonus value that will be given to distributors and this revenue will be calculated based on the user's input.E.g user inputs 5 and you give 5% of the sales to distributors.Then here, to get the input 5  and TO USE IT IN THE FORMULA ,you must create a formula variable.You also  must a have key figure revenue to see the revenue of course and a calculated key figure(or a formula) called bonus value = formula variable*revenue/100 to calculate the bonus which will be given to distributors.
    The other thing you must do is restricting product with A,B,C and country by D and E just by right clicking on them  in query designer.What remains is the selection.Let's say you also want to see the total sales of A and B.Then create a selection in the columns then restrict it by dragging and dropping A and B and the key figure revenue.
    By the way, filter(tab) is used to restrict the data coming from cube and affects everything in the report(in contrast to the restricting  selection, because restricting selection affects only the selection, not other fields of the report)
    Regards,
    Güneş BÜYÜKTANIR

  • Zero Suppression Not working in Bex Query with Formula Variable

    Hi Friends,
    I have a peculiar issue here. We upgraded from 3.5 to 7.0 recently. Some of our Bex queries have been behaving abnormally after this. In these queeries,
    we have some key figures which use formula variables (ready for input and mandatory) in 3.5. User can enter either 1 or 0. The actual key figure is multiplied to the formula variable so, the entire column gets the actual key figure value if the user enters a value '1' and the gets the value 0 if the user enters '0' in the formula variables. Zero suppression is activated on the rows and columns and this report. This technique was used successfully to show/hide a column.
    After upgrade, the same query works but, the zero suppression is not working. When the user enters a value of '0' in these formula variables, all the entries in the column for the key figure are displayed as 0 but the column is still displayed. It is like the zero suppression setting is not active at all.
    I created one of those queries in Bex 7.0 to see if that works but, the issue still exits. Have anyone come across this kind of a scenario? Please get back to me if anyone has any idea on this situation.
    Thanks and Regards
    Subray Hegde

    Which SP level are you at in BI 7? There is an OSS Note that would need to be applied if you're on lower than SP10. That note is:
    [OSS Note 964756 - Formula variables with replacement from difference in BI 7.0|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=964756]

  • Display Formula Variable in Web Query or RRMX

    Hi, 
         I'm calculating a Formula Variable for Shipping Days in my query.  I would like this to display in my web page in the upper right of my screen.   I'm mostly interested in doing this for the web.  How would I access the value of this variable and display it on the web page outside of the table web item?
    Any ideas are greatly appreciated!...
    Thanks,

    Hi,
    use the web item Text elements
    and specify your variable.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/4e9d39d44cd45ee10000000a11402f/frameset.htm
    Heike

  • Value from a formula variable into text variable in BEx Query

    Hello,
    if anyone knows how I can do the following please let me know:
    I have a formula variable in a formula (ZUM_KVAL). The value will be entered before execution of the query.
    Now I would ALSO like to display the entered value (from ZUM_KVAL) as at text variable (ZUM_KTXT) in the name of the field in the query/report.
    If anyone could provide me with info about how to do that, I'd appreciate very much.
    Thanks in advance.
    Cu, Stefan

    Hi Shashank,
        You can achieve this by creating a customer exit variable for calendar month.
    Function module :
    READ TABLE i_t_var_range WITH KEY vnam = 'Date variable name ' INTO loc_var_range.
       IF sy-subrc = 0.
        year = loc_var_range-low(4).
        month = loc_var_range-low+4(2).
         CLEAR l_s_range.
         l_s_range-sign = 'I'.
         l_s_range-opt  = 'EQ'.
         CONCATENATE year month INTO l_s_range-low.
         APPEND l_s_range TO e_t_range.
       ENDIF.
    Hope this will help you. Let me know if you have any questions.
    Regards
    Suvarna

  • Query Designer: Formula Variable

    Would like to check how to use the formula variable for key figures?
    I have created a formula variable and attached in the formula. How this variable be filled? I have given the properites as manual input but system gives exception error when query is executed.
    Error message..
    Variable 46LD342EI7BQ4XB6P1GLYDAL9 (46LD342EI7BQ4XB6P1GLYDAL9) was found in the query but in the meantime it has been deleted, or it has been used incorrectly.
    Formula variable- can be used in all cases. Note: Formula variables can have units or be without them. Incorrect use can also arise here since the system always calculates in accordance with the units. Formula variables can also be used to create the upper and lower limits in exceptions.

    Hi,
    I think your definition of your formula veriable is wrong.
    have you put the variable as input ready?
    gr
    Joke

  • Issue in query transport ( formula variable)

    Hi Experts,
    I have issue while transporting a query.
    I have created two formaula variables, with them created a calculated keyfigure.
    The transport of this query was failed with return code 8 with Error message 'Element 4XDRFT... is missing in version M'.
    Diagnosis:
    Element &1 in version &2 referenced but is not active
    System Response:
    The action had to be terminated
    Procedure:
    Please supply the missing elements to the system by a transport
    The two newly created formula variables are giving error with above message.It is showing these variables are missing in version M
    Can you please help me where i am missing and how to resolve this issue,
    Regards,
    Mohd.

    Hi,
    You did not collect all elements while transporting.
    Try to collect the missing elements in a new transport request and move.
    You can identify the missing Elements description from table RSZELTTXT.
    go to SE16 > RSZELTTXT > give ID as "4XDRFT..."  > hit execute to see the missing query element description
    Hope this helps u...
    Regards,
    KK.

  • Formula Variable and key date

    Hello!
    Maybe someone can help me with the following problem:
    We have an inventory cube and want to see our stock with alternative values. On 0Material exists a key figure ("price") as time-dependent attribute. This key figure displays the price of the material for different periodes (that's why attribute is time-dependent).
    In the query I created a formula variable (=> replacement path, replaced with the mentioned key figure "price") and in a formula I multiplicate stock and the formula variable. This works fine and value of key figure "price" is correctly selected according to key date of the query.
    But I need a second formula, where stock from previous year is multiplicated with "price" from previous year, so I need a possibility for a second key date relevant for a second formula variable.
    Anyone who had a similar problem? Any idea how to solve this problem - formula variables are not mandatory!
    Br
    Gunter

    Hi Kishore,
    Use the formula created by you (say Formula 1) in a new formula ( say Formula 2).
    Use If Else condition.
    Formula 2 = (Formula 1 < 0)0 + (Formula 1 >=0)Formula 1
    The above expression explained as:
    If Formula1 < 0 then
      Formula 2 = 0
    Else
      Formula 2 = Formula1.
    You can hide Formula 1 and Display only Formula 2 in your report.
    Hope this helps!

  • Formula variables with replacement from key

    Hi Sdns,
    Well We are doing Upgradation from BW3.5 to BI 7.0.. After Upgrade we got stuck up'd at reports.. We are facing an error for a report which is formula variables with replacement from key is not working. The final result is giving us unexpected results i.e, Itz showing the values as X.
    We got some reference from Service.sap. We found a note which is 1005772. Howeer this Note is applicable for suport package level 12. But we are already in higher suppor package level 15.. So this note is not applicable.
    Can anyone guide us if u people have faced this kind of issue.
    Regards,
    Aluri

    Hi,
    Replacemet path processing type can be used with Charceteristics variables, text variables and formula variables.
    For example u have created two restricted Key figues for two
    years sales comparison and u have used characteristics variables on 0CALYEAR.
    The years for which we want to compare sales volume will be selected during the Execution.
    If 2000 and 2001 be selected,
    these can be assigned as text for restricted Key figures in the record.
    Please go thorough the following links.
    An application of Replacement path variable can be found here.
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
    Another application to get the Document Count: For example Number of Sales Orders.
    Query formula-Counter???
    Example for Replacement Path: Characteristic Variable.
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/78a03c1178ad2ce10000000a114084/content.htm
    Variable Replacement Example
    http://help.sap.com/saphelp_nw04/helpdata/en/af/809528939d5b4fbff7e16a5bdc0d85/content.htm
    Example for Replacement Path: Formula Variable.
    http://help.sap.com/saphelp_nw04/helpdata/en/ca/5f9ac61a205a459d0e7ef313d10321/content.htm
    Hope it's helpful......
    Thanks,
    Kameswari.

  • Get value of formula variable during query runtime into a text variable

    Hi all,
    I wanna get the value of the formula variables during the query runtime into a text variable.
    My scenario is like this: First I defined a formula variable Z_DATE_3 which is processing by replacement. It will get the day of a characteristcs(Startdate).
    Then I defined a text variable and in the function module related to this text variable, I used the parameter I_T_VAR_RANGE which can store the value of formula variable during the query runtime.So I can read the value from this table in my function module.
    But I have a issue, when I run the query which used the defined text variable, it seems that it doesn't call the corresponding function module. Because I set a breadpoint in hte code and it never reach this breakpoint.
    If I removed the parameter I_T_VAR_RANGE , it can enter the function module.
    So could you please give some advice?
    Is my solution correct or not?
    And what's wrong with the parameter I_T_VAR_RANGE? Did I use it correctly?
    And My code is:
    DATA:  l_s_range_v TYPE rrrangeexit,
                 l_day type sy-datum.
    if i_step <> 2.
    raise no_processing.
    endif.
      READ TABLE i_t_var_range INTO l_s_range_v
         WITH KEY  vnam = 'Z_DATE_3'.
    if sy-subrc = 0.
         l_day = l_s_range_v-low.
    endif.
    Thanks in advance!
    Best regards
    Fanchest

    Hi, Fanchest,
    I'm having just the same issue.  Did you find a solution?
    I wrote a short routine in CMOD to derive the value of a formula variable to a text variable, but it's not working (I don't get any value).  Can you share your solution?
    Thanks in advance,
    LL

Maybe you are looking for