API to Purge an person from Oracle HRMS

on Saturday, October 15, 2011


DECLARE
   l_person_org_manager_warning VARCHAR2 (200);
BEGIN
   hr_person_api.delete_person(p_validate => FALSE,
                               p_effective_date => SYSDATE,
                               p_person_id => :person_id,
                               p_perform_predel_validation => FALSE,
                               p_person_org_manager_warning => l_person_org_manager_warning
                              );
   COMMIT;
END;
Before purging the person from Oracle HRMS we need to make sure that the employee and fnd_user link is been deleted and also the person should not have an active payroll.

If the employee has an active payroll then we cannot purge the record. The alternative way is to either end date the employee using the termination screen or you need to change the person from 'Employee' to 'Applicant' and then use the above API again to purge the record.

Request Group and Responsibility by Concurrent Program

on Tuesday, October 11, 2011


To debug an issue of any concurrent program which fails with errors we need to relogin to  reproduce the error. It would be useful if we know in which request group and in which responsibility the concurrent program is available. The below SQL query will help us to get this information.



 

SELECT
    frg.request_group_name,
    frg.description,
    cp.concurrent_program_id,
    cp.concurrent_program_name,
    cpt.user_concurrent_program_name,
    frv.responsibility_name
FROM
    fnd_request_groups              frg,
    fnd_request_group_units       frgu,
    fnd_concurrent_programs      cp,
    fnd_concurrent_programs_tl   cpt,
    fnd_responsibility_vl              frv
WHERE
           frg.request_group_id                     = frgu.request_group_id
    AND frgu.request_unit_id                      = cp.concurrent_program_id
    AND cp.concurrent_program_id              = cpt.concurrent_program_id
    AND frv.request_group_id                      = frg.request_group_id(+)
    AND frg.request_group_name                LIKE  'All Reports'
    AND frg.description                              = 'All Purchasing SRS Reports'
    AND cpt.user_concurrent_program_name LIKE 'Account Analysis Report%'