DBA Data[Home] [Help]

APPS.CTO_WIP_WRAPPER dependencies on OE_DEBUG_PUB

Line 27: | Replaced fnd_file calls with oe_debug_pub |

23: | August 14, 99 Angela Makalintal Initial version |
24: | February 26, 01 Shashi Bhaskaran bugfix 1642355 |
25: | May 7, 01 Sajani Sheth Support for partial FAS |
26: | June 16, 01 Shashi Bhaskaran bugfix 1835357 |
27: | Replaced fnd_file calls with oe_debug_pub |
28: | August 16,2001 Kiran Konada, fix for bug#1874380 |
29: | to support ATO item under a PTO. |
30: | item_type_code for an ato item under PTO |
31: | is 'OPTION' and top_model_line_id will NOT be|

Line 183: oe_debug_pub.add ('unlock_line_id: ' || 'unlocked line_id '||p_line_id);

179: AND oel.program_id = -99;
180:
181: IF (sql%rowcount > 0) THEN
182: IF (PG_DEBUG <> 0) THEN
183: oe_debug_pub.add ('unlock_line_id: ' || 'unlocked line_id '||p_line_id);
184: END IF;
185: END IF;
186:
187: EXCEPTION

Line 191: OE_DEBUG_PUB.add ('unlock_line_id: error: ' || sqlerrm);

187: EXCEPTION
188:
189: when others then
190: IF PG_DEBUG <> 0 THEN
191: OE_DEBUG_PUB.add ('unlock_line_id: error: ' || sqlerrm);
192:
193: END IF;
194:
195: END UnLock_Line_Id;

Line 344: oe_debug_pub.add('get_order_lines: ' || 'Begin Get Order Lines.', 1);

340: Select Eligible Records based on parameters and workflow status.
341: ****************************************************************/
342:
343: IF PG_DEBUG <> 0 THEN
344: oe_debug_pub.add('get_order_lines: ' || 'Begin Get Order Lines.', 1);
345:
346: oe_debug_pub.add('get_order_lines: ' || 'Organization ID: '||to_char(p_org_id), 1);
347:
348: oe_debug_pub.add('get_order_lines: ' || 'Offset: '||to_char(p_offset_days), 1);

Line 346: oe_debug_pub.add('get_order_lines: ' || 'Organization ID: '||to_char(p_org_id), 1);

342:
343: IF PG_DEBUG <> 0 THEN
344: oe_debug_pub.add('get_order_lines: ' || 'Begin Get Order Lines.', 1);
345:
346: oe_debug_pub.add('get_order_lines: ' || 'Organization ID: '||to_char(p_org_id), 1);
347:
348: oe_debug_pub.add('get_order_lines: ' || 'Offset: '||to_char(p_offset_days), 1);
349:
350: oe_debug_pub.add('get_order_lines: ' || 'Load Type: '||to_char(p_load_type), 1);

Line 348: oe_debug_pub.add('get_order_lines: ' || 'Offset: '||to_char(p_offset_days), 1);

344: oe_debug_pub.add('get_order_lines: ' || 'Begin Get Order Lines.', 1);
345:
346: oe_debug_pub.add('get_order_lines: ' || 'Organization ID: '||to_char(p_org_id), 1);
347:
348: oe_debug_pub.add('get_order_lines: ' || 'Offset: '||to_char(p_offset_days), 1);
349:
350: oe_debug_pub.add('get_order_lines: ' || 'Load Type: '||to_char(p_load_type), 1);
351:
352: oe_debug_pub.add('get_order_lines: ' || 'Class Code: '||p_class_code, 1);

Line 350: oe_debug_pub.add('get_order_lines: ' || 'Load Type: '||to_char(p_load_type), 1);

346: oe_debug_pub.add('get_order_lines: ' || 'Organization ID: '||to_char(p_org_id), 1);
347:
348: oe_debug_pub.add('get_order_lines: ' || 'Offset: '||to_char(p_offset_days), 1);
349:
350: oe_debug_pub.add('get_order_lines: ' || 'Load Type: '||to_char(p_load_type), 1);
351:
352: oe_debug_pub.add('get_order_lines: ' || 'Class Code: '||p_class_code, 1);
353:
354: oe_debug_pub.add('get_order_lines: ' || 'Status Type: '||to_char(p_status_type), 1);

Line 352: oe_debug_pub.add('get_order_lines: ' || 'Class Code: '||p_class_code, 1);

348: oe_debug_pub.add('get_order_lines: ' || 'Offset: '||to_char(p_offset_days), 1);
349:
350: oe_debug_pub.add('get_order_lines: ' || 'Load Type: '||to_char(p_load_type), 1);
351:
352: oe_debug_pub.add('get_order_lines: ' || 'Class Code: '||p_class_code, 1);
353:
354: oe_debug_pub.add('get_order_lines: ' || 'Status Type: '||to_char(p_status_type), 1);
355:
356: oe_debug_pub.add('get_order_lines: ' || 'Order Number: '||to_char(p_order_number), 1);

Line 354: oe_debug_pub.add('get_order_lines: ' || 'Status Type: '||to_char(p_status_type), 1);

350: oe_debug_pub.add('get_order_lines: ' || 'Load Type: '||to_char(p_load_type), 1);
351:
352: oe_debug_pub.add('get_order_lines: ' || 'Class Code: '||p_class_code, 1);
353:
354: oe_debug_pub.add('get_order_lines: ' || 'Status Type: '||to_char(p_status_type), 1);
355:
356: oe_debug_pub.add('get_order_lines: ' || 'Order Number: '||to_char(p_order_number), 1);
357:
358: oe_debug_pub.add('get_order_lines: ' || 'Line ID: ' ||to_char(p_line_id), 1);

Line 356: oe_debug_pub.add('get_order_lines: ' || 'Order Number: '||to_char(p_order_number), 1);

352: oe_debug_pub.add('get_order_lines: ' || 'Class Code: '||p_class_code, 1);
353:
354: oe_debug_pub.add('get_order_lines: ' || 'Status Type: '||to_char(p_status_type), 1);
355:
356: oe_debug_pub.add('get_order_lines: ' || 'Order Number: '||to_char(p_order_number), 1);
357:
358: oe_debug_pub.add('get_order_lines: ' || 'Line ID: ' ||to_char(p_line_id), 1);
359: END IF;
360:

Line 358: oe_debug_pub.add('get_order_lines: ' || 'Line ID: ' ||to_char(p_line_id), 1);

354: oe_debug_pub.add('get_order_lines: ' || 'Status Type: '||to_char(p_status_type), 1);
355:
356: oe_debug_pub.add('get_order_lines: ' || 'Order Number: '||to_char(p_order_number), 1);
357:
358: oe_debug_pub.add('get_order_lines: ' || 'Line ID: ' ||to_char(p_line_id), 1);
359: END IF;
360:
361: x_wip_seq := -1;
362: x_orders_loaded := 0;

Line 385: oe_debug_pub.add('get_order_lines: ' || 'initialized Offset to null : '||to_char(l_offset_days), 1);

381: if p_offset_days = -10000 then
382: l_offset_days := null ;
383:
384: IF PG_DEBUG <> 0 THEN
385: oe_debug_pub.add('get_order_lines: ' || 'initialized Offset to null : '||to_char(l_offset_days), 1);
386: END IF;
387:
388: else
389: l_offset_days := p_offset_days ;

Line 609: oe_debug_pub.add ('SQL: ' || substr(sql_stmt,1, 1500));

605: sql_stmt := sql_stmt ||
606: 'order by oel.org_id, oel.line_id';
607:
608: IF PG_DEBUG <> 0 THEN
609: oe_debug_pub.add ('SQL: ' || substr(sql_stmt,1, 1500));
610: oe_debug_pub.add (substr(sql_stmt,1501,3000));
611: oe_debug_pub.add ('drive_mark = '||drive_mark );
612: END IF;
613:

Line 610: oe_debug_pub.add (substr(sql_stmt,1501,3000));

606: 'order by oel.org_id, oel.line_id';
607:
608: IF PG_DEBUG <> 0 THEN
609: oe_debug_pub.add ('SQL: ' || substr(sql_stmt,1, 1500));
610: oe_debug_pub.add (substr(sql_stmt,1501,3000));
611: oe_debug_pub.add ('drive_mark = '||drive_mark );
612: END IF;
613:
614: /*

Line 611: oe_debug_pub.add ('drive_mark = '||drive_mark );

607:
608: IF PG_DEBUG <> 0 THEN
609: oe_debug_pub.add ('SQL: ' || substr(sql_stmt,1, 1500));
610: oe_debug_pub.add (substr(sql_stmt,1501,3000));
611: oe_debug_pub.add ('drive_mark = '||drive_mark );
612: END IF;
613:
614: /*
615: Below, we execute the sql statement according to which parameters

Line 698: oe_debug_pub.add ('INCORRECT COMBINATION of parameters');

694: Open WorkOrder FOR sql_stmt USING l_order_number, l_line_id, l_line_id, l_line_id, l_line_id, l_org_id, p_offset_days;
695:
696: else
697: IF PG_DEBUG <> 0 THEN
698: oe_debug_pub.add ('INCORRECT COMBINATION of parameters');
699: END IF;
700:
701: end if;
702:

Line 706: oe_debug_pub.add ('Opened. System Time : '||to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS'));

702:
703: -- End Bugfix 4056151: End of Dynamic SQL creation
704:
705: IF PG_DEBUG <> 0 THEN
706: oe_debug_pub.add ('Opened. System Time : '||to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS'));
707: END IF;
708:
709:
710: -- begin bugfix 3014000

Line 716: oe_debug_pub.add('get_order_lines: '|| 'MO:operating Unit :' || lOperUnit, 2);

712: -- Deriving the current org using MO GLOBAL API
713: lOperUnit := nvl(MO_GLOBAL.get_current_org_id,-99);
714:
715: IF PG_DEBUG <> 0 THEN
716: oe_debug_pub.add('get_order_lines: '|| 'MO:operating Unit :' || lOperUnit, 2);
717: END IF;
718: -- end bugfix 3014000
719:
720: --

Line 737: oe_debug_pub.add ('Fetched. System Time : '||to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS'));

733: LOOP
734: FETCH WorkOrder INTO WorkOrder_Rec;
735: EXIT WHEN WorkOrder%NOTFOUND;
736: IF PG_DEBUG <> 0 THEN
737: oe_debug_pub.add ('Fetched. System Time : '||to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS'));
738: END IF;
739: -- begin bugfix 3014000: Moved the debug stmt here
740:
741: IF PG_DEBUG <> 0 THEN

Line 742: oe_debug_pub.add('----------------------------------------', 5);

738: END IF;
739: -- begin bugfix 3014000: Moved the debug stmt here
740:
741: IF PG_DEBUG <> 0 THEN
742: oe_debug_pub.add('----------------------------------------', 5);
743: oe_debug_pub.add('Processing line_id: '||WorkOrder_Rec.line_id, 5);
744: oe_debug_pub.add('----------------------------------------', 5);
745: END IF;
746:

Line 743: oe_debug_pub.add('Processing line_id: '||WorkOrder_Rec.line_id, 5);

739: -- begin bugfix 3014000: Moved the debug stmt here
740:
741: IF PG_DEBUG <> 0 THEN
742: oe_debug_pub.add('----------------------------------------', 5);
743: oe_debug_pub.add('Processing line_id: '||WorkOrder_Rec.line_id, 5);
744: oe_debug_pub.add('----------------------------------------', 5);
745: END IF;
746:
747:

Line 744: oe_debug_pub.add('----------------------------------------', 5);

740:
741: IF PG_DEBUG <> 0 THEN
742: oe_debug_pub.add('----------------------------------------', 5);
743: oe_debug_pub.add('Processing line_id: '||WorkOrder_Rec.line_id, 5);
744: oe_debug_pub.add('----------------------------------------', 5);
745: END IF;
746:
747:
748: --

Line 776: oe_debug_pub.add('get_order_lines: '|| 'Setting the Org Context to '||WorkOrder_Rec.org_id ||

772: -- begin bugfix 3014000
773: -- commenting out... : FND_CLIENT_INFO.Set_Org_Context ( WorkOrder_Rec.org_id );
774:
775: IF PG_DEBUG <> 0 THEN
776: oe_debug_pub.add('get_order_lines: '|| 'Setting the Org Context to '||WorkOrder_Rec.org_id ||
777: ' by calling OE_Order_Context_GRP.Set_Created_By_Context.', 5);
778: END IF;
779:
780: OE_Order_Context_GRP.Set_Created_By_Context (

Line 792: oe_debug_pub.add('get_order_lines: '|| 'Expected Error in Set_Created_By_Context.');

788: ,x_msg_data => l_x_msg_data );
789:
790: if l_x_return_status = FND_API.G_RET_STS_ERROR THEN
791: IF PG_DEBUG <> 0 THEN
792: oe_debug_pub.add('get_order_lines: '|| 'Expected Error in Set_Created_By_Context.');
793: END IF;
794: raise FND_API.G_EXC_ERROR;
795:
796: elsif l_x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

Line 798: oe_debug_pub.add('get_order_lines: '|| 'UnExpected Error in Set_Created_By_Context.');

794: raise FND_API.G_EXC_ERROR;
795:
796: elsif l_x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
797: IF PG_DEBUG <> 0 THEN
798: oe_debug_pub.add('get_order_lines: '|| 'UnExpected Error in Set_Created_By_Context.');
799: END IF;
800: raise FND_API.G_EXC_UNEXPECTED_ERROR;
801:
802: end if;

Line 805: oe_debug_pub.add('get_order_lines: '|| 'NOT Setting the Org Context since MO:Operating Unit = OEL.org_id.', 5);

801:
802: end if;
803: else
804: IF PG_DEBUG <> 0 THEN
805: oe_debug_pub.add('get_order_lines: '|| 'NOT Setting the Org Context since MO:Operating Unit = OEL.org_id.', 5);
806: END IF;
807: end if;
808: -- end bugfix 3014000
809:

Line 851: oe_debug_pub.add('get_order_lines: ' || 'get_notinv_qty() - get_reserved_qty() <= 0.',2);

847: -- line has to be atomic. So commenting out the following part.
848: /*if ( GET_NOTINV_QTY(WorkOrder_Rec.line_id) - GET_RESERVED_QTY(WorkOrder_Rec.line_id) <= 0 )
849: then
850: IF PG_DEBUG <> 0 THEN
851: oe_debug_pub.add('get_order_lines: ' || 'get_notinv_qty() - get_reserved_qty() <= 0.',2);
852:
853: oe_debug_pub.add('get_order_lines: ' || 'This line ('||WorkOrder_Rec.line_id||
854: ') is not eligible for creation of workorder.',2);
855: END IF;

Line 853: oe_debug_pub.add('get_order_lines: ' || 'This line ('||WorkOrder_Rec.line_id||

849: then
850: IF PG_DEBUG <> 0 THEN
851: oe_debug_pub.add('get_order_lines: ' || 'get_notinv_qty() - get_reserved_qty() <= 0.',2);
852:
853: oe_debug_pub.add('get_order_lines: ' || 'This line ('||WorkOrder_Rec.line_id||
854: ') is not eligible for creation of workorder.',2);
855: END IF;
856: goto end_of_loop;
857: end if;

Line 867: oe_debug_pub.add('get_order_lines: ' || 'check_wip_supply_type() returned a value not in (0,1). ',2);

863: p_so_delivery => NULL,
864: p_org_id => WorkOrder_Rec.ship_from_org_id) not in (0,1)
865: then
866: IF PG_DEBUG <> 0 THEN
867: oe_debug_pub.add('get_order_lines: ' || 'check_wip_supply_type() returned a value not in (0,1). ',2);
868:
869: oe_debug_pub.add('get_order_lines: ' || 'This line ('||WorkOrder_Rec.line_id||
870: ') is not eligible for creation of workorder.', 2);
871: END IF;

Line 869: oe_debug_pub.add('get_order_lines: ' || 'This line ('||WorkOrder_Rec.line_id||

865: then
866: IF PG_DEBUG <> 0 THEN
867: oe_debug_pub.add('get_order_lines: ' || 'check_wip_supply_type() returned a value not in (0,1). ',2);
868:
869: oe_debug_pub.add('get_order_lines: ' || 'This line ('||WorkOrder_Rec.line_id||
870: ') is not eligible for creation of workorder.', 2);
871: END IF;
872: goto end_of_loop;
873: end if;

Line 882: oe_debug_pub.add('get_order_lines: ' || 'Looking the sourcing information...',1);

878: -- bug 6146803: Move this line to after obtaining the lock.
879: --l_rows_selected := l_rows_selected + 1;
880:
881: IF PG_DEBUG <> 0 THEN
882: oe_debug_pub.add('get_order_lines: ' || 'Looking the sourcing information...',1);
883: END IF;
884:
885: l_stmt_num := 2;
886:

Line 901: OE_DEBUG_PUB.add ('get_order_lines: ' || 'Could not lock line id '|| to_char(WorkOrder_Rec.line_id) ||' for update.');

897: l_inventory_item_id := WorkOrder_Rec.inventory_item_id;
898: exception
899: WHEN record_locked THEN
900: IF PG_DEBUG <> 0 THEN
901: OE_DEBUG_PUB.add ('get_order_lines: ' || 'Could not lock line id '|| to_char(WorkOrder_Rec.line_id) ||' for update.');
902:
903: OE_DEBUG_PUB.add ('get_order_lines: ' || 'This line is being processed by another process.',1);
904: END IF;
905: goto end_of_loop;

Line 903: OE_DEBUG_PUB.add ('get_order_lines: ' || 'This line is being processed by another process.',1);

899: WHEN record_locked THEN
900: IF PG_DEBUG <> 0 THEN
901: OE_DEBUG_PUB.add ('get_order_lines: ' || 'Could not lock line id '|| to_char(WorkOrder_Rec.line_id) ||' for update.');
902:
903: OE_DEBUG_PUB.add ('get_order_lines: ' || 'This line is being processed by another process.',1);
904: END IF;
905: goto end_of_loop;
906: -- bugfix 2420381: added the excpn for better handling of error.
907:

Line 911: oe_debug_pub.add('get_order_lines: ' || 'get_notinv_qty() - get_reserved_qty() <= 0.',2);

907:
908: -- Bug 6146803: No data found shall happen if GET_NOTINV_QTY - GET_RESERVED_QTY <= 0
909: WHEN NO_DATA_FOUND THEN
910: IF PG_DEBUG <> 0 THEN
911: oe_debug_pub.add('get_order_lines: ' || 'get_notinv_qty() - get_reserved_qty() <= 0.',2);
912:
913: oe_debug_pub.add('get_order_lines: ' || 'This line ('||WorkOrder_Rec.line_id||
914: ') is not eligible for creation of workorder.',2);
915: END IF;

Line 913: oe_debug_pub.add('get_order_lines: ' || 'This line ('||WorkOrder_Rec.line_id||

909: WHEN NO_DATA_FOUND THEN
910: IF PG_DEBUG <> 0 THEN
911: oe_debug_pub.add('get_order_lines: ' || 'get_notinv_qty() - get_reserved_qty() <= 0.',2);
912:
913: oe_debug_pub.add('get_order_lines: ' || 'This line ('||WorkOrder_Rec.line_id||
914: ') is not eligible for creation of workorder.',2);
915: END IF;
916: goto end_of_loop;
917:

Line 920: oe_debug_pub.add('get_order_lines: ' || 'others exception while locking line '||WorkOrder_Rec.line_id||':'||sqlerrm,1);

916: goto end_of_loop;
917:
918: WHEN others THEN
919: IF PG_DEBUG <> 0 THEN
920: oe_debug_pub.add('get_order_lines: ' || 'others exception while locking line '||WorkOrder_Rec.line_id||':'||sqlerrm,1);
921: END IF;
922: goto end_of_loop;
923: end;
924:

Line 929: oe_debug_pub.add('get_order_lines: ' || 'successfully locked line '|| WorkOrder_Rec.line_id);

925: l_rows_selected := l_rows_selected + 1; --Bugfix 6146803
926:
927: /* bugfix 3136206: added the following debug stmt */
928: IF PG_DEBUG <> 0 THEN
929: oe_debug_pub.add('get_order_lines: ' || 'successfully locked line '|| WorkOrder_Rec.line_id);
930: END IF;
931:
932: l_stmt_num := 3;
933:

Line 953: oe_debug_pub.add('get_order_lines: ' || 'Return status from Query_sourcing_org = '||l_x_return_status,1);

949: X_message =>l_message --declare
950: );
951:
952: IF PG_DEBUG <> 0 THEN
953: oe_debug_pub.add('get_order_lines: ' || 'Return status from Query_sourcing_org = '||l_x_return_status,1);
954: END IF;
955:
956: IF l_x_return_status = FND_API.G_RET_STS_SUCCESS THEN
957:

Line 961: oe_debug_pub.add('get_order_lines: ' ||l_message,1);

957:
958: IF l_can_create_supply = 'N' THEN --opm
959: IF PG_DEBUG <> 0 THEN
960: --would identify if line is skipped becuase of custom hook
961: oe_debug_pub.add('get_order_lines: ' ||l_message,1);
962: END IF;
963:
964: IF nvl(l_source_type,1) = 66 THEN --Kiran Konada
965: IF PG_DEBUG <> 0 THEN

Line 966: oe_debug_pub.add('get_order_lines: ' || 'Multiple sourcing defined for this item in this org...Supply will be created by planning. ',1);

962: END IF;
963:
964: IF nvl(l_source_type,1) = 66 THEN --Kiran Konada
965: IF PG_DEBUG <> 0 THEN
966: oe_debug_pub.add('get_order_lines: ' || 'Multiple sourcing defined for this item in this org...Supply will be created by planning. ',1);
967: END IF;
968: l_rows_errored := l_rows_errored + 1;
969: goto end_of_loop;
970: END IF;

Line 976: oe_debug_pub.add('get_order_lines: ' || 'Expected error occurred in Query_sourcing_org...',1);

972: END IF; --l_can_create_supply
973:
974: ELSIF l_x_return_status = FND_API.G_RET_STS_ERROR THEN
975: IF PG_DEBUG <> 0 THEN
976: oe_debug_pub.add('get_order_lines: ' || 'Expected error occurred in Query_sourcing_org...',1);
977: END IF;
978: l_rows_errored := l_rows_errored + 1;
979: -- we do not want to raise error here, since we want to process remaining lines
980: goto end_of_loop;

Line 984: oe_debug_pub.add('get_order_lines: ' || 'Unexpected error occurred in Query_sourcing_org procedure...',1);

980: goto end_of_loop;
981:
982: ELSIF l_x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
983: IF PG_DEBUG <> 0 THEN
984: oe_debug_pub.add('get_order_lines: ' || 'Unexpected error occurred in Query_sourcing_org procedure...',1);
985: END IF;
986: l_rows_errored := l_rows_errored + 1;
987: -- we do not want to raise error here, since we want to process remaining lines
988: goto end_of_loop;

Line 995: oe_debug_pub.add('get_order_lines: ' || 'It is a BUY configuration Need not process this...',1);

991: IF l_can_create_supply = 'Y' THEN --as part of OPM enhancement
992: if nvl(l_source_type,1) = 3
993: then
994: IF PG_DEBUG <> 0 THEN
995: oe_debug_pub.add('get_order_lines: ' || 'It is a BUY configuration Need not process this...',1);
996: END IF;
997: l_rows_selected := l_rows_selected - 1;
998:
999: -- Start 2681321: if the source type is TRANSFER FROM, we should not create a workorder

Line 1003: oe_debug_pub.add('TRANSFER FROM sourcing rule exists. Work order need not be created.',1);

999: -- Start 2681321: if the source type is TRANSFER FROM, we should not create a workorder
1000:
1001: elsif nvl(l_source_type,2) = 1 then
1002: IF PG_DEBUG <> 0 THEN
1003: oe_debug_pub.add('TRANSFER FROM sourcing rule exists. Work order need not be created.',1);
1004: END IF;
1005: l_rows_selected := l_rows_selected - 1;
1006:
1007: -- End 2681321

Line 1022: OE_DEBUG_PUB.add('get_order_lines: ' || 'Get_Order_lines: ' ||

1018: end if;
1019: */
1020:
1021: IF PG_DEBUG <> 0 THEN
1022: OE_DEBUG_PUB.add('get_order_lines: ' || 'Get_Order_lines: ' ||
1023: ' Procesing Order Line ' ||
1024: to_char(WorkOrder_Rec.line_id), 2);
1025: END IF;
1026:

Line 1043: OE_DEBUG_PUB.add('get_order_lines: ' || 'FAILED in Hold Check: ' || l_x_return_status ||

1039:
1040: if (l_x_return_status <> FND_API.G_RET_STS_SUCCESS) then
1041:
1042: IF PG_DEBUG <> 0 THEN
1043: OE_DEBUG_PUB.add('get_order_lines: ' || 'FAILED in Hold Check: ' || l_x_return_status ||
1044: ' For Order Line ' || to_char(WorkOrder_Rec.line_id), 1);
1045:
1046: OE_DEBUG_PUB.add('get_order_lines: ' || 'Continuing with next line..',3);
1047: END IF;

Line 1046: OE_DEBUG_PUB.add('get_order_lines: ' || 'Continuing with next line..',3);

1042: IF PG_DEBUG <> 0 THEN
1043: OE_DEBUG_PUB.add('get_order_lines: ' || 'FAILED in Hold Check: ' || l_x_return_status ||
1044: ' For Order Line ' || to_char(WorkOrder_Rec.line_id), 1);
1045:
1046: OE_DEBUG_PUB.add('get_order_lines: ' || 'Continuing with next line..',3);
1047: END IF;
1048: else
1049:
1050: IF PG_DEBUG <> 0 THEN

Line 1051: OE_DEBUG_PUB.add('get_order_lines: ' || 'Success in Hold Check: ' || l_x_return_status ||

1047: END IF;
1048: else
1049:
1050: IF PG_DEBUG <> 0 THEN
1051: OE_DEBUG_PUB.add('get_order_lines: ' || 'Success in Hold Check: ' || l_x_return_status ||
1052: ' For Order Line ' || to_char(WorkOrder_Rec.line_id), 1);
1053: END IF;
1054:
1055: if (l_x_hold_result_out = FND_API.G_TRUE) then

Line 1058: OE_DEBUG_PUB.add('get_order_lines: ' || 'Hold Found on order line ' || to_char(WorkOrder_Rec.line_id), 1);

1054:
1055: if (l_x_hold_result_out = FND_API.G_TRUE) then
1056:
1057: IF PG_DEBUG <> 0 THEN
1058: OE_DEBUG_PUB.add('get_order_lines: ' || 'Hold Found on order line ' || to_char(WorkOrder_Rec.line_id), 1);
1059:
1060: OE_DEBUG_PUB.add('get_order_lines: ' || 'Continuing with next line..',3);
1061: END IF;
1062:

Line 1060: OE_DEBUG_PUB.add('get_order_lines: ' || 'Continuing with next line..',3);

1056:
1057: IF PG_DEBUG <> 0 THEN
1058: OE_DEBUG_PUB.add('get_order_lines: ' || 'Hold Found on order line ' || to_char(WorkOrder_Rec.line_id), 1);
1059:
1060: OE_DEBUG_PUB.add('get_order_lines: ' || 'Continuing with next line..',3);
1061: END IF;
1062:
1063: l_rows_on_hold := l_rows_on_hold + 1;
1064:

Line 1071: OE_DEBUG_PUB.add('get_order_lines: ' || 'before dep plan',1);

1067: /* If Departure Planning is required, check if deliveries have been assigned and planned */
1068:
1069: BEGIN
1070: IF PG_DEBUG <> 0 THEN
1071: OE_DEBUG_PUB.add('get_order_lines: ' || 'before dep plan',1);
1072: END IF;
1073:
1074: l_stmt_num := 6;
1075:

Line 1082: OE_DEBUG_PUB.add('get_order_lines: ' || 'l_dep_plan_flag::'||l_dep_plan_flag, 2);

1078: from oe_order_lines_all oel
1079: where oel.line_id = WorkOrder_Rec.line_id;
1080:
1081: IF PG_DEBUG <> 0 THEN
1082: OE_DEBUG_PUB.add('get_order_lines: ' || 'l_dep_plan_flag::'||l_dep_plan_flag, 2);
1083: END IF;
1084:
1085: if l_dep_plan_flag = 'Y' then
1086:

Line 1103: OE_DEBUG_PUB.add('get_order_lines: ' ||

1099: x_msg_data => l_x_msg_data);
1100:
1101: if (l_x_return_status = FND_API.G_RET_STS_ERROR) then
1102: IF PG_DEBUG <> 0 THEN
1103: OE_DEBUG_PUB.add('get_order_lines: ' ||
1104: 'Expected error in Delivery_Planned: '
1105: || l_x_return_status
1106: || ' For Order Line '
1107: ||to_char(WorkOrder_Rec.line_id), 1);

Line 1113: OE_DEBUG_PUB.add('get_order_lines: ' ||

1109: raise FND_API.G_EXC_ERROR;
1110:
1111: elsif (l_x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) then
1112: IF PG_DEBUG <> 0 THEN
1113: OE_DEBUG_PUB.add('get_order_lines: ' ||
1114: 'UnExpected error in Delivery_Planned: '
1115: || l_x_return_status
1116: || ' For Order Line '
1117: ||to_char(WorkOrder_Rec.line_id), 1);

Line 1123: OE_DEBUG_PUB.add('get_order_lines: ' ||

1119: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1120:
1121: else
1122: IF PG_DEBUG <> 0 THEN
1123: OE_DEBUG_PUB.add('get_order_lines: ' ||
1124: 'Success in Delivery_Planned: '
1125: || l_x_return_status
1126: || ' For Order Line '
1127: ||to_char(WorkOrder_Rec.line_id), 1);

Line 1132: OE_DEBUG_PUB.add('get_order_lines: ' ||

1128: END IF;
1129:
1130: if (l_x_result_out = FND_API.G_FALSE) then
1131: IF PG_DEBUG <> 0 THEN
1132: OE_DEBUG_PUB.add('get_order_lines: ' ||
1133: 'Order line not delivery planned'
1134: ||to_char(WorkOrder_Rec.line_id), 1);
1135: END IF;
1136:

Line 1158: oe_debug_pub.add('get_order_lines:: Creating flow schedule for line:' || WorkOrder_Rec.line_id);

1154: and bor.alternate_routing_designator (+) is NULL;
1155:
1156: if l_supply_type = 1 then -- Flow Routings
1157: IF PG_DEBUG <> 0 THEN
1158: oe_debug_pub.add('get_order_lines:: Creating flow schedule for line:' || WorkOrder_Rec.line_id);
1159: END IF;
1160:
1161: -- Check if the schedule_ship_date < sysdate. MRP will not create flow schedule
1162: -- in this case.

Line 1173: oe_debug_pub.add('get_order_lines: Schedule ship date:'|| to_char(l_schedule_ship_date) ||

1169: where line_id = WorkOrder_Rec.line_id;
1170:
1171: if (trunc(l_schedule_ship_date) < trunc(sysdate)) then
1172: IF PG_DEBUG <> 0 THEN
1173: oe_debug_pub.add('get_order_lines: Schedule ship date:'|| to_char(l_schedule_ship_date) ||
1174: ' is earlier than sysdate. Continuing to the next line.');
1175: END IF;
1176:
1177: goto end_of_loop;

Line 1189: oe_debug_pub.add('get_order_lines: Expected error in Create Flow Schedule. Status:' || l_x_return_status);

1185: x_msg_txt => l_x_error_message);
1186:
1187: IF (l_x_return_status = FND_API.G_RET_STS_ERROR) THEN
1188: IF PG_DEBUG <> 0 THEN
1189: oe_debug_pub.add('get_order_lines: Expected error in Create Flow Schedule. Status:' || l_x_return_status);
1190: END IF;
1191: cto_msg_pub.cto_message('BOM', l_x_message_name);
1192: l_rows_errored := l_rows_errored + 1;
1193: goto end_of_loop;

Line 1197: oe_debug_pub.add('get_order_lines: Unexpected error in Create Flow Schedule. Status:' || l_x_return_status);

1193: goto end_of_loop;
1194:
1195: ELSIF (l_x_return_status = FND_API.G_RET_STS_UNEXP_ERROR) THEN
1196: IF PG_DEBUG <> 0 THEN
1197: oe_debug_pub.add('get_order_lines: Unexpected error in Create Flow Schedule. Status:' || l_x_return_status);
1198: END IF;
1199: cto_msg_pub.cto_message('BOM', l_x_message_name);
1200: l_rows_errored := l_rows_errored + 1;
1201: goto end_of_loop;

Line 1205: oe_debug_pub.add('get_order_lines: Success in Create Flow Schedule. Status:' || l_x_return_status);

1201: goto end_of_loop;
1202:
1203: ELSE
1204: IF PG_DEBUG <> 0 THEN
1205: oe_debug_pub.add('get_order_lines: Success in Create Flow Schedule. Status:' || l_x_return_status);
1206: END IF;
1207:
1208: -- Check if the line has any flow schedules. Update the line status accordingly.
1209: if CTO_WORKFLOW.Flow_Sch_Exists(to_number(WorkOrder_Rec.line_id)) then

Line 1211: oe_debug_pub.add('get_order_lines: Flow_Sch_Exists. Updating flow status code to PRODUCTION_OPEN ' ||

1207:
1208: -- Check if the line has any flow schedules. Update the line status accordingly.
1209: if CTO_WORKFLOW.Flow_Sch_Exists(to_number(WorkOrder_Rec.line_id)) then
1210: IF PG_DEBUG <> 0 THEN
1211: oe_debug_pub.add('get_order_lines: Flow_Sch_Exists. Updating flow status code to PRODUCTION_OPEN ' ||
1212: 'for line_id:'|| WorkOrder_Rec.line_id || ' header_id:' || WorkOrder_Rec.header_id);
1213: END IF;
1214: l_stmt_num := 11;
1215: OE_Order_WF_Util.Update_Flow_Status_Code(p_header_id => WorkOrder_Rec.header_id,

Line 1223: oe_debug_pub.add('create_flow_schedule_wf: ' || 'Flow schedules not created');

1219:
1220: l_rows_flow := l_rows_flow + 1;
1221: else
1222: IF PG_DEBUG <> 0 THEN
1223: oe_debug_pub.add('create_flow_schedule_wf: ' || 'Flow schedules not created');
1224: l_rows_errored := l_rows_errored + 1;
1225: END IF;
1226: end if;
1227:

Line 1258: oe_debug_pub.add('get_order_lines: ' || 'Insert Error Message: ' || l_x_error_message,1);

1254: if (l_x_return_status <> FND_API.G_RET_STS_SUCCESS) then
1255: -- We dont want to raise error here, since we want to process other lines.
1256:
1257: IF PG_DEBUG <> 0 THEN
1258: oe_debug_pub.add('get_order_lines: ' || 'Insert Error Message: ' || l_x_error_message,1);
1259:
1260: OE_DEBUG_PUB.add('get_order_lines: ' || 'FAILED in Insert WIP Interface: ' || l_x_return_status ||
1261: 'For Order Line ' || to_char(WorkOrder_Rec.line_id), 1);
1262: END IF;

Line 1260: OE_DEBUG_PUB.add('get_order_lines: ' || 'FAILED in Insert WIP Interface: ' || l_x_return_status ||

1256:
1257: IF PG_DEBUG <> 0 THEN
1258: oe_debug_pub.add('get_order_lines: ' || 'Insert Error Message: ' || l_x_error_message,1);
1259:
1260: OE_DEBUG_PUB.add('get_order_lines: ' || 'FAILED in Insert WIP Interface: ' || l_x_return_status ||
1261: 'For Order Line ' || to_char(WorkOrder_Rec.line_id), 1);
1262: END IF;
1263:
1264: else

Line 1267: OE_DEBUG_PUB.add('get_order_lines: ' || 'Success in Insert WIP Interface: ' || l_x_return_status ||

1263:
1264: else
1265:
1266: IF PG_DEBUG <> 0 THEN
1267: OE_DEBUG_PUB.add('get_order_lines: ' || 'Success in Insert WIP Interface: ' || l_x_return_status ||
1268: 'For Order Line ' || to_char(WorkOrder_Rec.line_id), 1);
1269: END IF;
1270:
1271: l_rows_inserted := l_rows_inserted + 1;

Line 1280: OE_DEBUG_PUB.add('get_order_lines: ' || 'Deliveries not planned, not inserting into wjsi', 2);

1276:
1277: EXCEPTION
1278: when NOT_PLANNED then
1279: IF PG_DEBUG <> 0 THEN
1280: OE_DEBUG_PUB.add('get_order_lines: ' || 'Deliveries not planned, not inserting into wjsi', 2);
1281: END IF;
1282:
1283: END; /*sub-block for delivery planned lines*/
1284:

Line 1298: oe_debug_pub.add('get_order_lines: ' || '****************************************', 5);

1294: null;
1295: end loop;
1296:
1297: IF PG_DEBUG <> 0 THEN
1298: oe_debug_pub.add('get_order_lines: ' || '****************************************', 5);
1299:
1300: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Order Lines Selected: ' ||
1301: to_char(l_rows_selected), 1);
1302:

Line 1300: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Order Lines Selected: ' ||

1296:
1297: IF PG_DEBUG <> 0 THEN
1298: oe_debug_pub.add('get_order_lines: ' || '****************************************', 5);
1299:
1300: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Order Lines Selected: ' ||
1301: to_char(l_rows_selected), 1);
1302:
1303: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Rows on Hold: ' ||
1304: to_char(l_rows_on_hold), 1);

Line 1303: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Rows on Hold: ' ||

1299:
1300: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Order Lines Selected: ' ||
1301: to_char(l_rows_selected), 1);
1302:
1303: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Rows on Hold: ' ||
1304: to_char(l_rows_on_hold), 1);
1305:
1306: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Rows not Departure Planned: ' ||
1307: to_char(l_rows_dep_plan), 1);

Line 1306: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Rows not Departure Planned: ' ||

1302:
1303: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Rows on Hold: ' ||
1304: to_char(l_rows_on_hold), 1);
1305:
1306: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Rows not Departure Planned: ' ||
1307: to_char(l_rows_dep_plan), 1);
1308:
1309: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Rows in error: ' ||
1310: to_char(l_rows_errored), 1);

Line 1309: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Rows in error: ' ||

1305:
1306: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Rows not Departure Planned: ' ||
1307: to_char(l_rows_dep_plan), 1);
1308:
1309: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Rows in error: ' ||
1310: to_char(l_rows_errored), 1);
1311:
1312: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Order Lines Inserted: ' ||
1313: to_char(l_rows_inserted), 1);

Line 1312: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Order Lines Inserted: ' ||

1308:
1309: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Rows in error: ' ||
1310: to_char(l_rows_errored), 1);
1311:
1312: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Order Lines Inserted: ' ||
1313: to_char(l_rows_inserted), 1);
1314:
1315: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Flow Schedules Created: ' ||
1316: to_char(l_rows_flow), 1);

Line 1315: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Flow Schedules Created: ' ||

1311:
1312: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Order Lines Inserted: ' ||
1313: to_char(l_rows_inserted), 1);
1314:
1315: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Flow Schedules Created: ' ||
1316: to_char(l_rows_flow), 1);
1317:
1318: OE_DEBUG_PUB.add('get_order_lines: ' || 'WIP Group ID: ' ||
1319: to_char(x_wip_seq), 1);

Line 1318: OE_DEBUG_PUB.add('get_order_lines: ' || 'WIP Group ID: ' ||

1314:
1315: OE_DEBUG_PUB.add('get_order_lines: ' || 'Number of Flow Schedules Created: ' ||
1316: to_char(l_rows_flow), 1);
1317:
1318: OE_DEBUG_PUB.add('get_order_lines: ' || 'WIP Group ID: ' ||
1319: to_char(x_wip_seq), 1);
1320:
1321: oe_debug_pub.add('get_order_lines: ' || '****************************************', 5);
1322: END IF;

Line 1321: oe_debug_pub.add('get_order_lines: ' || '****************************************', 5);

1317:
1318: OE_DEBUG_PUB.add('get_order_lines: ' || 'WIP Group ID: ' ||
1319: to_char(x_wip_seq), 1);
1320:
1321: oe_debug_pub.add('get_order_lines: ' || '****************************************', 5);
1322: END IF;
1323:
1324: x_orders_loaded := l_rows_inserted;
1325:

Line 1338: oe_debug_pub.add ('get_order_lines: ' || 'CTOWIPWB.get_order_lines: Line '||l_line_id||

1334:
1335: if (l_line_id is not null AND x_orders_loaded = 0) then
1336:
1337: IF PG_DEBUG <> 0 THEN
1338: oe_debug_pub.add ('get_order_lines: ' || 'CTOWIPWB.get_order_lines: Line '||l_line_id||
1339: ' is NOT eligible for Autocreate FAS anymore.',1);
1340: END IF;
1341:
1342: -- Try to get the job info if it was created..

Line 1365: oe_debug_pub.add ('get_order_lines: ' || 'Info: A WIP job ( '||l_job_name||' ) was created for this line already.',1);

1361: and oel.ship_from_org_id = dj.organization_id ;--for using index wdj_u1
1362: --end bugfix 2885568
1363:
1364: IF PG_DEBUG <> 0 THEN
1365: oe_debug_pub.add ('get_order_lines: ' || 'Info: A WIP job ( '||l_job_name||' ) was created for this line already.',1);
1366: END IF;
1367:
1368: exception
1369: when no_data_found then

Line 1371: oe_debug_pub.add ('get_order_lines: ' || 'Could not find a WIP job. Records probably stuck in wip job schedule interface.',1);

1367:
1368: exception
1369: when no_data_found then
1370: IF PG_DEBUG <> 0 THEN
1371: oe_debug_pub.add ('get_order_lines: ' || 'Could not find a WIP job. Records probably stuck in wip job schedule interface.',1);
1372: END IF;
1373:
1374: when others then
1375: IF PG_DEBUG <> 0 THEN

Line 1376: oe_debug_pub.add ('get_order_lines: ' || 'Error while fetching the WIP job. : '||substr(sqlerrm,1,200),1);

1372: END IF;
1373:
1374: when others then
1375: IF PG_DEBUG <> 0 THEN
1376: oe_debug_pub.add ('get_order_lines: ' || 'Error while fetching the WIP job. : '||substr(sqlerrm,1,200),1);
1377:
1378: oe_debug_pub.add ('get_order_lines: ' || 'Continuing..',1);
1379: END IF;
1380: end;

Line 1378: oe_debug_pub.add ('get_order_lines: ' || 'Continuing..',1);

1374: when others then
1375: IF PG_DEBUG <> 0 THEN
1376: oe_debug_pub.add ('get_order_lines: ' || 'Error while fetching the WIP job. : '||substr(sqlerrm,1,200),1);
1377:
1378: oe_debug_pub.add ('get_order_lines: ' || 'Continuing..',1);
1379: END IF;
1380: end;
1381: --return 0; -- bugfix 2105156: no need to return an error
1382: end if;

Line 1391: OE_DEBUG_PUB.add ('get_order_lines: ' || 'Could not lock line id '|| to_char(p_line_id) ||' for update.',1);

1387: -- bugfix 2053360 : handle the record_locked exception.
1388:
1389: WHEN record_locked THEN
1390: IF PG_DEBUG <> 0 THEN
1391: OE_DEBUG_PUB.add ('get_order_lines: ' || 'Could not lock line id '|| to_char(p_line_id) ||' for update.',1);
1392:
1393: OE_DEBUG_PUB.add ('get_order_lines: ' || 'This line is being processed by another process.',1);
1394: END IF;
1395: unlock_line_id (p_line_id); -- bugfix 3136206

Line 1393: OE_DEBUG_PUB.add ('get_order_lines: ' || 'This line is being processed by another process.',1);

1389: WHEN record_locked THEN
1390: IF PG_DEBUG <> 0 THEN
1391: OE_DEBUG_PUB.add ('get_order_lines: ' || 'Could not lock line id '|| to_char(p_line_id) ||' for update.',1);
1392:
1393: OE_DEBUG_PUB.add ('get_order_lines: ' || 'This line is being processed by another process.',1);
1394: END IF;
1395: unlock_line_id (p_line_id); -- bugfix 3136206
1396: return 1; -- return success otherwise, w/f will be in retry mode ! --bugfix 2105156
1397:

Line 1401: OE_DEBUG_PUB.add('get_order_lines: ' || 'Expected Error in CTOWIPWB.get_order_lines (stmt: '||l_stmt_num||')' ,1);

1397:
1398:
1399: WHEN FND_API.G_EXC_ERROR THEN
1400: IF PG_DEBUG <> 0 THEN
1401: OE_DEBUG_PUB.add('get_order_lines: ' || 'Expected Error in CTOWIPWB.get_order_lines (stmt: '||l_stmt_num||')' ,1);
1402: END IF;
1403: unlock_line_id (p_line_id); -- bugfix 3136206
1404: return 1; -- should not error out in case of excpected error
1405:

Line 1408: OE_DEBUG_PUB.add('get_order_lines: ' || 'Unxpected Error in CTOWIPWB.get_order_lines (stmt: '||l_stmt_num||')' ,1);

1404: return 1; -- should not error out in case of excpected error
1405:
1406: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1407: IF PG_DEBUG <> 0 THEN
1408: OE_DEBUG_PUB.add('get_order_lines: ' || 'Unxpected Error in CTOWIPWB.get_order_lines (stmt: '||l_stmt_num||')' ,1);
1409: END IF;
1410: unlock_line_id (p_line_id); -- bugfix 3136206
1411: return 0;
1412:

Line 1415: OE_DEBUG_PUB.add('get_order_lines: ' || 'CTOWIPWB.get_order_lines :: No Rows Found.',1);

1411: return 0;
1412:
1413: WHEN NO_DATA_FOUND THEN
1414: IF PG_DEBUG <> 0 THEN
1415: OE_DEBUG_PUB.add('get_order_lines: ' || 'CTOWIPWB.get_order_lines :: No Rows Found.',1);
1416: END IF;
1417: -- bugfix 2420381: commented out the re-initialization of x_orders_loaded.
1418: -- x_orders_loaded := 0;
1419: unlock_line_id (p_line_id); -- bugfix 3136206

Line 1425: OE_DEBUG_PUB.add('get_order_lines: ' || 'Error in CTOWIPWB.get_order_lines (stmt: '||l_stmt_num||'):'||

1421:
1422:
1423: WHEN OTHERS THEN
1424: IF PG_DEBUG <> 0 THEN
1425: OE_DEBUG_PUB.add('get_order_lines: ' || 'Error in CTOWIPWB.get_order_lines (stmt: '||l_stmt_num||'):'||
1426: substrb(sqlerrm, 1, 150),1);
1427: END IF;
1428: unlock_line_id (p_line_id); -- bugfix 3136206
1429: return 0;

Line 1553: oe_debug_pub.add('reserve_wo_to_so: ' || 'Beginning Reservation Loop.',1);

1549: and msi.organization_id = oel.ship_from_org_id;
1550:
1551: BEGIN
1552: IF PG_DEBUG <> 0 THEN
1553: oe_debug_pub.add('reserve_wo_to_so: ' || 'Beginning Reservation Loop.',1);
1554: END IF;
1555: lSourceCode := fnd_profile.value('ONT_SOURCE_CODE');
1556: IF PG_DEBUG <> 0 THEN
1557: oe_debug_pub.add('reserve_wo_to_so: ' || 'lSourceCode: ' ||lSourceCode,2);

Line 1557: oe_debug_pub.add('reserve_wo_to_so: ' || 'lSourceCode: ' ||lSourceCode,2);

1553: oe_debug_pub.add('reserve_wo_to_so: ' || 'Beginning Reservation Loop.',1);
1554: END IF;
1555: lSourceCode := fnd_profile.value('ONT_SOURCE_CODE');
1556: IF PG_DEBUG <> 0 THEN
1557: oe_debug_pub.add('reserve_wo_to_so: ' || 'lSourceCode: ' ||lSourceCode,2);
1558: END IF;
1559:
1560: -- begin bugfix 3014000
1561:

Line 1566: oe_debug_pub.add('reserve_wo_to_so: '|| 'MO:operating Unit :' || lOperUnit, 2);

1562: -- Change for MOAC
1563: lOperUnit := nvl(MO_GLOBAL.get_current_org_id,-99);
1564: -- End of MOAC change
1565: IF PG_DEBUG <> 0 THEN
1566: oe_debug_pub.add('reserve_wo_to_so: '|| 'MO:operating Unit :' || lOperUnit, 2);
1567: END IF;
1568:
1569: -- end bugfix 3014000
1570:

Line 1587: oe_debug_pub.add('reserve_wo_to_so: '|| 'Setting the Org Context again to '||WorkOrder_Rec.org_id ||

1583: -- Caveat: Single org customers should NOT set the MO:Operating unit for the resp
1584: -- which is used to run autocreate FAS. If so, OM will defer the activity.
1585:
1586: IF PG_DEBUG <> 0 THEN
1587: oe_debug_pub.add('reserve_wo_to_so: '|| 'Setting the Org Context again to '||WorkOrder_Rec.org_id ||
1588: ' by calling OE_Order_Context_GRP.Set_Created_By_Context.', 5);
1589: END IF;
1590:
1591: OE_Order_Context_GRP.Set_Created_By_Context (

Line 1602: oe_debug_pub.add('reserve_wo_to_so: '|| 'Expected Error in Set_Created_By_Context.');

1598: ,x_msg_count => l_x_msg_count
1599: ,x_msg_data => l_x_msg_data );
1600:
1601: if l_x_return_status = FND_API.G_RET_STS_ERROR THEN
1602: oe_debug_pub.add('reserve_wo_to_so: '|| 'Expected Error in Set_Created_By_Context.');
1603: raise FND_API.G_EXC_ERROR;
1604:
1605: elsif l_x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1606: oe_debug_pub.add('reserve_wo_to_so: '|| 'UnExpected Error in Set_Created_By_Context.');

Line 1606: oe_debug_pub.add('reserve_wo_to_so: '|| 'UnExpected Error in Set_Created_By_Context.');

1602: oe_debug_pub.add('reserve_wo_to_so: '|| 'Expected Error in Set_Created_By_Context.');
1603: raise FND_API.G_EXC_ERROR;
1604:
1605: elsif l_x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1606: oe_debug_pub.add('reserve_wo_to_so: '|| 'UnExpected Error in Set_Created_By_Context.');
1607: raise FND_API.G_EXC_UNEXPECTED_ERROR;
1608:
1609: end if;
1610:

Line 1613: oe_debug_pub.add('reserve_wo_to_so: '|| 'NOT Setting the Org Context since MO:Operating Unit = OEL.org_id.', 5);

1609: end if;
1610:
1611: else
1612: IF PG_DEBUG <> 0 THEN
1613: oe_debug_pub.add('reserve_wo_to_so: '|| 'NOT Setting the Org Context since MO:Operating Unit = OEL.org_id.', 5);
1614: END IF;
1615: end if;
1616:
1617: lOperUnit := WorkOrder_Rec.org_id; -- OE api will set the mo oper unit in cache.

Line 1623: oe_debug_pub.add('reserve_wo_to_so: ' || 'ss::in loop::qty::'||WorkOrder_Rec.start_quantity,2);

1619:
1620: -- end bugfix 3014000
1621:
1622: IF PG_DEBUG <> 0 THEN
1623: oe_debug_pub.add('reserve_wo_to_so: ' || 'ss::in loop::qty::'||WorkOrder_Rec.start_quantity,2);
1624: END IF;
1625:
1626: l_rec_reserve.f_header_id := WorkOrder_Rec.sales_order_id;
1627: l_rec_reserve.f_line_id := WorkOrder_Rec.line_id;

Line 1645: oe_debug_pub.add('reserve_wo_to_so: ' || 'Reserving Line ID ' ||

1641: If reservation is unsuccessful, purge discrete jobs created.
1642: +----------------------------------------------------------*/
1643:
1644: IF PG_DEBUG <> 0 THEN
1645: oe_debug_pub.add('reserve_wo_to_so: ' || 'Reserving Line ID ' ||
1646: to_char(WorkOrder_Rec.line_id) ||
1647: 'to WIP Entitiy ID ' ||
1648: to_char(WorkOrder_Rec.wip_entity_id),2);
1649: END IF;

Line 1661: oe_debug_pub.add('reserve_wo_to_so: ' || 'Reservation Result: ' || l_status,1);

1657: x_msg_txt => l_msg_txt,
1658: x_msg_name => l_msg_name );
1659:
1660: IF PG_DEBUG <> 0 THEN
1661: oe_debug_pub.add('reserve_wo_to_so: ' || 'Reservation Result: ' || l_status,1);
1662:
1663: oe_debug_pub.add('reserve_wo_to_so: ' || 'Reservation Msg: ' || l_msg_txt,1);
1664: END IF;
1665:

Line 1663: oe_debug_pub.add('reserve_wo_to_so: ' || 'Reservation Msg: ' || l_msg_txt,1);

1659:
1660: IF PG_DEBUG <> 0 THEN
1661: oe_debug_pub.add('reserve_wo_to_so: ' || 'Reservation Result: ' || l_status,1);
1662:
1663: oe_debug_pub.add('reserve_wo_to_so: ' || 'Reservation Msg: ' || l_msg_txt,1);
1664: END IF;
1665:
1666: if (l_status <> FND_API.G_RET_STS_SUCCESS) then
1667: /*---------------------------------------------------+

Line 1676: oe_debug_pub.add('reserve_wo_to_so: ' ||

1672: made the process too complicated. Instead, we will
1673: cancel the work order created.
1674: +---------------------------------------------------*/
1675: IF PG_DEBUG <> 0 THEN
1676: oe_debug_pub.add('reserve_wo_to_so: ' ||
1677: 'Reservation FAILED for line id ' ||
1678: to_char(WorkOrder_Rec.line_id) ||
1679: ' and WIP Entity ID: ' ||
1680: to_char(WorkOrder_Rec.wip_entity_id) ||

Line 1683: oe_debug_pub.add('reserve_wo_to_so: ' || 'Message Text = '||l_msg_txt,1);

1679: ' and WIP Entity ID: ' ||
1680: to_char(WorkOrder_Rec.wip_entity_id) ||
1681: '.',1);
1682:
1683: oe_debug_pub.add('reserve_wo_to_so: ' || 'Message Text = '||l_msg_txt,1);
1684: END IF;
1685:
1686: l_stmt_num := 100;
1687: update wip_discrete_jobs

Line 1705: oe_debug_pub.add('reserve_wo_to_so: ' ||

1701: If the order is placed on hold during AutoCreate FAS,
1702: WIP will put the corresponding work order on hold.
1703: +--------------------------------------------------*/
1704: IF PG_DEBUG <> 0 THEN
1705: oe_debug_pub.add('reserve_wo_to_so: ' ||
1706: 'Reservation Success for line id ' ||
1707: to_char(WorkOrder_Rec.line_id) ||
1708: ' and WIP Entity ID: ' ||
1709: to_char(WorkOrder_Rec.wip_entity_id) ||

Line 1734: oe_debug_pub.add('reserve_wo_to_so: ' || 'Return Status from respond to change order ' || l_status,1);

1730: x_msg_count => l_msg_count,
1731: x_msg_data => l_msg_txt);
1732:
1733: IF PG_DEBUG <> 0 THEN
1734: oe_debug_pub.add('reserve_wo_to_so: ' || 'Return Status from respond to change order ' || l_status,1);
1735:
1736: oe_debug_pub.add('reserve_wo_to_so: ' || 'Message Txt from respond to change order: ' || l_msg_txt,2);
1737: END IF;
1738:

Line 1736: oe_debug_pub.add('reserve_wo_to_so: ' || 'Message Txt from respond to change order: ' || l_msg_txt,2);

1732:
1733: IF PG_DEBUG <> 0 THEN
1734: oe_debug_pub.add('reserve_wo_to_so: ' || 'Return Status from respond to change order ' || l_status,1);
1735:
1736: oe_debug_pub.add('reserve_wo_to_so: ' || 'Message Txt from respond to change order: ' || l_msg_txt,2);
1737: END IF;
1738:
1739: if (l_status <> FND_API.G_RET_STS_SUCCESS) then
1740:

Line 1742: oe_debug_pub.add('reserve_wo_to_so: ' ||

1738:
1739: if (l_status <> FND_API.G_RET_STS_SUCCESS) then
1740:
1741: IF PG_DEBUG <> 0 THEN
1742: oe_debug_pub.add('reserve_wo_to_so: ' ||
1743: 'Deleting Reservation for ' ||
1744: 'line ID: ' ||
1745: to_char(WorkOrder_Rec.line_id) ||
1746: 'to WIP Entity ID ' ||

Line 1764: oe_debug_pub.add('reserve_wo_to_so: ' || 'Return Status from delete reservation: ' || l_status,1);

1760: , p_serial_number => l_dummy_sn
1761: );
1762:
1763: IF PG_DEBUG <> 0 THEN
1764: oe_debug_pub.add('reserve_wo_to_so: ' || 'Return Status from delete reservation: ' || l_status,1);
1765:
1766: oe_debug_pub.add('reserve_wo_to_so: ' || 'Msg Txt from delete reservation: ' || l_msg_txt,1);
1767: END IF;
1768:

Line 1766: oe_debug_pub.add('reserve_wo_to_so: ' || 'Msg Txt from delete reservation: ' || l_msg_txt,1);

1762:
1763: IF PG_DEBUG <> 0 THEN
1764: oe_debug_pub.add('reserve_wo_to_so: ' || 'Return Status from delete reservation: ' || l_status,1);
1765:
1766: oe_debug_pub.add('reserve_wo_to_so: ' || 'Msg Txt from delete reservation: ' || l_msg_txt,1);
1767: END IF;
1768:
1769: l_stmt_num := 130;
1770: update wip_discrete_jobs

Line 1791: oe_debug_pub.add('reserve_wo_to_so: ' ||

1787: when NO_DATA_FOUND then
1788:
1789: if (l_stmt_num <> 115) then
1790: IF PG_DEBUG <> 0 THEN
1791: oe_debug_pub.add('reserve_wo_to_so: ' ||
1792: 'No data found in feedback loop. '
1793: || 'Statement: ' || to_char(l_stmt_num)
1794: || substrb(sqlerrm, 1, 150),1);
1795: END IF;

Line 1813: oe_debug_pub.add('Warning: No reservations made. Check for errors in WJSI');

1809: end loop; /* loop through wip job schedules for order line */
1810:
1811: -- begin bugfix 3136206
1812: if resv_counter = 0 then
1813: oe_debug_pub.add('Warning: No reservations made. Check for errors in WJSI');
1814: -- unlock the lines. Update the program_id to null.
1815: update oe_order_lines_all
1816: set program_id = null
1817: where program_id = -99

Line 1825: oe_debug_pub.add('reserve_wo_to_so: ' || 'End of Reservation',1);

1821: end if;
1822: -- end bugfix 3136206
1823:
1824: IF PG_DEBUG <> 0 THEN
1825: oe_debug_pub.add('reserve_wo_to_so: ' || 'End of Reservation',1);
1826: END IF;
1827:
1828: return 1;
1829:

Line 1834: OE_DEBUG_PUB.add('reserve_wo_to_so: '|| 'Expected Error in CTOWIPWB.reserve_wo_to_so (stmt: '||l_stmt_num||')' );

1830: EXCEPTION
1831:
1832: --begin bugfix 3014000
1833: WHEN FND_API.G_EXC_ERROR THEN
1834: OE_DEBUG_PUB.add('reserve_wo_to_so: '|| 'Expected Error in CTOWIPWB.reserve_wo_to_so (stmt: '||l_stmt_num||')' );
1835: unlock_line_id (lLineId); -- bugfix 3136206
1836: return 1; -- should not error out in case of excpected error
1837:
1838: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 1839: OE_DEBUG_PUB.add('reserve_wo_to_so: '|| 'Unxpected Error in CTOWIPWB.reserve_wo_to_so (stmt: '||l_stmt_num||')' );

1835: unlock_line_id (lLineId); -- bugfix 3136206
1836: return 1; -- should not error out in case of excpected error
1837:
1838: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1839: OE_DEBUG_PUB.add('reserve_wo_to_so: '|| 'Unxpected Error in CTOWIPWB.reserve_wo_to_so (stmt: '||l_stmt_num||')' );
1840: unlock_line_id (lLineId); -- bugfix 3136206
1841: return 0;
1842:
1843: -- end bugfix 3014000

Line 1846: OE_DEBUG_PUB.ADD('reserve_wo_to_so: ' || 'Error in CTOWIPWB.reserve_wo_to_so: '

1842:
1843: -- end bugfix 3014000
1844:
1845: when NO_DATA_FOUND then
1846: OE_DEBUG_PUB.ADD('reserve_wo_to_so: ' || 'Error in CTOWIPWB.reserve_wo_to_so: '
1847: || 'Statement: ' || to_char(l_stmt_num)
1848: || substrb(sqlerrm, 1, 150),1);
1849: unlock_line_id (lLineId); -- bugfix 3136206
1850: return 0;

Line 1853: OE_DEBUG_PUB.add('reserve_wo_to_so: ' || 'Error in CTOWIPWB.reserve_wo_to_so: '

1849: unlock_line_id (lLineId); -- bugfix 3136206
1850: return 0;
1851:
1852: when OTHERS then
1853: OE_DEBUG_PUB.add('reserve_wo_to_so: ' || 'Error in CTOWIPWB.reserve_wo_to_so: '
1854: || substrb(sqlerrm, 1, 150),1);
1855:
1856: unlock_line_id (lLineId); -- bugfix 3136206
1857: return 0;

Line 1949: --oe_debug_pub.add('Entering Get_Reserved_Qty', 6);

1945: lStmtNum number := 0;
1946:
1947: BEGIN
1948:
1949: --oe_debug_pub.add('Entering Get_Reserved_Qty', 6);
1950:
1951: lStmtNum := 10;
1952: OPEN c_mtl_rsv_qty;
1953: FETCH c_mtl_rsv_qty INTO l_mtl_rsv_qty;

Line 1995: oe_debug_pub.add('Get_Reserved_Qty: ' || 'Others exception in Get_Reserved_Qty::'||to_char(lStmtNum)||'::'||sqlerrm, 1);

1991:
1992: EXCEPTION
1993: WHEN others THEN
1994: IF PG_DEBUG <> 0 THEN
1995: oe_debug_pub.add('Get_Reserved_Qty: ' || 'Others exception in Get_Reserved_Qty::'||to_char(lStmtNum)||'::'||sqlerrm, 1);
1996: END IF;
1997: unlock_line_id (pLineId); -- bugfix 3136206
1998: return(0);
1999:

Line 2062: oe_debug_pub.add('Get_NotInv_Qty: ' || 'Others exception in Get_NotInv_Qty::'||sqlerrm, 1);

2058:
2059: EXCEPTION
2060: when OTHERS then
2061: IF PG_DEBUG <> 0 THEN
2062: oe_debug_pub.add('Get_NotInv_Qty: ' || 'Others exception in Get_NotInv_Qty::'||sqlerrm, 1);
2063: END IF;
2064: unlock_line_id (pLineId); -- bugfix 3136206
2065: return(0);
2066: END Get_NotInv_Qty;