Need Pay Run results Query in R12

Hi Experts,
Good morning to all.
I have a requirement to display the fields like Payroll name,Payroll Period,element name and their values from pay run results.
if anybody worked on this requirement please send me the select statement.
Cheers
Ram

Does this help -
select papf.employee_number,papf.full_name,ppa.effective_date,pp.payroll_name,
pet.element_name,piv.name input_value,prrv.result_value
from apps.pay_payroll_actions ppa, pay_assignment_actions paa,
pay_payrolls_f pp,pay_run_results prr, pay_run_result_values prrv,
pay_input_values_f piv,pay_element_types_f pet,
apps.per_all_assignments_f paaf, apps.per_all_people_f papf
where ppa.payroll_action_id = :payroll_action_id -- give your payroll_action_id
and ppa.payroll_action_id = paa.payroll_action_id
and ppa.payroll_id = pp.payroll_id
and paa.assignment_action_id = prr.assignment_action_id
and prr.run_result_id= prrv.run_result_id
and prrv.input_value_id = piv.input_value_id
and piv.element_type_id = pet.element_type_id
and paaf.assignment_id = paa.assignment_id
and paaf.person_id = papf.person_id
and trunc(sysdate) between pp.effective_start_date and pp.effective_end_date
and trunc(sysdate) between pet.effective_start_date and pet.effective_end_date
and trunc(sysdate) between piv.effective_start_date and piv.effective_end_date
and trunc(sysdate) between paaf.effective_start_date and paaf.effective_end_date
and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date
order by employee_number;

Similar Messages

  • MDX query - need to run different query (where clause) on mondays

    The below query works OK and uses the substitution variable CurrentWeek in the WHERE clause, but I have one shortcoming that I need your help for:
    The query works fine for all days but mondays. On Mondays I need the query to fetch numbers from last week (as opposed to current week) as the query returns null as the cubes have no data for current week on mondays. Hence I need to change the where clause to use substitution variable LastWeek, or in some other way run a different query on mondays. I have another substitution variable called WeekDay which I can use to test which day of the week it is, but I am not sure of the syntax I need to use to test for day of week and then have the query use different substitution variables as a result of this test.
    Please help.
    Henning Strand
    SELECT NON EMPTY {[Measures].[meas_sg]} ON COLUMNS,
    NON EMPTY {[Kunde],[Kunde].[KU01],[Kunde].[KU02],[Kunde].[KU03],[Kunde].[KU04]} ON ROWS
    FROM MIFS.MIFS
    WHERE ([Marked].[Dagligvare],[Tid].[&CurrentWeek])

    Or to go off of Sean's suggestion, programmatically change the value of the substitution variable, and leave the code alone.
    Other thoughts -- have a load process to a single cell (sorry, my BSO roots are showing, but the concept is the same, load a single number) and then do a boolean test off its value -- 0 = Monday, 1 = the rest of the week.
    Regards,
    Cameron Lackpour

  • MS SQL database needs to run mdx query to analysis services to retrieve data from a BPC 10 Netweaver cube(view only)

    We are in the process of migrating from BPC7 SP12 Microsoft sql server to BPC10 netweaver on a sql server with BW7.4 and need to integrate our home grown data warehouse which is on a Microsoft sql server.  The data warehouse currently connects to BPC7 using integration services/analysis services and runs mdx queries to analysis services to retrieve data from the BPC7 cube (view only).  Please provide documentation on how to create this same integration with our data warehouse using BPC10 netweaver on a sql server.

    When you were setting up your ODBC data source for
    the Text driver, did you click on the "Options"
    button? There's a lot of options in there that I
    didn't understand at first glance.Yes I clicked on the options button, but the only thing there is dealing with file extensions. I left it set to the default.
    I have since tried closing my connection after I insert a record, I then try executeQuery, but still no luck. Seems strange that I can write to the file but not read from it. If any thing I'd expect the opposite problem.
    I have also tried using the class "JoltReport" from the sun tutorial instead of my own with the same result.
    Message was edited by:
    Hentay

  • Permissions needed to run tarantella query audit?

    Hi
    I'm trying to run the "tarantella query audit ..." command to check for log file entries, using the account I use for all sgd admin.
    I've never done this before, and I get the error "you do not have permission to run this script" - can't find anything in the admin guide relating to specific permissions for this option, what am I missing?
    Thanks
    mrtng

    I did a quick test in my environment and found the runbook worked fine when run normally, but threw an access denied error when using runbook tester (my account is admin also). Just reinforcing to me that runbook tester is not a very useful tool.
    To troubleshoot, I'd try a couple changes:
    Create a new runbook with only the Run Program activity in it, and hard code the robocopy command that worked in the command line in the Command field
    Shouldn't need to specify server name if running locally on runbook server
    Leave everything else in the activity at defaults (no run as account in Advanced, and use service account in Security)
    Make sure activity-specific published data logging is enabled for the runbook
    Temporarily
    enable trace logging for Orchestrator remoting service, policymodule, and runbook service
    Then check in and run, and see if it works or there is more info in the trace logs.
    Has this server been "hardened" with any nonstandard policies or configuration? If so would want to peel those off to eliminate some kind of lockdown as the issue.
    Runbook:
    Noah Stahl | Automys |
    Downloadable Microsoft automation examples and solutions

  • Need modify Running total query

    CREATE TABLE DET
    (DDT DATE,
    DNO NUMBER,
    DCODE VARCHAR2(6),
    DAMOUNT NUMBER,
    DINST NUMBER);
    INSERT INTO DET VALUES (TO_DATE('01012010','DD/MM/YYYY'),7,1946,19674.5,NULL);
    INSERT INTO DET VALUES (TO_DATE('08012010','DD/MM/YYYY'),8,1574,4800,NULL);
    INSERT INTO DET VALUES (TO_DATE('08012010','DD/MM/YYYY'),8,1574,50000,208.333);
    INSERT INTO DET VALUES (TO_DATE('08012010','DD/MM/YYYY'),9,1835,31600,208.333);
    INSERT INTO DET VALUES (TO_DATE('08012010','DD/MM/YYYY'),6,1924,50000,232.558);
    INSERT INTO DET VALUES (TO_DATE('02022010','DD/MM/YYYY'),9,1835,5000,NULL);
    INSERT INTO DET VALUES (TO_DATE('02022010','DD/MM/YYYY'),9,1835,31600,131.667);
    INSERT INTO DET VALUES (TO_DATE('05022010','DD/MM/YYYY'),8,1574,50000,208.333);
    INSERT INTO DET VALUES (TO_DATE('10022010','DD/MM/YYYY'),6,1924,50000,232.558);
    INSERT INTO DET VALUES (TO_DATE('01032010','DD/MM/YYYY'),8,1574,50000,208.333);
    INSERT INTO DET VALUES (TO_DATE('01032010','DD/MM/YYYY'),6,1924,50000,232.558);
    i have this query ;
    SCOTT@orcl>select ddt,
      2  dno,
      3  dcode,
      4  newdamount damount,
      5  dinst,
      6  newdamount-nvl(dinst,0) run_tot
      7  from(
      8  select ddt,
      9  dno,
    10  dcode,
    11  damount,
    12  dinst,
    13  decode(nvl(to_number(to_char(ddt,'MM'))-1,0),0,damount,
    14  damount-nvl(dinst,0)*(to_number(to_char(ddt,'MM'))-1)) newdamount
    15  from det
    16  order by ddt)
    17  where dcode = '1835'
    18  order by ddt,dno,damount,dinst nulls first;
    it returns this result;
    DDT               DNO DCODE     DAMOUNT      DINST    RUN_TOT
    08/01/2010          9 1835        31600    208.333  31391.667
    02/02/2010          9 1835         5000                  5000
    02/02/2010          9 1835    31468.333    131.667  31336.666
    The results last row should appear like this;
    02/02/2010          9 1835    31391.667    131.667  31260 DAMOUNT for the row 02/02/2010 (where DINST > 0 ) should be 31391.667,(closing RUN_TOT of january)
    and NOT 31468.333.
    The above query logic could be enitrely wrong, because the criteria laid assuming that the instalment remains same every month.
    Please someone who is well-verse with Lag or Sum ..Over analytic function, correct my code.
    TY.

    user613563 wrote:
    Your query entirely missed one row with DAMOUNT 5000.
    i expect the result to be;
    DDT               DNO DCODE     DAMOUNT      DINST    RUN_TOT
    08/01/2010          9 1835        31600    208.333  31391.667
    02/02/2010          9 1835         5000                  5000
    02/02/2010          9 1835    31391.667    131.667  31260
    Well, i for one am not following the logic here, but this will give you the results you've posted (why doesn't the row with damount = 5000 factor in to the 'running total' in any way shape or form?)
    select
      ddt, dno, dcode, damount, dinst, resolved
    from
      select
        ddt, dno, dcode, damount, dinst,
        case when lag(trunc(ddt, 'MM')) over (order by ddt asc) != trunc(ddt, 'MM')
        then
          lag(damount-dinst) over (order by ddt asc) - dinst
        else
          damount-dinst
        end as resolved
      from det
      where dcode = '1835'
      and dinst is not null
        union all
      select
        ddt, dno, dcode, damount, dinst,
        damount as resolved
      from det
      where dcode = '1835'
      and dinst is null
      order by ddt asc, dinst nulls first
    )Edited by: Tubby on Jan 11, 2010 2:47 PM
    fixed the not equals sign since the forum eats less than / greater than symbols

  • Need to run a query to select # of counts based on each month

    Let's say I have a talble with 12 months, each month has some data.
    I want to run a select count(*) to get result of how many rows per month, like Jan----100, Feb---90, etc.
    How do I do that?
    Thanks in advance.

    user569151 wrote:
    Let's say I have a talble with 12 months, each month has some data.
    I want to run a select count(*) to get result of how many rows per month, like Jan----100, Feb---90, etc.
    How do I do that?
    Thanks in advance.May be like this:
    SELECT EXTRACT(MONTH FROM date_column),COUNT(*)
    FROM TABLE_NAME
    GROUP BY EXTRACT(MONTH FROM date_column);

  • Can you run a Query in a Process Chain?

    As part of a data validation process chain, I need to run a query and send the results by email.  I've created the query (with the exception) and set it up in information broadcaster to be sent by email.  I thought that I would be able to just drop in the "Exception Reporting" process into the process chain and be able to select the query to run.  Needless to say, it don't work that way.
    If anyone has ran a query in a process chain, please let me know how you did it?
    Also if someone knows how the "Exception Reporting" process in RSPC works, please share?
    Thanks

    Patel, we may be able to rethink our approach and use the event data change that was mentioned in the document you sent.
    I was hoping to be able to do everything from within a process chain.  Does anyone know how to use the "Exception Reporting" process that is available in RSPC?  Is it a leftover from the 3.X days that can't really be used in 7.0?

  • How do you run a query to view duplicate records?

    I need to run a query with the query generator to produce a list of matching records. We have a problem whereby sales orders can come in by phone and email and therefore they sometimes get put on the system twice. I need to produce a query which picks up any orders where the CardCode and Document Value match, within say two days of each other.
    Please help?

    Hi Wendy Burt....
    Try This
    SELECT   COUNT(T0.[CardCode])as Duplicatecount, T0.[CardName], T0.[DocTotal] FROM ORDR T0
    WHERE T0.[DocTotal] IN ( select t1.doctotal from ORDR t1
    where t0.cardcode=t1.CardCode AND datediff(dd, t0.docdate,getdate())<=2)
    AND
    T0.CARDCODE IN ( select t1.CardCode from ORDR t1
    where t0.cardcode=t1.CardCode AND datediff(dd, t0.docdate,getdate())<=2)
    and t0.docstatus = 'O' and t0.doctotal >0
    GROUP BY  T0.[CardName], T0.[DocTotal]
    Regards,
    Kennedy

  • Run BW query from R/3, need output file saved on application server

    Hello all,
    We are currently working on BI 7.0. Is there a way where we can run a BW query from R/3 by some program or tcode? We need to run the BW query and use the output of that query as an input to some other custom program in R/3.
    If we can save the output file on application server than the R/3 program will pick up that file from there.
    Is there any standard delivered functionality that will allow us to do that or how can we achieve this.
    Can some help help with some suggestions or links?
    Thanks in advance.

    Hi,
       Refer the following threads:
    [Calling BW Query from R/3;
    [Saving Bex Report / query in BW App server;
    Regards.

  • Query not showing detailed result when run through query Designer or Portal

    Hi,
    There is one query which not showing detailed result while running through Query Designer or run in Portal.
    But strange thing is that it is showing the detailed result when i run it through BeX Analyzer.
    While all the other queries don't have this problem in system. All showing the correct detailed result.
    If anyone have some idea on this issue plz let me know.
    Regards,
    Javed
    Edited by: Javed Akhtar on Jul 7, 2009 3:59 PM

    Hi,
    We can do this setting in WAD. Please check the web template and try to remove that setting. When you have hierarchy then we can display only till certain level in portal, this setting is done in web template APIs, but in bex analyzer you can see all the detailed information.
    Edited
    Go through this thread for some more detailed information
    http://help.sap.com/saphelp_nw2004s/helpdata/en/44/7b5f0a95ce12d0e10000000a422035/frameset.htm
    Regards,
    rik

  • Urgent-Calc needs to run twice for correct result.

    Hi There,
    I have a hierarchy in account like this
    Account
    Account1 dynamic calc
         Account11 never share
              Account13 never share
    Account2     dynamic calc
    Account21 never share
    Balance
    In another hierarchy inside account I have following member
    Total
    And I am using following calculation
    Fix(dim1,dim2,dim3)
    Balance= total-@sum(@sibling(balance));
    @idescendants(“entity1”)
    Endfix
    The aggregation is not happening for the first time and but it is happened the next time I am running the calculation .Can you make out whatever I am missing in this calc so that it needs to run twice for aggregation to happen?
    Thanks

    Hi rodrigo
    I have tried using the calculation in two different fix but still it is taking two runs to give the correct result .
    I found the problem is with one account it is not correctly generated after i run the rule once account1=account2-@Sum(@sibling(account1));
    after second the run the value is coming correct .I am not able to figure out.what is ahppening.
    any idea??
    Thanks

  • I need return the result of a query on a stored procedure

    I need return the result of a query on a stored procedure, I mean when I execute a stored procedure it returns a result set as a select query.
    Best regards...

    If you want some pl/sql code that can be used in a query as it were a table you may be interested in table functions:
    SQL> create or replace type
      2  t_emp is object (
      3  name            varchar2(30),
      4  hire_date date,
      5  salary       number);
      6  /
    Tipo creato.
    SQL> create or replace type
      2  t_emptab is table of t_emp;
      3  /
    Tipo creato.
    SQL> create or replace function tab_fun(p_dept in number)
      2  return t_emptab is
      3  e t_emptab;
      4  begin
      5    select t_emp(ename,hiredate,sal)
      6      bulk collect into e
      7      from emp
      8     where deptno=p_dept;
      9
    10    return dip;
    11  end;
    12  /
    Funzione creata.
    SQL> select *
      2  from table(tab_fun(20));
    NAME                           HIRE_DATE  SALARY
    SMITH                          17-DIC-80        800
    JONES                          02-APR-81       2975
    SCOTT                          09-DIC-82       3000
    ADAMS                          12-GEN-83       1100
    FORD                           03-DIC-81       3000A procedure cannot be used in a select statement.
    Max
    http://oracleitalia.wordpress.com

  • I need to print one query result as a single row

    Hi,
    I need to print one query result as a single row ,which gives more than one value (of subinventories)and also i would like to print the quantity of that particular subinventory at particular place.Please suggest how can i do this in the report builder?

    Actually I need to print inventory report with subinventory break up.For that all subinventories of category code AB are taken as single row.Based on that subinventory value Quantity must be printed at that particular place.
    For ex
    Quantity
    Item no Description Subinventory Code AB_Abc AB_Def AB_ghi
    1 ***** 12 9
    2 ****** 8 5
    like that.I am waiting for the reply.Plz its some how urgent.
    Thank you,

  • Need checkbox onclick somehow to run SQL query

    Hello all,
    Now, I know directly I cannot do this with a javascript function.  What I need to do is with a checkbox onclick
    set a hidden field to the type of the data that is selected by the checkbox.  So, if I select the name of a person,
    the onclick method needs to let the hidden field know we have a "person" entity type. I need this type because
    when I do my true submit, that form field when read will denote what next page I need to bring up in a new tab.
    The question I have is ok, I can attempt to do this a couple of ways, following:
    1)  Come up with an AJAX call that will run a function on the server.  What I do worry about is
    submitting the page and ending up losing boxes that were checked.  I also don't want a long
    form submittal after every click.
    OR
    2)  Forget the onclick method, create a blank .cfm form, then use that form to run the query for the
    types of data, and then call the page to be displayed?  Again, I'm new, so I don't know if this could
    be weird in how the page comes up for display?
    Thanks in advance!!!!!

    Hey Dan,
    Yep, I'm very new at using CF, so I pretty much stink at it compared to you all.  However, I fixed my one problem in that I don't need
    to do anything with SQL queries with onclick.  I combined a bunch of forms into one and process stuff on that page.  Matter of fact,
    I needed to do that.
    However, what I do have a problem with is one last part of my keeping checkbox values when paging.  I can do almost everything,
    meaning, keep track of checkbox values when checked by having a list of those values in session.  I can check the boxes when
    I go back to the page with a simple <CFIF> block when the checkboxes are created for the page.
    The issue I have now is how I can delete a value from the session list when a checkbox is unchecked.  I don't know if I should
    keep track of the exact page number, or whatnot.  All I have now is a list of node ids.
    Any ideas?
    Thanks,
    Ed

  • Failed to retrieve all the results. Try running the query or stored procedure again

    I have a Product table in Azure SQL Database. I can't open data in Product table. I got an error message like this.."Failed to retrieve all the results. Try running the query or stored procedure again". In my Database
    all tables showing their data expect Product table. Please let me know why only Product table showing error message. Thanks in Advance.

    Hi,
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience
    As this requires an expert advice, I suggest you to open a support case and our experts would be able to assist you further.
    http://support2.microsoft.com/common/international.aspx?RDPATH=%2fdefault.aspx%3fid%3dfh%253ben-us%253bofferprophone
    Girish Prajwal

Maybe you are looking for

  • My iPhone 5 is not recognized by computer

    I just recieved my new iPhone 5 yesterday in the mail and when I plug it in to my computer (Window XP) it doesnt even recognize it. It just make 3 beeps and I dont know why? I just want to sync my music and videos to my new phone.

  • Deadlock issue in client communication WL5.1sp8

    Howdy I seem to have a reoccurring deadlocking in weblogic.rjvm.ServerURL.findOrCreateRJVM. It is happening using either t3 or http communication. We are using resin as a JSP/Servlet engine, but all these lockups are occurring in the weblogic classes

  • Is it possible to maintain two class type for a material

    Dear All, Is it possible to maintain two different class type for a material. If a material assigned with the batch and the material is a part of variant configuration, then how to handle this scenario. For Batch Management, class type will be 023, f

  • Adding new "Paragraph Styles"

    Hi, I am trying to modify different text styles in different cells in Numbers 3.5.2 (Yosemite) and I cannot figure out how add a new Paragraph Style to the existing drop-down styles list. Is there a duplicate existing style or add a new style option

  • Where is the application downloaded

    Hello, I have tried out the demo's for web start. As I understand it, the applet is downloaded onto my computer before it is opened in the web browser. But I can't seem to find where the applet was downloaded. How does it know where to put the files?