75: END IF;
76:
77: -- error out if supply source type id is null
78: IF (p_supply_source_type_id is null) THEN
79: fnd_message.set_name('INV', 'INV_NO_SUPPLY_TYPE');
80: fnd_msg_pub.add;
81: RAISE fnd_api.g_exc_error;
82: END IF;
83:
85: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_wip) THEN
86:
87: -- error out if supply source header id is null
88: IF (p_supply_source_header_id is null) THEN
89: fnd_message.set_name('INV','INV_NO_SUPPLY_INFO');
90: fnd_msg_pub.add;
91: RAISE fnd_api.g_exc_error;
92: END IF;
93:
327: p_supply_source_type_id = inv_reservation_global.g_source_type_internal_req) THEN
328:
329: -- error out if supply source header or line id is null
330: IF (p_supply_source_header_id is null or p_supply_source_line_id is null) THEN
331: fnd_message.set_name('INV','INV_NO_SUPPLY_INFO');
332: fnd_msg_pub.add;
333: RAISE fnd_api.g_exc_error;
334: END IF;
335:
335:
336: -- for ASN supply, error if if supply source line detail is null
337: IF (p_supply_source_type_id = inv_reservation_global.g_source_type_asn
338: and p_supply_source_line_detail is null) THEN
339: fnd_message.set_name('INV','INV_NO_SUPPLY_INFO');
340: fnd_msg_pub.add;
341: RAISE fnd_api.g_exc_error;
342: END IF;
343:
478: ELSIF (p_supply_source_type_id = inv_reservation_global.g_source_type_rcv) THEN
479:
480: -- error out if organization_id or item id is null
481: IF (p_organization_id is null or p_item_id is null) THEN
482: fnd_message.set_name('INV', 'INV_NO_ORG_ITEM');
483: fnd_msg_pub.add;
484: RAISE fnd_api.g_exc_error;
485: END IF;
486:
677: END IF;
678:
679: -- error out if demand source type id is null
680: IF (p_demand_source_type_id is null) THEN
681: fnd_message.set_name('INV', 'INV_NO_DEMAND_TYPE');
682: fnd_msg_pub.add;
683: RAISE fnd_api.g_exc_error;
684: END IF;
685:
687: IF (p_demand_source_type_id = inv_reservation_global.g_source_type_wip) THEN
688:
689: -- error out if demand source header id is null
690: IF (p_demand_source_header_id is null) THEN
691: fnd_message.set_name('INV','INV_NO_DEMAND_INFO');
692: fnd_msg_pub.add;
693: RAISE fnd_api.g_exc_error;
694: END IF;
695:
900: debug_print('demand_source_line_detail: ' || p_demand_source_line_detail);
901: debug_print('project_id = ' || p_project_id || ' and task_id = ' || p_task_id);
902: END IF;
903:
904: FND_MESSAGE.SET_NAME('INV', 'INV_WDD_NOT_FOUND');
905: FND_MSG_PUB.ADD;
906: RAISE fnd_api.g_exc_error;
907: END;
908:
1053: EXCEPTION WHEN no_data_found THEN
1054: IF (l_debug = 1) THEN
1055: debug_print('Cannot find the primary unit of measure');
1056: END IF;
1057: FND_MESSAGE.SET_NAME('INV', 'INV_UOM_NOTFOUND');
1058: FND_MSG_PUB.ADD;
1059: RAISE fnd_api.g_exc_error;
1060: END;
1061: END IF;