Dynamic calculation in Queries

I have a typical requirement. There is 1 column in my query that needs user input(discount rate). Whatever the user inputs, that number(discount rate) and age of the employee needs to be checked or looked up in another cube which stores the discount rate, Age, Discount Factor. If a proper match is found then the discount Factor has to be returned to the query.
Can I use a variable with Customer or SAP exit.
Thanks in advance. Full points will be awarded.

Hi,
  In this case you need to go for a customer exit where you can validate and get back the data to report. Validation can be done in I_STEP = 3 and values to report in I_STEP = 2.
Your requirement can be don ein I_STEP = 2 I believe.
Hope this helps you......

Similar Messages

  • How to do dynamic calculation on PDF Form

    Hi friends,
    I need to to create a invoice page using Adobe PDF dynamic Form.
    Business Requirement:-
    1. User will select predifined product, Quantity, Rate and Amount would be calculated. Tax would be calculated from the below data.
    2. I have a  tax table
        0      - 1000    2%
        1000 - 2000   5%
        3000 - 4000   7%
    Queries:-
    - how to write script to calculate Tax based on above tax table data?  How to ref. a table data?
    - how to write script keeping in mind about adding new percentage in future?
    Cheers,
    Victor

    The attached form will help you in understanding the dynamic calculations.
    Reading the table data with changes in the future..
    a) If your application is a standalone application, (means you distribute the .PDF file directly to the users instead of rendering the PDF based on request), then you may need to hard code the data inside the form itself. - In this case, if the table data changes, you need to change the PDF and re-distribute the form.
    b) If you are rendering the PDF on the fly based on the request, then you have the option of reading the data from the table (you need to do this in the parent application which is invoking the rendering process) and make it part of the input XML at the time of rendering. You need to write your code to read the XML and do the calculations for each request. - In this case, if the table data changes, PDF will get the latest information beacause the latest info is available in the input XML.
    Thanks
    Srini

  • Transparent partition and Dynamic Calculation

    I've setup a target cube which collect the results from two different source cubes: one for historical data, the other one for the current period. I've put formulas on accounts in the target cube. Those formulas refer to both historical and current periods. Those accounts are also set in the source cubes as dynamic calculated. But even by setting them as stored members, the target dynamic calculated members do not take the precedence. How to solve this ? <BR><BR>Stéphane

    <blockquote>quote:<br><hr><i>Originally posted by: <b>stephane.huber</b></i><BR>I've setup a target cube which collect the results from two different source cubes: one for historical data, the other one for the current period. I've put formulas on accounts in the target cube. Those formulas refer to both historical and current periods. Those accounts are also set in the source cubes as dynamic calculated. But even by setting them as stored members, the target dynamic calculated members do not take the precedence. How to solve this ? <BR>Stéphane<hr></blockquote><BR><BR>Stéphane,<BR>The quickest solution is to modify your mapping so that all of the dynamic calcs are in the target partition. In other words, limit the scope of the accounts dimension in the partition so that none the dynamic calcs are in the source of the partition. This means making a subset of the accounts dimension that includes only those accounts with data and not those that are dynamically calculated.<BR><BR>If you have an accounts dimension with three members: COGS (loaded), Sales(Loaded), and Margin (dynamic calc: Sales - COGS), the source partition should only include COGS and Sales, not Margin, allowing the margin calculation to occur in the target cube.

  • Dynamic calculation of prior 2 months

    Hi all
    Please help me out in solving this issue
    In my quuery out put will be as follows
    jun07 jul07 aug07 sep07
    quantity 45 50 60 70
    2m Offset quantity 45 50
    Issue:
    for 2m offset quantity we need to take quantity value two months prior.
    Example For sep07 it should display value of Jul07.
    I tried eith variable offset values. but they are taking current perid and substracting 2 months.
    i need dynamic calculation for every month.
    thanks
    srteelatha

    Hi,
    By Using 2 structures in the query , that means you have to take a selection in the columns area and you need to take 6 selections under this structure, you will get a chance to use the cell editor concept.Here first 2 selections will be hidden.
    that means first selection for APR.
    2nd selection for MAY.
    3 - June
    4- July
    5- Aug
    6- Sep
    In the cell editor concept ,you can overwriet the 2nd row values of the last 4 selections .That means 2nd row's 3rd(june) column value will be overwritten with  2nd row's 1st column value(APR) &
    2nd row's 4th column value(July) will be overwritten with  2nd row's 2ndt column value(May) &
    2nd row's 5th column value(aug) will be overwritten with  2nd row's 3rd column value(june) &
    2nd row's 6th column value(Sep) will be overwritten with  2nd row's 4th column value(July) &
    With rgds,
    Anil Kumar Sharma .P

  • Dynamic calculation of prior perod

    Hi all
    Please help me out in solving this issue
    In my quuery out put will be as follows
                            jun07    jul07    aug07  sep07
    quantity            45            50       60     70
    2m Offset quantity                          45        50
    Issue:
    for 2m offset quantity we need to take quantity value two months prior.
    Example For sep07 it should display value of Jul07.
    I tried eith variable offset values. but they are taking current perid and substracting 2 months.
    i need dynamic calculation for every month.
    thanks
    srteelatha

    Hi ,
    how are you getting the first 4 months? Is there one variable? Which one?
    Cornelia

  • Unknown calculation type [0] during the dynamic calculation

    Dear Experts,
    I've received the following error when I try to run a business rule (Run on save) attached to a data form:
    "Unknown calculation type [0] during the dynamic calculation. Only default agg/formula/time balance operations are handled"
    Thanks in advance..

    Log into Oracle Support and have a read of
    "Error "1012703 Unknown calculation type [0] during the dynamic calculation. Only default agg/formula/time balance operations are handled" During Calculation [ID 744529.1]"
    "Error: "Unknown calculation type [0] during the dynamic calculation. Only default agg/formula/time balance operations are handled." [ID 593227.1]"
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Dynamic calculation of values at query runtime

    Hello, Everybody,
    I have situation in which I have calculate the value for characteristic at query runtime.
    Query is based on Infoset SEMPLDATA. In Infoset I have fields u201CEmployee IDu201D, u201CBirth dateu201D, u201CAgeu201D dedicated as virtual variable, u201CNumber of Employeesu201D.
    Then I execute query I enter a value for variable u201CDateu201D. After that query should calculate age for employee: for example ( variable u201CDateu201D u2013 u201CBirth dateu201D )/365. And query result is listed like this: u201CAgeu201D, u201CNumber of Employeesu201D.u201D Ageu201D is dynamic it depends on variable u201CDateu201D.
    Iu2019m doubting will virtual characteristic help me. Could you give your suggestions?
    Thanks in advance.
    Best Regards,
    Arunas Stonys

    Hey.  You can do this with a virtual characteristic.  I'm not fond of them because of performance, but it should work.  I am also assuming you have date of birth as an available field to do the calculation.
    So, you could implement code in the variable user exit.  After "Date" has been entered and the exit code is invoked you can pass that date to memory.  Something like export "date" to memory ID xxxxx.  I would create the memory ID object based on user ID running the query and date, or something like that.  Then when you are processing in the virtual characteristic user exit, just do an import from memory, referencing the same memory ID as when you exported.  Then you should be able to just do the date of birth - "date."  
    I have done this in the past to be able to retain user selection information for use in the virtual object calculations.
    Just thought I would add a bit more here.  You could also use formula variables based on your "Date" variable and "Date of birth" and do the calculation in a formula.  Not completely sure about your situation, but that's another idea.
    Hope this helps.
    Thanks
    Edited by: Siboda_Eric on May 12, 2010 4:21 PM

  • Dynamic calculation of privileges into business role

    hi,
    I have a requirement to create business roles containing a dynamic list of privileges. In addition, a  costcenter attributes allows to determine the right privileges, within a business role, to assign.
    I thought to use dynamic groups so that each time I assign a business role, a calculation of privileges based on costcenter is achieved.
    for example:
    BR1;FR10;Z_technical_privileges
    BR1;FR30;Z_technical_privileges2
    This list is often updated that's why I need it to be dynamic.
    In the filter tab of the dyn group, I set a request to retrieve the mskeys of privileges (here is mskey of PRIV:ROLE:<sys>:Z_technical privileges & PRIV:ROLE:<sys>:Z_technical_privileges2)
    Then I attach the dyn groups to the role (BR1) by setting up the autoassign field in the membership tab of the role.
    When I assign the BR to a user, no privilege is provisioned (user already have an account in that system).
    Am I forgetting something or doing something wrong?
    how can I include the "check" on costcenter attributes?
    thanks
    Guillaume

    Hello Guillaume,
    dynamic roles find you the pool of people, that can be used in a business roles. If you attach a dynamic role to a BR, those users will become members of the BR.
    You are trying the same with privileges and that's why nothing happens. Because privileges can't become members of the BR.
    Are the different lists of privileges, that need to be assigned to users via the costcenter-attribute really changing so much?
    You could use the dynamic groups to look for the members of a costcenter and assign those to the BR specific for that costcenter with the privileges added to the BR. That means one BR per costcenter and the privileges need to be changed manually or maybe via a job.
    Hmm... where do the new privileges come from? How would you find them dynamically anyway? If you have a SQL statement for that, it should be possible to create a job, that adds the new privileges to the BR and delete old ones.
    I don't see a fast and easy way to do this, but I haven't come across a request like this yet, so maybe there is one and I just don't know it (yet ^^).
    Regards,
    Steffi.

  • Dynamic calculation of diff. beween various months values

    The requirement is: If the users input values for calmonths say, may'05 to aug'05, then the query will be able to calculate net value for four months (i.e it should be able to create 4 columns) and the diffence calculations from may'05(net value) - aug'05(net value) should be dynamic. Similarly, if it from say, june'05 to nov'05 then there will be six columns values dynamically and the diff bewteen values june'05 - nov'05 should be dynamic. How this can be achieved in BEX? Please give me some tips on this asap.

    Hi,
    You cannot achieve this directly.
    Though, you can get some kind of approach:
    Show all month in one columns and in another column – the difference between entered months. After clicking on calmonth (free char) you can get all individual columns for all month range, but difference calculated is wrong.
    So, applying and removing drilldown you can switch a report between individual columns for months and all month in one column and a difference.
    If this is suitable for you, I can provide more details.
    Without doing some coding in VBA, I quess it’s the best you can achieve in query designer.
    Best regards,
    Eugene

  • Dynamic calculations in a materialized view

    Hi,
    I have a problem. I created a materialized view which works perfectly. But now I need to perform some calculations with the data in my view . The view contains the working hours of employees who worked in different projects. Every project has a fixed amount of time (time_available) in which the employee has to finish the project. I aggregated the working hours to month for better presentation. What I want to accomplish here is a "simple" subtraction of "fixed amount for a project" minus "working hours" for the employee.
    The problem here is that some project have duration of more that just one month. Naturally all my values are in one tuple for every month. So when I have 3 month of working hours for a project my view looks like this:
    MV_Working_Hours:
    Project --- Time_Available --- DATE --- Employee --- Working Days
    Project A --- 50 Days --- 2011-05 --- Mr. A --- 15 Days
    Project A --- 50 Days --- 2011-06 --- Mr. A --- 16 Days
    Project A --- 50 Days --- 2011-07 --- Mr. A --- 16 Days
    What I want to do is to calculate the remaining days like this :
    Project --- Time_Available --- DATE --- Employee --- Working d in Month ---reaming days
    Project A --- 50 Days --- 2011-05 --- Mr. A --- 15 Days --- 35 Days
    Project A --- 50 Days --- 2011-06 --- Mr. A --- 16 Days --- 19 Days <--- I get here 34 which is for my need wrong !!!
    Project A --- 50 Days --- 2011-07 --- Mr. A --- 16 Days --- 3 Days
    Is there a way to realize this with "just" sql or do I have to use pl/sql in the OWB? I use the OWB version 11gR2
    thx

    For everybody who is confronted with the same problem I have - here is the solution: (thx to "spencer7593" and "Justin Cave" from StackOverflow)
    SUM( "Working Days" )
    OVER (PARTITION BY "Product", "Employee"
    ORDER BY "DATE"
    ROWS UNBOUNDED PRECEDING)
    and please check out the link from oracle for _"SQL for Analysis and Reporting"_: http://download.oracle.com/docs/cd/E14072_01/server.112/e10810/analysis.htm

  • Inserting dynamic calculation in javascript to the stage

    I'm working with a partner on calculating the area of a rectangle, as a user changes its size. We're using javascript and so far have:
    function calculateArea() {
    var width = +document.getElementById("width").value;
    var height =+document.getElementById("height").value;
    var area = width * height;
    document.getElementById("area").value = area;
    Width <input type="Text" name="width" id="width" size="4"> 
    Height <input type="Text" id="height" name="height" size="4" onkeyup=""> <br><br>
    Area <input type="Text" name="area" id="area" size="4"> <br><br>
    <input type="button" name="calculate" id="area" size="4" onclick="calculateArea()" value="calculate">
    The main problem is that we're having difficulty getting the result of the calculation to show up in a textbox on the stage. 
    The subproblem is that because we can't see the result, we don't know whether the code is calculating correctly!
    Any help would be appreciated!

    You can use the command console.log() to post the info to the console, and see that in your browser's console.  If you want to have it show up in your textbox, you can refer to it like this:
    Assuming the name of the element is "myTextBox":
    sym.$("myTextBox").html(area.toString()); // use toString() because area is a numeric value
    Hope that helps!
    -Elaine

  • Dynamic Calculation of SLED for Outbound Delivery

    All,
    I have a situation to pick batches at the time of outbound delivery using batch determination. We have a situation where we have some materials which are expiration date managed and some which are not.
    I have set up the batch search strategy with batch status LOBM_ZUSTD (batch is set to released). in the selection criteria
    For Dynamic selection of SLED date i have maintained the selection criteria as LOBM_VFDAT, LOBM-RLZ>0 d. No changes made to the object dependency.
    The Batch Class for Finished goods has LOBM_VFDAT, and no LOBM_RLZ and LOBM_LFDAT.
    In OVM1 i have set the message VL 415 as an error . ' Invalid batch according to batch determination'
    When i am doing a picking of batches for the outbound delivery the strategy analysis gives the SLED > Del. date + Min rem. shelf life e.g Del. date is 4/30 and Min Rem Shelf Life is >0 d.
    When i pick a restricted batch it gives me the correct error message.
    When i pick a batch with unrestricted batch status and an expired batch it gives me an error message.
    When i try to pick a batch which is unrestricted batch with no SLED date it gives me an error message. What is the method to allow picking of batches with no SLED date .
    Thanks for your help with this.

    If you can distinguish between the materials with and w/o shelf life management through a field which is available in the field set of the condition tables (e.g material group, product hierarchy), you could use that field for your condition table and define two condition records in VCH1 - one with selection criteria and one without.
    (you can also consider adding such field to the field cataloge [and then to the condition table], if you have a clear and sensible rule [pls note that adding a field to the field cataloge requires also development to populate the field of the communication structure with value during the program run]).
    It is also possible to influence the batch determination, e.g. via user exit EXIT_SAPLV01F_002 (e.g. you can replace the search procedure [KALSM] for materials w/o SLED and determine different strategy).

  • DataExport option is not working for Dynamic Calculation Members

    Hi,
    I am trying to export the dynamically calulated dense member "BlkCr" with DATAEXPORT command with option DataExportDynamicCalc ON but I do not get any data. Below is the script i have written:
    SET DATAEXPORTOPTIONS
    DataExportDynamicCalc ON;
    DataExportColFormat ON;
    DataExportDimHeader ON;
    DataExportOverwriteFile ON;
    FIX("FY10")
    FIX(@remove(@RELATIVE("Product",0),"NO_PRODUCT"),@remove(@RELATIVE("Package",0),"NO_Package"), @Remove(@RELATIVE("ALL_GEOGRAPHIES",0),"No_Geography"),@Remove(@RELATIVE("ALL_DEPARTMENTS",0),"No_department"),"Package_Allocation","BegBalance","BlkCr" )
    DATAEXPORT "File" "," "PercentageSpread.txt" "#Missing";
    ENDFIX
    ENDFIX
    Sparse\Dense settings:
    Product -- Sparse
    Package -- Sparse
    Geography -- Sparse
    Department --Sparse
    Package_Allocation --Sparse
    BegBalance -- Dense
    BlkCr --Dense (Tagged as Account Dimension)
    Essbase version is 9.3.1.4
    Please help.

    Hi Darrell,
    Thanks for replying. I tried removing "BlkCr" from fix statement but it did not help.
    I am facing a block creation issue and that is the reason I created a "BlkCr" Dynamic member. This members holds some percentages, which needs to be multiplied to some amount. To do this I need to export the data from "BlkCr" (as I cannot use dynamic calc member in Calc Script) and import it again to some stored member. Please let me know if you require some other information.

  • RRI - Sending  Dynamically calculated Variable Values to Receiving Report

    Hello,
    1st report requires that user enters 2 dates. User exit is calculating the "number of months" between these 2 dates and the value is being stored in a variable.
    This calculated value "no of months" needs to be sent to the receiver report. Apparently it is not getting passed automatically.
    Any ideas.?
    Thx
    Sri Kamana

    Hi Srikanth Kamana,
    Reimplement the customer exit "number of months" in the second query. Get the from and to dates from the 1st query.
    I hope you got an idea for the issue.
    Regards,
    S P

  • Bex dynamic calculation of months

    Gurus,
    How to populate he dynamic months in Bex query ,by just having like 1 variable as an input.
    I do not want to create 12 months as hard coded in the query as restricted key figure as if we have like 5 different KPI then it would be like 12*5 = 60 hardcoded RKF to be created which we do not want.
    any help pls
    thanks

    1)goto Columns
    Drag and Drop KF = 0AMOUNT
    R-CLICK 0AMOUNT>EDIT>add 0CALMONTH and variable with interval option from and to
    2)Take 0CALMONTH from time dimension,drag and drop on top of the KEYfigure structure
    Hope it Helps
    Chetan
    @CP..

Maybe you are looking for

  • Getting video from my camera into FCE via Quicktime?

    I got a bunch of footage from some DVDs burned ("finalized") in our Sony Handycam (not Firewire compatible). Each disc has a folder called "video_ts" containing files with the following extensions: bup, ifo, and vob. I can't import any of them or ope

  • Object variable or with block variable not set- while trying to submit data

    Hi Gurus, Could you share me the solution to resolve the issue? I am getting an error "object variable or with block variable not set" while trying to submit data through an Input schedule. I am working on SAP BPC 7.5 NW and using MS Excel 2007. I ca

  • I can't make it to the login screen

    When I turn on my iMac after a routine shutdown it won't load the login window. It gets to the blue screen but when it's time for the login panel to boot it just freezes. I've tried booting in safe mode, I loading the disk utility from the installati

  • How to retrieve MqttService Binder

    Hi guys! I'm currently trying out MqttService and MqttServiceBinder from v1.0.2 of org.eclipse.paho.android.service. However, I am having trouble trying to retrieve the MqttService after binding my activity to the service. I've tried to retrieve the

  • Help. I think my LR2 Library is messed up

    I've been having this problem with LR2 taking a glacial amount of time to import any image into the library (catalog). This catalog was upgraded from LR2. My question is: I've put a lot of work into this library but what do I need to do to get the im