3 Replies Latest reply: Jun 21, 2013 8:32 AM by Vigneswar Battu RSS

    Question on Compensation Fast Formula

    user626324

      I have a requirement in FF where I need to find the list of employees who the current person as the manager. Find the countries and annualized salary of these employees. Find the a value (say- x)from a user defined table based on the employees' country.

      Calcualate y= sum all the x* annualized salary of each employee

      Return Y.

      Is there a way I could achieve the above in Fusion?

       

      Thanks!

      Paramita

        • 1. Re: Question on Compensation Fast Formula
          Peddi

          For your case, write a PL/SQL function(takes person and/or assignment id) which does whatever you want and return the value.

           

          In Fast Formula, get the value by calling the above created PL/SQL function(by creating fast formula function)

          Same way, call this PL/SQL function from anywhere(may be from Fusion as well. Sorry I am not well versed with Fusion)

           

          Regards,

          Peddi.

          • 2. Re: Question on Compensation Fast Formula
            Sanjay Singh

            Hi Paramita,

             

            In addition to peddi, if you were looking at how to get the reportees for a respective manager then please find the query below:

             

            SELECT DISTINCT papf1.full_name leve1_full_name

                 , papf1.employee_number level1_empno

                 , papf2.full_name leve2_full_name

                 , papf2.employee_number level2_empno

              FROM hr.per_all_people_f papf1

                 , hr.per_all_assignments_f paaf1

                 , hr.per_all_assignments_f paaf2

                 , hr.per_all_people_f papf2

              WHERE  papf1.person_id = paaf1.person_id

              and papf1.current_employee_flag = 'Y'

              AND paaf1.supervisor_id = papf2.person_id(+)

              AND papf2.person_id = paaf2.person_id

              and paaf1.supervisor_id = 500

              and trunc(sysdate) between papf1.effective_start_date and papf1.effective_end_date

              ORDER BY leve1_full_name;

             

            Once you have the list build a function which will execute the business logic.

             

            Thanks,

            Sanjay

            • 3. Re: Question on Compensation Fast Formula
              Vigneswar Battu

              Hi Paramita,

               

              As Peddi suggested, you should be able to write a Pl/sql function and get whatever value you need into the Formula.

              Also, try using the Fusion forums for this -

               

              Fusion Applications

               

              Cheers,

              Vignesh