60: BEGIN
61: -- Standard begin of API savepoint
62: SAVEPOINT Validate_trans_PVT;
63: -- Standard call to check for call compatibility.
64: IF NOT FND_API.Compatible_API_Call (
65: l_api_version,
66: p_api_version,
67: l_api_name,
68: G_PKG_NAME)
66: p_api_version,
67: l_api_name,
68: G_PKG_NAME)
69: THEN
70: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
71: END IF;
72:
73: --Initialize message list if p_init_msg_list is TRUE.
74: IF FND_API.To_Boolean (p_init_msg_list) THEN
70: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
71: END IF;
72:
73: --Initialize message list if p_init_msg_list is TRUE.
74: IF FND_API.To_Boolean (p_init_msg_list) THEN
75: FND_MSG_PUB.initialize;
76: END IF;
77:
78: -- Debug Message
80: OZF_UTILITY_PVT.debug_message(l_full_name||': Start');
81: END IF;
82:
83: -- Initialize API return status to sucess
84: x_return_status := FND_API.G_RET_STS_SUCCESS;
85:
86: If p_transaction.source_code = 'OM' THEN
87: IF OZF_DEBUG_LOW_ON THEN
88: ozf_utility_PVT.debug_message('IN OM:' );
108: p_transaction.bill_to_site_use_id is NULL OR
109: l_ship_to_site_use_id is NULL THEN -- nepanda : Fix for bug 10120042
110:
111: ozf_utility_PVT.error_message('OZF_TRANS_BILLTO_NULL');
112: RAISE FND_API.g_exc_unexpected_error;
113: END IF;
114:
115: IF p_transaction.header_id is NULL OR
116: p_transaction.line_id is NULL THEN
115: IF p_transaction.header_id is NULL OR
116: p_transaction.line_id is NULL THEN
117:
118: ozf_utility_PVT.error_message('OZF_TRANS_ORDER_REF_NULL');
119: RAISE FND_API.g_exc_unexpected_error;
120: END IF;
121:
122: ELSIF p_transaction.source_code = 'IS' THEN
123: IF OZF_DEBUG_LOW_ON THEN
129:
130: IF p_transaction.sold_from_party_id is null THEN
131:
132: ozf_utility_PVT.error_message('OZF_TRANS_SOLDFROM_NULL');
133: RAISE FND_API.g_exc_unexpected_error;
134: END IF;
135:
136: IF p_transaction.header_id is NULL OR
137: p_transaction.line_id is NULL THEN
136: IF p_transaction.header_id is NULL OR
137: p_transaction.line_id is NULL THEN
138:
139: ozf_utility_PVT.error_message('OZF_TRANS_ORDER_REF_NULL');
140: RAISE FND_API.g_exc_unexpected_error;
141: END IF;
142:
143: ELSIF p_transaction.source_code = 'MA' THEN
144: IF OZF_DEBUG_LOW_ON THEN
147: END IF;
148:
149: IF p_transaction.sold_to_party_id is null THEN
150: OZF_UTILITY_PVT.error_message('OZF_TRANS_SOLD_TO_PTY_NULL');
151: RAISE FND_API.g_exc_unexpected_error;
152: END IF;
153: ELSE
154: OZF_UTILITY_PVT.error_message('OZF_TRANS_SOURCE_CD_WRG');
155: RAISE FND_API.g_exc_unexpected_error;
151: RAISE FND_API.g_exc_unexpected_error;
152: END IF;
153: ELSE
154: OZF_UTILITY_PVT.error_message('OZF_TRANS_SOURCE_CD_WRG');
155: RAISE FND_API.g_exc_unexpected_error;
156: END IF;
157:
158: -- Debug Message
159: IF OZF_DEBUG_LOW_ON THEN
160: OZF_UTILITY_PVT.debug_message(l_full_name||': End');
161: END IF;
162: --Standard call to get message count and if count=1, get the message
163: FND_MSG_PUB.Count_And_Get (
164: p_encoded => FND_API.G_FALSE,
165: p_count => x_msg_count,
166: p_data => x_msg_data
167: );
168: EXCEPTION
165: p_count => x_msg_count,
166: p_data => x_msg_data
167: );
168: EXCEPTION
169: WHEN FND_API.G_EXC_ERROR THEN
170: ROLLBACK TO Validate_trans_PVT;
171: x_return_status := FND_API.G_RET_STS_ERROR;
172: -- Standard call to get message count and if count=1, get the message
173: FND_MSG_PUB.Count_And_Get (
167: );
168: EXCEPTION
169: WHEN FND_API.G_EXC_ERROR THEN
170: ROLLBACK TO Validate_trans_PVT;
171: x_return_status := FND_API.G_RET_STS_ERROR;
172: -- Standard call to get message count and if count=1, get the message
173: FND_MSG_PUB.Count_And_Get (
174: p_encoded => FND_API.G_FALSE,
175: p_count => x_msg_count,
170: ROLLBACK TO Validate_trans_PVT;
171: x_return_status := FND_API.G_RET_STS_ERROR;
172: -- Standard call to get message count and if count=1, get the message
173: FND_MSG_PUB.Count_And_Get (
174: p_encoded => FND_API.G_FALSE,
175: p_count => x_msg_count,
176: p_data => x_msg_data
177: );
178: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
174: p_encoded => FND_API.G_FALSE,
175: p_count => x_msg_count,
176: p_data => x_msg_data
177: );
178: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
179: ROLLBACK TO Validate_trans_PVT;
180: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
181: -- Standard call to get message count and if count=1, get the message
182: FND_MSG_PUB.Count_And_Get (
176: p_data => x_msg_data
177: );
178: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
179: ROLLBACK TO Validate_trans_PVT;
180: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
181: -- Standard call to get message count and if count=1, get the message
182: FND_MSG_PUB.Count_And_Get (
183: p_encoded => FND_API.G_FALSE,
184: p_count => x_msg_count,
179: ROLLBACK TO Validate_trans_PVT;
180: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
181: -- Standard call to get message count and if count=1, get the message
182: FND_MSG_PUB.Count_And_Get (
183: p_encoded => FND_API.G_FALSE,
184: p_count => x_msg_count,
185: p_data => x_msg_data
186: );
187: WHEN OTHERS THEN
185: p_data => x_msg_data
186: );
187: WHEN OTHERS THEN
188: ROLLBACK TO Validate_trans_PVT;
189: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
190: IF FND_MSG_PUB.Check_Msg_Level ( FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
191: THEN
192: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
193: END IF;
192: FND_MSG_PUB.Add_Exc_Msg( G_PKG_NAME,l_api_name);
193: END IF;
194: -- Standard call to get message count and if count=1, get the message
195: FND_MSG_PUB.Count_And_Get (
196: p_encoded => FND_API.G_FALSE,
197: p_count => x_msg_count,
198: p_data => x_msg_data
199: );
200: END Validate_Transaction;
258: SELECT exchange_rate_type
259: FROM ozf_sys_parameters_all
260: WHERE org_id = p_org_id;
261:
262: l_exchange_rate_type VARCHAR2(30) := FND_API.G_MISS_CHAR;
263: l_rate NUMBER;
264: l_vol_offr_apply_discount NUMBER;
265: l_sales_trans NUMBER;
266: BEGIN
266: BEGIN
267: -- Standard begin of API savepoint
268: SAVEPOINT CREATE_TRANSACTION;
269: -- Standard call to check for call compatibility.
270: IF NOT FND_API.Compatible_API_Call (
271: l_api_version,
272: p_api_version,
273: l_api_name,
274: G_PKG_NAME)
272: p_api_version,
273: l_api_name,
274: G_PKG_NAME)
275: THEN
276: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
277: END IF;
278:
279: --Initialize message list if p_init_msg_list is TRUE.
280: IF FND_API.To_Boolean (p_init_msg_list) THEN
276: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
277: END IF;
278:
279: --Initialize message list if p_init_msg_list is TRUE.
280: IF FND_API.To_Boolean (p_init_msg_list) THEN
281: FND_MSG_PUB.initialize;
282: END IF;
283:
284: -- Debug Message
286: OZF_UTILITY_PVT.debug_message(l_full_name||': Start');
287: END IF;
288:
289: -- Initialize API return status to sucess
290: x_return_status := FND_API.G_RET_STS_SUCCESS;
291:
292: IF OZF_DEBUG_LOW_ON THEN
293: OZF_UTILITY_PVT.debug_message('inventory_item_id:' ||l_transaction_rec.inventory_item_id);
294: OZF_UTILITY_PVT.debug_message('transaction_date:' ||l_transaction_rec.transaction_date);
301: l_transaction_rec.quantity is null OR
302: l_transaction_rec.uom_code is null THEN
303:
304: OZF_UTILITY_PVT.error_message('OZF_SALES_TRANS_MISS');
305: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
306: END IF;
307:
308: -- Validate the record
309: Validate_Transaction (
307:
308: -- Validate the record
309: Validate_Transaction (
310: p_api_version => 1.0
311: ,p_init_msg_list => FND_API.G_FALSE
312: ,p_validation_level => FND_API.G_VALID_LEVEL_FULL
313: ,x_return_status => l_return_status
314: ,x_msg_count => l_msg_count
315: ,x_msg_data => l_msg_data
308: -- Validate the record
309: Validate_Transaction (
310: p_api_version => 1.0
311: ,p_init_msg_list => FND_API.G_FALSE
312: ,p_validation_level => FND_API.G_VALID_LEVEL_FULL
313: ,x_return_status => l_return_status
314: ,x_msg_count => l_msg_count
315: ,x_msg_data => l_msg_data
316: ,p_transaction => l_transaction_rec
314: ,x_msg_count => l_msg_count
315: ,x_msg_data => l_msg_data
316: ,p_transaction => l_transaction_rec
317: );
318: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
319: RAISE FND_API.G_EXC_ERROR;
320: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
321: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
322: END IF;
315: ,x_msg_data => l_msg_data
316: ,p_transaction => l_transaction_rec
317: );
318: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
319: RAISE FND_API.G_EXC_ERROR;
320: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
321: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
322: END IF;
323:
316: ,p_transaction => l_transaction_rec
317: );
318: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
319: RAISE FND_API.G_EXC_ERROR;
320: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
321: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
322: END IF;
323:
324: -- Default transfer_type if necessary
317: );
318: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
319: RAISE FND_API.G_EXC_ERROR;
320: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
321: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
322: END IF;
323:
324: -- Default transfer_type if necessary
325: IF l_transaction_rec.transfer_type IS NULL THEN
581:
582:
583: IF l_transaction_rec.SOURCE_CODE = 'OM' THEN
584: OZF_VOLUME_CALCULATION_PUB.Create_Volume(
585: p_init_msg_list => FND_API.g_false
586: ,p_api_version => 1.0
587: ,p_commit => FND_API.g_false
588: ,x_return_status => l_return_status
589: ,x_msg_count => l_msg_count
583: IF l_transaction_rec.SOURCE_CODE = 'OM' THEN
584: OZF_VOLUME_CALCULATION_PUB.Create_Volume(
585: p_init_msg_list => FND_API.g_false
586: ,p_api_version => 1.0
587: ,p_commit => FND_API.g_false
588: ,x_return_status => l_return_status
589: ,x_msg_count => l_msg_count
590: ,x_msg_data => l_msg_data
591: ,p_volume_detail_rec => l_transaction_rec
591: ,p_volume_detail_rec => l_transaction_rec
592: ,p_qp_list_header_id => l_transaction_rec.qp_list_header_id
593: ,x_apply_discount => l_vol_offr_apply_discount
594: );
595: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
596: RAISE FND_API.G_EXC_ERROR;
597: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
598: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
599: END IF;
592: ,p_qp_list_header_id => l_transaction_rec.qp_list_header_id
593: ,x_apply_discount => l_vol_offr_apply_discount
594: );
595: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
596: RAISE FND_API.G_EXC_ERROR;
597: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
598: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
599: END IF;
600: END IF;
593: ,x_apply_discount => l_vol_offr_apply_discount
594: );
595: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
596: RAISE FND_API.G_EXC_ERROR;
597: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
598: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
599: END IF;
600: END IF;
601:
594: );
595: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
596: RAISE FND_API.G_EXC_ERROR;
597: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
598: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
599: END IF;
600: END IF;
601:
602:
605: OZF_UTILITY_PVT.debug_message(l_full_name||': End');
606: END IF;
607: --Standard call to get message count and if count=1, get the message
608: FND_MSG_PUB.Count_And_Get (
609: p_encoded => FND_API.G_FALSE,
610: p_count => x_msg_count,
611: p_data => x_msg_data
612: );
613: x_return_status := l_return_status;
611: p_data => x_msg_data
612: );
613: x_return_status := l_return_status;
614: EXCEPTION
615: WHEN FND_API.G_EXC_ERROR THEN
616: ROLLBACK TO CREATE_TRANSACTION;
617: x_return_status := FND_API.G_RET_STS_ERROR;
618: -- Standard call to get message count and if count=1, get the message
619: FND_MSG_PUB.Count_And_Get (
613: x_return_status := l_return_status;
614: EXCEPTION
615: WHEN FND_API.G_EXC_ERROR THEN
616: ROLLBACK TO CREATE_TRANSACTION;
617: x_return_status := FND_API.G_RET_STS_ERROR;
618: -- Standard call to get message count and if count=1, get the message
619: FND_MSG_PUB.Count_And_Get (
620: p_encoded => FND_API.G_FALSE,
621: p_count => x_msg_count,
616: ROLLBACK TO CREATE_TRANSACTION;
617: x_return_status := FND_API.G_RET_STS_ERROR;
618: -- Standard call to get message count and if count=1, get the message
619: FND_MSG_PUB.Count_And_Get (
620: p_encoded => FND_API.G_FALSE,
621: p_count => x_msg_count,
622: p_data => x_msg_data
623: );
624: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
620: p_encoded => FND_API.G_FALSE,
621: p_count => x_msg_count,
622: p_data => x_msg_data
623: );
624: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
625: ROLLBACK TO CREATE_TRANSACTION;
626: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
627:
628: -- Standard call to get message count and if count=1, get the message
622: p_data => x_msg_data
623: );
624: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
625: ROLLBACK TO CREATE_TRANSACTION;
626: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
627:
628: -- Standard call to get message count and if count=1, get the message
629: FND_MSG_PUB.Count_And_Get (
630: p_encoded => FND_API.G_FALSE,
626: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
627:
628: -- Standard call to get message count and if count=1, get the message
629: FND_MSG_PUB.Count_And_Get (
630: p_encoded => FND_API.G_FALSE,
631: p_count => x_msg_count,
632: p_data => x_msg_data
633: );
634: WHEN OTHERS THEN
632: p_data => x_msg_data
633: );
634: WHEN OTHERS THEN
635: ROLLBACK TO CREATE_TRANSACTION;
636: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
637:
638: -- Standard call to get message count and if count=1, get the message
639: FND_MSG_PUB.Count_And_Get (
640: p_encoded => FND_API.G_FALSE,
636: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
637:
638: -- Standard call to get message count and if count=1, get the message
639: FND_MSG_PUB.Count_And_Get (
640: p_encoded => FND_API.G_FALSE,
641: p_count => x_msg_count,
642: p_data => x_msg_data
643: );
644: END create_transaction;
686: BEGIN
687: -- Standard begin of API savepoint
688: SAVEPOINT INIT_INVEN_TMP;
689: -- Standard call to check for call compatibility.
690: IF NOT FND_API.Compatible_API_Call (
691: l_api_version,
692: p_api_version,
693: l_api_name,
694: G_PKG_NAME)
692: p_api_version,
693: l_api_name,
694: G_PKG_NAME)
695: THEN
696: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
697: END IF;
698:
699: --Initialize message list if p_init_msg_list is TRUE.
700: IF FND_API.To_Boolean (p_init_msg_list) THEN
696: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
697: END IF;
698:
699: --Initialize message list if p_init_msg_list is TRUE.
700: IF FND_API.To_Boolean (p_init_msg_list) THEN
701: FND_MSG_PUB.initialize;
702: END IF;
703:
704: -- Debug Message
706: OZF_UTILITY_PVT.debug_message(l_full_name||': Start');
707: END IF;
708:
709: -- Initialize API return status to sucess
710: x_return_status := FND_API.G_RET_STS_SUCCESS;
711:
712:
713:
714: -- Force refresh snapshot before the query
937: OZF_UTILITY_PVT.debug_message(l_full_name||': End');
938: END IF;
939: --Standard call to get message count and if count=1, get the message
940: FND_MSG_PUB.Count_And_Get (
941: p_encoded => FND_API.G_FALSE,
942: p_count => x_msg_count,
943: p_data => x_msg_data
944: );
945: x_return_status := l_return_status;
943: p_data => x_msg_data
944: );
945: x_return_status := l_return_status;
946: EXCEPTION
947: WHEN FND_API.G_EXC_ERROR THEN
948: ROLLBACK TO INIT_INVEN_TMP;
949: x_return_status := FND_API.G_RET_STS_ERROR;
950: -- Standard call to get message count and if count=1, get the message
951: FND_MSG_PUB.Count_And_Get (
945: x_return_status := l_return_status;
946: EXCEPTION
947: WHEN FND_API.G_EXC_ERROR THEN
948: ROLLBACK TO INIT_INVEN_TMP;
949: x_return_status := FND_API.G_RET_STS_ERROR;
950: -- Standard call to get message count and if count=1, get the message
951: FND_MSG_PUB.Count_And_Get (
952: p_encoded => FND_API.G_FALSE,
953: p_count => x_msg_count,
948: ROLLBACK TO INIT_INVEN_TMP;
949: x_return_status := FND_API.G_RET_STS_ERROR;
950: -- Standard call to get message count and if count=1, get the message
951: FND_MSG_PUB.Count_And_Get (
952: p_encoded => FND_API.G_FALSE,
953: p_count => x_msg_count,
954: p_data => x_msg_data
955: );
956: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
952: p_encoded => FND_API.G_FALSE,
953: p_count => x_msg_count,
954: p_data => x_msg_data
955: );
956: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
957: ROLLBACK TO INIT_INVEN_TMP;
958: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
959:
960: -- Standard call to get message count and if count=1, get the message
954: p_data => x_msg_data
955: );
956: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
957: ROLLBACK TO INIT_INVEN_TMP;
958: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
959:
960: -- Standard call to get message count and if count=1, get the message
961: FND_MSG_PUB.Count_And_Get (
962: p_encoded => FND_API.G_FALSE,
958: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
959:
960: -- Standard call to get message count and if count=1, get the message
961: FND_MSG_PUB.Count_And_Get (
962: p_encoded => FND_API.G_FALSE,
963: p_count => x_msg_count,
964: p_data => x_msg_data
965: );
966: WHEN OTHERS THEN
964: p_data => x_msg_data
965: );
966: WHEN OTHERS THEN
967: ROLLBACK TO INIT_INVEN_TMP;
968: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
969:
970: -- Standard call to get message count and if count=1, get the message
971: FND_MSG_PUB.Count_And_Get (
972: p_encoded => FND_API.G_FALSE,
968: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
969:
970: -- Standard call to get message count and if count=1, get the message
971: FND_MSG_PUB.Count_And_Get (
972: p_encoded => FND_API.G_FALSE,
973: p_count => x_msg_count,
974: p_data => x_msg_data
975: );
976: END Initiate_Inventory_Tmp;
1016: BEGIN
1017: -- Standard begin of API savepoint
1018: SAVEPOINT UPD_INVEN_TMP;
1019: -- Standard call to check for call compatibility.
1020: IF NOT FND_API.Compatible_API_Call (
1021: l_api_version,
1022: p_api_version,
1023: l_api_name,
1024: G_PKG_NAME)
1022: p_api_version,
1023: l_api_name,
1024: G_PKG_NAME)
1025: THEN
1026: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1027: END IF;
1028:
1029: --Initialize message list if p_init_msg_list is TRUE.
1030: IF FND_API.To_Boolean (p_init_msg_list) THEN
1026: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1027: END IF;
1028:
1029: --Initialize message list if p_init_msg_list is TRUE.
1030: IF FND_API.To_Boolean (p_init_msg_list) THEN
1031: FND_MSG_PUB.initialize;
1032: END IF;
1033:
1034: -- Debug Message
1036: OZF_UTILITY_PVT.debug_message(l_full_name||': Start');
1037: END IF;
1038:
1039: -- Initialize API return status to sucess
1040: x_return_status := FND_API.G_RET_STS_SUCCESS;
1041:
1042: OPEN transaction_info_csr (p_sales_transaction_id);
1043: FETCH transaction_info_csr into l_primary_quantity, l_inventory_item_id, l_party_id;
1044: CLOSE transaction_info_csr;
1059: OZF_UTILITY_PVT.debug_message(l_full_name||': End');
1060: END IF;
1061: --Standard call to get message count and if count=1, get the message
1062: FND_MSG_PUB.Count_And_Get (
1063: p_encoded => FND_API.G_FALSE,
1064: p_count => x_msg_count,
1065: p_data => x_msg_data
1066: );
1067: x_return_status := l_return_status;
1065: p_data => x_msg_data
1066: );
1067: x_return_status := l_return_status;
1068: EXCEPTION
1069: WHEN FND_API.G_EXC_ERROR THEN
1070: ROLLBACK TO UPD_INVEN_TMP;
1071: x_return_status := FND_API.G_RET_STS_ERROR;
1072: -- Standard call to get message count and if count=1, get the message
1073: FND_MSG_PUB.Count_And_Get (
1067: x_return_status := l_return_status;
1068: EXCEPTION
1069: WHEN FND_API.G_EXC_ERROR THEN
1070: ROLLBACK TO UPD_INVEN_TMP;
1071: x_return_status := FND_API.G_RET_STS_ERROR;
1072: -- Standard call to get message count and if count=1, get the message
1073: FND_MSG_PUB.Count_And_Get (
1074: p_encoded => FND_API.G_FALSE,
1075: p_count => x_msg_count,
1070: ROLLBACK TO UPD_INVEN_TMP;
1071: x_return_status := FND_API.G_RET_STS_ERROR;
1072: -- Standard call to get message count and if count=1, get the message
1073: FND_MSG_PUB.Count_And_Get (
1074: p_encoded => FND_API.G_FALSE,
1075: p_count => x_msg_count,
1076: p_data => x_msg_data
1077: );
1078: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1074: p_encoded => FND_API.G_FALSE,
1075: p_count => x_msg_count,
1076: p_data => x_msg_data
1077: );
1078: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1079: ROLLBACK TO UPD_INVEN_TMP;
1080: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1081:
1082: -- Standard call to get message count and if count=1, get the message
1076: p_data => x_msg_data
1077: );
1078: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1079: ROLLBACK TO UPD_INVEN_TMP;
1080: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1081:
1082: -- Standard call to get message count and if count=1, get the message
1083: FND_MSG_PUB.Count_And_Get (
1084: p_encoded => FND_API.G_FALSE,
1080: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1081:
1082: -- Standard call to get message count and if count=1, get the message
1083: FND_MSG_PUB.Count_And_Get (
1084: p_encoded => FND_API.G_FALSE,
1085: p_count => x_msg_count,
1086: p_data => x_msg_data
1087: );
1088: WHEN OTHERS THEN
1086: p_data => x_msg_data
1087: );
1088: WHEN OTHERS THEN
1089: ROLLBACK TO UPD_INVEN_TMP;
1090: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1091:
1092: -- Standard call to get message count and if count=1, get the message
1093: FND_MSG_PUB.Count_And_Get (
1094: p_encoded => FND_API.G_FALSE,
1090: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1091:
1092: -- Standard call to get message count and if count=1, get the message
1093: FND_MSG_PUB.Count_And_Get (
1094: p_encoded => FND_API.G_FALSE,
1095: p_count => x_msg_count,
1096: p_data => x_msg_data
1097: );
1098: END update_inventory_tmp;
1181: BEGIN
1182: -- Standard begin of API savepoint
1183: SAVEPOINT VALID_INV_LVL;
1184: -- Standard call to check for call compatibility.
1185: IF NOT FND_API.Compatible_API_Call (
1186: l_api_version,
1187: p_api_version,
1188: l_api_name,
1189: G_PKG_NAME) THEN
1186: l_api_version,
1187: p_api_version,
1188: l_api_name,
1189: G_PKG_NAME) THEN
1190: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1191: END IF;
1192:
1193: --Initialize message list if p_init_msg_list is TRUE.
1194: IF FND_API.To_Boolean (p_init_msg_list) THEN
1190: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1191: END IF;
1192:
1193: --Initialize message list if p_init_msg_list is TRUE.
1194: IF FND_API.To_Boolean (p_init_msg_list) THEN
1195: FND_MSG_PUB.initialize;
1196: END IF;
1197:
1198: -- Debug Message
1200: OZF_UTILITY_PVT.debug_message(l_full_name||': Start');
1201: END IF;
1202:
1203: -- Initialize API return status to sucess
1204: x_return_status := FND_API.G_RET_STS_SUCCESS;
1205:
1206: x_valid := false;
1207:
1208: -- Bug 4380203 (+)
1344: OZF_UTILITY_PVT.debug_message(l_full_name||': End');
1345: END IF;
1346: --Standard call to get message count and if count=1, get the message
1347: FND_MSG_PUB.Count_And_Get (
1348: p_encoded => FND_API.G_FALSE,
1349: p_count => x_msg_count,
1350: p_data => x_msg_data
1351: );
1352: x_return_status := l_return_status;
1351: );
1352: x_return_status := l_return_status;
1353:
1354: EXCEPTION
1355: WHEN FND_API.G_EXC_ERROR THEN
1356: ROLLBACK TO VALID_INV_LVL;
1357: x_return_status := FND_API.G_RET_STS_ERROR;
1358: -- Standard call to get message count and if count=1, get the message
1359: FND_MSG_PUB.Count_And_Get (
1353:
1354: EXCEPTION
1355: WHEN FND_API.G_EXC_ERROR THEN
1356: ROLLBACK TO VALID_INV_LVL;
1357: x_return_status := FND_API.G_RET_STS_ERROR;
1358: -- Standard call to get message count and if count=1, get the message
1359: FND_MSG_PUB.Count_And_Get (
1360: p_encoded => FND_API.G_FALSE,
1361: p_count => x_msg_count,
1356: ROLLBACK TO VALID_INV_LVL;
1357: x_return_status := FND_API.G_RET_STS_ERROR;
1358: -- Standard call to get message count and if count=1, get the message
1359: FND_MSG_PUB.Count_And_Get (
1360: p_encoded => FND_API.G_FALSE,
1361: p_count => x_msg_count,
1362: p_data => x_msg_data
1363: );
1364: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1360: p_encoded => FND_API.G_FALSE,
1361: p_count => x_msg_count,
1362: p_data => x_msg_data
1363: );
1364: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1365: ROLLBACK TO VALID_INV_LVL;
1366: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1367:
1368: -- Standard call to get message count and if count=1, get the message
1362: p_data => x_msg_data
1363: );
1364: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1365: ROLLBACK TO VALID_INV_LVL;
1366: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1367:
1368: -- Standard call to get message count and if count=1, get the message
1369: FND_MSG_PUB.Count_And_Get (
1370: p_encoded => FND_API.G_FALSE,
1366: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1367:
1368: -- Standard call to get message count and if count=1, get the message
1369: FND_MSG_PUB.Count_And_Get (
1370: p_encoded => FND_API.G_FALSE,
1371: p_count => x_msg_count,
1372: p_data => x_msg_data
1373: );
1374: WHEN OTHERS THEN
1372: p_data => x_msg_data
1373: );
1374: WHEN OTHERS THEN
1375: ROLLBACK TO VALID_INV_LVL;
1376: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1377:
1378: -- Standard call to get message count and if count=1, get the message
1379: FND_MSG_PUB.Count_And_Get (
1380: p_encoded => FND_API.G_FALSE,
1376: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1377:
1378: -- Standard call to get message count and if count=1, get the message
1379: FND_MSG_PUB.Count_And_Get (
1380: p_encoded => FND_API.G_FALSE,
1381: p_count => x_msg_count,
1382: p_data => x_msg_data
1383: );
1384: END Validate_Inventory_Level;
1464: BEGIN
1465: -- Standard begin of API savepoint
1466: SAVEPOINT GET_WAC;
1467: -- Standard call to check for call compatibility.
1468: IF NOT FND_API.Compatible_API_Call (
1469: l_api_version,
1470: p_api_version,
1471: l_api_name,
1472: G_PKG_NAME)
1470: p_api_version,
1471: l_api_name,
1472: G_PKG_NAME)
1473: THEN
1474: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1475: END IF;
1476:
1477: --Initialize message list if p_init_msg_list is TRUE.
1478: IF FND_API.To_Boolean (p_init_msg_list) THEN
1474: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1475: END IF;
1476:
1477: --Initialize message list if p_init_msg_list is TRUE.
1478: IF FND_API.To_Boolean (p_init_msg_list) THEN
1479: FND_MSG_PUB.initialize;
1480: END IF;
1481:
1482: -- Debug Message
1484: OZF_UTILITY_PVT.debug_message(l_full_name||': Start');
1485: END IF;
1486:
1487: -- Initialize API return status to sucess
1488: x_return_status := FND_API.G_RET_STS_SUCCESS;
1489:
1490: OPEN Sales_Order_info_csr(p_order_date,
1491: p_inventory_item_id,
1492: p_sold_from_cust_account_id);
1550: ,p_from_amount => l_unit_price_tbl(i)
1551: ,x_return_status => l_return_status
1552: ,x_to_amount => l_used_unit_price_tbl(i)
1553: ,x_rate => l_rate);
1554: IF l_return_status = FND_API.g_ret_sts_error THEN
1555: RAISE FND_API.g_exc_error;
1556: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
1557: RAISE FND_API.g_exc_unexpected_error;
1558: END IF;
1551: ,x_return_status => l_return_status
1552: ,x_to_amount => l_used_unit_price_tbl(i)
1553: ,x_rate => l_rate);
1554: IF l_return_status = FND_API.g_ret_sts_error THEN
1555: RAISE FND_API.g_exc_error;
1556: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
1557: RAISE FND_API.g_exc_unexpected_error;
1558: END IF;
1559: END IF;
1552: ,x_to_amount => l_used_unit_price_tbl(i)
1553: ,x_rate => l_rate);
1554: IF l_return_status = FND_API.g_ret_sts_error THEN
1555: RAISE FND_API.g_exc_error;
1556: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
1557: RAISE FND_API.g_exc_unexpected_error;
1558: END IF;
1559: END IF;
1560: END IF;
1553: ,x_rate => l_rate);
1554: IF l_return_status = FND_API.g_ret_sts_error THEN
1555: RAISE FND_API.g_exc_error;
1556: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
1557: RAISE FND_API.g_exc_unexpected_error;
1558: END IF;
1559: END IF;
1560: END IF;
1561: END LOOP;
1603: OZF_UTILITY_PVT.debug_message(l_full_name||': End');
1604: END IF;
1605: --Standard call to get message count and if count=1, get the message
1606: FND_MSG_PUB.Count_And_Get (
1607: p_encoded => FND_API.G_FALSE,
1608: p_count => x_msg_count,
1609: p_data => x_msg_data
1610: );
1611: x_return_status := l_return_status;
1610: );
1611: x_return_status := l_return_status;
1612:
1613: EXCEPTION
1614: WHEN FND_API.G_EXC_ERROR THEN
1615: ROLLBACK TO GET_WAC;
1616: x_return_status := FND_API.G_RET_STS_ERROR;
1617: -- Standard call to get message count and if count=1, get the message
1618: FND_MSG_PUB.Count_And_Get (
1612:
1613: EXCEPTION
1614: WHEN FND_API.G_EXC_ERROR THEN
1615: ROLLBACK TO GET_WAC;
1616: x_return_status := FND_API.G_RET_STS_ERROR;
1617: -- Standard call to get message count and if count=1, get the message
1618: FND_MSG_PUB.Count_And_Get (
1619: p_encoded => FND_API.G_FALSE,
1620: p_count => x_msg_count,
1615: ROLLBACK TO GET_WAC;
1616: x_return_status := FND_API.G_RET_STS_ERROR;
1617: -- Standard call to get message count and if count=1, get the message
1618: FND_MSG_PUB.Count_And_Get (
1619: p_encoded => FND_API.G_FALSE,
1620: p_count => x_msg_count,
1621: p_data => x_msg_data
1622: );
1623: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1619: p_encoded => FND_API.G_FALSE,
1620: p_count => x_msg_count,
1621: p_data => x_msg_data
1622: );
1623: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1624: ROLLBACK TO GET_WAC;
1625: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1626:
1627: -- Standard call to get message count and if count=1, get the message
1621: p_data => x_msg_data
1622: );
1623: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1624: ROLLBACK TO GET_WAC;
1625: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1626:
1627: -- Standard call to get message count and if count=1, get the message
1628: FND_MSG_PUB.Count_And_Get (
1629: p_encoded => FND_API.G_FALSE,
1625: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1626:
1627: -- Standard call to get message count and if count=1, get the message
1628: FND_MSG_PUB.Count_And_Get (
1629: p_encoded => FND_API.G_FALSE,
1630: p_count => x_msg_count,
1631: p_data => x_msg_data
1632: );
1633: WHEN OTHERS THEN
1631: p_data => x_msg_data
1632: );
1633: WHEN OTHERS THEN
1634: ROLLBACK TO GET_WAC;
1635: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1636:
1637: -- Standard call to get message count and if count=1, get the message
1638: FND_MSG_PUB.Count_And_Get (
1639: p_encoded => FND_API.G_FALSE,
1635: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1636:
1637: -- Standard call to get message count and if count=1, get the message
1638: FND_MSG_PUB.Count_And_Get (
1639: p_encoded => FND_API.G_FALSE,
1640: p_count => x_msg_count,
1641: p_data => x_msg_data
1642: );
1643: END Get_Purchase_Price;