Total Pageviews

Search This Blog

Thursday, December 30, 2010

Create Element Link in Oracle Apps


 /* Formatted on 2010/12/30 16:10 (Formatter Plus v4.8.8) */
CREATE OR REPLACE PROCEDURE apps.xx_sam_element_link_conversion
IS
/* *****************************************************************************
*******************************************************************************
        Created By Sameer Patil
*******************************************************************************
****************************************************************************** */
   l_status                  VARCHAR2 (50);
   l_error                   VARCHAR2 (250);
   l_element_link_id         NUMBER         := NULL;
   l_comment_id              NUMBER         := NULL;
   l_object_version_number   NUMBER         := NULL;
   l_effective_start_date   date;
   l_effective_end_date      date;
   l_ele_id                  NUMBER;
   l_id                      NUMBER;
   l_bg_id                   NUMBER;
   p_cost_segment1           VARCHAR2 (50)  := '01';
   p_cost_segment10          VARCHAR2 (50)  := '810';
   p_cost_segment20          VARCHAR2 (50)  := '6140';
   p_cost_segment2           VARCHAR2 (50)  := '1400';
   p_cost_segment3           VARCHAR2 (50)  := '000';
   p_balance_segment1        VARCHAR2 (50)  := '01';
   p_balance_segment10       VARCHAR2 (50)  := '810';
   p_balance_segment20       VARCHAR2 (50)  := '2420';
   p_balance_segment2        VARCHAR2 (50)  := '1400';
   p_balance_segment3        VARCHAR2 (50)  := '000';

   CURSOR ele_cur
   IS
      SELECT *
        FROM xx_sam_element_link;
BEGIN
   DBMS_OUTPUT.put_line
            ('##############################################################');
   DBMS_OUTPUT.put_line ('DATA MIGRATION FOR ELEMENT LINK');
   DBMS_OUTPUT.put_line
            ('##############################################################');

   FOR ele_ptr IN ele_cur
   LOOP
      l_status := 'E';
      l_error := NULL;

      BEGIN
         SELECT element_type_id
           INTO l_id
           FROM pay_element_types_f
          WHERE TRIM (UPPER (element_name)) =
                                           TRIM (UPPER (ele_ptr.element_name));
      EXCEPTION
         WHEN NO_DATA_FOUND
         THEN
            DBMS_OUTPUT.put_line (   'No data in Table pls verify'
                                  || SUBSTR (SQLERRM, 1, 250)
                                 );
      END;

      BEGIN
         SELECT business_group_id
           INTO l_bg_id
           FROM per_business_groups
          WHERE UPPER (NAME) = UPPER (ele_ptr.org_name);
      EXCEPTION
         WHEN NO_DATA_FOUND
         THEN
            DBMS_OUTPUT.put_line
                              (   'No data in Table pls verify(Organization)'
                               || SUBSTR (SQLERRM, 1, 250)
                              );
      END;

      BEGIN
         SELECT element_type_id
           INTO l_ele_id
           FROM pay_element_types_f
          WHERE UPPER (TRIM (element_name)) =
                                           UPPER (TRIM (ele_ptr.element_name));

         IF l_ele_id IS NOT NULL
         THEN
            l_status := 'U';
         ELSE
            l_status := 'S';
         END IF;
      EXCEPTION
         WHEN NO_DATA_FOUND
         THEN
            l_status := 'S';
         WHEN OTHERS
         THEN
            l_status := 'E';
            l_error := 'Error at SQL';
      END;

     IF l_status = 'S'
      THEN
         BEGIN
            DBMS_OUTPUT.put_line ('DATA MIGRATION FOR ELEMENT LINK');
            pay_element_link_api.create_element_link
                       (p_validate                          => false,
                        p_effective_date                    => SYSDATE,
                        p_element_type_id                   => l_id,
                        p_business_group_id                 => l_bg_id,
                        p_costable_type                     => 'N',
                        p_organization_id                   => l_bg_id,
                        p_job_id                            => NULL,
                        p_position_id                       => NULL,
                        p_people_group_id                   => NULL,
                        p_cost_allocation_keyflex_id        => NULL,
                        p_link_to_all_payrolls_flag         => 'N',
                        p_standard_link_flag                => 'Y',
                        p_transfer_to_gl_flag               => 'Y',
                        p_comments                          => NULL,
                        -- p_organization_id                   => NULL,
                        p_location_id                       => NULL,
                        p_grade_id                          => NULL,
                        p_balancing_keyflex_id              => NULL,
                        p_element_set_id                    => NULL,
                        p_qualifying_age                    => NULL,
                        p_qualifying_length_of_service      => NULL,
                        p_qualifying_units                  => NULL,
                        p_cost_segment1                     => p_cost_segment1,
                        p_cost_segment10                    => p_cost_segment10,
                        p_cost_segment20                    => p_cost_segment20,
                        p_cost_segment2                     => p_cost_segment2,
                        p_cost_segment3                     => p_cost_segment3,
                        p_balance_segment1                  => p_balance_segment1,
                        p_balance_segment10                 => p_balance_segment10,
                        p_balance_segment20                 => p_balance_segment20,
                        p_balance_segment2                  => p_balance_segment2,
                        p_balance_segment3                  => p_balance_segment3,
                        p_balance_concat_segments           => (   p_balance_segment1
                                                                || '.'
                                                                || p_balance_segment10
                                                                || '.'
                                                                || p_balance_segment20
                                                                || '.'
                                                                || p_balance_segment2
                                                                || '.'
                                                                || p_balance_segment3
                                                               ),
                        p_cost_concat_segments              => (   p_cost_segment1
                                                                || '.'
                                                                || p_cost_segment10
                                                                || '.'
                                                                || p_cost_segment20
                                                                || '.'
                                                                || p_cost_segment2
                                                                || '.'
                                                                || p_cost_segment3
                                                               ),
                        --         p_comments                   => 'Test Migration For Element Link',
                        p_element_link_id                   => l_element_link_id,
                        p_comment_id                        => l_comment_id,
                        p_object_version_number             => l_object_version_number,
                        p_effective_start_date              => l_effective_start_date,
                        p_effective_end_date                => l_effective_end_date
                       );
            COMMIT;
            l_status := 'S';
            l_error := 'Success';
         EXCEPTION
            WHEN OTHERS
            THEN
               l_status := 'E';
               l_error :=
                        'Error Occured at IN api' || SUBSTR (SQLERRM, 1, 200);
         END;
    END IF;

      UPDATE xx_sam_element_link
         SET status = l_status,
             error = l_error
       WHERE element_name = ele_ptr.element_name;

      COMMIT;
   END LOOP;                                                     /*First FOR*/
END xx_sam_element_link_conversion;

Thanks and Regards
Sameer S Patil

"Team Work" More We Less Me.

Wednesday, December 22, 2010

Most Useful "Oracle Payroll Table"

Most Useful "Oracle Payroll Table"
 
pay_element_types_f => Element definitions
pay_element_input_values_f => Input values Definition
pay_element_links_f => Element Link definitions
pay_balance_feeds_f => Balance Feeds
pay_element_entries_f => Element entries
pay_element_entry_values_f => Element Entry Values

"Team Work" More We Less Me.                
Sameer Patil

Monday, December 13, 2010

Useful Links For Oracle Apps

Hi All,
Find the useful links for APPS.

www.erpdown.com

http://ilearningcontent.oracle.com/content/public/morris/tutor/hr/HTML/HUMAN_RESOURCES_MANAGER.htm



http://www.oracle.com/accessibility/



http://download.oracle.com/docs/cd/A60725_05/html/comnls/us/per/index.html

List Of API in Oracle Apps


Sameer Patil,Oracle Apps,Bangalore
Updating the Per_periods_of_service table using
hr_ex_employee_api.update_term_details_emp

Terminating using
hr_ex_employee_api.actual_termination_emp

Applying the final process in the shared instance using hr_ex_employee_api.final_process_emp

Re - Hire
hr_employee_api.re_hire_ex_employee

Updation On Already Existing Records
hr_person_api.update_us_person

New Hire
hr_employee_api.create_us_employee

Costing
pay_cost_allocation_api.create_cost_allocation

Load Update Assign
hr_assignment_api.update_us_emp_asg

Load Update Assign Criteria
hr_assignment_api.update_emp_asg_criteria

IF CONTACT PERSON ALREADY CREATED AND ONLY RELATION SHIP IS TO BE CREATED -
Note : Contact Person Id Is To Be Passed
hr_contact_rel_api.create_contact

If Contact Person Already Not Created
Note : Contact Person Id is passed as Null(default of API)
hr_contact_rel_api.create_contact

Load Phones
hr_phone_api.create_phone
hr_person_address_api.update_person_address

Load Addresses
hr_person_address_api.update_person_address
hr_person_address_api.create_person_address

Load Payment Methods
hr_personal_pay_method_api.create_us_personal_pay_method

Element Loading
py_element_entry_api.create_element_entry
py_element_entry_api.update_element_entry

Load Salaries
hr_upload_proposal_api.upload_salary_proposal

Approve Salary Proposal
hr_maintain_proposal_api.approve_salary_proposal

Starts To Validate/Load Federal Tax For A Person pay_federal_tax_rule_api.update_fed_tax_rule

State tax rules
pay_state_tax_rule_api.create_state_tax_rule
pay_state_tax_rule_api.update_state_tax_rule

County Tax Rules
pay_county_tax_rule_api.create_county_tax_rule
pay_county_tax_rule_api.update_county_tax_rule

City Tax Rules
pay_city_tax_rule_api.create_city_tax_rule
pay_city_tax_rule_api.update_city_tax_rule

Schools and Colleges
per_esa_upd.upd
per_esa_ins.ins

Performance Reviews
hr_perf_review_api.create_perf_review
hr_perf_review_api.update_perf_review

State Information Taxes
hr_sit_api.update_sit
hr_sit_api.create_sit

Qualifications
per_qualifications_api.create_qualification
per_qualifications_api.update_qualification

Locations
hr_location_api.update_location
hr_location_api.create_location

Organization
hr_organization_api.update_organization
hr_organization_api.create_org_classification

If any Change in Organization information.
if information2 = 'Y' then
hr_organization_api.enable_org_classification

If any Change in Organization information.
if information2 = 'N' then
hr_organization_api.disable_org_classification

If Organization does not exist in instance
hr_organization_api.create_organization api

Jobs
hr_job_api.update_job
hr_job_api.create_job

Positions
hr_position_api.update_position
hr_position_api.create_position

Tuesday, October 12, 2010

Oracle HRMS tables

HRMS Tables:

PER_ALL_PEOPLE_F
PER_ALL_ASSIGNMENTS_F
HR_ALL_ORGANIZATIONS_UNITS
PER_LOCATIONS_ALL
PER_POSITION_DEFINITAION
PER_POSITIONS
PER_GRADES
PER_JOBS
PER_PERSON_TYPES
PER_ASSIGNMENT_TYPES
PER_PERSON_TYPE_USAGE
PER_PEOPLE_EXTRA_INFO
PER_DISABILITIES
PER_QUALIFICATIONS
PAY_PEOPLE_GROUP