About Me

My photo
Oracle Apps - Techno Functional consultant
Showing posts with label API. Show all posts
Showing posts with label API. Show all posts

Sunday, April 21

Oracle HRMS API's




HRMS API's
1.     Updating the Per_periods_of_service table using
               hr_ex_employee_api.update_term_details_emp

2.     Terminating using
               hr_ex_employee_api.actual_termination_emp

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

4.     Re - Hire
                 hr_employee_api.re_hire_ex_employee

5.     Updation On Already Existing Records
               hr_person_api.update_us_person

6.     New Hire
              hr_employee_api.create_us_employee

7.     Costing
             pay_cost_allocation_api.create_cost_allocation

8.     Load Update Assign
                hr_assignment_api.update_us_emp_asg

9.     Load Update Assign Criteria
                  hr_assignment_api.update_emp_asg_criteria

10.                        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

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

12.                        Load Phones
             hr_phone_api.create_phone
             hr_person_address_api.update_person_address

13.                        Load Addresses
hr_person_address_api.update_person_address
hr_person_address_api.create_person_address

14.                        Load Payment Methods
hr_personal_pay_method_api.create_us_personal_pay_method

15.                        Element Loading
py_element_entry_api.create_element_entry
py_element_entry_api.update_element_entry

16.                        Load Salaries
hr_upload_proposal_api.upload_salary_proposal

17.                        Approve Salary Proposal
hr_maintain_proposal_api.approve_salary_proposal

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

19.                        State tax rules
pay_state_tax_rule_api.create_state_tax_rule
pay_state_tax_rule_api.update_state_tax_rule

20.                        County Tax Rules
pay_county_tax_rule_api.create_county_tax_rule
pay_county_tax_rule_api.update_county_tax_rule

21.                        City Tax Rules
pay_city_tax_rule_api.create_city_tax_rule
pay_city_tax_rule_api.update_city_tax_rule

22.                        Schools and Colleges
per_esa_upd.upd
per_esa_ins.ins

23.                        Performance Reviews
hr_perf_review_api.create_perf_review
hr_perf_review_api.update_perf_review

24.                        State Information Taxes
hr_sit_api.update_sit
hr_sit_api.create_sit

25.                        Qualifications
per_qualifications_api.create_qualification
per_qualifications_api.update_qualification

26.                        Locations
hr_location_api.update_location
hr_location_api.create_location

27.                        Organization
hr_organization_api.update_organization
hr_organization_api.create_org_classification

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

If any Change in Organization information.

29.                        if information2 = 'N' then
hr_organization_api.disable_org_classification

30.                        If Organization does not exist in instance
hr_organization_api.create_organization api

31.                        Jobs
hr_job_api.update_job
hr_job_api.create_job

32.                        Positions
hr_position_api.update_position
hr_position_api.create_position

The query to get the list of HRMS API's in Oracle is as follows:
select * from all_objects where object_name like 'HR%\_API' escape '\' and object_type = 'PACKAGE'
union
select * from all_objects where object_name like 'PAY%\_API' escape '\' and object_type = 'PACKAGE'
union
select * from all_objects where object_name like 'PER%\_API' escape '\' and object_type = 'PACKAGE'

Thursday, April 18

API to Cancel the Oracle AP Invoice



AP_CANCEL_PKG.IS_INVOICE_CANCELLABLE:

Is_Invoice_Cancellable is a Function in the AP_CANCEL_PKG package that checks that an Invoice is cancellable or not whenan Invoice Cancellation process starts.
It follows the following steps and returns a Booleanvalue depending on the result.
    If invoice containsdistribution that does not have open GL period return FALSE.
    If invoice has an effective payment, return FALSE.
    If invoice isselected for payment, return FALSE.
    If invoice isalready cancelled, return FALSE.
    If invoice iscredited invoice, return FALSE.
    If invoices have been applied against this invoice, return FALSE.
    If invoice ismatched to Finally Closed PO’s, return FALSE.
    If project related invoices have pending adjustments, return FALSE.
    If cancelling will cause qty_billed or amount_billed to less than 0, returnFALSE.
    If none ofabove, invoice is cancellable return True.
Here is a small procedure to check ifan Invoice is cancellable or not.

Create or replace procedure XX_INV_CANCELLABLE (p_inv_id IN NUMBER)
is
    v_boolean               BOOLEAN;
    v_error_code            VARCHAR2(100);
    v_debug_info            VARCHAR2(1000);
begin
    v_boolean := AP_CANCEL_PKG.IS_INVOICE_CANCELLABLE
                         (
                             P_invoice_id       => p_inv_id,
                            P_error_code       => v_error_code,
                            P_debug_info       => v_debug_info,
                            P_calling_sequence => NULL
                         );
    IF v_boolean=TRUE
    THEN
       DBMS_OUTPUT.put_line ('Invoice '||p_inv_id|| ' is cancellable' );
    ELSE
       DBMS_OUTPUT.put_line ('Invoice '||p_inv_id|| ' is not cancellable :'|| v_error_code );
    END IF;
End XX_INV_CANCELLABLE;

Execute XX_INV_CANCELLABLE(88888);