[Home] [Help]
59: we will perform scheduling on lines on hold. If it is
60: set to 'N', we will not perform scheduling.
61: --------------------------------------------------------------------- */
62: Procedure Validate_Group_Line
63: (p_line_rec IN OE_ORDER_PUB.Line_Rec_Type,
64: x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
65: IS
66: l_msg_count NUMBER;
67: l_msg_data VARCHAR2(2000);
252: Description : Validate Group calls Validate Line and if the call is success
253: then and pass the record back to the caller. If it is a expected error, then ignore the record and if it is a unexpected error raise the error and stop the process.
254: --------------------------------------------------------------------- */
255: Procedure Validate_Group
256: (p_x_line_tbl IN OUT NOCOPY OE_ORDER_PUB.Line_Tbl_Type,
257: p_sch_action IN VARCHAR2,
258: p_validate_action IN VARCHAR2 DEFAULT 'PARTIAL', --for bug 3590437
259: x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
260: IS
259: x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
260: IS
261: l_return_status VARCHAR2(30);
262: J NUMBER := 0;
263: l_line_tbl OE_ORDER_PUB.Line_Tbl_Type;
264: --
265: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
266: --
267: BEGIN
423: with the existing l_line_tbl plsql Table
424: Bug Number:2319608
425:
426: Procedure Check_Merge_Line(
427: p_x_line_tbl IN OUT NOCOPY OE_ORDER_PUB.Line_Tbl_Type,
428: p_line_tbl IN OE_ORDER_PUB.Line_Tbl_Type
429: := OE_Order_PUB.G_MISS_LINE_TBL,
430: p_line_rec IN OE_ORDER_PUB.Line_rec_Type
431: := OE_Order_PUB.G_MISS_LINE_REC)
424: Bug Number:2319608
425:
426: Procedure Check_Merge_Line(
427: p_x_line_tbl IN OUT NOCOPY OE_ORDER_PUB.Line_Tbl_Type,
428: p_line_tbl IN OE_ORDER_PUB.Line_Tbl_Type
429: := OE_Order_PUB.G_MISS_LINE_TBL,
430: p_line_rec IN OE_ORDER_PUB.Line_rec_Type
431: := OE_Order_PUB.G_MISS_LINE_REC)
432: IS
425:
426: Procedure Check_Merge_Line(
427: p_x_line_tbl IN OUT NOCOPY OE_ORDER_PUB.Line_Tbl_Type,
428: p_line_tbl IN OE_ORDER_PUB.Line_Tbl_Type
429: := OE_Order_PUB.G_MISS_LINE_TBL,
430: p_line_rec IN OE_ORDER_PUB.Line_rec_Type
431: := OE_Order_PUB.G_MISS_LINE_REC)
432: IS
433: J NUMBER;
426: Procedure Check_Merge_Line(
427: p_x_line_tbl IN OUT NOCOPY OE_ORDER_PUB.Line_Tbl_Type,
428: p_line_tbl IN OE_ORDER_PUB.Line_Tbl_Type
429: := OE_Order_PUB.G_MISS_LINE_TBL,
430: p_line_rec IN OE_ORDER_PUB.Line_rec_Type
431: := OE_Order_PUB.G_MISS_LINE_REC)
432: IS
433: J NUMBER;
434: l_option_exists VARCHAR2(1) := 'N';
427: p_x_line_tbl IN OUT NOCOPY OE_ORDER_PUB.Line_Tbl_Type,
428: p_line_tbl IN OE_ORDER_PUB.Line_Tbl_Type
429: := OE_Order_PUB.G_MISS_LINE_TBL,
430: p_line_rec IN OE_ORDER_PUB.Line_rec_Type
431: := OE_Order_PUB.G_MISS_LINE_REC)
432: IS
433: J NUMBER;
434: l_option_exists VARCHAR2(1) := 'N';
435:
492: exist in the line table else FALSE
493: Added for Bug-2454163
494: ------------------------------------------------------------------*/
495:
496: FUNCTION Find_line( p_x_line_tbl IN OE_ORDER_PUB.Line_Tbl_Type,
497: p_line_id IN NUMBER)
498: Return BOOLEAN
499: IS
500: --
538: ---------------------------------------------------------------------*/
539: PROCEDURE Query_Lines
540: ( p_header_id IN NUMBER,
541: p_sch_action IN VARCHAR2,
542: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
543: )
544: IS
545: I NUMBER;
546: l_inc_tbl OE_Order_PUB.Line_Tbl_Type;
542: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
543: )
544: IS
545: I NUMBER;
546: l_inc_tbl OE_Order_PUB.Line_Tbl_Type;
547: l_sales_order_id NUMBER := Null;
548: l_line_rec OE_Order_PUB.Line_Rec_type;
549: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
550: l_set_rec OE_ORDER_CACHE.set_rec_type;
544: IS
545: I NUMBER;
546: l_inc_tbl OE_Order_PUB.Line_Tbl_Type;
547: l_sales_order_id NUMBER := Null;
548: l_line_rec OE_Order_PUB.Line_Rec_type;
549: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
550: l_set_rec OE_ORDER_CACHE.set_rec_type;
551: l_quantity_to_reserve NUMBER;
552: l_quantity2_to_reserve NUMBER; -- INVCONV
1426: ----------------------------------------------------------------- */
1427: PROCEDURE Query_Schedule_Lines
1428: ( p_selected_tbl IN OE_GLOBALS.Selected_record_Tbl, --R12.MOAC
1429: p_sch_action IN VARCHAR2,
1430: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
1431: )
1432: IS
1433: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
1434: l_line_rec OE_Order_PUB.Line_rec_Type;
1429: p_sch_action IN VARCHAR2,
1430: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
1431: )
1432: IS
1433: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
1434: l_line_rec OE_Order_PUB.Line_rec_Type;
1435: l_line_id NUMBER;
1436: l_arrival_set_id NUMBER;
1437: l_ship_set_id NUMBER;
1430: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
1431: )
1432: IS
1433: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
1434: l_line_rec OE_Order_PUB.Line_rec_Type;
1435: l_line_id NUMBER;
1436: l_arrival_set_id NUMBER;
1437: l_ship_set_id NUMBER;
1438: l_top_model_line_id NUMBER;
1460: l_source_document_id NUMBER;
1461: l_source_document_line_id NUMBER;
1462: l_order_source_id NUMBER;
1463: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
1464: l_set_line_rec OE_Order_PUB.Line_rec_Type; --4241385
1465: -- sol_ord_er #16014165
1466: l_subscription_enable_flag varchar2(10) := '';
1467: BEGIN
1468:
1839: ----------------------------------------------------------------- */
1840: PROCEDURE Query_Unschedule_Lines
1841: ( p_selected_tbl IN OE_GLOBALS.Selected_record_Tbl, --R12.MOAC
1842: p_sch_action IN VARCHAR2,
1843: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
1844: )
1845: IS
1846: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
1847: l_line_rec OE_Order_PUB.Line_rec_Type;
1842: p_sch_action IN VARCHAR2,
1843: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
1844: )
1845: IS
1846: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
1847: l_line_rec OE_Order_PUB.Line_rec_Type;
1848: l_line_id NUMBER;
1849: l_arrival_set_id NUMBER;
1850: l_ship_set_id NUMBER;
1843: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
1844: )
1845: IS
1846: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
1847: l_line_rec OE_Order_PUB.Line_rec_Type;
1848: l_line_id NUMBER;
1849: l_arrival_set_id NUMBER;
1850: l_ship_set_id NUMBER;
1851: l_top_model_line_id NUMBER;
2246: ----------------------------------------------------------------- */
2247: PROCEDURE Query_Unreserve_Lines
2248: ( p_selected_tbl IN OE_GLOBALS.Selected_record_Tbl, --R12.MOAC
2249: p_sch_action IN VARCHAR2,
2250: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
2251: )
2252: IS
2253: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
2254: l_line_rec OE_Order_PUB.Line_rec_Type;
2249: p_sch_action IN VARCHAR2,
2250: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
2251: )
2252: IS
2253: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
2254: l_line_rec OE_Order_PUB.Line_rec_Type;
2255: l_line_id NUMBER;
2256: l_arrival_set_id NUMBER;
2257: l_ship_set_id NUMBER;
2250: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
2251: )
2252: IS
2253: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
2254: l_line_rec OE_Order_PUB.Line_rec_Type;
2255: l_line_id NUMBER;
2256: l_arrival_set_id NUMBER;
2257: l_ship_set_id NUMBER;
2258: l_top_model_line_id NUMBER;
2575: ------------------------------------------------------------------*/
2576: PROCEDURE Query_Reserve_Lines
2577: ( p_selected_tbl IN OE_GLOBALS.Selected_record_Tbl, --R12.MOAC
2578: p_sch_action IN VARCHAR2,
2579: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
2580: )
2581: IS
2582: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
2583: l_line_rec OE_Order_PUB.Line_rec_Type;
2578: p_sch_action IN VARCHAR2,
2579: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
2580: )
2581: IS
2582: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
2583: l_line_rec OE_Order_PUB.Line_rec_Type;
2584: l_line_id NUMBER;
2585: l_arrival_set_id NUMBER;
2586: l_ship_set_id NUMBER;
2579: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
2580: )
2581: IS
2582: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
2583: l_line_rec OE_Order_PUB.Line_rec_Type;
2584: l_line_id NUMBER;
2585: l_arrival_set_id NUMBER;
2586: l_ship_set_id NUMBER;
2587: l_top_model_line_id NUMBER;
2613: l_order_source_id NUMBER;
2614: l_quantity_to_reserve NUMBER;
2615: l_quantity2_to_reserve NUMBER; -- INVCONV
2616: l_rsv_update BOOLEAN :=FALSE;
2617: l_set_line_rec OE_Order_PUB.Line_rec_Type; --4241385
2618: l_subscription_enable_flag varchar2(10) := ''; --sol_ord_er #16014165
2619: BEGIN
2620:
2621: IF l_debug_level > 0 THEN
3190: ------------------------------------------------------------------*/
3191: PROCEDURE Query_ATP_CHECK_Lines
3192: ( p_selected_tbl IN OE_GLOBALS.Selected_record_Tbl, --R12.MOAC
3193: p_sch_action IN VARCHAR2,
3194: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
3195: )
3196: IS
3197: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
3198: l_line_rec OE_Order_PUB.Line_rec_Type;
3193: p_sch_action IN VARCHAR2,
3194: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
3195: )
3196: IS
3197: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
3198: l_line_rec OE_Order_PUB.Line_rec_Type;
3199: l_line_id NUMBER;
3200: l_arrival_set_id NUMBER;
3201: l_ship_set_id NUMBER;
3194: x_line_tbl IN OUT NOCOPY OE_Order_PUB.Line_Tbl_Type
3195: )
3196: IS
3197: l_line_tbl OE_Order_PUB.Line_Tbl_Type;
3198: l_line_rec OE_Order_PUB.Line_rec_Type;
3199: l_line_id NUMBER;
3200: l_arrival_set_id NUMBER;
3201: l_ship_set_id NUMBER;
3202: l_top_model_line_id NUMBER;
3559: x_msg_count OUT NOCOPY /* file.sql.39 change */ NUMBER,
3560: x_msg_data OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
3561: IS
3562:
3563: l_line_tbl OE_ORDER_PUB.Line_tbl_type;
3564: l_old_line_tbl OE_ORDER_PUB.Line_tbl_type;
3565: l_return_status VARCHAR2(1);
3566: l_msg_count NUMBER;
3567: l_msg_data VARCHAR2(2000);
3560: x_msg_data OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
3561: IS
3562:
3563: l_line_tbl OE_ORDER_PUB.Line_tbl_type;
3564: l_old_line_tbl OE_ORDER_PUB.Line_tbl_type;
3565: l_return_status VARCHAR2(1);
3566: l_msg_count NUMBER;
3567: l_msg_data VARCHAR2(2000);
3568:
3737: --l_record_ids VARCHAR2(32000) := p_line_list || ',';
3738:
3739: l_line_id NUMBER;
3740:
3741: l_line_tbl OE_ORDER_PUB.line_tbl_type;
3742: l_old_line_tbl OE_ORDER_PUB.line_tbl_type;
3743: l_line_id_tbl number_arr;
3744: l_set_rec OE_ORDER_CACHE.set_rec_type;
3745:
3738:
3739: l_line_id NUMBER;
3740:
3741: l_line_tbl OE_ORDER_PUB.line_tbl_type;
3742: l_old_line_tbl OE_ORDER_PUB.line_tbl_type;
3743: l_line_id_tbl number_arr;
3744: l_set_rec OE_ORDER_CACHE.set_rec_type;
3745:
3746: --
4056: Changes have been made to copy override_atp flag from model/class/
4057: kit to it's included items when the flag is set.
4058: -------------------------------------------------------------------*/
4059: Procedure Schedule_set_lines
4060: ( p_sch_set_tbl IN OE_ORDER_PUB.request_tbl_type
4061: , x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
4062: IS
4063: l_line_rec OE_ORDER_PUB.line_rec_type;
4064: l_line_tbl OE_ORDER_PUB.line_Tbl_type;
4059: Procedure Schedule_set_lines
4060: ( p_sch_set_tbl IN OE_ORDER_PUB.request_tbl_type
4061: , x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
4062: IS
4063: l_line_rec OE_ORDER_PUB.line_rec_type;
4064: l_line_tbl OE_ORDER_PUB.line_Tbl_type;
4065: l_old_line_tbl OE_ORDER_PUB.line_Tbl_type;
4066: l_request_rec OE_ORDER_PUB.request_rec_type;
4067: l_old_set_tbl set_tbl_type;
4060: ( p_sch_set_tbl IN OE_ORDER_PUB.request_tbl_type
4061: , x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
4062: IS
4063: l_line_rec OE_ORDER_PUB.line_rec_type;
4064: l_line_tbl OE_ORDER_PUB.line_Tbl_type;
4065: l_old_line_tbl OE_ORDER_PUB.line_Tbl_type;
4066: l_request_rec OE_ORDER_PUB.request_rec_type;
4067: l_old_set_tbl set_tbl_type;
4068: l_sales_order_id NUMBER;
4061: , x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
4062: IS
4063: l_line_rec OE_ORDER_PUB.line_rec_type;
4064: l_line_tbl OE_ORDER_PUB.line_Tbl_type;
4065: l_old_line_tbl OE_ORDER_PUB.line_Tbl_type;
4066: l_request_rec OE_ORDER_PUB.request_rec_type;
4067: l_old_set_tbl set_tbl_type;
4068: l_sales_order_id NUMBER;
4069: l_line_exists VARCHAR2(1) := 'N';
4062: IS
4063: l_line_rec OE_ORDER_PUB.line_rec_type;
4064: l_line_tbl OE_ORDER_PUB.line_Tbl_type;
4065: l_old_line_tbl OE_ORDER_PUB.line_Tbl_type;
4066: l_request_rec OE_ORDER_PUB.request_rec_type;
4067: l_old_set_tbl set_tbl_type;
4068: l_sales_order_id NUMBER;
4069: l_line_exists VARCHAR2(1) := 'N';
4070: l_iline_tbl OE_ORDER_PUB.line_Tbl_type;
4066: l_request_rec OE_ORDER_PUB.request_rec_type;
4067: l_old_set_tbl set_tbl_type;
4068: l_sales_order_id NUMBER;
4069: l_line_exists VARCHAR2(1) := 'N';
4070: l_iline_tbl OE_ORDER_PUB.line_Tbl_type;
4071: l_item_type_code VARCHAR2(30);
4072: l_link_to_line_id NUMBER;
4073: l_top_model_line_id NUMBER;
4074: l_ato_line_id NUMBER;
4249:
4250: IF l_debug_level > 0 THEN
4251: oe_debug_pub.add( 'LINE IS SELECTED FOR PROCESSING ' || P_SCH_SET_TBL ( I ) .ENTITY_ID , 1 ) ;
4252: END IF;
4253: l_line_rec := OE_ORDER_PUB.G_MISS_LINE_REC;
4254: OE_LINE_UTIL.Lock_Row(p_line_id => p_sch_set_tbl(I).entity_id,
4255: p_x_line_rec => l_line_rec,
4256: x_return_status => x_return_status);
4257:
4932: Changes have been made to copy override_atp flag from model/class/
4933: kit to it's included items when the flag is set. Code has been added to
4934: cascade the override_atp flag to all the line in an ato model.
4935: ---------------------------------------------------------------*/
4936: Procedure Schedule_Set(p_request_rec IN OE_ORDER_PUB.request_rec_type,
4937: x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
4938: IS
4939: l_line_tbl OE_ORDER_PUB.line_tbl_type;
4940: l_old_line_tbl OE_ORDER_PUB.line_tbl_type;
4935: ---------------------------------------------------------------*/
4936: Procedure Schedule_Set(p_request_rec IN OE_ORDER_PUB.request_rec_type,
4937: x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
4938: IS
4939: l_line_tbl OE_ORDER_PUB.line_tbl_type;
4940: l_old_line_tbl OE_ORDER_PUB.line_tbl_type;
4941: l_line_rec OE_ORDER_PUB.line_rec_type;
4942: l_old_line_rec OE_ORDER_PUB.line_rec_type;
4943: l_msg_count NUMBER;
4936: Procedure Schedule_Set(p_request_rec IN OE_ORDER_PUB.request_rec_type,
4937: x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
4938: IS
4939: l_line_tbl OE_ORDER_PUB.line_tbl_type;
4940: l_old_line_tbl OE_ORDER_PUB.line_tbl_type;
4941: l_line_rec OE_ORDER_PUB.line_rec_type;
4942: l_old_line_rec OE_ORDER_PUB.line_rec_type;
4943: l_msg_count NUMBER;
4944: l_msg_data VARCHAR2(2000);
4937: x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
4938: IS
4939: l_line_tbl OE_ORDER_PUB.line_tbl_type;
4940: l_old_line_tbl OE_ORDER_PUB.line_tbl_type;
4941: l_line_rec OE_ORDER_PUB.line_rec_type;
4942: l_old_line_rec OE_ORDER_PUB.line_rec_type;
4943: l_msg_count NUMBER;
4944: l_msg_data VARCHAR2(2000);
4945: l_set_rec OE_ORDER_CACHE.set_rec_type;
4938: IS
4939: l_line_tbl OE_ORDER_PUB.line_tbl_type;
4940: l_old_line_tbl OE_ORDER_PUB.line_tbl_type;
4941: l_line_rec OE_ORDER_PUB.line_rec_type;
4942: l_old_line_rec OE_ORDER_PUB.line_rec_type;
4943: l_msg_count NUMBER;
4944: l_msg_data VARCHAR2(2000);
4945: l_set_rec OE_ORDER_CACHE.set_rec_type;
4946: l_set_name VARCHAR2(30);
6021:
6022: ****************************************************/
6023:
6024: Procedure Group_Schedule_sets
6025: ( p_sch_set_tbl IN OE_ORDER_PUB.request_tbl_type
6026: , x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
6027: IS
6028: l_line_tbl OE_ORDER_PUB.line_Tbl_type;
6029: l_old_line_tbl OE_ORDER_PUB.line_Tbl_type;
6024: Procedure Group_Schedule_sets
6025: ( p_sch_set_tbl IN OE_ORDER_PUB.request_tbl_type
6026: , x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
6027: IS
6028: l_line_tbl OE_ORDER_PUB.line_Tbl_type;
6029: l_old_line_tbl OE_ORDER_PUB.line_Tbl_type;
6030: l_sch_line_tbl OE_ORDER_PUB.line_Tbl_type;
6031: l_count NUMBER := 0;
6032: l_set_rec OE_ORDER_CACHE.set_rec_type;
6025: ( p_sch_set_tbl IN OE_ORDER_PUB.request_tbl_type
6026: , x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
6027: IS
6028: l_line_tbl OE_ORDER_PUB.line_Tbl_type;
6029: l_old_line_tbl OE_ORDER_PUB.line_Tbl_type;
6030: l_sch_line_tbl OE_ORDER_PUB.line_Tbl_type;
6031: l_count NUMBER := 0;
6032: l_set_rec OE_ORDER_CACHE.set_rec_type;
6033: l_msg_count NUMBER;
6026: , x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2)
6027: IS
6028: l_line_tbl OE_ORDER_PUB.line_Tbl_type;
6029: l_old_line_tbl OE_ORDER_PUB.line_Tbl_type;
6030: l_sch_line_tbl OE_ORDER_PUB.line_Tbl_type;
6031: l_count NUMBER := 0;
6032: l_set_rec OE_ORDER_CACHE.set_rec_type;
6033: l_msg_count NUMBER;
6034: l_msg_data VARCHAR2(2000);