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.

Similar Messages

  • Job and salary for that job based on the department!!!

    Please, can somebody help me with this. I'm facing some challenges getting the required result with my queries.
    Here's what am trying to do:
    A query to display the job, the salary for that job based on the department number, and the total salary for that job, for departments 20, 50, 80, 90, assuming the schema in use is the hr schema. The job should be distinct, no duplicates.
    Thank you for your anticipated answers.
    I really appreciate your replies in advance.
    T.O

    846641 wrote:
    Please, can somebody help me with this. I'm facing some challenges getting the required result with my queries.
    Here's what am trying to do:
    A query to display the job, the salary for that job based on the department number, and the total salary for that job,What do you mean by "the salary for that job"? It sounds like you want something besides the total salary (which is what the SUM function provides). What is that other something? The avgerage salary (that would be the AVG function)? The smallest salaary (MIN)? The biggest salary (MAX)? The number of rows that have a salary (COUNT)? If you can explain what you want, someone will help you get it.
    for departments 20, 50, 80, 90, assuming the schema in use is the hr schema. The job should be distinct, no duplicates.GROUP BY automatically gets distinct results for each of the GROUP BY expresssions, so there's no need to say SELECT DISTINCT . The previous solution could be better written as:
    SELECT    job_id
    ,       SUM (salary)     AS total_salry
    ,       department_id
    FROM       hr.employees
    WHERE       department_id     IN (20, 50, 80, 90)
    GROUP BY  department_id
    ,            job_id
    ORDER BY  department_id
    ,            job_id
    ;The output that this produces from the Oracle-supplied hr.employees table is:
    JOB_ID     TOTAL_SALRY DEPARTMENT_ID
    MK_MAN           13000            20
    MK_REP            6000            20
    SH_CLERK         64300            50
    ST_CLERK         55700            50
    ST_MAN           36400            50
    SA_MAN           61000            80
    SA_REP          243500            80
    AD_PRES          24000            90
    AD_VP            34000            90I hope that's what you wanted.
    If not, post the results you do want from this same table. Explain how you get those results.
    Always say which version of Oracle you're using. It might not matter in this case, but why take a chance?

  • 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

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

  • BW Roles based on the department

    Hi,
      My requirment is to creat a roles that restricts data access according to department.
    We had nearly 20 different Detartments and my requirment is to create roles so that users can be granted access according to their department.
    Could you please update me detailed process on how i can create roles.
    I am the DEPARTMENT char as authorisation relevent
    Thanks

    Hello,
    Please see these docs,
    [Field Based Authorizations in BW BEx Queries|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4753ed83-0e01-0010-e186-f98413f868cb]
    [An Expert Guide to new SAP BI Security Features|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/659fa0a2-0a01-0010-b39c-8f92b19fbfea]
    [Advanced Features of SAP BW Reporting Authorizations|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1b439590-0201-0010-ea8e-cba686f21f06]
    Thanks
    Chandran

  • 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

  • How to change graph based on the input date given by the user

    Hi all,
    I am using jdevloper 11.1.2.1.0,In my case i need to draw a graph depending on the date range given by the user.Whenever the user changes the date the graph should change according to that.So can anyone help regarding this.
    Thanks in advance
    Sri

    Create a VO that accepts parameters for the date range.
    Base graph on VO
    Add the execute with params operation to your page.
    Similar to this: https://blogs.oracle.com/shay/entry/filtering_records_by_time_with

  • Stop Changing Breadcrumb Based on the Message Being Viewed

    To Lithium: Please FIX your forum software so you STOP changing the breadcrumb to have the very last crumb show the title of the message being viewed. This is a**inine. The breadcrumb should point to the thread, not the message. This is especially confusing when people change the title of the message (for whatever reason).

    Suggestion submitted, thanks!

  • 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

  • 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

  • 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

  • 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

  • How to trigger change documents based on inbound-idoc?

    Hi experts,
    Currently I'm working in on a project where I have to create an interface based on IDOCS. This is an interface for two SAP-HR systems.
    If there are made changes in the dialog (gui) by a user, there will be created a change document, which can be displayed by report RPUAUD00. For the inbound-interface based on idocs it's important that there will also be created a change document in the system based on this idoc. We have tested this, but no change document is created.
    Can anybody help me to solve this problem: "How to create a change document based on the inbound-idoc?"
    Thanks in advance.
    With kind regards,
    Roy

    Thanks for responding. First, I like the idea of defining an event, but I'm still stuck with how to trigger it. I looked at dynamically registering events, and maybe doing something where a click on the graph control registers an event for key presses on the vi. I'd still have to figure out out to terminate the key press event. Unfortunately, (actually it's a feature I like..) there are a number of different ways to complete typing in a scale change. I routinely use ctr-enter (habit from working on a laptop), though enter works fine, and clicking somewhere else is probably the most common method. I am not that familar with User Defined Events, so I may be overlooking something obvious here.
    The graphs are a Bode Plot, with a seperate graph for RPM vs Phase Lag, and RPM vs Magnitude. I want them to always be plotted on the same x-axis. The plot is generated when the user doubleclicks on a dataset. After that, it's just the user looking at it. They can change the axis without any new data being generated.
    Thanks,
    Chris

Maybe you are looking for