DBA Data[Home] [Help]

APPS.OE_HOLDS_PVT dependencies on OE_DEBUG_PUB

Line 94: oe_debug_pub.add('renga: hold not authorized - ');

90:
91: /* ============================= */
92: /* IR ISO Change Management Ends */
93:
94: oe_debug_pub.add('renga: hold not authorized - ');
95: l_authorized_or_not := 'N';
96:
97: END IF;
98:

Line 507: Oe_debug_pub.ADD('Activity name not found!!');

503: FROM oe_hold_definitions
504: WHERE hold_id = p_hold_id;
505: EXCEPTION
506: WHEN NO_DATA_FOUND THEN
507: Oe_debug_pub.ADD('Activity name not found!!');
508: WHEN OTHERS THEN
509: Oe_debug_pub.ADD(SQLERRM);
510: END;
511:

Line 509: Oe_debug_pub.ADD(SQLERRM);

505: EXCEPTION
506: WHEN NO_DATA_FOUND THEN
507: Oe_debug_pub.ADD('Activity name not found!!');
508: WHEN OTHERS THEN
509: Oe_debug_pub.ADD(SQLERRM);
510: END;
511:
512: IF l_hold_activity IS NULL THEN
513: RETURN; -- No further processing is needed.

Line 515: Oe_debug_pub.ADD('Hold Activity name : ' || l_hold_activity);

511:
512: IF l_hold_activity IS NULL THEN
513: RETURN; -- No further processing is needed.
514: ELSE
515: Oe_debug_pub.ADD('Hold Activity name : ' || l_hold_activity);
516: END IF;
517: -- End : 8284926
518:
519: /*

Line 549: Oe_debug_pub.ADD('Normal hold release.');

545: AND NVL(hd.apply_to_order_and_line_flag,'N') = 'Y';
546:
547: EXCEPTION
548: WHEN NO_DATA_FOUND THEN
549: Oe_debug_pub.ADD('Normal hold release.');
550: WHEN OTHERS THEN
551: Oe_debug_pub.ADD(SQLERRM);
552: -- RAISE;
553: END;

Line 551: Oe_debug_pub.ADD(SQLERRM);

547: EXCEPTION
548: WHEN NO_DATA_FOUND THEN
549: Oe_debug_pub.ADD('Normal hold release.');
550: WHEN OTHERS THEN
551: Oe_debug_pub.ADD(SQLERRM);
552: -- RAISE;
553: END;
554:
555: IF l_release_children = 'Y' THEN

Line 557: Oe_debug_pub.ADD('Handling apply_to_order_and_line_flag..');

553: END;
554:
555: IF l_release_children = 'Y' THEN
556:
557: Oe_debug_pub.ADD('Handling apply_to_order_and_line_flag..');
558:
559: wf_engine.threshold := -1;
560:
561: FOR c_rec IN c_child_lines(p_order_tbl(1).header_id, l_hold_activity)

Line 563: Oe_debug_pub.ADD('Processing OEOL : ' || c_rec.item_key);

559: wf_engine.threshold := -1;
560:
561: FOR c_rec IN c_child_lines(p_order_tbl(1).header_id, l_hold_activity)
562: LOOP
563: Oe_debug_pub.ADD('Processing OEOL : ' || c_rec.item_key);
564: wf_engine.CompleteActivity('OEOL', c_rec.item_key, c_rec.full_activity_name, l_result);
565: END LOOP;
566:
567: wf_engine.threshold := l_rel_threshold;

Line 583: Oe_debug_pub.ADD('p_num_of_records : ' || p_num_of_records);

579: IF p_num_of_records > 1 THEN
580: wf_engine.threshold := -1 ;
581: END IF;
582:
583: Oe_debug_pub.ADD('p_num_of_records : ' || p_num_of_records);
584:
585: FOR i in p_order_tbl.FIRST..p_order_tbl.LAST
586: LOOP
587: BEGIN

Line 659: Oe_debug_pub.ADD('Processing ' || l_item_type || ':' || NVL(p_order_tbl(i).line_id,p_order_tbl(i).header_id));

655: AND wias_to.item_key = wias_from.item_key;
656:
657: END IF ; --16626753
658:
659: Oe_debug_pub.ADD('Processing ' || l_item_type || ':' || NVL(p_order_tbl(i).line_id,p_order_tbl(i).header_id));
660:
661: EXCEPTION
662: WHEN OTHERS THEN
663: Oe_debug_pub.ADD('Could not get activity ID for header/line : ' || To_Char(NVL(p_order_tbl(i).line_id,p_order_tbl(i).header_id)));

Line 663: Oe_debug_pub.ADD('Could not get activity ID for header/line : ' || To_Char(NVL(p_order_tbl(i).line_id,p_order_tbl(i).header_id)));

659: Oe_debug_pub.ADD('Processing ' || l_item_type || ':' || NVL(p_order_tbl(i).line_id,p_order_tbl(i).header_id));
660:
661: EXCEPTION
662: WHEN OTHERS THEN
663: Oe_debug_pub.ADD('Could not get activity ID for header/line : ' || To_Char(NVL(p_order_tbl(i).line_id,p_order_tbl(i).header_id)));
664: l_found := 'F';
665: -- Do not raise an exception here as the query might fail because
666: -- entity being processed is not at this workflow stage (not reached
667: -- yet/ crossed already). This is a valid scenario. say, line hasn't

Line 713: Oe_debug_pub.ADD('Could not get activity ID for header (history) : ' || To_Char(NVL(p_order_tbl(i).line_id,p_order_tbl(i).header_id)));

709: AND wias_to.item_key = wias_from.item_key;
710:
711: EXCEPTION
712: WHEN OTHERS THEN
713: Oe_debug_pub.ADD('Could not get activity ID for header (history) : ' || To_Char(NVL(p_order_tbl(i).line_id,p_order_tbl(i).header_id)));
714: l_found := 'F';
715: END;
716: END IF;
717:

Line 736: Oe_debug_pub.ADD('Failed from progress order.');

732: );
733:
734: EXCEPTION
735: WHEN OTHERS THEN
736: Oe_debug_pub.ADD('Failed from progress order.');
737: wf_engine.threshold := l_rel_threshold;
738: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
739: Oe_msg_pub.Count_And_Get
740: ( p_count => x_msg_count

Line 790: Oe_debug_pub.ADD('In overloaded progress_order!!');

786: AND oh.released_flag = 'Y';
787:
788: BEGIN
789:
790: Oe_debug_pub.ADD('In overloaded progress_order!!');
791:
792: l_rel_threshold := wf_engine.threshold;
793:
794: -- Begin : 8284926

Line 804: Oe_debug_pub.ADD('Activity name not found!!');

800: WHERE hd.hold_id = hs.hold_id
801: AND hs.hold_source_id = p_hold_source_id;
802: EXCEPTION
803: WHEN NO_DATA_FOUND THEN
804: Oe_debug_pub.ADD('Activity name not found!!');
805: WHEN OTHERS THEN
806: Oe_debug_pub.ADD(SQLERRM);
807: END;
808:

Line 806: Oe_debug_pub.ADD(SQLERRM);

802: EXCEPTION
803: WHEN NO_DATA_FOUND THEN
804: Oe_debug_pub.ADD('Activity name not found!!');
805: WHEN OTHERS THEN
806: Oe_debug_pub.ADD(SQLERRM);
807: END;
808:
809: IF l_hold_activity IS NULL THEN
810: RETURN; -- No further processing is needed.

Line 821: Oe_debug_pub.ADD('Source not found.!!');

817: FROM oe_hold_sources
818: WHERE hold_source_id = p_hold_source_id;
819: EXCEPTION
820: WHEN OTHERS THEN
821: Oe_debug_pub.ADD('Source not found.!!');
822: -- RAISE;
823: END;
824:
825: IF NVL(l_hold_entity_code,'INVALID') <> 'O' THEN

Line 870: Oe_debug_pub.ADD('Processing ' || l_item_type || ':' || x.entity_id);

866: AND wias_to.activity_status = 'NOTIFIED'
867: AND wias_to.item_type = wias_from.item_type
868: AND wias_to.item_key = wias_from.item_key;
869:
870: Oe_debug_pub.ADD('Processing ' || l_item_type || ':' || x.entity_id);
871: EXCEPTION
872: WHEN OTHERS THEN
873: Oe_debug_pub.ADD('Could not get activity ID for header/line : ' || x.entity_id);
874: l_found := 'F';

Line 873: Oe_debug_pub.ADD('Could not get activity ID for header/line : ' || x.entity_id);

869:
870: Oe_debug_pub.ADD('Processing ' || l_item_type || ':' || x.entity_id);
871: EXCEPTION
872: WHEN OTHERS THEN
873: Oe_debug_pub.ADD('Could not get activity ID for header/line : ' || x.entity_id);
874: l_found := 'F';
875: -- Do not raise an exception here as the query might fail because
876: -- entity being processed is not at this workflow stage (not reached
877: -- yet/ crossed already). This is a valid scenario. say, line hasn't

Line 923: Oe_debug_pub.ADD('Could not get activity ID for header (history) : ' || x.entity_id);

919: AND wias_to.item_key = wias_from.item_key;
920:
921: EXCEPTION
922: WHEN OTHERS THEN
923: Oe_debug_pub.ADD('Could not get activity ID for header (history) : ' || x.entity_id);
924: l_found := 'F';
925: END;
926: END IF;
927:

Line 947: OE_debug_pub.ADD('Failed from progress order');

943: );
944:
945: EXCEPTION
946: WHEN OTHERS THEN
947: OE_debug_pub.ADD('Failed from progress order');
948: wf_engine.threshold := l_rel_threshold;
949: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
950: Oe_msg_pub.Count_And_Get
951: ( p_count => x_msg_count

Line 975: OE_Debug_PUB.Add('Hold Check_Authorization Action' ||

971: l_auth_exists Varchar2(1) := 'N';
972: l_authorized_or_not varchar2(1) := 'Y';
973: l_dummy VARCHAR2(1);
974: BEGIN
975: OE_Debug_PUB.Add('Hold Check_Authorization Action' ||
976: p_authorized_action_code,1);
977: OE_Debug_PUB.Add('Hold_id' || to_char(p_hold_id),1);
978: OE_Debug_PUB.Add('Responsibility_Id' || to_char(p_responsibility_id),1);
979: OE_Debug_PUB.Add('Application_Id' || to_char(p_application_id),1);

Line 977: OE_Debug_PUB.Add('Hold_id' || to_char(p_hold_id),1);

973: l_dummy VARCHAR2(1);
974: BEGIN
975: OE_Debug_PUB.Add('Hold Check_Authorization Action' ||
976: p_authorized_action_code,1);
977: OE_Debug_PUB.Add('Hold_id' || to_char(p_hold_id),1);
978: OE_Debug_PUB.Add('Responsibility_Id' || to_char(p_responsibility_id),1);
979: OE_Debug_PUB.Add('Application_Id' || to_char(p_application_id),1);
980: begin
981: select 'Y'

Line 978: OE_Debug_PUB.Add('Responsibility_Id' || to_char(p_responsibility_id),1);

974: BEGIN
975: OE_Debug_PUB.Add('Hold Check_Authorization Action' ||
976: p_authorized_action_code,1);
977: OE_Debug_PUB.Add('Hold_id' || to_char(p_hold_id),1);
978: OE_Debug_PUB.Add('Responsibility_Id' || to_char(p_responsibility_id),1);
979: OE_Debug_PUB.Add('Application_Id' || to_char(p_application_id),1);
980: begin
981: select 'Y'
982: Into l_auth_exists

Line 979: OE_Debug_PUB.Add('Application_Id' || to_char(p_application_id),1);

975: OE_Debug_PUB.Add('Hold Check_Authorization Action' ||
976: p_authorized_action_code,1);
977: OE_Debug_PUB.Add('Hold_id' || to_char(p_hold_id),1);
978: OE_Debug_PUB.Add('Responsibility_Id' || to_char(p_responsibility_id),1);
979: OE_Debug_PUB.Add('Application_Id' || to_char(p_application_id),1);
980: begin
981: select 'Y'
982: Into l_auth_exists
983: from oe_hold_authorizations

Line 989: OE_Debug_PUB.Add('No Authorization exists, Authorized=Yes',1);

985: and authorized_action_code = p_authorized_action_code
986: and rownum = 1;
987: Exception
988: When NO_DATA_FOUND Then
989: OE_Debug_PUB.Add('No Authorization exists, Authorized=Yes',1);
990: l_authorized_or_not := 'Y';
991: l_auth_exists := 'N';
992: when others then
993: null;

Line 1010: OE_Debug_PUB.Add('Not Authorized', 1);

1006: and hold_id = p_hold_id
1007: and rownum = 1;
1008: exception
1009: when no_data_found then
1010: OE_Debug_PUB.Add('Not Authorized', 1);
1011: l_authorized_or_not := 'N';
1012: when others then
1013: null;
1014: end;

Line 1058: OE_DEBUG_PUB.ADD('Entering InsertTable_OOH_Header');

1054: l_wf_sqlmt VARCHAR2(3000);
1055:
1056: BEGIN
1057:
1058: OE_DEBUG_PUB.ADD('Entering InsertTable_OOH_Header');
1059:
1060: IF p_header_id IS NOT NULL THEN
1061: l_sqlmt := 'INSERT INTO OE_ORDER_HOLDS_ALL
1062: ( ORDER_HOLD_ID

Line 1226: OE_DEBUG_PUB.ADD('l_sql_rowcount - '||l_sql_rowcount);

1222:
1223:
1224: l_sql_rowcount := sql%rowcount;
1225:
1226: OE_DEBUG_PUB.ADD('l_sql_rowcount - '||l_sql_rowcount);
1227:
1228: IF l_sql_rowcount = 0 THEN
1229:
1230: SELECT meaning

Line 1241: OE_DEBUG_PUB.ADD(' Hold Not applied for All requested records');

1237:
1238: FND_MESSAGE.SET_NAME('ONT', 'OE_NO_HOLD_ALL_LINES');
1239: FND_MESSAGE.SET_TOKEN('WF_ACT', l_user_activity_name);
1240: OE_MSG_PUB.ADD;
1241: OE_DEBUG_PUB.ADD(' Hold Not applied for All requested records');
1242: RAISE FND_API.G_EXC_ERROR;
1243:
1244: ELSIF l_sql_rowcount > 0 THEN
1245:

Line 1264: OE_DEBUG_PUB.ADD('l_parent_count - '||l_parent_count);

1260: EXECUTE IMMEDIATE l_wf_sqlmt INTO l_parent_count;
1261:
1262: /* Note: The above query is used based on WHERE clause of the l_sqlmt but without any query on Workflow or Shipping product tables. */
1263:
1264: OE_DEBUG_PUB.ADD('l_parent_count - '||l_parent_count);
1265:
1266: IF l_sql_rowcount < (l_parent_count+l_sql_rowcount) THEN
1267:
1268: SELECT meaning

Line 1279: OE_DEBUG_PUB.ADD(' Hold Not applied for FEW of the requested records');

1275:
1276: FND_MESSAGE.SET_NAME('ONT', 'OE_NO_HOLD_FEW_LINES');
1277: FND_MESSAGE.SET_TOKEN('WF_ACT', l_user_activity_name);
1278: OE_MSG_PUB.ADD;
1279: OE_DEBUG_PUB.ADD(' Hold Not applied for FEW of the requested records');
1280: END IF;
1281: END IF;
1282: END IF;
1283: END IF;

Line 1284: OE_DEBUG_PUB.ADD('Exiting InsertTable_OOH_Header Successfully');

1280: END IF;
1281: END IF;
1282: END IF;
1283: END IF;
1284: OE_DEBUG_PUB.ADD('Exiting InsertTable_OOH_Header Successfully');
1285: EXCEPTION
1286: WHEN OTHERS THEN
1287: OE_DEBUG_PUB.ADD('Exiting InsertTable_OOH_Header with Error:'||SQLCODE);
1288: END InsertTable_OOH_Header;

Line 1287: OE_DEBUG_PUB.ADD('Exiting InsertTable_OOH_Header with Error:'||SQLCODE);

1283: END IF;
1284: OE_DEBUG_PUB.ADD('Exiting InsertTable_OOH_Header Successfully');
1285: EXCEPTION
1286: WHEN OTHERS THEN
1287: OE_DEBUG_PUB.ADD('Exiting InsertTable_OOH_Header with Error:'||SQLCODE);
1288: END InsertTable_OOH_Header;
1289: --ER#7479609 end
1290:
1291:

Line 1328: OE_DEBUG_PUB.ADD('Entering InsertTable_OOH_Line');

1324: l_sqlmt VARCHAR2(3000);
1325: l_wf_sqlmt VARCHAR2(3000);
1326: BEGIN
1327:
1328: OE_DEBUG_PUB.ADD('Entering InsertTable_OOH_Line');
1329:
1330: IF p_line_id IS NOT NULL THEN
1331:
1332: l_sqlmt := 'INSERT INTO OE_ORDER_HOLDS_ALL

Line 1503: OE_DEBUG_PUB.ADD('Before Executing SQL:'||l_sqlmt);

1499: l_sqlmt :=l_sqlmt||' '||p_hold_entity_where_clause;
1500: END IF;
1501:
1502:
1503: OE_DEBUG_PUB.ADD('Before Executing SQL:'||l_sqlmt);
1504: IF p_item_type is null AND p_activity_name is null THEN
1505:
1506: EXECUTE IMMEDIATE
1507: l_sqlmt USING l_user_id,

Line 1512: OE_DEBUG_PUB.ADD('After Executing SQL for non-WF Hold');

1508: l_user_id,
1509: p_hold_source_id,
1510: p_org_id ,
1511: p_hold_source_id;
1512: OE_DEBUG_PUB.ADD('After Executing SQL for non-WF Hold');
1513: ELSE
1514:
1515: EXECUTE IMMEDIATE
1516: l_sqlmt USING l_user_id,

Line 1541: OE_DEBUG_PUB.ADD(' Hold Not applied for All requested records');

1537:
1538: FND_MESSAGE.SET_NAME('ONT', 'OE_NO_HOLD_ALL_LINES');
1539: FND_MESSAGE.SET_TOKEN('WF_ACT',l_user_activity_name);
1540: OE_MSG_PUB.ADD;
1541: OE_DEBUG_PUB.ADD(' Hold Not applied for All requested records');
1542: RAISE FND_API.G_EXC_ERROR;
1543:
1544: ELSIF l_sql_rowcount > 0 THEN
1545: l_wf_sqlmt := 'SELECT count(*)

Line 1563: OE_DEBUG_PUB.ADD('l_parent_count/sql_count'||l_parent_count||sql%rowcount);

1559: END IF;
1560:
1561: EXECUTE IMMEDIATE l_wf_sqlmt INTO l_parent_count;
1562:
1563: OE_DEBUG_PUB.ADD('l_parent_count/sql_count'||l_parent_count||sql%rowcount);
1564: /* Note: The above query is used based on WHERE clause of thel_sqlmt but without any query on Workflow or Shipping product tables. */
1565:
1566: IF l_sql_rowcount < (l_parent_count+l_sql_rowcount) THEN
1567:

Line 1579: OE_DEBUG_PUB.ADD(' Hold Not applied for FEW of the requested records');

1575:
1576: FND_MESSAGE.SET_NAME('ONT', 'OE_NO_HOLD_FEW_LINES');
1577: FND_MESSAGE.SET_TOKEN('WF_ACT',l_user_activity_name);
1578: OE_MSG_PUB.ADD;
1579: OE_DEBUG_PUB.ADD(' Hold Not applied for FEW of the requested records');
1580: END IF;
1581: END IF;
1582: END IF;
1583: END IF;

Line 1585: OE_DEBUG_PUB.ADD('Exiting InsertTable_OOH_Line Successfully');

1581: END IF;
1582: END IF;
1583: END IF;
1584:
1585: OE_DEBUG_PUB.ADD('Exiting InsertTable_OOH_Line Successfully');
1586: EXCEPTION
1587: WHEN OTHERS THEN
1588: OE_DEBUG_PUB.ADD('Exiting InsertTable_OOH_Line with Error:'||SQLCODE);
1589: END InsertTable_OOH_Line;

Line 1588: OE_DEBUG_PUB.ADD('Exiting InsertTable_OOH_Line with Error:'||SQLCODE);

1584:
1585: OE_DEBUG_PUB.ADD('Exiting InsertTable_OOH_Line Successfully');
1586: EXCEPTION
1587: WHEN OTHERS THEN
1588: OE_DEBUG_PUB.ADD('Exiting InsertTable_OOH_Line with Error:'||SQLCODE);
1589: END InsertTable_OOH_Line;
1590: --ER#7479609 end
1591:
1592: --ER#7479609 start

Line 1621: OE_DEBUG_PUB.ADD('Entering PaymentType_Hold');

1617: l_eligible_record_tab eligible_record_tab;
1618:
1619: BEGIN
1620:
1621: OE_DEBUG_PUB.ADD('Entering PaymentType_Hold');
1622:
1623: OE_DEBUG_PUB.ADD('Header_id :'||p_hold_source_rec.header_id);
1624: OE_DEBUG_PUB.ADD('Line_id :'||p_hold_source_rec.line_id);
1625: x_is_hold_applied := FALSE; --8221671

Line 1623: OE_DEBUG_PUB.ADD('Header_id :'||p_hold_source_rec.header_id);

1619: BEGIN
1620:
1621: OE_DEBUG_PUB.ADD('Entering PaymentType_Hold');
1622:
1623: OE_DEBUG_PUB.ADD('Header_id :'||p_hold_source_rec.header_id);
1624: OE_DEBUG_PUB.ADD('Line_id :'||p_hold_source_rec.line_id);
1625: x_is_hold_applied := FALSE; --8221671
1626:
1627: IF p_item_type = 'OEOL' or p_item_type IS NULL THEN

Line 1624: OE_DEBUG_PUB.ADD('Line_id :'||p_hold_source_rec.line_id);

1620:
1621: OE_DEBUG_PUB.ADD('Entering PaymentType_Hold');
1622:
1623: OE_DEBUG_PUB.ADD('Header_id :'||p_hold_source_rec.header_id);
1624: OE_DEBUG_PUB.ADD('Line_id :'||p_hold_source_rec.line_id);
1625: x_is_hold_applied := FALSE; --8221671
1626:
1627: IF p_item_type = 'OEOL' or p_item_type IS NULL THEN
1628: oe_debug_pub.add('Line Level Processing Starts');

Line 1628: oe_debug_pub.add('Line Level Processing Starts');

1624: OE_DEBUG_PUB.ADD('Line_id :'||p_hold_source_rec.line_id);
1625: x_is_hold_applied := FALSE; --8221671
1626:
1627: IF p_item_type = 'OEOL' or p_item_type IS NULL THEN
1628: oe_debug_pub.add('Line Level Processing Starts');
1629: l_eligible_record_tab.delete;
1630:
1631: IF p_hold_source_rec.hold_entity_code = 'P' and p_hold_source_rec.hold_entity_code2 IS NULL THEN
1632:

Line 1715: oe_debug_pub.add('Calling InsertTable_OOH_Line for P for line_id:'||l_eligible_record_tab(i));

1711:
1712:
1713: FOR i in 1 .. l_eligible_record_tab.count LOOP
1714:
1715: oe_debug_pub.add('Calling InsertTable_OOH_Line for P for line_id:'||l_eligible_record_tab(i));
1716: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
1717: ,p_line_id => l_eligible_record_tab(i)
1718: ,p_org_id => p_org_id
1719: ,p_hold_entity_where_clause => NULL

Line 1725: oe_debug_pub.add('After Calling InsertTable_OOH_Line for P');

1721: ,p_activity_name => p_activity_name
1722: ,p_activity_status => p_activity_status
1723: ,p_additional_where_clause => p_additional_where_clause
1724: ,x_is_hold_applied => x_is_hold_applied);
1725: oe_debug_pub.add('After Calling InsertTable_OOH_Line for P');
1726:
1727: END LOOP;
1728: END IF;
1729: IF p_item_type = 'OEOH' or p_item_type IS NULL THEN

Line 1730: oe_debug_pub.add('Header Level Processing Starts');

1726:
1727: END LOOP;
1728: END IF;
1729: IF p_item_type = 'OEOH' or p_item_type IS NULL THEN
1730: oe_debug_pub.add('Header Level Processing Starts');
1731:
1732: l_eligible_record_tab.delete;
1733:
1734: IF p_hold_source_rec.hold_entity_code = 'P' and p_hold_source_rec.hold_entity_code2 IS NULL THEN

Line 1817: oe_debug_pub.add('Calling InsertTable_OOH_Header for P for header_id:'||l_eligible_record_tab(i));

1813:
1814:
1815: FOR i in 1 .. l_eligible_record_tab.count LOOP
1816:
1817: oe_debug_pub.add('Calling InsertTable_OOH_Header for P for header_id:'||l_eligible_record_tab(i));
1818: InsertTable_OOH_Header (p_hold_source_id => p_hold_source_rec.hold_source_id
1819: ,p_header_id =>l_eligible_record_tab(i)
1820: ,p_org_id => p_org_id
1821: ,p_hold_entity_where_clause => NULL

Line 1828: oe_debug_pub.add('After Calling InsertTable_OOH_Header for P');

1824: ,p_activity_status => p_activity_status
1825: ,p_additional_where_clause => p_additional_where_clause
1826: ,x_is_hold_applied => x_is_hold_applied);
1827:
1828: oe_debug_pub.add('After Calling InsertTable_OOH_Header for P');
1829:
1830: END LOOP;
1831: END IF;
1832:

Line 1835: oe_debug_pub.add('Exiting PaymentType_Hold Successfully');

1831: END IF;
1832:
1833:
1834:
1835: oe_debug_pub.add('Exiting PaymentType_Hold Successfully');
1836:
1837: EXCEPTION
1838: WHEN OTHERS THEN
1839: OE_DEBUG_PUB.ADD('Exiting PaymentType_Hold with Error:'||SQLCODE);

Line 1839: OE_DEBUG_PUB.ADD('Exiting PaymentType_Hold with Error:'||SQLCODE);

1835: oe_debug_pub.add('Exiting PaymentType_Hold Successfully');
1836:
1837: EXCEPTION
1838: WHEN OTHERS THEN
1839: OE_DEBUG_PUB.ADD('Exiting PaymentType_Hold with Error:'||SQLCODE);
1840: END PaymentType_Hold;
1841: --ER#7479609 end
1842:
1843:

Line 1924: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

1920: l_order_hold_id OE_ORDER_HOLDS.ORDER_HOLD_ID%TYPE;
1921: l_hold_id OE_HOLD_DEFINITIONS.hold_id%type;
1922:
1923: l_hold_source_rec OE_HOLDS_PVT.hold_source_rec_type;
1924: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
1925: BEGIN
1926: x_return_status := FND_API.G_RET_STS_SUCCESS;
1927: l_user_id := OE_HOLDS_PVT.get_user_id;
1928: -- XX Also check for release reason code

Line 1938: OE_Debug_PUB.Add('Rleaseing Hold' || l_hold_id);

1934: l_hold_id,
1935: l_order_hold_id;
1936: exit when hold_source%NOTFOUND;
1937: -- If the Order was created as an Order Based Hold.
1938: OE_Debug_PUB.Add('Rleaseing Hold' || l_hold_id);
1939: if l_hold_entity_code = 'O' THEN
1940: --x_hold_source_id := l_hold_source_id;
1941: OE_Debug_PUB.Add('Rlsing Source for:'||to_char(p_order_rec.header_id),1);
1942: l_hold_source_rec.hold_source_id := l_hold_source_id;

Line 1941: OE_Debug_PUB.Add('Rlsing Source for:'||to_char(p_order_rec.header_id),1);

1937: -- If the Order was created as an Order Based Hold.
1938: OE_Debug_PUB.Add('Rleaseing Hold' || l_hold_id);
1939: if l_hold_entity_code = 'O' THEN
1940: --x_hold_source_id := l_hold_source_id;
1941: OE_Debug_PUB.Add('Rlsing Source for:'||to_char(p_order_rec.header_id),1);
1942: l_hold_source_rec.hold_source_id := l_hold_source_id;
1943: l_hold_source_rec.HOLD_ENTITY_CODE := 'O';
1944: l_hold_source_rec.HOLD_ENTITY_ID := p_order_rec.header_id;
1945: l_hold_source_rec.HOLD_ID := l_hold_id;

Line 1955: OE_Debug_PUB.Add('Releasing Orders from Hold',1);

1951: x_msg_data => x_msg_data );
1952: ELSE
1953: -- Releasing only orders from hold. Insert a record in the
1954: -- OE_HOLD_RELEASES with hold_source_id as null.
1955: OE_Debug_PUB.Add('Releasing Orders from Hold',1);
1956: --x_hold_source_id := '';
1957:
1958: SELECT OE_HOLD_RELEASES_S.NEXTVAL
1959: INTO x_hold_release_id

Line 2039: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Applying hold');

2035: END IF;
2036: -- XX Also check to see if its the last order from a non order based
2037: -- hold and release the hold source also. NO
2038: -- 16053361
2039: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Applying hold');
2040: If NVL (Fnd_Profile.Value('ONT_RAISE_STATUS_CHANGE_BUSINESS_EVENT'), 'N')='Y'
2041: THEN
2042: IF l_debug_level > 0 THEN
2043: oe_debug_pub.add( 'OE_HOLDS_PVT - Preparing paramters to pass to Integration event for Releasing hold');

Line 2043: oe_debug_pub.add( 'OE_HOLDS_PVT - Preparing paramters to pass to Integration event for Releasing hold');

2039: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Applying hold');
2040: If NVL (Fnd_Profile.Value('ONT_RAISE_STATUS_CHANGE_BUSINESS_EVENT'), 'N')='Y'
2041: THEN
2042: IF l_debug_level > 0 THEN
2043: oe_debug_pub.add( 'OE_HOLDS_PVT - Preparing paramters to pass to Integration event for Releasing hold');
2044: END IF;
2045: l_count := 1;
2046: l_nameVal_tbl(l_count).name := 'CHANGE_TYPE';
2047: l_nameVal_tbl(l_count).value := 'RELEASE';

Line 2063: oe_debug_pub.add('No data found!');

2059: WHERE ohld.order_hold_id = l_order_hold_id
2060: AND ohld.header_id = ooh.header_id;
2061: EXCEPTION
2062: WHEN OTHERS THEN
2063: oe_debug_pub.add('No data found!');
2064: END;
2065: if l_debug_level > 0 then
2066: oe_debug_pub.add('....header_id = ' || l_header_id);
2067: oe_debug_pub.add('....line_id = ' || l_line_id);

Line 2066: oe_debug_pub.add('....header_id = ' || l_header_id);

2062: WHEN OTHERS THEN
2063: oe_debug_pub.add('No data found!');
2064: END;
2065: if l_debug_level > 0 then
2066: oe_debug_pub.add('....header_id = ' || l_header_id);
2067: oe_debug_pub.add('....line_id = ' || l_line_id);
2068: end if;
2069: oe_order_util.raise_business_event( p_header_id => l_header_id,
2070: p_line_id => l_line_id,

Line 2067: oe_debug_pub.add('....line_id = ' || l_line_id);

2063: oe_debug_pub.add('No data found!');
2064: END;
2065: if l_debug_level > 0 then
2066: oe_debug_pub.add('....header_id = ' || l_header_id);
2067: oe_debug_pub.add('....line_id = ' || l_line_id);
2068: end if;
2069: oe_order_util.raise_business_event( p_header_id => l_header_id,
2070: p_line_id => l_line_id,
2071: p_event_name => 'oracle.apps.ont.hold.action',

Line 2074: oe_debug_pub.add( 'OE_HOLDS_PVT - Done with Raising Integration event for Releasing hold');

2070: p_line_id => l_line_id,
2071: p_event_name => 'oracle.apps.ont.hold.action',
2072: p_nameVal_tbl => l_nameVal_tbl);
2073: IF l_debug_level > 0 THEN
2074: oe_debug_pub.add( 'OE_HOLDS_PVT - Done with Raising Integration event for Releasing hold');
2075: END IF;
2076: END IF;
2077: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Applying hold');
2078: -- 16053361

Line 2077: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Applying hold');

2073: IF l_debug_level > 0 THEN
2074: oe_debug_pub.add( 'OE_HOLDS_PVT - Done with Raising Integration event for Releasing hold');
2075: END IF;
2076: END IF;
2077: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Applying hold');
2078: -- 16053361
2079:
2080: -- GENESIS --
2081: IF l_debug_level > 0 THEN

Line 2082: oe_debug_pub.add( 'OE_HOLDS_PVT - RELEASE ORDERS- BEFORE GENESIS CALL');

2078: -- 16053361
2079:
2080: -- GENESIS --
2081: IF l_debug_level > 0 THEN
2082: oe_debug_pub.add( 'OE_HOLDS_PVT - RELEASE ORDERS- BEFORE GENESIS CALL');
2083: END IF;
2084:
2085: OPEN check_hold_type_cur(l_order_hold_id);
2086: FETCH check_hold_type_cur INTO l_chk_hold;

Line 2091: oe_debug_pub.add( 'OE_HOLDS_PVT - RELEASE ORDERS- BEFORE SYNC_HEADER_LINE');

2087: CLOSE check_hold_type_cur;
2088:
2089: IF NVL(l_chk_hold, 'N') = 'Y' THEN
2090: IF l_debug_level > 0 THEN
2091: oe_debug_pub.add( 'OE_HOLDS_PVT - RELEASE ORDERS- BEFORE SYNC_HEADER_LINE');
2092: END IF;
2093:
2094: -- Bug 8463870
2095: for hld_rls_rec in header_line_id_cur(l_order_hold_id)

Line 2102: oe_debug_pub.add('....header_id = ' || l_header_id);

2098: l_line_id := hld_rls_rec.line_id;
2099: end loop;
2100:
2101: if l_debug_level > 0 then
2102: oe_debug_pub.add('....header_id = ' || l_header_id);
2103: oe_debug_pub.add('....line_id = ' || l_line_id);
2104: end if;
2105:
2106: if ( l_header_id is not null ) then

Line 2103: oe_debug_pub.add('....line_id = ' || l_line_id);

2099: end loop;
2100:
2101: if l_debug_level > 0 then
2102: oe_debug_pub.add('....header_id = ' || l_header_id);
2103: oe_debug_pub.add('....line_id = ' || l_line_id);
2104: end if;
2105:
2106: if ( l_header_id is not null ) then
2107: l_header_rec := oe_header_util.query_row(p_header_id => l_header_id);

Line 2109: oe_debug_pub.add('.... Queried up header record.');

2105:
2106: if ( l_header_id is not null ) then
2107: l_header_rec := oe_header_util.query_row(p_header_id => l_header_id);
2108: if ( l_debug_level > 0 ) then
2109: oe_debug_pub.add('.... Queried up header record.');
2110: end if;
2111: end if;
2112:
2113: if ( l_line_id is not null ) then

Line 2116: oe_debug_pub.add('.... Queried up line record.');

2112:
2113: if ( l_line_id is not null ) then
2114: l_line_rec := oe_line_util.query_row(p_line_id => l_line_id);
2115: if ( l_debug_level > 0 ) then
2116: oe_debug_pub.add('.... Queried up line record.');
2117: end if;
2118: end if;
2119:
2120: if (l_debug_level > 0 ) then

Line 2121: oe_debug_pub.add('.... Calling oe_sync_order_pvt.sync_header_line...');

2117: end if;
2118: end if;
2119:
2120: if (l_debug_level > 0 ) then
2121: oe_debug_pub.add('.... Calling oe_sync_order_pvt.sync_header_line...');
2122: end if;
2123:
2124: -- XXXX Do we need to generate req_id here
2125: OE_SYNC_ORDER_PVT.SYNC_HEADER_LINE( p_header_rec => l_header_rec -- NULL

Line 2163: OE_Debug_PUB.Add('In OE_holds_PUB.Validate_Hold_source',1);

2159: from oe_hold_definitions
2160: where hold_id = l_hold_id;
2161:
2162: BEGIN
2163: OE_Debug_PUB.Add('In OE_holds_PUB.Validate_Hold_source',1);
2164: -- Initialize API return status to success
2165: x_return_status := FND_API.G_RET_STS_SUCCESS;
2166:
2167: --XXX Check the Entity Combination

Line 2186: OE_Debug_PUB.Add('Entity Combination:' || p_hold_source_rec.hold_entity_code

2182: > Blanket Number - Customer Bill to Site
2183: > Blanket Number - Warehouse
2184: > Blanket Number - Blanket Line Number
2185: */
2186: OE_Debug_PUB.Add('Entity Combination:' || p_hold_source_rec.hold_entity_code
2187: || '/' || p_hold_source_rec.hold_entity_code2,1);
2188:
2189: /* ER # 2662206 Start */
2190: IF p_hold_source_rec.hold_entity_code IS NOT NULL THEN

Line 2201: oe_debug_pub.add('Error: Order WF Hold, being applied at Line Level');

2197: IF p_hold_source_rec.hold_entity_code IN ('B','H','I','W','S','L') OR
2198: (p_hold_source_rec.hold_entity_code = 'O' AND
2199: p_hold_source_rec.line_id IS NOT NULL) OR
2200: p_hold_source_rec.hold_entity_code2 IS NOT NULL THEN
2201: oe_debug_pub.add('Error: Order WF Hold, being applied at Line Level');
2202: FND_MESSAGE.SET_NAME('ONT','OE_ORDER_HOLD_INVALID_CRITERIA');
2203: OE_MSG_PUB.ADD;
2204: RAISE FND_API.G_EXC_ERROR;
2205: END IF;

Line 2210: oe_debug_pub.add('Error: Line WF Hold, being applied at Order Level');

2206: ELSIF l_item_type = 'OEOL' THEN
2207: IF p_hold_source_rec.hold_entity_code IN ('C','O') AND
2208: p_hold_source_rec.line_id IS NULL AND
2209: l_apply_to_flag = 'N' THEN
2210: oe_debug_pub.add('Error: Line WF Hold, being applied at Order Level');
2211: FND_MESSAGE.SET_NAME('ONT','OE_LINE_HOLD_INVALID_CRITERIA');
2212: OE_MSG_PUB.ADD;
2213: RAISE FND_API.G_EXC_ERROR;
2214: END IF;

Line 2238: oe_debug_pub.add('Order WF HOLD');

2234: --ER#7479609 (p_hold_source_rec.hold_entity_code = 'P' and p_hold_source_rec.hold_entity_code2 IS NULL)
2235: THEN
2236: IF l_item_type = 'OEOH' THEN
2237: NULL;
2238: oe_debug_pub.add('Order WF HOLD');
2239: ELSIF l_item_type = 'OEOL' AND l_apply_to_flag = 'N' THEN
2240: oe_debug_pub.add('Error: Line WF Hold, being applied at Order Level');
2241: FND_MESSAGE.SET_NAME('ONT','OE_LINE_HOLD_INVALID_CRITERIA');
2242: OE_MSG_PUB.ADD;

Line 2240: oe_debug_pub.add('Error: Line WF Hold, being applied at Order Level');

2236: IF l_item_type = 'OEOH' THEN
2237: NULL;
2238: oe_debug_pub.add('Order WF HOLD');
2239: ELSIF l_item_type = 'OEOL' AND l_apply_to_flag = 'N' THEN
2240: oe_debug_pub.add('Error: Line WF Hold, being applied at Order Level');
2241: FND_MESSAGE.SET_NAME('ONT','OE_LINE_HOLD_INVALID_CRITERIA');
2242: OE_MSG_PUB.ADD;
2243: RAISE FND_API.G_EXC_ERROR;
2244: END IF;

Line 2251: oe_debug_pub.add('Line WF HOLD');

2247: NULL;
2248: ELSE
2249: IF l_item_type = 'OEOL' AND l_apply_to_flag = 'N' THEN
2250: NULL;
2251: oe_debug_pub.add('Line WF HOLD');
2252: ELSIF l_item_type = 'OEOH' THEN
2253: oe_debug_pub.add('Error: Order WF Hold, being applied at Line Level');
2254: FND_MESSAGE.SET_NAME('ONT','OE_ORDER_HOLD_INVALID_CRITERIA');
2255: OE_MSG_PUB.ADD;

Line 2253: oe_debug_pub.add('Error: Order WF Hold, being applied at Line Level');

2249: IF l_item_type = 'OEOL' AND l_apply_to_flag = 'N' THEN
2250: NULL;
2251: oe_debug_pub.add('Line WF HOLD');
2252: ELSIF l_item_type = 'OEOH' THEN
2253: oe_debug_pub.add('Error: Order WF Hold, being applied at Line Level');
2254: FND_MESSAGE.SET_NAME('ONT','OE_ORDER_HOLD_INVALID_CRITERIA');
2255: OE_MSG_PUB.ADD;
2256: RAISE FND_API.G_EXC_ERROR;
2257: END IF;

Line 2270: OE_Debug_PUB.Add('Invalid Entity Combination',1);

2266: if (p_hold_source_rec.hold_entity_code2 is not null) then
2267: if p_hold_source_rec.hold_entity_code = 'I' then
2268: --ER#7479609 if p_hold_source_rec.hold_entity_code2 not in ('C', 'S', 'B', 'W','H') then
2269: if p_hold_source_rec.hold_entity_code2 not in ('C', 'S', 'B', 'W','H','SM','D','PL','PR','ST','LT','CN','EC','EN') then --ER#7479609 --ER#11824468, added 'CN' --ER#12571983 added ,'EC','EN'
2270: OE_Debug_PUB.Add('Invalid Entity Combination',1);
2271: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_ENTITY_CONBINATION');
2272: OE_MSG_PUB.ADD;
2273: RAISE FND_API.G_EXC_ERROR;
2274: end if;

Line 2278: OE_Debug_PUB.Add('Invalid Entity Combination',1);

2274: end if;
2275: --ER# 13331078 start
2276: elsif p_hold_source_rec.hold_entity_code = 'IC' then
2277: if p_hold_source_rec.hold_entity_code2 not in ('C', 'S', 'B', 'W','H','SM','D','PL','PR','ST','LT','CN','EC','EN') then --ER#11824468, added 'CN' --ER#12571983 added ,'EC','EN'
2278: OE_Debug_PUB.Add('Invalid Entity Combination',1);
2279: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_ENTITY_CONBINATION');
2280: OE_MSG_PUB.ADD;
2281: RAISE FND_API.G_EXC_ERROR;
2282: end if;

Line 2287: OE_Debug_PUB.Add('Invalid Entity Combination',1);

2283: --ER# 13331078 end
2284: elsif p_hold_source_rec.hold_entity_code = 'W' then
2285: --ER#7479609 if p_hold_source_rec.hold_entity_code2 not in ('C', 'S', 'B') then
2286: if p_hold_source_rec.hold_entity_code2 not in ('C', 'S', 'B','LT','SM','D','ST','CN','EC','EN') then --ER#7479609 --ER#11824468, added 'CN' --ER#12571983 added ,'EC','EN'
2287: OE_Debug_PUB.Add('Invalid Entity Combination',1);
2288: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_ENTITY_CONBINATION');
2289: OE_MSG_PUB.ADD;
2290: RAISE FND_API.G_EXC_ERROR;
2291: end if;

Line 2294: OE_Debug_PUB.Add('Invalid Entity Combination',1);

2290: RAISE FND_API.G_EXC_ERROR;
2291: end if;
2292: elsif p_hold_source_rec.hold_entity_code = 'B' then
2293: if p_hold_source_rec.hold_entity_code2 not in ('O') then
2294: OE_Debug_PUB.Add('Invalid Entity Combination',1);
2295: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_ENTITY_CONBINATION');
2296: OE_MSG_PUB.ADD;
2297: RAISE FND_API.G_EXC_ERROR;
2298: end if;

Line 2302: OE_Debug_PUB.Add('Invalid Entity Combination',1);

2298: end if;
2299: elsif p_hold_source_rec.hold_entity_code = 'H' then
2300: --ER#7479609 if p_hold_source_rec.hold_entity_code2 not in ('S', 'B', 'W', 'L') then
2301: if p_hold_source_rec.hold_entity_code2 not in ('S', 'B', 'W', 'L','PL','PT','SM','D','LT') then --ER#7479609
2302: OE_Debug_PUB.Add('Invalid Entity Combination',1);
2303: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_ENTITY_CONBINATION');
2304: OE_MSG_PUB.ADD;
2305: RAISE FND_API.G_EXC_ERROR;
2306: end if;

Line 2310: OE_Debug_PUB.Add('Invalid Entity Combination',1);

2306: end if;
2307: --ER#7479609 start
2308: elsif p_hold_source_rec.hold_entity_code = 'TM' then
2309: if p_hold_source_rec.hold_entity_code2 not in ('OI') then
2310: OE_Debug_PUB.Add('Invalid Entity Combination',1);
2311: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_ENTITY_CONBINATION');
2312: OE_MSG_PUB.ADD;
2313: RAISE FND_API.G_EXC_ERROR;
2314: end if;

Line 2317: OE_Debug_PUB.Add('Invalid Entity Combination',1);

2313: RAISE FND_API.G_EXC_ERROR;
2314: end if;
2315: elsif p_hold_source_rec.hold_entity_code = 'PR' then
2316: if p_hold_source_rec.hold_entity_code2 not in ('T') then
2317: OE_Debug_PUB.Add('Invalid Entity Combination',1);
2318: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_ENTITY_CONBINATION');
2319: OE_MSG_PUB.ADD;
2320: RAISE FND_API.G_EXC_ERROR;
2321: end if;

Line 2324: OE_Debug_PUB.Add('Invalid Entity Combination',1);

2320: RAISE FND_API.G_EXC_ERROR;
2321: end if;
2322: elsif p_hold_source_rec.hold_entity_code = 'C' then
2323: if p_hold_source_rec.hold_entity_code2 not in ('ST','B','S','D','PL','LT','PT','OT','P','TC','SC') then
2324: OE_Debug_PUB.Add('Invalid Entity Combination',1);
2325: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_ENTITY_CONBINATION');
2326: OE_MSG_PUB.ADD;
2327: RAISE FND_API.G_EXC_ERROR;
2328: end if;

Line 2332: OE_Debug_PUB.Add('Invalid Entity Combination',1);

2328: end if;
2329: --ER# 11824468 start
2330: elsif p_hold_source_rec.hold_entity_code = 'CN' then
2331: if p_hold_source_rec.hold_entity_code2 not in ('ST','B','S','D','PL','LT','PT','OT','P','TC','SC') then
2332: OE_Debug_PUB.Add('Invalid Entity Combination',1);
2333: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_ENTITY_CONBINATION');
2334: OE_MSG_PUB.ADD;
2335: RAISE FND_API.G_EXC_ERROR;
2336: end if;

Line 2341: OE_Debug_PUB.Add('Invalid Entity Combination',1);

2337: --ER# 11824468 end
2338: --ER#12571983 start
2339: elsif p_hold_source_rec.hold_entity_code IN('EC','EN') then
2340: if p_hold_source_rec.hold_entity_code2 not in ('ST','B','S','D','PL','LT','PT','OT','P','TC','SC','EL') then
2341: OE_Debug_PUB.Add('Invalid Entity Combination',1);
2342: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_ENTITY_CONBINATION');
2343: OE_MSG_PUB.ADD;
2344: RAISE FND_API.G_EXC_ERROR;
2345: end if;

Line 2349: OE_Debug_PUB.Add('Invalid Entity Combination',1);

2345: end if;
2346: --ER#12571983 end
2347: elsif p_hold_source_rec.hold_entity_code = 'PL' then
2348: if p_hold_source_rec.hold_entity_code2 not in ('TC') then
2349: OE_Debug_PUB.Add('Invalid Entity Combination',1);
2350: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_ENTITY_CONBINATION');
2351: OE_MSG_PUB.ADD;
2352: RAISE FND_API.G_EXC_ERROR;
2353: end if;

Line 2356: OE_Debug_PUB.Add('Invalid Entity Combination',1);

2352: RAISE FND_API.G_EXC_ERROR;
2353: end if;
2354: elsif p_hold_source_rec.hold_entity_code = 'OT' then
2355: if p_hold_source_rec.hold_entity_code2 not in ('LT','TC') then
2356: OE_Debug_PUB.Add('Invalid Entity Combination',1);
2357: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_ENTITY_CONBINATION');
2358: OE_MSG_PUB.ADD;
2359: RAISE FND_API.G_EXC_ERROR;
2360: end if;

Line 2363: OE_Debug_PUB.Add('Invalid Entity Combination',1);

2359: RAISE FND_API.G_EXC_ERROR;
2360: end if;
2361: elsif p_hold_source_rec.hold_entity_code = 'CD' then
2362: if p_hold_source_rec.hold_entity_code2 not in ('CB') then
2363: OE_Debug_PUB.Add('Invalid Entity Combination',1);
2364: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_ENTITY_CONBINATION');
2365: OE_MSG_PUB.ADD;
2366: RAISE FND_API.G_EXC_ERROR;
2367: end if;

Line 2374: OE_Debug_PUB.Add('Entity ID Combination->' ||

2370: null;
2371: end if;
2372: end if;
2373:
2374: OE_Debug_PUB.Add('Entity ID Combination->' ||
2375: to_char(p_hold_source_rec.hold_entity_id) || '/' ||
2376: to_char(p_hold_source_rec.hold_entity_id2),1);
2377: IF p_hold_source_rec.hold_entity_code = 'O' THEN
2378:

Line 2508: OE_Debug_PUB.Add('Invalid Entity Code');

2504: WHERE lookup_code= p_hold_source_rec.hold_entity_id
2505: AND lookup_type = 'SHIP_METHOD';
2506: --ER#7479609 end
2507: ELSE
2508: OE_Debug_PUB.Add('Invalid Entity Code');
2509: FND_MESSAGE.SET_NAME('ONT', 'OE_MISSING_ENTITY_CODE');
2510: OE_MSG_PUB.ADD;
2511: RAISE FND_API.G_EXC_ERROR;
2512: END IF;

Line 2518: OE_Debug_PUB.Add('Second Entity Code->' ||

2514: /*********************************
2515: ** Check the Second Entity **
2516: *********************************/
2517: IF p_hold_source_rec.hold_entity_code2 is not null THEN
2518: OE_Debug_PUB.Add('Second Entity Code->' ||
2519: p_hold_source_rec.hold_entity_code2,1);
2520: OE_Debug_PUB.Add('Second Entity ID' ||
2521: to_char(p_hold_source_rec.hold_entity_id2),1);
2522:

Line 2520: OE_Debug_PUB.Add('Second Entity ID' ||

2516: *********************************/
2517: IF p_hold_source_rec.hold_entity_code2 is not null THEN
2518: OE_Debug_PUB.Add('Second Entity Code->' ||
2519: p_hold_source_rec.hold_entity_code2,1);
2520: OE_Debug_PUB.Add('Second Entity ID' ||
2521: to_char(p_hold_source_rec.hold_entity_id2),1);
2522:
2523: IF p_hold_source_rec.hold_entity_code2 = 'O' THEN
2524:

Line 2669: OE_Debug_PUB.Add('Invalid Second Entity Code');

2665: from fnd_currencies_vl
2666: where currency_code = p_hold_source_rec.hold_entity_id2;
2667: --ER#7479609 end
2668: ELSE
2669: OE_Debug_PUB.Add('Invalid Second Entity Code');
2670: FND_MESSAGE.SET_NAME('ONT', 'OE_MISSING_ENTITY_CODE');
2671: OE_MSG_PUB.ADD;
2672: RAISE FND_API.G_EXC_ERROR;
2673: END IF;

Line 2682: OE_Debug_PUB.Add('Hold Entity ID not found for entity',1);

2678: WHEN TOO_MANY_ROWS THEN
2679: null;
2680: WHEN NO_DATA_FOUND THEN
2681: /* XXX Error message here */
2682: OE_Debug_PUB.Add('Hold Entity ID not found for entity',1);
2683: FND_MESSAGE.SET_NAME('ONT', 'OE_MISSING_ENTITY_ID');
2684: OE_MSG_PUB.ADD;
2685: RAISE FND_API.G_EXC_ERROR;
2686: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2693: OE_Debug_PUB.Add('Expected error in Validate_Hold_source',1);

2689: ** This message is not required.
2690: FND_MESSAGE.SET_NAME('ONT', 'OE_ENTITY_NOT_ON_ORDER_OR_LINE');
2691: OE_MSG_PUB.ADD;
2692: */
2693: OE_Debug_PUB.Add('Expected error in Validate_Hold_source',1);
2694: x_return_status := FND_API.G_RET_STS_ERROR;
2695: WHEN OTHERS THEN
2696: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2697: IF OE_MSG_PUB.Check_Msg_Level

Line 2743: OE_Debug_PUB.Add('Invalid Hold ID'||to_char(p_hold_id),1);

2739:
2740: EXCEPTION
2741:
2742: WHEN NO_DATA_FOUND THEN
2743: OE_Debug_PUB.Add('Invalid Hold ID'||to_char(p_hold_id),1);
2744: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_HOLD_ID');
2745: FND_MESSAGE.SET_TOKEN('HOLD_ID',p_hold_id);
2746: OE_MSG_PUB.ADD;
2747: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2777: oe_debug_pub.add('Org_Id is NULL',1);

2773: l_user_id := OE_HOLDS_PVT.get_user_id;
2774: l_org_id := MO_GLOBAL.get_current_org_id;
2775: IF l_org_id IS NULL THEN
2776: -- org_id is null, raise an error.
2777: oe_debug_pub.add('Org_Id is NULL',1);
2778: x_return_status := FND_API.G_RET_STS_ERROR;
2779: FND_MESSAGE.SET_NAME('FND','MO_ORG_REQUIRED');
2780: FND_MSG_PUB.ADD;
2781: RAISE FND_API.G_EXC_ERROR;

Line 2808: OE_Debug_PUB.Add('Duplicate Hold Source for EntityID'||

2804: and OH.org_id= p_org_id --ER#7479609
2805: and OH.hold_source_id = HS.hold_source_id);
2806:
2807: IF l_count > 0 THEN
2808: OE_Debug_PUB.Add('Duplicate Hold Source for EntityID'||
2809: to_char(p_hold_source_rec.hold_entity_id) ,1);
2810: --FND_MESSAGE.SET_NAME('ONT', 'OE_DUPLICATE_HOLD');
2811: FND_MESSAGE.SET_NAME('ONT', 'OE_DUPLICATE_HOLD_SOURCE');
2812: OE_MSG_PUB.ADD;

Line 2839: OE_Debug_PUB.Add('Duplicate Hold Source for EntityID'||

2835: and OH.org_id= p_org_id --ER#7479609
2836: and OH.hold_source_id = HS.hold_source_id);
2837:
2838: IF l_count > 0 THEN
2839: OE_Debug_PUB.Add('Duplicate Hold Source for EntityID'||
2840: to_char(p_hold_source_rec.hold_entity_id) ,1);
2841: --FND_MESSAGE.SET_NAME('ONT', 'OE_DUPLICATE_HOLD');
2842: FND_MESSAGE.SET_NAME('ONT', 'OE_DUPLICATE_HOLD_SOURCE');
2843: OE_MSG_PUB.ADD;

Line 2867: OE_Debug_PUB.Add('Duplicate Hold Source for EntityID'||

2863: AND HS.RELEASED_FLAG = 'N'
2864: AND NVL(HS.HOLD_UNTIL_DATE, SYSDATE + 1) > SYSDATE;
2865:
2866: IF l_count > 0 THEN
2867: OE_Debug_PUB.Add('Duplicate Hold Source for EntityID'||
2868: to_char(p_hold_source_rec.hold_entity_id) ,1);
2869: --FND_MESSAGE.SET_NAME('ONT', 'OE_DUPLICATE_HOLD');
2870: FND_MESSAGE.SET_NAME('ONT', 'OE_DUPLICATE_HOLD_SOURCE');
2871: OE_MSG_PUB.ADD;

Line 3019: oe_debug_pub.add('Org_Id is NULL',1);

3015: l_user_id := OE_HOLDS_PVT.get_user_id;
3016: l_org_id := MO_GLOBAL.get_current_org_id;
3017: IF l_org_id IS NULL THEN
3018: -- org_id is null, raise an error.
3019: oe_debug_pub.add('Org_Id is NULL',1);
3020: x_return_status := FND_API.G_RET_STS_ERROR;
3021: FND_MESSAGE.SET_NAME('FND','MO_ORG_REQUIRED');
3022: FND_MSG_PUB.ADD;
3023: RAISE FND_API.G_EXC_ERROR;

Line 3049: OE_Debug_PUB.Add('Duplicate Hold Source for EntityID'||

3045: where OH.line_id = p_hold_source_rec.line_id
3046: and OH.hold_source_id = HS.hold_source_id);
3047:
3048: IF l_count > 0 THEN
3049: OE_Debug_PUB.Add('Duplicate Hold Source for EntityID'||
3050: to_char(p_hold_source_rec.hold_entity_id) ,1);
3051: --FND_MESSAGE.SET_NAME('ONT', 'OE_DUPLICATE_HOLD');
3052: FND_MESSAGE.SET_NAME('ONT', 'OE_DUPLICATE_HOLD_SOURCE');
3053: OE_MSG_PUB.ADD;

Line 3078: OE_Debug_PUB.Add('Duplicate Hold Source for EntityID'||

3074: where OH.line_id is null
3075: and OH.hold_source_id = HS.hold_source_id);
3076:
3077: IF l_count > 0 THEN
3078: OE_Debug_PUB.Add('Duplicate Hold Source for EntityID'||
3079: to_char(p_hold_source_rec.hold_entity_id) ,1);
3080: --FND_MESSAGE.SET_NAME('ONT', 'OE_DUPLICATE_HOLD');
3081: FND_MESSAGE.SET_NAME('ONT', 'OE_DUPLICATE_HOLD_SOURCE');
3082: OE_MSG_PUB.ADD;

Line 3110: OE_Debug_PUB.Add('Duplicate Hold Source for EntityID'||

3106: -- where header_id = p_hold_source_rec.hold_entity_id
3107: -- and line_id = nvl(p_hold_source_rec.line_id, -99));
3108:
3109: IF l_count > 0 THEN
3110: OE_Debug_PUB.Add('Duplicate Hold Source for EntityID'||
3111: to_char(p_hold_source_rec.hold_entity_id) ,1);
3112: --FND_MESSAGE.SET_NAME('ONT', 'OE_DUPLICATE_HOLD');
3113: FND_MESSAGE.SET_NAME('ONT', 'OE_DUPLICATE_HOLD_SOURCE');
3114: OE_MSG_PUB.ADD;

Line 3138: -- oe_debug_pub.add('Using Existing Hold Source for:' ||

3134: -- nvl(p_hold_source_rec.hold_entity_id2,-99 )
3135: -- AND HS.RELEASED_FLAG = 'N'
3136: -- AND NVL(HS.HOLD_UNTIL_DATE, SYSDATE + 1) > SYSDATE;
3137:
3138: -- oe_debug_pub.add('Using Existing Hold Source for:' ||
3139: -- to_char(p_hold_source_rec.hold_entity_id) || 'And:' ||
3140: -- nvl(to_char(p_hold_source_rec.hold_entity_id2), 'No Second Entity'),3);
3141: -- EXCEPTION
3142: -- WHEN NO_DATA_FOUND THEN

Line 3342: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

3338:
3339: l_header_rec OE_Order_PUB.Header_Rec_Type;
3340: l_line_rec OE_Order_PUB.Line_Rec_Type;*/
3341: -- GENESIS --
3342: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
3343: BEGIN
3344: x_return_status := FND_API.G_RET_STS_SUCCESS;
3345: l_user_id := OE_HOLDS_PVT.get_user_id;
3346: l_org_id := MO_GLOBAL.get_current_org_id;

Line 3349: oe_debug_pub.add('Org_Id is NULL',1);

3345: l_user_id := OE_HOLDS_PVT.get_user_id;
3346: l_org_id := MO_GLOBAL.get_current_org_id;
3347: IF l_org_id IS NULL THEN
3348: -- org_id is null, raise an error.
3349: oe_debug_pub.add('Org_Id is NULL',1);
3350: x_return_status := FND_API.G_RET_STS_ERROR;
3351: FND_MESSAGE.SET_NAME('FND','MO_ORG_REQUIRED');
3352: FND_MSG_PUB.ADD;
3353: RAISE FND_API.G_EXC_ERROR;

Line 3366: OE_DEBUG_PUB.Add ('Calling Overloaded Create_Order_Holds Based on Workflow from original Create_Order_Holds',1);

3362: When NO_DATA_FOUND Then
3363: NULL; -- OE_Holds_Pvt.Validate has not yet been called.
3364: End;
3365:
3366: OE_DEBUG_PUB.Add ('Calling Overloaded Create_Order_Holds Based on Workflow from original Create_Order_Holds',1);
3367: Create_Order_Holds (
3368: p_hold_source_rec => p_hold_source_rec
3369: ,p_org_id => p_org_id --ER#7479609
3370: ,p_item_type => l_wf_item_type

Line 3377: /*oe_debug_pub.add('p_hold_source_rec.hold_source_id:' ||

3373: ,x_msg_count => x_msg_count
3374: ,x_msg_data => x_msg_data
3375: ,x_is_hold_applied => l_is_hold_applied);
3376:
3377: /*oe_debug_pub.add('p_hold_source_rec.hold_source_id:' ||
3378: p_hold_source_rec.hold_source_id);
3379: oe_debug_pub.add('Hold_entity_code/Hold_entity_id/' ||
3380: 'Hold_entity_code2/Hold_entity_id2:' ||
3381: p_hold_source_rec.Hold_entity_code || '/' ||

Line 3379: oe_debug_pub.add('Hold_entity_code/Hold_entity_id/' ||

3375: ,x_is_hold_applied => l_is_hold_applied);
3376:
3377: /*oe_debug_pub.add('p_hold_source_rec.hold_source_id:' ||
3378: p_hold_source_rec.hold_source_id);
3379: oe_debug_pub.add('Hold_entity_code/Hold_entity_id/' ||
3380: 'Hold_entity_code2/Hold_entity_id2:' ||
3381: p_hold_source_rec.Hold_entity_code || '/' ||
3382: p_hold_source_rec.Hold_entity_id || '/' ||
3383: p_hold_source_rec.Hold_entity_code2 || '/' ||

Line 3385: oe_debug_pub.add('p_hold_source_rec.header_id:' || p_hold_source_rec.header_id);

3381: p_hold_source_rec.Hold_entity_code || '/' ||
3382: p_hold_source_rec.Hold_entity_id || '/' ||
3383: p_hold_source_rec.Hold_entity_code2 || '/' ||
3384: p_hold_source_rec.Hold_entity_id2);
3385: oe_debug_pub.add('p_hold_source_rec.header_id:' || p_hold_source_rec.header_id);
3386: oe_debug_pub.add('p_hold_source_rec.line_id:' || p_hold_source_rec.line_id);
3387: -- Insert a hold record for the order header or the order line.
3388:
3389: IF p_hold_source_rec.hold_entity_code = 'I' and

Line 3386: oe_debug_pub.add('p_hold_source_rec.line_id:' || p_hold_source_rec.line_id);

3382: p_hold_source_rec.Hold_entity_id || '/' ||
3383: p_hold_source_rec.Hold_entity_code2 || '/' ||
3384: p_hold_source_rec.Hold_entity_id2);
3385: oe_debug_pub.add('p_hold_source_rec.header_id:' || p_hold_source_rec.header_id);
3386: oe_debug_pub.add('p_hold_source_rec.line_id:' || p_hold_source_rec.line_id);
3387: -- Insert a hold record for the order header or the order line.
3388:
3389: IF p_hold_source_rec.hold_entity_code = 'I' and
3390: p_hold_source_rec.hold_entity_code2 = 'C' THEN

Line 5096: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - p_hold_source_rec.line_id IS NOT NULL');

5092: -- GENESIS --
5093: IF p_hold_source_rec.line_id IS NOT NULL THEN
5094:
5095: IF l_debug_level > 0 THEN
5096: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - p_hold_source_rec.line_id IS NOT NULL');
5097: END IF;
5098:
5099: OPEN check_line_hold_type_cur(p_hold_source_rec.line_id);
5100: FETCH check_line_hold_type_cur INTO l_check_hold;

Line 5103: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - l_check_hold' || l_check_hold);

5099: OPEN check_line_hold_type_cur(p_hold_source_rec.line_id);
5100: FETCH check_line_hold_type_cur INTO l_check_hold;
5101: CLOSE check_line_hold_type_cur;
5102: IF l_debug_level > 0 THEN
5103: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - l_check_hold' || l_check_hold);
5104: END IF;
5105:
5106: ELSIF p_hold_source_rec.line_id IS NULL AND
5107: p_hold_source_rec.header_id IS NOT NULL THEN

Line 5110: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - p_hold_source_rec.header_id IS NOT NULL');

5106: ELSIF p_hold_source_rec.line_id IS NULL AND
5107: p_hold_source_rec.header_id IS NOT NULL THEN
5108:
5109: IF l_debug_level > 0 THEN
5110: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - p_hold_source_rec.header_id IS NOT NULL');
5111: END IF;
5112: OPEN check_hdr_hold_type_cur(p_hold_source_rec.header_id);
5113: FETCH check_hdr_hold_type_cur INTO l_check_hold;
5114: CLOSE check_hdr_hold_type_cur;

Line 5116: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - l_check_hold' || l_check_hold);

5112: OPEN check_hdr_hold_type_cur(p_hold_source_rec.header_id);
5113: FETCH check_hdr_hold_type_cur INTO l_check_hold;
5114: CLOSE check_hdr_hold_type_cur;
5115: IF l_debug_level > 0 THEN
5116: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - l_check_hold' || l_check_hold);
5117: END IF;
5118:
5119: ELSIF p_hold_source_rec.line_id IS NULL AND
5120: p_hold_source_rec.header_id IS NULL AND

Line 5124: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - p_hold_source_rec.hold_source_id IS NOT NULL');

5120: p_hold_source_rec.header_id IS NULL AND
5121: p_hold_source_rec.hold_source_id IS NOT NULL THEN
5122:
5123: IF l_debug_level > 0 THEN
5124: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - p_hold_source_rec.hold_source_id IS NOT NULL');
5125: END IF;
5126: OPEN check_src_hold_type_cur(p_hold_source_rec.hold_source_id);
5127: FETCH check_src_hold_type_cur INTO l_check_hold;
5128: CLOSE check_src_hold_type_cur;

Line 5131: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - l_check_hold :' || l_check_hold);

5127: FETCH check_src_hold_type_cur INTO l_check_hold;
5128: CLOSE check_src_hold_type_cur;
5129:
5130: IF l_debug_level > 0 THEN
5131: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - l_check_hold :' || l_check_hold);
5132: END IF;
5133:
5134: END IF;
5135:

Line 5137: oe_debug_pub.add( 'OE_HOLDS_PVT - CREATE ORDER HOLDS - BEFORE SYNC_HEADER_LINE');

5133:
5134: END IF;
5135:
5136: IF l_debug_level > 0 THEN
5137: oe_debug_pub.add( 'OE_HOLDS_PVT - CREATE ORDER HOLDS - BEFORE SYNC_HEADER_LINE');
5138: END IF;
5139:
5140: IF NVL(l_check_hold, 'N') = 'Y' THEN
5141:

Line 5143: oe_debug_pub.add( 'OE_HOLDS_PVT - CREATE ORDER HOLDS - l_check_hold: ' || l_check_hold);

5139:
5140: IF NVL(l_check_hold, 'N') = 'Y' THEN
5141:
5142: IF l_debug_level > 0 THEN
5143: oe_debug_pub.add( 'OE_HOLDS_PVT - CREATE ORDER HOLDS - l_check_hold: ' || l_check_hold);
5144: END IF;
5145:
5146: IF p_hold_source_rec.hold_entity_code = 'O' THEN
5147: IF l_debug_level > 0 THEN

Line 5148: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);

5144: END IF;
5145:
5146: IF p_hold_source_rec.hold_entity_code = 'O' THEN
5147: IF l_debug_level > 0 THEN
5148: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);
5149: END IF;
5150: IF p_hold_source_rec.hold_entity_id is NOT NULL THEN
5151: IF l_debug_level > 0 THEN
5152: oe_debug_pub.add(' p_hold_source_rec.hold_entity_id : ' || p_hold_source_rec.hold_entity_id);

Line 5152: oe_debug_pub.add(' p_hold_source_rec.hold_entity_id : ' || p_hold_source_rec.hold_entity_id);

5148: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);
5149: END IF;
5150: IF p_hold_source_rec.hold_entity_id is NOT NULL THEN
5151: IF l_debug_level > 0 THEN
5152: oe_debug_pub.add(' p_hold_source_rec.hold_entity_id : ' || p_hold_source_rec.hold_entity_id);
5153: END IF;
5154: oe_header_util.query_row ( p_header_id => p_hold_source_rec.hold_entity_id,
5155: x_header_rec => l_header_rec);
5156: END IF; -- p_hold_source_rec.hold_entity_id is NOT NULL

Line 5160: oe_debug_pub.add(' p_hold_source_rec.line_id : ' || p_hold_source_rec.line_id );

5156: END IF; -- p_hold_source_rec.hold_entity_id is NOT NULL
5157:
5158: IF p_hold_source_rec.line_id is not NULL THEN
5159: IF l_debug_level > 0 THEN
5160: oe_debug_pub.add(' p_hold_source_rec.line_id : ' || p_hold_source_rec.line_id );
5161: END IF;
5162: oe_line_util.query_row(
5163: p_line_id => p_hold_source_rec.line_id
5164: ,x_line_rec => l_line_rec

Line 5176: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);

5172: ,p_change_type => 'APPLY');
5173: ELSE --p_hold_source_rec.hold_entity_code = 'O'
5174:
5175: IF l_debug_level > 0 THEN
5176: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);
5177: END IF;
5178:
5179: IF p_hold_source_rec.header_id is NOT NULL THEN
5180: oe_header_util.query_row ( p_header_id => p_hold_source_rec.header_id,

Line 5278: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

5274: l_count number;
5275: -- 16053361
5276:
5277: l_user_id NUMBER;
5278: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
5279:
5280: BEGIN
5281: x_return_status := FND_API.G_RET_STS_SUCCESS;
5282: l_user_id := OE_HOLDS_PVT.get_user_id;

Line 5299: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Releasing hold');

5295: -- be the case if selected lines of an order were put on hold.
5296: -- IF l_entity_code = 'O' THEN
5297: -- END IF;
5298: -- 16053361
5299: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Releasing hold');
5300: If NVL (Fnd_Profile.Value('ONT_RAISE_STATUS_CHANGE_BUSINESS_EVENT'), 'N')='Y'
5301: THEN
5302: IF l_debug_level > 0 THEN
5303: oe_debug_pub.add( 'OE_HOLDS_PVT - Preparing paramters to pass to Integration event for Releasing hold');

Line 5303: oe_debug_pub.add( 'OE_HOLDS_PVT - Preparing paramters to pass to Integration event for Releasing hold');

5299: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Releasing hold');
5300: If NVL (Fnd_Profile.Value('ONT_RAISE_STATUS_CHANGE_BUSINESS_EVENT'), 'N')='Y'
5301: THEN
5302: IF l_debug_level > 0 THEN
5303: oe_debug_pub.add( 'OE_HOLDS_PVT - Preparing paramters to pass to Integration event for Releasing hold');
5304: END IF;
5305: l_count := 1;
5306: l_nameVal_tbl(l_count).name := 'CHANGE_TYPE';
5307: l_nameVal_tbl(l_count).value := 'RELEASE';

Line 5325: oe_debug_pub.add('No data found!');

5321: WHERE ohld.order_hold_id = p_hold_release_rec.order_hold_id
5322: AND ohld.header_id = ooh.header_id;
5323: EXCEPTION
5324: WHEN OTHERS THEN
5325: oe_debug_pub.add('No data found!');
5326: END;
5327: if l_debug_level > 0 then
5328: oe_debug_pub.add('....header_id = ' || l_header_id);
5329: oe_debug_pub.add('....line_id = ' || l_line_id);

Line 5328: oe_debug_pub.add('....header_id = ' || l_header_id);

5324: WHEN OTHERS THEN
5325: oe_debug_pub.add('No data found!');
5326: END;
5327: if l_debug_level > 0 then
5328: oe_debug_pub.add('....header_id = ' || l_header_id);
5329: oe_debug_pub.add('....line_id = ' || l_line_id);
5330: end if;
5331: oe_order_util.raise_business_event( p_header_id => l_header_id,
5332: p_line_id => l_line_id,

Line 5329: oe_debug_pub.add('....line_id = ' || l_line_id);

5325: oe_debug_pub.add('No data found!');
5326: END;
5327: if l_debug_level > 0 then
5328: oe_debug_pub.add('....header_id = ' || l_header_id);
5329: oe_debug_pub.add('....line_id = ' || l_line_id);
5330: end if;
5331: oe_order_util.raise_business_event( p_header_id => l_header_id,
5332: p_line_id => l_line_id,
5333: p_event_name => 'oracle.apps.ont.hold.action',

Line 5336: oe_debug_pub.add( 'OE_HOLDS_PVT - Done with Raising Integration event for Releasing hold');

5332: p_line_id => l_line_id,
5333: p_event_name => 'oracle.apps.ont.hold.action',
5334: p_nameVal_tbl => l_nameVal_tbl);
5335: IF l_debug_level > 0 THEN
5336: oe_debug_pub.add( 'OE_HOLDS_PVT - Done with Raising Integration event for Releasing hold');
5337: END IF;
5338: END IF;
5339: oe_debug_pub.add( 'OE_HOLDS_PVT - Raised Integration event for Releasing hold');
5340: -- 16053361

Line 5339: oe_debug_pub.add( 'OE_HOLDS_PVT - Raised Integration event for Releasing hold');

5335: IF l_debug_level > 0 THEN
5336: oe_debug_pub.add( 'OE_HOLDS_PVT - Done with Raising Integration event for Releasing hold');
5337: END IF;
5338: END IF;
5339: oe_debug_pub.add( 'OE_HOLDS_PVT - Raised Integration event for Releasing hold');
5340: -- 16053361
5341: -- GENESIS --
5342: IF l_debug_level > 0 THEN
5343: oe_debug_pub.add( 'OE_HOLDS_PVT - RELEASE ORDER HOLDS - BEFORE GENESIS CALL');

Line 5343: oe_debug_pub.add( 'OE_HOLDS_PVT - RELEASE ORDER HOLDS - BEFORE GENESIS CALL');

5339: oe_debug_pub.add( 'OE_HOLDS_PVT - Raised Integration event for Releasing hold');
5340: -- 16053361
5341: -- GENESIS --
5342: IF l_debug_level > 0 THEN
5343: oe_debug_pub.add( 'OE_HOLDS_PVT - RELEASE ORDER HOLDS - BEFORE GENESIS CALL');
5344: END IF;
5345: OPEN check_hold_typ_cur(p_hold_release_rec.hold_source_id);
5346: FETCH check_hold_typ_cur INTO l_chk_hld;
5347: CLOSE check_hold_typ_cur;

Line 5351: oe_debug_pub.add( 'OE_HOLDS_PVT - 1 RELEASE ORDER HOLDS - BEFORE SYNC_HEADER_LINE');

5347: CLOSE check_hold_typ_cur;
5348:
5349: IF NVL(l_chk_hld, 'N') = 'Y' THEN
5350: IF l_debug_level > 0 THEN
5351: oe_debug_pub.add( 'OE_HOLDS_PVT - 1 RELEASE ORDER HOLDS - BEFORE SYNC_HEADER_LINE');
5352: oe_debug_pub.add( 'OE_HOLDS_PVT - hold_source _id '|| p_hold_release_rec.hold_source_id);
5353: oe_debug_pub.add( 'OE_HOLDS_PVT - hold_release_id' ||p_hold_release_rec.hold_release_id);
5354: END IF;
5355:

Line 5352: oe_debug_pub.add( 'OE_HOLDS_PVT - hold_source _id '|| p_hold_release_rec.hold_source_id);

5348:
5349: IF NVL(l_chk_hld, 'N') = 'Y' THEN
5350: IF l_debug_level > 0 THEN
5351: oe_debug_pub.add( 'OE_HOLDS_PVT - 1 RELEASE ORDER HOLDS - BEFORE SYNC_HEADER_LINE');
5352: oe_debug_pub.add( 'OE_HOLDS_PVT - hold_source _id '|| p_hold_release_rec.hold_source_id);
5353: oe_debug_pub.add( 'OE_HOLDS_PVT - hold_release_id' ||p_hold_release_rec.hold_release_id);
5354: END IF;
5355:
5356: -- Bug 8463870

Line 5353: oe_debug_pub.add( 'OE_HOLDS_PVT - hold_release_id' ||p_hold_release_rec.hold_release_id);

5349: IF NVL(l_chk_hld, 'N') = 'Y' THEN
5350: IF l_debug_level > 0 THEN
5351: oe_debug_pub.add( 'OE_HOLDS_PVT - 1 RELEASE ORDER HOLDS - BEFORE SYNC_HEADER_LINE');
5352: oe_debug_pub.add( 'OE_HOLDS_PVT - hold_source _id '|| p_hold_release_rec.hold_source_id);
5353: oe_debug_pub.add( 'OE_HOLDS_PVT - hold_release_id' ||p_hold_release_rec.hold_release_id);
5354: END IF;
5355:
5356: -- Bug 8463870
5357: for hld_rls_rec in header_line_id_cur(p_hold_release_rec.order_hold_id)

Line 5364: oe_debug_pub.add('....header_id = ' || l_header_id);

5360: l_line_id := hld_rls_rec.line_id;
5361: end loop;
5362:
5363: if l_debug_level > 0 then
5364: oe_debug_pub.add('....header_id = ' || l_header_id);
5365: oe_debug_pub.add('....line_id = ' || l_line_id);
5366: end if;
5367:
5368: if ( l_header_id is not null ) then

Line 5365: oe_debug_pub.add('....line_id = ' || l_line_id);

5361: end loop;
5362:
5363: if l_debug_level > 0 then
5364: oe_debug_pub.add('....header_id = ' || l_header_id);
5365: oe_debug_pub.add('....line_id = ' || l_line_id);
5366: end if;
5367:
5368: if ( l_header_id is not null ) then
5369: l_header_rec := oe_header_util.query_row(p_header_id => l_header_id);

Line 5371: oe_debug_pub.add('.... Queried up header record.');

5367:
5368: if ( l_header_id is not null ) then
5369: l_header_rec := oe_header_util.query_row(p_header_id => l_header_id);
5370: if ( l_debug_level > 0 ) then
5371: oe_debug_pub.add('.... Queried up header record.');
5372: end if;
5373: end if;
5374:
5375: if ( l_line_id is not null ) then

Line 5378: oe_debug_pub.add('.... Queried up line record.');

5374:
5375: if ( l_line_id is not null ) then
5376: l_line_rec := oe_line_util.query_row(p_line_id => l_line_id);
5377: if ( l_debug_level > 0 ) then
5378: oe_debug_pub.add('.... Queried up line record.');
5379: end if;
5380: end if;
5381:
5382: if (l_debug_level > 0 ) then

Line 5383: oe_debug_pub.add('.... Calling oe_sync_order_pvt.sync_header_line...');

5379: end if;
5380: end if;
5381:
5382: if (l_debug_level > 0 ) then
5383: oe_debug_pub.add('.... Calling oe_sync_order_pvt.sync_header_line...');
5384: end if;
5385:
5386: OE_SYNC_ORDER_PVT.SYNC_HEADER_LINE(p_header_rec => l_header_rec -- NULL
5387: ,p_line_rec => l_line_rec -- NULL

Line 5393: oe_debug_pub.add('.... Returned from oe_sync_order_pvt.sync_header_line...');

5389: ,p_change_type => 'RELEASE'
5390: ,p_hold_release_id => p_hold_release_rec.hold_release_id);
5391:
5392: if (l_debug_level > 0 ) then
5393: oe_debug_pub.add('.... Returned from oe_sync_order_pvt.sync_header_line...');
5394: end if;
5395: END IF;
5396: -- GENESIS --
5397: END Release_Order_holds;

Line 5432: oe_debug_pub.add('Invalid Reason Code:' ||

5428:
5429: EXCEPTION
5430:
5431: WHEN NO_DATA_FOUND THEN
5432: oe_debug_pub.add('Invalid Reason Code:' ||
5433: p_hold_release_rec.release_reason_code ,2);
5434: FND_MESSAGE.SET_NAME('ONT', 'OE_INVALID_REASON_CODE');
5435: FND_MESSAGE.SET_TOKEN('REASON_CODE',
5436: p_hold_release_rec.release_reason_code);

Line 5446: oe_debug_pub.add('Creating OE_HOLD_RELEASES record', 1);

5442: SELECT OE_HOLD_RELEASES_S.NEXTVAL
5443: INTO x_hold_release_id
5444: FROM DUAL;
5445:
5446: oe_debug_pub.add('Creating OE_HOLD_RELEASES record', 1);
5447: /*Bug3042838 Added nvl condition for insertion into CREATED_BY column */
5448: INSERT INTO OE_HOLD_RELEASES
5449: ( HOLD_RELEASE_ID
5450: , CREATION_DATE

Line 5513: oe_debug_pub.add('Updating oe_hold_sources for Release', 1);

5509: );
5510:
5511: -- Flag the hold source as released
5512:
5513: oe_debug_pub.add('Updating oe_hold_sources for Release', 1);
5514: --ER#7479609 UPDATE oe_hold_sources
5515: UPDATE oe_hold_sources_all --ER#7479609
5516: SET hold_release_id = x_hold_release_id
5517: , released_flag = 'Y'

Line 5596: oe_debug_pub.add('Releasing Order based holds', 1);

5592: -- Retrieving hold source ID if not passed
5593: IF p_hold_source_rec.hold_source_id IS NULL THEN
5594: IF p_hold_source_rec.hold_entity_code = 'O' AND
5595: p_hold_source_rec.hold_entity_code2 is null THEN
5596: oe_debug_pub.add('Releasing Order based holds', 1);
5597: OPEN order_hold_source;
5598: FETCH order_hold_source INTO l_hold_release_rec.hold_source_id;
5599: IF (order_hold_source%NOTFOUND) THEN
5600: /* Note:Fix for bug#2669137 */

Line 5602: oe_debug_pub.add('Missing Order Hold Source ID...',1);

5598: FETCH order_hold_source INTO l_hold_release_rec.hold_source_id;
5599: IF (order_hold_source%NOTFOUND) THEN
5600: /* Note:Fix for bug#2669137 */
5601: /*
5602: oe_debug_pub.add('Missing Order Hold Source ID...',1);
5603: oe_debug_pub.add('Entity Code/ID/Header_id/Line_id' ||
5604: p_hold_source_rec.hold_entity_code || '/' ||
5605: to_char(p_hold_source_rec.hold_entity_id) || '/' ||
5606: p_hold_source_rec.header_id || '/' ||

Line 5603: oe_debug_pub.add('Entity Code/ID/Header_id/Line_id' ||

5599: IF (order_hold_source%NOTFOUND) THEN
5600: /* Note:Fix for bug#2669137 */
5601: /*
5602: oe_debug_pub.add('Missing Order Hold Source ID...',1);
5603: oe_debug_pub.add('Entity Code/ID/Header_id/Line_id' ||
5604: p_hold_source_rec.hold_entity_code || '/' ||
5605: to_char(p_hold_source_rec.hold_entity_id) || '/' ||
5606: p_hold_source_rec.header_id || '/' ||
5607: p_hold_source_rec.line_id,1);

Line 5608: oe_debug_pub.add('Entity Code2/ID2' ||

5604: p_hold_source_rec.hold_entity_code || '/' ||
5605: to_char(p_hold_source_rec.hold_entity_id) || '/' ||
5606: p_hold_source_rec.header_id || '/' ||
5607: p_hold_source_rec.line_id,1);
5608: oe_debug_pub.add('Entity Code2/ID2' ||
5609: p_hold_source_rec.hold_entity_code2 || '/' ||
5610: to_char(p_hold_source_rec.hold_entity_id2) ,1);
5611: FND_MESSAGE.SET_NAME('ONT', 'OE_MISSING_HOLD_SOURCE');
5612: OE_MSG_PUB.ADD;

Line 5623: oe_debug_pub.add('Missing Hold Source ID...',1);

5619: ELSE
5620: OPEN hold_source;
5621: FETCH hold_source INTO l_hold_release_rec.hold_source_id;
5622: IF (hold_source%NOTFOUND) THEN
5623: oe_debug_pub.add('Missing Hold Source ID...',1);
5624: oe_debug_pub.add('Entity Code/ID' ||
5625: p_hold_source_rec.hold_entity_code || '/' ||
5626: to_char(p_hold_source_rec.hold_entity_id) ,1);
5627: oe_debug_pub.add('Entity Code2/ID2' ||

Line 5624: oe_debug_pub.add('Entity Code/ID' ||

5620: OPEN hold_source;
5621: FETCH hold_source INTO l_hold_release_rec.hold_source_id;
5622: IF (hold_source%NOTFOUND) THEN
5623: oe_debug_pub.add('Missing Hold Source ID...',1);
5624: oe_debug_pub.add('Entity Code/ID' ||
5625: p_hold_source_rec.hold_entity_code || '/' ||
5626: to_char(p_hold_source_rec.hold_entity_id) ,1);
5627: oe_debug_pub.add('Entity Code2/ID2' ||
5628: p_hold_source_rec.hold_entity_code2 || '/' ||

Line 5627: oe_debug_pub.add('Entity Code2/ID2' ||

5623: oe_debug_pub.add('Missing Hold Source ID...',1);
5624: oe_debug_pub.add('Entity Code/ID' ||
5625: p_hold_source_rec.hold_entity_code || '/' ||
5626: to_char(p_hold_source_rec.hold_entity_id) ,1);
5627: oe_debug_pub.add('Entity Code2/ID2' ||
5628: p_hold_source_rec.hold_entity_code2 || '/' ||
5629: to_char(p_hold_source_rec.hold_entity_id2) ,1);
5630: FND_MESSAGE.SET_NAME('ONT', 'OE_MISSING_HOLD_SOURCE');
5631: OE_MSG_PUB.ADD;

Line 5638: oe_debug_pub.add('Using Hold Source ID:' ||

5634: CLOSE hold_source;
5635: END IF; -- p_hold_source_rec.hold_entity_code = 'O'
5636: ELSE
5637: l_hold_release_rec.hold_source_id := p_hold_source_rec.hold_source_id;
5638: oe_debug_pub.add('Using Hold Source ID:' ||
5639: to_char(l_hold_release_rec.hold_source_id) ,1);
5640: END IF;
5641:
5642: OE_HOLDS_PVT.Create_Release_Source(p_hold_release_rec => l_hold_release_rec,

Line 5655: oe_debug_pub.add('Calling Release_Order_holds using l_hold_release_id' ||

5651: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
5652: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5653: END IF;
5654: END IF;
5655: oe_debug_pub.add('Calling Release_Order_holds using l_hold_release_id' ||
5656: to_char(l_hold_release_id) ,1);
5657: l_hold_release_rec.hold_release_id := l_hold_release_id;
5658:
5659: OE_HOLDS_PVT.Release_Order_holds(

Line 5730: oe_debug_pub.add('Return Status : ' || x_return_status, 5);

5726: FND_MESSAGE.SET_NAME('ONT', 'OE_COGS_INVALID_LINE_ID');
5727: FND_MESSAGE.SET_TOKEN('LINE_ID',p_line_id);
5728: OE_MSG_PUB.ADD;
5729: END IF;
5730: oe_debug_pub.add('Return Status : ' || x_return_status, 5);
5731: -- RAISE FND_API.G_EXC_ERROR; -- Commented for bug 7112725
5732: END Validate_Order;
5733:
5734:

Line 5832: OE_Debug_PUB.Add('Deleting order hold record',1);

5828: IF (order_hold%notfound) THEN
5829: EXIT;
5830: END IF;
5831:
5832: OE_Debug_PUB.Add('Deleting order hold record',1);
5833:
5834: DELETE FROM OE_ORDER_HOLDS_all
5835: WHERE order_hold_id = l_order_hold_id;
5836:

Line 5837: OE_Debug_PUB.Add('Deleting hold release record',1);

5833:
5834: DELETE FROM OE_ORDER_HOLDS_all
5835: WHERE order_hold_id = l_order_hold_id;
5836:
5837: OE_Debug_PUB.Add('Deleting hold release record',1);
5838: DELETE FROM OE_HOLD_RELEASES
5839: WHERE HOLD_RELEASE_ID = l_hold_release_id
5840: AND HOLD_RELEASE_ID NOT IN (SELECT NVL(HOLD_RELEASE_ID,0)
5841: FROM OE_ORDER_HOLDS_all

Line 5857: OE_Debug_PUB.Add('Deleting hold source record',1);

5853: FETCH hold_source INTO l_hold_source_id, l_hold_release_id;
5854: IF (hold_source%notfound) THEN
5855: EXIT;
5856: END IF;
5857: OE_Debug_PUB.Add('Deleting hold source record',1);
5858:
5859: DELETE FROM OE_HOLD_SOURCES_all
5860: WHERE HOLD_SOURCE_ID = l_hold_source_id;
5861:

Line 5862: OE_Debug_PUB.Add('Deleting hold release record',1);

5858:
5859: DELETE FROM OE_HOLD_SOURCES_all
5860: WHERE HOLD_SOURCE_ID = l_hold_source_id;
5861:
5862: OE_Debug_PUB.Add('Deleting hold release record',1);
5863: DELETE FROM OE_HOLD_RELEASES
5864: WHERE HOLD_RELEASE_ID = l_hold_release_id
5865: AND HOLD_RELEASE_ID NOT IN
5866: ( SELECT NVL(HOLD_RELEASE_ID,0)

Line 5891: OE_Debug_PUB.Add('Deleting order hold record',1);

5887: IF (line_hold%notfound) THEN
5888: EXIT;
5889: END IF;
5890:
5891: OE_Debug_PUB.Add('Deleting order hold record',1);
5892:
5893: DELETE FROM OE_ORDER_HOLDS
5894: WHERE order_hold_id = l_order_hold_id;
5895:

Line 5983: OE_DEBUG_PUB.Add('IN Apply Holds..Orders',1);

5979: l_user_activity_name VARCHAR2(80);
5980:
5981: BEGIN
5982: x_return_status := FND_API.G_RET_STS_SUCCESS;
5983: OE_DEBUG_PUB.Add('IN Apply Holds..Orders',1);
5984:
5985: -- 8477694
5986:
5987: IF NOT OE_GLOBALS.G_SYS_HOLD THEN

Line 5994: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));

5990: x_return_status => x_return_status,
5991: x_msg_count => x_msg_count,
5992: x_msg_data => x_msg_data) = 'N' THEN
5993:
5994: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));
5995: l_msg_token := 'APPLY(System Hold)';
5996: fnd_message.set_name('ONT', 'OE_HOLDS_AUTHORIZATION_FAILED');
5997: fnd_message.set_token('ACTION', l_msg_token);
5998: OE_MSG_PUB.ADD;

Line 6007: OE_DEBUG_PUB.Add('After calling Check_System_Holds');

6003: );
6004: RETURN;
6005: END IF;
6006: END IF;
6007: OE_DEBUG_PUB.Add('After calling Check_System_Holds');
6008:
6009: OE_DEBUG_PUB.Add('Apply Hold before calling Check_Authorization');
6010:
6011: -- 8477694

Line 6009: OE_DEBUG_PUB.Add('Apply Hold before calling Check_Authorization');

6005: END IF;
6006: END IF;
6007: OE_DEBUG_PUB.Add('After calling Check_System_Holds');
6008:
6009: OE_DEBUG_PUB.Add('Apply Hold before calling Check_Authorization');
6010:
6011: -- 8477694
6012: IF p_check_authorization_flag = 'Y' THEN
6013: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);

Line 6013: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);

6009: OE_DEBUG_PUB.Add('Apply Hold before calling Check_Authorization');
6010:
6011: -- 8477694
6012: IF p_check_authorization_flag = 'Y' THEN
6013: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);
6014: ELSE
6015: OE_DEBUG_PUB.Add('8477694 Auto Auth'||p_check_authorization_flag);
6016: END IF;
6017:

Line 6015: OE_DEBUG_PUB.Add('8477694 Auto Auth'||p_check_authorization_flag);

6011: -- 8477694
6012: IF p_check_authorization_flag = 'Y' THEN
6013: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);
6014: ELSE
6015: OE_DEBUG_PUB.Add('8477694 Auto Auth'||p_check_authorization_flag);
6016: END IF;
6017:
6018: IF p_check_authorization_flag = 'Y' THEN --bug 8477694
6019: IF check_authorization ( p_hold_id => p_hold_id

Line 6027: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));

6023: ,x_return_status => x_return_status
6024: ,x_msg_count => x_msg_count
6025: ,x_msg_data => x_msg_data
6026: ) = 'N' THEN
6027: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));
6028: fnd_message.set_name('ONT','ONT_APPLY');
6029: l_msg_token := fnd_message.get;
6030: fnd_message.set_name('ONT', 'OE_HOLDS_AUTHORIZATION_FAILED');
6031: fnd_message.set_token('ACTION', l_msg_token);

Line 6042: OE_DEBUG_PUB.Add('Apply Hold After calling Check_Authorization');

6038: RETURN;
6039: END IF;
6040: END IF; --bug 8477694
6041:
6042: OE_DEBUG_PUB.Add('Apply Hold After calling Check_Authorization');
6043: --8477694
6044:
6045:
6046: for j in 1..p_order_tbl.COUNT loop

Line 6047: OE_DEBUG_PUB.Add('IN Apply Holds Loop',3);

6043: --8477694
6044:
6045:
6046: for j in 1..p_order_tbl.COUNT loop
6047: OE_DEBUG_PUB.Add('IN Apply Holds Loop',3);
6048: l_hold_exists := 'N'; --bug 5548778
6049: x_return_status := FND_API.G_RET_STS_SUCCESS;
6050: l_hold_source_rec.hold_entity_code := 'O';
6051: l_hold_source_rec.hold_entity_id := p_order_tbl(j).header_id;

Line 6061: OE_DEBUG_PUB.Add('headerID'|| to_char(p_order_tbl(j).header_id),3);

6057:
6058: --dbms_output.put_line ('p_order_tbl.header_id'||p_order_tbl(j).header_id);
6059: --dbms_output.put_line ('Hold_id'|| l_hold_source_rec.hold_id);
6060:
6061: OE_DEBUG_PUB.Add('headerID'|| to_char(p_order_tbl(j).header_id),3);
6062: OE_DEBUG_PUB.Add('HoldID:' || to_char(l_hold_source_rec.hold_id),3 );
6063:
6064: OE_DEBUG_PUB.Add('Validating ORder',1);
6065: Validate_Order (p_order_tbl(j).header_id,

Line 6062: OE_DEBUG_PUB.Add('HoldID:' || to_char(l_hold_source_rec.hold_id),3 );

6058: --dbms_output.put_line ('p_order_tbl.header_id'||p_order_tbl(j).header_id);
6059: --dbms_output.put_line ('Hold_id'|| l_hold_source_rec.hold_id);
6060:
6061: OE_DEBUG_PUB.Add('headerID'|| to_char(p_order_tbl(j).header_id),3);
6062: OE_DEBUG_PUB.Add('HoldID:' || to_char(l_hold_source_rec.hold_id),3 );
6063:
6064: OE_DEBUG_PUB.Add('Validating ORder',1);
6065: Validate_Order (p_order_tbl(j).header_id,
6066: p_order_tbl(j).line_id,

Line 6064: OE_DEBUG_PUB.Add('Validating ORder',1);

6060:
6061: OE_DEBUG_PUB.Add('headerID'|| to_char(p_order_tbl(j).header_id),3);
6062: OE_DEBUG_PUB.Add('HoldID:' || to_char(l_hold_source_rec.hold_id),3 );
6063:
6064: OE_DEBUG_PUB.Add('Validating ORder',1);
6065: Validate_Order (p_order_tbl(j).header_id,
6066: p_order_tbl(j).line_id,
6067: x_return_status => x_return_status,
6068: x_msg_count => x_msg_count,

Line 6075: OE_DEBUG_PUB.Add('After Validate_Order',2);

6071: --dbms_output.put_line ('Validate_Order:x_return_status' || x_return_status );
6072: --dbms_output.put_line ('Validate_Order:x_msg_count' || to_char(x_msg_count) );
6073: --dbms_output.put_line ('Validate_Order:x_msg_data' || x_msg_data );
6074:
6075: OE_DEBUG_PUB.Add('After Validate_Order',2);
6076: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);
6077: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2 );
6078: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2 );
6079:

Line 6076: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);

6072: --dbms_output.put_line ('Validate_Order:x_msg_count' || to_char(x_msg_count) );
6073: --dbms_output.put_line ('Validate_Order:x_msg_data' || x_msg_data );
6074:
6075: OE_DEBUG_PUB.Add('After Validate_Order',2);
6076: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);
6077: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2 );
6078: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2 );
6079:
6080: -- Added for bug 7112725

Line 6077: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2 );

6073: --dbms_output.put_line ('Validate_Order:x_msg_data' || x_msg_data );
6074:
6075: OE_DEBUG_PUB.Add('After Validate_Order',2);
6076: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);
6077: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2 );
6078: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2 );
6079:
6080: -- Added for bug 7112725
6081: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

Line 6078: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2 );

6074:
6075: OE_DEBUG_PUB.Add('After Validate_Order',2);
6076: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);
6077: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2 );
6078: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2 );
6079:
6080: -- Added for bug 7112725
6081: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6082: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

Line 6113: OE_DEBUG_PUB.Add('After Create_Hold_Source, x_return_status:' ||

6109: x_return_status => x_return_status,
6110: x_msg_count => x_msg_count,
6111: x_msg_data => x_msg_data
6112: );
6113: OE_DEBUG_PUB.Add('After Create_Hold_Source, x_return_status:' ||
6114: x_return_status,1);
6115: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),3 );
6116: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data ,3);
6117: OE_DEBUG_PUB.Add('l_hold_exists:' || l_hold_exists ,3);

Line 6115: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),3 );

6111: x_msg_data => x_msg_data
6112: );
6113: OE_DEBUG_PUB.Add('After Create_Hold_Source, x_return_status:' ||
6114: x_return_status,1);
6115: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),3 );
6116: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data ,3);
6117: OE_DEBUG_PUB.Add('l_hold_exists:' || l_hold_exists ,3);
6118: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6119: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

Line 6116: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data ,3);

6112: );
6113: OE_DEBUG_PUB.Add('After Create_Hold_Source, x_return_status:' ||
6114: x_return_status,1);
6115: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),3 );
6116: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data ,3);
6117: OE_DEBUG_PUB.Add('l_hold_exists:' || l_hold_exists ,3);
6118: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6119: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
6120: RAISE FND_API.G_EXC_ERROR;

Line 6117: OE_DEBUG_PUB.Add('l_hold_exists:' || l_hold_exists ,3);

6113: OE_DEBUG_PUB.Add('After Create_Hold_Source, x_return_status:' ||
6114: x_return_status,1);
6115: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),3 );
6116: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data ,3);
6117: OE_DEBUG_PUB.Add('l_hold_exists:' || l_hold_exists ,3);
6118: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6119: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
6120: RAISE FND_API.G_EXC_ERROR;
6121: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN

Line 6126: OE_DEBUG_PUB.Add('l_hold_source_id->' || to_char(l_hold_source_id) ,1);

6122: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6123: END IF;
6124: END IF;
6125:
6126: OE_DEBUG_PUB.Add('l_hold_source_id->' || to_char(l_hold_source_id) ,1);
6127: l_hold_source_rec.hold_source_id := l_hold_source_id;
6128:
6129: IF l_hold_exists = 'N' THEN --bug 5548778
6130: /*Added the Select query and IF Condition below and calling overloaded create_order_holds procedure

Line 6141: OE_DEBUG_PUB.Add ('Calling Overloaded Create_Order_Holds Based on Workflow',1);

6137: END IF;
6138:
6139: IF l_wf_item_type IS NOT NULL AND l_wf_activity_name IS NOT
6140: NULL THEN
6141: OE_DEBUG_PUB.Add ('Calling Overloaded Create_Order_Holds Based on Workflow',1);
6142: Create_Order_Holds (
6143: p_hold_source_rec => l_hold_source_rec
6144: ,p_item_type => l_wf_item_type
6145: ,p_activity_name => l_wf_activity_name

Line 6153: OE_DEBUG_PUB.Add ('Calling Create_Order_Holds',1);

6149: ,x_is_hold_applied => l_is_hold_applied);
6150:
6151: ELSE
6152:
6153: OE_DEBUG_PUB.Add ('Calling Create_Order_Holds',1);
6154: Create_Order_Holds (
6155: p_hold_source_rec => l_hold_source_rec
6156: ,x_return_status => x_return_status
6157: ,x_msg_count => x_msg_count

Line 6160: OE_DEBUG_PUB.Add('After Create_Order_Holds',1);

6156: ,x_return_status => x_return_status
6157: ,x_msg_count => x_msg_count
6158: ,x_msg_data => x_msg_data
6159: );
6160: OE_DEBUG_PUB.Add('After Create_Order_Holds',1);
6161: END IF; -- l_item_type and l_activity_name
6162:
6163: IF NVL(l_is_hold_applied,FALSE) THEN
6164: l_count_of_holds_applied := l_count_of_holds_applied + 1;

Line 6165: OE_DEBUG_PUB.Add('Hold is applied :',2);

6161: END IF; -- l_item_type and l_activity_name
6162:
6163: IF NVL(l_is_hold_applied,FALSE) THEN
6164: l_count_of_holds_applied := l_count_of_holds_applied + 1;
6165: OE_DEBUG_PUB.Add('Hold is applied :',2);
6166: END IF;
6167: l_is_hold_applied := FALSE;
6168: /* OE_DEBUG_PUB.Add ('Calling Create_Order_Holds',1);
6169: Create_Order_Holds (

Line 6168: /* OE_DEBUG_PUB.Add ('Calling Create_Order_Holds',1);

6164: l_count_of_holds_applied := l_count_of_holds_applied + 1;
6165: OE_DEBUG_PUB.Add('Hold is applied :',2);
6166: END IF;
6167: l_is_hold_applied := FALSE;
6168: /* OE_DEBUG_PUB.Add ('Calling Create_Order_Holds',1);
6169: Create_Order_Holds (
6170: p_hold_source_rec => l_hold_source_rec
6171: ,x_return_status => x_return_status
6172: ,x_msg_count => x_msg_count

Line 6175: OE_DEBUG_PUB.Add('After Create_Order_Holds',1);*/

6171: ,x_return_status => x_return_status
6172: ,x_msg_count => x_msg_count
6173: ,x_msg_data => x_msg_data
6174: );
6175: OE_DEBUG_PUB.Add('After Create_Order_Holds',1);*/
6176: END IF;
6177: end loop;
6178: /*Added the query and IF Condition below for WF_HOLDS ER (bug 6449458)*/
6179: IF l_wf_item_type is not null and l_wf_activity_name is not null THEN

Line 6191: oe_debug_pub.add(' Hold Not applied for the requested line');

6187: IF p_order_tbl.COUNT = 1 AND l_count_of_holds_applied = 0 THEN
6188: fnd_message.set_name('ONT', 'OE_NO_HOLD_FOR_ACTIVITY');
6189: fnd_message.set_token('WF_ACT',l_user_activity_name);
6190: OE_MSG_PUB.ADD;
6191: oe_debug_pub.add(' Hold Not applied for the requested line');
6192: RAISE FND_API.G_EXC_ERROR;
6193: ELSIF l_count_of_holds_applied = 0
6194: AND p_order_tbl.COUNT > 1 THEN
6195: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');

Line 6198: oe_debug_pub.add('Hold Not applied for ALL requested lines');

6194: AND p_order_tbl.COUNT > 1 THEN
6195: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
6196: fnd_message.set_token('WF_ACT',l_user_activity_name);
6197: OE_MSG_PUB.ADD;
6198: oe_debug_pub.add('Hold Not applied for ALL requested lines');
6199: RAISE FND_API.G_EXC_ERROR;
6200: ELSIF p_order_tbl.COUNT > l_count_of_holds_applied
6201: AND p_order_tbl.COUNT > 1 THEN
6202: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');

Line 6205: oe_debug_pub.add('Hold Not applied for FEW requested lines');

6201: AND p_order_tbl.COUNT > 1 THEN
6202: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
6203: fnd_message.set_token('WF_ACT',l_user_activity_name);
6204: OE_MSG_PUB.ADD;
6205: oe_debug_pub.add('Hold Not applied for FEW requested lines');
6206: ELSE
6207: NULL; -- No messages are required to be logged.
6208: END IF;
6209: END IF;

Line 6214: OE_DEBUG_PUB.Add('Error:Apply Holds',1);

6210:
6211: EXCEPTION
6212: WHEN OTHERS THEN
6213: --dbms_output.put_line ('ApplyHolds-EXCEPTION');
6214: OE_DEBUG_PUB.Add('Error:Apply Holds',1);
6215: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);
6216: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),1 );
6217: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data ,1);
6218: END Apply_Holds;

Line 6215: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);

6211: EXCEPTION
6212: WHEN OTHERS THEN
6213: --dbms_output.put_line ('ApplyHolds-EXCEPTION');
6214: OE_DEBUG_PUB.Add('Error:Apply Holds',1);
6215: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);
6216: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),1 );
6217: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data ,1);
6218: END Apply_Holds;
6219:

Line 6216: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),1 );

6212: WHEN OTHERS THEN
6213: --dbms_output.put_line ('ApplyHolds-EXCEPTION');
6214: OE_DEBUG_PUB.Add('Error:Apply Holds',1);
6215: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);
6216: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),1 );
6217: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data ,1);
6218: END Apply_Holds;
6219:
6220:

Line 6217: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data ,1);

6213: --dbms_output.put_line ('ApplyHolds-EXCEPTION');
6214: OE_DEBUG_PUB.Add('Error:Apply Holds',1);
6215: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);
6216: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),1 );
6217: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data ,1);
6218: END Apply_Holds;
6219:
6220:
6221: Procedure Apply_Holds(

Line 6267: OE_DEBUG_PUB.Add('In OE_Holds_pvt.Apply Holds, Creating Hold Source',1);

6263: x_msg_count => x_msg_count,
6264: x_msg_data => x_msg_data,
6265: x_is_hold_applied => l_hold_msg_applied);
6266: /*BEGIN
6267: OE_DEBUG_PUB.Add('In OE_Holds_pvt.Apply Holds, Creating Hold Source',1);
6268:
6269: x_return_status := FND_API.G_RET_STS_SUCCESS;
6270: l_hold_source_rec := p_hold_source_rec;
6271: Validate (p_hold_source_rec => p_hold_source_rec,

Line 6275: OE_DEBUG_PUB.Add('Validate return status:' || x_return_status,1);

6271: Validate (p_hold_source_rec => p_hold_source_rec,
6272: x_return_status => x_return_status,
6273: x_msg_count => x_msg_count,
6274: x_msg_data => x_msg_data );
6275: OE_DEBUG_PUB.Add('Validate return status:' || x_return_status,1);
6276: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6277: OE_Debug_PUB.Add('Validate not successful',1);
6278: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
6279: RAISE FND_API.G_EXC_ERROR;

Line 6277: OE_Debug_PUB.Add('Validate not successful',1);

6273: x_msg_count => x_msg_count,
6274: x_msg_data => x_msg_data );
6275: OE_DEBUG_PUB.Add('Validate return status:' || x_return_status,1);
6276: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6277: OE_Debug_PUB.Add('Validate not successful',1);
6278: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
6279: RAISE FND_API.G_EXC_ERROR;
6280: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
6281: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 6284: OE_DEBUG_PUB.Add ('Calling Create_Hold_Source bug 5548778 overload',1);

6280: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
6281: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6282: END IF;
6283: ELSE
6284: OE_DEBUG_PUB.Add ('Calling Create_Hold_Source bug 5548778 overload',1);
6285: Create_Hold_Source (
6286: p_hold_source_rec => p_hold_source_rec,
6287: x_hold_source_id => l_hold_source_id,
6288: x_hold_exists => l_hold_exists,

Line 6293: OE_DEBUG_PUB.Add('x_return_status->' || x_return_status,1);

6289: x_return_status => x_return_status,
6290: x_msg_count => x_msg_count,
6291: x_msg_data => x_msg_data
6292: );
6293: OE_DEBUG_PUB.Add('x_return_status->' || x_return_status,1);
6294: OE_DEBUG_PUB.Add('x_msg_count->' || x_msg_count,1);
6295: OE_DEBUG_PUB.Add('x_msg_data' || x_msg_data,1);
6296: OE_DEBUG_PUB.Add('l_hold_exists' || l_hold_exists,1);
6297: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

Line 6294: OE_DEBUG_PUB.Add('x_msg_count->' || x_msg_count,1);

6290: x_msg_count => x_msg_count,
6291: x_msg_data => x_msg_data
6292: );
6293: OE_DEBUG_PUB.Add('x_return_status->' || x_return_status,1);
6294: OE_DEBUG_PUB.Add('x_msg_count->' || x_msg_count,1);
6295: OE_DEBUG_PUB.Add('x_msg_data' || x_msg_data,1);
6296: OE_DEBUG_PUB.Add('l_hold_exists' || l_hold_exists,1);
6297: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6298: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

Line 6295: OE_DEBUG_PUB.Add('x_msg_data' || x_msg_data,1);

6291: x_msg_data => x_msg_data
6292: );
6293: OE_DEBUG_PUB.Add('x_return_status->' || x_return_status,1);
6294: OE_DEBUG_PUB.Add('x_msg_count->' || x_msg_count,1);
6295: OE_DEBUG_PUB.Add('x_msg_data' || x_msg_data,1);
6296: OE_DEBUG_PUB.Add('l_hold_exists' || l_hold_exists,1);
6297: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6298: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
6299: RAISE FND_API.G_EXC_ERROR;

Line 6296: OE_DEBUG_PUB.Add('l_hold_exists' || l_hold_exists,1);

6292: );
6293: OE_DEBUG_PUB.Add('x_return_status->' || x_return_status,1);
6294: OE_DEBUG_PUB.Add('x_msg_count->' || x_msg_count,1);
6295: OE_DEBUG_PUB.Add('x_msg_data' || x_msg_data,1);
6296: OE_DEBUG_PUB.Add('l_hold_exists' || l_hold_exists,1);
6297: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6298: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
6299: RAISE FND_API.G_EXC_ERROR;
6300: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN

Line 6304: OE_DEBUG_PUB.Add('l_hold_source_id->' || to_char(l_hold_source_id) ,1);

6300: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
6301: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6302: END IF;
6303: END IF;
6304: OE_DEBUG_PUB.Add('l_hold_source_id->' || to_char(l_hold_source_id) ,1);
6305: l_hold_source_rec.hold_source_id := l_hold_source_id;
6306: --bug 5548778
6307: IF l_hold_exists = 'N' THEN
6308: OE_DEBUG_PUB.Add ('Calling Create_Order_Holds',1);

Line 6308: OE_DEBUG_PUB.Add ('Calling Create_Order_Holds',1);

6304: OE_DEBUG_PUB.Add('l_hold_source_id->' || to_char(l_hold_source_id) ,1);
6305: l_hold_source_rec.hold_source_id := l_hold_source_id;
6306: --bug 5548778
6307: IF l_hold_exists = 'N' THEN
6308: OE_DEBUG_PUB.Add ('Calling Create_Order_Holds',1);
6309: Create_Order_Holds (
6310: p_hold_source_rec => l_hold_source_rec
6311: ,x_return_status => x_return_status
6312: ,x_msg_count => x_msg_count

Line 6315: OE_DEBUG_PUB.Add('After Create_Order_Holds',1);

6311: ,x_return_status => x_return_status
6312: ,x_msg_count => x_msg_count
6313: ,x_msg_data => x_msg_data
6314: );
6315: OE_DEBUG_PUB.Add('After Create_Order_Holds',1);
6316: END IF;
6317: END IF;*/
6318: END Apply_Holds;
6319:

Line 6347: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(p_hold_source_rec.hold_id));

6343: ,x_return_status => x_return_status
6344: ,x_msg_count => x_msg_count
6345: ,x_msg_data => x_msg_data
6346: ) = 'N' THEN
6347: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(p_hold_source_rec.hold_id));
6348: l_msg_token := 'RELEASE(System Hold)';
6349: fnd_message.set_name('ONT', 'OE_HOLDS_AUTHORIZATION_FAILED');
6350: fnd_message.set_token('ACTION', l_msg_token);
6351: OE_MSG_PUB.ADD;

Line 6361: OE_DEBUG_PUB.Add('After calling Check_System_Holds');

6357: RETURN;
6358: END IF;
6359: END IF;
6360:
6361: OE_DEBUG_PUB.Add('After calling Check_System_Holds');
6362:
6363: OE_DEBUG_PUB.Add('Release Hold before calling Check_Authorization');
6364:
6365: -- bug 8477694

Line 6363: OE_DEBUG_PUB.Add('Release Hold before calling Check_Authorization');

6359: END IF;
6360:
6361: OE_DEBUG_PUB.Add('After calling Check_System_Holds');
6362:
6363: OE_DEBUG_PUB.Add('Release Hold before calling Check_Authorization');
6364:
6365: -- bug 8477694
6366: IF p_check_authorization_flag = 'Y' THEN
6367: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);

Line 6367: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);

6363: OE_DEBUG_PUB.Add('Release Hold before calling Check_Authorization');
6364:
6365: -- bug 8477694
6366: IF p_check_authorization_flag = 'Y' THEN
6367: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);
6368: ELSE
6369: OE_DEBUG_PUB.Add('8477694 Auto Auth'||p_check_authorization_flag);
6370: END IF;
6371:

Line 6369: OE_DEBUG_PUB.Add('8477694 Auto Auth'||p_check_authorization_flag);

6365: -- bug 8477694
6366: IF p_check_authorization_flag = 'Y' THEN
6367: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);
6368: ELSE
6369: OE_DEBUG_PUB.Add('8477694 Auto Auth'||p_check_authorization_flag);
6370: END IF;
6371:
6372: IF p_check_authorization_flag = 'Y' THEN -- Bug 8477694
6373: IF check_authorization ( p_hold_id => p_hold_source_rec.hold_id

Line 6381: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(p_hold_source_rec.hold_id));

6377: ,x_return_status => x_return_status
6378: ,x_msg_count => x_msg_count
6379: ,x_msg_data => x_msg_data
6380: ) = 'N' THEN
6381: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(p_hold_source_rec.hold_id));
6382: fnd_message.set_name('ONT','ONT_RELEASE');
6383: l_msg_token := fnd_message.get;
6384: fnd_message.set_name('ONT', 'OE_HOLDS_AUTHORIZATION_FAILED');
6385: fnd_message.set_token('ACTION', l_msg_token);

Line 6396: OE_DEBUG_PUB.Add('Release Hold After calling Check_Authorization');

6392: RETURN;
6393: END IF;
6394: END IF; -- BUG 8477694
6395:
6396: OE_DEBUG_PUB.Add('Release Hold After calling Check_Authorization');
6397: --8477694
6398:
6399:
6400: --bug 5051532

Line 6418: oe_debug_pub.add('l_hold_source_rec.header_id ' || l_hold_source_rec.header_id);

6414: from oe_order_lines_all
6415: where line_id = l_hold_source_rec.line_id;
6416: end if;
6417:
6418: oe_debug_pub.add('l_hold_source_rec.header_id ' || l_hold_source_rec.header_id);
6419: oe_debug_pub.add('l_hold_source_rec.line_id ' || l_hold_source_rec.line_id);
6420: l_order_rec.header_id := l_hold_source_rec.header_id;
6421: -- bug 5051532
6422:

Line 6419: oe_debug_pub.add('l_hold_source_rec.line_id ' || l_hold_source_rec.line_id);

6415: where line_id = l_hold_source_rec.line_id;
6416: end if;
6417:
6418: oe_debug_pub.add('l_hold_source_rec.header_id ' || l_hold_source_rec.header_id);
6419: oe_debug_pub.add('l_hold_source_rec.line_id ' || l_hold_source_rec.line_id);
6420: l_order_rec.header_id := l_hold_source_rec.header_id;
6421: -- bug 5051532
6422:
6423: Validate_Order (l_hold_source_rec.header_id,

Line 6429: oe_debug_pub.add('After Validate_Order with x_return_status'||x_return_status,2);

6425: x_return_status => x_return_status,
6426: x_msg_count => x_msg_count,
6427: x_msg_data => x_msg_data
6428: );
6429: oe_debug_pub.add('After Validate_Order with x_return_status'||x_return_status,2);
6430:
6431: -- Added for bug 7112725
6432: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6433: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

Line 6446: oe_debug_pub.add('After oe_holds_pvt.release_orders with x_return_status' || x_return_status, 1);

6442: p_hold_source_rec => l_hold_source_rec,
6443: x_return_status => x_return_status,
6444: x_msg_count => x_msg_count,
6445: x_msg_data => x_msg_data );
6446: oe_debug_pub.add('After oe_holds_pvt.release_orders with x_return_status' || x_return_status, 1);
6447: --bug 3977747 ends--
6448: else
6449:
6450: if (p_hold_source_rec.hold_source_id is null )then

Line 6492: oe_debug_pub.add('In Release Holds..Orders',1);

6488: l_msg_token VARCHAR2(100); --8477694
6489:
6490: BEGIN
6491: x_return_status := FND_API.G_RET_STS_SUCCESS;
6492: oe_debug_pub.add('In Release Holds..Orders',1);
6493:
6494: --8477694
6495: IF NOT OE_GLOBALS.G_SYS_HOLD THEN
6496: IF check_system_holds( p_hold_id => p_hold_id

Line 6501: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(p_hold_id));

6497: ,x_return_status => x_return_status
6498: ,x_msg_count => x_msg_count
6499: ,x_msg_data => x_msg_data
6500: ) = 'N' THEN
6501: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(p_hold_id));
6502: l_msg_token := 'RELEASE(System Hold)';
6503: fnd_message.set_name('ONT', 'OE_HOLDS_AUTHORIZATION_FAILED');
6504: fnd_message.set_token('ACTION', l_msg_token);
6505: OE_MSG_PUB.ADD;

Line 6515: OE_DEBUG_PUB.Add('After calling Check_System_Holds');

6511: RETURN;
6512: END IF;
6513: END IF;
6514:
6515: OE_DEBUG_PUB.Add('After calling Check_System_Holds');
6516:
6517: OE_DEBUG_PUB.Add('Release Hold overloaded before calling Check_Authorization');
6518: -- bug 8477694
6519: IF p_check_authorization_flag = 'Y' THEN

Line 6517: OE_DEBUG_PUB.Add('Release Hold overloaded before calling Check_Authorization');

6513: END IF;
6514:
6515: OE_DEBUG_PUB.Add('After calling Check_System_Holds');
6516:
6517: OE_DEBUG_PUB.Add('Release Hold overloaded before calling Check_Authorization');
6518: -- bug 8477694
6519: IF p_check_authorization_flag = 'Y' THEN
6520: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);
6521: ELSE

Line 6520: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);

6516:
6517: OE_DEBUG_PUB.Add('Release Hold overloaded before calling Check_Authorization');
6518: -- bug 8477694
6519: IF p_check_authorization_flag = 'Y' THEN
6520: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);
6521: ELSE
6522: OE_DEBUG_PUB.Add('8477694 Auto Auth'||p_check_authorization_flag);
6523: END IF;
6524:

Line 6522: OE_DEBUG_PUB.Add('8477694 Auto Auth'||p_check_authorization_flag);

6518: -- bug 8477694
6519: IF p_check_authorization_flag = 'Y' THEN
6520: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);
6521: ELSE
6522: OE_DEBUG_PUB.Add('8477694 Auto Auth'||p_check_authorization_flag);
6523: END IF;
6524:
6525: IF p_check_authorization_flag= 'Y' THEN -- 8477694
6526: IF check_authorization ( p_hold_id => p_hold_id

Line 6534: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(p_hold_id));

6530: ,x_return_status => x_return_status
6531: ,x_msg_count => x_msg_count
6532: ,x_msg_data => x_msg_data
6533: ) = 'N' THEN
6534: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(p_hold_id));
6535: fnd_message.set_name('ONT','ONT_RELEASE');
6536: l_msg_token := fnd_message.get;
6537: fnd_message.set_name('ONT', 'OE_HOLDS_AUTHORIZATION_FAILED');
6538: fnd_message.set_token('ACTION', l_msg_token);

Line 6548: OE_DEBUG_PUB.Add('Release Hold overloaded After calling Check_Authorization');

6544: );
6545: RETURN;
6546: END IF;
6547: END IF; -- 8477694
6548: OE_DEBUG_PUB.Add('Release Hold overloaded After calling Check_Authorization');
6549: --8477694
6550:
6551:
6552: for j in 1..p_order_tbl.COUNT loop

Line 6560: oe_debug_pub.add('HeaderID:' || l_order_rec.header_id );

6556: l_order_rec.line_id := p_order_tbl(j).line_id;
6557: l_hold_release_rec.release_reason_code := p_release_reason_code;
6558: l_hold_release_rec.release_comment := p_release_comment;
6559: l_hold_source_rec.hold_id := p_hold_id;
6560: oe_debug_pub.add('HeaderID:' || l_order_rec.header_id );
6561: oe_debug_pub.add('LineID:' || l_order_rec.Line_id );
6562: -- XXX Need some analysis
6563: -- When release holds for orders, check to see if this order was put on
6564: -- hold as an

Line 6561: oe_debug_pub.add('LineID:' || l_order_rec.Line_id );

6557: l_hold_release_rec.release_reason_code := p_release_reason_code;
6558: l_hold_release_rec.release_comment := p_release_comment;
6559: l_hold_source_rec.hold_id := p_hold_id;
6560: oe_debug_pub.add('HeaderID:' || l_order_rec.header_id );
6561: oe_debug_pub.add('LineID:' || l_order_rec.Line_id );
6562: -- XXX Need some analysis
6563: -- When release holds for orders, check to see if this order was put on
6564: -- hold as an
6565: -- Order based hold. If yes, then release the Hold_Source from hold and

Line 6580: oe_debug_pub.add('After Validate_Order with x_return_status'|| x_return_status);

6576: x_return_status => x_return_status,
6577: x_msg_count => x_msg_count,
6578: x_msg_data => x_msg_data
6579: );
6580: oe_debug_pub.add('After Validate_Order with x_return_status'|| x_return_status);
6581:
6582: -- Added for bug 7112725
6583: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
6584: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

Line 6591: oe_debug_pub.add('l_order_rec.header_id'||l_order_rec.header_id);

6587: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6588: END IF;
6589: END IF;
6590:
6591: oe_debug_pub.add('l_order_rec.header_id'||l_order_rec.header_id);
6592: oe_debug_pub.add('lhldrlsrec.rel_reas_code' || l_hold_release_rec.release_reason_code);
6593: oe_holds_pvt.release_orders (
6594: p_hold_release_rec => l_hold_release_rec,
6595: p_order_rec => l_order_rec,

Line 6592: oe_debug_pub.add('lhldrlsrec.rel_reas_code' || l_hold_release_rec.release_reason_code);

6588: END IF;
6589: END IF;
6590:
6591: oe_debug_pub.add('l_order_rec.header_id'||l_order_rec.header_id);
6592: oe_debug_pub.add('lhldrlsrec.rel_reas_code' || l_hold_release_rec.release_reason_code);
6593: oe_holds_pvt.release_orders (
6594: p_hold_release_rec => l_hold_release_rec,
6595: p_order_rec => l_order_rec,
6596: p_hold_source_rec => l_hold_source_rec,

Line 6600: oe_debug_pub.add('After oe_holds_pvt.release_orders:' ||

6596: p_hold_source_rec => l_hold_source_rec,
6597: x_return_status => x_return_status,
6598: x_msg_count => x_msg_count,
6599: x_msg_data => x_msg_data );
6600: oe_debug_pub.add('After oe_holds_pvt.release_orders:' ||
6601: x_return_status);
6602: -- If the entity code is order, then release hold source also, if no
6603: -- other order hold records exist for this hold source. This would
6604: -- be the case if selected lines of an order were put on hold.

Line 6618: OE_Debug_PUB.Add('Setting hold source status to released');

6614: AND ROWNUM = 1;
6615:
6616: EXCEPTION
6617: WHEN NO_DATA_FOUND THEN
6618: OE_Debug_PUB.Add('Setting hold source status to released');
6619: UPDATE OE_HOLD_SOURCES
6620: SET RELEASED_FLAG = 'Y'
6621: , HOLD_RELEASE_ID = l_hold_release_id
6622: , LAST_UPDATED_BY = l_user_id

Line 6631: oe_debug_pub.add('After release_orders with x_return_status'|| x_return_status,3);

6627: END IF;
6628: */
6629:
6630: end loop;
6631: oe_debug_pub.add('After release_orders with x_return_status'|| x_return_status,3);
6632: END Release_Holds;
6633:
6634: /*8477694
6635: function check_system_holds(

Line 6677: oe_debug_pub.add('renga: hold not authorized - ');

6673: IF p_hold_id in (13,14,15,17) THEN
6674:
6675: =============================
6676: IR ISO Change Management Ends
6677: oe_debug_pub.add('renga: hold not authorized - ');
6678: l_authorized_or_not := 'N';
6679: END IF;
6680: return l_authorized_or_not;
6681: END check_system_holds;

Line 6724: OE_DEBUG_PUB.Add('Entering OE_Holds_PVT.process_apply_holds_lines',1);

6720:
6721: BEGIN
6722: oe_msg_pub.initialize;
6723:
6724: OE_DEBUG_PUB.Add('Entering OE_Holds_PVT.process_apply_holds_lines',1);
6725:
6726: IF check_system_holds(
6727: p_hold_id => p_hold_id,
6728: x_return_status => x_return_status,

Line 6732: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));

6728: x_return_status => x_return_status,
6729: x_msg_count => x_msg_count,
6730: x_msg_data => x_msg_data) = 'N' THEN
6731:
6732: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));
6733: fnd_message.set_name('ONT', 'ONT_HOLDS_SYSTEM_CHECK');
6734: OE_MSG_PUB.ADD;
6735: x_return_status := FND_API.G_RET_STS_ERROR;
6736: OE_MSG_PUB.Count_And_Get

Line 6742: OE_DEBUG_PUB.Add('After calling Check_System_Holds');

6738: , p_data => x_msg_data
6739: );
6740: RETURN;
6741: END IF;
6742: OE_DEBUG_PUB.Add('After calling Check_System_Holds');
6743:
6744: IF check_authorization ( p_hold_id => p_hold_id
6745: ,p_authorized_action_code => 'APPLY'
6746: ,p_responsibility_id => l_resp_id

Line 6752: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));

6748: ,x_return_status => x_return_status
6749: ,x_msg_count => x_msg_count
6750: ,x_msg_data => x_msg_data
6751: ) = 'N' THEN
6752: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));
6753:
6754: fnd_message.set_name('ONT','ONT_APPLY');
6755: l_msg_token := fnd_message.get;
6756:

Line 6770: OE_DEBUG_PUB.Add('After calling Check_Authorization');

6766: );
6767: RETURN;
6768: END IF;
6769:
6770: OE_DEBUG_PUB.Add('After calling Check_Authorization');
6771:
6772: SAVEPOINT process_apply_holds_lines;
6773:
6774: l_prev_org_id := null;

Line 6778: OE_DEBUG_PUB.Add('Mo_Global.Set_Policy_Context to:' || p_sel_rec_tbl(j).Org_Id );

6774: l_prev_org_id := null;
6775: FOR j in 1.. p_sel_rec_tbl.COUNT LOOP
6776: IF p_sel_rec_tbl(j).org_id <> nvl(l_prev_org_id, -99)
6777: THEN
6778: OE_DEBUG_PUB.Add('Mo_Global.Set_Policy_Context to:' || p_sel_rec_tbl(j).Org_Id );
6779: Mo_Global.Set_Policy_Context (p_access_mode => 'S',
6780: p_org_id => p_sel_rec_tbl(j).Org_Id);
6781: l_prev_org_id := p_sel_rec_tbl(j).org_id;
6782: END IF;

Line 6790: OE_DEBUG_PUB.Add('Header_id: '||l_line_rec.header_id);

6786: ( p_line_id => l_line_id,
6787: x_line_rec => l_line_rec
6788: );
6789:
6790: OE_DEBUG_PUB.Add('Header_id: '||l_line_rec.header_id);
6791: OE_DEBUG_PUB.Add('Line_id: '||to_char(l_line_rec.line_id));
6792:
6793: l_hold_source_rec.hold_entity_code := 'O';
6794: l_hold_source_rec.hold_entity_id := l_line_rec.header_id;

Line 6791: OE_DEBUG_PUB.Add('Line_id: '||to_char(l_line_rec.line_id));

6787: x_line_rec => l_line_rec
6788: );
6789:
6790: OE_DEBUG_PUB.Add('Header_id: '||l_line_rec.header_id);
6791: OE_DEBUG_PUB.Add('Line_id: '||to_char(l_line_rec.line_id));
6792:
6793: l_hold_source_rec.hold_entity_code := 'O';
6794: l_hold_source_rec.hold_entity_id := l_line_rec.header_id;
6795: l_hold_source_rec.LINE_ID := l_line_rec.line_id;

Line 6807: OE_DEBUG_PUB.Add('Before calling oe_holds_pvt.apply_holds');

6803: from oe_hold_definitions
6804: where hold_id = l_hold_source_rec.hold_id;
6805: END IF;
6806:
6807: OE_DEBUG_PUB.Add('Before calling oe_holds_pvt.apply_holds');
6808: /*Calling overloaded procedure apply_holds, modified for WF_HOLDS ER (bug 6449458)*/
6809: /*oe_holds_pvt.apply_Holds(
6810: p_hold_source_rec => l_hold_source_rec
6811: ,p_hold_existing_flg => 'Y'

Line 6831: OE_DEBUG_PUB.Add('Hold is applied : TRUE',2);

6827: ,x_is_hold_applied => l_is_hold_applied);
6828:
6829: IF NVL(l_is_hold_applied,FALSE) THEN
6830: l_count_of_holds_applied := l_count_of_holds_applied + 1;
6831: OE_DEBUG_PUB.Add('Hold is applied : TRUE',2);
6832: END IF;
6833: l_is_hold_applied := FALSE;
6834:
6835:

Line 6836: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);

6832: END IF;
6833: l_is_hold_applied := FALSE;
6834:
6835:
6836: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
6837: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
6838: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
6839:
6840: /*OE_DEBUG_PUB.Add('Before calling OE_Holds_PVT.Apply_Holds');

Line 6837: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);

6833: l_is_hold_applied := FALSE;
6834:
6835:
6836: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
6837: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
6838: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
6839:
6840: /*OE_DEBUG_PUB.Add('Before calling OE_Holds_PVT.Apply_Holds');
6841: oe_holds_pvt.apply_Holds(

Line 6838: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);

6834:
6835:
6836: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
6837: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
6838: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
6839:
6840: /*OE_DEBUG_PUB.Add('Before calling OE_Holds_PVT.Apply_Holds');
6841: oe_holds_pvt.apply_Holds(
6842: p_hold_source_rec => l_hold_source_rec

Line 6840: /*OE_DEBUG_PUB.Add('Before calling OE_Holds_PVT.Apply_Holds');

6836: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
6837: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
6838: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
6839:
6840: /*OE_DEBUG_PUB.Add('Before calling OE_Holds_PVT.Apply_Holds');
6841: oe_holds_pvt.apply_Holds(
6842: p_hold_source_rec => l_hold_source_rec
6843: ,p_hold_existing_flg => 'Y'
6844: ,p_hold_future_flg => 'Y'

Line 6850: oe_debug_pub.add('process_apply_holds_lines unexpected failure',1);

6846: ,x_msg_count => x_msg_count
6847: ,x_msg_data => x_msg_data);*/
6848:
6849: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
6850: oe_debug_pub.add('process_apply_holds_lines unexpected failure',1);
6851: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6852: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
6853: oe_debug_pub.add('process_apply_holds_lines expected failure',1);
6854: RAISE FND_API.G_EXC_ERROR;

Line 6853: oe_debug_pub.add('process_apply_holds_lines expected failure',1);

6849: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
6850: oe_debug_pub.add('process_apply_holds_lines unexpected failure',1);
6851: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6852: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
6853: oe_debug_pub.add('process_apply_holds_lines expected failure',1);
6854: RAISE FND_API.G_EXC_ERROR;
6855: END IF;
6856:
6857: END LOOP;

Line 6873: oe_debug_pub.add(' Hold Not applied for the requested line');

6869: THEN
6870: fnd_message.set_name('ONT', 'OE_NO_HOLD_FOR_ACTIVITY');
6871: fnd_message.set_token('WF_ACT',l_user_activity_name);
6872: OE_MSG_PUB.ADD;
6873: oe_debug_pub.add(' Hold Not applied for the requested line');
6874: RAISE FND_API.G_EXC_ERROR;
6875: ELSIF l_count_of_holds_applied = 0
6876: AND p_sel_rec_tbl.COUNT > 1 THEN
6877: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');

Line 6880: oe_debug_pub.add('Hold Not applied for ALL requested lines');

6876: AND p_sel_rec_tbl.COUNT > 1 THEN
6877: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
6878: fnd_message.set_token('WF_ACT',l_user_activity_name);
6879: OE_MSG_PUB.ADD;
6880: oe_debug_pub.add('Hold Not applied for ALL requested lines');
6881: RAISE FND_API.G_EXC_ERROR;
6882: ELSIF p_sel_rec_tbl.COUNT > l_count_of_holds_applied
6883: AND p_sel_rec_tbl.COUNT > 1 THEN
6884: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');

Line 6887: oe_debug_pub.add('Hold Not applied for FEW requested lines');

6883: AND p_sel_rec_tbl.COUNT > 1 THEN
6884: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
6885: fnd_message.set_token('WF_ACT',l_user_activity_name);
6886: OE_MSG_PUB.ADD;
6887: oe_debug_pub.add('Hold Not applied for FEW requested lines');
6888: ELSE
6889: NULL; -- No messages are required to be logged.
6890: END IF;
6891: END IF; -- End of WF_HOLDS ER (bug 6449458) IF Condition

Line 6900: OE_DEBUG_PUB.Add('Exiting OE_Holds_PVT.process_apply_holds_lines',1);

6896: ( p_count => x_msg_count
6897: , p_data => x_msg_data
6898: );
6899:
6900: OE_DEBUG_PUB.Add('Exiting OE_Holds_PVT.process_apply_holds_lines',1);
6901:
6902: EXCEPTION /* Procedure exception handler */
6903:
6904: WHEN FND_API.G_EXC_ERROR THEN

Line 6974: OE_DEBUG_PUB.Add('Entering OE_Holds_PVT.process_apply_holds_orders',1);

6970:
6971: BEGIN
6972: oe_msg_pub.initialize;
6973:
6974: OE_DEBUG_PUB.Add('Entering OE_Holds_PVT.process_apply_holds_orders',1);
6975:
6976: IF check_system_holds( p_hold_id => p_hold_id
6977: , x_return_status => x_return_status
6978: , x_msg_count => x_msg_count

Line 6981: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));

6977: , x_return_status => x_return_status
6978: , x_msg_count => x_msg_count
6979: , x_msg_data => x_msg_data
6980: ) = 'N' THEN
6981: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));
6982: fnd_message.set_name('ONT', 'ONT_HOLDS_SYSTEM_CHECK');
6983: OE_MSG_PUB.ADD;
6984: x_return_status := FND_API.G_RET_STS_ERROR;
6985: OE_MSG_PUB.Count_And_Get

Line 6992: OE_DEBUG_PUB.Add('After calling Check_System_Holds');

6988: );
6989: RETURN;
6990: END IF;
6991:
6992: OE_DEBUG_PUB.Add('After calling Check_System_Holds');
6993:
6994: IF check_authorization ( p_hold_id => p_hold_id
6995: , p_authorized_action_code => 'APPLY'
6996: , p_responsibility_id => l_resp_id

Line 7002: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));

6998: , x_return_status => x_return_status
6999: , x_msg_count => x_msg_count
7000: , x_msg_data => x_msg_data
7001: ) = 'N' THEN
7002: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));
7003:
7004: fnd_message.set_name('ONT','ONT_APPLY');
7005: l_msg_token := fnd_message.get;
7006:

Line 7020: OE_DEBUG_PUB.Add('After calling Check_Authorization');

7016: );
7017: RETURN;
7018: END IF;
7019:
7020: OE_DEBUG_PUB.Add('After calling Check_Authorization');
7021:
7022: SAVEPOINT process_apply_holds_orders;
7023: l_prev_org_id := null;
7024: FOR j in 1.. p_sel_rec_tbl.COUNT LOOP

Line 7025: OE_DEBUG_PUB.Add('p_sel_rec_tbl orgID:' || p_sel_rec_tbl(j).org_id ||

7021:
7022: SAVEPOINT process_apply_holds_orders;
7023: l_prev_org_id := null;
7024: FOR j in 1.. p_sel_rec_tbl.COUNT LOOP
7025: OE_DEBUG_PUB.Add('p_sel_rec_tbl orgID:' || p_sel_rec_tbl(j).org_id ||
7026: ', l_prev_org_id:' || l_prev_org_id);
7027:
7028: IF p_sel_rec_tbl(j).org_id <> nvl(l_prev_org_id, -99)
7029: THEN

Line 7030: OE_DEBUG_PUB.Add('Mo_Global.Set_Policy_Context to:' || p_sel_rec_tbl(j).Org_Id );

7026: ', l_prev_org_id:' || l_prev_org_id);
7027:
7028: IF p_sel_rec_tbl(j).org_id <> nvl(l_prev_org_id, -99)
7029: THEN
7030: OE_DEBUG_PUB.Add('Mo_Global.Set_Policy_Context to:' || p_sel_rec_tbl(j).Org_Id );
7031: Mo_Global.Set_Policy_Context (p_access_mode => 'S',
7032: p_org_id => p_sel_rec_tbl(j).Org_Id);
7033: OE_DEBUG_PUB.Add('After the ORG is :' || MO_GLOBAL.get_current_org_id);
7034: l_prev_org_id := p_sel_rec_tbl(j).org_id;

Line 7033: OE_DEBUG_PUB.Add('After the ORG is :' || MO_GLOBAL.get_current_org_id);

7029: THEN
7030: OE_DEBUG_PUB.Add('Mo_Global.Set_Policy_Context to:' || p_sel_rec_tbl(j).Org_Id );
7031: Mo_Global.Set_Policy_Context (p_access_mode => 'S',
7032: p_org_id => p_sel_rec_tbl(j).Org_Id);
7033: OE_DEBUG_PUB.Add('After the ORG is :' || MO_GLOBAL.get_current_org_id);
7034: l_prev_org_id := p_sel_rec_tbl(j).org_id;
7035: END IF;
7036:
7037: l_hold_source_rec.hold_entity_code := 'O';

Line 7051: OE_DEBUG_PUB.Add('Before calling oe_holds_pvt.apply_holds');

7047: from oe_hold_definitions
7048: where hold_id = l_hold_source_rec.hold_id;
7049: END IF;
7050:
7051: OE_DEBUG_PUB.Add('Before calling oe_holds_pvt.apply_holds');
7052: /*oe_holds_pvt.apply_Holds(
7053: p_hold_source_rec => l_hold_source_rec
7054: ,p_hold_existing_flg => 'Y'
7055: ,p_hold_future_flg => 'Y'

Line 7075: OE_DEBUG_PUB.Add('Hold is applied : TRUE',2);

7071: ,x_is_hold_applied => l_is_hold_applied);
7072:
7073: IF NVL(l_is_hold_applied,FALSE) THEN
7074: l_count_of_holds_applied := l_count_of_holds_applied + 1;
7075: OE_DEBUG_PUB.Add('Hold is applied : TRUE',2);
7076: END IF;
7077: l_is_hold_applied := FALSE;
7078:
7079: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);

Line 7079: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);

7075: OE_DEBUG_PUB.Add('Hold is applied : TRUE',2);
7076: END IF;
7077: l_is_hold_applied := FALSE;
7078:
7079: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
7080: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
7081: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
7082:
7083: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

Line 7080: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);

7076: END IF;
7077: l_is_hold_applied := FALSE;
7078:
7079: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
7080: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
7081: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
7082:
7083: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7084: Oe_debug_pub.add('process_apply_holds_orders unexpected failure',3);

Line 7081: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);

7077: l_is_hold_applied := FALSE;
7078:
7079: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
7080: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
7081: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
7082:
7083: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7084: Oe_debug_pub.add('process_apply_holds_orders unexpected failure',3);
7085: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 7084: Oe_debug_pub.add('process_apply_holds_orders unexpected failure',3);

7080: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
7081: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
7082:
7083: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7084: Oe_debug_pub.add('process_apply_holds_orders unexpected failure',3);
7085: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7086: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
7087: oe_debug_pub.add('process_apply_holds_orders expected failure',3);
7088: RAISE FND_API.G_EXC_ERROR;

Line 7087: oe_debug_pub.add('process_apply_holds_orders expected failure',3);

7083: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7084: Oe_debug_pub.add('process_apply_holds_orders unexpected failure',3);
7085: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7086: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
7087: oe_debug_pub.add('process_apply_holds_orders expected failure',3);
7088: RAISE FND_API.G_EXC_ERROR;
7089: END IF;
7090:
7091: END LOOP;

Line 7107: oe_debug_pub.add(' Hold Not applied for the requested line');

7103: THEN
7104: fnd_message.set_name('ONT', 'OE_NO_HOLD_FOR_ACTIVITY');
7105: fnd_message.set_token('WF_ACT',l_user_activity_name);
7106: OE_MSG_PUB.ADD;
7107: oe_debug_pub.add(' Hold Not applied for the requested line');
7108: RAISE FND_API.G_EXC_ERROR;
7109: ELSIF l_count_of_holds_applied = 0
7110: AND p_sel_rec_tbl.COUNT > 1 THEN
7111: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');

Line 7114: oe_debug_pub.add('Hold Not applied for ALL requested lines');

7110: AND p_sel_rec_tbl.COUNT > 1 THEN
7111: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
7112: fnd_message.set_token('WF_ACT',l_user_activity_name);
7113: OE_MSG_PUB.ADD;
7114: oe_debug_pub.add('Hold Not applied for ALL requested lines');
7115: RAISE FND_API.G_EXC_ERROR;
7116: ELSIF p_sel_rec_tbl.COUNT > l_count_of_holds_applied
7117: AND p_sel_rec_tbl.COUNT > 1 THEN
7118: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');

Line 7121: oe_debug_pub.add('Hold Not applied for FEW requested lines');

7117: AND p_sel_rec_tbl.COUNT > 1 THEN
7118: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
7119: fnd_message.set_token('WF_ACT',l_user_activity_name);
7120: OE_MSG_PUB.ADD;
7121: oe_debug_pub.add('Hold Not applied for FEW requested lines');
7122: ELSE
7123: NULL; -- No messages are required to be logged.
7124: END IF;
7125: END IF; -- End of WF_HOLDS ER (bug 6449458) IF Condition

Line 7134: OE_DEBUG_PUB.Add('Exiting OE_Holds_PVT.process_apply_holds_orders',1);

7130: ( p_count => x_msg_count
7131: , p_data => x_msg_data
7132: );
7133:
7134: OE_DEBUG_PUB.Add('Exiting OE_Holds_PVT.process_apply_holds_orders',1);
7135:
7136: EXCEPTION /* Procedure exception handler */
7137:
7138: WHEN FND_API.G_EXC_ERROR THEN

Line 7212: OE_DEBUG_PUB.Add('Entering OE_Holds_PVT.process_release_holds_lines',1);

7208: l_msg_token VARCHAR2(100);
7209: BEGIN
7210: oe_msg_pub.initialize;
7211:
7212: OE_DEBUG_PUB.Add('Entering OE_Holds_PVT.process_release_holds_lines',1);
7213:
7214: IF check_system_holds( p_hold_id => p_hold_id
7215: ,x_return_status => x_return_status
7216: ,x_msg_count => x_msg_count

Line 7219: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));

7215: ,x_return_status => x_return_status
7216: ,x_msg_count => x_msg_count
7217: ,x_msg_data => x_msg_data
7218: ) = 'N' THEN
7219: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));
7220: fnd_message.set_name('ONT', 'ONT_HOLDS_SYSTEM_CHECK');
7221: OE_MSG_PUB.ADD;
7222: x_return_status := FND_API.G_RET_STS_ERROR;
7223: OE_MSG_PUB.Count_And_Get

Line 7230: OE_DEBUG_PUB.Add('After calling Check_System_Holds');

7226: );
7227: RETURN;
7228: END IF;
7229:
7230: OE_DEBUG_PUB.Add('After calling Check_System_Holds');
7231:
7232: IF check_authorization ( p_hold_id => p_hold_id
7233: ,p_authorized_action_code => 'REMOVE'
7234: ,p_responsibility_id => l_resp_id

Line 7240: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'||to_char(p_hold_id));

7236: ,x_return_status => x_return_status
7237: ,x_msg_count => x_msg_count
7238: ,x_msg_data => x_msg_data
7239: ) = 'N' THEN
7240: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'||to_char(p_hold_id));
7241: fnd_message.set_name('ONT','ONT_RELEASE');
7242: l_msg_token := fnd_message.get;
7243:
7244: fnd_message.set_name('ONT', 'OE_HOLDS_AUTHORIZATION_FAILED');

Line 7257: OE_DEBUG_PUB.Add('After calling Check_Authorization');

7253: );
7254: RETURN;
7255: END IF;
7256:
7257: OE_DEBUG_PUB.Add('After calling Check_Authorization');
7258:
7259: SAVEPOINT process_release_holds_lines;
7260:
7261: l_prev_org_id := null;

Line 7265: OE_DEBUG_PUB.Add('Mo_Global.Set_Policy_Context to:' || p_sel_rec_tbl(j).Org_Id );

7261: l_prev_org_id := null;
7262: FOR j in 1.. p_sel_rec_tbl.COUNT LOOP
7263: IF p_sel_rec_tbl(j).org_id <> nvl(l_prev_org_id, -99)
7264: THEN
7265: OE_DEBUG_PUB.Add('Mo_Global.Set_Policy_Context to:' || p_sel_rec_tbl(j).Org_Id );
7266: Mo_Global.Set_Policy_Context (p_access_mode => 'S',
7267: p_org_id => p_sel_rec_tbl(j).Org_Id);
7268: l_prev_org_id := p_sel_rec_tbl(j).org_id;
7269: END IF;

Line 7277: OE_DEBUG_PUB.Add('header_id: '||l_line_rec.header_id);

7273: OE_LINE_UTIL.Query_Row
7274: ( p_line_id => l_line_id,
7275: x_line_rec => l_line_rec
7276: );
7277: OE_DEBUG_PUB.Add('header_id: '||l_line_rec.header_id);
7278: OE_DEBUG_PUB.Add('Line_id: '||to_char(l_line_rec.line_id));
7279: l_order_tbl(1).header_id := l_line_rec.header_id;
7280: l_order_tbl(1).line_id := l_line_rec.line_id;
7281:

Line 7278: OE_DEBUG_PUB.Add('Line_id: '||to_char(l_line_rec.line_id));

7274: ( p_line_id => l_line_id,
7275: x_line_rec => l_line_rec
7276: );
7277: OE_DEBUG_PUB.Add('header_id: '||l_line_rec.header_id);
7278: OE_DEBUG_PUB.Add('Line_id: '||to_char(l_line_rec.line_id));
7279: l_order_tbl(1).header_id := l_line_rec.header_id;
7280: l_order_tbl(1).line_id := l_line_rec.line_id;
7281:
7282:

Line 7283: OE_DEBUG_PUB.Add('B4 Calling oe_holds_pvt.release_holds:HeaderID'

7279: l_order_tbl(1).header_id := l_line_rec.header_id;
7280: l_order_tbl(1).line_id := l_line_rec.line_id;
7281:
7282:
7283: OE_DEBUG_PUB.Add('B4 Calling oe_holds_pvt.release_holds:HeaderID'
7284: || l_order_tbl(1).header_id || ', LineID:' || l_order_tbl(1).line_id);
7285: oe_holds_pvt.release_holds(
7286: p_order_tbl => l_order_tbl,
7287: p_hold_id => p_hold_id,

Line 7296: OE_DEBUG_PUB.Add('After oe_holds_pvt.release_holds:' || x_return_status,3);

7292: x_msg_count => x_msg_count,
7293: x_msg_data => x_msg_data
7294: );
7295:
7296: OE_DEBUG_PUB.Add('After oe_holds_pvt.release_holds:' || x_return_status,3);
7297:
7298:
7299: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7300: oe_debug_pub.add('process_release_holds_lines unexpected failure',3);

Line 7300: oe_debug_pub.add('process_release_holds_lines unexpected failure',3);

7296: OE_DEBUG_PUB.Add('After oe_holds_pvt.release_holds:' || x_return_status,3);
7297:
7298:
7299: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7300: oe_debug_pub.add('process_release_holds_lines unexpected failure',3);
7301: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7302: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
7303: oe_debug_pub.add('process_release_holds_lines failure',3);
7304: RAISE FND_API.G_EXC_ERROR;

Line 7303: oe_debug_pub.add('process_release_holds_lines failure',3);

7299: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7300: oe_debug_pub.add('process_release_holds_lines unexpected failure',3);
7301: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7302: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
7303: oe_debug_pub.add('process_release_holds_lines failure',3);
7304: RAISE FND_API.G_EXC_ERROR;
7305: END IF;
7306:
7307: END LOOP;

Line 7316: OE_DEBUG_PUB.Add('Exiting OE_Holds_PVT.process_release_holds_lines',1);

7312: ( p_count => x_msg_count
7313: , p_data => x_msg_data
7314: );
7315:
7316: OE_DEBUG_PUB.Add('Exiting OE_Holds_PVT.process_release_holds_lines',1);
7317:
7318: EXCEPTION /* Procedure exception handler */
7319:
7320: WHEN FND_API.G_EXC_ERROR THEN

Line 7388: OE_DEBUG_PUB.Add('Entering OE_Holds_PVT.process_release_holds_orders',1);

7384: l_msg_token VARCHAR2(100);
7385: BEGIN
7386: oe_msg_pub.initialize;
7387:
7388: OE_DEBUG_PUB.Add('Entering OE_Holds_PVT.process_release_holds_orders',1);
7389:
7390: IF check_system_holds( p_hold_id => p_hold_id
7391: ,x_return_status => x_return_status
7392: ,x_msg_count => x_msg_count

Line 7395: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));

7391: ,x_return_status => x_return_status
7392: ,x_msg_count => x_msg_count
7393: ,x_msg_data => x_msg_data
7394: ) = 'N' THEN
7395: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));
7396: fnd_message.set_name('ONT', 'ONT_HOLDS_SYSTEM_CHECK');
7397: OE_MSG_PUB.ADD;
7398: x_return_status := FND_API.G_RET_STS_ERROR;
7399: OE_MSG_PUB.Count_And_Get

Line 7406: OE_DEBUG_PUB.Add('After calling Check_System_Holds');

7402: );
7403: RETURN;
7404: END IF;
7405:
7406: OE_DEBUG_PUB.Add('After calling Check_System_Holds');
7407:
7408: IF check_authorization ( p_hold_id => p_hold_id
7409: ,p_authorized_action_code => 'REMOVE'
7410: ,p_responsibility_id => l_resp_id

Line 7416: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(p_hold_id),1);

7412: ,x_return_status => x_return_status
7413: ,x_msg_count => x_msg_count
7414: ,x_msg_data => x_msg_data
7415: ) = 'N' THEN
7416: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(p_hold_id),1);
7417: fnd_message.set_name('ONT','ONT_RELEASE');
7418: l_msg_token := fnd_message.get;
7419:
7420: fnd_message.set_name('ONT', 'OE_HOLDS_AUTHORIZATION_FAILED');

Line 7435: OE_DEBUG_PUB.Add('After calling Check_Authorization');

7431:
7432: RETURN;
7433: END IF;
7434:
7435: OE_DEBUG_PUB.Add('After calling Check_Authorization');
7436:
7437: SAVEPOINT process_release_holds_orders;
7438:
7439: OE_DEBUG_PUB.Add('Release_Reason_Code: '||p_release_reason_code);

Line 7439: OE_DEBUG_PUB.Add('Release_Reason_Code: '||p_release_reason_code);

7435: OE_DEBUG_PUB.Add('After calling Check_Authorization');
7436:
7437: SAVEPOINT process_release_holds_orders;
7438:
7439: OE_DEBUG_PUB.Add('Release_Reason_Code: '||p_release_reason_code);
7440:
7441: l_prev_org_id := null;
7442: FOR j in 1.. p_sel_rec_tbl.COUNT LOOP
7443: IF p_sel_rec_tbl(j).org_id <> nvl(l_prev_org_id, -99)

Line 7445: OE_DEBUG_PUB.Add('Mo_Global.Set_Policy_Context to:' || p_sel_rec_tbl(j).Org_Id );

7441: l_prev_org_id := null;
7442: FOR j in 1.. p_sel_rec_tbl.COUNT LOOP
7443: IF p_sel_rec_tbl(j).org_id <> nvl(l_prev_org_id, -99)
7444: THEN
7445: OE_DEBUG_PUB.Add('Mo_Global.Set_Policy_Context to:' || p_sel_rec_tbl(j).Org_Id );
7446: Mo_Global.Set_Policy_Context (p_access_mode => 'S',
7447: p_org_id => p_sel_rec_tbl(j).Org_Id);
7448: l_prev_org_id := p_sel_rec_tbl(j).org_id;
7449: END IF;

Line 7452: OE_DEBUG_PUB.Add('B4 Calling oe_holds_pvt.release_holds 4 HeaderID' || l_order_tbl(1).header_id);

7448: l_prev_org_id := p_sel_rec_tbl(j).org_id;
7449: END IF;
7450: l_order_tbl(1).header_id := p_sel_rec_tbl(j).Id1;
7451:
7452: OE_DEBUG_PUB.Add('B4 Calling oe_holds_pvt.release_holds 4 HeaderID' || l_order_tbl(1).header_id);
7453: oe_holds_pvt.release_holds(
7454: p_order_tbl => l_order_tbl,
7455: p_hold_id => p_hold_id,
7456: p_release_reason_code => p_release_reason_code,

Line 7464: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);

7460: x_msg_count => x_msg_count,
7461: x_msg_data => x_msg_data
7462: );
7463:
7464: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
7465: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
7466: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
7467:
7468: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

Line 7465: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);

7461: x_msg_data => x_msg_data
7462: );
7463:
7464: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
7465: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
7466: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
7467:
7468: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7469: oe_debug_pub.add('process_release_holds_orders unexpected failure',3);

Line 7466: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);

7462: );
7463:
7464: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
7465: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
7466: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
7467:
7468: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7469: oe_debug_pub.add('process_release_holds_orders unexpected failure',3);
7470: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 7469: oe_debug_pub.add('process_release_holds_orders unexpected failure',3);

7465: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
7466: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
7467:
7468: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7469: oe_debug_pub.add('process_release_holds_orders unexpected failure',3);
7470: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7471: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
7472: oe_debug_pub.add('process_release_holds_orders failure',3);
7473: RAISE FND_API.G_EXC_ERROR;

Line 7472: oe_debug_pub.add('process_release_holds_orders failure',3);

7468: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7469: oe_debug_pub.add('process_release_holds_orders unexpected failure',3);
7470: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7471: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
7472: oe_debug_pub.add('process_release_holds_orders failure',3);
7473: RAISE FND_API.G_EXC_ERROR;
7474: END IF;
7475:
7476:

Line 7486: OE_DEBUG_PUB.Add('Exiting OE_Holds_PVT.process_release_holds_orders',1);

7482: ( p_count => x_msg_count
7483: , p_data => x_msg_data
7484: );
7485:
7486: OE_DEBUG_PUB.Add('Exiting OE_Holds_PVT.process_release_holds_orders',1);
7487:
7488: EXCEPTION /* Procedure exception handler */
7489:
7490: WHEN FND_API.G_EXC_ERROR THEN

Line 7556: oe_debug_pub.add('In process_create_holds', 1);

7552: l_count_of_holds_applied NUMBER := 0;
7553:
7554: --
7555: BEGIN
7556: oe_debug_pub.add('In process_create_holds', 1);
7557: oe_msg_pub.initialize; --bug 5548778
7558: l_hold_source_rec := p_hold_source_rec;
7559:
7560:

Line 7563: oe_debug_pub.add('Hold Entity Code Reset to C from CN');

7559:
7560:
7561: -- ER #11824468
7562: if (l_hold_source_rec.hold_entity_code='CN') then
7563: oe_debug_pub.add('Hold Entity Code Reset to C from CN');
7564: l_hold_source_rec.hold_entity_code:='C';
7565: end if;
7566: if (l_hold_source_rec.hold_entity_code2='CN') then
7567: oe_debug_pub.add('Hold Entity Code2 Reset to C from CN');

Line 7567: oe_debug_pub.add('Hold Entity Code2 Reset to C from CN');

7563: oe_debug_pub.add('Hold Entity Code Reset to C from CN');
7564: l_hold_source_rec.hold_entity_code:='C';
7565: end if;
7566: if (l_hold_source_rec.hold_entity_code2='CN') then
7567: oe_debug_pub.add('Hold Entity Code2 Reset to C from CN');
7568: l_hold_source_rec.hold_entity_code2:='C';
7569: end if;
7570: -- ER #11824468
7571:

Line 7574: oe_debug_pub.add('Hold Entity Code Reset to EC from EN');

7570: -- ER #11824468
7571:
7572: --ER#12571983 converting'EC' to 'EN'
7573: if (l_hold_source_rec.hold_entity_code='EN') then
7574: oe_debug_pub.add('Hold Entity Code Reset to EC from EN');
7575: l_hold_source_rec.hold_entity_code:='EC';
7576: end if;
7577: if (l_hold_source_rec.hold_entity_code2='EN') then
7578: oe_debug_pub.add('Hold Entity Code2 Reset to EC from EN');

Line 7578: oe_debug_pub.add('Hold Entity Code2 Reset to EC from EN');

7574: oe_debug_pub.add('Hold Entity Code Reset to EC from EN');
7575: l_hold_source_rec.hold_entity_code:='EC';
7576: end if;
7577: if (l_hold_source_rec.hold_entity_code2='EN') then
7578: oe_debug_pub.add('Hold Entity Code2 Reset to EC from EN');
7579: l_hold_source_rec.hold_entity_code2:='EC';
7580: end if;
7581: --ER#12571983 end
7582:

Line 7588: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(l_hold_source_rec.hold_id));

7584: ,x_return_status => x_return_status
7585: ,x_msg_count => x_msg_count
7586: ,x_msg_data => x_msg_data
7587: ) = 'N' THEN
7588: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(l_hold_source_rec.hold_id));
7589: fnd_message.set_name('ONT', 'ONT_HOLDS_SYSTEM_CHECK');
7590: OE_MSG_PUB.ADD;
7591: x_return_status := FND_API.G_RET_STS_ERROR;
7592: OE_MSG_PUB.Count_And_Get

Line 7607: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'||

7603: ,x_return_status => x_return_status
7604: ,x_msg_count => x_msg_count
7605: ,x_msg_data => x_msg_data
7606: ) = 'N' THEN
7607: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'||
7608: to_char(l_hold_source_rec.hold_id));
7609:
7610: fnd_message.set_name('ONT','ONT_APPLY');
7611: l_msg_token := fnd_message.get;

Line 7627: oe_debug_pub.add('p_hold_existing_flg->' || p_hold_existing_flg,3);

7623: return;
7624: END IF;
7625:
7626:
7627: oe_debug_pub.add('p_hold_existing_flg->' || p_hold_existing_flg,3);
7628: oe_debug_pub.add('p_hold_future_flg->' || p_hold_future_flg,3);
7629: /*added the select statement for WF_HOLDS ER (bug 6449458)*/
7630: select item_type, activity_name
7631: into l_item_type, l_activity_name

Line 7628: oe_debug_pub.add('p_hold_future_flg->' || p_hold_future_flg,3);

7624: END IF;
7625:
7626:
7627: oe_debug_pub.add('p_hold_existing_flg->' || p_hold_existing_flg,3);
7628: oe_debug_pub.add('p_hold_future_flg->' || p_hold_future_flg,3);
7629: /*added the select statement for WF_HOLDS ER (bug 6449458)*/
7630: select item_type, activity_name
7631: into l_item_type, l_activity_name
7632: from oe_hold_definitions

Line 7636: oe_debug_pub.add('Calling oe_holds_pvt.apply_Holds',3);

7632: from oe_hold_definitions
7633: where hold_id = l_hold_source_rec.hold_id;
7634:
7635: if (p_hold_existing_flg = 'Y' AND p_hold_future_flg = 'Y') then
7636: oe_debug_pub.add('Calling oe_holds_pvt.apply_Holds',3);
7637: /*oe_holds_pvt.apply_Holds(
7638: p_hold_source_rec => l_hold_source_rec
7639: ,x_return_status => x_return_status
7640: ,x_msg_count => x_msg_count

Line 7657: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);

7653: ,x_msg_data => x_msg_data
7654: ,x_is_hold_applied => l_is_hold_applied
7655: );
7656:
7657: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
7658: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7659: oe_debug_pub.add('process_create_holds unexpected failure',1);
7660: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7661: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN

Line 7659: oe_debug_pub.add('process_create_holds unexpected failure',1);

7655: );
7656:
7657: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
7658: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7659: oe_debug_pub.add('process_create_holds unexpected failure',1);
7660: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7661: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
7662: oe_debug_pub.add('process_create_holds expected failure',1);
7663: RAISE FND_API.G_EXC_ERROR;

Line 7662: oe_debug_pub.add('process_create_holds expected failure',1);

7658: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7659: oe_debug_pub.add('process_create_holds unexpected failure',1);
7660: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7661: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
7662: oe_debug_pub.add('process_create_holds expected failure',1);
7663: RAISE FND_API.G_EXC_ERROR;
7664: END IF;
7665: x_return_status := FND_API.G_RET_STS_SUCCESS;
7666: elsif (p_hold_existing_flg = 'Y' AND p_hold_future_flg = 'N') then

Line 7670: oe_debug_pub.add('Calling Create_Hold_Source',3);

7666: elsif (p_hold_existing_flg = 'Y' AND p_hold_future_flg = 'N') then
7667: -- Create_Hold_Source (Create the Hold Source)
7668: -- Create_Order_Holds (Put the existing Orders on Hold)
7669: -- Create_Release_Source (Release the source.Do not release orders from hold)
7670: oe_debug_pub.add('Calling Create_Hold_Source',3);
7671: Create_Hold_Source (
7672: p_hold_source_rec => l_hold_source_rec,
7673: p_org_id =>p_org_id, --ER#7479609
7674: x_hold_source_id => l_hold_source_id,

Line 7687: OE_DEBUG_PUB.Add('l_hold_source_id->' || to_char(l_hold_source_id) ,3);

7683: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
7684: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7685: END IF;
7686: END IF;
7687: OE_DEBUG_PUB.Add('l_hold_source_id->' || to_char(l_hold_source_id) ,3);
7688: l_hold_source_rec.hold_source_id := l_hold_source_id;
7689: OE_DEBUG_PUB.Add ('Calling Create_Order_Holds',3);
7690: Create_Order_Holds (
7691: p_hold_source_rec => l_hold_source_rec

Line 7689: OE_DEBUG_PUB.Add ('Calling Create_Order_Holds',3);

7685: END IF;
7686: END IF;
7687: OE_DEBUG_PUB.Add('l_hold_source_id->' || to_char(l_hold_source_id) ,3);
7688: l_hold_source_rec.hold_source_id := l_hold_source_id;
7689: OE_DEBUG_PUB.Add ('Calling Create_Order_Holds',3);
7690: Create_Order_Holds (
7691: p_hold_source_rec => l_hold_source_rec
7692: ,p_org_id =>p_org_id --ER#7479609
7693: ,x_return_status => x_return_status

Line 7697: OE_DEBUG_PUB.Add('After Create_Order_Holds',3);

7693: ,x_return_status => x_return_status
7694: ,x_msg_count => x_msg_count
7695: ,x_msg_data => x_msg_data
7696: );
7697: OE_DEBUG_PUB.Add('After Create_Order_Holds',3);
7698: -- XX Should be a new reason code
7699: l_hold_release_rec.hold_source_id := l_hold_source_id;
7700: l_hold_release_rec.release_reason_code := 'EXPIRE';
7701: l_hold_release_rec.release_comment := 'Released automatically by System';

Line 7702: oe_debug_pub.add('Calling Create_Release_Source',3);

7698: -- XX Should be a new reason code
7699: l_hold_release_rec.hold_source_id := l_hold_source_id;
7700: l_hold_release_rec.release_reason_code := 'EXPIRE';
7701: l_hold_release_rec.release_comment := 'Released automatically by System';
7702: oe_debug_pub.add('Calling Create_Release_Source',3);
7703: OE_HOLDS_PVT.Create_Release_Source(p_hold_release_rec => l_hold_release_rec,
7704: x_hold_release_id => l_hold_release_id,
7705: x_return_status => x_return_status,
7706: x_msg_count => x_msg_count,

Line 7708: OE_DEBUG_PUB.Add('Create_Order_Holds Status' || x_return_status,3);

7704: x_hold_release_id => l_hold_release_id,
7705: x_return_status => x_return_status,
7706: x_msg_count => x_msg_count,
7707: x_msg_data => x_msg_data);
7708: OE_DEBUG_PUB.Add('Create_Order_Holds Status' || x_return_status,3);
7709:
7710: elsif (p_hold_existing_flg = 'N' AND p_hold_future_flg = 'Y') then
7711: -- call create_hold_source for only future holds to go on hold.
7712: OE_DEBUG_PUB.Add('Calling Create_Hold_Source',3);

Line 7712: OE_DEBUG_PUB.Add('Calling Create_Hold_Source',3);

7708: OE_DEBUG_PUB.Add('Create_Order_Holds Status' || x_return_status,3);
7709:
7710: elsif (p_hold_existing_flg = 'N' AND p_hold_future_flg = 'Y') then
7711: -- call create_hold_source for only future holds to go on hold.
7712: OE_DEBUG_PUB.Add('Calling Create_Hold_Source',3);
7713: Create_Hold_Source (
7714: p_hold_source_rec => l_hold_source_rec,
7715: p_org_id =>p_org_id, --ER#7479609
7716: x_hold_source_id => l_hold_source_id,

Line 7730: oe_debug_pub.add ('Both of Hold Future and Existing Flag are unset',3);

7726: END IF;
7727: END IF;
7728: else
7729: -- Should not get here
7730: oe_debug_pub.add ('Both of Hold Future and Existing Flag are unset',3);
7731: oe_debug_pub.add ('Do nothing',3);
7732: end if; -- (p_hold_existing_flg = 'Y' AND p_hold_future_flg 'Y')
7733: -- Get message count and data
7734:

Line 7731: oe_debug_pub.add ('Do nothing',3);

7727: END IF;
7728: else
7729: -- Should not get here
7730: oe_debug_pub.add ('Both of Hold Future and Existing Flag are unset',3);
7731: oe_debug_pub.add ('Do nothing',3);
7732: end if; -- (p_hold_existing_flg = 'Y' AND p_hold_future_flg 'Y')
7733: -- Get message count and data
7734:
7735: OE_MSG_PUB.Count_And_Get

Line 7814: OE_DEBUG_PUB.Add('Bug 1946783 Credit Hold should be released from AR',1);

7810:
7811: /* Bug 1946783 - Added Check for credit hold created from AR */
7812:
7813: If l_hold_id = 1 AND (l_hold_entity_code ='C' OR l_hold_entity_code = 'B') then
7814: OE_DEBUG_PUB.Add('Bug 1946783 Credit Hold should be released from AR',1);
7815:
7816: fnd_message.set_name('ONT', 'OE_CC_AR_HOLD_NOT_RELEASED');
7817: OE_MSG_PUB.ADD;
7818: RAISE FND_API.G_EXC_ERROR;

Line 7835: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(l_hold_id));

7831: ,x_return_status => x_return_status
7832: ,x_msg_count => x_msg_count
7833: ,x_msg_data => x_msg_data
7834: ) = 'N' THEN
7835: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(l_hold_id));
7836: fnd_message.set_name('ONT', 'ONT_HOLDS_SYSTEM_CHECK');
7837: fnd_message.set_token('ACTION', 'Release');
7838: OE_MSG_PUB.ADD;
7839: x_return_status := FND_API.G_RET_STS_ERROR;

Line 7855: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(l_hold_id));

7851: ,x_return_status => x_return_status
7852: ,x_msg_count => x_msg_count
7853: ,x_msg_data => x_msg_data
7854: ) = 'N' THEN
7855: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(l_hold_id));
7856:
7857: fnd_message.set_name('ONT','ONT_RELEASE');
7858: l_msg_token := fnd_message.get;
7859:

Line 7886: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);

7882: ,x_return_status => x_return_status
7883: ,x_msg_count => x_msg_count
7884: ,x_msg_data => x_msg_data
7885: );
7886: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);
7887:
7888: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7889: oe_debug_pub.add('process_release_source unexpected failure',3);
7890: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 7889: oe_debug_pub.add('process_release_source unexpected failure',3);

7885: );
7886: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);
7887:
7888: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7889: oe_debug_pub.add('process_release_source unexpected failure',3);
7890: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7891: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
7892: oe_debug_pub.add('process_release_source expected failure',3);
7893: RAISE FND_API.G_EXC_ERROR;

Line 7892: oe_debug_pub.add('process_release_source expected failure',3);

7888: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
7889: oe_debug_pub.add('process_release_source unexpected failure',3);
7890: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7891: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
7892: oe_debug_pub.add('process_release_source expected failure',3);
7893: RAISE FND_API.G_EXC_ERROR;
7894: END IF;
7895:
7896: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 7995: OE_DEBUG_PUB.Add('Entering OE_Holds_PVT.process_release_holds_lines',1);

7991: l_msg_token VARCHAR2(100);
7992: BEGIN
7993: oe_msg_pub.initialize;
7994:
7995: OE_DEBUG_PUB.Add('Entering OE_Holds_PVT.process_release_holds_lines',1);
7996:
7997: IF check_system_holds( p_hold_id => p_hold_id
7998: ,x_return_status => x_return_status
7999: ,x_msg_count => x_msg_count

Line 8002: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));

7998: ,x_return_status => x_return_status
7999: ,x_msg_count => x_msg_count
8000: ,x_msg_data => x_msg_data
8001: ) = 'N' THEN
8002: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));
8003: fnd_message.set_name('ONT', 'ONT_HOLDS_SYSTEM_CHECK');
8004: OE_MSG_PUB.ADD;
8005: x_return_status := FND_API.G_RET_STS_ERROR;
8006: OE_MSG_PUB.Count_And_Get

Line 8013: OE_DEBUG_PUB.Add('After calling Check_System_Holds');

8009: );
8010: RETURN;
8011: END IF;
8012:
8013: OE_DEBUG_PUB.Add('After calling Check_System_Holds');
8014:
8015: IF check_authorization ( p_hold_id => p_hold_id
8016: ,p_authorized_action_code => 'REMOVE'
8017: ,p_responsibility_id => l_resp_id

Line 8023: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'||to_char(p_hold_id));

8019: ,x_return_status => x_return_status
8020: ,x_msg_count => x_msg_count
8021: ,x_msg_data => x_msg_data
8022: ) = 'N' THEN
8023: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'||to_char(p_hold_id));
8024: fnd_message.set_name('ONT','ONT_RELEASE');
8025: l_msg_token := fnd_message.get;
8026:
8027: fnd_message.set_name('ONT', 'OE_HOLDS_AUTHORIZATION_FAILED');

Line 8040: OE_DEBUG_PUB.Add('After calling Check_Authorization');

8036: );
8037: RETURN;
8038: END IF;
8039:
8040: OE_DEBUG_PUB.Add('After calling Check_Authorization');
8041:
8042: SAVEPOINT process_release_holds_lines;
8043:
8044: l_prev_org_id := null;

Line 8048: OE_DEBUG_PUB.Add('Mo_Global.Set_Policy_Context to:' || p_sel_rec_tbl(j).Org_Id );

8044: l_prev_org_id := null;
8045: FOR j in 1.. p_sel_rec_tbl.COUNT LOOP
8046: IF p_sel_rec_tbl(j).org_id <> nvl(l_prev_org_id, -99)
8047: THEN
8048: OE_DEBUG_PUB.Add('Mo_Global.Set_Policy_Context to:' || p_sel_rec_tbl(j).Org_Id );
8049: Mo_Global.Set_Policy_Context (p_access_mode => 'S',
8050: p_org_id => p_sel_rec_tbl(j).Org_Id);
8051: l_prev_org_id := p_sel_rec_tbl(j).org_id;
8052: END IF;

Line 8059: OE_DEBUG_PUB.Add('header_id: '||l_line_rec.header_id);

8055: OE_LINE_UTIL.Query_Row
8056: ( p_line_id => l_line_id,
8057: x_line_rec => l_line_rec
8058: );
8059: OE_DEBUG_PUB.Add('header_id: '||l_line_rec.header_id);
8060: OE_DEBUG_PUB.Add('Line_id: '||to_char(l_line_rec.line_id));
8061: l_order_tbl(1).header_id := l_line_rec.header_id;
8062: l_order_tbl(1).line_id := l_line_rec.line_id;
8063:

Line 8060: OE_DEBUG_PUB.Add('Line_id: '||to_char(l_line_rec.line_id));

8056: ( p_line_id => l_line_id,
8057: x_line_rec => l_line_rec
8058: );
8059: OE_DEBUG_PUB.Add('header_id: '||l_line_rec.header_id);
8060: OE_DEBUG_PUB.Add('Line_id: '||to_char(l_line_rec.line_id));
8061: l_order_tbl(1).header_id := l_line_rec.header_id;
8062: l_order_tbl(1).line_id := l_line_rec.line_id;
8063:
8064:

Line 8065: OE_DEBUG_PUB.Add('B4 Calling oe_holds_pvt.release_holds:HeaderID'

8061: l_order_tbl(1).header_id := l_line_rec.header_id;
8062: l_order_tbl(1).line_id := l_line_rec.line_id;
8063:
8064:
8065: OE_DEBUG_PUB.Add('B4 Calling oe_holds_pvt.release_holds:HeaderID'
8066: || l_order_tbl(1).header_id || ', LineID:' || l_order_tbl(1).line_id);
8067: oe_holds_pvt.release_holds(
8068: p_order_tbl => l_order_tbl,
8069: p_hold_id => p_hold_id,

Line 8078: OE_DEBUG_PUB.Add('After oe_holds_pvt.release_holds:' || x_return_status,3);

8074: x_msg_count => x_msg_count,
8075: x_msg_data => x_msg_data
8076: );
8077:
8078: OE_DEBUG_PUB.Add('After oe_holds_pvt.release_holds:' || x_return_status,3);
8079:
8080: -- Changes begin : ER 1373910
8081: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
8082:

Line 8084: OE_DEBUG_PUB.Add('Before calling Oe_holds_pvt.progress_order');

8080: -- Changes begin : ER 1373910
8081: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
8082:
8083: IF p_wf_release_action = 'Y' THEN
8084: OE_DEBUG_PUB.Add('Before calling Oe_holds_pvt.progress_order');
8085: progress_order( p_hold_id,
8086: p_num_of_records,
8087: l_order_tbl,
8088: x_return_status,

Line 8091: OE_DEBUG_PUB.Add('After Oe_holds_pvt.progress_order : ' || x_return_status,3);

8087: l_order_tbl,
8088: x_return_status,
8089: x_msg_count,
8090: x_msg_data );
8091: OE_DEBUG_PUB.Add('After Oe_holds_pvt.progress_order : ' || x_return_status,3);
8092: END IF;
8093: END IF;
8094: -- Changes End : ER 1373910
8095:

Line 8097: oe_debug_pub.add('process_release_holds_lines unexpected failure',3);

8093: END IF;
8094: -- Changes End : ER 1373910
8095:
8096: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
8097: oe_debug_pub.add('process_release_holds_lines unexpected failure',3);
8098: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8099: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
8100: oe_debug_pub.add('process_release_holds_lines failure',3);
8101: RAISE FND_API.G_EXC_ERROR;

Line 8100: oe_debug_pub.add('process_release_holds_lines failure',3);

8096: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
8097: oe_debug_pub.add('process_release_holds_lines unexpected failure',3);
8098: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8099: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
8100: oe_debug_pub.add('process_release_holds_lines failure',3);
8101: RAISE FND_API.G_EXC_ERROR;
8102: END IF;
8103:
8104: END LOOP;

Line 8113: OE_DEBUG_PUB.Add('Exiting OE_Holds_PVT.process_release_holds_lines',1);

8109: ( p_count => x_msg_count
8110: , p_data => x_msg_data
8111: );
8112:
8113: OE_DEBUG_PUB.Add('Exiting OE_Holds_PVT.process_release_holds_lines',1);
8114:
8115: EXCEPTION /* Procedure exception handler */
8116:
8117: WHEN FND_API.G_EXC_ERROR THEN

Line 8204: OE_DEBUG_PUB.Add('Entering OE_Holds_PVT.process_release_holds_orders',1);

8200: l_msg_token VARCHAR2(100);
8201: BEGIN
8202: oe_msg_pub.initialize;
8203:
8204: OE_DEBUG_PUB.Add('Entering OE_Holds_PVT.process_release_holds_orders',1);
8205:
8206: IF check_system_holds( p_hold_id => p_hold_id
8207: ,x_return_status => x_return_status
8208: ,x_msg_count => x_msg_count

Line 8211: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));

8207: ,x_return_status => x_return_status
8208: ,x_msg_count => x_msg_count
8209: ,x_msg_data => x_msg_data
8210: ) = 'N' THEN
8211: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_id));
8212: fnd_message.set_name('ONT', 'ONT_HOLDS_SYSTEM_CHECK');
8213: OE_MSG_PUB.ADD;
8214: x_return_status := FND_API.G_RET_STS_ERROR;
8215: OE_MSG_PUB.Count_And_Get

Line 8222: OE_DEBUG_PUB.Add('After calling Check_System_Holds');

8218: );
8219: RETURN;
8220: END IF;
8221:
8222: OE_DEBUG_PUB.Add('After calling Check_System_Holds');
8223:
8224: IF check_authorization ( p_hold_id => p_hold_id
8225: ,p_authorized_action_code => 'REMOVE'
8226: ,p_responsibility_id => l_resp_id

Line 8232: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(p_hold_id),1);

8228: ,x_return_status => x_return_status
8229: ,x_msg_count => x_msg_count
8230: ,x_msg_data => x_msg_data
8231: ) = 'N' THEN
8232: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(p_hold_id),1);
8233: fnd_message.set_name('ONT','ONT_RELEASE');
8234: l_msg_token := fnd_message.get;
8235:
8236: fnd_message.set_name('ONT', 'OE_HOLDS_AUTHORIZATION_FAILED');

Line 8251: OE_DEBUG_PUB.Add('After calling Check_Authorization');

8247:
8248: RETURN;
8249: END IF;
8250:
8251: OE_DEBUG_PUB.Add('After calling Check_Authorization');
8252:
8253: SAVEPOINT process_release_holds_orders;
8254:
8255: OE_DEBUG_PUB.Add('Release_Reason_Code: '||p_release_reason_code);

Line 8255: OE_DEBUG_PUB.Add('Release_Reason_Code: '||p_release_reason_code);

8251: OE_DEBUG_PUB.Add('After calling Check_Authorization');
8252:
8253: SAVEPOINT process_release_holds_orders;
8254:
8255: OE_DEBUG_PUB.Add('Release_Reason_Code: '||p_release_reason_code);
8256:
8257: l_prev_org_id := null;
8258: FOR j in 1.. p_sel_rec_tbl.COUNT LOOP
8259: IF p_sel_rec_tbl(j).org_id <> nvl(l_prev_org_id, -99) THEN

Line 8260: OE_DEBUG_PUB.Add('Mo_Global.Set_Policy_Context to:' || p_sel_rec_tbl(j).Org_Id );

8256:
8257: l_prev_org_id := null;
8258: FOR j in 1.. p_sel_rec_tbl.COUNT LOOP
8259: IF p_sel_rec_tbl(j).org_id <> nvl(l_prev_org_id, -99) THEN
8260: OE_DEBUG_PUB.Add('Mo_Global.Set_Policy_Context to:' || p_sel_rec_tbl(j).Org_Id );
8261: Mo_Global.Set_Policy_Context (p_access_mode => 'S',
8262: p_org_id => p_sel_rec_tbl(j).Org_Id);
8263: l_prev_org_id := p_sel_rec_tbl(j).org_id;
8264: END IF;

Line 8267: OE_DEBUG_PUB.Add('B4 Calling oe_holds_pvt.release_holds 4 HeaderID' || l_order_tbl(1).header_id);

8263: l_prev_org_id := p_sel_rec_tbl(j).org_id;
8264: END IF;
8265: l_order_tbl(1).header_id := p_sel_rec_tbl(j).Id1;
8266:
8267: OE_DEBUG_PUB.Add('B4 Calling oe_holds_pvt.release_holds 4 HeaderID' || l_order_tbl(1).header_id);
8268: oe_holds_pvt.release_holds(
8269: p_order_tbl => l_order_tbl,
8270: p_hold_id => p_hold_id,
8271: p_release_reason_code => p_release_reason_code,

Line 8279: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);

8275: x_msg_count => x_msg_count,
8276: x_msg_data => x_msg_data
8277: );
8278:
8279: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
8280: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
8281: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
8282:
8283: -- Changes begin : ER 1373910

Line 8280: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);

8276: x_msg_data => x_msg_data
8277: );
8278:
8279: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
8280: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
8281: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
8282:
8283: -- Changes begin : ER 1373910
8284: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN

Line 8281: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);

8277: );
8278:
8279: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,2);
8280: OE_DEBUG_PUB.Add('x_msg_count:' || to_char(x_msg_count),2);
8281: OE_DEBUG_PUB.Add('x_msg_data:' || x_msg_data,2);
8282:
8283: -- Changes begin : ER 1373910
8284: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
8285: IF p_wf_release_action = 'Y' THEN

Line 8286: OE_DEBUG_PUB.Add('Before calling Oe_holds_pvt.progress_order');

8282:
8283: -- Changes begin : ER 1373910
8284: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
8285: IF p_wf_release_action = 'Y' THEN
8286: OE_DEBUG_PUB.Add('Before calling Oe_holds_pvt.progress_order');
8287: progress_order( p_hold_id,
8288: p_num_of_records,
8289: l_order_tbl,
8290: x_return_status,

Line 8293: OE_DEBUG_PUB.Add('After Oe_holds_pvt.progress_order : ' || x_return_status,3);

8289: l_order_tbl,
8290: x_return_status,
8291: x_msg_count,
8292: x_msg_data);
8293: OE_DEBUG_PUB.Add('After Oe_holds_pvt.progress_order : ' || x_return_status,3);
8294: END IF;
8295: END IF;
8296: -- Changes end : ER 1373910
8297:

Line 8299: oe_debug_pub.add('process_release_holds_orders unexpected failure',3);

8295: END IF;
8296: -- Changes end : ER 1373910
8297:
8298: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
8299: oe_debug_pub.add('process_release_holds_orders unexpected failure',3);
8300: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8301: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
8302: oe_debug_pub.add('process_release_holds_orders failure',3);
8303: RAISE FND_API.G_EXC_ERROR;

Line 8302: oe_debug_pub.add('process_release_holds_orders failure',3);

8298: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
8299: oe_debug_pub.add('process_release_holds_orders unexpected failure',3);
8300: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8301: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
8302: oe_debug_pub.add('process_release_holds_orders failure',3);
8303: RAISE FND_API.G_EXC_ERROR;
8304: END IF;
8305:
8306:

Line 8316: OE_DEBUG_PUB.Add('Exiting OE_Holds_PVT.process_release_holds_orders',1);

8312: ( p_count => x_msg_count
8313: , p_data => x_msg_data
8314: );
8315:
8316: OE_DEBUG_PUB.Add('Exiting OE_Holds_PVT.process_release_holds_orders',1);
8317:
8318: EXCEPTION /* Procedure exception handler */
8319:
8320: WHEN FND_API.G_EXC_ERROR THEN

Line 8407: OE_DEBUG_PUB.Add('Bug 1946783 Credit Hold should be released from AR',1);

8403:
8404: /* Bug 1946783 - Added Check for credit hold created from AR */
8405:
8406: If l_hold_id = 1 AND (l_hold_entity_code ='C' OR l_hold_entity_code = 'B') then
8407: OE_DEBUG_PUB.Add('Bug 1946783 Credit Hold should be released from AR',1);
8408:
8409: fnd_message.set_name('ONT', 'OE_CC_AR_HOLD_NOT_RELEASED');
8410: OE_MSG_PUB.ADD;
8411: RAISE FND_API.G_EXC_ERROR;

Line 8428: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(l_hold_id));

8424: ,x_return_status => x_return_status
8425: ,x_msg_count => x_msg_count
8426: ,x_msg_data => x_msg_data
8427: ) = 'N' THEN
8428: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(l_hold_id));
8429: fnd_message.set_name('ONT', 'ONT_HOLDS_SYSTEM_CHECK');
8430: fnd_message.set_token('ACTION', 'Release');
8431: OE_MSG_PUB.ADD;
8432: x_return_status := FND_API.G_RET_STS_ERROR;

Line 8449: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(l_hold_id));

8445: ,x_return_status => x_return_status
8446: ,x_msg_count => x_msg_count
8447: ,x_msg_data => x_msg_data
8448: ) = 'N' THEN
8449: OE_DEBUG_PUB.Add('Not authorize to Release this Hold:'|| to_char(l_hold_id));
8450:
8451: fnd_message.set_name('ONT','ONT_RELEASE');
8452: l_msg_token := fnd_message.get;
8453:

Line 8482: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);

8478: ,x_msg_data => x_msg_data
8479: );
8480:
8481:
8482: OE_DEBUG_PUB.Add('x_return_status:' || x_return_status,1);
8483:
8484: -- Changes begin : ER 1373910
8485: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
8486: IF p_wf_release_action = 'Y' THEN

Line 8487: Oe_debug_pub.Add('Before calling Oe_holds_pvt.progress_order');

8483:
8484: -- Changes begin : ER 1373910
8485: IF x_return_status = FND_API.G_RET_STS_SUCCESS THEN
8486: IF p_wf_release_action = 'Y' THEN
8487: Oe_debug_pub.Add('Before calling Oe_holds_pvt.progress_order');
8488: progress_order( p_hold_source_id,
8489: x_return_status,
8490: x_msg_count,
8491: x_msg_data);

Line 8492: Oe_debug_pub.ADD('Oe_holds_pvt.progress order returned with : ' || x_return_status);

8488: progress_order( p_hold_source_id,
8489: x_return_status,
8490: x_msg_count,
8491: x_msg_data);
8492: Oe_debug_pub.ADD('Oe_holds_pvt.progress order returned with : ' || x_return_status);
8493: END IF;
8494: END IF;
8495: -- Changes end : ER 1373910
8496:

Line 8498: oe_debug_pub.add('process_release_source unexpected failure',3);

8494: END IF;
8495: -- Changes end : ER 1373910
8496:
8497: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
8498: oe_debug_pub.add('process_release_source unexpected failure',3);
8499: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8500: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
8501: oe_debug_pub.add('process_release_source expected failure',3);
8502: RAISE FND_API.G_EXC_ERROR;

Line 8501: oe_debug_pub.add('process_release_source expected failure',3);

8497: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
8498: oe_debug_pub.add('process_release_source unexpected failure',3);
8499: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8500: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN
8501: oe_debug_pub.add('process_release_source expected failure',3);
8502: RAISE FND_API.G_EXC_ERROR;
8503: END IF;
8504:
8505: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 8739: OE_DEBUG_PUB.Add('In OE_Holds_pvt.Apply Holds, Creating Hold Source',1);

8735: l_is_hold_applied BOOLEAN;
8736:
8737: BEGIN
8738:
8739: OE_DEBUG_PUB.Add('In OE_Holds_pvt.Apply Holds, Creating Hold Source',1);
8740:
8741: x_return_status := FND_API.G_RET_STS_SUCCESS;
8742:
8743: -- 8477694

Line 8752: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_source_rec.hold_id));

8748: x_return_status => x_return_status,
8749: x_msg_count => x_msg_count,
8750: x_msg_data => x_msg_data) = 'N' THEN
8751:
8752: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_source_rec.hold_id));
8753: l_msg_token := 'APPLY(System Hold)';
8754: fnd_message.set_name('ONT', 'OE_HOLDS_AUTHORIZATION_FAILED');
8755: fnd_message.set_token('ACTION', l_msg_token);
8756: OE_MSG_PUB.ADD;

Line 8765: OE_DEBUG_PUB.Add('After calling Check_System_Holds');

8761: );
8762: RETURN;
8763: END IF;
8764: END IF;
8765: OE_DEBUG_PUB.Add('After calling Check_System_Holds');
8766:
8767: OE_DEBUG_PUB.Add('Apply Hold overloaded before calling Check_Authorization');
8768:
8769: --bug 8477694

Line 8767: OE_DEBUG_PUB.Add('Apply Hold overloaded before calling Check_Authorization');

8763: END IF;
8764: END IF;
8765: OE_DEBUG_PUB.Add('After calling Check_System_Holds');
8766:
8767: OE_DEBUG_PUB.Add('Apply Hold overloaded before calling Check_Authorization');
8768:
8769: --bug 8477694
8770: IF p_check_authorization_flag = 'Y' THEN
8771: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);

Line 8771: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);

8767: OE_DEBUG_PUB.Add('Apply Hold overloaded before calling Check_Authorization');
8768:
8769: --bug 8477694
8770: IF p_check_authorization_flag = 'Y' THEN
8771: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);
8772: ELSE
8773: OE_DEBUG_PUB.Add('8477694 Auto Auth'||p_check_authorization_flag);
8774: END IF;
8775:

Line 8773: OE_DEBUG_PUB.Add('8477694 Auto Auth'||p_check_authorization_flag);

8769: --bug 8477694
8770: IF p_check_authorization_flag = 'Y' THEN
8771: OE_DEBUG_PUB.Add('8477694 Manual Auth'||p_check_authorization_flag);
8772: ELSE
8773: OE_DEBUG_PUB.Add('8477694 Auto Auth'||p_check_authorization_flag);
8774: END IF;
8775:
8776: IF p_check_authorization_flag = 'Y' THEN -- bug 8477694
8777: IF check_authorization ( p_hold_id => p_hold_source_rec.hold_id

Line 8785: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_source_rec.hold_id));

8781: ,x_return_status => x_return_status
8782: ,x_msg_count => x_msg_count
8783: ,x_msg_data => x_msg_data
8784: ) = 'N' THEN
8785: OE_DEBUG_PUB.Add('Not authorize to Apply this Hold:'|| to_char(p_hold_source_rec.hold_id));
8786: fnd_message.set_name('ONT','ONT_APPLY');
8787: l_msg_token := fnd_message.get;
8788: fnd_message.set_name('ONT', 'OE_HOLDS_AUTHORIZATION_FAILED');
8789: fnd_message.set_token('ACTION', l_msg_token);

Line 8799: OE_DEBUG_PUB.Add('Apply Hold overloaded After calling Check_Authorization');

8795: );
8796: RETURN;
8797: END IF;
8798: END IF; --bug 8477694
8799: OE_DEBUG_PUB.Add('Apply Hold overloaded After calling Check_Authorization');
8800: --8477694
8801:
8802:
8803: l_hold_source_rec := p_hold_source_rec;

Line 8809: OE_DEBUG_PUB.Add('Validate return status:' || x_return_status,1);

8805: Validate (p_hold_source_rec => p_hold_source_rec,
8806: x_return_status => x_return_status,
8807: x_msg_count => x_msg_count,
8808: x_msg_data => x_msg_data );
8809: OE_DEBUG_PUB.Add('Validate return status:' || x_return_status,1);
8810:
8811: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8812: OE_Debug_PUB.Add('Validate not successful',1);
8813: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

Line 8812: OE_Debug_PUB.Add('Validate not successful',1);

8808: x_msg_data => x_msg_data );
8809: OE_DEBUG_PUB.Add('Validate return status:' || x_return_status,1);
8810:
8811: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8812: OE_Debug_PUB.Add('Validate not successful',1);
8813: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
8814: RAISE FND_API.G_EXC_ERROR;
8815: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
8816: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 8819: OE_DEBUG_PUB.Add ('Calling Create_Hold_Source bug 5548778 overload',1);

8815: ELSIF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
8816: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8817: END IF;
8818: ELSE
8819: OE_DEBUG_PUB.Add ('Calling Create_Hold_Source bug 5548778 overload',1);
8820: Create_Hold_Source (
8821: p_hold_source_rec => p_hold_source_rec,
8822: p_org_id => p_org_id, --ER#7479609
8823: x_hold_source_id => l_hold_source_id,

Line 8829: OE_DEBUG_PUB.Add('x_return_status->' || x_return_status,1);

8825: x_return_status => x_return_status,
8826: x_msg_count => x_msg_count,
8827: x_msg_data => x_msg_data);
8828:
8829: OE_DEBUG_PUB.Add('x_return_status->' || x_return_status,1);
8830: OE_DEBUG_PUB.Add('x_msg_count->' || x_msg_count,1);
8831: OE_DEBUG_PUB.Add('x_msg_data' || x_msg_data,1);
8832: OE_DEBUG_PUB.Add('l_hold_exists' || l_hold_exists,1);
8833: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN

Line 8830: OE_DEBUG_PUB.Add('x_msg_count->' || x_msg_count,1);

8826: x_msg_count => x_msg_count,
8827: x_msg_data => x_msg_data);
8828:
8829: OE_DEBUG_PUB.Add('x_return_status->' || x_return_status,1);
8830: OE_DEBUG_PUB.Add('x_msg_count->' || x_msg_count,1);
8831: OE_DEBUG_PUB.Add('x_msg_data' || x_msg_data,1);
8832: OE_DEBUG_PUB.Add('l_hold_exists' || l_hold_exists,1);
8833: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8834: IF x_return_status = FND_API.G_RET_STS_ERROR THEN

Line 8831: OE_DEBUG_PUB.Add('x_msg_data' || x_msg_data,1);

8827: x_msg_data => x_msg_data);
8828:
8829: OE_DEBUG_PUB.Add('x_return_status->' || x_return_status,1);
8830: OE_DEBUG_PUB.Add('x_msg_count->' || x_msg_count,1);
8831: OE_DEBUG_PUB.Add('x_msg_data' || x_msg_data,1);
8832: OE_DEBUG_PUB.Add('l_hold_exists' || l_hold_exists,1);
8833: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8834: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
8835: RAISE FND_API.G_EXC_ERROR;

Line 8832: OE_DEBUG_PUB.Add('l_hold_exists' || l_hold_exists,1);

8828:
8829: OE_DEBUG_PUB.Add('x_return_status->' || x_return_status,1);
8830: OE_DEBUG_PUB.Add('x_msg_count->' || x_msg_count,1);
8831: OE_DEBUG_PUB.Add('x_msg_data' || x_msg_data,1);
8832: OE_DEBUG_PUB.Add('l_hold_exists' || l_hold_exists,1);
8833: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8834: IF x_return_status = FND_API.G_RET_STS_ERROR THEN
8835: RAISE FND_API.G_EXC_ERROR;
8836: ELSIF x_return_status = FND_API.G_RET_STS_ERROR THEN

Line 8841: OE_DEBUG_PUB.Add('l_hold_source_id->' ||

8837: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
8838: END IF;
8839: END IF;
8840:
8841: OE_DEBUG_PUB.Add('l_hold_source_id->' ||
8842: to_char(l_hold_source_id) ,1);
8843: l_hold_source_rec.hold_source_id := l_hold_source_id;
8844: --bug 5548778
8845:

Line 8847: OE_DEBUG_PUB.Add ('p_hold_source_rec.hold_entity_code -- '|| p_hold_source_rec.hold_entity_code,1);

8843: l_hold_source_rec.hold_source_id := l_hold_source_id;
8844: --bug 5548778
8845:
8846: -- bug 14494236
8847: OE_DEBUG_PUB.Add ('p_hold_source_rec.hold_entity_code -- '|| p_hold_source_rec.hold_entity_code,1);
8848: OE_DEBUG_PUB.Add ('p_hold_source_rec.hold_id -- ' || p_hold_source_rec.hold_id,1);
8849: l_hold_source_rec.hold_entity_code := p_hold_source_rec.hold_entity_code;
8850: l_hold_source_rec.hold_id := p_hold_source_rec.hold_id;
8851:

Line 8848: OE_DEBUG_PUB.Add ('p_hold_source_rec.hold_id -- ' || p_hold_source_rec.hold_id,1);

8844: --bug 5548778
8845:
8846: -- bug 14494236
8847: OE_DEBUG_PUB.Add ('p_hold_source_rec.hold_entity_code -- '|| p_hold_source_rec.hold_entity_code,1);
8848: OE_DEBUG_PUB.Add ('p_hold_source_rec.hold_id -- ' || p_hold_source_rec.hold_id,1);
8849: l_hold_source_rec.hold_entity_code := p_hold_source_rec.hold_entity_code;
8850: l_hold_source_rec.hold_id := p_hold_source_rec.hold_id;
8851:
8852: IF l_hold_exists = 'N' THEN

Line 8855: OE_DEBUG_PUB.Add ('Calling Overloaded Create_Order_Holds Based on Workflow',1);

8851:
8852: IF l_hold_exists = 'N' THEN
8853: IF p_wf_item_type IS NOT NULL AND p_wf_activity_name IS NOT
8854: NULL THEN
8855: OE_DEBUG_PUB.Add ('Calling Overloaded Create_Order_Holds Based on Workflow',1);
8856: Create_Order_Holds (
8857: p_hold_source_rec => l_hold_source_rec
8858: ,p_org_id => p_org_id --ER#7479609
8859: ,p_item_type => p_wf_item_type

Line 8867: OE_DEBUG_PUB.Add ('Calling Create_Order_Holds',1);

8863: ,x_msg_data => x_msg_data
8864: ,x_is_hold_applied => l_is_hold_applied);
8865:
8866: ELSE
8867: OE_DEBUG_PUB.Add ('Calling Create_Order_Holds',1);
8868: Create_Order_Holds (
8869: p_hold_source_rec => l_hold_source_rec
8870: ,p_org_id =>p_org_id --ER#7479609
8871: ,x_return_status => x_return_status

Line 8879: OE_DEBUG_PUB.Add('After Create_Order_Holds',1);

8875: END IF; -- l_item_type and l_activity_name
8876:
8877: x_is_hold_applied := l_is_hold_applied;
8878:
8879: OE_DEBUG_PUB.Add('After Create_Order_Holds',1);
8880: END IF;
8881: END IF;
8882:
8883: END Apply_Holds;

Line 9015: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;

9011: --ER#7479609 end
9012:
9013: l_header_rec OE_Order_PUB.Header_Rec_Type;
9014: l_line_rec OE_Order_PUB.Line_Rec_Type;
9015: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
9016: -- GENESIS --
9017: -- 16053361
9018: l_nameVal_tbl OE_ORDER_UTIL.nameVal_Tbl_Type;
9019: l_count number;

Line 9031: oe_debug_pub.add('Org_Id is NULL',1);

9027: l_org_id := MO_GLOBAL.get_current_org_id;
9028: x_is_hold_applied := NULL;
9029: IF l_org_id IS NULL THEN
9030: -- org_id is null, raise an error.
9031: oe_debug_pub.add('Org_Id is NULL',1);
9032: x_return_status := FND_API.G_RET_STS_ERROR;
9033: FND_MESSAGE.SET_NAME('FND','MO_ORG_REQUIRED');
9034: FND_MSG_PUB.ADD;
9035: RAISE FND_API.G_EXC_ERROR;

Line 9038: oe_debug_pub.add('p_hold_source_rec.hold_source_id:' ||

9034: FND_MSG_PUB.ADD;
9035: RAISE FND_API.G_EXC_ERROR;
9036: END IF;
9037:
9038: oe_debug_pub.add('p_hold_source_rec.hold_source_id:' ||
9039: p_hold_source_rec.hold_source_id);
9040: oe_debug_pub.add('Hold_entity_code/Hold_entity_id/' ||
9041: 'Hold_entity_code2/Hold_entity_id2:' ||
9042: p_hold_source_rec.Hold_entity_code || '/' ||

Line 9040: oe_debug_pub.add('Hold_entity_code/Hold_entity_id/' ||

9036: END IF;
9037:
9038: oe_debug_pub.add('p_hold_source_rec.hold_source_id:' ||
9039: p_hold_source_rec.hold_source_id);
9040: oe_debug_pub.add('Hold_entity_code/Hold_entity_id/' ||
9041: 'Hold_entity_code2/Hold_entity_id2:' ||
9042: p_hold_source_rec.Hold_entity_code || '/' ||
9043: p_hold_source_rec.Hold_entity_id || '/' ||
9044: p_hold_source_rec.Hold_entity_code2 || '/' ||

Line 9046: oe_debug_pub.add('p_hold_source_rec.header_id:' || p_hold_source_rec.header_id);

9042: p_hold_source_rec.Hold_entity_code || '/' ||
9043: p_hold_source_rec.Hold_entity_id || '/' ||
9044: p_hold_source_rec.Hold_entity_code2 || '/' ||
9045: p_hold_source_rec.Hold_entity_id2);
9046: oe_debug_pub.add('p_hold_source_rec.header_id:' || p_hold_source_rec.header_id);
9047: oe_debug_pub.add('p_hold_source_rec.line_id:' || p_hold_source_rec.line_id);
9048: oe_debug_pub.add('Org Id:' || p_org_id);
9049: -- Insert a hold record for the order header or the order line.
9050: IF p_item_type = 'OEOH' and p_activity_name = 'CLOSE_ORDER' THEN

Line 9047: oe_debug_pub.add('p_hold_source_rec.line_id:' || p_hold_source_rec.line_id);

9043: p_hold_source_rec.Hold_entity_id || '/' ||
9044: p_hold_source_rec.Hold_entity_code2 || '/' ||
9045: p_hold_source_rec.Hold_entity_id2);
9046: oe_debug_pub.add('p_hold_source_rec.header_id:' || p_hold_source_rec.header_id);
9047: oe_debug_pub.add('p_hold_source_rec.line_id:' || p_hold_source_rec.line_id);
9048: oe_debug_pub.add('Org Id:' || p_org_id);
9049: -- Insert a hold record for the order header or the order line.
9050: IF p_item_type = 'OEOH' and p_activity_name = 'CLOSE_ORDER' THEN
9051: l_activity_name := 'CLOSE_HEADER';

Line 9048: oe_debug_pub.add('Org Id:' || p_org_id);

9044: p_hold_source_rec.Hold_entity_code2 || '/' ||
9045: p_hold_source_rec.Hold_entity_id2);
9046: oe_debug_pub.add('p_hold_source_rec.header_id:' || p_hold_source_rec.header_id);
9047: oe_debug_pub.add('p_hold_source_rec.line_id:' || p_hold_source_rec.line_id);
9048: oe_debug_pub.add('Org Id:' || p_org_id);
9049: -- Insert a hold record for the order header or the order line.
9050: IF p_item_type = 'OEOH' and p_activity_name = 'CLOSE_ORDER' THEN
9051: l_activity_name := 'CLOSE_HEADER';
9052: ELSIF p_item_type = 'OEOL' and p_activity_name = 'PICK_LINE' THEN

Line 9074: oe_debug_pub.add('Calling InsertTable_OOH_Line for I and C/CN');

9070: l_hold_entity_where_clause := 'and ol.INVENTORY_ITEM_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
9071: ||' and h.SOLD_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
9072:
9073:
9074: oe_debug_pub.add('Calling InsertTable_OOH_Line for I and C/CN');
9075: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
9076: ,p_line_id => p_hold_source_rec.line_id
9077: ,p_org_id => p_org_id
9078: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 9084: oe_debug_pub.add('After Calling InsertTable_OOH_Line for I and C/CN');

9080: ,p_activity_name => l_activity_name
9081: ,p_activity_status => l_act_status
9082: ,p_additional_where_clause => l_additional_where_clause
9083: ,x_is_hold_applied => x_is_hold_applied);
9084: oe_debug_pub.add('After Calling InsertTable_OOH_Line for I and C/CN');
9085: --ER#7479609 end
9086:
9087:
9088: /*ER#7479609 start

Line 9247: oe_debug_pub.add(' Hold Not applied for All requested records');

9243:
9244: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
9245: fnd_message.set_token('WF_ACT', l_user_activity_name);
9246: OE_MSG_PUB.ADD;
9247: oe_debug_pub.add(' Hold Not applied for All requested records');
9248: RAISE FND_API.G_EXC_ERROR;
9249: ELSIF l_sql_rowcount > 0 THEN
9250: SELECT count(*)
9251: into l_parent_count

Line 9265: oe_debug_pub.add('l_parent_count/sql_count'||l_parent_count||sql%rowcount);

9261: where oh.header_id = h.header_id
9262: and oh.line_id = ol.line_id
9263: and oh.hold_source_id =
9264: p_hold_source_rec.hold_source_id );
9265: oe_debug_pub.add('l_parent_count/sql_count'||l_parent_count||sql%rowcount);
9266: -- Note: The above query is used based on WHERE clause of the l_sqlmt but without any query on Workflow or Shipping product tables.
9267:
9268: IF l_sql_rowcount < (l_parent_count+l_sql_rowcount) THEN
9269:

Line 9280: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

9276:
9277: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
9278: fnd_message.set_token('WF_ACT', l_user_activity_name);
9279: OE_MSG_PUB.ADD;
9280: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
9281: END IF;
9282: END IF;
9283: END IF;
9284: END IF;

Line 9295: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and SM');

9291: l_hold_entity_where_clause := 'and ol.INVENTORY_ITEM_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
9292: ||' and ol.SHIPPING_METHOD_CODE = '||''''||p_hold_source_rec.hold_entity_id2||'''';
9293:
9294:
9295: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and SM');
9296: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
9297: ,p_line_id => p_hold_source_rec.line_id
9298: ,p_org_id => p_org_id
9299: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 9305: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and SM');

9301: ,p_activity_name => l_activity_name
9302: ,p_activity_status => l_act_status
9303: ,p_additional_where_clause => l_additional_where_clause
9304: ,x_is_hold_applied => x_is_hold_applied);
9305: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and SM');
9306: --ER#7479609 end
9307:
9308:
9309: --ER#7479609 start

Line 9317: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and D');

9313: l_hold_entity_where_clause := 'and ol.INVENTORY_ITEM_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
9314: ||' and ol.DELIVER_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
9315:
9316:
9317: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and D');
9318: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
9319: ,p_line_id => p_hold_source_rec.line_id
9320: ,p_org_id => p_org_id
9321: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 9327: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and D');

9323: ,p_activity_name => l_activity_name
9324: ,p_activity_status => l_act_status
9325: ,p_additional_where_clause => l_additional_where_clause
9326: ,x_is_hold_applied => x_is_hold_applied);
9327: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and D');
9328: --ER#7479609 end
9329:
9330: --ER#7479609 start
9331: ELSIF p_hold_source_rec.hold_entity_code = 'I' and

Line 9338: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and PL');

9334: l_hold_entity_where_clause := 'and ol.INVENTORY_ITEM_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
9335: ||' and ol.PRICE_LIST_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
9336:
9337:
9338: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and PL');
9339: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
9340: ,p_line_id => p_hold_source_rec.line_id
9341: ,p_org_id => p_org_id
9342: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 9348: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and PL');

9344: ,p_activity_name => l_activity_name
9345: ,p_activity_status => l_act_status
9346: ,p_additional_where_clause => l_additional_where_clause
9347: ,x_is_hold_applied => x_is_hold_applied);
9348: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and PL');
9349: --ER#7479609 end
9350:
9351: --ER#7479609 start
9352: ELSIF p_hold_source_rec.hold_entity_code = 'I' and

Line 9359: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and LT');

9355: l_hold_entity_where_clause := 'and ol.INVENTORY_ITEM_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
9356: ||' and ol.LINE_TYPE_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
9357:
9358:
9359: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and LT');
9360: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
9361: ,p_line_id => p_hold_source_rec.line_id
9362: ,p_org_id => p_org_id
9363: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 9369: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and LT');

9365: ,p_activity_name => l_activity_name
9366: ,p_activity_status => l_act_status
9367: ,p_additional_where_clause => l_additional_where_clause
9368: ,x_is_hold_applied => x_is_hold_applied);
9369: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and LT');
9370: --ER#7479609 end
9371:
9372: --ER#7479609 start
9373: ELSIF p_hold_source_rec.hold_entity_code = 'I' and

Line 9380: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and PR');

9376: l_hold_entity_where_clause := 'and ol.INVENTORY_ITEM_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
9377: ||' and ol.PROJECT_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
9378:
9379:
9380: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and PR');
9381: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
9382: ,p_line_id => p_hold_source_rec.line_id
9383: ,p_org_id => p_org_id
9384: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 9390: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and PR');

9386: ,p_activity_name => l_activity_name
9387: ,p_activity_status => l_act_status
9388: ,p_additional_where_clause => l_additional_where_clause
9389: ,x_is_hold_applied => x_is_hold_applied);
9390: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and PR');
9391: --ER#7479609 end
9392:
9393: ELSIF p_hold_source_rec.hold_entity_code = 'B' and
9394: p_hold_source_rec.hold_entity_code2 = 'O' THEN

Line 9401: oe_debug_pub.add('Calling InsertTable_OOH_Line for B and O');

9397: l_hold_entity_where_clause := 'and ol.INVOICE_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
9398: ||' and h.HEADER_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
9399:
9400:
9401: oe_debug_pub.add('Calling InsertTable_OOH_Line for B and O');
9402: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
9403: ,p_line_id => p_hold_source_rec.line_id
9404: ,p_org_id => p_org_id
9405: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 9411: oe_debug_pub.add('After Calling InsertTable_OOH_Line for B and O');

9407: ,p_activity_name => l_activity_name
9408: ,p_activity_status => l_act_status
9409: ,p_additional_where_clause => l_additional_where_clause
9410: ,x_is_hold_applied => x_is_hold_applied);
9411: oe_debug_pub.add('After Calling InsertTable_OOH_Line for B and O');
9412: --ER#7479609 end
9413:
9414: /*ER#7479609 start
9415: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 9569: oe_debug_pub.add(' Hold Not applied for All requested records');

9565:
9566: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
9567: fnd_message.set_token('WF_ACT', l_user_activity_name);
9568: OE_MSG_PUB.ADD;
9569: oe_debug_pub.add(' Hold Not applied for All requested records');
9570: RAISE FND_API.G_EXC_ERROR;
9571: ELSIF l_sql_rowcount > 0 THEN
9572: SELECT count(*)
9573: into l_parent_count

Line 9604: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

9600:
9601: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
9602: fnd_message.set_token('WF_ACT', l_user_activity_name);
9603: OE_MSG_PUB.ADD;
9604: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
9605: END IF;
9606: END IF;
9607: END IF;
9608: END IF;

Line 9618: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and B');

9614: l_hold_entity_where_clause := 'and ol.INVENTORY_ITEM_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
9615: ||' and ol.INVOICE_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
9616:
9617:
9618: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and B');
9619: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
9620: ,p_line_id => p_hold_source_rec.line_id
9621: ,p_org_id => p_org_id
9622: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 9628: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and B');

9624: ,p_activity_name => l_activity_name
9625: ,p_activity_status => l_act_status
9626: ,p_additional_where_clause => l_additional_where_clause
9627: ,x_is_hold_applied => x_is_hold_applied);
9628: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and B');
9629: --ER#7479609 end
9630:
9631: /*ER#7479609 start
9632: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 9786: oe_debug_pub.add(' Hold Not applied for All requested records');

9782:
9783: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
9784: fnd_message.set_token('WF_ACT', l_user_activity_name);
9785: OE_MSG_PUB.ADD;
9786: oe_debug_pub.add(' Hold Not applied for All requested records');
9787: RAISE FND_API.G_EXC_ERROR;
9788: ELSIF l_sql_rowcount > 0 THEN
9789: SELECT count(*)
9790: into l_parent_count

Line 9819: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

9815:
9816: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
9817: fnd_message.set_token('WF_ACT', l_user_activity_name);
9818: OE_MSG_PUB.ADD;
9819: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
9820: END IF;
9821: END IF;
9822: END IF;
9823: END IF;

Line 9833: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and S');

9829: l_hold_entity_where_clause := 'and ol.INVENTORY_ITEM_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
9830: ||' and ol.SHIP_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
9831:
9832:
9833: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and S');
9834: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
9835: ,p_line_id => p_hold_source_rec.line_id
9836: ,p_org_id => p_org_id
9837: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 9843: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and S');

9839: ,p_activity_name => l_activity_name
9840: ,p_activity_status => l_act_status
9841: ,p_additional_where_clause => l_additional_where_clause
9842: ,x_is_hold_applied => x_is_hold_applied);
9843: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and S');
9844: --ER#7479609 end
9845:
9846: /*ER#7479609 start
9847: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 9999: oe_debug_pub.add(' Hold Not applied for All requested records');

9995:
9996: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
9997: fnd_message.set_token('WF_ACT', l_user_activity_name);
9998: OE_MSG_PUB.ADD;
9999: oe_debug_pub.add(' Hold Not applied for All requested records');
10000: RAISE FND_API.G_EXC_ERROR;
10001: ELSIF l_sql_rowcount > 0 THEN
10002: SELECT count(*)
10003: into l_parent_count

Line 10031: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

10027:
10028: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
10029: fnd_message.set_token('WF_ACT', l_user_activity_name);
10030: OE_MSG_PUB.ADD;
10031: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
10032: END IF;
10033: END IF;
10034: END IF;
10035: END IF;

Line 10046: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and W');

10042: l_hold_entity_where_clause := 'and ol.INVENTORY_ITEM_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
10043: ||' and ol.SHIP_FROM_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
10044:
10045:
10046: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and W');
10047: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10048: ,p_line_id => p_hold_source_rec.line_id
10049: ,p_org_id => p_org_id
10050: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10056: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and W');

10052: ,p_activity_name => l_activity_name
10053: ,p_activity_status => l_act_status
10054: ,p_additional_where_clause => l_additional_where_clause
10055: ,x_is_hold_applied => x_is_hold_applied);
10056: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and W');
10057: --ER#7479609 end
10058:
10059: /*ER#7479609 start
10060: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 10213: oe_debug_pub.add(' Hold Not applied for All requested records');

10209:
10210: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
10211: fnd_message.set_token('WF_ACT', l_user_activity_name);
10212: OE_MSG_PUB.ADD;
10213: oe_debug_pub.add(' Hold Not applied for All requested records');
10214: RAISE FND_API.G_EXC_ERROR;
10215: ELSIF l_sql_rowcount > 0 THEN
10216: SELECT count(*)
10217: into l_parent_count

Line 10246: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

10242:
10243: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
10244: fnd_message.set_token('WF_ACT', l_user_activity_name);
10245: OE_MSG_PUB.ADD;
10246: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
10247: END IF;
10248: END IF;
10249: END IF;
10250: END IF;

Line 10261: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and H');

10257: l_hold_entity_where_clause := 'and ol.INVENTORY_ITEM_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
10258: ||' and ol.BLANKET_NUMBER = '||''''||p_hold_source_rec.hold_entity_id2||'''';
10259:
10260:
10261: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and H');
10262: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10263: ,p_line_id => p_hold_source_rec.line_id
10264: ,p_org_id => p_org_id
10265: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10271: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and H');

10267: ,p_activity_name => l_activity_name
10268: ,p_activity_status => l_act_status
10269: ,p_additional_where_clause => l_additional_where_clause
10270: ,x_is_hold_applied => x_is_hold_applied);
10271: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and H');
10272: --ER#7479609 end
10273:
10274: -- 13990273 START
10275: -- Hold for Item and Ship To Site

Line 10281: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and S');

10277: p_hold_source_rec.hold_entity_code2 = 'S' THEN
10278:
10279: l_hold_entity_where_clause := 'and ol.INVENTORY_ITEM_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
10280: ||' and ol.SHIP_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
10281: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I and S');
10282: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10283: ,p_line_id => p_hold_source_rec.line_id
10284: ,p_org_id => p_org_id
10285: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10291: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and S');

10287: ,p_activity_name => l_activity_name
10288: ,p_activity_status => l_act_status
10289: ,p_additional_where_clause => l_additional_where_clause
10290: ,x_is_hold_applied => x_is_hold_applied);
10291: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I and S');
10292:
10293: -- 13990273 END
10294:
10295: /*ER#7479609 start

Line 10448: oe_debug_pub.add(' Hold Not applied for All requested records');

10444:
10445: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
10446: fnd_message.set_token('WF_ACT', l_user_activity_name);
10447: OE_MSG_PUB.ADD;
10448: oe_debug_pub.add(' Hold Not applied for All requested records');
10449: RAISE FND_API.G_EXC_ERROR;
10450: ELSIF l_sql_rowcount > 0 THEN
10451: SELECT count(*)
10452: into l_parent_count

Line 10481: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

10477:
10478: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
10479: fnd_message.set_token('WF_ACT', l_user_activity_name);
10480: OE_MSG_PUB.ADD;
10481: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
10482: END IF;
10483: END IF;
10484: END IF;
10485: END IF;

Line 10506: oe_debug_pub.add('Calling InsertTable_OOH_Line for IC and C/CN');

10502: and mic.organization_id= '||''''||l_master_orgid||''''
10503: ||' and mic.category_id = '||''''||p_hold_source_rec.hold_entity_id||''''||')';
10504:
10505:
10506: oe_debug_pub.add('Calling InsertTable_OOH_Line for IC and C/CN');
10507: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10508: ,p_line_id => p_hold_source_rec.line_id
10509: ,p_org_id => p_org_id
10510: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10516: oe_debug_pub.add('After Calling InsertTable_OOH_Line for IC and C/CN');

10512: ,p_activity_name => l_activity_name
10513: ,p_activity_status => l_act_status
10514: ,p_additional_where_clause => l_additional_where_clause
10515: ,x_is_hold_applied => x_is_hold_applied);
10516: oe_debug_pub.add('After Calling InsertTable_OOH_Line for IC and C/CN');
10517:
10518:
10519:
10520:

Line 10534: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and SM');

10530: and mic.organization_id= '||''''||l_master_orgid||''''
10531: ||' and mic.category_id = '||''''||p_hold_source_rec.hold_entity_id||''''||')';
10532:
10533:
10534: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and SM');
10535: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10536: ,p_line_id => p_hold_source_rec.line_id
10537: ,p_org_id => p_org_id
10538: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10544: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and SM');

10540: ,p_activity_name => l_activity_name
10541: ,p_activity_status => l_act_status
10542: ,p_additional_where_clause => l_additional_where_clause
10543: ,x_is_hold_applied => x_is_hold_applied);
10544: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and SM');
10545:
10546:
10547:
10548:

Line 10562: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and D');

10558: AND ol.INVENTORY_ITEM_ID = mic.inventory_item_id
10559: and mic.organization_id= '||''''||l_master_orgid||''''
10560: ||' and mic.category_id = '||''''||p_hold_source_rec.hold_entity_id||''''||')';
10561:
10562: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and D');
10563: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10564: ,p_line_id => p_hold_source_rec.line_id
10565: ,p_org_id => p_org_id
10566: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10572: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and D');

10568: ,p_activity_name => l_activity_name
10569: ,p_activity_status => l_act_status
10570: ,p_additional_where_clause => l_additional_where_clause
10571: ,x_is_hold_applied => x_is_hold_applied);
10572: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and D');
10573:
10574:
10575:
10576: ELSIF p_hold_source_rec.hold_entity_code = 'IC' and

Line 10589: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and PL');

10585: AND ol.INVENTORY_ITEM_ID = mic.inventory_item_id
10586: and mic.organization_id= '||''''||l_master_orgid||''''
10587: ||' and mic.category_id = '||''''||p_hold_source_rec.hold_entity_id||''''||')';
10588:
10589: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and PL');
10590: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10591: ,p_line_id => p_hold_source_rec.line_id
10592: ,p_org_id => p_org_id
10593: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10599: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and PL');

10595: ,p_activity_name => l_activity_name
10596: ,p_activity_status => l_act_status
10597: ,p_additional_where_clause => l_additional_where_clause
10598: ,x_is_hold_applied => x_is_hold_applied);
10599: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and PL');
10600:
10601: ELSIF p_hold_source_rec.hold_entity_code = 'IC' and
10602: p_hold_source_rec.hold_entity_code2 = 'LT' THEN
10603:

Line 10614: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and LT');

10610: AND ol.INVENTORY_ITEM_ID = mic.inventory_item_id
10611: and mic.organization_id= '||''''||l_master_orgid||''''
10612: ||' and mic.category_id = '||''''||p_hold_source_rec.hold_entity_id||''''||')';
10613:
10614: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and LT');
10615: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10616: ,p_line_id => p_hold_source_rec.line_id
10617: ,p_org_id => p_org_id
10618: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10624: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and LT');

10620: ,p_activity_name => l_activity_name
10621: ,p_activity_status => l_act_status
10622: ,p_additional_where_clause => l_additional_where_clause
10623: ,x_is_hold_applied => x_is_hold_applied);
10624: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and LT');
10625:
10626: ELSIF p_hold_source_rec.hold_entity_code = 'IC' and
10627: p_hold_source_rec.hold_entity_code2 = 'PR' THEN
10628:

Line 10639: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and PR');

10635: AND ol.INVENTORY_ITEM_ID = mic.inventory_item_id
10636: and mic.organization_id= '||''''||l_master_orgid||''''
10637: ||' and mic.category_id = '||''''||p_hold_source_rec.hold_entity_id||''''||')';
10638:
10639: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and PR');
10640: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10641: ,p_line_id => p_hold_source_rec.line_id
10642: ,p_org_id => p_org_id
10643: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10649: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and PR');

10645: ,p_activity_name => l_activity_name
10646: ,p_activity_status => l_act_status
10647: ,p_additional_where_clause => l_additional_where_clause
10648: ,x_is_hold_applied => x_is_hold_applied);
10649: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and PR');
10650:
10651: ELSIF p_hold_source_rec.hold_entity_code = 'IC' and
10652: p_hold_source_rec.hold_entity_code2 = 'B' THEN
10653:

Line 10665: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and B');

10661: AND ol.INVENTORY_ITEM_ID = mic.inventory_item_id
10662: and mic.organization_id= '||''''||l_master_orgid||''''
10663: ||' and mic.category_id = '||''''||p_hold_source_rec.hold_entity_id||''''||')';
10664:
10665: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and B');
10666: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10667: ,p_line_id => p_hold_source_rec.line_id
10668: ,p_org_id => p_org_id
10669: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10675: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and B');

10671: ,p_activity_name => l_activity_name
10672: ,p_activity_status => l_act_status
10673: ,p_additional_where_clause => l_additional_where_clause
10674: ,x_is_hold_applied => x_is_hold_applied);
10675: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and B');
10676:
10677: ELSIF p_hold_source_rec.hold_entity_code = 'IC' and
10678: p_hold_source_rec.hold_entity_code2 = 'W' THEN
10679:

Line 10690: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and W');

10686: AND ol.INVENTORY_ITEM_ID = mic.inventory_item_id
10687: and mic.organization_id= '||''''||l_master_orgid||''''
10688: ||' and mic.category_id = '||''''||p_hold_source_rec.hold_entity_id||''''||')';
10689:
10690: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and W');
10691: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10692: ,p_line_id => p_hold_source_rec.line_id
10693: ,p_org_id => p_org_id
10694: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10700: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and W');

10696: ,p_activity_name => l_activity_name
10697: ,p_activity_status => l_act_status
10698: ,p_additional_where_clause => l_additional_where_clause
10699: ,x_is_hold_applied => x_is_hold_applied);
10700: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and W');
10701:
10702:
10703: ELSIF p_hold_source_rec.hold_entity_code = 'IC' and
10704: p_hold_source_rec.hold_entity_code2 = 'H' THEN

Line 10716: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and H');

10712: AND ol.INVENTORY_ITEM_ID = mic.inventory_item_id
10713: and mic.organization_id= '||''''||l_master_orgid||''''
10714: ||' and mic.category_id = '||''''||p_hold_source_rec.hold_entity_id||''''||')';
10715:
10716: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and H');
10717: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10718: ,p_line_id => p_hold_source_rec.line_id
10719: ,p_org_id => p_org_id
10720: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10726: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and H');

10722: ,p_activity_name => l_activity_name
10723: ,p_activity_status => l_act_status
10724: ,p_additional_where_clause => l_additional_where_clause
10725: ,x_is_hold_applied => x_is_hold_applied);
10726: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and H');
10727:
10728: ELSIF p_hold_source_rec.hold_entity_code = 'IC'
10729: AND p_hold_source_rec.hold_entity_code2 IS NULL THEN
10730: --13653352, used l_master_orgid below instead of ship_from_org

Line 10740: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC');

10736: and mic.organization_id= '||''''||l_master_orgid||''''
10737: ||' and mic.category_id = '||''''||p_hold_source_rec.hold_entity_id||''''||')';
10738:
10739:
10740: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC');
10741: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10742: ,p_line_id => p_hold_source_rec.line_id
10743: ,p_org_id => p_org_id
10744: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10750: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC');

10746: ,p_activity_name => l_activity_name
10747: ,p_activity_status => l_act_status
10748: ,p_additional_where_clause => l_additional_where_clause
10749: ,x_is_hold_applied => x_is_hold_applied);
10750: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC');
10751:
10752: -- 13990273 START
10753: -- Hold for Item Category and Ship To Site
10754: ELSIF p_hold_source_rec.hold_entity_code = 'IC' and

Line 10766: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and S');

10762: AND ol.INVENTORY_ITEM_ID = mic.inventory_item_id
10763: and mic.organization_id= '||''''||l_master_orgid||''''
10764: ||' and mic.category_id = '||''''||p_hold_source_rec.hold_entity_id||''''||')';
10765:
10766: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for IC and S');
10767: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10768: ,p_line_id => p_hold_source_rec.line_id
10769: ,p_org_id => p_org_id
10770: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10776: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and S');

10772: ,p_activity_name => l_activity_name
10773: ,p_activity_status => l_act_status
10774: ,p_additional_where_clause => l_additional_where_clause
10775: ,x_is_hold_applied => x_is_hold_applied);
10776: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for IC and S');
10777:
10778: -- 13990273 END
10779:
10780: ---------ER# 13331078 end -------------------------------------------------

Line 10794: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and C/CN');

10790: l_hold_entity_where_clause := 'and ol.SHIP_FROM_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
10791: ||' and ol.SOLD_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
10792:
10793:
10794: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and C/CN');
10795: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
10796: ,p_line_id => p_hold_source_rec.line_id
10797: ,p_org_id => p_org_id
10798: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 10804: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and C/CN');

10800: ,p_activity_name => l_activity_name
10801: ,p_activity_status => l_act_status
10802: ,p_additional_where_clause => l_additional_where_clause
10803: ,x_is_hold_applied => x_is_hold_applied);
10804: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and C/CN');
10805: --ER#7479609 end
10806:
10807: /*ER#7479609 start
10808: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 10961: oe_debug_pub.add(' Hold Not applied for All requested records');

10957:
10958: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
10959: fnd_message.set_token('WF_ACT', l_user_activity_name);
10960: OE_MSG_PUB.ADD;
10961: oe_debug_pub.add(' Hold Not applied for All requested records');
10962: RAISE FND_API.G_EXC_ERROR;
10963: ELSIF l_sql_rowcount > 0 THEN
10964: SELECT count(*)
10965: into l_parent_count

Line 10994: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

10990:
10991: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
10992: fnd_message.set_token('WF_ACT', l_user_activity_name);
10993: OE_MSG_PUB.ADD;
10994: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
10995: END IF;
10996: END IF;
10997: END IF;
10998: END IF;

Line 11010: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and SM');

11006: l_hold_entity_where_clause := 'and ol.SHIP_FROM_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
11007: ||' and ol.SHIPPING_METHOD_CODE = '||''''||p_hold_source_rec.hold_entity_id2||'''';
11008:
11009:
11010: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and SM');
11011: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
11012: ,p_line_id => p_hold_source_rec.line_id
11013: ,p_org_id => p_org_id
11014: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 11020: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and SM');

11016: ,p_activity_name => l_activity_name
11017: ,p_activity_status => l_act_status
11018: ,p_additional_where_clause => l_additional_where_clause
11019: ,x_is_hold_applied => x_is_hold_applied);
11020: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and SM');
11021: --ER#7479609 end
11022:
11023: --ER#7479609 start
11024: ELSIF p_hold_source_rec.hold_entity_code = 'W' and

Line 11032: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and ST');

11028: l_hold_entity_where_clause := 'and ol.SHIP_FROM_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
11029: ||' and ol.SOURCE_TYPE_CODE = '||''''||p_hold_source_rec.hold_entity_id2||'''';
11030:
11031:
11032: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and ST');
11033: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
11034: ,p_line_id => p_hold_source_rec.line_id
11035: ,p_org_id => p_org_id
11036: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 11042: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and ST');

11038: ,p_activity_name => l_activity_name
11039: ,p_activity_status => l_act_status
11040: ,p_additional_where_clause => l_additional_where_clause
11041: ,x_is_hold_applied => x_is_hold_applied);
11042: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and ST');
11043: --ER#7479609 end
11044:
11045:
11046: --ER#7479609 start

Line 11055: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and LT');

11051: l_hold_entity_where_clause := 'and ol.SHIP_FROM_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
11052: ||' and ol.LINE_TYPE_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
11053:
11054:
11055: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and LT');
11056: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
11057: ,p_line_id => p_hold_source_rec.line_id
11058: ,p_org_id => p_org_id
11059: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 11065: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and LT');

11061: ,p_activity_name => l_activity_name
11062: ,p_activity_status => l_act_status
11063: ,p_additional_where_clause => l_additional_where_clause
11064: ,x_is_hold_applied => x_is_hold_applied);
11065: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and LT');
11066: --ER#7479609 end
11067:
11068: --ER#7479609 start
11069: ELSIF p_hold_source_rec.hold_entity_code = 'W' and

Line 11076: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and D');

11072: l_hold_entity_where_clause := 'and ol.SHIP_FROM_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
11073: ||' and ol.DELIVER_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
11074:
11075:
11076: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and D');
11077: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
11078: ,p_line_id => p_hold_source_rec.line_id
11079: ,p_org_id => p_org_id
11080: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 11086: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and D');

11082: ,p_activity_name => l_activity_name
11083: ,p_activity_status => l_act_status
11084: ,p_additional_where_clause => l_additional_where_clause
11085: ,x_is_hold_applied => x_is_hold_applied);
11086: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and D');
11087: --ER#7479609 end
11088:
11089:
11090: ELSIF p_hold_source_rec.hold_entity_code = 'W' and

Line 11098: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and B');

11094: l_hold_entity_where_clause := 'and ol.SHIP_FROM_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
11095: ||' and ol.INVOICE_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
11096:
11097:
11098: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and B');
11099: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
11100: ,p_line_id => p_hold_source_rec.line_id
11101: ,p_org_id => p_org_id
11102: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 11108: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and B');

11104: ,p_activity_name => l_activity_name
11105: ,p_activity_status => l_act_status
11106: ,p_additional_where_clause => l_additional_where_clause
11107: ,x_is_hold_applied => x_is_hold_applied);
11108: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and B');
11109: --ER#7479609 end
11110:
11111: /*ER#7479609 start
11112: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 11266: oe_debug_pub.add(' Hold Not applied for All requested records');

11262:
11263: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
11264: fnd_message.set_token('WF_ACT', l_user_activity_name);
11265: OE_MSG_PUB.ADD;
11266: oe_debug_pub.add(' Hold Not applied for All requested records');
11267: RAISE FND_API.G_EXC_ERROR;
11268: ELSIF l_sql_rowcount > 0 THEN
11269: SELECT count(*)
11270: into l_parent_count

Line 11299: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

11295:
11296: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
11297: fnd_message.set_token('WF_ACT', l_user_activity_name);
11298: OE_MSG_PUB.ADD;
11299: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
11300: END IF;
11301: END IF;
11302: END IF;
11303: END IF;

Line 11314: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and S');

11310: l_hold_entity_where_clause := 'and ol.SHIP_FROM_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
11311: ||' and ol.SHIP_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
11312:
11313:
11314: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and S');
11315: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
11316: ,p_line_id => p_hold_source_rec.line_id
11317: ,p_org_id => p_org_id
11318: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 11324: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and S');

11320: ,p_activity_name => l_activity_name
11321: ,p_activity_status => l_act_status
11322: ,p_additional_where_clause => l_additional_where_clause
11323: ,x_is_hold_applied => x_is_hold_applied);
11324: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and S');
11325: --ER#7479609 end
11326:
11327: /*ER#7479609 start
11328: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 11480: oe_debug_pub.add(' Hold Not applied for All requested records');

11476:
11477: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
11478: fnd_message.set_token('WF_ACT', l_user_activity_name);
11479: OE_MSG_PUB.ADD;
11480: oe_debug_pub.add(' Hold Not applied for All requested records');
11481: RAISE FND_API.G_EXC_ERROR;
11482: ELSIF l_sql_rowcount > 0 THEN
11483: SELECT count(*)
11484: into l_parent_count

Line 11513: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

11509:
11510: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
11511: fnd_message.set_token('WF_ACT', l_user_activity_name);
11512: OE_MSG_PUB.ADD;
11513: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
11514: END IF;
11515: END IF;
11516: END IF;
11517: END IF;

Line 11531: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and B');

11527: l_hold_entity_where_clause := 'and ol.BLANKET_NUMBER = '||''''||p_hold_source_rec.hold_entity_id||''''
11528: ||' and ol.INVOICE_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
11529:
11530:
11531: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and B');
11532: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
11533: ,p_line_id => p_hold_source_rec.line_id
11534: ,p_org_id => p_org_id
11535: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 11541: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and B');

11537: ,p_activity_name => l_activity_name
11538: ,p_activity_status => l_act_status
11539: ,p_additional_where_clause => l_additional_where_clause
11540: ,x_is_hold_applied => x_is_hold_applied);
11541: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and B');
11542: --ER#7479609 end
11543:
11544: /*ER#7479609 start
11545: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 11697: oe_debug_pub.add(' Hold Not applied for All requested records');

11693:
11694: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
11695: fnd_message.set_token('WF_ACT', l_user_activity_name);
11696: OE_MSG_PUB.ADD;
11697: oe_debug_pub.add(' Hold Not applied for All requested records');
11698: RAISE FND_API.G_EXC_ERROR;
11699: ELSIF l_sql_rowcount > 0 THEN
11700: SELECT count(*)
11701: into l_parent_count

Line 11730: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

11726:
11727: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
11728: fnd_message.set_token('WF_ACT', l_user_activity_name);
11729: OE_MSG_PUB.ADD;
11730: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
11731: END IF;
11732: END IF;
11733: END IF;
11734: END IF;

Line 11746: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and PT');

11742: l_hold_entity_where_clause := 'and ol.BLANKET_NUMBER = '||''''||p_hold_source_rec.hold_entity_id||''''
11743: ||' and ol.PAYMENT_TERM_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
11744:
11745:
11746: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and PT');
11747: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
11748: ,p_line_id => p_hold_source_rec.line_id
11749: ,p_org_id => p_org_id
11750: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 11756: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and PT');

11752: ,p_activity_name => l_activity_name
11753: ,p_activity_status => l_act_status
11754: ,p_additional_where_clause => l_additional_where_clause
11755: ,x_is_hold_applied => x_is_hold_applied);
11756: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and PT');
11757: --ER#7479609 end
11758:
11759:
11760: --ER#7479609 start

Line 11768: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and PL');

11764: l_hold_entity_where_clause := 'and ol.BLANKET_NUMBER = '||''''||p_hold_source_rec.hold_entity_id||''''
11765: ||' and ol.PRICE_LIST_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
11766:
11767:
11768: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and PL');
11769: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
11770: ,p_line_id => p_hold_source_rec.line_id
11771: ,p_org_id => p_org_id
11772: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 11778: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and PL');

11774: ,p_activity_name => l_activity_name
11775: ,p_activity_status => l_act_status
11776: ,p_additional_where_clause => l_additional_where_clause
11777: ,x_is_hold_applied => x_is_hold_applied);
11778: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and PL');
11779: --ER#7479609 end
11780:
11781:
11782: --ER#7479609 start

Line 11790: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and D');

11786: l_hold_entity_where_clause := 'and ol.BLANKET_NUMBER = '||''''||p_hold_source_rec.hold_entity_id||''''
11787: ||' and ol.DELIVER_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
11788:
11789:
11790: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and D');
11791: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
11792: ,p_line_id => p_hold_source_rec.line_id
11793: ,p_org_id => p_org_id
11794: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 11800: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and D');

11796: ,p_activity_name => l_activity_name
11797: ,p_activity_status => l_act_status
11798: ,p_additional_where_clause => l_additional_where_clause
11799: ,x_is_hold_applied => x_is_hold_applied);
11800: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and D');
11801: --ER#7479609 end
11802:
11803:
11804: --ER#7479609 start

Line 11812: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and LT');

11808: l_hold_entity_where_clause := 'and ol.BLANKET_NUMBER = '||''''||p_hold_source_rec.hold_entity_id||''''
11809: ||' and ol.LINE_TYPE_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
11810:
11811:
11812: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and LT');
11813: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
11814: ,p_line_id => p_hold_source_rec.line_id
11815: ,p_org_id => p_org_id
11816: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 11822: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and LT');

11818: ,p_activity_name => l_activity_name
11819: ,p_activity_status => l_act_status
11820: ,p_additional_where_clause => l_additional_where_clause
11821: ,x_is_hold_applied => x_is_hold_applied);
11822: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and LT');
11823: --ER#7479609 end
11824:
11825: --ER#7479609 start
11826: ELSIF p_hold_source_rec.hold_entity_code = 'H' and

Line 11833: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and SM');

11829: l_hold_entity_where_clause := 'and ol.BLANKET_NUMBER = '||''''||p_hold_source_rec.hold_entity_id||''''
11830: ||' and ol.SHIPPING_METHOD_CODE = '||''''||p_hold_source_rec.hold_entity_id2||'''';
11831:
11832:
11833: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and SM');
11834: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
11835: ,p_line_id => p_hold_source_rec.line_id
11836: ,p_org_id => p_org_id
11837: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 11843: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and SM');

11839: ,p_activity_name => l_activity_name
11840: ,p_activity_status => l_act_status
11841: ,p_additional_where_clause => l_additional_where_clause
11842: ,x_is_hold_applied => x_is_hold_applied);
11843: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and SM');
11844: --ER#7479609 end
11845:
11846:
11847: ELSIF p_hold_source_rec.hold_entity_code = 'H' and

Line 11855: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and S');

11851: l_hold_entity_where_clause := 'and ol.BLANKET_NUMBER = '||''''||p_hold_source_rec.hold_entity_id||''''
11852: ||' and ol.SHIP_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
11853:
11854:
11855: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and S');
11856: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
11857: ,p_line_id => p_hold_source_rec.line_id
11858: ,p_org_id => p_org_id
11859: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 11865: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and S');

11861: ,p_activity_name => l_activity_name
11862: ,p_activity_status => l_act_status
11863: ,p_additional_where_clause => l_additional_where_clause
11864: ,x_is_hold_applied => x_is_hold_applied);
11865: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and S');
11866: --ER#7479609 end
11867:
11868: /*ER#7479609 start
11869: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 12022: oe_debug_pub.add(' Hold Not applied for All requested records');

12018:
12019: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
12020: fnd_message.set_token('WF_ACT', l_user_activity_name);
12021: OE_MSG_PUB.ADD;
12022: oe_debug_pub.add(' Hold Not applied for All requested records');
12023: RAISE FND_API.G_EXC_ERROR;
12024: ELSIF l_sql_rowcount > 0 THEN
12025: SELECT count(*)
12026: into l_parent_count

Line 12055: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

12051:
12052: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
12053: fnd_message.set_token('WF_ACT', l_user_activity_name);
12054: OE_MSG_PUB.ADD;
12055: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
12056: END IF;
12057: END IF;
12058: END IF;
12059: END IF;

Line 12070: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and W');

12066: l_hold_entity_where_clause := 'and ol.BLANKET_NUMBER = '||''''||p_hold_source_rec.hold_entity_id||''''
12067: ||' and ol.SHIP_FROM_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
12068:
12069:
12070: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and W');
12071: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
12072: ,p_line_id => p_hold_source_rec.line_id
12073: ,p_org_id => p_org_id
12074: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 12080: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and W');

12076: ,p_activity_name => l_activity_name
12077: ,p_activity_status => l_act_status
12078: ,p_additional_where_clause => l_additional_where_clause
12079: ,x_is_hold_applied => x_is_hold_applied);
12080: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and W');
12081: --ER#7479609 end
12082:
12083: /*ER#7479609 start
12084: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 12236: oe_debug_pub.add(' Hold Not applied for All requested records');

12232:
12233: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
12234: fnd_message.set_token('WF_ACT', l_user_activity_name);
12235: OE_MSG_PUB.ADD;
12236: oe_debug_pub.add(' Hold Not applied for All requested records');
12237: RAISE FND_API.G_EXC_ERROR;
12238: ELSIF l_sql_rowcount > 0 THEN
12239: SELECT count(*)
12240: into l_parent_count

Line 12269: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

12265:
12266: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
12267: fnd_message.set_token('WF_ACT', l_user_activity_name);
12268: OE_MSG_PUB.ADD;
12269: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
12270: END IF;
12271: END IF;
12272: END IF;
12273: END IF;

Line 12284: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and L');

12280: l_hold_entity_where_clause := 'and ol.BLANKET_NUMBER = '||''''||p_hold_source_rec.hold_entity_id||''''
12281: ||' and ol.BLANKET_LINE_NUMBER = '||''''||p_hold_source_rec.hold_entity_id2||'''';
12282:
12283:
12284: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H and L');
12285: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
12286: ,p_line_id => p_hold_source_rec.line_id
12287: ,p_org_id => p_org_id
12288: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 12294: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and L');

12290: ,p_activity_name => l_activity_name
12291: ,p_activity_status => l_act_status
12292: ,p_additional_where_clause => l_additional_where_clause
12293: ,x_is_hold_applied => x_is_hold_applied);
12294: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H and L');
12295: --ER#7479609 end
12296:
12297: /*ER#7479609 start
12298: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 12450: oe_debug_pub.add(' Hold Not applied for All requested records');

12446:
12447: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
12448: fnd_message.set_token('WF_ACT', l_user_activity_name);
12449: OE_MSG_PUB.ADD;
12450: oe_debug_pub.add(' Hold Not applied for All requested records');
12451: RAISE FND_API.G_EXC_ERROR;
12452: ELSIF l_sql_rowcount > 0 THEN
12453: SELECT count(*)
12454: into l_parent_count

Line 12483: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

12479:
12480: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
12481: fnd_message.set_token('WF_ACT', l_user_activity_name);
12482: OE_MSG_PUB.ADD;
12483: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
12484: END IF;
12485: END IF;
12486: END IF;
12487: END IF;

Line 12497: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H');

12493: --ER#7479609 start
12494: l_hold_entity_where_clause := 'and ol.BLANKET_NUMBER = '||''''||p_hold_source_rec.hold_entity_id||'''';
12495:
12496:
12497: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for H');
12498: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
12499: ,p_line_id => p_hold_source_rec.line_id
12500: ,p_org_id => p_org_id
12501: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 12507: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H');

12503: ,p_activity_name => l_activity_name
12504: ,p_activity_status => l_act_status
12505: ,p_additional_where_clause => l_additional_where_clause
12506: ,x_is_hold_applied => x_is_hold_applied);
12507: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for H');
12508: --ER#7479609 end
12509:
12510: /*ER#7479609 start
12511: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 12661: oe_debug_pub.add(' Hold Not applied for All requested records');

12657:
12658: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
12659: fnd_message.set_token('WF_ACT', l_user_activity_name);
12660: OE_MSG_PUB.ADD;
12661: oe_debug_pub.add(' Hold Not applied for All requested records');
12662: RAISE FND_API.G_EXC_ERROR;
12663: ELSIF l_sql_rowcount > 0 THEN
12664: SELECT count(*)
12665: into l_parent_count

Line 12693: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

12689:
12690: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
12691: fnd_message.set_token('WF_ACT', l_user_activity_name);
12692: OE_MSG_PUB.ADD;
12693: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
12694: END IF;
12695: END IF;
12696: END IF;
12697: END IF;

Line 12847: oe_debug_pub.add(' Hold Not applied for All requested records');

12843:
12844: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
12845: fnd_message.set_token('WF_ACT', l_user_activity_name);
12846: OE_MSG_PUB.ADD;
12847: oe_debug_pub.add(' Hold Not applied for All requested records');
12848: RAISE FND_API.G_EXC_ERROR;
12849: ELSIF l_sql_rowcount > 0 THEN
12850: x_is_hold_applied := TRUE;
12851: SELECT count(*)

Line 12881: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

12877:
12878: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
12879: fnd_message.set_token('WF_ACT', l_user_activity_name);
12880: OE_MSG_PUB.ADD;
12881: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
12882: END IF;
12883: END IF;
12884: END IF;
12885: END IF;

Line 12888: OE_DEBUG_PUB.ADD('slagiset: calling Update_Credit_Profile_Level');

12884: END IF;
12885: END IF;
12886: --ER 12363706 start
12887: IF p_hold_source_rec.hold_entity_code = 'O' AND p_hold_source_rec.hold_id= 1 THEN
12888: OE_DEBUG_PUB.ADD('slagiset: calling Update_Credit_Profile_Level');
12889: OE_CREDIT_CHECK_UTIL.Update_Credit_Profile_Level(p_hold_source_rec);
12890: END IF;
12891: --ER 12363706 end
12892: /*********************************************************

Line 12904: OE_DEBUG_PUB.ADD('System Parameter set to Bill TO LINE, Credit Hold being applied based on BillToCustomerLine of lines');

12900: -- ER#3667551 start
12901: -- If system parameter "Apply Credit Hold Based On" is 'Bill To Customer line'
12902: -- then Line Level Hold to be applied
12903: if(p_hold_source_rec.hold_entity_code='C' AND l_credithold_cust = 'BTL' and p_hold_source_rec.hold_id =1) then
12904: OE_DEBUG_PUB.ADD('System Parameter set to Bill TO LINE, Credit Hold being applied based on BillToCustomerLine of lines');
12905:
12906: --If(p_hold_source_rec.line_id is not null ) then --Bug 13565716
12907: OE_DEBUG_PUB.ADD('Not a Header based Hold');
12908:

Line 12907: OE_DEBUG_PUB.ADD('Not a Header based Hold');

12903: if(p_hold_source_rec.hold_entity_code='C' AND l_credithold_cust = 'BTL' and p_hold_source_rec.hold_id =1) then
12904: OE_DEBUG_PUB.ADD('System Parameter set to Bill TO LINE, Credit Hold being applied based on BillToCustomerLine of lines');
12905:
12906: --If(p_hold_source_rec.line_id is not null ) then --Bug 13565716
12907: OE_DEBUG_PUB.ADD('Not a Header based Hold');
12908:
12909: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C, BillTOLine');
12910: l_hold_entity_where_clause := ' and exists (Select 1 FROM HZ_CUST_ACCOUNTS_ALL cust ,HZ_CUST_ACCT_SITES_ALL site,hz_cust_site_uses_all siteuse WHERE cust.cust_account_id = '
12911: ||''''||p_hold_source_rec.hold_entity_id||''''||'and ol.INVOICE_TO_ORG_ID = siteuse.site_use_id'

Line 12909: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C, BillTOLine');

12905:
12906: --If(p_hold_source_rec.line_id is not null ) then --Bug 13565716
12907: OE_DEBUG_PUB.ADD('Not a Header based Hold');
12908:
12909: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C, BillTOLine');
12910: l_hold_entity_where_clause := ' and exists (Select 1 FROM HZ_CUST_ACCOUNTS_ALL cust ,HZ_CUST_ACCT_SITES_ALL site,hz_cust_site_uses_all siteuse WHERE cust.cust_account_id = '
12911: ||''''||p_hold_source_rec.hold_entity_id||''''||'and ol.INVOICE_TO_ORG_ID = siteuse.site_use_id'
12912: ||' AND cust.cust_account_id =site.cust_account_id AND site.cust_acct_site_id = siteuse.cust_acct_site_id AND siteuse.site_use_code ='||'''BILL_TO'''||' AND siteuse.status = '||'''A'''||')';
12913:

Line 12925: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN');

12921: ,p_activity_status => l_act_status
12922: ,p_additional_where_clause => l_additional_where_clause
12923: ,x_is_hold_applied => x_is_hold_applied);
12924:
12925: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN');
12926: -- end if; --end if of header id null --Bug#13565716
12927:
12928: else -- else of system parameter not BTL and rest all 'C' holds will have header_id not null
12929: -- ER#3667551 end

Line 12930: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header for C/CN');

12926: -- end if; --end if of header id null --Bug#13565716
12927:
12928: else -- else of system parameter not BTL and rest all 'C' holds will have header_id not null
12929: -- ER#3667551 end
12930: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header for C/CN');
12931: -- ER#3667551, start
12932: -- Ensure that For System Parameter "Apply Credit Hold Based On" set to 'Bill To Customer Line'
12933: -- no Header Level Hold is applied for Credit Hold
12934: if(p_hold_source_rec.hold_entity_code='C' AND l_credithold_cust = 'BTL' and p_hold_source_rec.hold_id =1 ) then

Line 12936: OE_DEBUG_PUB.ADD('Not calling InsertTable_OOH_Header as Credit Hold System Paramter at BillTOLine');

12932: -- Ensure that For System Parameter "Apply Credit Hold Based On" set to 'Bill To Customer Line'
12933: -- no Header Level Hold is applied for Credit Hold
12934: if(p_hold_source_rec.hold_entity_code='C' AND l_credithold_cust = 'BTL' and p_hold_source_rec.hold_id =1 ) then
12935: -- and p_hold_source_rec.hold_id =1 and p_hold_source_rec.header_id is NOT NULL ) --then Bug 13565716
12936: OE_DEBUG_PUB.ADD('Not calling InsertTable_OOH_Header as Credit Hold System Paramter at BillTOLine');
12937: --
12938: -- If Credit Hold with System parameter as 'Bill To Customer Header'
12939: -- then Credit Hold to be applied at Order Header Level
12940: else

Line 12944: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header as Credit Hold System Paramter at BillTOCustHeader');

12940: else
12941: --
12942: if(p_hold_source_rec.hold_entity_code='C' AND l_credithold_cust = 'BTH' and p_hold_source_rec.hold_id =1) then
12943: --and p_hold_source_rec.hold_id =1 and p_hold_source_rec.header_id is NOT NULL ) then --Bug 13565716
12944: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header as Credit Hold System Paramter at BillTOCustHeader');
12945: l_hold_entity_where_clause := ' and exists (Select 1 FROM HZ_CUST_ACCOUNTS_ALL cust ,HZ_CUST_ACCT_SITES_ALL site,hz_cust_site_uses_all siteuse WHERE cust.cust_account_id = '
12946: ||''''||p_hold_source_rec.hold_entity_id||''''||'and h.INVOICE_TO_ORG_ID = siteuse.site_use_id'
12947: ||' AND cust.cust_account_id =site.cust_account_id AND site.cust_acct_site_id = siteuse.cust_acct_site_id AND siteuse.site_use_code ='||'''BILL_TO'''||' AND siteuse.status = '||'''A'''||')';
12948:

Line 12960: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header for C/CN');

12956: --ER#7479609 start
12957: l_hold_entity_where_clause := 'and h.SOLD_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||'''';
12958:
12959: end if; -- -- ER#3667551 end if added for BTH and other C/CN header holds
12960: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header for C/CN');
12961:
12962: InsertTable_OOH_Header (p_hold_source_id => p_hold_source_rec.hold_source_id
12963: ,p_header_id =>p_hold_source_rec.header_id
12964: ,p_org_id => p_org_id

Line 12972: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Header for C/CN');

12968: ,p_activity_status => l_act_status
12969: ,p_additional_where_clause => l_additional_where_clause
12970: ,x_is_hold_applied => x_is_hold_applied);
12971:
12972: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Header for C/CN');
12973: --ER#7479609 end
12974: end if; -- ER#3667551, end if added
12975: end if; -- ER#3667551, end if added
12976:

Line 13091: oe_debug_pub.add('l_sql_rowcount - '||l_sql_rowcount);

13087:
13088: execute immediate l_sqlmt using l_user_id, l_user_id, p_hold_source_rec.hold_source_id, p_hold_source_rec.hold_entity_id,p_org_id, p_hold_source_rec.hold_source_id, 'OEOH', l_activity_name, l_act_status;
13089:
13090: l_sql_rowcount := sql%rowcount;
13091: oe_debug_pub.add('l_sql_rowcount - '||l_sql_rowcount);
13092: IF l_sql_rowcount = 0 THEN
13093:
13094: select meaning into l_user_activity_name
13095: from oe_lookups

Line 13104: oe_debug_pub.add(' Hold Not applied for All requested records');

13100:
13101: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
13102: fnd_message.set_token('WF_ACT', l_user_activity_name);
13103: OE_MSG_PUB.ADD;
13104: oe_debug_pub.add(' Hold Not applied for All requested records');
13105: RAISE FND_API.G_EXC_ERROR;
13106: ELSIF l_sql_rowcount > 0 THEN
13107: SELECT count(*)
13108: into l_parent_count

Line 13121: oe_debug_pub.add('l_parent_count - '||l_parent_count);

13117: and oh.hold_source_id =
13118: p_hold_source_rec.hold_source_id );
13119:
13120: -- Note: The above query is used based on WHERE clause of the l_sqlmt but without any query on Workflow -- or Shipping product tables.
13121: oe_debug_pub.add('l_parent_count - '||l_parent_count);
13122: IF l_sql_rowcount < (l_parent_count+l_sql_rowcount) THEN
13123:
13124: select meaning into l_user_activity_name
13125: from oe_lookups

Line 13134: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

13130:
13131: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
13132: fnd_message.set_token('WF_ACT', l_user_activity_name);
13133: OE_MSG_PUB.ADD;
13134: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
13135: END IF;
13136: END IF;
13137: END IF;
13138: END IF;

Line 13151: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C/CN and B');

13147: l_hold_entity_where_clause := 'and ol.SOLD_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
13148: ||' and ol.INVOICE_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
13149:
13150:
13151: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C/CN and B');
13152: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
13153: ,p_line_id => p_hold_source_rec.line_id
13154: ,p_org_id => p_org_id
13155: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 13161: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN and B');

13157: ,p_activity_name => l_activity_name
13158: ,p_activity_status => l_act_status
13159: ,p_additional_where_clause => l_additional_where_clause
13160: ,x_is_hold_applied => x_is_hold_applied);
13161: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN and B');
13162: --ER#7479609 end
13163:
13164:
13165: --ER#7479609 start

Line 13175: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C/CN and S');

13171: l_hold_entity_where_clause := 'and ol.SOLD_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
13172: ||' and ol.SHIP_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
13173:
13174:
13175: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C/CN and S');
13176: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
13177: ,p_line_id => p_hold_source_rec.line_id
13178: ,p_org_id => p_org_id
13179: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 13185: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN and S');

13181: ,p_activity_name => l_activity_name
13182: ,p_activity_status => l_act_status
13183: ,p_additional_where_clause => l_additional_where_clause
13184: ,x_is_hold_applied => x_is_hold_applied);
13185: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN and S');
13186: --ER#7479609 end
13187:
13188:
13189: --ER#7479609 start

Line 13199: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C/CN and D');

13195: l_hold_entity_where_clause := 'and ol.SOLD_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
13196: ||' and ol.DELIVER_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
13197:
13198:
13199: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C/CN and D');
13200: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
13201: ,p_line_id => p_hold_source_rec.line_id
13202: ,p_org_id => p_org_id
13203: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 13209: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN and D');

13205: ,p_activity_name => l_activity_name
13206: ,p_activity_status => l_act_status
13207: ,p_additional_where_clause => l_additional_where_clause
13208: ,x_is_hold_applied => x_is_hold_applied);
13209: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN and D');
13210: --ER#7479609 end
13211:
13212:
13213: --ER#7479609 start

Line 13223: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C/CN and PL');

13219: l_hold_entity_where_clause := 'and ol.SOLD_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
13220: ||' and ol.PRICE_LIST_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
13221:
13222:
13223: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C/CN and PL');
13224: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
13225: ,p_line_id => p_hold_source_rec.line_id
13226: ,p_org_id => p_org_id
13227: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 13233: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN and PL');

13229: ,p_activity_name => l_activity_name
13230: ,p_activity_status => l_act_status
13231: ,p_additional_where_clause => l_additional_where_clause
13232: ,x_is_hold_applied => x_is_hold_applied);
13233: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN and PL');
13234: --ER#7479609 end
13235:
13236:
13237: --ER#7479609 start

Line 13247: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C/CN and LT');

13243: l_hold_entity_where_clause := 'and ol.SOLD_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
13244: ||' and ol.LINE_TYPE_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
13245:
13246:
13247: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C/CN and LT');
13248: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
13249: ,p_line_id => p_hold_source_rec.line_id
13250: ,p_org_id => p_org_id
13251: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 13257: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN and LT');

13253: ,p_activity_name => l_activity_name
13254: ,p_activity_status => l_act_status
13255: ,p_additional_where_clause => l_additional_where_clause
13256: ,x_is_hold_applied => x_is_hold_applied);
13257: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN and LT');
13258: --ER#7479609 end
13259:
13260:
13261: --ER#7479609 start

Line 13271: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C/CN and PT');

13267: l_hold_entity_where_clause := 'and ol.SOLD_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
13268: ||' and ol.PAYMENT_TERM_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
13269:
13270:
13271: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C/CN and PT');
13272: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
13273: ,p_line_id => p_hold_source_rec.line_id
13274: ,p_org_id => p_org_id
13275: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 13281: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN and PT');

13277: ,p_activity_name => l_activity_name
13278: ,p_activity_status => l_act_status
13279: ,p_additional_where_clause => l_additional_where_clause
13280: ,x_is_hold_applied => x_is_hold_applied);
13281: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN and PT');
13282: --ER#7479609 end
13283:
13284:
13285: --ER#7479609 start

Line 13294: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header for C/CN and OT');

13290:
13291: l_hold_entity_where_clause := 'and h.SOLD_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
13292: ||' and h.ORDER_TYPE_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
13293:
13294: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header for C/CN and OT');
13295: InsertTable_OOH_Header (p_hold_source_id => p_hold_source_rec.hold_source_id
13296: ,p_header_id =>p_hold_source_rec.header_id
13297: ,p_org_id => p_org_id
13298: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 13305: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Header for C/CN and OT');

13301: ,p_activity_status => l_act_status
13302: ,p_additional_where_clause => l_additional_where_clause
13303: ,x_is_hold_applied => x_is_hold_applied);
13304:
13305: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Header for C/CN and OT');
13306: --ER#7479609 end
13307:
13308: --ER#7479609 start
13309: -- ELSIF p_hold_source_rec.hold_entity_code = 'C' and --ER# 11824468

Line 13314: OE_DEBUG_PUB.ADD('Calling PaymentType_Hold for C/CN and P');

13310: ELSIF p_hold_source_rec.hold_entity_code IN('C','CN') and --ER# 11824468
13311: p_hold_source_rec.hold_entity_code2 = 'P' THEN
13312:
13313:
13314: OE_DEBUG_PUB.ADD('Calling PaymentType_Hold for C/CN and P');
13315: PaymentType_Hold (p_hold_source_rec => p_hold_source_rec
13316: ,p_org_id => p_org_id
13317: ,p_item_type => p_item_type
13318: ,p_activity_name => l_activity_name

Line 13329: OE_DEBUG_PUB.ADD('After Calling InsePaymentType_Hold for C/CN and P');

13325: x_return_status := '0';
13326: END IF;
13327: --ER#7479609 end
13328:
13329: OE_DEBUG_PUB.ADD('After Calling InsePaymentType_Hold for C/CN and P');
13330: --ER#7479609 end
13331:
13332: --ER#7479609 start
13333: --ELSIF p_hold_source_rec.hold_entity_code = 'C' and --ER# 11824468

Line 13341: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header for C/CN and TC');

13337:
13338: l_hold_entity_where_clause := 'and h.SOLD_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
13339: ||' and h.TRANSACTIONAL_CURR_CODE = '||''''||p_hold_source_rec.hold_entity_id2||'''';
13340:
13341: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header for C/CN and TC');
13342: InsertTable_OOH_Header (p_hold_source_id => p_hold_source_rec.hold_source_id
13343: ,p_header_id =>p_hold_source_rec.header_id
13344: ,p_org_id => p_org_id
13345: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 13352: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Header for C/CN and TC');

13348: ,p_activity_status => l_act_status
13349: ,p_additional_where_clause => l_additional_where_clause
13350: ,x_is_hold_applied => x_is_hold_applied);
13351:
13352: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Header for C/CN and TC');
13353: --ER#7479609 end
13354:
13355: --ER#7479609 start
13356: --ELSIF p_hold_source_rec.hold_entity_code = 'C' and --ER# 11824468

Line 13365: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C/CN and ST');

13361: l_hold_entity_where_clause := 'and ol.SOLD_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
13362: ||' and ol.SOURCE_TYPE_CODE = '||''''||p_hold_source_rec.hold_entity_id2||'''';
13363:
13364:
13365: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for C/CN and ST');
13366: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
13367: ,p_line_id => p_hold_source_rec.line_id
13368: ,p_org_id => p_org_id
13369: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 13375: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN and ST');

13371: ,p_activity_name => l_activity_name
13372: ,p_activity_status => l_act_status
13373: ,p_additional_where_clause => l_additional_where_clause
13374: ,x_is_hold_applied => x_is_hold_applied);
13375: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for C/CN and ST');
13376: --ER#7479609 end
13377:
13378:
13379: --ER#7479609 start

Line 13388: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header for C/CN and SC');

13384:
13385: l_hold_entity_where_clause := 'and h.SOLD_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
13386: ||' and h.SALES_CHANNEL_CODE = '||''''||p_hold_source_rec.hold_entity_id2||'''';
13387:
13388: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header for C/CN and SC');
13389: InsertTable_OOH_Header (p_hold_source_id => p_hold_source_rec.hold_source_id
13390: ,p_header_id =>p_hold_source_rec.header_id
13391: ,p_org_id => p_org_id
13392: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 13399: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Header for C/CN and SC');

13395: ,p_activity_status => l_act_status
13396: ,p_additional_where_clause => l_additional_where_clause
13397: ,x_is_hold_applied => x_is_hold_applied);
13398:
13399: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Header for C/CN and SC');
13400: --ER#7479609 end
13401:
13402:
13403: /*********************************************************

Line 13414: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for B');

13410: --ER#7479609 start
13411: l_hold_entity_where_clause := 'and ol.INVOICE_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||'''';
13412:
13413:
13414: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for B');
13415: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
13416: ,p_line_id => p_hold_source_rec.line_id
13417: ,p_org_id => p_org_id
13418: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 13424: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for B');

13420: ,p_activity_name => l_activity_name
13421: ,p_activity_status => l_act_status
13422: ,p_additional_where_clause => l_additional_where_clause
13423: ,x_is_hold_applied => x_is_hold_applied);
13424: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for B');
13425: --ER#7479609 end
13426:
13427: /*ER#7479609 start
13428: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 13577: oe_debug_pub.add(' Hold Not applied for All requested records');

13573:
13574: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
13575: fnd_message.set_token('WF_ACT', l_user_activity_name);
13576: OE_MSG_PUB.ADD;
13577: oe_debug_pub.add(' Hold Not applied for All requested records');
13578: RAISE FND_API.G_EXC_ERROR;
13579: ELSIF l_sql_rowcount > 0 THEN
13580: SELECT count(*)
13581: into l_parent_count

Line 13609: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

13605:
13606: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
13607: fnd_message.set_token('WF_ACT', l_user_activity_name);
13608: OE_MSG_PUB.ADD;
13609: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
13610: END IF;
13611: END IF;
13612: END IF;
13613: END IF;

Line 13627: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for S');

13623: --ER#7479609 start
13624: l_hold_entity_where_clause := 'and ol.SHIP_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||'''';
13625:
13626:
13627: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for S');
13628: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
13629: ,p_line_id => p_hold_source_rec.line_id
13630: ,p_org_id => p_org_id
13631: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 13637: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for S');

13633: ,p_activity_name => l_activity_name
13634: ,p_activity_status => l_act_status
13635: ,p_additional_where_clause => l_additional_where_clause
13636: ,x_is_hold_applied => x_is_hold_applied);
13637: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for S');
13638: --ER#7479609 end
13639:
13640: /*ER#7479609 start
13641: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 13789: oe_debug_pub.add(' Hold Not applied for All requested records');

13785:
13786: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
13787: fnd_message.set_token('WF_ACT', l_user_activity_name);
13788: OE_MSG_PUB.ADD;
13789: oe_debug_pub.add(' Hold Not applied for All requested records');
13790: RAISE FND_API.G_EXC_ERROR;
13791: ELSIF l_sql_rowcount > 0 THEN
13792: SELECT count(*)
13793: into l_parent_count

Line 13821: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

13817:
13818: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
13819: fnd_message.set_token('WF_ACT', l_user_activity_name);
13820: OE_MSG_PUB.ADD;
13821: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
13822: END IF;
13823: END IF;
13824: END IF;
13825: END IF;

Line 13838: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W');

13834: --ER#7479609 start
13835: l_hold_entity_where_clause := 'and ol.SHIP_FROM_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||'''';
13836:
13837:
13838: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W');
13839: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
13840: ,p_line_id => p_hold_source_rec.line_id
13841: ,p_org_id => p_org_id
13842: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 13848: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W');

13844: ,p_activity_name => l_activity_name
13845: ,p_activity_status => l_act_status
13846: ,p_additional_where_clause => l_additional_where_clause
13847: ,x_is_hold_applied => x_is_hold_applied);
13848: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W');
13849: --ER#7479609 end
13850:
13851: /*ER#7479609 start
13852: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 14000: oe_debug_pub.add(' Hold Not applied for All requested records');

13996:
13997: fnd_message.set_name('ONT', 'OE_NO_HOLD_ALL_LINES');
13998: fnd_message.set_token('WF_ACT', l_user_activity_name);
13999: OE_MSG_PUB.ADD;
14000: oe_debug_pub.add(' Hold Not applied for All requested records');
14001: RAISE FND_API.G_EXC_ERROR;
14002: ELSIF l_sql_rowcount > 0 THEN
14003: SELECT count(*)
14004: into l_parent_count

Line 14032: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');

14028:
14029: fnd_message.set_name('ONT', 'OE_NO_HOLD_FEW_LINES');
14030: fnd_message.set_token('WF_ACT', l_user_activity_name);
14031: OE_MSG_PUB.ADD;
14032: oe_debug_pub.add(' Hold Not applied for FEW of the requested records');
14033: END IF;
14034: END IF;
14035: END IF;
14036: END IF;

Line 14049: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I');

14045: --ER#7479609 start
14046: l_hold_entity_where_clause := 'and ol.INVENTORY_ITEM_ID = '||''''||p_hold_source_rec.hold_entity_id||'''';
14047:
14048:
14049: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for I');
14050: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14051: ,p_line_id => p_hold_source_rec.line_id
14052: ,p_org_id => p_org_id
14053: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14059: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I');

14055: ,p_activity_name => l_activity_name
14056: ,p_activity_status => l_act_status
14057: ,p_additional_where_clause => l_additional_where_clause
14058: ,x_is_hold_applied => x_is_hold_applied);
14059: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for I');
14060: --ER#7479609 end
14061:
14062: /*ER#7479609 start
14063: IF p_hold_source_rec.line_id IS NOT NULL THEN

Line 14258: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for PR and T');

14254: l_hold_entity_where_clause := 'and ol.PROJECT_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14255: ||' and ol.TASK_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14256:
14257:
14258: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for PR and T');
14259: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14260: ,p_line_id => p_hold_source_rec.line_id
14261: ,p_org_id => p_org_id
14262: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14268: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for PR and T');

14264: ,p_activity_name => l_activity_name
14265: ,p_activity_status => l_act_status
14266: ,p_additional_where_clause => l_additional_where_clause
14267: ,x_is_hold_applied => x_is_hold_applied);
14268: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for PR and T');
14269: --ER#7479609 end
14270:
14271: --ER#7479609 start
14272: ELSIF p_hold_source_rec.hold_entity_code = 'PR' and

Line 14278: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for PR and T');

14274:
14275: l_hold_entity_where_clause := 'and ol.PROJECT_ID = '||''''||p_hold_source_rec.hold_entity_id||'''';
14276:
14277:
14278: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for PR and T');
14279: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14280: ,p_line_id => p_hold_source_rec.line_id
14281: ,p_org_id => p_org_id
14282: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14288: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for PR and T');

14284: ,p_activity_name => l_activity_name
14285: ,p_activity_status => l_act_status
14286: ,p_additional_where_clause => l_additional_where_clause
14287: ,x_is_hold_applied => x_is_hold_applied);
14288: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for PR and T');
14289: --ER#7479609 end
14290:
14291:
14292: --ER#7479609 start

Line 14300: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for PL and TC');

14296: l_hold_entity_where_clause := 'and h.PRICE_LIST_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14297: ||' and h.TRANSACTIONAL_CURR_CODE = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14298:
14299:
14300: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for PL and TC');
14301: InsertTable_OOH_Header (p_hold_source_id => p_hold_source_rec.hold_source_id
14302: ,p_header_id =>p_hold_source_rec.header_id
14303: ,p_org_id => p_org_id
14304: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14310: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for PR and T');

14306: ,p_activity_name => l_activity_name
14307: ,p_activity_status => l_act_status
14308: ,p_additional_where_clause => l_additional_where_clause
14309: ,x_is_hold_applied => x_is_hold_applied);
14310: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for PR and T');
14311: --ER#7479609 end
14312:
14313:
14314: --ER#7479609 start

Line 14321: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for PL and TC');

14317:
14318: l_hold_entity_where_clause := 'and h.PRICE_LIST_ID = '||''''||p_hold_source_rec.hold_entity_id||'''';
14319:
14320:
14321: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for PL and TC');
14322: InsertTable_OOH_Header (p_hold_source_id => p_hold_source_rec.hold_source_id
14323: ,p_header_id =>p_hold_source_rec.header_id
14324: ,p_org_id => p_org_id
14325: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14331: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for PR and T');

14327: ,p_activity_name => l_activity_name
14328: ,p_activity_status => l_act_status
14329: ,p_additional_where_clause => l_additional_where_clause
14330: ,x_is_hold_applied => x_is_hold_applied);
14331: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for PR and T');
14332: --ER#7479609 end
14333:
14334: --ER#7479609 start
14335: ELSIF p_hold_source_rec.hold_entity_code = 'OT' and

Line 14342: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for OT and LT');

14338: l_hold_entity_where_clause := 'and h.ORDER_TYPE_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14339: ||' and ol.LINE_TYPE_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14340:
14341:
14342: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for OT and LT');
14343: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14344: ,p_line_id => p_hold_source_rec.line_id
14345: ,p_org_id => p_org_id
14346: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14352: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for OT and LT');

14348: ,p_activity_name => l_activity_name
14349: ,p_activity_status => l_act_status
14350: ,p_additional_where_clause => l_additional_where_clause
14351: ,x_is_hold_applied => x_is_hold_applied);
14352: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for OT and LT');
14353: --ER#7479609 end
14354:
14355: --ER#7479609 start
14356: ELSIF p_hold_source_rec.hold_entity_code = 'OT' and

Line 14363: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header for OT and TC');

14359: l_hold_entity_where_clause := 'and h.ORDER_TYPE_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14360: ||' and h.TRANSACTIONAL_CURR_CODE = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14361:
14362:
14363: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header for OT and TC');
14364: InsertTable_OOH_Header (p_hold_source_id => p_hold_source_rec.hold_source_id
14365: ,p_header_id =>p_hold_source_rec.header_id
14366: ,p_org_id => p_org_id
14367: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14373: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Header for OT and TC');

14369: ,p_activity_name => l_activity_name
14370: ,p_activity_status => l_act_status
14371: ,p_additional_where_clause => l_additional_where_clause
14372: ,x_is_hold_applied => x_is_hold_applied);
14373: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Header for OT and TC');
14374: --ER#7479609 end
14375:
14376: --ER#7479609 start
14377: ELSIF p_hold_source_rec.hold_entity_code = 'OT' and

Line 14383: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header for OT and TC');

14379:
14380: l_hold_entity_where_clause := 'and h.ORDER_TYPE_ID = '||''''||p_hold_source_rec.hold_entity_id||'''';
14381:
14382:
14383: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Header for OT and TC');
14384: InsertTable_OOH_Header (p_hold_source_id => p_hold_source_rec.hold_source_id
14385: ,p_header_id =>p_hold_source_rec.header_id
14386: ,p_org_id => p_org_id
14387: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14393: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Header for OT and TC');

14389: ,p_activity_name => l_activity_name
14390: ,p_activity_status => l_act_status
14391: ,p_additional_where_clause => l_additional_where_clause
14392: ,x_is_hold_applied => x_is_hold_applied);
14393: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Header for OT and TC');
14394: --ER#7479609 end
14395:
14396:
14397: --ER#7479609 start

Line 14405: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for CD and CB');

14401: l_hold_entity_where_clause := 'and to_char(ol.CREATION_DATE,''DD-MON-RRRR'') = '||''''||p_hold_source_rec.hold_entity_id||''''
14402: ||' and ol.CREATED_BY = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14403:
14404:
14405: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for CD and CB');
14406: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14407: ,p_line_id => p_hold_source_rec.line_id
14408: ,p_org_id => p_org_id
14409: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14415: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for CD and CB');

14411: ,p_activity_name => l_activity_name
14412: ,p_activity_status => l_act_status
14413: ,p_additional_where_clause => l_additional_where_clause
14414: ,x_is_hold_applied => x_is_hold_applied);
14415: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for CD and CB');
14416: --ER#7479609 end
14417:
14418: --ER#7479609 start
14419: ELSIF p_hold_source_rec.hold_entity_code = 'CD' and

Line 14425: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for CD');

14421:
14422: l_hold_entity_where_clause := 'and to_char(ol.CREATION_DATE,''DD-MON-RRRR'') = '||''''||p_hold_source_rec.hold_entity_id||'''';
14423:
14424:
14425: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for CD');
14426: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14427: ,p_line_id => p_hold_source_rec.line_id
14428: ,p_org_id => p_org_id
14429: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14435: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for CD');

14431: ,p_activity_name => l_activity_name
14432: ,p_activity_status => l_act_status
14433: ,p_additional_where_clause => l_additional_where_clause
14434: ,x_is_hold_applied => x_is_hold_applied);
14435: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for CD');
14436: --ER#7479609 end
14437:
14438:
14439: --ER#7479609 start

Line 14446: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for SC');

14442:
14443: l_hold_entity_where_clause := 'and h.SALES_CHANNEL_CODE = '||''''||p_hold_source_rec.hold_entity_id||'''';
14444:
14445:
14446: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for SC');
14447: InsertTable_OOH_Header (p_hold_source_id => p_hold_source_rec.hold_source_id
14448: ,p_header_id =>p_hold_source_rec.header_id
14449: ,p_org_id => p_org_id
14450: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14456: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for SC');

14452: ,p_activity_name => l_activity_name
14453: ,p_activity_status => l_act_status
14454: ,p_additional_where_clause => l_additional_where_clause
14455: ,x_is_hold_applied => x_is_hold_applied);
14456: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for SC');
14457: --ER#7479609 end
14458:
14459: --ER#7479609 start
14460: ELSIF p_hold_source_rec.hold_entity_code = 'P'

Line 14464: OE_DEBUG_PUB.ADD('Calling PaymentType_Hold for P');

14460: ELSIF p_hold_source_rec.hold_entity_code = 'P'
14461: AND p_hold_source_rec.hold_entity_code2 IS NULL THEN
14462:
14463:
14464: OE_DEBUG_PUB.ADD('Calling PaymentType_Hold for P');
14465: PaymentType_Hold (p_hold_source_rec => p_hold_source_rec
14466: ,p_org_id => p_org_id
14467: ,p_item_type => p_item_type
14468: ,p_activity_name => l_activity_name

Line 14479: OE_DEBUG_PUB.ADD('After Calling PaymentType_Hold for P');

14475: x_return_status := '0';
14476: END IF;
14477: --ER#7479609 end
14478:
14479: OE_DEBUG_PUB.ADD('After Calling PaymentType_Hold for P');
14480: --ER#7479609 end
14481:
14482: --ER#7479609 start
14483: ELSIF p_hold_source_rec.hold_entity_code = 'SM'

Line 14489: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for SM');

14485:
14486: l_hold_entity_where_clause := 'and ol.SHIPPING_METHOD_CODE = '||''''||p_hold_source_rec.hold_entity_id||'''';
14487:
14488:
14489: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for SM');
14490: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14491: ,p_line_id => p_hold_source_rec.line_id
14492: ,p_org_id => p_org_id
14493: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14499: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for SM');

14495: ,p_activity_name => l_activity_name
14496: ,p_activity_status => l_act_status
14497: ,p_additional_where_clause => l_additional_where_clause
14498: ,x_is_hold_applied => x_is_hold_applied);
14499: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for SM');
14500: --ER#7479609 end
14501:
14502: --ER#7479609 start
14503: ELSIF p_hold_source_rec.hold_entity_code = 'D'

Line 14510: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for D');

14506: --ER#7479609 start
14507: l_hold_entity_where_clause := 'and ol.DELIVER_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||'''';
14508:
14509:
14510: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for D');
14511: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14512: ,p_line_id => p_hold_source_rec.line_id
14513: ,p_org_id => p_org_id
14514: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14520: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for D');

14516: ,p_activity_name => l_activity_name
14517: ,p_activity_status => l_act_status
14518: ,p_additional_where_clause => l_additional_where_clause
14519: ,x_is_hold_applied => x_is_hold_applied);
14520: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for D');
14521: --ER#7479609 end
14522:
14523:
14524: --ER#7479609 start

Line 14559: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for TM:'||l_line_id_tab.count);

14555: END;
14556:
14557:
14558:
14559: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for TM:'||l_line_id_tab.count);
14560:
14561: FOR i in 1 .. l_line_id_tab.count LOOP
14562:
14563: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id

Line 14574: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for TM');

14570: ,p_additional_where_clause => l_additional_where_clause
14571: ,x_is_hold_applied => x_is_hold_applied);
14572: END LOOP;
14573:
14574: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for TM');
14575:
14576: ELSIF p_hold_source_rec.hold_entity_code = 'TM'
14577: AND p_hold_source_rec.hold_entity_code2 = 'OI' THEN
14578:

Line 14612: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for TM and OI:'||l_line_id_tab.count);

14608: END;
14609:
14610:
14611:
14612: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for TM and OI:'||l_line_id_tab.count);
14613:
14614: FOR i in 1 .. l_line_id_tab.count LOOP
14615:
14616: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id

Line 14627: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for TM and OI');

14623: ,p_additional_where_clause => l_additional_where_clause
14624: ,x_is_hold_applied => x_is_hold_applied);
14625: END LOOP;
14626:
14627: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for TM and OI');
14628: --ER#7479609 end
14629:
14630: --ER#12571983 start
14631: /*********************************************************

Line 14642: oe_debug_pub.add('Calling InsertTable_OOH_Line for I and E/EN');

14638: l_hold_entity_where_clause := 'and ol.INVENTORY_ITEM_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14639: ||' and ol.end_customer_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14640:
14641:
14642: oe_debug_pub.add('Calling InsertTable_OOH_Line for I and E/EN');
14643: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14644: ,p_line_id => p_hold_source_rec.line_id
14645: ,p_org_id => p_org_id
14646: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14652: oe_debug_pub.add('After Calling InsertTable_OOH_Line for I and E/EN');

14648: ,p_activity_name => l_activity_name
14649: ,p_activity_status => l_act_status
14650: ,p_additional_where_clause => l_additional_where_clause
14651: ,x_is_hold_applied => x_is_hold_applied);
14652: oe_debug_pub.add('After Calling InsertTable_OOH_Line for I and E/EN');
14653:
14654:
14655: ELSIF p_hold_source_rec.hold_entity_code = 'IC' and
14656: p_hold_source_rec.hold_entity_code2 IN ('EC','EN') THEN --ER# 11824468

Line 14668: oe_debug_pub.add('Calling InsertTable_OOH_Line for IC and EC/EN');

14664: and mic.organization_id= '||''''||l_master_orgid||''''
14665: ||' and mic.category_id = '||''''||p_hold_source_rec.hold_entity_id||''''||')';
14666:
14667:
14668: oe_debug_pub.add('Calling InsertTable_OOH_Line for IC and EC/EN');
14669: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14670: ,p_line_id => p_hold_source_rec.line_id
14671: ,p_org_id => p_org_id
14672: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14678: oe_debug_pub.add('After Calling InsertTable_OOH_Line for IC and EC/EN');

14674: ,p_activity_name => l_activity_name
14675: ,p_activity_status => l_act_status
14676: ,p_additional_where_clause => l_additional_where_clause
14677: ,x_is_hold_applied => x_is_hold_applied);
14678: oe_debug_pub.add('After Calling InsertTable_OOH_Line for IC and EC/EN');
14679:
14680:
14681: ELSIF p_hold_source_rec.hold_entity_code = 'W' and
14682: p_hold_source_rec.hold_entity_code2 IN ('EC','EN') THEN --ER# 11824468

Line 14689: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and E/EN');

14685: l_hold_entity_where_clause := 'and ol.SHIP_FROM_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14686: ||' ol.end_customer_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14687:
14688:
14689: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for W and E/EN');
14690: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14691: ,p_line_id => p_hold_source_rec.line_id
14692: ,p_org_id => p_org_id
14693: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14699: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and E/EN');

14695: ,p_activity_name => l_activity_name
14696: ,p_activity_status => l_act_status
14697: ,p_additional_where_clause => l_additional_where_clause
14698: ,x_is_hold_applied => x_is_hold_applied);
14699: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for W and E/EN');
14700:
14701: ELSIF p_hold_source_rec.hold_entity_code IN('EC','EN') --ER# 11824468
14702: AND p_hold_source_rec.hold_entity_code2 IS NULL THEN
14703: -- Use header_id for Customer based hold source

Line 14708: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN');

14704:
14705:
14706: l_hold_entity_where_clause := 'and ol.end_customer_ID = '||''''||p_hold_source_rec.hold_entity_id||'''';
14707:
14708: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN');
14709:
14710: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14711: ,p_line_id => p_hold_source_rec.line_id
14712: ,p_org_id => p_org_id

Line 14720: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN');

14716: ,p_activity_status => l_act_status
14717: ,p_additional_where_clause => l_additional_where_clause
14718: ,x_is_hold_applied => x_is_hold_applied);
14719:
14720: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN');
14721:
14722:
14723:
14724: ELSIF p_hold_source_rec.hold_entity_code IN('EC','EN') and --ER# 11824468

Line 14732: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and B');

14728: l_hold_entity_where_clause := 'and ol.end_customer_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14729: ||' and ol.INVOICE_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14730:
14731:
14732: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and B');
14733: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14734: ,p_line_id => p_hold_source_rec.line_id
14735: ,p_org_id => p_org_id
14736: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14742: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and B');

14738: ,p_activity_name => l_activity_name
14739: ,p_activity_status => l_act_status
14740: ,p_additional_where_clause => l_additional_where_clause
14741: ,x_is_hold_applied => x_is_hold_applied);
14742: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and B');
14743:
14744:
14745: ELSIF p_hold_source_rec.hold_entity_code IN('EC','EN') and --ER# 11824468
14746: p_hold_source_rec.hold_entity_code2 = 'S' THEN

Line 14753: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and S');

14749: l_hold_entity_where_clause := 'and ol.end_customer_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14750: ||' and ol.SHIP_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14751:
14752:
14753: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and S');
14754: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14755: ,p_line_id => p_hold_source_rec.line_id
14756: ,p_org_id => p_org_id
14757: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14763: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and S');

14759: ,p_activity_name => l_activity_name
14760: ,p_activity_status => l_act_status
14761: ,p_additional_where_clause => l_additional_where_clause
14762: ,x_is_hold_applied => x_is_hold_applied);
14763: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and S');
14764:
14765: ELSIF p_hold_source_rec.hold_entity_code IN('EC','EN') and --ER# 11824468
14766: p_hold_source_rec.hold_entity_code2 = 'D' THEN
14767:

Line 14773: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and D');

14769: l_hold_entity_where_clause := 'and ol.end_customer_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14770: ||' and ol.DELIVER_TO_ORG_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14771:
14772:
14773: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and D');
14774: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14775: ,p_line_id => p_hold_source_rec.line_id
14776: ,p_org_id => p_org_id
14777: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14783: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and D');

14779: ,p_activity_name => l_activity_name
14780: ,p_activity_status => l_act_status
14781: ,p_additional_where_clause => l_additional_where_clause
14782: ,x_is_hold_applied => x_is_hold_applied);
14783: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and D');
14784:
14785: ELSIF p_hold_source_rec.hold_entity_code IN('EC','EN') and --ER# 11824468
14786: p_hold_source_rec.hold_entity_code2 = 'PL' THEN
14787:

Line 14793: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and PL');

14789: l_hold_entity_where_clause := 'and ol.end_customer_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14790: ||' and ol.PRICE_LIST_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14791:
14792:
14793: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and PL');
14794: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14795: ,p_line_id => p_hold_source_rec.line_id
14796: ,p_org_id => p_org_id
14797: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14803: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and PL');

14799: ,p_activity_name => l_activity_name
14800: ,p_activity_status => l_act_status
14801: ,p_additional_where_clause => l_additional_where_clause
14802: ,x_is_hold_applied => x_is_hold_applied);
14803: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and PL');
14804:
14805: ELSIF p_hold_source_rec.hold_entity_code IN('EC','EN') and --ER# 11824468
14806: p_hold_source_rec.hold_entity_code2 = 'LT' THEN
14807:

Line 14813: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and LT');

14809: l_hold_entity_where_clause := 'and ol.end_customer_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14810: ||' and ol.LINE_TYPE_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14811:
14812:
14813: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and LT');
14814: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14815: ,p_line_id => p_hold_source_rec.line_id
14816: ,p_org_id => p_org_id
14817: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14823: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and LT');

14819: ,p_activity_name => l_activity_name
14820: ,p_activity_status => l_act_status
14821: ,p_additional_where_clause => l_additional_where_clause
14822: ,x_is_hold_applied => x_is_hold_applied);
14823: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and LT');
14824:
14825: ELSIF p_hold_source_rec.hold_entity_code IN('EC','EN') and --ER# 11824468
14826: p_hold_source_rec.hold_entity_code2 = 'PT' THEN
14827:

Line 14833: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and PT');

14829: l_hold_entity_where_clause := 'and ol.end_customer_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14830: ||' and ol.PAYMENT_TERM_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14831:
14832:
14833: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and PT');
14834: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14835: ,p_line_id => p_hold_source_rec.line_id
14836: ,p_org_id => p_org_id
14837: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14843: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and PT');

14839: ,p_activity_name => l_activity_name
14840: ,p_activity_status => l_act_status
14841: ,p_additional_where_clause => l_additional_where_clause
14842: ,x_is_hold_applied => x_is_hold_applied);
14843: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and PT');
14844:
14845: ELSIF p_hold_source_rec.hold_entity_code IN('EC','EN') and --ER# 11824468
14846: p_hold_source_rec.hold_entity_code2 = 'OT' THEN
14847:

Line 14852: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and OT');

14848:
14849: l_hold_entity_where_clause := 'and ol.end_customer_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14850: ||' and h.ORDER_TYPE_ID = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14851:
14852: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and OT');
14853: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14854: ,p_line_id => p_hold_source_rec.line_id
14855: ,p_org_id => p_org_id
14856: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14863: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and OT');

14859: ,p_activity_status => l_act_status
14860: ,p_additional_where_clause => l_additional_where_clause
14861: ,x_is_hold_applied => x_is_hold_applied);
14862:
14863: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and OT');
14864:
14865: ELSIF p_hold_source_rec.hold_entity_code IN('EC','EN') and --ER# 11824468
14866: p_hold_source_rec.hold_entity_code2 = 'P' THEN
14867:

Line 14869: OE_DEBUG_PUB.ADD('Calling PaymentType_Hold for EC/EN and P');

14865: ELSIF p_hold_source_rec.hold_entity_code IN('EC','EN') and --ER# 11824468
14866: p_hold_source_rec.hold_entity_code2 = 'P' THEN
14867:
14868:
14869: OE_DEBUG_PUB.ADD('Calling PaymentType_Hold for EC/EN and P');
14870: PaymentType_Hold (p_hold_source_rec => p_hold_source_rec
14871: ,p_org_id => p_org_id
14872: ,p_item_type => p_item_type
14873: ,p_activity_name => l_activity_name

Line 14884: OE_DEBUG_PUB.ADD('After Calling InsePaymentType_Hold for EC/EN and P');

14880: x_return_status := '0';
14881: END IF;
14882:
14883:
14884: OE_DEBUG_PUB.ADD('After Calling InsePaymentType_Hold for EC/EN and P');
14885:
14886: ELSIF p_hold_source_rec.hold_entity_code IN('EC','EN') and --ER# 11824468
14887: p_hold_source_rec.hold_entity_code2 = 'TC' THEN
14888:

Line 14893: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and TC');

14889:
14890: l_hold_entity_where_clause := 'and ol.end_customer_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14891: ||' and h.TRANSACTIONAL_CURR_CODE = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14892:
14893: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and TC');
14894: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14895: ,p_line_id => p_hold_source_rec.line_id
14896: ,p_org_id => p_org_id
14897: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14904: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and TC');

14900: ,p_activity_status => l_act_status
14901: ,p_additional_where_clause => l_additional_where_clause
14902: ,x_is_hold_applied => x_is_hold_applied);
14903:
14904: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and TC');
14905:
14906: ELSIF p_hold_source_rec.hold_entity_code IN('EC','EN') and --ER# 11824468
14907: p_hold_source_rec.hold_entity_code2 = 'ST' THEN
14908:

Line 14914: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and ST');

14910: l_hold_entity_where_clause := 'and ol.end_customer_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14911: ||' and ol.SOURCE_TYPE_CODE = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14912:
14913:
14914: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and ST');
14915: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14916: ,p_line_id => p_hold_source_rec.line_id
14917: ,p_org_id => p_org_id
14918: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14924: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and ST');

14920: ,p_activity_name => l_activity_name
14921: ,p_activity_status => l_act_status
14922: ,p_additional_where_clause => l_additional_where_clause
14923: ,x_is_hold_applied => x_is_hold_applied);
14924: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and ST');
14925:
14926: ELSIF p_hold_source_rec.hold_entity_code IN('EC','EN') and --ER# 11824468
14927: p_hold_source_rec.hold_entity_code2 = 'SC' THEN
14928:

Line 14933: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and SC');

14929:
14930: l_hold_entity_where_clause := 'and ol.end_customer_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14931: ||' and h.SALES_CHANNEL_CODE = '||''''||p_hold_source_rec.hold_entity_id2||'''';
14932:
14933: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and SC');
14934: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14935: ,p_line_id => p_hold_source_rec.line_id
14936: ,p_org_id => p_org_id
14937: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14944: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and SC');

14940: ,p_activity_status => l_act_status
14941: ,p_additional_where_clause => l_additional_where_clause
14942: ,x_is_hold_applied => x_is_hold_applied);
14943:
14944: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and SC');
14945:
14946: ELSIF p_hold_source_rec.hold_entity_code IN('EC','EN') and
14947: p_hold_source_rec.hold_entity_code2 = 'EL' THEN
14948:

Line 14954: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and EL');

14950: l_hold_entity_where_clause := 'and ol.end_customer_ID = '||''''||p_hold_source_rec.hold_entity_id||''''
14951: ||' and ol.end_customer_site_use_id = '||''''
14952: ||p_hold_source_rec.hold_entity_id2||'''';
14953:
14954: OE_DEBUG_PUB.ADD('Calling InsertTable_OOH_Line for EC/EN and EL');
14955: InsertTable_OOH_Line (p_hold_source_id => p_hold_source_rec.hold_source_id
14956: ,p_line_id => p_hold_source_rec.line_id
14957: ,p_org_id => p_org_id
14958: ,p_hold_entity_where_clause => l_hold_entity_where_clause

Line 14965: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and EL');

14961: ,p_activity_status => l_act_status
14962: ,p_additional_where_clause => l_additional_where_clause
14963: ,x_is_hold_applied => x_is_hold_applied);
14964:
14965: OE_DEBUG_PUB.ADD('After Calling InsertTable_OOH_Line for EC/EN and EL');
14966: --ER#12571983 end
14967: -----------------------------------------------
14968:
14969: END IF;

Line 14971: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Applying hold');

14967: -----------------------------------------------
14968:
14969: END IF;
14970: -- 16053361
14971: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Applying hold');
14972: If NVL (Fnd_Profile.Value('ONT_RAISE_STATUS_CHANGE_BUSINESS_EVENT'), 'N')='Y'
14973: THEN
14974: IF l_debug_level > 0 THEN
14975: oe_debug_pub.add( 'OE_HOLDS_PVT -Preparing paramters to pass to Integration event for Applying hold');

Line 14975: oe_debug_pub.add( 'OE_HOLDS_PVT -Preparing paramters to pass to Integration event for Applying hold');

14971: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Applying hold');
14972: If NVL (Fnd_Profile.Value('ONT_RAISE_STATUS_CHANGE_BUSINESS_EVENT'), 'N')='Y'
14973: THEN
14974: IF l_debug_level > 0 THEN
14975: oe_debug_pub.add( 'OE_HOLDS_PVT -Preparing paramters to pass to Integration event for Applying hold');
14976: END IF;
14977: l_count := 1;
14978: l_nameVal_tbl(l_count).name := 'CHANGE_TYPE';
14979: l_nameVal_tbl(l_count).value := 'APPLY';

Line 14987: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);

14983: l_nameVal_tbl(l_count+2).value := null;
14984: -- Logic to derive the HEADER_ID
14985: IF p_hold_source_rec.hold_entity_code = 'O' THEN
14986: IF l_debug_level > 0 THEN
14987: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);
14988: END IF;
14989: IF p_hold_source_rec.hold_entity_id is NOT NULL THEN
14990: IF l_debug_level > 0 THEN
14991: oe_debug_pub.add(' p_hold_source_rec.hold_entity_id : ' || p_hold_source_rec.hold_entity_id);

Line 14991: oe_debug_pub.add(' p_hold_source_rec.hold_entity_id : ' || p_hold_source_rec.hold_entity_id);

14987: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);
14988: END IF;
14989: IF p_hold_source_rec.hold_entity_id is NOT NULL THEN
14990: IF l_debug_level > 0 THEN
14991: oe_debug_pub.add(' p_hold_source_rec.hold_entity_id : ' || p_hold_source_rec.hold_entity_id);
14992: END IF;
14993: l_header_rec.header_id := p_hold_source_rec.hold_entity_id;
14994: END IF;
14995: ELSE --p_hold_source_rec.hold_entity_code != 'O'

Line 14997: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);

14993: l_header_rec.header_id := p_hold_source_rec.hold_entity_id;
14994: END IF;
14995: ELSE --p_hold_source_rec.hold_entity_code != 'O'
14996: IF l_debug_level > 0 THEN
14997: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);
14998: END IF;
14999: IF p_hold_source_rec.header_id is NOT NULL THEN
15000: IF l_debug_level > 0 THEN
15001: oe_debug_pub.add(' p_hold_source_rec.header_id : ' || p_hold_source_rec.header_id);

Line 15001: oe_debug_pub.add(' p_hold_source_rec.header_id : ' || p_hold_source_rec.header_id);

14997: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);
14998: END IF;
14999: IF p_hold_source_rec.header_id is NOT NULL THEN
15000: IF l_debug_level > 0 THEN
15001: oe_debug_pub.add(' p_hold_source_rec.header_id : ' || p_hold_source_rec.header_id);
15002: END IF;
15003: l_header_rec.header_id := p_hold_source_rec.header_id;
15004: END IF;
15005: END IF;

Line 15011: oe_debug_pub.add( 'OE_HOLDS_PVT - Done with Raising Integration event for Applying hold');

15007: p_line_id => p_hold_source_rec.line_id,
15008: p_event_name => 'oracle.apps.ont.hold.action',
15009: p_nameVal_tbl => l_nameVal_tbl);
15010: IF l_debug_level > 0 THEN
15011: oe_debug_pub.add( 'OE_HOLDS_PVT - Done with Raising Integration event for Applying hold');
15012: END IF;
15013: END IF;
15014: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Applying hold');
15015: -- 16053361

Line 15014: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Applying hold');

15010: IF l_debug_level > 0 THEN
15011: oe_debug_pub.add( 'OE_HOLDS_PVT - Done with Raising Integration event for Applying hold');
15012: END IF;
15013: END IF;
15014: oe_debug_pub.add( 'OE_HOLDS_PVT - Raise Integration event for Applying hold');
15015: -- 16053361
15016:
15017:
15018: -- GENESIS --

Line 15022: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - p_hold_source_rec.line_id IS NOT NULL');

15018: -- GENESIS --
15019: IF p_hold_source_rec.line_id IS NOT NULL THEN
15020:
15021: IF l_debug_level > 0 THEN
15022: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - p_hold_source_rec.line_id IS NOT NULL');
15023: END IF;
15024:
15025: OPEN check_line_hold_type_cur(p_hold_source_rec.line_id);
15026: FETCH check_line_hold_type_cur INTO l_check_hold;

Line 15029: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - l_check_hold' || l_check_hold);

15025: OPEN check_line_hold_type_cur(p_hold_source_rec.line_id);
15026: FETCH check_line_hold_type_cur INTO l_check_hold;
15027: CLOSE check_line_hold_type_cur;
15028: IF l_debug_level > 0 THEN
15029: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - l_check_hold' || l_check_hold);
15030: END IF;
15031:
15032: ELSIF p_hold_source_rec.line_id IS NULL AND
15033: p_hold_source_rec.header_id IS NOT NULL THEN

Line 15035: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - p_hold_source_rec.header_id IS NOT NULL');

15031:
15032: ELSIF p_hold_source_rec.line_id IS NULL AND
15033: p_hold_source_rec.header_id IS NOT NULL THEN
15034: IF l_debug_level > 0 THEN
15035: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - p_hold_source_rec.header_id IS NOT NULL');
15036: END IF;
15037: OPEN check_hdr_hold_type_cur(p_hold_source_rec.header_id);
15038: FETCH check_hdr_hold_type_cur INTO l_check_hold;
15039: CLOSE check_hdr_hold_type_cur;

Line 15041: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - l_check_hold' || l_check_hold);

15037: OPEN check_hdr_hold_type_cur(p_hold_source_rec.header_id);
15038: FETCH check_hdr_hold_type_cur INTO l_check_hold;
15039: CLOSE check_hdr_hold_type_cur;
15040: IF l_debug_level > 0 THEN
15041: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - l_check_hold' || l_check_hold);
15042: END IF;
15043:
15044: ELSIF p_hold_source_rec.line_id IS NULL AND
15045: p_hold_source_rec.header_id IS NULL AND

Line 15048: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - p_hold_source_rec.hold_source_id IS NOT NULL');

15044: ELSIF p_hold_source_rec.line_id IS NULL AND
15045: p_hold_source_rec.header_id IS NULL AND
15046: p_hold_source_rec.hold_source_id IS NOT NULL THEN
15047: IF l_debug_level > 0 THEN
15048: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - p_hold_source_rec.hold_source_id IS NOT NULL');
15049: END IF;
15050: OPEN check_src_hold_type_cur(p_hold_source_rec.hold_source_id);
15051: FETCH check_src_hold_type_cur INTO l_check_hold;
15052: CLOSE check_src_hold_type_cur;

Line 15055: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - l_check_hold :' || l_check_hold);

15051: FETCH check_src_hold_type_cur INTO l_check_hold;
15052: CLOSE check_src_hold_type_cur;
15053:
15054: IF l_debug_level > 0 THEN
15055: oe_debug_pub.add('OE_HOLDS_PVT-CREATE ORDER HOLDS - l_check_hold :' || l_check_hold);
15056: END IF;
15057:
15058: END IF;
15059:

Line 15061: oe_debug_pub.add( 'OE_HOLDS_PVT - CREATE ORDER HOLDS - BEFORE SYNC_HEADER_LINE');

15057:
15058: END IF;
15059:
15060: IF l_debug_level > 0 THEN
15061: oe_debug_pub.add( 'OE_HOLDS_PVT - CREATE ORDER HOLDS - BEFORE SYNC_HEADER_LINE');
15062: END IF;
15063:
15064: IF NVL(l_check_hold, 'N') = 'Y' THEN
15065: IF l_debug_level > 0 THEN

Line 15066: oe_debug_pub.add( 'OE_HOLDS_PVT - CREATE ORDER HOLDS - l_check_hold: ' || l_check_hold);

15062: END IF;
15063:
15064: IF NVL(l_check_hold, 'N') = 'Y' THEN
15065: IF l_debug_level > 0 THEN
15066: oe_debug_pub.add( 'OE_HOLDS_PVT - CREATE ORDER HOLDS - l_check_hold: ' || l_check_hold);
15067: END IF;
15068:
15069: IF p_hold_source_rec.hold_entity_code = 'O' THEN
15070: IF l_debug_level > 0 THEN

Line 15071: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);

15067: END IF;
15068:
15069: IF p_hold_source_rec.hold_entity_code = 'O' THEN
15070: IF l_debug_level > 0 THEN
15071: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);
15072: END IF;
15073: IF p_hold_source_rec.hold_entity_id is NOT NULL THEN
15074: IF l_debug_level > 0 THEN
15075: oe_debug_pub.add(' p_hold_source_rec.hold_entity_id : ' || p_hold_source_rec.hold_entity_id);

Line 15075: oe_debug_pub.add(' p_hold_source_rec.hold_entity_id : ' || p_hold_source_rec.hold_entity_id);

15071: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);
15072: END IF;
15073: IF p_hold_source_rec.hold_entity_id is NOT NULL THEN
15074: IF l_debug_level > 0 THEN
15075: oe_debug_pub.add(' p_hold_source_rec.hold_entity_id : ' || p_hold_source_rec.hold_entity_id);
15076: END IF;
15077: oe_header_util.query_row ( p_header_id => p_hold_source_rec.hold_entity_id,
15078: x_header_rec => l_header_rec);
15079: END IF; -- p_hold_source_rec.hold_entity_id is NOT NULL

Line 15083: oe_debug_pub.add(' p_hold_source_rec.line_id : ' || p_hold_source_rec.line_id );

15079: END IF; -- p_hold_source_rec.hold_entity_id is NOT NULL
15080:
15081: IF p_hold_source_rec.line_id is not NULL THEN
15082: IF l_debug_level > 0 THEN
15083: oe_debug_pub.add(' p_hold_source_rec.line_id : ' || p_hold_source_rec.line_id );
15084: END IF;
15085: oe_line_util.query_row(
15086: p_line_id => p_hold_source_rec.line_id
15087: ,x_line_rec => l_line_rec

Line 15101: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);

15097:
15098: ELSE --p_hold_source_rec.hold_entity_code = 'O'
15099:
15100: IF l_debug_level > 0 THEN
15101: oe_debug_pub.add(' p_hold_source_rec.hold_entity_code ' || p_hold_source_rec.hold_entity_code);
15102: END IF;
15103:
15104: IF p_hold_source_rec.header_id is NOT NULL THEN
15105: oe_header_util.query_row ( p_header_id => p_hold_source_rec.header_id,