130:
131: IF (p_operation NOT IN ('UPDATE', 'CREATE')) THEN
132: Debug('Wrong p_operation type: ' || p_operation);
133: Debug('p_operation must be either ''UPDATE'' or ''CREATE''');
134: RAISE FND_API.G_EXC_ERROR;
135: END IF;
136:
137: -- ---------------------------------------------------------------
138: -- Check profile "OZF: Validate market and product eligibility
147: Set_Message(
148: p_msg_name => 'PV_SET_BUDGET_VALIDATION'
149: );
150:
151: RAISE FND_API.G_EXC_ERROR;
152: END IF;
153:
154:
155: -- =============================================================== --
165: -- and re-create them.
166: -- ---------------------------------------------------------------
167: IF (p_operation = 'UPDATE' AND p_offer_id IS NULL) THEN
168: Debug('Offer ID must be provided when the operation is UPDATE.');
169: RAISE FND_API.G_EXC_ERROR;
170: END IF;
171:
172: -- ---------------------------------------------------------------
173: -- 'UPDATE' indicates that the offer already exists but some of
260: -- ----------------------------------------------------------
261: Debug('Deleting offer-related items..........................');
262:
263: ozf_offer_pub.process_modifiers(
264: p_init_msg_list => FND_API.g_false,
265: p_api_version => 1.0,
266: p_commit => FND_API.g_false,
267: x_return_status => x_return_status,
268: x_msg_count => x_msg_count,
262:
263: ozf_offer_pub.process_modifiers(
264: p_init_msg_list => FND_API.g_false,
265: p_api_version => 1.0,
266: p_commit => FND_API.g_false,
267: x_return_status => x_return_status,
268: x_msg_count => x_msg_count,
269: x_msg_data => x_msg_data,
270: p_offer_type => 'NET_ACCRUAL',
281: x_qp_list_header_id => l_qp_list_header_id,
282: x_error_location => x_error_location
283: );
284:
285: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
286: RAISE FND_API.G_EXC_ERROR;
287:
288: ELSIF (x_return_status = FND_API.g_ret_sts_unexp_error) THEN
289: RAISE FND_API.g_exc_unexpected_error;
282: x_error_location => x_error_location
283: );
284:
285: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
286: RAISE FND_API.G_EXC_ERROR;
287:
288: ELSIF (x_return_status = FND_API.g_ret_sts_unexp_error) THEN
289: RAISE FND_API.g_exc_unexpected_error;
290: END IF;
284:
285: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
286: RAISE FND_API.G_EXC_ERROR;
287:
288: ELSIF (x_return_status = FND_API.g_ret_sts_unexp_error) THEN
289: RAISE FND_API.g_exc_unexpected_error;
290: END IF;
291:
292: END IF;
285: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
286: RAISE FND_API.G_EXC_ERROR;
287:
288: ELSIF (x_return_status = FND_API.g_ret_sts_unexp_error) THEN
289: RAISE FND_API.g_exc_unexpected_error;
290: END IF;
291:
292: END IF;
293:
414: Debug('Re-create offer-related items.............................');
415: END IF;
416:
417: ozf_offer_pub.process_modifiers(
418: p_init_msg_list => FND_API.g_false,
419: p_api_version => 1.0,
420: p_commit => FND_API.g_false,
421: x_return_status => x_return_status,
422: x_msg_count => x_msg_count,
416:
417: ozf_offer_pub.process_modifiers(
418: p_init_msg_list => FND_API.g_false,
419: p_api_version => 1.0,
420: p_commit => FND_API.g_false,
421: x_return_status => x_return_status,
422: x_msg_count => x_msg_count,
423: x_msg_data => x_msg_data,
424: p_offer_type => 'NET_ACCRUAL',
436: x_error_location => x_error_location
437: );
438:
439:
440: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
441: RAISE FND_API.G_EXC_ERROR;
442:
443: ELSIF (x_return_status = FND_API.g_ret_sts_unexp_error) THEN
444: RAISE FND_API.g_exc_unexpected_error;
437: );
438:
439:
440: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
441: RAISE FND_API.G_EXC_ERROR;
442:
443: ELSIF (x_return_status = FND_API.g_ret_sts_unexp_error) THEN
444: RAISE FND_API.g_exc_unexpected_error;
445: END IF;
439:
440: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
441: RAISE FND_API.G_EXC_ERROR;
442:
443: ELSIF (x_return_status = FND_API.g_ret_sts_unexp_error) THEN
444: RAISE FND_API.g_exc_unexpected_error;
445: END IF;
446:
447: x_qp_list_header_id := l_qp_list_header_id;
440: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
441: RAISE FND_API.G_EXC_ERROR;
442:
443: ELSIF (x_return_status = FND_API.g_ret_sts_unexp_error) THEN
444: RAISE FND_API.g_exc_unexpected_error;
445: END IF;
446:
447: x_qp_list_header_id := l_qp_list_header_id;
448:
489: Debug('l_modifier_list_rec.QP_LIST_HEADER_ID = ' ||
490: l_modifier_list_rec.QP_LIST_HEADER_ID);
491:
492: ozf_offer_pub.process_modifiers(
493: p_init_msg_list => FND_API.g_false,
494: p_api_version => 1.0,
495: p_commit => FND_API.g_false,
496: x_return_status => x_return_status,
497: x_msg_count => x_msg_count,
491:
492: ozf_offer_pub.process_modifiers(
493: p_init_msg_list => FND_API.g_false,
494: p_api_version => 1.0,
495: p_commit => FND_API.g_false,
496: x_return_status => x_return_status,
497: x_msg_count => x_msg_count,
498: x_msg_data => x_msg_data,
499: p_offer_type => 'NET_ACCRUAL',
510: x_qp_list_header_id => l_qp_list_header_id,
511: x_error_location => x_error_location
512: );
513:
514: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
515: RAISE FND_API.G_EXC_ERROR;
516:
517: ELSIF (x_return_status = FND_API.g_ret_sts_unexp_error) THEN
518: RAISE FND_API.g_exc_unexpected_error;
511: x_error_location => x_error_location
512: );
513:
514: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
515: RAISE FND_API.G_EXC_ERROR;
516:
517: ELSIF (x_return_status = FND_API.g_ret_sts_unexp_error) THEN
518: RAISE FND_API.g_exc_unexpected_error;
519: END IF;
513:
514: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
515: RAISE FND_API.G_EXC_ERROR;
516:
517: ELSIF (x_return_status = FND_API.g_ret_sts_unexp_error) THEN
518: RAISE FND_API.g_exc_unexpected_error;
519: END IF;
520:
521:
514: IF (x_return_status = FND_API.G_RET_STS_ERROR) THEN
515: RAISE FND_API.G_EXC_ERROR;
516:
517: ELSIF (x_return_status = FND_API.g_ret_sts_unexp_error) THEN
518: RAISE FND_API.g_exc_unexpected_error;
519: END IF;
520:
521:
522: -------------------- Exception --------------------------
520:
521:
522: -------------------- Exception --------------------------
523: EXCEPTION
524: WHEN FND_API.G_EXC_ERROR THEN
525: x_return_status := FND_API.G_RET_STS_ERROR;
526: FND_MSG_PUB.Count_And_Get( p_encoded => FND_API.G_FALSE,
527: p_count => x_msg_count,
528: p_data => x_msg_data);
521:
522: -------------------- Exception --------------------------
523: EXCEPTION
524: WHEN FND_API.G_EXC_ERROR THEN
525: x_return_status := FND_API.G_RET_STS_ERROR;
526: FND_MSG_PUB.Count_And_Get( p_encoded => FND_API.G_FALSE,
527: p_count => x_msg_count,
528: p_data => x_msg_data);
529:
522: -------------------- Exception --------------------------
523: EXCEPTION
524: WHEN FND_API.G_EXC_ERROR THEN
525: x_return_status := FND_API.G_RET_STS_ERROR;
526: FND_MSG_PUB.Count_And_Get( p_encoded => FND_API.G_FALSE,
527: p_count => x_msg_count,
528: p_data => x_msg_data);
529:
530: WHEN FND_API.g_exc_unexpected_error THEN
526: FND_MSG_PUB.Count_And_Get( p_encoded => FND_API.G_FALSE,
527: p_count => x_msg_count,
528: p_data => x_msg_data);
529:
530: WHEN FND_API.g_exc_unexpected_error THEN
531: x_return_status := FND_API.g_ret_sts_unexp_error;
532: FND_MSG_PUB.count_and_get(
533: p_encoded => FND_API.g_false,
534: p_count => x_msg_count,
527: p_count => x_msg_count,
528: p_data => x_msg_data);
529:
530: WHEN FND_API.g_exc_unexpected_error THEN
531: x_return_status := FND_API.g_ret_sts_unexp_error;
532: FND_MSG_PUB.count_and_get(
533: p_encoded => FND_API.g_false,
534: p_count => x_msg_count,
535: p_data => x_msg_data
529:
530: WHEN FND_API.g_exc_unexpected_error THEN
531: x_return_status := FND_API.g_ret_sts_unexp_error;
532: FND_MSG_PUB.count_and_get(
533: p_encoded => FND_API.g_false,
534: p_count => x_msg_count,
535: p_data => x_msg_data
536: );
537:
539: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_unexp_error) THEN
540: FND_MSG_PUB.add_exc_msg(g_pkg_name, g_api_name);
541: END IF;
542:
543: x_return_status := FND_API.G_RET_STS_ERROR;
544: FND_MSG_PUB.count_and_get(
545: p_encoded => FND_API.g_false,
546: p_count => x_msg_count,
547: p_data => x_msg_data
541: END IF;
542:
543: x_return_status := FND_API.G_RET_STS_ERROR;
544: FND_MSG_PUB.count_and_get(
545: p_encoded => FND_API.g_false,
546: p_count => x_msg_count,
547: p_data => x_msg_data
548: );
549: