39: BEGIN
40: x_return_status := FND_API.G_RET_STS_SUCCESS;
41:
42: IF OZF_DEBUG_HIGH_ON THEN
43: ozf_utility_PVT.debug_message('in build order header');
44: END IF;
45: -- Mapping, default and validation rules here
46: -- Since we can not use the OM defaulting rule. We just default order type based on the cust account id
47: /*
120: BEGIN
121: x_return_status := FND_API.G_RET_STS_SUCCESS;
122:
123: IF OZF_DEBUG_HIGH_ON THEN
124: ozf_utility_PVT.debug_message('in build order line');
125: END IF;
126: -- Mapping, default and validation rules here
127: /*
128: OZF_CHARGEBACK_ATTRMAP_PUB.Create_Global_line(
298: -- Initialize API return status to sucess
299: x_return_status := FND_API.G_RET_STS_SUCCESS;
300:
301: IF OZF_DEBUG_HIGH_ON THEN
302: ozf_utility_PVT.debug_message('in get_order_price' );
303: END IF;
304:
305: -- Default control record if necessary
306: IF l_control_rec.pricing_event is null THEN
457: */
458:
459: IF xp_line_tbl(I).line_type_code = G_HDR_TYPE THEN
460: IF OZF_DEBUG_LOW_ON THEN
461: ozf_utility_PVT.debug_message('before build header' );
462: END IF;
463: oe_order_pub.g_hdr := g_header_rec;
464: build_order_header( p_hdr => xp_line_tbl(I),
465: x_return_status => l_return_status);
474: p_line_index => xp_line_tbl(I).line_index,
475: p_pricing_type_code =>'H'
476: );
477: IF OZF_DEBUG_LOW_ON THEN
478: ozf_utility_PVT.debug_message('after build header' );
479: END IF;
480: ELSE
481: -- It has to be line
482: IF OZF_DEBUG_LOW_ON THEN
479: END IF;
480: ELSE
481: -- It has to be line
482: IF OZF_DEBUG_LOW_ON THEN
483: ozf_utility_PVT.debug_message('before build line' );
484: END IF;
485: oe_order_pub.g_line := g_line_rec_tbl(I);
486: build_order_line( p_line => xp_line_tbl(I),
487: x_return_status => l_return_status);
495: p_line_index => xp_line_tbl(I).line_index,
496: p_pricing_type_code =>'L'
497: );
498: IF OZF_DEBUG_LOW_ON THEN
499: ozf_utility_PVT.debug_message('after build line' );
500: END IF;
501: END IF;
502: ELSE
503: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
508: END IF;
509: End LOOP;
510:
511: IF OZF_DEBUG_LOW_ON THEN
512: ozf_utility_PVT.debug_message('Before insert_lines2' );
513: END IF;
514:
515: QP_PREQ_GRP.INSERT_LINES2
516: (p_LINE_INDEX => G_LINE_INDEX_TBL,
555: IF FND_MSG_PUB.check_msg_level(FND_MSG_PUB.g_msg_lvl_error) THEN
556: FND_MESSAGE.set_name('OZF', 'OZF_ORDER_INSERT_ERR');
557: FND_MSG_PUB.add;
558: IF OZF_DEBUG_LOW_ON THEN
559: ozf_utility_PVT.debug_message(l_price_return_msg);
560: END IF;
561: END IF;
562: RAISE FND_API.G_EXC_ERROR;
563: END IF;
561: END IF;
562: RAISE FND_API.G_EXC_ERROR;
563: END IF;
564: IF OZF_DEBUG_LOW_ON THEN
565: ozf_utility_PVT.debug_message('After insert lines2' );
566: END IF;
567:
568:
569:
574: x_return_status_text => l_msg_data);
575:
576: IF l_return_status = FND_API.g_ret_sts_error THEN
577: IF OZF_DEBUG_LOW_ON THEN
578: ozf_utility_PVT.debug_message('in error'||l_msg_data);
579: END IF;
580: RAISE FND_API.g_exc_error;
581: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
582: IF OZF_DEBUG_LOW_ON THEN
579: END IF;
580: RAISE FND_API.g_exc_error;
581: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
582: IF OZF_DEBUG_LOW_ON THEN
583: ozf_utility_PVT.debug_message('in un'||l_msg_data);
584: END IF;
585: RAISE FND_API.g_exc_unexpected_error;
586: END IF;
587: IF OZF_DEBUG_LOW_ON THEN
584: END IF;
585: RAISE FND_API.g_exc_unexpected_error;
586: END IF;
587: IF OZF_DEBUG_LOW_ON THEN
588: ozf_utility_PVT.debug_message('After price_request' );
589: END IF;
590: -- Populate the result from the temp tables.
591: -- We will be looking for adjusted_price and price adjustments
592: -- with automatic_flag := 'Y' and accrual_flag := 'Y' */
660: p_count => x_msg_count,
661: p_data => x_msg_data
662: );
663: IF OZF_DEBUG_HIGH_ON THEN
664: ozf_utility_PVT.debug_message('end of order price');
665: END IF;
666: EXCEPTION
667: WHEN FND_API.G_EXC_ERROR THEN
668: ROLLBACK TO Get_Order_Price_pvt ;