Search This Blog

Tuesday, March 10, 2015

Update Competence Element using API

DECLARE

  v_competence_element_id     number;
  v_object_version_number     number := 2;
  v_type                      varchar2(50) := 'REQUIREMENT';
  v_business_group_id         number := 61;
  v_competence_id             number := 4560;
  v_proficiency_level_id      number := NULL;
  v_high_proficiency_level_id number := NULL;
  v_effective_date_from       date := '01-APR-2015';
  v_job_id                    number := 1151;
  v_position_id               number; --:=41470;                                                                
  v_effective_date            date := '01-APR-2015'; --sysdate;

BEGIN

  fnd_global.apps_initialize(141325, 50112, 800);
  --alter session set nls_language = 'AMERICAN'

  HR_COMPETENCE_ELEMENT_API.update_competence_element(p_competence_element_id => 5560,
                                                      p_object_version_number => v_object_version_number,
                                                      p_effective_date_to     => '31-Mar-2015',
                                                      p_effective_date        => '01-Apr-2015',
                                                      p_party_id              => null);

  dbms_output.put_line('Success');

exception
  when others then
    dbms_output.put_line('error : ' || sqlerrm);
END;

API used for assigning competencies to Job/position

DECLARE

  v_competence_element_id     number;
  v_object_version_number     number;
  v_type                      varchar2(50) := 'REQUIREMENT';
  v_business_group_id         number := 61;
  v_competence_id             number := 4560;
  v_proficiency_level_id      number := NULL;
  v_high_proficiency_level_id number := NULL;
  v_effective_date_from       date := '01-APR-2015';
  v_job_id                    number := 1151;
  v_position_id               number; --:=41470;                                                                
  v_effective_date            date := '01-APR-2015'; --sysdate;

BEGIN

  fnd_global.apps_initialize(141325, 50112, 800);
  --alter session set nls_language = 'AMERICAN'

  HR_COMPETENCE_ELEMENT_API.CREATE_COMPETENCE_ELEMENT(p_validate                  => FALSE,
                                                      p_competence_element_id     => v_competence_element_id,
                                                      p_object_version_number     => v_object_version_number,
                                                      p_type                      => v_type,
                                                      p_business_group_id         => v_business_group_id,
                                                      p_competence_id             => v_competence_id,
                                                      p_mandatory                 => 'Y',
                                                      p_proficiency_level_id      => v_proficiency_level_id,
                                                      p_high_proficiency_level_id => v_high_proficiency_level_id,
                                                      p_effective_date_from       => v_effective_date_from,
                                                      p_job_id                    => v_job_id,
                                                      p_position_id               => v_position_id,
                                                      p_effective_date            => v_effective_date);

  dbms_output.put_line('v_competence_element_id=' ||
                       v_competence_element_id);

exception
  when others then
    dbms_output.put_line('error : ' || sqlerrm);
END;

Sunday, September 28, 2014

Approved Leave PQH History Table Approval History pqh_ss_transaction_history

SELECT ppx.employee_number staff_no, ppx.attribute14 requester_name,
       hr_general.decode_organization (ppx.business_group_id) outstation,
       pt.NAME, TO_CHAR (paa.date_start, 'DD-Mon-RRRR') from_date,
       TO_CHAR (paa.date_end, 'DD-Mon-RRRR') TO_DATE, 'Approved' status,
       TO_CHAR (TRUNC (paa.creation_date), 'DD-Mon-RRRR') creation_date,
       xx.last_update_date submission_date, xx.creation_date approval_date,
       ppx1.full_name approver_name
  FROM per_absence_attendances paa,
       per_absence_attendance_types pt,
       per_people_x ppx,
       fnd_user fu,
       per_people_x ppx1,
       (SELECT paa.creation_date, pth.last_update_date,
               paa.absence_attendance_id
          FROM pqh_ss_transaction_history pth,
               pqh_ss_step_history psh,
              per_absence_attendances paa
         WHERE pth.transaction_history_id = psh.transaction_history_id
           AND paa.absence_attendance_id = psh.pk1
           AND pth.process_name = 'XX') xx
WHERE paa.business_group_id IN (XX)
   AND paa.absence_attendance_type_id = pt.absence_attendance_type_id
   AND pt.date_end IS NULL
   AND paa.person_id = ppx.person_id
   AND xx.absence_attendance_id = paa.absence_attendance_id
   AND fu.user_id = paa.created_by
   AND fu.employee_id = ppx1.person_id

Wednesday, July 30, 2014

App-Pay-07070 Error Comes Up while Trying To Open a FastPath Form

ERROR
APP-PAY-07070: This menu option is invalid. Customization not valid for use with this form.
Cause: The menu option you have chosen has been defined to pass an incorrect form customization
name. The customization name is not valid for use with this form.


-- To implement the solution, please execute the following steps::
To implement the solutions, please follow the appropriate plan.

1) If the CustomForm has not yet been created, ensure that the responsibility used to create it is
associated with the desired Business Group ID.

a - Login to System Administrator
b - Navigate: Profile > System
c - Query the Responsibility that the form is to be created in and profile option HR:Business
Group ID.
d - Verify that the value associated with the profile option is valid. If it is inappropriate,
either change it or find a responsibility where the value of this profile option is appropriate.


2) If the CustomForm has already been created and you are now trying to attach to a
responsibility, verify the Business Group ID associated with the CustomForm.

a - Login to US HRMS Manager
b - Navigate: Security > CustomForm
c - Query the CustomForm in question.
d - On the menu toolbar, select Help > Diagnostics > Examine
NOTE: This will require a password that may need to be obtained from the IT team.
e - Query Block = PCR, Field = Business Group ID
f - Verify the value of the Business Group ID.
g - Login to System Administrator
h - Navigate: Profile > System
i - Query the Responsibility that the form is to be created in and profile option HR:Business
Group ID.
j - Verify that the value in the profile option matches the value associated with the CustomForm.

FND_SESSION in Custom Responsibility Session Effective Date Setting


Sunday, July 20, 2014

Salary Change Query in Oracle HRMS/Payroll

select papf.employee_number,     
       papf.full_name,
       ppp_old.proposed_salary_n old_sal,
       ppp_new.proposed_salary_n new_sal,
       ppp_new.change_date
--,ppp_old.last_change_date,ppp_new.last_change_date
  from apps.per_all_people_f      papf,
       apps.per_all_assignments_f paaf,
       apps.per_pay_proposals     ppp_old,
       apps.per_pay_proposals     ppp_new
where 1 = 1
   and papf.person_id = paaf.person_id
   and paaf.assignment_type = 'E'
   and paaf.primary_flag = 'Y'
   and paaf.assignment_id = ppp_old.assignment_id
   and trunc(sysdate) between papf.effective_start_date and
       papf.effective_end_date
   and trunc(sysdate) between paaf.effective_start_date and
       paaf.effective_end_date
      --and ppp_new.change_date between trunc(sysdate) - 60 and trunc(sysdate)
      --and ppp_new.approved = 'Y'
   and ppp_new.assignment_id = paaf.assignment_id
   and ppp_new.last_change_date = ppp_old.change_date
   and ppp_new.change_date =
       (select max(x.change_date)
          from per_pay_proposals x
         where x.assignment_id = paaf.assignment_id)

   and paaf.assignment_id = 282416