[Home] [Help]
165: l_proc varchar2(2000) := g_package || 'ppm2tt';
166: begin
167: seterrorstage(l_proc, 'ENTER', 0);
168: if p_ppm.transaction_step_id is null then
169: pay_pss_tx_steps_pkg.insert_row
170: (p_transaction_id => p_ppm.transaction_id
171: ,p_transaction_step_id => p_ppm.transaction_step_id
172: ,p_source_table => p_ppm.source_table
173: ,p_state => p_ppm.state
299: ,p_o_ppm_information29 => p_ppm.o_ppm_information29
300: ,p_o_ppm_information30 => p_ppm.o_ppm_information30
301: );
302: else
303: pay_pss_tx_steps_pkg.update_row
304: (p_transaction_step_id => p_ppm.transaction_step_id
305: ,p_source_table => p_ppm.source_table
306: ,p_state => p_ppm.state
307: ,p_personal_payment_method_id => p_ppm.personal_payment_method_id
1695: --
1696: -- Set up default values by operation and type.
1697: --
1698: seterrorstage(l_proc, 'ENTER', 0);
1699: if p_state = pay_pss_tx_steps_pkg.C_STATE_NEW then
1700: seterrorstage(l_proc, 'C_STATE_NEW', 10);
1701: l_default_number := null;
1702: l_default_varchar2 := null;
1703: l_datetrack_mode := hr_api.g_insert;
1700: seterrorstage(l_proc, 'C_STATE_NEW', 10);
1701: l_default_number := null;
1702: l_default_varchar2 := null;
1703: l_datetrack_mode := hr_api.g_insert;
1704: elsif p_state = pay_pss_tx_steps_pkg.C_STATE_UPDATED then
1705: seterrorstage(l_proc, 'C_STATE_UPDATED', 20);
1706: l_default_number := hr_api.g_number;
1707: l_default_varchar2 := hr_api.g_varchar2;
1708: l_datetrack_mode := p_update_datetrack_mode;
1724: end if;
1725: --
1726: -- Set up Percent/Amount validation.
1727: --
1728: if p_amount_type = pay_pss_tx_steps_pkg.C_PERCENTAGE or
1729: p_amount_type = pay_pss_tx_steps_pkg.C_PERCENTAGE_ONLY then
1730: seterrorstage(l_proc, 'C_PERCENTAGE', 40);
1731: l_amount := null;
1732: l_percentage := p_amount;
1725: --
1726: -- Set up Percent/Amount validation.
1727: --
1728: if p_amount_type = pay_pss_tx_steps_pkg.C_PERCENTAGE or
1729: p_amount_type = pay_pss_tx_steps_pkg.C_PERCENTAGE_ONLY then
1730: seterrorstage(l_proc, 'C_PERCENTAGE', 40);
1731: l_amount := null;
1732: l_percentage := p_amount;
1733: elsif p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY or
1729: p_amount_type = pay_pss_tx_steps_pkg.C_PERCENTAGE_ONLY then
1730: seterrorstage(l_proc, 'C_PERCENTAGE', 40);
1731: l_amount := null;
1732: l_percentage := p_amount;
1733: elsif p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY or
1734: p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY_ONLY then
1735: seterrorstage(l_proc, 'C_MONETARY', 50);
1736: l_amount := p_amount;
1737: l_percentage := null;
1730: seterrorstage(l_proc, 'C_PERCENTAGE', 40);
1731: l_amount := null;
1732: l_percentage := p_amount;
1733: elsif p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY or
1734: p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY_ONLY then
1735: seterrorstage(l_proc, 'C_MONETARY', 50);
1736: l_amount := p_amount;
1737: l_percentage := null;
1738: elsif p_amount_type = pay_pss_tx_steps_pkg.C_REMAINING_PAY then
1734: p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY_ONLY then
1735: seterrorstage(l_proc, 'C_MONETARY', 50);
1736: l_amount := p_amount;
1737: l_percentage := null;
1738: elsif p_amount_type = pay_pss_tx_steps_pkg.C_REMAINING_PAY then
1739: --
1740: -- Handled as 100%.
1741: --
1742: seterrorstage(l_proc, 'C_REMAINING_PAY', 60);
1761: end if;
1762: --
1763: -- Set up the business_group_id for the INSERT and UPDATE operations.
1764: --
1765: if p_state = pay_pss_tx_steps_pkg.C_STATE_NEW then
1766: --
1767: -- Check for (fatal) business_group_id error. If this error
1768: -- occurs then the module is broken.
1769: --
1785: close csr_asg_busgrp;
1786: end if;
1787: raise;
1788: end;
1789: elsif p_state = pay_pss_tx_steps_pkg.C_STATE_UPDATED then
1790: --
1791: -- Check for (fatal) business_group_id error. If this error
1792: -- occurs then the module is broken.
1793: --
1888:
1889: --
1890: -- Do initial checks specific to each operation.
1891: --
1892: if p_state = pay_pss_tx_steps_pkg.C_STATE_NEW then
1893: --
1894: -- Do the record locking. If this code fails then it is fatal
1895: -- error within the module.
1896: --
1935: exception
1936: when others then
1937: raise;
1938: end;
1939: elsif p_state = pay_pss_tx_steps_pkg.C_STATE_UPDATED then
1940: --
1941: -- Do the record locking. If this code fails then it is fatal
1942: -- error within the module.
1943: --
1979: --
1980: seterrorstage(l_proc, 'VALIDATE_BANK_SEGMENTS', 150);
1981: begin
1982: --
1983: if p_payment_type = pay_pss_tx_steps_pkg.C_DEPOSIT then
1984: --
1985: -- The OA key flex code inserts into the combination table: therefore,
1986: -- p_external_account_id refers to an existing row in
1987: -- PAY_EXTERNAL_ACCOUNTS.
2209: --
2210: -- Choose more specific messages based on whether or not
2211: -- the configuration is for percent only or amount only.
2212: --
2213: if p_amount_type = pay_pss_tx_steps_pkg.C_PERCENTAGE or
2214: p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY then
2215: fnd_msg_pub.add;
2216: else
2217: fnd_message.set_name('PER', 'HR_WEB_REQUIRED_FIELD');
2210: -- Choose more specific messages based on whether or not
2211: -- the configuration is for percent only or amount only.
2212: --
2213: if p_amount_type = pay_pss_tx_steps_pkg.C_PERCENTAGE or
2214: p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY then
2215: fnd_msg_pub.add;
2216: else
2217: fnd_message.set_name('PER', 'HR_WEB_REQUIRED_FIELD');
2218: fnd_msg_pub.add;
2425: l_personal_payment_method_id := p_personal_payment_method_id;
2426: --
2427: -- Set Percentage/Amount.
2428: --
2429: if p_amount_type = pay_pss_tx_steps_pkg.C_PERCENTAGE or
2430: p_amount_type = pay_pss_tx_steps_pkg.C_PERCENTAGE_ONLY then
2431: l_percentage := p_amount;
2432: l_amount := null;
2433: elsif p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY or
2426: --
2427: -- Set Percentage/Amount.
2428: --
2429: if p_amount_type = pay_pss_tx_steps_pkg.C_PERCENTAGE or
2430: p_amount_type = pay_pss_tx_steps_pkg.C_PERCENTAGE_ONLY then
2431: l_percentage := p_amount;
2432: l_amount := null;
2433: elsif p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY or
2434: p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY_ONLY then
2429: if p_amount_type = pay_pss_tx_steps_pkg.C_PERCENTAGE or
2430: p_amount_type = pay_pss_tx_steps_pkg.C_PERCENTAGE_ONLY then
2431: l_percentage := p_amount;
2432: l_amount := null;
2433: elsif p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY or
2434: p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY_ONLY then
2435: l_percentage := null;
2436: l_amount := p_amount;
2437:
2430: p_amount_type = pay_pss_tx_steps_pkg.C_PERCENTAGE_ONLY then
2431: l_percentage := p_amount;
2432: l_amount := null;
2433: elsif p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY or
2434: p_amount_type = pay_pss_tx_steps_pkg.C_MONETARY_ONLY then
2435: l_percentage := null;
2436: l_amount := p_amount;
2437:
2438: --
2450: when others then
2451: v_check_value := 'Y';
2452: end;
2453: if v_check_value ='N' then
2454: if p_state = pay_pss_tx_steps_pkg.C_STATE_NEW then
2455: l_percentage := 100;
2456: l_amount := null;
2457: elsif p_state = pay_pss_tx_steps_pkg.C_STATE_UPDATED then
2458: l_percentage := hr_api.g_number;
2453: if v_check_value ='N' then
2454: if p_state = pay_pss_tx_steps_pkg.C_STATE_NEW then
2455: l_percentage := 100;
2456: l_amount := null;
2457: elsif p_state = pay_pss_tx_steps_pkg.C_STATE_UPDATED then
2458: l_percentage := hr_api.g_number;
2459: l_amount := hr_api.g_number;
2460: end if;
2461: else
2471: --
2472: -- Check the PPM state to determine which API call to make.
2473: --
2474: seterrorstage(l_proc,'Calling ...hr_personal_pay_method_api.create_personal_pay_method',20);
2475: if p_state = pay_pss_tx_steps_pkg.C_STATE_NEW then
2476: hr_personal_pay_method_api.create_personal_pay_method
2477: (p_validate => p_validate
2478: ,p_effective_date => p_effective_date
2479: ,p_assignment_id => p_assignment_id
2571: ,p_effective_start_date => l_effective_start_date
2572: ,p_effective_end_date => l_effective_end_date
2573: ,p_comment_id => l_comment_id
2574: );
2575: elsif p_state = pay_pss_tx_steps_pkg.C_STATE_UPDATED then
2576: seterrorstage(l_proc, 'Calling ...hr_personal_pay_method_api.update_personal_pay_method', 30);
2577: hr_personal_pay_method_api.update_personal_pay_method
2578: (p_validate => p_validate
2579: ,p_effective_date => p_effective_date
2670: ,p_effective_start_date => l_effective_start_date
2671: ,p_effective_end_date => l_effective_end_date
2672: ,p_comment_id => l_comment_id
2673: );
2674: elsif p_state = pay_pss_tx_steps_pkg.C_STATE_DELETED then
2675: l_object_version_number := p_delete_ovn;
2676: if p_delete_datetrack_mode = hr_api.g_zap then
2677: l_effective_date := p_effective_date;
2678: else
2687: ,p_object_version_number => l_object_version_number
2688: ,p_effective_start_date => l_effective_start_date
2689: ,p_effective_end_date => l_effective_end_date
2690: );
2691: elsif p_state = pay_pss_tx_steps_pkg.C_STATE_EXISTING and
2692: p_real_priority <> p_o_real_priority then
2693: seterrorstage(l_proc,'Calling ...hr_personal_pay_method_api.update_personal_pay_method',50);
2694: hr_personal_pay_method_api.update_personal_pay_method
2695: (p_validate => p_validate