947: l_review_region VARCHAR2(80);
948: common_exception EXCEPTION;
949:
950: lv_update_method VARCHAR2(30) := 'PRIMARY' ;
951: l_transaction_id hr_api_transactions.transaction_id%type;
952: l_transaction_step_id hr_api_transaction_steps.transaction_step_id%type;
953: l_transaction_value_id hr_api_transaction_values.transaction_value_id%type;
954: l_step_obj_version_number hr_api_transaction_steps.object_version_number%type;
955: transaction_value_fs VARCHAR2(80);
948: common_exception EXCEPTION;
949:
950: lv_update_method VARCHAR2(30) := 'PRIMARY' ;
951: l_transaction_id hr_api_transactions.transaction_id%type;
952: l_transaction_step_id hr_api_transaction_steps.transaction_step_id%type;
953: l_transaction_value_id hr_api_transaction_values.transaction_value_id%type;
954: l_step_obj_version_number hr_api_transaction_steps.object_version_number%type;
955: transaction_value_fs VARCHAR2(80);
956:
949:
950: lv_update_method VARCHAR2(30) := 'PRIMARY' ;
951: l_transaction_id hr_api_transactions.transaction_id%type;
952: l_transaction_step_id hr_api_transaction_steps.transaction_step_id%type;
953: l_transaction_value_id hr_api_transaction_values.transaction_value_id%type;
954: l_step_obj_version_number hr_api_transaction_steps.object_version_number%type;
955: transaction_value_fs VARCHAR2(80);
956:
957: CURSOR c_fed_allowance_limit is
950: lv_update_method VARCHAR2(30) := 'PRIMARY' ;
951: l_transaction_id hr_api_transactions.transaction_id%type;
952: l_transaction_step_id hr_api_transaction_steps.transaction_step_id%type;
953: l_transaction_value_id hr_api_transaction_values.transaction_value_id%type;
954: l_step_obj_version_number hr_api_transaction_steps.object_version_number%type;
955: transaction_value_fs VARCHAR2(80);
956:
957: CURSOR c_fed_allowance_limit is
958: select fed_information1
961: and trunc(sysdate) between effective_start_date and effective_end_date;
962:
963: l_fed_allowance_limit pay_us_federal_tax_info_f.fed_information1%type;
964:
965: cursor get_function_info ( p_item_type HR_API_TRANSACTION_STEPS.item_type%TYPE
966: ,p_item_key HR_API_TRANSACTION_STEPS.item_key%TYPE ) is
967: select fff.function_id, fff.function_name
968: from fnd_form_functions_vl fff
969: where fff.function_name = ( select iav.text_value
962:
963: l_fed_allowance_limit pay_us_federal_tax_info_f.fed_information1%type;
964:
965: cursor get_function_info ( p_item_type HR_API_TRANSACTION_STEPS.item_type%TYPE
966: ,p_item_key HR_API_TRANSACTION_STEPS.item_key%TYPE ) is
967: select fff.function_id, fff.function_name
968: from fnd_form_functions_vl fff
969: where fff.function_name = ( select iav.text_value
970: from wf_item_attribute_values iav
971: where iav.item_type = p_item_type
972: and iav.item_key = p_item_key
973: and iav.name = 'P_CALLED_FROM') ;
974:
975: lv_process_name hr_api_transactions.process_name%TYPE;
976: l_function_id hr_api_transactions.function_id%TYPE;
977: l_function_name fnd_form_functions_vl.function_name%TYPE default null;
978: lv_transaction_type varchar2(20);
979:
972: and iav.item_key = p_item_key
973: and iav.name = 'P_CALLED_FROM') ;
974:
975: lv_process_name hr_api_transactions.process_name%TYPE;
976: l_function_id hr_api_transactions.function_id%TYPE;
977: l_function_name fnd_form_functions_vl.function_name%TYPE default null;
978: lv_transaction_type varchar2(20);
979:
980: --added by vaprakas 11/21/06 Bug 5607135
1408: hr_utility.trace('The global state exempt list is : '|| g_state_exempt_list);
1409:
1410:
1411: /* If we have come so far that means we have no errors. So insert data
1412: into hr_api_transactions, hr_api_transaction_steps and hr_api_transaction_values.
1413: Need to insert data into these tables to store OLD and NEW values for W4. These
1414: OLD and NEW values are used in the review page. */
1415:
1416: -- First the hr_api_transactions table
1412: into hr_api_transactions, hr_api_transaction_steps and hr_api_transaction_values.
1413: Need to insert data into these tables to store OLD and NEW values for W4. These
1414: OLD and NEW values are used in the review page. */
1415:
1416: -- First the hr_api_transactions table
1417:
1418: l_transaction_id := hr_transaction_ss.get_transaction_id(p_itemtype, p_itemkey);
1419:
1420: if l_transaction_id is null then /* transaction does not exists */
1454: p_creator_person_id => ln_person_id
1455: ,p_transaction_privilege => 'PRIVATE'
1456: ,p_transaction_id => l_transaction_id
1457: ,p_function_id =>l_function_id
1458: ,p_transaction_ref_table => 'HR_API_TRANSACTIONS'
1459: ,p_transaction_type =>lv_transaction_type
1460: ,p_selected_person_id =>ln_person_id
1461: ,p_item_type =>p_itemtype
1462: ,p_item_key =>p_itemkey
1463: ,p_transaction_effective_date=>sysdate
1464: ,p_process_name =>lv_process_name
1465: );
1466:
1467: -- hr_api_transaction_steps
1468:
1469: hr_transaction_api.create_transaction_step(
1470: p_creator_person_id => ln_person_id,
1471: p_transaction_id => l_transaction_id,
1485: else /* transaction exists */
1486:
1487: hr_utility.trace('l_transaction_id : '|| l_transaction_id);
1488: select transaction_step_id into l_transaction_step_id
1489: from HR_API_TRANSACTION_STEPS
1490: where transaction_id = l_transaction_id;
1491:
1492: end if;
1493:
1490: where transaction_id = l_transaction_id;
1491:
1492: end if;
1493:
1494: -- hr_api_transaction_values
1495:
1496: -- Filing Status Meaning
1497: -- get the filing status meaning to store in the transaction_value table
1498:
1649: p_trans_id IN VARCHAR2 Default null,
1650: p_step_id IN VARCHAR2 Default null,
1651: p_out_values OUT nocopy VARCHAR2 ) IS
1652:
1653: l_step_id hr_api_transaction_steps.transaction_step_id%type;
1654:
1655: CURSOR c_trans_values IS
1656:
1657: select v.datatype,v.name,v.varchar2_value,number_value
1654:
1655: CURSOR c_trans_values IS
1656:
1657: select v.datatype,v.name,v.varchar2_value,number_value
1658: from hr_api_transaction_values v
1659: where v.transaction_step_id = l_step_id
1660: order by transaction_value_id;
1661:
1662: l_datatype hr_api_transaction_values.datatype%type;
1658: from hr_api_transaction_values v
1659: where v.transaction_step_id = l_step_id
1660: order by transaction_value_id;
1661:
1662: l_datatype hr_api_transaction_values.datatype%type;
1663: l_name hr_api_transaction_values.name%type;
1664: l_varchar2_value hr_api_transaction_values.varchar2_value%type;
1665: l_number_value hr_api_transaction_values.number_value%type;
1666:
1659: where v.transaction_step_id = l_step_id
1660: order by transaction_value_id;
1661:
1662: l_datatype hr_api_transaction_values.datatype%type;
1663: l_name hr_api_transaction_values.name%type;
1664: l_varchar2_value hr_api_transaction_values.varchar2_value%type;
1665: l_number_value hr_api_transaction_values.number_value%type;
1666:
1667: common_exception EXCEPTION;
1660: order by transaction_value_id;
1661:
1662: l_datatype hr_api_transaction_values.datatype%type;
1663: l_name hr_api_transaction_values.name%type;
1664: l_varchar2_value hr_api_transaction_values.varchar2_value%type;
1665: l_number_value hr_api_transaction_values.number_value%type;
1666:
1667: common_exception EXCEPTION;
1668: BEGIN
1661:
1662: l_datatype hr_api_transaction_values.datatype%type;
1663: l_name hr_api_transaction_values.name%type;
1664: l_varchar2_value hr_api_transaction_values.varchar2_value%type;
1665: l_number_value hr_api_transaction_values.number_value%type;
1666:
1667: common_exception EXCEPTION;
1668: BEGIN
1669:
1677:
1678: if (p_trans_id is not null and p_step_id is null) then
1679:
1680: select transaction_step_id into l_step_id
1681: from hr_api_transaction_steps
1682: where transaction_id = to_number(p_trans_id);
1683:
1684: else
1685: l_step_id := to_number(p_step_id);
1838: ,p_additional_amount pay_us_emp_fed_tax_rules_f.fit_additional_tax%TYPE
1839: ,p_last_name_diff VARCHAR2 DEFAULT 'N'
1840: ,p_exempt_status_code pay_us_emp_fed_tax_rules_f.fit_exempt%TYPE
1841: ,p_org_exempt_status_code pay_us_emp_fed_tax_rules_f.fit_exempt%TYPE
1842: ,p_transaction_id hr_api_transactions.transaction_id%type
1843: ,p_person_id VARCHAR2
1844: ,p_transaction_type VARCHAR2
1845: ,p_source_name VARCHAR2
1846: --,p_update_method VARCHAR2
2775:
2776: Cursor c_trans_value is
2777:
2778: select datatype,name,varchar2_value,number_value
2779: from hr_api_transaction_values
2780: where transaction_step_id = p_transaction_step_id
2781: order by transaction_value_id;
2782:
2783: Cursor c_trans_step is
2782:
2783: Cursor c_trans_step is
2784:
2785: select transaction_id, creator_person_id
2786: from hr_api_transaction_steps
2787: where transaction_step_id = p_transaction_step_id;
2788:
2789: l_datatype hr_api_transaction_values.datatype%type;
2790: l_name hr_api_transaction_values.name%type;
2785: select transaction_id, creator_person_id
2786: from hr_api_transaction_steps
2787: where transaction_step_id = p_transaction_step_id;
2788:
2789: l_datatype hr_api_transaction_values.datatype%type;
2790: l_name hr_api_transaction_values.name%type;
2791: l_varchar2_value hr_api_transaction_values.varchar2_value%type;
2792: l_number_value hr_api_transaction_values.number_value%type;
2793:
2786: from hr_api_transaction_steps
2787: where transaction_step_id = p_transaction_step_id;
2788:
2789: l_datatype hr_api_transaction_values.datatype%type;
2790: l_name hr_api_transaction_values.name%type;
2791: l_varchar2_value hr_api_transaction_values.varchar2_value%type;
2792: l_number_value hr_api_transaction_values.number_value%type;
2793:
2794: l_filing_status hr_api_transaction_values.varchar2_value%type;
2787: where transaction_step_id = p_transaction_step_id;
2788:
2789: l_datatype hr_api_transaction_values.datatype%type;
2790: l_name hr_api_transaction_values.name%type;
2791: l_varchar2_value hr_api_transaction_values.varchar2_value%type;
2792: l_number_value hr_api_transaction_values.number_value%type;
2793:
2794: l_filing_status hr_api_transaction_values.varchar2_value%type;
2795:
2788:
2789: l_datatype hr_api_transaction_values.datatype%type;
2790: l_name hr_api_transaction_values.name%type;
2791: l_varchar2_value hr_api_transaction_values.varchar2_value%type;
2792: l_number_value hr_api_transaction_values.number_value%type;
2793:
2794: l_filing_status hr_api_transaction_values.varchar2_value%type;
2795:
2796: l_filing_status_code pay_us_emp_fed_tax_rules_f.filing_status_code%TYPE;
2790: l_name hr_api_transaction_values.name%type;
2791: l_varchar2_value hr_api_transaction_values.varchar2_value%type;
2792: l_number_value hr_api_transaction_values.number_value%type;
2793:
2794: l_filing_status hr_api_transaction_values.varchar2_value%type;
2795:
2796: l_filing_status_code pay_us_emp_fed_tax_rules_f.filing_status_code%TYPE;
2797:
2798: l_allowances hr_api_transaction_values.number_value%type;
2794: l_filing_status hr_api_transaction_values.varchar2_value%type;
2795:
2796: l_filing_status_code pay_us_emp_fed_tax_rules_f.filing_status_code%TYPE;
2797:
2798: l_allowances hr_api_transaction_values.number_value%type;
2799: l_add_tax hr_api_transaction_values.number_value%type;
2800: l_exempt hr_api_transaction_values.varchar2_value%type;
2801:
2802: l_org_filing_status_code pay_us_emp_fed_tax_rules_f.filing_status_code%TYPE;
2795:
2796: l_filing_status_code pay_us_emp_fed_tax_rules_f.filing_status_code%TYPE;
2797:
2798: l_allowances hr_api_transaction_values.number_value%type;
2799: l_add_tax hr_api_transaction_values.number_value%type;
2800: l_exempt hr_api_transaction_values.varchar2_value%type;
2801:
2802: l_org_filing_status_code pay_us_emp_fed_tax_rules_f.filing_status_code%TYPE;
2803: l_org_allowances hr_api_transaction_values.number_value%type;
2796: l_filing_status_code pay_us_emp_fed_tax_rules_f.filing_status_code%TYPE;
2797:
2798: l_allowances hr_api_transaction_values.number_value%type;
2799: l_add_tax hr_api_transaction_values.number_value%type;
2800: l_exempt hr_api_transaction_values.varchar2_value%type;
2801:
2802: l_org_filing_status_code pay_us_emp_fed_tax_rules_f.filing_status_code%TYPE;
2803: l_org_allowances hr_api_transaction_values.number_value%type;
2804: l_org_exempt hr_api_transaction_values.varchar2_value%type;
2799: l_add_tax hr_api_transaction_values.number_value%type;
2800: l_exempt hr_api_transaction_values.varchar2_value%type;
2801:
2802: l_org_filing_status_code pay_us_emp_fed_tax_rules_f.filing_status_code%TYPE;
2803: l_org_allowances hr_api_transaction_values.number_value%type;
2804: l_org_exempt hr_api_transaction_values.varchar2_value%type;
2805: l_last_name_diff hr_api_transaction_values.varchar2_value%TYPE;
2806:
2807: l_item_type hr_api_transaction_steps.item_type%type;
2800: l_exempt hr_api_transaction_values.varchar2_value%type;
2801:
2802: l_org_filing_status_code pay_us_emp_fed_tax_rules_f.filing_status_code%TYPE;
2803: l_org_allowances hr_api_transaction_values.number_value%type;
2804: l_org_exempt hr_api_transaction_values.varchar2_value%type;
2805: l_last_name_diff hr_api_transaction_values.varchar2_value%TYPE;
2806:
2807: l_item_type hr_api_transaction_steps.item_type%type;
2808: l_item_key hr_api_transaction_steps.item_key%type;
2801:
2802: l_org_filing_status_code pay_us_emp_fed_tax_rules_f.filing_status_code%TYPE;
2803: l_org_allowances hr_api_transaction_values.number_value%type;
2804: l_org_exempt hr_api_transaction_values.varchar2_value%type;
2805: l_last_name_diff hr_api_transaction_values.varchar2_value%TYPE;
2806:
2807: l_item_type hr_api_transaction_steps.item_type%type;
2808: l_item_key hr_api_transaction_steps.item_key%type;
2809: l_activity_id hr_api_transaction_steps.activity_id%type;
2803: l_org_allowances hr_api_transaction_values.number_value%type;
2804: l_org_exempt hr_api_transaction_values.varchar2_value%type;
2805: l_last_name_diff hr_api_transaction_values.varchar2_value%TYPE;
2806:
2807: l_item_type hr_api_transaction_steps.item_type%type;
2808: l_item_key hr_api_transaction_steps.item_key%type;
2809: l_activity_id hr_api_transaction_steps.activity_id%type;
2810: l_person_id hr_api_transaction_steps.creator_person_id%type;
2811:
2804: l_org_exempt hr_api_transaction_values.varchar2_value%type;
2805: l_last_name_diff hr_api_transaction_values.varchar2_value%TYPE;
2806:
2807: l_item_type hr_api_transaction_steps.item_type%type;
2808: l_item_key hr_api_transaction_steps.item_key%type;
2809: l_activity_id hr_api_transaction_steps.activity_id%type;
2810: l_person_id hr_api_transaction_steps.creator_person_id%type;
2811:
2812: l_transaction_id hr_api_transaction_steps.transaction_id%type;
2805: l_last_name_diff hr_api_transaction_values.varchar2_value%TYPE;
2806:
2807: l_item_type hr_api_transaction_steps.item_type%type;
2808: l_item_key hr_api_transaction_steps.item_key%type;
2809: l_activity_id hr_api_transaction_steps.activity_id%type;
2810: l_person_id hr_api_transaction_steps.creator_person_id%type;
2811:
2812: l_transaction_id hr_api_transaction_steps.transaction_id%type;
2813:
2806:
2807: l_item_type hr_api_transaction_steps.item_type%type;
2808: l_item_key hr_api_transaction_steps.item_key%type;
2809: l_activity_id hr_api_transaction_steps.activity_id%type;
2810: l_person_id hr_api_transaction_steps.creator_person_id%type;
2811:
2812: l_transaction_id hr_api_transaction_steps.transaction_id%type;
2813:
2814: lv_trans_type VARCHAR2(50);
2808: l_item_key hr_api_transaction_steps.item_key%type;
2809: l_activity_id hr_api_transaction_steps.activity_id%type;
2810: l_person_id hr_api_transaction_steps.creator_person_id%type;
2811:
2812: l_transaction_id hr_api_transaction_steps.transaction_id%type;
2813:
2814: lv_trans_type VARCHAR2(50);
2815: lv_source_name VARCHAR2(50);
2816: