86: l_force boolean;
87: l_success boolean;
88: begin
89: pay_ppmv4_utils_ss.seterrorstage(l_proc, 'ENTER', 0);
90: fnd_msg_pub.initialize;
91: --
92: -- Rollback any existing HR transaction table data.
93: --
94: hr_transaction_ss.rollback_transaction
139: pay_ppmv4_utils_ss.seterrorstage(l_proc, 'EXIT:FAIL:1', 25);
140: fnd_message.set_name('PAY', 'PAY_51518_PSS_ASSERT_ERROR');
141: fnd_message.set_token('WHERE', l_proc);
142: fnd_message.set_token('ADDITIONAL_INFO', '
143: fnd_msg_pub.add;
144: p_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;
145: fnd_msg_pub.count_and_get
146: (p_count => p_msg_count
147: ,p_data => p_msg_data
141: fnd_message.set_token('WHERE', l_proc);
142: fnd_message.set_token('ADDITIONAL_INFO', '
143: fnd_msg_pub.add;
144: p_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;
145: fnd_msg_pub.count_and_get
146: (p_count => p_msg_count
147: ,p_data => p_msg_data
148: );
149: return;
178: pay_ppmv4_utils_ss.seterrorstage(l_proc, 'EXIT:FAIL:2', 50);
179: fnd_message.set_name('PAY', 'PAY_51518_PSS_ASSERT_ERROR');
180: fnd_message.set_token('WHERE', l_proc);
181: fnd_message.set_token('ADDITIONAL_INFO', sqlerrm);
182: fnd_msg_pub.add;
183: p_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;
184: fnd_msg_pub.count_and_get
185: (p_count => p_msg_count
186: ,p_data => p_msg_data
180: fnd_message.set_token('WHERE', l_proc);
181: fnd_message.set_token('ADDITIONAL_INFO', sqlerrm);
182: fnd_msg_pub.add;
183: p_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;
184: fnd_msg_pub.count_and_get
185: (p_count => p_msg_count
186: ,p_data => p_msg_data
187: );
188: return;
563:
564: savepoint db2tts;
565: pay_ppmv4_utils_ss.seterrorstage(l_proc, 'ENTER', 0);
566: --
567: fnd_msg_pub.initialize;
568: -------------------------------------------------------------------
569: -- Check if this routine has been called before and use workflow --
570: -- item attributes to return the values. --
571: -------------------------------------------------------------------
579: --
580: -- Set successful return status.
581: --
582: p_return_status := fnd_api.G_RET_STS_SUCCESS;
583: fnd_msg_pub.count_and_get
584: (p_count => p_msg_count
585: ,p_data => p_msg_data
586: );
587: return;
768: -- Set up messages to Oracle Applications API standards as these
769: -- are handled "for free" using checkErrors.
770: --
771: p_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;
772: fnd_msg_pub.initialize;
773: fnd_message.set_name('PAY', 'PAY_51518_PSS_ASSERT_ERROR');
774: fnd_message.set_token('WHERE', l_proc);
775: fnd_message.set_token('ADDITIONAL_INFO', sqlerrm);
776: fnd_msg_pub.add;
772: fnd_msg_pub.initialize;
773: fnd_message.set_name('PAY', 'PAY_51518_PSS_ASSERT_ERROR');
774: fnd_message.set_token('WHERE', l_proc);
775: fnd_message.set_token('ADDITIONAL_INFO', sqlerrm);
776: fnd_msg_pub.add;
777: fnd_msg_pub.count_and_get
778: (p_count => p_msg_count
779: ,p_data => p_msg_data
780: );
773: fnd_message.set_name('PAY', 'PAY_51518_PSS_ASSERT_ERROR');
774: fnd_message.set_token('WHERE', l_proc);
775: fnd_message.set_token('ADDITIONAL_INFO', sqlerrm);
776: fnd_msg_pub.add;
777: fnd_msg_pub.count_and_get
778: (p_count => p_msg_count
779: ,p_data => p_msg_data
780: );
781: return;
965: execute immediate l_sql_stat into l_opmid;
966: exception
967: when others then
968: fnd_message.set_name('PER', 'PAY_34069_NO_PAY_METHOD');
969: fnd_msg_pub.add;
970: fnd_message.raise_error;
971: end;
972: --
973: open csr_opms(p_assignment_id,p_effective_date,l_category,l_opmid);
974: fetch csr_opms into l_opmid;
975: if csr_opms%notfound then
976: close csr_opms;
977: fnd_message.set_name('PER', 'PAY_34069_NO_PAY_METHOD');
978: fnd_msg_pub.add;
979: fnd_message.raise_error;
980: end if;
981: close csr_opms;
982: --
1030: -- Output error message.
1031: --
1032: if not l_cash_found and not l_check_found and not l_deposit_found then
1033: fnd_message.set_name('PER', 'PAY_52626_NO_PAYMENT_TYPES');
1034: fnd_msg_pub.add;
1035: fnd_message.raise_error;
1036: end if;
1037: --
1038:
1245: end if;
1246: fnd_message.set_name('PAY', 'PAY_50405_PSS_CFG_PROC_ERROR');
1247: fnd_message.set_token('STAGE', 'GET_OPMS');
1248: fnd_message.set_token('ADDITIONAL_INFO', sqlerrm);
1249: fnd_msg_pub.add;
1250: fnd_message.raise_error;
1251: end;
1252: --
1253: -- Output error message.
1253: -- Output error message.
1254: --
1255: if not l_cash_found and not l_check_found and not l_deposit_found then
1256: fnd_message.set_name('PER', 'PAY_52626_NO_PAYMENT_TYPES');
1257: fnd_msg_pub.add;
1258: fnd_message.raise_error;
1259: end if;
1260: end getopms;
1261:
1511: begin
1512: fnd_message.set_name('PAY', 'PAY_50405_PSS_CFG_PROC_ERROR');
1513: fnd_message.set_token('STAGE', p_stage);
1514: fnd_message.set_token('ADDITIONAL_INFO', p_additional_info);
1515: fnd_msg_pub.add;
1516: fnd_message.raise_error;
1517: end initialerror;
1518: begin
1519: --
1521: --
1522: l_show_paymthd_lov := null;
1523:
1524:
1525: fnd_msg_pub.initialize;
1526: -------------------------------------------------------------------
1527: -- Check if this routine has been called before and use workflow --
1528: -- item attributes to return the values. --
1529: -------------------------------------------------------------------
1574: --
1575: -- Set successful return status.
1576: --
1577: p_return_status := fnd_api.G_RET_STS_SUCCESS;
1578: fnd_msg_pub.count_and_get
1579: (p_count => p_msg_count
1580: ,p_data => p_msg_data
1581: );
1582: return;
2005: end if;
2006: --
2007: if l_payment_types is null then
2008: fnd_message.set_name('PER', 'PAY_52626_NO_PAYMENT_TYPES');
2009: fnd_msg_pub.add;
2010: fnd_message.raise_error;
2011: end if;
2012: p_payment_types := l_payment_types;
2013: p_deposit_opmid := to_char(l_deposit_opmid);
2128: fetch csr_monetary into l_option_value;
2129: if csr_monetary%found then
2130: close csr_monetary;
2131: fnd_message.set_name('PER', 'PAY_52625_PPM_USES_AMOUNT');
2132: fnd_msg_pub.add;
2133: fnd_message.raise_error;
2134: end if;
2135: close csr_monetary;
2136: elsif l_monetary_only then
2141: fetch csr_percentage into l_option_value;
2142: if csr_percentage%found then
2143: close csr_percentage;
2144: fnd_message.set_name('PER', 'PAY_52624_PPM_USES_PERCENTAGE');
2145: fnd_msg_pub.add;
2146: fnd_message.raise_error;
2147: end if;
2148: close csr_percentage;
2149: end if;
2150: --
2151: -- Set up success status.
2152: --
2153: p_return_status := fnd_api.G_RET_STS_SUCCESS;
2154: fnd_msg_pub.count_and_get
2155: (p_count => p_msg_count
2156: ,p_data => p_msg_data
2157: );
2158: return;
2158: return;
2159: <
2160: fnd_message.set_name('PER', 'PAY_52631_PPMSS_OPTION_ERROR');
2161: fnd_message.set_token('OPTION', l_option);
2162: fnd_msg_pub.add;
2163: fnd_message.raise_error;
2164: exception
2165: --
2166: -- Set up the error status.
2169: --
2170: -- Errors should have already been added.
2171: --
2172: p_return_status := fnd_api.G_RET_STS_ERROR;
2173: fnd_msg_pub.count_and_get
2174: (p_count => l_msg_count
2175: ,p_data => p_msg_data
2176: );
2177: if l_msg_count = 0 then
2177: if l_msg_count = 0 then
2178: fnd_message.set_name('PAY', 'PAY_50405_PSS_CFG_PROC_ERROR');
2179: fnd_message.set_token('STAGE', 'UNEXPECTED_ERROR');
2180: fnd_message.set_token('ADDITIONAL_INFO', sqlerrm);
2181: fnd_msg_pub.add;
2182: fnd_msg_pub.count_and_get
2183: (p_count => l_msg_count
2184: ,p_data => p_msg_data
2185: );
2178: fnd_message.set_name('PAY', 'PAY_50405_PSS_CFG_PROC_ERROR');
2179: fnd_message.set_token('STAGE', 'UNEXPECTED_ERROR');
2180: fnd_message.set_token('ADDITIONAL_INFO', sqlerrm);
2181: fnd_msg_pub.add;
2182: fnd_msg_pub.count_and_get
2183: (p_count => l_msg_count
2184: ,p_data => p_msg_data
2185: );
2186: end if;
2758: pay_ppmv4_utils_ss.seterrorstage(l_proc, 'ENTER', 0);
2759: --
2760: -- Initialise the AOL message tables.
2761: --
2762: fnd_msg_pub.initialize;
2763: --
2764: -- Write to a t_ppmv4 structure.
2765: --
2766: hr_utility.trace('Creating record : context => '||p_ppm_information_category);
2869: -- Set up messages to Oracle Applications API standards as these
2870: -- are handled "for free" using checkErrors.
2871: --
2872: p_return_status := fnd_api.G_RET_STS_SUCCESS;
2873: fnd_msg_pub.count_and_get
2874: (p_count => p_msg_count
2875: ,p_data => p_msg_data
2876: );
2877: return;
2966: -- Set up messages to Oracle Applications API standards as these
2967: -- are handled "for free" using checkErrors().
2968: --
2969: p_return_status := fnd_api.G_RET_STS_SUCCESS;
2970: fnd_msg_pub.count_and_get
2971: (p_count => p_msg_count
2972: ,p_data => p_msg_data
2973: );
2974: return;
3176: -- Set up messages to Oracle Applications API standards as these
3177: -- are handled "for free" using checkErrors().
3178: --
3179: p_return_status := l_return_status;
3180: fnd_msg_pub.count_and_get
3181: (p_count => p_msg_count
3182: ,p_data => p_msg_data
3183: );
3184: if l_return_status = fnd_api.G_RET_STS_SUCCESS then
3195: -- Set up messages to Oracle Applications API standards as these
3196: -- are handled "for free" using checkErrors().
3197: --
3198: p_return_status := fnd_api.G_RET_STS_UNEXP_ERROR;
3199: fnd_msg_pub.add_exc_msg
3200: (p_pkg_name => g_package
3201: ,p_procedure_name => 'enter_ppm'
3202: );
3203: fnd_msg_pub.count_and_get
3199: fnd_msg_pub.add_exc_msg
3200: (p_pkg_name => g_package
3201: ,p_procedure_name => 'enter_ppm'
3202: );
3203: fnd_msg_pub.count_and_get
3204: (p_count => p_msg_count
3205: ,p_data => p_msg_data
3206: );
3207: return;
3223: pay_ppmv4_utils_ss.seterrorstage(l_proc, 'ENTER', 0);
3224: --
3225: -- Initialise the AOL message tables.
3226: --
3227: fnd_msg_pub.initialize;
3228: --
3229: -- Get additional information about this PPM.
3230: --
3231: select p.state
3279: -- a) Prepayments exist.
3280: -- b) 3rd Party Payroll interface does not allow zap deletes.
3281: --
3282: fnd_message.set_name('PAY', 'PAY_51519_PSS_CANNOT_DELETE');
3283: fnd_msg_pub.add;
3284: p_return_status := fnd_api.G_RET_STS_ERROR;
3285: fnd_msg_pub.count_and_get
3286: (p_count => p_msg_count
3287: ,p_data => p_msg_data
3281: --
3282: fnd_message.set_name('PAY', 'PAY_51519_PSS_CANNOT_DELETE');
3283: fnd_msg_pub.add;
3284: p_return_status := fnd_api.G_RET_STS_ERROR;
3285: fnd_msg_pub.count_and_get
3286: (p_count => p_msg_count
3287: ,p_data => p_msg_data
3288: );
3289: return;
3375: -- Set up messages to Oracle Applications API standards as these
3376: -- are handled "for free" using checkErrors().
3377: --
3378: p_return_status := fnd_api.G_RET_STS_SUCCESS;
3379: fnd_msg_pub.count_and_get
3380: (p_count => p_msg_count
3381: ,p_data => p_msg_data
3382: );
3383: pay_ppmv4_utils_ss.seterrorstage(l_proc, 'EXIT:SUCCESS', 45);
3391: --
3392: fnd_message.set_name('PAY', 'PAY_51518_PSS_ASSERT_ERROR');
3393: fnd_message.set_token('WHERE', l_proc);
3394: fnd_message.set_token('ADDITIONAL_INFO', sqlerrm);
3395: fnd_msg_pub.add;
3396: p_return_status := fnd_api.G_RET_STS_ERROR;
3397: fnd_msg_pub.count_and_get
3398: (p_count => p_msg_count
3399: ,p_data => p_msg_data
3393: fnd_message.set_token('WHERE', l_proc);
3394: fnd_message.set_token('ADDITIONAL_INFO', sqlerrm);
3395: fnd_msg_pub.add;
3396: p_return_status := fnd_api.G_RET_STS_ERROR;
3397: fnd_msg_pub.count_and_get
3398: (p_count => p_msg_count
3399: ,p_data => p_msg_data
3400: );
3401: return;