26: ----------------------------------------------------------------------
27:
28: PROCEDURE Select_CustomerPrice(
29: p_api_version IN NUMBER
30: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
31: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
32: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
33: ,x_return_status OUT NOCOPY VARCHAR2
34: ,x_msg_count OUT NOCOPY NUMBER
27:
28: PROCEDURE Select_CustomerPrice(
29: p_api_version IN NUMBER
30: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
31: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
32: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
33: ,x_return_status OUT NOCOPY VARCHAR2
34: ,x_msg_count OUT NOCOPY NUMBER
35: ,x_msg_data OUT NOCOPY VARCHAR2
28: PROCEDURE Select_CustomerPrice(
29: p_api_version IN NUMBER
30: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
31: ,p_commit IN VARCHAR2 := FND_API.G_FALSE
32: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
33: ,x_return_status OUT NOCOPY VARCHAR2
34: ,x_msg_count OUT NOCOPY NUMBER
35: ,x_msg_data OUT NOCOPY VARCHAR2
36: ,p_cust_hdr_rec IN dpp_cust_hdr_rec_type
121:
122: -- Standard begin of API savepoint
123: SAVEPOINT Select_CustomerPrice_PVT;
124: -- Standard call to check for call compatibility.
125: IF NOT FND_API.Compatible_API_Call ( l_api_version,
126: p_api_version,
127: l_api_name,
128: G_PKG_NAME)
129: THEN
126: p_api_version,
127: l_api_name,
128: G_PKG_NAME)
129: THEN
130: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
131: END IF;
132: -- Initialize message list if p_init_msg_list is set to TRUE.
133: IF FND_API.to_Boolean( p_init_msg_list )
134: THEN
129: THEN
130: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
131: END IF;
132: -- Initialize message list if p_init_msg_list is set to TRUE.
133: IF FND_API.to_Boolean( p_init_msg_list )
134: THEN
135: FND_MSG_PUB.initialize;
136: END IF;
137:
139:
140: dpp_utility_pvt.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Private API: ' || l_api_name || 'start');
141:
142: -- Initialize API return status to sucess
143: l_return_status := FND_API.G_RET_STS_SUCCESS;
144: --
145: -- API body
146: --
147: IF l_cust_hdr_rec.org_id IS NULL THEN
147: IF l_cust_hdr_rec.org_id IS NULL THEN
148: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
149: FND_MESSAGE.set_token('ID', 'Org ID');
150: FND_MSG_PUB.add;
151: RAISE FND_API.G_EXC_ERROR;
152: ELSIF l_cust_hdr_rec.Effective_Start_Date IS NULL THEN
153: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
154: FND_MESSAGE.set_token('ID', 'Effective Start Date');
155: FND_MSG_PUB.add;
152: ELSIF l_cust_hdr_rec.Effective_Start_Date IS NULL THEN
153: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
154: FND_MESSAGE.set_token('ID', 'Effective Start Date');
155: FND_MSG_PUB.add;
156: RAISE FND_API.G_EXC_ERROR;
157: ELSIF l_cust_hdr_rec.Effective_End_Date IS NULL THEN
158: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
159: FND_MESSAGE.set_token('ID', 'Effective End Date');
160: FND_MSG_PUB.add;
157: ELSIF l_cust_hdr_rec.Effective_End_Date IS NULL THEN
158: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
159: FND_MESSAGE.set_token('ID', 'Effective End Date');
160: FND_MSG_PUB.add;
161: RAISE FND_API.G_EXC_ERROR;
162: ELSIF l_cust_hdr_rec.currency_code IS NULL THEN
163: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
164: FND_MESSAGE.set_token('ID', 'Currency Code');
165: FND_MSG_PUB.add;
162: ELSIF l_cust_hdr_rec.currency_code IS NULL THEN
163: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
164: FND_MESSAGE.set_token('ID', 'Currency Code');
165: FND_MSG_PUB.add;
166: RAISE FND_API.G_EXC_ERROR;
167: ELSE
168: IF l_customer_tbl.EXISTS(1) THEN
169: FOR i IN l_customer_tbl.FIRST..l_customer_tbl.LAST LOOP
170: IF l_customer_tbl(i).inventory_item_id IS NULL THEN
170: IF l_customer_tbl(i).inventory_item_id IS NULL THEN
171: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
172: FND_MESSAGE.set_token('ID', 'Inventory Item Id');
173: FND_MSG_PUB.add;
174: RAISE FND_API.G_EXC_ERROR;
175: ELSIF l_customer_tbl(i).uom_code IS NULL THEN
176: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
177: FND_MESSAGE.set_token('ID', 'UOM Code');
178: FND_MSG_PUB.add;
175: ELSIF l_customer_tbl(i).uom_code IS NULL THEN
176: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
177: FND_MESSAGE.set_token('ID', 'UOM Code');
178: FND_MSG_PUB.add;
179: RAISE FND_API.G_EXC_ERROR;
180: ELSE --Inventory item id null
181: l_customer_price_tbl.delete();
182: l_count :=0;
183: FOR get_customer_rec IN get_customer_csr(to_number(l_cust_hdr_rec.org_id),
216: ELSE --No line details available
217: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
218: FND_MESSAGE.set_token('ID', 'Line Details');
219: FND_MSG_PUB.add;
220: RAISE FND_API.G_EXC_ERROR;
221: END IF;
222:
223: p_customer_tbl := l_customer_tbl;
224: x_return_status := l_return_status;
223: p_customer_tbl := l_customer_tbl;
224: x_return_status := l_return_status;
225: END IF;
226: -- Standard check for p_commit
227: IF FND_API.to_Boolean( p_commit )
228: THEN
229: COMMIT WORK;
230: END IF;
231: -- Debug Message
241:
242: --Exception Handling
243: EXCEPTION
244:
245: WHEN FND_API.G_EXC_ERROR THEN
246: ROLLBACK TO Select_CustomerPrice_PVT;
247: x_return_status := FND_API.G_RET_STS_ERROR;
248: -- Standard call to get message count and if count=1, get the message
249: FND_MSG_PUB.Count_And_Get (
243: EXCEPTION
244:
245: WHEN FND_API.G_EXC_ERROR THEN
246: ROLLBACK TO Select_CustomerPrice_PVT;
247: x_return_status := FND_API.G_RET_STS_ERROR;
248: -- Standard call to get message count and if count=1, get the message
249: FND_MSG_PUB.Count_And_Get (
250: p_encoded => FND_API.G_FALSE,
251: p_count => x_msg_count,
246: ROLLBACK TO Select_CustomerPrice_PVT;
247: x_return_status := FND_API.G_RET_STS_ERROR;
248: -- Standard call to get message count and if count=1, get the message
249: FND_MSG_PUB.Count_And_Get (
250: p_encoded => FND_API.G_FALSE,
251: p_count => x_msg_count,
252: p_data => x_msg_data
253: );
254: IF x_msg_count > 1 THEN
256: x_msg_data := SUBSTR((x_msg_data||' '|| FND_MSG_PUB.GET(P_MSG_INDEX => I, P_ENCODED => 'F')), 1, 2000);
257: END LOOP;
258: END IF;
259:
260: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
261: ROLLBACK TO Select_CustomerPrice_PVT;
262: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
263: -- Standard call to get message count and if count=1, get the message
264: FND_MSG_PUB.Count_And_Get (
258: END IF;
259:
260: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
261: ROLLBACK TO Select_CustomerPrice_PVT;
262: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
263: -- Standard call to get message count and if count=1, get the message
264: FND_MSG_PUB.Count_And_Get (
265: p_encoded => FND_API.G_FALSE,
266: p_count => x_msg_count,
261: ROLLBACK TO Select_CustomerPrice_PVT;
262: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
263: -- Standard call to get message count and if count=1, get the message
264: FND_MSG_PUB.Count_And_Get (
265: p_encoded => FND_API.G_FALSE,
266: p_count => x_msg_count,
267: p_data => x_msg_data
268: );
269: IF x_msg_count > 1 THEN
273: END IF;
274:
275: WHEN OTHERS THEN
276: ROLLBACK TO Select_CustomerPrice_PVT;
277: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
278: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
279: fnd_message.set_token('ROUTINE', 'DPP_CUSTOMERCLAIMS_PVT.Select_CustomerPrice');
280: fnd_message.set_token('ERRNO', sqlcode);
281: fnd_message.set_token('REASON', sqlerrm);
281: fnd_message.set_token('REASON', sqlerrm);
282: FND_MSG_PUB.add;
283: -- Standard call to get message count and if count=1, get the message
284: FND_MSG_PUB.Count_And_Get (
285: p_encoded => FND_API.G_FALSE,
286: p_count => x_msg_count,
287: p_data => x_msg_data
288: );
289: IF x_msg_count > 1 THEN
310: ----------------------------------------------------------------------
311:
312: PROCEDURE Populate_CustomerPrice(
313: p_api_version IN NUMBER
314: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
315: ,p_commit IN VARCHAR2 := FND_API.G_TRUE
316: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
317: ,x_return_status OUT NOCOPY VARCHAR2
318: ,x_msg_count OUT NOCOPY NUMBER
311:
312: PROCEDURE Populate_CustomerPrice(
313: p_api_version IN NUMBER
314: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
315: ,p_commit IN VARCHAR2 := FND_API.G_TRUE
316: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
317: ,x_return_status OUT NOCOPY VARCHAR2
318: ,x_msg_count OUT NOCOPY NUMBER
319: ,x_msg_data OUT NOCOPY VARCHAR2
312: PROCEDURE Populate_CustomerPrice(
313: p_api_version IN NUMBER
314: ,p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE
315: ,p_commit IN VARCHAR2 := FND_API.G_TRUE
316: ,p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL
317: ,x_return_status OUT NOCOPY VARCHAR2
318: ,x_msg_count OUT NOCOPY NUMBER
319: ,x_msg_data OUT NOCOPY VARCHAR2
320: ,p_cust_hdr_rec IN dpp_cust_hdr_rec_type
362: BEGIN
363: -- Standard begin of API savepoint
364: SAVEPOINT Populate_CustomerPrice_PVT;
365: -- Standard call to check for call compatibility.
366: IF NOT FND_API.Compatible_API_Call ( l_api_version,
367: p_api_version,
368: l_api_name,
369: G_PKG_NAME)
370: THEN
367: p_api_version,
368: l_api_name,
369: G_PKG_NAME)
370: THEN
371: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
372: END IF;
373: -- Initialize message list if p_init_msg_list is set to TRUE.
374: IF FND_API.to_Boolean( p_init_msg_list )
375: THEN
370: THEN
371: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
372: END IF;
373: -- Initialize message list if p_init_msg_list is set to TRUE.
374: IF FND_API.to_Boolean( p_init_msg_list )
375: THEN
376: FND_MSG_PUB.initialize;
377: END IF;
378:
380:
381: dpp_utility_pvt.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Private API: ' || l_api_name || 'start');
382:
383: -- Initialize API return status to sucess
384: l_return_status := FND_API.G_RET_STS_SUCCESS;
385:
386: l_profile_option_value := fnd_profile.VALUE('DPP_DEF_CUST_CLAIM_LINE_INFO');
387: --
388: -- API body
395: IF l_cust_hdr_rec.org_id IS NULL THEN
396: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
397: FND_MESSAGE.set_token('ID', 'Org Id');
398: FND_MSG_PUB.add;
399: RAISE FND_API.G_EXC_ERROR;
400: ELSIF l_cust_hdr_rec.effective_start_date IS NULL THEN
401: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
402: FND_MESSAGE.set_token('ID', 'Effective Start Date');
403: FND_MSG_PUB.add;
400: ELSIF l_cust_hdr_rec.effective_start_date IS NULL THEN
401: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
402: FND_MESSAGE.set_token('ID', 'Effective Start Date');
403: FND_MSG_PUB.add;
404: RAISE FND_API.G_EXC_ERROR;
405: ELSIF l_cust_hdr_rec.effective_end_date IS NULL THEN
406: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
407: FND_MESSAGE.set_token('ID', 'Effective End Date');
408: FND_MSG_PUB.add;
405: ELSIF l_cust_hdr_rec.effective_end_date IS NULL THEN
406: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
407: FND_MESSAGE.set_token('ID', 'Effective End Date');
408: FND_MSG_PUB.add;
409: RAISE FND_API.G_EXC_ERROR;
410: ELSIF l_cust_hdr_rec.currency_code IS NULL THEN
411: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
412: FND_MESSAGE.set_token('ID', 'Currency Code');
413: FND_MSG_PUB.add;
410: ELSIF l_cust_hdr_rec.currency_code IS NULL THEN
411: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
412: FND_MESSAGE.set_token('ID', 'Currency Code');
413: FND_MSG_PUB.add;
414: RAISE FND_API.G_EXC_ERROR;
415: ELSE
416: IF l_customer_tbl.EXISTS(1) THEN
417: IF l_profile_option_value = 'Y' OR l_profile_option_value IS NULL THEN
418: FOR i IN l_customer_tbl.FIRST..l_customer_tbl.LAST LOOP
420: IF l_customer_tbl(i).inventory_item_id IS NULL THEN
421: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
422: FND_MESSAGE.set_token('ID', 'Inventory Item Id');
423: FND_MSG_PUB.add;
424: RAISE FND_API.G_EXC_ERROR;
425: ELSE
426: BEGIN
427: SELECT SUPPLIER_NEW_PRICE, PRICE_CHANGE
428: INTO l_supp_new_price, l_price_change
469:
470: --Convert supp new price
471: DPP_UTILITY_PVT.convert_currency(p_from_currency => l_cust_hdr_rec.currency_code
472: ,p_to_currency => l_customer_tbl(i).customer_price_tbl(j).invoice_currency_code
473: ,p_conv_type => FND_API.G_MISS_CHAR
474: ,p_conv_rate => FND_API.G_MISS_NUM
475: ,p_conv_date => trunc(SYSDATE)
476: ,p_from_amount => l_supp_new_price
477: ,x_return_status => l_return_status
470: --Convert supp new price
471: DPP_UTILITY_PVT.convert_currency(p_from_currency => l_cust_hdr_rec.currency_code
472: ,p_to_currency => l_customer_tbl(i).customer_price_tbl(j).invoice_currency_code
473: ,p_conv_type => FND_API.G_MISS_CHAR
474: ,p_conv_rate => FND_API.G_MISS_NUM
475: ,p_conv_date => trunc(SYSDATE)
476: ,p_from_amount => l_supp_new_price
477: ,x_return_status => l_return_status
478: ,x_to_amount => l_conv_supp_new_price
481: IF l_price_change <> 0 THEN
482: -- convert price change
483: DPP_UTILITY_PVT.convert_currency(p_from_currency => l_cust_hdr_rec.currency_code
484: ,p_to_currency => l_customer_tbl(i).customer_price_tbl(j).invoice_currency_code
485: ,p_conv_type => FND_API.G_MISS_CHAR
486: ,p_conv_rate => FND_API.G_MISS_NUM
487: ,p_conv_date => trunc(SYSDATE)
488: ,p_from_amount => l_price_change
489: ,x_return_status => l_return_status
482: -- convert price change
483: DPP_UTILITY_PVT.convert_currency(p_from_currency => l_cust_hdr_rec.currency_code
484: ,p_to_currency => l_customer_tbl(i).customer_price_tbl(j).invoice_currency_code
485: ,p_conv_type => FND_API.G_MISS_CHAR
486: ,p_conv_rate => FND_API.G_MISS_NUM
487: ,p_conv_date => trunc(SYSDATE)
488: ,p_from_amount => l_price_change
489: ,x_return_status => l_return_status
490: ,x_to_amount => l_conv_price_change
573: fnd_message.set_token('ROUTINE', 'DPP_CUSTOMERCLAIMS_PVT.Populate_CustomerPrice');
574: fnd_message.set_token('ERRNO', sqlcode);
575: fnd_message.set_token('REASON', sqlerrm);
576: fnd_msg_pub.add;
577: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
578: END;
579: -- Debug Message
580:
581: dpp_utility_pvt.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Insertion Done in table DPP_CUSTOMER_CLAIMS_ALL');
601: ELSE --customer_price_tbl exists
602: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
603: FND_MESSAGE.set_token('ID', 'Line Details');
604: FND_MSG_PUB.add;
605: RAISE FND_API.G_EXC_ERROR;
606: END IF; --customer_price_tbl exists
607: END IF; --inventory_item_id is not null
608: END LOOP; --l_customer_tbl loop
609: -- Call the procedure to insert history record
607: END IF; --inventory_item_id is not null
608: END LOOP; --l_customer_tbl loop
609: -- Call the procedure to insert history record
610: DPP_LOG_PVT.Insert_ClaimsLog(p_api_version => l_api_version
611: ,p_init_msg_list => FND_API.G_FALSE
612: ,p_commit => FND_API.G_FALSE
613: ,p_validation_level => FND_API.G_VALID_LEVEL_FULL
614: ,x_return_status => l_return_status
615: ,x_msg_count => l_msg_count
608: END LOOP; --l_customer_tbl loop
609: -- Call the procedure to insert history record
610: DPP_LOG_PVT.Insert_ClaimsLog(p_api_version => l_api_version
611: ,p_init_msg_list => FND_API.G_FALSE
612: ,p_commit => FND_API.G_FALSE
613: ,p_validation_level => FND_API.G_VALID_LEVEL_FULL
614: ,x_return_status => l_return_status
615: ,x_msg_count => l_msg_count
616: ,x_msg_data => l_msg_data
609: -- Call the procedure to insert history record
610: DPP_LOG_PVT.Insert_ClaimsLog(p_api_version => l_api_version
611: ,p_init_msg_list => FND_API.G_FALSE
612: ,p_commit => FND_API.G_FALSE
613: ,p_validation_level => FND_API.G_VALID_LEVEL_FULL
614: ,x_return_status => l_return_status
615: ,x_msg_count => l_msg_count
616: ,x_msg_data => l_msg_data
617: ,p_claim_lines_tbl => l_claim_lines_tbl
642: ELSE
643: FND_MESSAGE.set_name('DPP', 'DPP_API_INPUT_ID_MISSING');
644: FND_MESSAGE.set_token('ID', 'Line Details');
645: FND_MSG_PUB.add;
646: RAISE FND_API.G_EXC_ERROR;
647: END IF; --l_customer_tbl.EXISTS(1)
648: END IF; --l_cust_hdr_rec.org_id IS NULL
649:
650: x_return_status := l_return_status;
648: END IF; --l_cust_hdr_rec.org_id IS NULL
649:
650: x_return_status := l_return_status;
651: -- Standard check for p_commit
652: IF FND_API.to_Boolean( p_commit )
653: THEN
654: COMMIT WORK;
655: END IF;
656: -- Debug Message
672: --Exception Handling
673: EXCEPTION
674: WHEN DPP_UTILITY_PVT.resource_locked THEN
675: ROLLBACK TO Populate_CustomerPrice_PVT;
676: x_return_status := FND_API.g_ret_sts_error;
677: DPP_UTILITY_PVT.Error_Message(p_message_name => 'API_RESOURCE_LOCKED');
678: FND_MSG_PUB.Count_And_Get (
679: p_encoded => FND_API.G_FALSE,
680: p_count => x_msg_count,
675: ROLLBACK TO Populate_CustomerPrice_PVT;
676: x_return_status := FND_API.g_ret_sts_error;
677: DPP_UTILITY_PVT.Error_Message(p_message_name => 'API_RESOURCE_LOCKED');
678: FND_MSG_PUB.Count_And_Get (
679: p_encoded => FND_API.G_FALSE,
680: p_count => x_msg_count,
681: p_data => x_msg_data
682: );
683: IF x_msg_count > 1 THEN
685: x_msg_data := SUBSTR((x_msg_data||' '|| FND_MSG_PUB.GET(P_MSG_INDEX => I, P_ENCODED => 'F')), 1, 2000);
686: END LOOP;
687: END IF;
688:
689: WHEN FND_API.G_EXC_ERROR THEN
690: ROLLBACK TO Populate_CustomerPrice_PVT;
691: x_return_status := FND_API.G_RET_STS_ERROR;
692: -- Standard call to get message count and if count=1, get the message
693: FND_MSG_PUB.Count_And_Get (
687: END IF;
688:
689: WHEN FND_API.G_EXC_ERROR THEN
690: ROLLBACK TO Populate_CustomerPrice_PVT;
691: x_return_status := FND_API.G_RET_STS_ERROR;
692: -- Standard call to get message count and if count=1, get the message
693: FND_MSG_PUB.Count_And_Get (
694: p_encoded => FND_API.G_FALSE,
695: p_count => x_msg_count,
690: ROLLBACK TO Populate_CustomerPrice_PVT;
691: x_return_status := FND_API.G_RET_STS_ERROR;
692: -- Standard call to get message count and if count=1, get the message
693: FND_MSG_PUB.Count_And_Get (
694: p_encoded => FND_API.G_FALSE,
695: p_count => x_msg_count,
696: p_data => x_msg_data
697: );
698: IF x_msg_count > 1 THEN
700: x_msg_data := SUBSTR((x_msg_data||' '|| FND_MSG_PUB.GET(P_MSG_INDEX => I, P_ENCODED => 'F')), 1, 2000);
701: END LOOP;
702: END IF;
703:
704: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
705: ROLLBACK TO Populate_CustomerPrice_PVT;
706: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
707: -- Standard call to get message count and if count=1, get the message
708: FND_MSG_PUB.Count_And_Get (
702: END IF;
703:
704: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
705: ROLLBACK TO Populate_CustomerPrice_PVT;
706: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
707: -- Standard call to get message count and if count=1, get the message
708: FND_MSG_PUB.Count_And_Get (
709: p_encoded => FND_API.G_FALSE,
710: p_count => x_msg_count,
705: ROLLBACK TO Populate_CustomerPrice_PVT;
706: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
707: -- Standard call to get message count and if count=1, get the message
708: FND_MSG_PUB.Count_And_Get (
709: p_encoded => FND_API.G_FALSE,
710: p_count => x_msg_count,
711: p_data => x_msg_data
712: );
713: IF x_msg_count > 1 THEN
717: END IF;
718:
719: WHEN OTHERS THEN
720: ROLLBACK TO Populate_CustomerPrice_PVT;
721: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
722: fnd_message.set_name('FND', 'SQL_PLSQL_ERROR');
723: fnd_message.set_token('ROUTINE', 'DPP_CUSTOMERCLAIMS_PVT.Populate_CustomerPrice');
724: fnd_message.set_token('ERRNO', sqlcode);
725: fnd_message.set_token('REASON', sqlerrm);
727: dpp_utility_pvt.debug_message(FND_LOG.LEVEL_STATEMENT, l_module, 'Error in inserting into DPP_CUSTOMER_CLAIMS_ALL: '||SQLERRM);
728:
729: -- Standard call to get message count and if count=1, get the message
730: FND_MSG_PUB.Count_And_Get (
731: p_encoded => FND_API.G_FALSE,
732: p_count => x_msg_count,
733: p_data => x_msg_data
734: );
735: IF x_msg_count > 1 THEN