Calculations based on the values in the cube

Hi Guys,
I need to create a report where I need to calculate a value based on the data available in the cube and not just the data that is the output of the report.
Is it possible for me to use the data in the table /BIC/<datatarget>00 and perform the calculation using ABAP? If so, how can I display the calculated value on the report and where do I write the code?
THanks,
Doniv

Bhanu,
But the problem in doing that is, it would still display the age for the corresponding employee in the age column. That should be displayed either.
All I need is display is the following format
Department    Averageage
Dept1           40
Dept2           50
Overall         45
The present format when I set the employee to "No Display" is
Department    Averageage
Dept1            40
______30
______50
Dept2            50
______35
______50
______65
overall          45
*_____ means a blank row
Thanks,
Doniv
Message was edited by: doniv ramuk
Message was edited by: doniv ramuk

Similar Messages

  • Freight Calculation based on the net value of the Line item

    Hi SAP Gurus,
    I have one requirement for Freight calculation(Sales order is created through an IDOC) :
    In the idoc,we will receive a freight dollar amount - which will be the total amount of freight.(example 100)
    We will also receive sales dollar for each line item ,which is then passed to the pricing procedure, for a total amount of sales for that Sales order.
    (examples below, for a total of 1500)
    The 100  is to be posted to a freight G/L account.
    The 100 is further divided by each profit center  of the materials on the Sales order.
    The freight is split out amongst the  profit center , based on the net value of the line item.
    Freight value to be allocated = Line item value/total value of the sales order * Freight amount.
    Total of the sales order =1500
         Line item value     Freight value calculation     Profit center
    Material A:      800          800/1500*100  = 53     Profit center A
    Material B:     500          500/1500*100  = 33     Profit center B
    Material C:      200          200/1500*100  = 13     Profit center C
    Please let me know how to achieve this functionality in pricing procedure or what changes i need to make in Freight condition type.
    Thanks in advance,
    Bhakar Saha

    Were you able to resolve this issue of allocating freight costs to line items/profit centers using the net value of the line items?

  • Changing calculations based on the department

    Hi ,
    If i have a report that calculates the late times of the employees , and i want for a particular department to make different calculations for the late time , which is making the late time after 2:30 pm instead of 4:30 for the other departments,
    whats the best and easiest way to do that ? ,
    do i have to group my report by departments or can i just do that based on the employee's data ( department_code )..
    Thanks..

    I would create a new column in the DEPARTMENTS-table which contains the "basis" for for latetime-calculation and then do the calculation inside the database in a view. Then, let your report just select the data from that view.

  • Rolling 30 Day Calculation Based on the Weekend Date

    Hi Guys,
    I am trying to calculate a sum of rolling 30 day based on the weekend date. The table I am going to query has a date column that only has weekend date(Saturdays only). Based on that I have to calculate the formula for rolling 30 days. I am using the formula to RelativeDate formula to do this calculation.
    ToDate(FormatDate(RelativeDate(CurrentDate();-DayNumberOfWeek(CurrentDate() -  this formula is to get the last Sat of the week.(Previous Week)
    =RelativeDate([Previous_Week];-30) This is to get the rolling 30 days based of the last Saturday of the week.
    Here is where I face the problem and would need your suggestion -
    when I do a sum using the previous date and rolling 30 day I am getting an error
    =sum([Acc]) Where [Week Ending] Between([Previous_Week];[Rolling 30 Days])
    Error-  Missing or bad operand in Where expression.
    Is there any other formula I could use?
    Thanks for your help in advance,
    Jitan

    Hi,
    You are missing paranthesis () in your formula. Try using
    =sum([Acc]) Where ( [Week Ending] Between([Previous_Week];[Rolling 30 Days]) )

  • EDM Settlement Procedure with calculation based on the Grid Level?

    Hi,
    Do you see any way to do EDM (Energy Data Management) Settlement based on the Grid Level?
    Thanks in advance.
    Sébastien

    Of course, you are right.
    Standard step sum up results and at the top grid we see result without grid level. But standard program make loop at the SU and when i organize SU then i make  an association sub-SU as filial grid company(per voltage level). At the variant we can manage SU and their sub-SU into settlement procedure.
    I have question, may be you implement "Grid usage Rate" into project? What is main goal this functionality? I can't see any link between installation and grid rate(.
    Best regards,
    Evstratov Igor

  • Transportation cost calculation based on the Shipment duration

    Dear all members,
    Now I work on the IS-Oil system. I try to calculate the shipment cost for the shipment duration.
    1. The requirement here is when we complete the delivery confirmation (shipment status is 6), the system doesn't calculate the actual total duration of this shipment. I saw there is a field for total duration in the TD shipment (in the Maintain Stages tab), but it is blank. Do you know how to config this system so that it can auto update this field?
    2. I want to calculate this shipment cost base on this shipment duration. Do you know which condition type or how to customize the condition type so that we can calculate the shipment base on the shipment duration? I try to work with Scale technique, it works when I set the price for 9999 day. But it doesn't make sense  if the customer asks us the reason why we need scale for this problem. This problem seems to be very simple, I want to maintain condition record for 1 truck of 1 vendor, the price will be 50 USD/ day for this truck. And the shipment cost document must get the (shipment duration) * (50 USD).
    Thanks in advance!

    Hi Thado
    You need a have routine on the shipment cost document pricing procedures condition type, there you need to get the actual shipment start date and end date which are available in Shipment status, and condition value can be calculated from there based on Number of Days *eg 500.
    Thanks
    Sudhakar

  • Sample Size Calculation based on the results

    Dear all
    I have a scenario as below
    for a product the upper and lower specification is given as below
    Upper spec 19.00mm
    Standard  18.00mm
    Lower spec 17.00mm
    my client is having ranges as below
    Range 1
    Upper spec 19.0 to 18.75
    Lower spec 17.0 to 17.25
    Range 2
    Upper spec 18.75 to 18.50
    Lower spec 17.25 to 17.50
    Range 3
    Upper spec 18.50 to 18.25
    Lower spec 17.50 to 17.75
    Range 4
    Upper spec 18.25 to 18.00
    Lower spec 17.75 to 18.00
    a) Initially the sample size is 50%. Starts with range 4 .
    b) if consecutive 5 receipts are ok we want to switch to range 3 - sample size 25%.
    c) if consecutive 5 receipts are ok we want to switch to range 2 sample size 10%
    e) and range 1 sample size 5%.
    f) if there is any rejection at any range, then reset to range 4.
    g) if out of specification noticed then the next incoming material will be inspection in the next lowest range. ie in range 1 out of specification noticed shift to range 2 in the next Goods receipt.
    I know that Sampling scheme can be used but how to link the specifications in it.
    How to link this in SAP QM.
    awaiting for your valuable feed back Please.
    Regard
    P.Srihari

    Hi Sri,
    As per your requirement you have to create 4 MIC as well as 4 DMR follow the below step.
    1. Create MIC1,MIC2,MIC3,MIC4
    2. Create DMR1,DMR2,DMR3,DMR4
    3. Assign the DMR at MIC level.
             a) Go to QP01 In Header data screen choose Dynamic mod. level DMR at character level. (Don't assign any DMR here)
             b) In Characteristics screen assign DMR to MIC
    (Range1) MIC1 - DMR1
    (Range2) MIC2 - DMR2
    (Range3) MIC3 - DMR3
    (Range4) MIC4 - DMR4
    Save the Inspection plan.
    DMR detail explaination
    As per your requirement MIC4 will be initially inspected (ie: range 4) and remaing MIC all are after 5 consecutive lots if any rej at any stage again inspect the Range4.
    DMR1: Create 2 Stage (1st is SKIp  2nd is Inspection)
    Stage1: Start with Initial stage, Tick in SKIP, and Maintain No Skip as 15 (Bcz your case You need this MIC1 after 15 lot (555)), Skip duration 999 (Bcz your case days not consider) New Stage 2 (Bcz after complete the 15 lot it will go to 2nd stage for Inspection.), Rej 1 , New Insp 1 (Bcz rejected means MIC1 is not required)
    Stge:2, Insp Sev 4,  Ist Enter Description as Inspection required and press enter.
    In another small popup screen enter no of Inspection 5 , New Stage as 2, Rej 1, New 1,
    DMR2: Create 2 Stage (1st is SKIp  2nd is Inspection)
    Stage1: Start with Initial stage, Tick in SKIP, and Maintain No Skip as 10 (Bcz your case You need this MIC2 after 10 lot (5+5)), Skip duration 999 (Bcz your case days not consider) New Stage 2 (Bcz after complete the 10 lot it will go to 2nd stage for Inspection.), Rej 1 , New Insp 1 (Bcz rejected means MIC2 is not required)
    Stge:2, Insp Sev 4,  Ist Enter Description as Inspection required and press enter.
    In another small popup screen enter no of Inspection 5 , New Stage as 1, Rej 1, New 1,
    DMR3: Create 2 Stage (1st is SKIp  2nd is Inspection)
    Stage1: Start with Initial stage, Tick in SKIP, and Maintain No Skip as 5 (Bcz your case You need this MIC3 after 5 lot ), Skip duration 999 (Bcz your case days not consider) New Stage 2 (Bcz after complete the 5 lot it will go to 2nd stage for Inspection.), Rej 1 , New Insp 1 (Bcz rejected means MIC3 is not required)
    Stge:2, Insp Sev 4,  Ist Enter Description as Inspection required and press enter.
    In another small popup screen enter no of Inspection 5 , New Stage as 1, Rej 1, New 1,
    DMR4: Create 2 Stage (1st is Inspection 2nd is Skip)
    Stge:1, Insp Sev 4,  Start with Intial stage Ist Enter Description as Inspection required and press enter.
    In another small popup screen enter no of Inspection 5 , New Stage as 2, Rej 1, New 1,
    Stage2: Tick in SKIP, and Maintain No Skip as 999 , Skip duration 999 (Bcz your case days not consider) New Stage 2,  Rej 1 , New Insp 1 (Bcz rejected means again inspect the MIC4)
    Note: Read step by step.
    Revert further clarification.
    Regards,
    S.Babusingh

  • Acrobat Pro 9: Calculating Based on Checkbox Value

    Hi!
    I am a novice and I purchased Adobe Acrobat Pro 9. Can
    someone help me figure out how to do calculations of checkboxes? I
    am trying to do the following:
    I want to create 2 columns of 10 check boxes each. I want to
    keep a running total of how many are checked in Column 1 and a
    running total of how many are checked TOTAL (in both columns). Now,
    the document has 3 pages, and on each pages - there are 2 columns
    of 10 check boxes. I want the running total to include all boxes
    from the 3 pages.
    I hired a freelancer who did this in LiveCycle (using Acrobat
    Pro 8). It worked on her blank page, but when we copied and pasted
    the check boxes into my document (a pre-made PDF exam I have to use
    for work; my school would not allow me to give it to her to work
    with); the calculations wouldn't work. We went into LiveCycle and
    each time we opened up my document with her calculations, the
    language changed automatically from FormCalc to JavaScript.
    Can anyone give me advice or tell me what to do? (We do have
    two read only boxes that do calulations [total checked in Column 1
    and total checked] so it really should work...)
    Thank you for considering and taking the time out to help!
    Alisa

    Hello,
    I'm sorry I'm not able to address your question. These forums
    are specific to the
    Acrobat.com website and its set of hosted services, and do
    not cover the Acrobat family of desktop products.
    Any questions related to the Acrobat family of desktop
    products would be best suited in the Acrobat User Forums:
    Link to
    Acrobat Forums
    Thanks!
    Michelle

  • How to do percent calculations based on a value

    Hello,
    I'm trying to figure out how to send workflow notifications to only 40% of a selected group..
    For example - We have a survey that is sent out once a user completes our Infopath form - right now the survey goes out to 100% of the users..
    In the future, we would like the survey to ONLY be sent to 1 in 4 users that complete the form - so 40% of all the users that complete will be sent the survey upon completion..
    I know I need to use calculated fields but not sure which formula will work and how to incorporate within our current workflow.
    Any suggestions or how-to's would be appreciated since I'm pretty new to workflows.
    Thanks
    -Andrew

    Hi Andrew,
    You cannot determine 40% of total people who completed the survey randomly.
    If you are using SPD workflow, then this looks tough to do as you have to first find out the total number of Completions (assume 100). (SPDW does not have a way to count the number of items in list. If you can create custom workflow in VS then you can
    use SharePoint API with the list ID and get the count:   myList.Items.Count). Then divide that number by 4 (assume 40). If this is decimal then round it up.  Find the names of top 40 or bottom 40 responses. You cannot randomize 40
    items from the list.
    In my opinion, you need to have fixed algorithm to create workflow out of this. Hope other's can pitch in and provide some inputs.
    Regards, Kapil ***Please mark answer as Helpful or Answered after consideration***

  • Stock report based on the batch

    Hi Experts,
    I am designing stock ageing report based on last goods reciept date which is the attribute of the batch.
    the stock value in the buckets need to be calculated based on the stock quantity with moving average price.
    the report is o/p is based on material group, material, batch.
    when i drill dow based on the material it is coming fine when i drill down based on the batch it is not showing any values in the buckets.
    considering the moving average price from masterdata enhancement of 0MAT_PLANT datasource.(but this datasource doen't have batch).
    Please suggest your ideas.
    Regards,
    Satya

    I am not too sure how to explain step by step..but my system uses this design..not created by me.
    RESULT = SOURCE_FIELDS-SALK3  / SOURCE_FIELDS-LBKUM.
        IF RESULT IS INITIAL.
         RESULT = SOURCE_FIELDS-VERPR / SOURCE_FIELDS-PEINH.
    matl valuations:
    Try using tables MBEWH --(customised) and extract to DSO along with 0IC_C03.
    Also use the datasource : 0CO_PC_ACT_05
    SO Valuations:
    EBEWH -customised
    Try this link:
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=235670765
    Edited by: SAP BI Learner on Oct 28, 2011 4:27 AM

  • How to use a calculated column in the same query

    Hi All,
    I need some help with using a calculated column in the same query.
    For eq
    I am joining a couple of tables and some of the select columns are calculated based on the columns of the tables and i want a new column in the same query to use this calculated feild in some other calcualtion.
    something like this...
    select (12+3) as Sum1, (12-3) as Sum2, (Sum1 + Sum2 ) as Sum3
    from dual
    or
    select (12+3) as "Sum1", (12-3) as "Sum2", CASE WHEN ( "Sum1" / "Sum2" * 100 > 0 ) THEN 'Yes' ELSE 'No' END
    from dual
    Thanks

    user548171 wrote:
    select (12+3) as Sum1, (12-3) as Sum2, (Sum1 + Sum2 ) as Sum3
    from dual
    or
    select (12+3) as "Sum1", (12-3) as "Sum2", CASE WHEN ( "Sum1" / "Sum2" * 100 > 0 ) THEN 'Yes' ELSE 'No' END
    from dual
    ThanksWhat about just repeating the column values:
    select (12+3) as "Sum1", (12-3) as "Sum2", CASE WHEN ( (12+3) / (12-3)  * 100  > 0 )  THEN 'Yes' ELSE 'No'  END FROM DUAL

  • REQ: Add 'Fit-width' or 'Fit-visible' view mode, in which the zoom level is automatically set based on the width of the _current_ page.

    Currently, the default zoom level when viewing a page of a PDF file is automatically calculated based on the width of the "widest" page of the document. This means that, if the document contains one page that is wider than the others or is in landscape orientation, then the default zoom, when viewing all the other narrower pages, is set in a way so that the page does not use the full width of the screen. This results in very poor experience, because the zoom level and the visible area of the page have to be constantly adjusted for each page. The latest update (at the time of writing) has added some extra view modes, but not the much needed 'Fit width' or 'Fit visible'.
    Personally, I can find no reason valid enough to justify the lack of such a view mode. Automatically setting the zoom level based on the width of the current page so as to take advantage of the full width of the screen should be a must have feature for mobile devices, if not the default behavior. The current default behavior regarding the zoom level is pretty much useless, even on 8"/10" screens. There should be a view mode in which the full width of the screen is always used to display the document.
    Examples of documents for which the Adobe Reader for Android provides a poor reading experience are:
    documents which contain some of their pages in landscape orientation.
    publications which, apart from the main content, also contain the full front and back cover in a single page (usually first page which is much wider than the content pages) or any other extra pages like cards or application forms (that are meant to be printed) which usually use an A4/Letter page size etc.
    documents which have been cropped by external utilities or scripts so as to eliminate unneeded white margins (in some cases not all pages have the same width).
    Please consider fixing the default behavior in future releases of the Reader for Android or add a 'Fit width' or 'Fit visible' view mode.
    Thank you in advance.
    Message was edited by: George Notaras
    Improved descriptions of example documents.

    To add to this, if you prefer you can separate your JavaScript from your JSF pages.
    Add a folder (I named mine 'js') to your application's ViewController project's public_html folder.
    Via JDeveloper, create a new JavaScript file inside your newly created folder and place your JavaScript functions inside it.
    You can then 'load' the .js file using the method Shantala described, with the addition of an added 'source' property to the af:reference tag.
    (This can also be a URI reference to a JavaScript file hosted on a web server)
    <f:facet name="metaContainer">
      <af:resource source="/js/myJsFile.js" type="javascript"/>
    </f:facet>The benefits of this 'split' are cleaner JSF page source and also code-highlighting and formatting within the .js file making finding and fixing bugs in your JavaScript much easier.
    It appears however, that when using <af:resource> to load scripts, once the page has been submitted even once, the JavaScript is no longer available to the page. Which isn't very useful.
    A solution is to use <trh:script>.
    Add xmlns:trh="http://myfaces.apache.org/trinidad/html" to your <jsp:root> tag and install the library.
    then in place of the above code use:
    <f:facet name="metaContainer">
      <trh:script id="script1" source="/js/myJsFile.js"/>
    </f:facet>Now after a page submit the JavaScript still functions.
    Edited by: Matthew Carrigy on 12/08/2009 10:39

  • Shipment cost calculation based on HU's allowed packaging weight

    Hi all,
    I need to calculate a shipment cost based on the Means of Transport's Allowed Packaging Weight (MARA-ERGEW). After condition record determination of cost per ton in each case, the system must multiply this value times the allowed packaging weight.
    I know that through customizing I can create a Condition Type with Calculation Base = 'C' (Handling Unit) and Calculation Type = 'D' or 'E' (Gross or Net Weight). This is almost what I need except for the Calculation Type, because Allowed Packaging Weight is not an option in the field's matchcode (Percentage, Fixed Amount, Quantity, Gross Weight, Net Weight, Volume, etc...).
    Is there any way through customizing I can achieve this? Or how can I program a routine in the Pricing Procedure for the Condition Type in order to make the calculation based on the HU's Allowed Packaging Weight.
    I appreciate your help!!

    Freight carriers charges weight on the basis of Weight / volume of the items.SAP shipment works on the same principle.
    Cost of transporting ton of Potataoes  is same as transporting 10 ton of aluminium between two known destinations.
    Hence it is illogical to distributes cost on the basis of item value. However if still you want to distribute the same on value basis then maintain freight condition(%) in PO as per your prefined logic of distribution of freight cost.
    It is well known fact that cost of freight % is always higher in  Low value items & iis low in case of High value items.
    Regards,
    Sanjay Kohli

  • Query for Auto Calculation based on input of 2 Fields

    Hi,
    I would like to write a sql query to allow for auto calculation based on the Inputs of 2 other fields before Adding the Order.
    For example. A query on Sales Order where I have Item 040634 (Code for a Flower) and Quantity 200.
    I have a UDF (Bunching) where the value is 10, 15 or 20.
    Based on the Bunching the result should be given in another UDF (Noofsleeves).
    (Quantity) 200 / (Bunching) 10 = 10 (Noofsleeves)
    The Order will be having multiple items where the Bunching can differ for each item.
    Is it also possible to remove the calculated noofSleeves from Inventory.
    I am using 2007A SP01 PL05

    Hi ,
    You may try this: Apply this fms on other udf and auto refresh on the udf mentioned in the query (in your case Bunching).
    SELECT $[RDR1.Quantity.number] / $[RDR1.U_UDF.number]
    You may check these too.
    cALCULATION OF udf ON UNIT PRICE
    FMS
    Thanks,
    joseph
    Edited by: Joseph Antony on Jul 8, 2010 12:31 PM

  • Calculating based on a previous value when initial column values differ from the rest

    Let me preface this by saying I am new to the BO world. I'm trying to build a report/chart that tracks incoming loads. The first supply on hand value is pulled from the database and each successive supply on hand is based on the previous row's values.
    In the supply arriving column below, the iniital value differs from the rest using the formula:
         =If [Row Number]=1 Then [First Supply Arriving] Else [Supply Arriving]
    The supply on hand uses the same idea, but is where I'm running into problems. The first column value should be [Supply On Hand], easy enough. Each successive column value needs to follow this equation:
         Previous([Supply On Hand] (this won't always be [Supply On Hand] though, only for the second row essentially - problem 1) + Previous([Supply Arriving] (same as problem 1, where this is first supple arriving for the second row and then supply arriving moving forward) - [Usage Rate]
    If someone could help me in getting the calculation to pull the previous values correctly without making a ton of variables, I'd greatly appreciate it. We just upgraded to 4.1

    Yes, the supply on hand and the supply arriving from the previous row need added together. The usage rate, which is a constant is then subtracted from that. The result is the on hand total for the next day.
    For example:
    Date
    On Hand
    Arriving
    Usage Rate
    9/9/2014
    100,000
    250,000
    100,000
    9/10/2014
    250,000
    1,000,000
    100,000
    9/11/2014
    1,150,000
    0
    100,000

Maybe you are looking for