DBA Data[Home] [Help]

APPS.OE_SALES_CAN_UTIL dependencies on OE_SALES_CAN_UTIL

Line 1: PACKAGE BODY OE_SALES_CAN_UTIL AS

1: PACKAGE BODY OE_SALES_CAN_UTIL AS
2: /* $Header: OEXUCANB.pls 120.11.12010000.2 2008/11/19 10:32:32 vbkapoor ship $ */
3:
4: -- Start of Comments
5: -- API name OE_SALES_CAN_UTIL

Line 5: -- API name OE_SALES_CAN_UTIL

1: PACKAGE BODY OE_SALES_CAN_UTIL AS
2: /* $Header: OEXUCANB.pls 120.11.12010000.2 2008/11/19 10:32:32 vbkapoor ship $ */
3:
4: -- Start of Comments
5: -- API name OE_SALES_CAN_UTIL
6: -- Type Private
7: -- Function
8: --
9: -- Pre-reqs

Line 56: oe_debug_pub.add( 'ENTERING OE_SALES_CAN_UTIL.UPDATE_LINE' ) ;

52:
53: x_return_status := FND_API.G_RET_STS_SUCCESS;
54:
55: IF l_debug_level > 0 THEN
56: oe_debug_pub.add( 'ENTERING OE_SALES_CAN_UTIL.UPDATE_LINE' ) ;
57: END IF;
58:
59: -- Set control flags.
60:

Line 162: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.UPDATE_LINE' ) ;

158:
159: g_ser_cascade := FALSE;
160:
161: IF l_debug_level > 0 THEN
162: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.UPDATE_LINE' ) ;
163: END IF;
164:
165: EXCEPTION
166: WHEN FND_API.G_EXC_ERROR THEN

Line 261: oe_debug_pub.add('Entering oe_sales_can_util.perform_line_change' ) ;

257: IF (p_line_rec.operation <> oe_globals.g_opr_create AND
258: p_line_rec.split_action_code <> 'SPLIT') THEN
259:
260: IF l_debug_level > 0 THEN
261: oe_debug_pub.add('Entering oe_sales_can_util.perform_line_change' ) ;
262: END IF;
263:
264: x_return_status := FND_API.G_RET_STS_SUCCESS;
265:

Line 268: IF (oe_sales_can_util.G_REQUIRE_REASON) THEN

264: x_return_status := FND_API.G_RET_STS_SUCCESS;
265:
266: IF (nvl(p_line_rec.ordered_quantity, 0) < nvl(p_old_line_rec.ordered_quantity, 0)) THEN
267: l_cancelled_qty := nvl(p_old_line_rec.ordered_quantity, 0) - nvl(p_line_rec.ordered_quantity, 0);
268: IF (oe_sales_can_util.G_REQUIRE_REASON) THEN
269: lhisttypecode := OE_GLOBALS.G_CAN_HIST_TYPE_CODE;
270: ELSE
271: lhisttypecode := 'QUANTITY UPDATE';
272: END IF;

Line 280: IF (oe_sales_can_util.G_REQUIRE_REASON) THEN

276:
277: -- INVCONV
278: IF (nvl(p_line_rec.ordered_quantity2, 0) < nvl(p_old_line_rec.ordered_quantity2, 0)) THEN
279: l_cancelled_qty2 := nvl(p_old_line_rec.ordered_quantity2, 0) - nvl(p_line_rec.ordered_quantity2, 0);
280: IF (oe_sales_can_util.G_REQUIRE_REASON) THEN
281: lhisttypecode := OE_GLOBALS.G_CAN_HIST_TYPE_CODE;
282: ELSE
283: lhisttypecode := 'QUANTITY UPDATE';
284: END IF;

Line 302: l_require_reason := oe_sales_can_util.g_require_reason;

298: ** Fix Bug # 2157850
299: ** Store the g_require_reason global before calling update
300: ** service and restore after that.
301: */
302: l_require_reason := oe_sales_can_util.g_require_reason;
303:
304: IF l_debug_level > 0 THEN
305: oe_debug_pub.add('Before calling update_service()',1) ;
306: END IF;

Line 322: oe_sales_can_util.g_require_reason := l_require_reason ;

318: raise FND_API.G_EXC_UNEXPECTED_ERROR;
319: end if;
320: end if;
321:
322: oe_sales_can_util.g_require_reason := l_require_reason ;
323:
324: -- end if; -- Not Order Level Cancellation.
325: -- This code is moved to pre write to cover all quantity changes
326: -- call PO if its Internal requistion

Line 426: IF oe_sales_can_util.G_REQUIRE_REASON THEN

422: oe_debug_pub.add('Line change reason : '||p_line_rec.change_reason,1);
423: END IF;
424:
425: -- #2743789 changes
426: IF oe_sales_can_util.G_REQUIRE_REASON THEN
427:
428: IF l_debug_level > 0 THEN
429: oe_debug_pub.add('Change reason required',1);
430: END IF;

Line 546: IF (oe_sales_can_util.G_REQUIRE_REASON) THEN

542: END IF;
543: end if;
544:
545: -- Call to Remove from fullfillment sets
546: IF (oe_sales_can_util.G_REQUIRE_REASON) THEN
547: If p_line_rec.ordered_quantity = 0 then
548:
549: -- Remove from fulfillment sets
550:

Line 635: --oe_sales_can_util.g_require_reason := FALSE;

631:
632: end if;
633: END IF;
634:
635: --oe_sales_can_util.g_require_reason := FALSE;
636:
637: -- If the ordered quantity is Zero then a delayed request is logged
638:
639: IF p_line_rec.ordered_quantity = 0 THEN

Line 652: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.PERFORM_LINE_CHANGE' ) ;

648:
649: End if;
650:
651: IF l_debug_level > 0 THEN
652: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.PERFORM_LINE_CHANGE' ) ;
653: END IF;
654:
655: EXCEPTION
656: WHEN FND_API.G_EXC_ERROR THEN

Line 699: -- OE_SALES_CAN_UTIL.G_REQUIRE_REASON := FALSE;

695: BEGIN
696: -- x_line_Rec := p_line_Rec;
697: IF (p_x_line_rec.operation <> oe_globals.g_opr_create AND
698: nvl(p_x_line_rec.split_action_code,'X') <> 'SPLIT') THEN
699: -- OE_SALES_CAN_UTIL.G_REQUIRE_REASON := FALSE;
700:
701: IF l_debug_level > 0 THEN
702: oe_debug_pub.add( 'ENTERING OE_SALES_CAN_UTIL.CHECK_CONSTRAINTS' ) ;
703: END IF;

Line 702: oe_debug_pub.add( 'ENTERING OE_SALES_CAN_UTIL.CHECK_CONSTRAINTS' ) ;

698: nvl(p_x_line_rec.split_action_code,'X') <> 'SPLIT') THEN
699: -- OE_SALES_CAN_UTIL.G_REQUIRE_REASON := FALSE;
700:
701: IF l_debug_level > 0 THEN
702: oe_debug_pub.add( 'ENTERING OE_SALES_CAN_UTIL.CHECK_CONSTRAINTS' ) ;
703: END IF;
704: -- initialize API return status to success
705: l_return_status := FND_API.G_RET_STS_SUCCESS;
706:

Line 723: OE_SALES_CAN_UTIL.G_REQUIRE_REASON := TRUE;

719: -- This is to fix the order level status problem. If the call is made
720: -- from order level it will treated as cancellation always
721: -- using OE_OE_FORM_CANCEL_LINE.g_ord_lvl_can for bug# 2922468
722: IF OE_OE_FORM_CANCEL_LINE.g_ord_lvl_can THEN
723: OE_SALES_CAN_UTIL.G_REQUIRE_REASON := TRUE;
724: END IF;
725:
726: IF NOT OE_SALES_CAN_UTIL.G_REQUIRE_REASON THEN
727:

Line 726: IF NOT OE_SALES_CAN_UTIL.G_REQUIRE_REASON THEN

722: IF OE_OE_FORM_CANCEL_LINE.g_ord_lvl_can THEN
723: OE_SALES_CAN_UTIL.G_REQUIRE_REASON := TRUE;
724: END IF;
725:
726: IF NOT OE_SALES_CAN_UTIL.G_REQUIRE_REASON THEN
727:
728: IF (nvl(p_x_line_rec.booked_flag,'N') = 'Y' AND
729: nvl(p_x_line_rec.ordered_quantity,0) = 0 ) THEN
730:

Line 754: IF OE_SALES_CAN_UTIL.G_REQUIRE_REASON AND OE_OE_FORM_CANCEL_LINE.g_ord_lvl_can THEN

750: end if;
751:
752: -- Set Ordered level cancellation to true or false
753: -- using OE_OE_FORM_CANCEL_LINE.g_ord_lvl_can for bug# 2922468
754: IF OE_SALES_CAN_UTIL.G_REQUIRE_REASON AND OE_OE_FORM_CANCEL_LINE.g_ord_lvl_can THEN
755:
756: oe_sales_can_util.g_order_cancel := TRUE;
757: ELSE
758: IF oe_sales_can_util.g_order_cancel THEN

Line 756: oe_sales_can_util.g_order_cancel := TRUE;

752: -- Set Ordered level cancellation to true or false
753: -- using OE_OE_FORM_CANCEL_LINE.g_ord_lvl_can for bug# 2922468
754: IF OE_SALES_CAN_UTIL.G_REQUIRE_REASON AND OE_OE_FORM_CANCEL_LINE.g_ord_lvl_can THEN
755:
756: oe_sales_can_util.g_order_cancel := TRUE;
757: ELSE
758: IF oe_sales_can_util.g_order_cancel THEN
759: oe_sales_can_util.g_order_cancel := FALSE;
760: END IF;

Line 758: IF oe_sales_can_util.g_order_cancel THEN

754: IF OE_SALES_CAN_UTIL.G_REQUIRE_REASON AND OE_OE_FORM_CANCEL_LINE.g_ord_lvl_can THEN
755:
756: oe_sales_can_util.g_order_cancel := TRUE;
757: ELSE
758: IF oe_sales_can_util.g_order_cancel THEN
759: oe_sales_can_util.g_order_cancel := FALSE;
760: END IF;
761: END IF;
762:

Line 759: oe_sales_can_util.g_order_cancel := FALSE;

755:
756: oe_sales_can_util.g_order_cancel := TRUE;
757: ELSE
758: IF oe_sales_can_util.g_order_cancel THEN
759: oe_sales_can_util.g_order_cancel := FALSE;
760: END IF;
761: END IF;
762:
763: -- Compute Cancelled Quantity

Line 779: p_x_line_rec.cancelled_quantity2 :=oe_sales_can_util.Cal_cancelled_qty2(

775: IF l_debug_level > 0 THEN
776: oe_debug_pub.add( 'BEFORE CALLING CAL_CANCELLED_QTY2' ) ;
777: END IF;
778:
779: p_x_line_rec.cancelled_quantity2 :=oe_sales_can_util.Cal_cancelled_qty2(
780: p_x_line_rec,
781: p_old_line_rec);
782:
783: IF l_debug_level > 0 THEN

Line 791: IF OE_SALES_CAN_UTIL.G_REQUIRE_REASON THEN

787: END IF; -- IF l_item_rec.tracking_quantity_ind = 'PS'
788:
789: END IF; -- IF oe_line_util.dual_uom_control
790:
791: IF OE_SALES_CAN_UTIL.G_REQUIRE_REASON THEN
792:
793:
794: IF l_debug_level > 0 THEN
795: oe_debug_pub.add( 'IN CHANGE REASON REQUIRED' ) ;

Line 808: p_x_line_rec.cancelled_quantity :=oe_sales_can_util.Cal_cancelled_qty(

804: IF l_debug_level > 0 THEN
805: oe_debug_pub.add( 'BEFORE CALLING CAL_CANCELLED_QTY' ) ;
806: END IF;
807:
808: p_x_line_rec.cancelled_quantity :=oe_sales_can_util.Cal_cancelled_qty(
809: p_x_line_rec,
810: p_old_line_rec);
811:
812: IF l_debug_level > 0 THEN

Line 856: p_x_line_rec.cancelled_quantity :=oe_sales_can_util.Cal_cancelled_qty(

852: IF l_debug_level > 0 THEN
853: oe_debug_pub.add( 'CHECKING ORIGINAL CANCELLED_QUANTITY' ) ;
854: END IF;
855:
856: p_x_line_rec.cancelled_quantity :=oe_sales_can_util.Cal_cancelled_qty(
857: p_x_line_rec,
858: p_old_line_rec);
859: -- INVCONV
860:

Line 874: p_x_line_rec.cancelled_quantity2 :=oe_sales_can_util.Cal_cancelled_qty2(

870: IF l_debug_level > 0 THEN
871: oe_debug_pub.add( 'BEFORE CALLING CAL_CANCELLED_QTY2' ) ;
872: END IF;
873:
874: p_x_line_rec.cancelled_quantity2 :=oe_sales_can_util.Cal_cancelled_qty2(
875: p_x_line_rec,
876: p_old_line_rec);
877:
878: IF l_debug_level > 0 THEN

Line 893: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.CHECK_CONSTRAINTS' ) ;

889:
890: END IF;
891:
892: IF l_debug_level > 0 THEN
893: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.CHECK_CONSTRAINTS' ) ;
894: END IF;
895:
896: END IF;
897:

Line 953: oe_debug_pub.add( 'ENTERING OE_SALES_CAN_UTIL.UPDATE_SERVICE' ) ;

949: --
950: BEGIN
951:
952: IF l_debug_level > 0 THEN
953: oe_debug_pub.add( 'ENTERING OE_SALES_CAN_UTIL.UPDATE_SERVICE' ) ;
954: END IF;
955:
956: for Serrec in get_service loop
957: l_line_id := serrec.line_id;

Line 995: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.UPDATE_SERVICE' ) ;

991: end if;
992: end if;
993:
994: IF l_debug_level > 0 THEN
995: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.UPDATE_SERVICE' ) ;
996: END IF;
997:
998: EXCEPTION
999: WHEN FND_API.G_EXC_ERROR THEN

Line 1231: OE_DEBUG_PUB.ADD('Entering oe_sales_can_util.perform_cancel_order',5);

1227: --
1228: Begin
1229:
1230: IF l_debug_level > 0 THEN
1231: OE_DEBUG_PUB.ADD('Entering oe_sales_can_util.perform_cancel_order',5);
1232: OE_DEBUG_PUB.ADD('perform cancel order header id : '||p_header_rec.header_id,5);
1233: OE_DEBUG_PUB.add('Reason Required Flag : '||OE_GLOBALS.G_AUDIT_REASON_RQD_FLAG,1);
1234: OE_DEBUG_PUB.add('Reason provided is : '||p_header_rec.change_reason,1);
1235: END IF;

Line 1239: IF (oe_sales_can_util.G_REQUIRE_REASON AND OE_GLOBALS.G_AUDIT_REASON_RQD_FLAG <> 'N') THEN

1235: END IF;
1236:
1237: --g_ord_lvl_can := TRUE; Commented for bug# 2922468
1238:
1239: IF (oe_sales_can_util.G_REQUIRE_REASON AND OE_GLOBALS.G_AUDIT_REASON_RQD_FLAG <> 'N') THEN
1240: IF l_debug_level > 0 THEN
1241: oe_debug_pub.add( 'CHANGE REASON IS REQUIRED' ) ;
1242: END IF;
1243: IF p_header_rec.change_reason IS NULL THEN

Line 1350: oe_sales_can_util.g_order_cancel := TRUE;

1346: null;
1347: End Loop;
1348:
1349: IF l_line_tbl.count = 0 THEN
1350: oe_sales_can_util.g_order_cancel := TRUE;
1351: END IF;
1352:
1353: -- Call PeformLinecancellation to cancel each line
1354: IF l_line_tbl.count > 0 THEN

Line 1482: /*IF oe_sales_can_util.g_order_cancel THEN

1478: --OE_STANDARD_WF.Get_HdrProcessName(OE_GLOBALS.G_WFI_HDR, p_header_rec.header_id,
1479: --l_line_process_name);
1480:
1481: -- Moved this post line process
1482: /*IF oe_sales_can_util.g_order_cancel THEN
1483: wf_engine.handleerror(OE_Globals.G_WFI_HDR
1484: ,to_char(p_header_rec.header_id)
1485: ,'CLOSE_HEADER',
1486: 'SKIP','CANCEL');

Line 1492: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.PERFORM_CANCEL_ORDER' ) ;

1488:
1489: --g_ord_lvl_can := FALSE; Commented for bug# 2922468
1490:
1491: IF l_debug_level > 0 THEN
1492: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.PERFORM_CANCEL_ORDER' ) ;
1493: END IF;
1494:
1495: EXCEPTION
1496: WHEN FND_API.G_EXC_ERROR THEN

Line 1532: oe_debug_pub.add( 'ENTERING OE_SALES_CAN_UTIL.PERFORMLINECANCELLATION' ) ;

1528: --
1529: BEGIN
1530:
1531: IF l_debug_level > 0 THEN
1532: oe_debug_pub.add( 'ENTERING OE_SALES_CAN_UTIL.PERFORMLINECANCELLATION' ) ;
1533: END IF;
1534:
1535: l_control_rec.controlled_operation := TRUE;
1536: l_control_rec.change_attributes := TRUE;

Line 1594: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.PERFORMLINECANCELLATION' ) ;

1590: end loop;
1591: END IF; -- 2653505
1592:
1593: IF l_debug_level > 0 THEN
1594: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.PERFORMLINECANCELLATION' ) ;
1595: END IF;
1596:
1597: EXCEPTION
1598: WHEN FND_API.G_EXC_ERROR THEN

Line 1696: oe_debug_pub.add('Entering Oe_sales_can_util.Call_Process_Fulfillment API',2);

1692: and ol.open_flag = 'Y';
1693:
1694: BEGIN
1695: IF l_debug_level > 0 THEN
1696: oe_debug_pub.add('Entering Oe_sales_can_util.Call_Process_Fulfillment API',2);
1697: END IF;
1698:
1699: SAVEPOINT Process_Set;
1700:

Line 1812: oe_debug_pub.add('Exiting from Oe_sales_can_util.Call_Process_Fulfillment API',2);

1808: l_lines_in_set := NULL;
1809: END LOOP; -- Non closed fulfillment sets
1810:
1811: IF l_debug_level > 0 THEN
1812: oe_debug_pub.add('Exiting from Oe_sales_can_util.Call_Process_Fulfillment API',2);
1813: END IF;
1814: EXCEPTION
1815: WHEN Others THEN
1816: IF l_debug_level > 0 THEN

Line 1817: oe_debug_pub.add('OTHERS EXCEPTION in Oe_sales_can_util.Call_Process_Fulfillment API',2);

1813: END IF;
1814: EXCEPTION
1815: WHEN Others THEN
1816: IF l_debug_level > 0 THEN
1817: oe_debug_pub.add('OTHERS EXCEPTION in Oe_sales_can_util.Call_Process_Fulfillment API',2);
1818: END IF;
1819: END Call_Process_Fulfillment;
1820:
1821: PROCEDURE Cancel_Remaining_Order

Line 1854: oe_debug_pub.add( 'ENTERING OE_SALES_CAN_UTIL.CANCEL_REMAINING_ORDER' ) ;

1850: --
1851: Begin
1852:
1853: IF l_debug_level > 0 THEN
1854: oe_debug_pub.add( 'ENTERING OE_SALES_CAN_UTIL.CANCEL_REMAINING_ORDER' ) ;
1855: END IF;
1856:
1857: x_return_status := FND_API.G_RET_STS_SUCCESS;
1858:

Line 2050: OE_SALES_CAN_UTIL.Call_Process_Fulfillment(p_header_id => p_header_id);

2046: END IF;
2047: --end bug 4567339
2048:
2049: -- bug 4887806
2050: OE_SALES_CAN_UTIL.Call_Process_Fulfillment(p_header_id => p_header_id);
2051:
2052: IF l_debug_level > 0 THEN
2053: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.CANCEL_REMAINING_ORDER' ) ;
2054: END IF;

Line 2053: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.CANCEL_REMAINING_ORDER' ) ;

2049: -- bug 4887806
2050: OE_SALES_CAN_UTIL.Call_Process_Fulfillment(p_header_id => p_header_id);
2051:
2052: IF l_debug_level > 0 THEN
2053: oe_debug_pub.add( 'EXITING OE_SALES_CAN_UTIL.CANCEL_REMAINING_ORDER' ) ;
2054: END IF;
2055:
2056: EXCEPTION
2057: WHEN FND_API.G_EXC_ERROR THEN

Line 2317: END OE_SALES_CAN_UTIL;

2313:
2314: end Cal_Cancelled_qty2;
2315:
2316:
2317: END OE_SALES_CAN_UTIL;