Function to return the Entry Value based on Assignment, Element and Date

Hi Guys,
Is there a function that returns the Entry Value for the Assignment Element, based on the Assignment Number, Element Name, Entry Segment and the End of Period date?
Example:
==============
Input Parameters:
Employee: Iana
Assignment Num: 123
Element: D480
Element Entry: Fund Name
Output Parameter:
Element Entry Value: MLC Super Fund
Thanks,
Iana

For element entry values you can use:
select petf.element_name, nvl(peevf.screen_entry_value,0) screen_entry_value
from
pay_element_entries_f peef, pay_element_types_f petf,
pay_element_entry_values_f peevf, pay_input_values_f pivf,
per_all_assignments_f paaf
where petf.element_type_id = peef.element_type_id
and :p_date_earned between pivf.effective_start_date and pivf.effective_end_date
and :p_date_earned between petf.effective_start_date and petf.effective_end_date
and peevf.input_value_id = pivf.input_value_id
and paaf.assignment_id = peef.assignment_id
and petf.business_group_id = :p_business_group_id
and peevf.element_entry_id = peef.element_entry_id
and :p_date_earned between peef.effective_start_date and peef.effective_end_date
and :p_date_earned between peevf.effective_start_date and peevf.effective_end_date
and :p_date_earned between paaf.effective_start_date and paaf.effective_end_date
and pivf.name = :p_input_value_name
and petf.element_name = :p_element_name
and peef.entry_type = 'E'
and peevf.effective_start_date = peef.effective_start_date
and peevf.effective_end_date = peef.effective_end_date
--and peef.assignment_id = :p_assignment_id
and paaf.assignment_number = :p_assignment_number;
For payroll results you can use:
select sum(prrv.result_value)
from pay_run_results prr, pay_run_result_values prrv,
pay_assignment_actions paa, pay_payroll_actions ppa,
pay_element_types_f petf, pay_input_values_f pivf,
per_all_assignments_f paaf, per_all_people_f papf
where
petf.element_type_id = pivf.element_type_id
and :p_pay_date between petf.effective_start_date and petf.effective_end_date
and :p_pay_date between pivf.effective_start_date and pivf.effective_end_date
and paa.assignment_action_id = prr.assignment_action_id
and petf.element_type_id = prr.element_type_id
and ppa.payroll_action_id = paa.payroll_action_id
and prrv.input_value_id = pivf.input_value_id
and prr.run_result_id = prrv.run_result_id
and petf.element_name = :p_element_name
and pivf.name = :p_input_value_name
and ppa.date_earned = :p_pay_date
and papf.person_id = paaf.person_id
and nvl(prr.start_date,ppa.effective_date) between paaf.effective_start_date and paaf.effective_end_date
and nvl(prr.start_date,ppa.effective_date) between papf.effective_start_date and papf.effective_end_date
and paaf.assignment_id = paa.assignment_id
and papf.employee_number = :p_employee_number;

Similar Messages

  • Any function to check the input value is integer?

    May I know if there's any function to check the input value is integer in Form 4.5?
    Thanks.

    just to add :) - (couldn't resist) :
    create or replace function is_integer ( p_number in varchar2 ) return boolean is
      v_return boolean := true;
      v_number number;
    begin
      v_number := p_number;
      if v_number != trunc(v_number) then
        v_return := false;
      end if;
      return v_return;
    exception
      when others then
        v_return := false;
        return v_return;
    end;
    begin
      if not is_integer(1.1) then
        dbms_output.put_line('is not');
      end if;
      if is_integer(1) then
        dbms_output.put_line('is');
      end if;
      if not is_integer('a') then
        dbms_output.put_line('is not');
      end if;
    end;

  • How do I return the displaysleep value from the console?

    I know that I can do pmset -g to list all the settings, including displaysleep, but I  was hoping there was a command similar to that for the screensaver which only returns the numerical value:
    defaults -currentHost read com.apple.screensaver idleTime
    Any possibility there is a console function that will return the value only?
    Thanks.

    Hi RavensFan,
    Thank you for your help.
    I have seen this Max/Min function, and I tried it, but I get an error becuase my signal is apprently "dynamic data" and the max/min function accepts double precision data, so thats the problem I am encountering at this moment. I have modified the block diagram to convert the "dynamic data" into a double and then do the same thing you suggested, but I will test it tomorrow in the lab. 
    I am currently working around this by using a numeric input, which the user would simply watch the sensor output over the calibration period and manually input that value into the formula.
    Thanks again!
    PackersFan btw...
    Cheers

  • Search function only returns the first entryinstead of 2600

    Hi all,
    I am using JDNI to search in a iPlanet LDAP. This is the code:
    String filter = "(objectclass=TDC-Empleado)";
    NamingEnumeration resultados;
    SearchControls limitacionesBusqueda=new SearchControls();
    limitacionesBusqueda.setSearchScope(SearchControls.SUBTREE_SCOPE);
    results = ctx.search("o=TDC",filter,limitacionesBusqueda);
    I know with another tool that this filter works but the search function only returns the first entry!!!
    Somebody can help me ?
    TIA
    Manuel

    humm.
    Sets ctx.setCountLimit(long), or else checks the "size limit" of your iplanet server (size limit: number of entries returned to the client application).
    A.V.

  • Recursion:returning the largest value in a linked list

    import java.io.*;
    import java.util.*;
    class Node{
         int num;
         Node next;
         Node(int n){
              num = n;
              next = null;
    class RecursivePrint{
         public static void main(String[] args){
              Node np, last;
              Node top = null;
              last = null;
              for(int i = 1; i <11; i++){
                   np = new Node(i);
                   if(top==null)top = np;
                        else
                   last.next = np;
                   last = np;
              int x =Largest(top);
             System.out.println("large is "+ x);
         }//end main
         public static int Largest(Node top){
              int large = 0;
              if(top==null){
                   return 0;
                   while(top!=null){
               if(top.num > large){
                   large = top.num;
                   //top = top.next;
              Largest(top.next);     
         }//while
         return large;
    }//end class
    I am trying to return the largest value in a linked list (10) in this case.  when I do it withour recurrsion it works ok, but when I try it with recurrsion it dies.  The logic seems ok to me, cannot figure why it dies.

    chetah wrote:
    public static int Largest(Node top){
              int large = 0;
              if(top==null){
                   return 0;
              if(top.num > large){
                   large = top.num;
                   //top = top.next;
                   Largest(top.next);
         return large;
    Initially I had the above, it return only 1 that was the reason for puting the loop.You don't seem to understand recursion or variable scope.
    int large = 0;large is a different variable inside each instance of the method.
    So when you get back up to the value 1 from the recursive calls its just comparing 1 to 0
    Here's a solution...
         public static int Largest(Node top){
              if(top.next != null){
                   if(Largest(top.next) > top.num)
                        return Largest(top.next);}
              return top.num;
         }

  • View or function to return the full path hierarchy of an organization

    Hi,
    The customer is asking to provide a report showing for each assignment of each employees the corresponding organization where it is assigned and the full path of the organization hierarchy.
    The organization hierarchy is at most 6 level deep, so they want to produce the report with the columns:
    root_organization | org_level1 | org_level2 | org_level3 | org_level4 | org_level5 | org_level6 | person_name | assignment_date
    if the person is assigned in an organization lower than the 6th level, the remainin columns should be empty.
    I see that the view HRFG_ORGANIZATION_HIERARCHIES returns only one step in the organizations hierarchy: Parent_organization_name, Child_organization_name.
    Is there any view or function as well which returns the full path of an organization in the hierarchy? At least a function which returns the full path parents of the organization delimited by commas.
    Thank you

    Hi,
    Yes, I wrote a custom code but is running a bit slowly for around 1000 organizations and more than 15 version of hierarcy (so 15000 rows of this view). I wanted to know if there is any optimized code provided by Oracle.
    Thank you.

  • Return Into.  Can I return the old value in an update statement?

    Hello - I have an update statement and I need the value of a field, prior to the update. Is it possible to use the Return Into to do this? Or do I have to have a separate select statement prior to the update statement in order to store that value in a variable?
    Thanks!

    RETURNING INTO is valid for an UPDATE, but it returns the new value, not the old value.
    SCOTT @ nx102 Local> select * from a;
          COL1
             4
    Elapsed: 00:00:00.00
    SCOTT @ nx102 Local> ed
    Wrote file afiedt.buf
      1  declare
      2    l_old_col1 number;
      3  begin
      4    update a
      5       set col1=col1+1
      6     returning col1 into l_old_col1;
      7    dbms_output.put_line( l_old_col1 );
      8* end;
    SCOTT @ nx102 Local> /
    5
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00If you are trying to track historical changes, have you looked at Workspace Manager? That can be far easier than writing your own change tracking code...
    Justin

  • The Popup dialog Page needs two times to return the selected value[10.1.3]

    Hi All,
    I have problem in an JSF Application that uses the EMP and DEPT tables .
    the Application contains two pages
    page 1 : a calling page uses EmpView as ADF Table .
    page 2 : a popup List of Values (LOV) dialog page uses DeptView
    These cause the popup dialog page to return to the calling page and to set the selected value into the Deptno attribute .
    the calling page includes :deptno and dname columns as
    <af:column headerText="#{bindings.EmpView1.labels.Deptno}">
    <af:selectInputText value="#{row.Deptno}"
    required="#{bindings.EmpView1.attrDefs.Deptno.mandatory}"
    columns="#{bindings.EmpView1.attrHints.Deptno.displayWidth}"
    action="dialog:ChooseDept1" id="deptnoField"
    autoSubmit="true">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.EmpView1.formats.Deptno}"/>
    </af:selectInputText>
    </af:column>
    <af:column headerText="#{bindings.EmpView1.labels.Dname}">
    <af:inputText value="#{row.Dname}" simple="true"
    required="#{bindings.EmpView1.attrDefs.Dname.mandatory}"
    columns="#{bindings.EmpView1.attrHints.Dname.displayWidth}"
    partialTriggers="deptnoField" autoSubmit="true"/>
    </af:column>
    and popup dialog page includes : Submit Button to return selected value to calling page :-
    <af:tableSelectOne text="Select and">
    <af:commandButton text="Submit">
    <af:returnActionListener value="#{row.Deptno}"/>
    <af:setActionListener from="#{row.Deptno}"
    to="#{bindings.Deptno.inputValue}"/>
    </af:commandButton>
    </af:tableSelectOne>
    the problem is
    I have to press ( two times ) the select button in the calling page to
    return the selected value into the Dname attribute .
    best regards,

    Hi,
    However, I am using the Jdeveloper 10.1.3.3, but still getting this error. I could not find any threads related to this problem and hence I wrote up here. Anyway I have also logged an SR #7179012.993 for the same with the testcase. I hope the issue will be resolved soon.
    Thanks,
    Neeraj

  • User wants to get the cumulative values based on his input.

    Hi
    I am working one FI Report; the out put values are Cumulative values for Current, Previous years. I developed and it fetches the data last 3 years Cumulative year’s data without any input FYMonth based on SAPexits and varible offsets. But user wants to put Fiscal year Month as input. So he wants get the cumulative values based on his input. For example, If his input SEP'2005(062005), Then Query gives the Output Cumulative Value (I.e., Sum of Total values of Form APR'2005 to SEP'2005)
    Please provide the solution…
    Thanks
    Mannev

    Mannev,
    You can try doing this.
    1. If the user input is fiscal period(2005006) , you can create a customer exit variable which will take the user value (i_step =2), and change the variable value to 20005001. (this is a simple code where tye last 2 digits are replaced by 01).
    if the user is entering calmonth, you can use FM - DATE_TO_PERIOD_CONVERT, to convert the month to fiscal period.
    2. You can create a rkf with restrictions on time char based on the customer exit variable and the user entered variable.
    -Saket

  • GUID generation issue, SYSUUID always returns the same value.

    Hi,
    I'm using "SELECT SYSUUID FROM DUMMY" to get a guid value but it always return the same value.
    What should I do to get a unique value each time I execute the query above.
    Thanks.

    I thought I had the same problem and I found that if you generate multiple UUID's in the same SQL, it they will be the same.  If you make multiple calls, you should get multiple UUID's. 
    Try this:
    SELECT SYSUUID as UUID1 FROM DUMMY;
    SELECT SYSUUID as UUID2 FROM DUMMY;
    I get the following results:
    UUID1 = 538632FD7EA20426E10000000A3F10A9
    UUID2 = 538632FE7EA20426E10000000A3F10A9
    Notice that the strings look almost identical, but the 8th character on UUID1 is a D and the 8th on UUID2 is a E.
    Jim

  • How to get ATINN value based on material number and Class Type ?

    I have below SELECT stmt code which gives the correct value of atwrt based on materil no and ATINN.
    However in quality system, it is failing because in quality system "atinn" value is not 0000000381. It is different.
    So how can I get ATINN(Internal characteristic) value based on material number and Class Type?
    -Obtain the batch characterstic value for the Material******************
      SELECT atwrt
        UP TO 1 ROWS
        INTO v_charvalue
        FROM ausp
       WHERE objek = mcha-matnr
         AND atinn = '0000000381'   " 'US80_FRENCH_ON_LABEL'
         AND klart = '001'.
    THANKS N ADVANCE.

    Hi SAm,
    use the Below function module to get the Atinn for Atwrt for thr Class and MAterial combination..
    CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
          EXPORTING
            classtype          = '023'       "Class type
            object             = w_object  "Material number with Leading zeros
            no_value_descript  = 'X'      "Default X
            objecttable        = 'MCH1'    "Table name Mara or MCH1 or MARC
          TABLES
            t_class            = t_class   "It return the Batch class available for the above combination
            t_objectdata       = t_char  "Return Batch characteristics(ATWRT) and their value ATINN in this table
          EXCEPTIONS
            no_classification  = 1
            no_classtypes      = 2
            invalid_class_type = 3
            OTHERS             = 4.
    Regards,
    Prabhudas

  • Function Module to get pernr number based on first name and last name

    Hi All,
    What is the Function Module to get pernr number based on first name and last name.
    Could you please help me.
    T@R.
    Vidya

    hi Vidya,
    you can get perner from PA0002 based on firs name and last name.
    use select query and get perner.

  • Extracting the Attributes values of an XML Element

    Dear Forum Members
    Please tell me any XML Function which is used to extract the Attribute value of an XML Element.
    Given below
    <BRKCD_STREDSWTINVIN_C Key="6708">
    is an Element With some Key value.
    I want to have that Key value.
    Using Extract and Extractvalue I am not able to get the Attribute value.
    Is there any way..
    Regards
    Madhu K

    Your xml is not really complete ;), but this should get you started:
    michaels>  with t as
    (select xmltype('<BRKCD_STREDSWTINVIN_C Key="6708"></BRKCD_STREDSWTINVIN_C>') xml from dual)
    select d.xml, d.xml.extract('//BRKCD_STREDSWTINVIN_C/@Key') key
      from t d
    XML                                                            KEY    
    <BRKCD_STREDSWTINVIN_C Key="6708"></BRKCD_STREDSWTINVIN_C>     6708   

  • Operate C# to modify PPT's hyperlink, while configuring the hyperlink's text to display attribute, the address value will be assigned as null. Anyone know this issue? Any solution?

    operate C# to modify PPT's hyperlink, while configuring the hyperlink's text to display attribute, the address value will be assigned as null.  Anyone know this issue? Any solution?
    How to reproduce the issue:
    1.Create a new PPT slide in Office2010.
    2. Insert a certain text/characters, such as Mircosoft blablabla,
    3. Insert an URL right after the text part , TextToDisplay is the “Test”,Address is the "Url".
    4. The content in the ppt is ”Microsoft Test“,here "Test" is the hyperlink which we would like to convert. Please execute the code we list below.
    5. The problem will be reproduced by the above steps.
    PPT.Application ap = new PPT.Application();
    PPT.Presentation pre = null;
    pre = ap.Presentations.Open(mFileName, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse);
    foreach (PPT.Slide mSlide in pre.Slides)
    PPT.Hyperlinks links = mSlide.Hyperlinks;
    for (int i = 1; i <= links.Count; i++)
    PPT.Hyperlink mLink = links[i];
    mLink.TextToDisplay = mLink.TextToDisplay.Replace(mLink.TextToDisplay,"url");
    mLink.Address = mLink.Address.Replace(mLink.Address, "url");
    Modify texttodisplay, the address vaule will be assigned as null. Anyone knows how to solve it?
    Does it caused by a PPT API's Limitation?

    I've tried the below code and it works, you can refer this article:
    https://msdn.microsoft.com/en-us/library/office/ff745021.aspx
    to find that the hyperlink needs to be associated with a text range, and thats what I did in the code below with the help of the link sent by Tony.
    Microsoft.Office.Interop.PowerPoint.Application ap = new Application();
    Microsoft.Office.Interop.PowerPoint.Presentation pre = null;
    pre = ap.Presentations.Open(@"C:\Users\Fouad\Desktop\abcc.pptx", Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse);
    foreach (Microsoft.Office.Interop.PowerPoint.Slide mSlide in pre.Slides)
    Microsoft.Office.Interop.PowerPoint.Hyperlinks links = mSlide.Hyperlinks;
    Microsoft.Office.Interop.PowerPoint.Shape textShape = mSlide.Shapes[1];
    for (int i = 1; i <= links.Count; i++)
    Microsoft.Office.Interop.PowerPoint.Hyperlink mLink = links[i];
    Microsoft.Office.Interop.PowerPoint.TextRange range1 = textShape.TextFrame.TextRange;
    TextRange oTxtRng = range1.Find(((Microsoft.Office.Interop.PowerPoint.Hyperlink)mLink).TextToDisplay,After:range1.Start,WholeWords:Microsoft.Office.Core.MsoTriState.msoTrue);
    oTxtRng.Replace(((Microsoft.Office.Interop.PowerPoint.Hyperlink)mLink).TextToDisplay, "url");
    oTxtRng.ActionSettings[Microsoft.Office.Interop.PowerPoint.PpMouseActivation.ppMouseClick].Hyperlink.Address = "http://www.microsoft.com";
    Fouad Roumieh

  • Can I transfer the entries in my calendar using NFC and S Beam to another Galaxy III?

    Can I transfer the entries in my calendar using NFC and S Beam to another Galaxy III or is there another way?

        Hi Jcrumet!
    Fantastic question! I know its important to have a device that can help make daily activities easy. Let's get this resolved. Yes, NFC through Android Beam lets you instantly share URLs, contacts and calendar events with other Android Beam-capable devices. Are you having issues completing a transfer? If so, what is the specific error message that you are receiving? Just to clarify, are you wanting another way to send a calendar entry to another galaxy 3 device outside of NFC/S Beam? Keep me posted.
    Thanks,
    Pamelaf_vzwsupport
    Tweet us @vzwsupport

Maybe you are looking for

  • Apple web site videos not working

    I'm using Safari for Mac ver. 5.0.3 and none of the videos on the Apple web site are working. The audio is doubled also. Help

  • Group_concat on multiple tables

    Hello, I have been spinning my wheels for countless hours trying to figure this one out. Hope someone can lend a hand! ;-) I have 4 tables: 1) Field_Tickets - Field_Tickets.field_tickets_id is the main field I wish to group on. 2) Field_Tickets_Has_E

  • Report 2 a tcode

    hi everyone i hav a alv report which displays d sales quantity in each storage location..it running gud in d abap ediotor(se38)...now i should compile dis report by giving a transactio..,i,e,i shouldnt go 2 d edotor anymore...i should giv d transacti

  • Background image for Aftable

    Hi All, I am using JDeveloper 11.1.1.7. My scenario is need to show one <af:table> with background image.I tried this below CSS, af|table.myTable background-image: url("../img/sampleImage.png") ; It's wokring fine without data in the table.But after

  • Can't open imovie file!

    Oh please help! I am at my wits end. I created a 13 min short movie in Imovie 5.0.2, then copied it and made a shorter version of the film. But now whenever I try to open my original long version, it loads, pops open for a second then shuts down. I t