1: PACKAGE BODY pa_action_sets_pvt AS
2: /*$Header: PARASPVB.pls 120.2.12010000.2 2008/08/22 16:11:53 mumohan ship $*/
3: --
4: PROCEDURE create_action_set
5: (p_action_set_type_code IN pa_action_set_types.action_set_type_code%TYPE
50: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
51:
52: --Log Message: 4403338
53: IF l_debug_mode = 'Y' THEN
54: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Create_Action_Set.begin'
55: ,x_msg => 'Beginning of Create_Action_Set pvt'
56: ,x_log_level => 5);
57: END IF;
58:
86: ,p_msg_name => 'PA_OBJECT_HAS_ACTION_SET');
87:
88: --Log Message: 4403338
89: IF l_debug_mode = 'Y' THEN
90: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.create_action_set'
91: ,x_msg => 'Message: PA_OBJECT_HAS_ACTION_SET'
92: ,x_log_level => 5);
93: END IF;
94:
99: p_object_type => p_object_type,
100: p_object_id => p_object_id);
101: --Log Message: 4403338
102: IF l_debug_mode = 'Y' THEN
103: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Create_Action_Set'
104: ,x_msg => 'l_is_action_set_started = '|| l_is_action_set_started
105: ,x_log_level => 5);
106: END IF;
107:
120: IF FND_MSG_PUB.Count_Msg =0 THEN
121:
122: --Log Message: 4403338
123: IF l_debug_mode = 'Y' THEN
124: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Create_Action_Set'
125: ,x_msg => 'before pa_action_sets_pkg.insert_row'
126: ,x_log_level => 5);
127: END IF;
128:
160: END IF;
161:
162: --Log Message: 4403338
163: IF l_debug_mode = 'Y' THEN
164: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Create_Action_Set'
165: ,x_msg => 'x_action_set_id = '|| x_action_set_id
166: ,x_log_level => 5);
167: END IF;
168:
173: EXCEPTION
174: WHEN OTHERS THEN
175:
176: -- Set the excetption Message and the stack
177: FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_ACTION_SETS_PVT.Create_Action_Set'
178: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
179: --
180: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
181: RAISE;
236: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
237:
238: --Log Message: 4403338
239: IF l_debug_mode = 'Y' THEN
240: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Update_Action_Set.begin'
241: ,x_msg => 'Beginning of Update_Action_Set pvt'
242: ,x_log_level => 5);
243: END IF;
244:
350: EXCEPTION
351: WHEN OTHERS THEN
352:
353: -- Set the excetption Message and the stack
354: FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_ACTION_SETS_PVT.Update_Action_Set'
355: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
356: --
357: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
358: RAISE;
387: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
388:
389: --Log Message: 4403338
390: IF l_debug_mode = 'Y' THEN
391: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Delete_Action_Set'
392: ,x_msg => 'Beginning of Delete_Action_Set pvt'
393: ,x_log_level => 5);
394: END IF;
395:
466: EXCEPTION
467: WHEN OTHERS THEN
468:
469: -- Set the excetption Message and the stack
470: FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_ACTION_SETS_PVT.Delete_Action_Set'
471: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
472: --
473: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
474: RAISE;
518: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
519:
520: --Log Message: 4403338
521: IF l_debug_mode = 'Y' THEN
522: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Create_Action_Set_Line.begin'
523: ,x_msg => 'Beginning of Create_Action_Set_Line pvt'
524: ,x_log_level => 5);
525: END IF;
526:
539: l_action_set_line_rec.action_attribute10 := p_action_attribute10;
540:
541: --Log Message: 4403338
542: IF l_debug_mode = 'Y' THEN
543: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Create_Action_Set_Line.begin'
544: ,x_msg => 'p_action_set_id = '|| p_action_set_id
545: ,x_log_level => 5);
546: END IF;
547:
551: WHERE action_set_id = p_action_set_id;
552:
553: --Log Message: 4403338
554: IF l_debug_mode = 'Y' THEN
555: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Create_Action_Set_Line.begin'
556: ,x_msg => 'Before validate_action_set_line: '||'action_set_type_code = '||l_action_set_type_code
557: ,x_log_level => 5);
558: END IF;
559:
563: x_return_status => l_return_status);
564:
565: --Log Message: 4403338
566: IF l_debug_mode = 'Y' THEN
567: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Create_Action_Set_Line.begin'
568: ,x_msg => 'After validate_action_set_line: x_retun_status = '||l_return_status
569: ,x_log_level => 5);
570: END IF;
571:
624: EXCEPTION
625: WHEN OTHERS THEN
626:
627: -- Set the excetption Message and the stack
628: FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_ACTION_SETS_PVT.Create_Action_Set_Line'
629: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
630: --
631: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
632: RAISE;
673: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
674:
675: --Log Message: 4403338
676: IF l_debug_mode = 'Y' THEN
677: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Update_Action_Set_Line.begin'
678: ,x_msg => 'Beginning of Update_Action_Set_Line pvt'
679: ,x_log_level => 5);
680: END IF;
681:
772: EXCEPTION
773: WHEN OTHERS THEN
774:
775: -- Set the excetption Message and the stack
776: FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_ACTION_SETS_PVT.Update_Action_Set_Line'
777: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
778: --
779: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
780: RAISE;
807: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
808:
809: --Log Message: 4403338
810: IF l_debug_mode = 'Y' THEN
811: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Delete_Action_Set_Line.begin'
812: ,x_msg => 'Beginning of Delete_Action_Set_Line pvt'
813: ,x_log_level => 5);
814: END IF;
815:
926: EXCEPTION
927: WHEN OTHERS THEN
928:
929: -- Set the excetption Message and the stack
930: FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_ACTION_SETS_PVT.Delete_Action_Set_Line'
931: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
932: --
933: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
934: RAISE;
983: EXCEPTION
984: WHEN OTHERS THEN
985:
986: -- Set the excetption Message and the stack
987: FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_ACTION_SETS_PVT.reverse_action_audit_lines'
988: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
989: --
990: RAISE;
991:
1086: EXCEPTION
1087: WHEN OTHERS THEN
1088:
1089: -- Set the excetption Message and the stack
1090: FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_ACTION_SETS_PVT.bulk_insert_audit_lines'
1091: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
1092: --
1093: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1094: RAISE;
1137: x_return_status := FND_API.G_RET_STS_ERROR;
1138: WHEN OTHERS THEN
1139:
1140: -- Set the excetption Message and the stack
1141: FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_ACTION_SETS_PVT.bulk_update_line_number'
1142: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
1143: --
1144: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1145: RAISE;
1186: x_return_status := FND_API.G_RET_STS_ERROR;
1187:
1188: WHEN OTHERS THEN
1189: -- Set the excetption Message and the stack
1190: FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_ACTION_SETS_PVT.bulk_update_condition_date'
1191: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
1192: --
1193: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1194: RAISE;
1234: ,p_msg_name => 'PA_ACTION_LINE_CHANGE_PENDING');
1235: x_return_status := FND_API.G_RET_STS_ERROR;
1236: WHEN OTHERS THEN
1237: -- Set the excetption Message and the stack
1238: FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_ACTION_SETS_PVT.bulk_update_line_status'
1239: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
1240: --
1241: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1242: RAISE;
1276: fnd_profile.get('PA_DEBUG_MODE',l_debug_mode);
1277:
1278: --Log Message: 4403338
1279: IF l_debug_mode = 'Y' THEN
1280: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Perform_Action_Set_Line.begin'
1281: ,x_msg => 'Beginning of Perform_Action_Set_Line pvt'
1282: ,x_log_level => 5);
1283: END IF;
1284:
1289: l_action_line_conditions_tbl := PA_ACTION_SET_UTILS.get_action_line_conditions(p_action_set_line_id => p_action_set_line_id);
1290:
1291: --Log Message: 4403338
1292: IF l_debug_mode = 'Y' THEN
1293: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Perform_Action_Set_Line.begin'
1294: ,x_msg => 'Before calling PA_ACTION_SETS_DYN.perform_action_set_line'
1295: ,x_log_level => 5);
1296: END IF;
1297:
1304: x_action_line_result_code => l_action_line_result_code);
1305:
1306: --Log Message: 4403338
1307: IF l_debug_mode = 'Y' THEN
1308: PA_DEBUG.write_log (x_module => 'pa.plsql.PA_ACTION_SETS_PVT.Perform_Action_Set_Line.begin'
1309: ,x_msg => 'After calling PA_ACTION_SETS_DYN.perform_action_set_line'
1310: ,x_log_level => 5);
1311: END IF;
1312:
1409: */
1410:
1411: EXCEPTION
1412: WHEN e_invalid_result_code THEN
1413: FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_ACTION_SETS_PVT.Perform_Action_Set_Line'
1414: ,p_procedure_name => PA_DEBUG.G_Err_Stack
1415: ,p_error_text => 'INVALID RESULT CODE: '||l_action_line_result_code);
1416: --
1417: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1418: RAISE e_invalid_result_code;
1419:
1420: WHEN OTHERS THEN
1421: -- Set the excetption Message and the stack
1422: FND_MSG_PUB.add_exc_msg ( p_pkg_name => 'PA_ACTION_SETS_PVT.Perform_Action_Set_Line'
1423: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
1424: --
1425: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
1426: RAISE;