DBA Data[Home] [Help]

APPS.OE_HOLDS_PVT dependencies on OE_ORDER_HEADERS_ALL

Line 1040: ,p_header_id OE_ORDER_HEADERS_ALL.header_id%type

1036: -- p_activity_status : Workflow activity status
1037: -- p_additional_where_clause : Its derived from the p_item_type and p_activity_name
1038: ---------------------------------------------------------------------------------------------------
1039: Procedure InsertTable_OOH_Header (p_hold_source_id OE_HOLD_SOURCES_ALL.hold_source_id%type
1040: ,p_header_id OE_ORDER_HEADERS_ALL.header_id%type
1041: ,p_org_id OE_ORDER_HEADERS_ALL.org_id%type
1042: ,p_hold_entity_where_clause VARCHAR2
1043: ,p_item_type VARCHAR2
1044: ,p_activity_name VARCHAR2

Line 1041: ,p_org_id OE_ORDER_HEADERS_ALL.org_id%type

1037: -- p_additional_where_clause : Its derived from the p_item_type and p_activity_name
1038: ---------------------------------------------------------------------------------------------------
1039: Procedure InsertTable_OOH_Header (p_hold_source_id OE_HOLD_SOURCES_ALL.hold_source_id%type
1040: ,p_header_id OE_ORDER_HEADERS_ALL.header_id%type
1041: ,p_org_id OE_ORDER_HEADERS_ALL.org_id%type
1042: ,p_hold_entity_where_clause VARCHAR2
1043: ,p_item_type VARCHAR2
1044: ,p_activity_name VARCHAR2
1045: ,p_activity_status VARCHAR2

Line 1086: FROM OE_ORDER_HEADERS_ALL h

1082: , h.HEADER_ID
1083: , NULL
1084: , ''N''
1085: , h.org_id
1086: FROM OE_ORDER_HEADERS_ALL h
1087: WHERE h.OPEN_FLAG = ''Y''
1088: and h.org_id = :l_org_id
1089: and h.header_id = :header_id
1090: and nvl(h.TRANSACTION_PHASE_CODE,''F'') = ''F''

Line 1176: FROM OE_ORDER_HEADERS_ALL h

1172: , h.HEADER_ID
1173: , NULL
1174: , ''N''
1175: , h.org_id
1176: FROM OE_ORDER_HEADERS_ALL h
1177: WHERE h.OPEN_FLAG = ''Y''
1178: and h.org_id = :l_org_id
1179: and nvl(h.TRANSACTION_PHASE_CODE,''F'') = ''F''
1180: and not exists ( select ''x''

Line 1247: FROM OE_ORDER_HEADERS_ALL h

1243:
1244: ELSIF l_sql_rowcount > 0 THEN
1245:
1246: l_wf_sqlmt := 'SELECT count(*)
1247: FROM OE_ORDER_HEADERS_ALL h
1248: WHERE h.OPEN_FLAG = ''Y''
1249: AND nvl(h.TRANSACTION_PHASE_CODE,''F'') = ''F''
1250: AND NOT EXISTS ( select ''x''
1251: from oe_order_holds_ALL oh

Line 1312: p_org_id OE_ORDER_HEADERS_ALL.org_id%type,

1308: -- p_additional_where_clause : Its derived from the p_item_type and p_activity_name
1309: ---------------------------------------------------------------------------------------------------
1310: Procedure InsertTable_OOH_Line (p_hold_source_id OE_HOLD_SOURCES_ALL.hold_source_id%type,
1311: p_line_id OE_ORDER_LINES_ALL.line_id%type,
1312: p_org_id OE_ORDER_HEADERS_ALL.org_id%type,
1313: p_hold_entity_where_clause VARCHAR2,
1314: p_item_type VARCHAR2,
1315: p_activity_name VARCHAR2,
1316: p_activity_status VARCHAR2,

Line 1357: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

1353: , h.HEADER_ID
1354: , ol.line_id
1355: , ''N''
1356: , h.org_id
1357: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
1358: WHERE h.OPEN_FLAG = ''Y''
1359: and h.header_id = ol.header_id
1360: and h.org_id = :l_org_id
1361: and ol.line_id = :line_id

Line 1463: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

1459: , h.HEADER_ID
1460: , ol.line_id
1461: , ''N''
1462: , h.org_id
1463: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
1464: WHERE h.OPEN_FLAG = ''Y''
1465: and h.header_id = ol.header_id
1466: and h.org_id = :l_org_id
1467: and ol.OPEN_FLAG = ''Y''

Line 1546: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

1542: RAISE FND_API.G_EXC_ERROR;
1543:
1544: ELSIF l_sql_rowcount > 0 THEN
1545: l_wf_sqlmt := 'SELECT count(*)
1546: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
1547: WHERE h.OPEN_FLAG = ''Y''
1548: AND h.header_id = ol.header_id
1549: AND ol.OPEN_FLAG = ''Y''
1550: AND NVL(h.TRANSACTION_PHASE_CODE,''F'') = ''F''

Line 1604: ,p_org_id OE_ORDER_HEADERS_ALL.org_id%type

1600: -- p_hold_source_id : Hold Source Id of the hold
1601: -- p_header_id : Line Id if the hold is applied using action -> apply hold for a specific Hold
1602: ---------------------------------------------------------------------------------------------------
1603: Procedure PaymentType_Hold (p_hold_source_rec OE_HOLDS_PVT.Hold_source_Rec_Type
1604: ,p_org_id OE_ORDER_HEADERS_ALL.org_id%type
1605: ,p_item_type VARCHAR2
1606: ,p_activity_name VARCHAR2
1607: ,p_activity_status VARCHAR2
1608: ,p_additional_where_clause VARCHAR2

Line 1745: FROM OE_ORDER_HEADERS_ALL OH

1741: IF p_hold_source_rec.header_id IS NOT NULL and p_hold_source_rec.line_id IS NULL THEN
1742: l_sqlmt := l_sqlmt||' AND OP.header_id = '||p_hold_source_rec.header_id;
1743:
1744: l_sqlmt1 := ' UNION Select header_id
1745: FROM OE_ORDER_HEADERS_ALL OH
1746: WHERE PAYMENT_TYPE_CODE = :hold_entity_id
1747: AND header_id = :header_id';
1748:
1749: l_sqlmt := l_sqlmt||l_sqlmt1;

Line 1758: FROM OE_ORDER_HEADERS_ALL OH

1754:
1755: ELSIF (p_hold_source_rec.header_id IS NULL AND p_hold_source_rec.line_id IS NULL) THEN
1756:
1757: l_sqlmt1 := ' UNION Select header_id
1758: FROM OE_ORDER_HEADERS_ALL OH
1759: WHERE PAYMENT_TYPE_CODE = :hold_entity_id';
1760:
1761: l_sqlmt := l_sqlmt||l_sqlmt1;
1762:

Line 1773: FROM OE_PAYMENTS OP,OE_ORDER_HEADERS_ALL OH

1769: --ELSIF p_hold_source_rec.hold_entity_code = 'C' and p_hold_source_rec.hold_entity_code2 ='P' THEN --ER#11824468
1770: ELSIF p_hold_source_rec.hold_entity_code IN('C','CN') and p_hold_source_rec.hold_entity_code2 ='P' THEN --ER#11824468
1771:
1772: l_sqlmt := 'Select OP.header_id
1773: FROM OE_PAYMENTS OP,OE_ORDER_HEADERS_ALL OH
1774: WHERE OP.line_id IS NULL
1775: AND OP.header_id= OH.header_id
1776: AND OH.sold_to_org_id= :hold_entity_id
1777: AND OP.PAYMENT_TYPE_CODE = :hold_entity_id2';

Line 1783: FROM OE_ORDER_HEADERS_ALL OH

1779: IF p_hold_source_rec.header_id IS NOT NULL and p_hold_source_rec.line_id IS NULL THEN
1780: l_sqlmt := l_sqlmt||' AND OP.header_id = '||p_hold_source_rec.header_id;
1781:
1782: l_sqlmt1 := ' UNION Select header_id
1783: FROM OE_ORDER_HEADERS_ALL OH
1784: WHERE sold_to_org_id= :hold_entity_id
1785: AND PAYMENT_TYPE_CODE = :hold_entity_id2
1786: AND header_id = :header_id';
1787:

Line 1798: FROM OE_ORDER_HEADERS_ALL OH

1794:
1795: ELSIF (p_hold_source_rec.header_id IS NULL AND p_hold_source_rec.line_id IS NULL) THEN
1796:
1797: l_sqlmt1 := ' UNION Select header_id
1798: FROM OE_ORDER_HEADERS_ALL OH
1799: WHERE sold_to_org_id= :hold_entity_id
1800: AND PAYMENT_TYPE_CODE = :hold_entity_id2';
1801:
1802: l_sqlmt := l_sqlmt||l_sqlmt1;

Line 1880: oe_order_headers_all h,

1876: WHERE EXISTS (SELECT NULL
1877: FROM oe_order_holds ooh,
1878: oe_hold_sources ohs,
1879: oe_hold_definitions ohd,
1880: oe_order_headers_all h,
1881: oe_order_sources oos
1882: WHERE ooh.header_id = h.header_id
1883: -- AND ohd.activity_name IS NULL Bug 6791587
1884: AND oos.aia_enabled_flag = 'Y'

Line 3302: oe_order_headers_all h,

3298: WHERE EXISTS (SELECT NULL
3299: FROM oe_order_holds ooh,
3300: oe_hold_sources ohs,
3301: oe_hold_definitions ohd,
3302: oe_order_headers_all h,
3303: oe_order_sources oos
3304: WHERE ohd.activity_name IS NULL
3305: AND ohd.hold_id = ohs.hold_id
3306: AND ooh.header_id = h.header_id

Line 3319: oe_order_headers_all h,

3315: WHERE EXISTS (SELECT NULL
3316: FROM oe_order_holds ooh,
3317: oe_hold_sources ohs,
3318: oe_hold_definitions ohd,
3319: oe_order_headers_all h,
3320: oe_order_sources oos
3321: WHERE ohd.activity_name IS NULL
3322: AND ohd.hold_id = ohs.hold_id
3323: AND h.order_source_id = oos.order_source_id

Line 3417: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

3413: , h.HEADER_ID
3414: , ol.line_id
3415: , 'N'
3416: , l_org_id
3417: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
3418: WHERE h.OPEN_FLAG = 'Y'
3419: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
3420: and h.SOLD_TO_ORG_ID = p_hold_source_rec.hold_entity_id2
3421: and h.header_id = ol.header_id

Line 3459: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

3455: , h.HEADER_ID
3456: , ol.line_id
3457: , 'N'
3458: , l_org_id
3459: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
3460: WHERE h.OPEN_FLAG = 'Y'
3461: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
3462: and h.SOLD_TO_ORG_ID = p_hold_source_rec.hold_entity_id2
3463: and h.header_id = ol.header_id

Line 3504: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol,

3500: , h.HEADER_ID
3501: , ol.line_id
3502: , 'N'
3503: , l_org_id
3504: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol,
3505: ra_terms_b rt
3506: WHERE h.OPEN_FLAG = 'Y'
3507: and h.header_id = p_hold_source_rec.hold_entity_id2
3508: and h.header_id = ol.header_id

Line 3548: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol,

3544: , h.HEADER_ID
3545: , ol.line_id
3546: , 'N'
3547: , l_org_id
3548: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol,
3549: ra_terms_b rt
3550: WHERE h.OPEN_FLAG = 'Y'
3551: and h.header_id = p_hold_source_rec.hold_entity_id2
3552: and h.header_id = ol.header_id

Line 3595: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

3591: , h.HEADER_ID
3592: , ol.line_id
3593: , 'N'
3594: , l_org_id
3595: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
3596: WHERE h.OPEN_FLAG = 'Y'
3597: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
3598: and h.header_id = ol.header_id
3599: and ol.INVOICE_TO_ORG_ID = p_hold_source_rec.hold_entity_id2

Line 3637: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

3633: , h.HEADER_ID
3634: , ol.line_id
3635: , 'N'
3636: , l_org_id
3637: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
3638: WHERE h.OPEN_FLAG = 'Y'
3639: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
3640: and h.header_id = ol.header_id
3641: and ol.INVOICE_TO_ORG_ID = p_hold_source_rec.hold_entity_id2

Line 3681: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

3677: , h.HEADER_ID
3678: , ol.line_id
3679: , 'N'
3680: , l_org_id
3681: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
3682: WHERE h.OPEN_FLAG = 'Y'
3683: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
3684: and h.header_id = ol.header_id
3685: and ol.SHIP_TO_ORG_ID = p_hold_source_rec.hold_entity_id2

Line 3723: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

3719: , h.HEADER_ID
3720: , ol.line_id
3721: , 'N'
3722: , l_org_id
3723: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
3724: WHERE h.OPEN_FLAG = 'Y'
3725: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
3726: and h.header_id = ol.header_id
3727: and ol.SHIP_TO_ORG_ID = p_hold_source_rec.hold_entity_id2

Line 3767: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

3763: , h.HEADER_ID
3764: , ol.line_id
3765: , 'N'
3766: , l_org_id
3767: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
3768: WHERE h.OPEN_FLAG = 'Y'
3769: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
3770: and h.header_id = ol.header_id
3771: and ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id2

Line 3809: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

3805: , h.HEADER_ID
3806: , ol.line_id
3807: , 'N'
3808: , l_org_id
3809: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
3810: WHERE h.OPEN_FLAG = 'Y'
3811: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
3812: and h.header_id = ol.header_id
3813: and ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id2

Line 3853: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

3849: , h.HEADER_ID
3850: , ol.line_id
3851: , 'N'
3852: , l_org_id
3853: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
3854: WHERE h.OPEN_FLAG = 'Y'
3855: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
3856: and h.header_id = ol.header_id
3857: and ol.BLANKET_NUMBER = p_hold_source_rec.hold_entity_id2

Line 3895: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

3891: , h.HEADER_ID
3892: , ol.line_id
3893: , 'N'
3894: , l_org_id
3895: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
3896: WHERE h.OPEN_FLAG = 'Y'
3897: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
3898: and h.header_id = ol.header_id
3899: and ol.BLANKET_NUMBER = p_hold_source_rec.hold_entity_id2

Line 3940: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

3936: , h.HEADER_ID
3937: , ol.line_id
3938: , 'N'
3939: , l_org_id
3940: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
3941: WHERE h.OPEN_FLAG = 'Y'
3942: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
3943: and h.header_id = ol.header_id
3944: and ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id

Line 3982: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

3978: , h.HEADER_ID
3979: , ol.line_id
3980: , 'N'
3981: , l_org_id
3982: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
3983: WHERE h.OPEN_FLAG = 'Y'
3984: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
3985: and h.header_id = ol.header_id
3986: and ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id

Line 4026: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4022: , h.HEADER_ID
4023: , ol.line_id
4024: , 'N'
4025: , l_org_id
4026: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4027: WHERE h.OPEN_FLAG = 'Y'
4028: --AND nvl(h.CANCELLED_FLAG, 'N') = 'N'
4029: AND h.header_id = ol.header_id
4030: AND ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id

Line 4068: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4064: , h.HEADER_ID
4065: , ol.line_id
4066: , 'N'
4067: , l_org_id
4068: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4069: WHERE h.OPEN_FLAG = 'Y'
4070: --AND nvl(h.CANCELLED_FLAG, 'N') = 'N'
4071: AND h.header_id = ol.header_id
4072: AND ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id

Line 4112: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4108: , h.HEADER_ID
4109: , ol.line_id
4110: , 'N'
4111: , l_org_id
4112: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4113: WHERE h.OPEN_FLAG = 'Y'
4114: --AND nvl(h.CANCELLED_FLAG, 'N') = 'N'
4115: AND ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id
4116: and ol.line_id = p_hold_source_rec.line_id

Line 4154: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4150: , h.HEADER_ID
4151: , ol.line_id
4152: , 'N'
4153: , l_org_id
4154: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4155: WHERE h.OPEN_FLAG = 'Y'
4156: --AND nvl(h.CANCELLED_FLAG, 'N') = 'N'
4157: AND ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id
4158: AND h.header_id = ol.header_id

Line 4198: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4194: , h.HEADER_ID
4195: , ol.line_id
4196: , 'N'
4197: , l_org_id
4198: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4199: WHERE h.OPEN_FLAG = 'Y'
4200: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4201: and h.header_id = ol.header_id
4202: and ol.INVOICE_TO_ORG_ID = p_hold_source_rec.hold_entity_id2

Line 4240: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4236: , h.HEADER_ID
4237: , ol.line_id
4238: , 'N'
4239: , l_org_id
4240: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4241: WHERE h.OPEN_FLAG = 'Y'
4242: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4243: and h.header_id = ol.header_id
4244: and ol.INVOICE_TO_ORG_ID= p_hold_source_rec.hold_entity_id2

Line 4285: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4281: , h.HEADER_ID
4282: , ol.line_id
4283: , 'N'
4284: , l_org_id
4285: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4286: WHERE h.OPEN_FLAG = 'Y'
4287: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4288: and h.header_id = ol.header_id
4289: and ol.SHIP_TO_ORG_ID = p_hold_source_rec.hold_entity_id2

Line 4327: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4323: , h.HEADER_ID
4324: , ol.line_id
4325: , 'N'
4326: , l_org_id
4327: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4328: WHERE h.OPEN_FLAG = 'Y'
4329: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4330: and h.header_id = ol.header_id
4331: and ol.SHIP_TO_ORG_ID= p_hold_source_rec.hold_entity_id2

Line 4371: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4367: , h.HEADER_ID
4368: , ol.line_id
4369: , 'N'
4370: , l_org_id
4371: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4372: WHERE h.OPEN_FLAG = 'Y'
4373: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4374: and h.header_id = ol.header_id
4375: and ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id2

Line 4413: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4409: , h.HEADER_ID
4410: , ol.line_id
4411: , 'N'
4412: , l_org_id
4413: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4414: WHERE h.OPEN_FLAG = 'Y'
4415: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4416: and h.header_id = ol.header_id
4417: and ol.SHIP_FROM_ORG_ID= p_hold_source_rec.hold_entity_id2

Line 4458: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4454: , h.HEADER_ID
4455: , ol.line_id
4456: , 'N'
4457: , l_org_id
4458: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4459: WHERE h.OPEN_FLAG = 'Y'
4460: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4461: and h.header_id = ol.header_id
4462: and ol.BLANKET_LINE_NUMBER = p_hold_source_rec.hold_entity_id2

Line 4500: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4496: , h.HEADER_ID
4497: , ol.line_id
4498: , 'N'
4499: , l_org_id
4500: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4501: WHERE h.OPEN_FLAG = 'Y'
4502: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4503: and h.header_id = ol.header_id
4504: and ol.BLANKET_LINE_NUMBER = p_hold_source_rec.hold_entity_id2

Line 4544: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4540: , h.HEADER_ID
4541: , ol.line_id
4542: , 'N'
4543: , l_org_id
4544: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4545: WHERE h.OPEN_FLAG = 'Y'
4546: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4547: and h.header_id = ol.header_id
4548: and ol.line_id = p_hold_source_rec.line_id

Line 4585: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4581: , h.HEADER_ID
4582: , ol.line_id
4583: , 'N'
4584: , l_org_id
4585: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4586: WHERE h.OPEN_FLAG = 'Y'
4587: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4588: and h.header_id = ol.header_id
4589: and ol.BLANKET_NUMBER = p_hold_source_rec.hold_entity_id

Line 4628: FROM OE_ORDER_HEADERS_ALL h

4624: , h.HEADER_ID
4625: , NULL
4626: , 'N'
4627: , l_org_id
4628: FROM OE_ORDER_HEADERS_ALL h
4629: WHERE h.OPEN_FLAG = 'Y'
4630: and h.header_id = p_hold_source_rec.hold_entity_id
4631: -- QUOTING change
4632: and nvl(h.TRANSACTION_PHASE_CODE,'F') = 'F'

Line 4664: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4660: , h.HEADER_ID
4661: , p_hold_source_rec.line_id
4662: , 'N'
4663: , l_org_id
4664: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4665: WHERE h.OPEN_FLAG = 'Y'
4666: and h.header_id = p_hold_source_rec.hold_entity_id
4667: and h.header_id = ol.header_id
4668: and ol.line_id = p_hold_source_rec.line_id

Line 4708: FROM OE_ORDER_HEADERS_ALL h

4704: , h.HEADER_ID
4705: , NULL
4706: , 'N'
4707: , l_org_id
4708: FROM OE_ORDER_HEADERS_ALL h
4709: WHERE h.OPEN_FLAG = 'Y'
4710: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4711: and h.header_id = p_hold_source_rec.header_id
4712: and h.SOLD_TO_ORG_ID = p_hold_source_rec.hold_entity_id

Line 4746: FROM OE_ORDER_HEADERS_ALL h

4742: , h.HEADER_ID
4743: , NULL
4744: , 'N'
4745: , l_org_id
4746: FROM OE_ORDER_HEADERS_ALL h
4747: WHERE h.OPEN_FLAG = 'Y'
4748: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4749: and h.SOLD_TO_ORG_ID = p_hold_source_rec.hold_entity_id
4750: -- QUOTING change

Line 4785: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4781: , h.HEADER_ID
4782: , ol.line_id
4783: , 'N'
4784: , l_org_id
4785: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4786: WHERE h.OPEN_FLAG = 'Y'
4787: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4788: and h.header_id = ol.header_id
4789: and ol.line_id = p_hold_source_rec.line_id

Line 4826: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4822: , h.HEADER_ID
4823: , ol.line_id
4824: , 'N'
4825: , l_org_id
4826: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4827: WHERE h.OPEN_FLAG = 'Y'
4828: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4829: and h.header_id = ol.header_id
4830: and ol.INVOICE_TO_ORG_ID = p_hold_source_rec.hold_entity_id

Line 4868: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4864: , h.HEADER_ID
4865: , ol.line_id
4866: , 'N'
4867: , l_org_id
4868: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4869: WHERE h.OPEN_FLAG = 'Y'
4870: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4871: and h.header_id = ol.header_id
4872: and ol.line_id = p_hold_source_rec.line_id

Line 4909: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4905: , h.HEADER_ID
4906: , ol.line_id
4907: , 'N'
4908: , l_org_id
4909: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4910: WHERE h.OPEN_FLAG = 'Y'
4911: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4912: and h.header_id = ol.header_id
4913: and ol.SHIP_TO_ORG_ID = p_hold_source_rec.hold_entity_id

Line 4951: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4947: , h.HEADER_ID
4948: , ol.line_id
4949: , 'N'
4950: , l_org_id
4951: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4952: WHERE h.OPEN_FLAG = 'Y'
4953: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4954: and h.header_id = ol.header_id
4955: and ol.line_id = p_hold_source_rec.line_id

Line 4992: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

4988: , h.HEADER_ID
4989: , ol.line_id
4990: , 'N'
4991: , l_org_id
4992: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
4993: WHERE h.OPEN_FLAG = 'Y'
4994: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
4995: and h.header_id = ol.header_id
4996: and ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id

Line 5034: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

5030: , h.HEADER_ID
5031: , ol.line_id
5032: , 'N'
5033: , l_org_id
5034: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
5035: WHERE h.OPEN_FLAG = 'Y'
5036: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
5037: and h.header_id = ol.header_id
5038: and ol.line_id = p_hold_source_rec.line_id

Line 5075: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

5071: , h.HEADER_ID
5072: , ol.line_id
5073: , 'N'
5074: , l_org_id
5075: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
5076: WHERE h.OPEN_FLAG = 'Y'
5077: --and nvl(h.CANCELLED_FLAG, 'N') = 'N'
5078: and h.header_id = ol.header_id
5079: and ol.INVENTORY_ITEM_ID = p_hold_source_rec.hold_entity_id

Line 8925: oe_order_headers_all h,

8921: WHERE EXISTS (SELECT NULL
8922: FROM oe_order_holds ooh,
8923: oe_hold_sources ohs,
8924: oe_hold_definitions ohd,
8925: oe_order_headers_all h,
8926: oe_order_sources oos
8927: WHERE ohd.hold_id = ohs.hold_id
8928: -- AND ohd.activity_name IS NULL Bug 6791587
8929: AND ooh.header_id = h.header_id

Line 8942: oe_order_headers_all h,

8938: WHERE EXISTS (SELECT NULL
8939: FROM oe_order_holds ooh,
8940: oe_hold_sources ohs,
8941: oe_hold_definitions ohd,
8942: oe_order_headers_all h,
8943: oe_order_sources oos
8944: WHERE ohd.hold_id = ohs.hold_id
8945: -- AND ohd.activity_name IS NULL Bug 6791587
8946: AND h.order_source_id = oos.order_source_id

Line 8971: oe_order_headers_all h,

8967: WHERE EXISTS (SELECT NULL
8968: FROM oe_order_holds_all ooh,
8969: oe_hold_sources_all ohs,
8970: oe_hold_definitions ohd,
8971: oe_order_headers_all h,
8972: oe_order_sources oos
8973: WHERE ohd.hold_id = ohs.hold_id
8974: AND ooh.header_id = h.header_id
8975: AND ooh.org_id = p_org_id

Line 8990: oe_order_headers_all h,

8986: WHERE EXISTS (SELECT NULL
8987: FROM oe_order_holds_all ooh,
8988: oe_hold_sources_all ohs,
8989: oe_hold_definitions ohd,
8990: oe_order_headers_all h,
8991: oe_order_sources oos
8992: WHERE ohd.hold_id = ohs.hold_id
8993: AND ooh.org_id = p_org_id
8994: AND ooh.org_id = ohs.org_id

Line 9115: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

9111: , h.HEADER_ID
9112: , ol.line_id
9113: , ''N''
9114: , h.org_id --ER#7479609 :l_org_id
9115: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
9116: WHERE h.OPEN_FLAG = ''Y''
9117: --and nvl(h.CANCELLED_FLAG, ''N'') = ''N''
9118: and h.SOLD_TO_ORG_ID = :hold_entity_id2
9119: and h.header_id = ol.header_id

Line 9192: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

9188: , h.HEADER_ID
9189: , ol.line_id
9190: , ''N''
9191: , h.org_id --ER#7479609 :l_org_id
9192: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
9193: WHERE h.OPEN_FLAG = ''Y''
9194: --and nvl(h.CANCELLED_FLAG, ''N'') = ''N''
9195: and h.SOLD_TO_ORG_ID = :hold_entity_id2
9196: and h.header_id = ol.header_id

Line 9252: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

9248: RAISE FND_API.G_EXC_ERROR;
9249: ELSIF l_sql_rowcount > 0 THEN
9250: SELECT count(*)
9251: into l_parent_count
9252: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
9253: WHERE h.OPEN_FLAG = 'Y'
9254: and h.SOLD_TO_ORG_ID = p_hold_source_rec.hold_entity_id2
9255: and h.header_id = ol.header_id
9256: and ol.INVENTORY_ITEM_ID = p_hold_source_rec.hold_entity_id

Line 9441: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol,

9437: , h.HEADER_ID
9438: , ol.line_id
9439: , ''N''
9440: , h.org_id --ER#7479609 :l_org_id
9441: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol,
9442: ra_terms_b rt
9443: WHERE h.OPEN_FLAG = ''Y''
9444: and h.header_id = :hold_entity_id2
9445: and h.header_id = ol.header_id

Line 9513: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol,

9509: , h.HEADER_ID
9510: , ol.line_id
9511: , ''N''
9512: , h.org_id --ER#7479609 :l_org_id
9513: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol,
9514: ra_terms_b rt
9515: WHERE h.OPEN_FLAG = ''Y''
9516: and h.header_id = :hold_entity_id2
9517: and h.header_id = ol.header_id

Line 9574: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol , ra_terms_b rt

9570: RAISE FND_API.G_EXC_ERROR;
9571: ELSIF l_sql_rowcount > 0 THEN
9572: SELECT count(*)
9573: into l_parent_count
9574: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol , ra_terms_b rt
9575: WHERE h.OPEN_FLAG = 'Y'
9576: and h.header_id = p_hold_source_rec.hold_entity_id2
9577: and h.header_id = ol.header_id
9578: and ol.INVOICE_TO_ORG_ID = p_hold_source_rec.hold_entity_id

Line 9658: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

9654: , h.HEADER_ID
9655: , ol.line_id
9656: , ''N''
9657: , h.org_id --ER#7479609 :l_org_id
9658: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
9659: WHERE h.OPEN_FLAG = ''Y''
9660:
9661: and h.header_id = ol.header_id
9662: and h.org_id = :l_org_id --ER#7479609

Line 9732: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

9728: , h.HEADER_ID
9729: , ol.line_id
9730: , ''N''
9731: , h.org_id --ER#7479609 :l_org_id
9732: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
9733: WHERE h.OPEN_FLAG = ''Y''
9734:
9735: and h.header_id = ol.header_id
9736: and h.org_id = :l_org_id --ER#7479609

Line 9791: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

9787: RAISE FND_API.G_EXC_ERROR;
9788: ELSIF l_sql_rowcount > 0 THEN
9789: SELECT count(*)
9790: into l_parent_count
9791: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
9792: WHERE h.OPEN_FLAG = 'Y'
9793: and h.header_id = ol.header_id
9794: and ol.INVOICE_TO_ORG_ID = p_hold_source_rec.hold_entity_id2
9795: and ol.INVENTORY_ITEM_ID = p_hold_source_rec.hold_entity_id

Line 9873: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

9869: , h.HEADER_ID
9870: , ol.line_id
9871: , ''N''
9872: , h.org_id --ER#7479609 :l_org_id
9873: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
9874: WHERE h.OPEN_FLAG = ''Y''
9875:
9876: and h.header_id = ol.header_id
9877: and h.org_id = :l_org_id --ER#7479609

Line 9946: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

9942: , h.HEADER_ID
9943: , ol.line_id
9944: , ''N''
9945: , h.org_id --ER#7479609 :l_org_id
9946: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
9947: WHERE h.OPEN_FLAG = ''Y''
9948:
9949: and h.header_id = ol.header_id
9950: and h.org_id = :l_org_id --ER#7479609

Line 10004: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

10000: RAISE FND_API.G_EXC_ERROR;
10001: ELSIF l_sql_rowcount > 0 THEN
10002: SELECT count(*)
10003: into l_parent_count
10004: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
10005: WHERE h.OPEN_FLAG = 'Y'
10006: and h.header_id = ol.header_id
10007: and ol.SHIP_TO_ORG_ID = p_hold_source_rec.hold_entity_id2
10008: and ol.INVENTORY_ITEM_ID = p_hold_source_rec.hold_entity_id

Line 10086: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

10082: , h.HEADER_ID
10083: , ol.line_id
10084: , ''N''
10085: , h.org_id --ER#7479609 :l_org_id
10086: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
10087: WHERE h.OPEN_FLAG = ''Y''
10088:
10089: and h.header_id = ol.header_id
10090: and h.org_id = :l_org_id --ER#7479609

Line 10160: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

10156: , h.HEADER_ID
10157: , ol.line_id
10158: , ''N''
10159: , h.org_id --ER#7479609 :l_org_id
10160: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
10161: WHERE h.OPEN_FLAG = ''Y''
10162:
10163: and h.header_id = ol.header_id
10164: and h.org_id = :l_org_id --ER#7479609

Line 10218: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

10214: RAISE FND_API.G_EXC_ERROR;
10215: ELSIF l_sql_rowcount > 0 THEN
10216: SELECT count(*)
10217: into l_parent_count
10218: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
10219: WHERE h.OPEN_FLAG = 'Y'
10220: and h.header_id = ol.header_id
10221: and ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id2
10222: and ol.INVENTORY_ITEM_ID = p_hold_source_rec.hold_entity_id

Line 10322: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

10318: , h.HEADER_ID
10319: , ol.line_id
10320: , ''N''
10321: , h.org_id --ER#7479609 :l_org_id
10322: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
10323: WHERE h.OPEN_FLAG = ''Y''
10324:
10325: and h.header_id = ol.header_id
10326: and h.org_id = :l_org_id --ER#7479609

Line 10395: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

10391: , h.HEADER_ID
10392: , ol.line_id
10393: , ''N''
10394: , h.org_id --ER#7479609 :l_org_id
10395: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
10396: WHERE h.OPEN_FLAG = ''Y''
10397:
10398: and h.header_id = ol.header_id
10399: and h.org_id = :l_org_id --ER#7479609

Line 10453: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

10449: RAISE FND_API.G_EXC_ERROR;
10450: ELSIF l_sql_rowcount > 0 THEN
10451: SELECT count(*)
10452: into l_parent_count
10453: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
10454: WHERE h.OPEN_FLAG = 'Y'
10455: and h.header_id = ol.header_id
10456: and ol.BLANKET_NUMBER = p_hold_source_rec.hold_entity_id2
10457: and ol.INVENTORY_ITEM_ID = p_hold_source_rec.hold_entity_id

Line 10834: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

10830: , h.HEADER_ID
10831: , ol.line_id
10832: , ''N''
10833: , h.org_id --ER#7479609 :l_org_id
10834: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
10835: WHERE h.OPEN_FLAG = ''Y''
10836:
10837: and h.header_id = ol.header_id
10838: and h.org_id = :l_org_id

Line 10907: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

10903: , h.HEADER_ID
10904: , ol.line_id
10905: , ''N''
10906: , p_org_id --ER#7479609 :l_org_id
10907: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
10908: WHERE h.OPEN_FLAG = ''Y''
10909:
10910: and h.header_id = ol.header_id
10911: and h.org_id = :l_org_id --ER#7479609

Line 10966: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

10962: RAISE FND_API.G_EXC_ERROR;
10963: ELSIF l_sql_rowcount > 0 THEN
10964: SELECT count(*)
10965: into l_parent_count
10966: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
10967: WHERE h.OPEN_FLAG = 'Y'
10968: and h.header_id = ol.header_id
10969: and ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id
10970: and h.SOLD_TO_ORG_ID = p_hold_source_rec.hold_entity_id2

Line 11138: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

11134: , h.HEADER_ID
11135: , ol.line_id
11136: , ''N''
11137: , h.org_id --ER#7479609 :l_org_id
11138: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
11139: WHERE h.OPEN_FLAG = ''Y''
11140:
11141: AND h.header_id = ol.header_id
11142: and h.org_id = :l_org_id --ER#7479609

Line 11212: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

11208: , h.HEADER_ID
11209: , ol.line_id
11210: , ''N''
11211: , p_org_id --ER#7479609 :l_org_id
11212: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
11213: WHERE h.OPEN_FLAG = ''Y''
11214:
11215: AND h.header_id = ol.header_id
11216: and h.org_id = :l_org_id --ER#7479609

Line 11271: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

11267: RAISE FND_API.G_EXC_ERROR;
11268: ELSIF l_sql_rowcount > 0 THEN
11269: SELECT count(*)
11270: into l_parent_count
11271: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
11272: WHERE h.OPEN_FLAG = 'Y'
11273: AND h.header_id = ol.header_id
11274: AND ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id
11275: AND ol.INVOICE_TO_ORG_ID = p_hold_source_rec.hold_entity_id2

Line 11354: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

11350: , h.HEADER_ID
11351: , ol.line_id
11352: , ''N''
11353: , h.org_id --ER#7479609 :l_org_id
11354: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
11355: WHERE h.OPEN_FLAG = ''Y''
11356: AND h.org_id = :l_org_id --ER#7479609
11357: AND ol.SHIP_FROM_ORG_ID = :hold_entity_id
11358: and ol.line_id = :line_id

Line 11427: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

11423: , h.HEADER_ID
11424: , ol.line_id
11425: , ''N''
11426: , h.org_id --ER#7479609 :l_org_id
11427: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
11428: WHERE h.OPEN_FLAG = ''Y''
11429: AND h.org_id = :l_org_id --ER#7479609
11430: AND ol.SHIP_FROM_ORG_ID = :hold_entity_id
11431: AND h.header_id = ol.header_id

Line 11485: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

11481: RAISE FND_API.G_EXC_ERROR;
11482: ELSIF l_sql_rowcount > 0 THEN
11483: SELECT count(*)
11484: into l_parent_count
11485: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
11486: WHERE h.OPEN_FLAG = 'Y'
11487: AND ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id
11488: AND h.header_id = ol.header_id
11489: AND ol.SHIP_TO_ORG_ID = p_hold_source_rec.hold_entity_id2

Line 11571: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

11567: , h.HEADER_ID
11568: , ol.line_id
11569: , ''N''
11570: , h.org_id --ER#7479609 :l_org_id
11571: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
11572: WHERE h.OPEN_FLAG = ''Y''
11573: and h.org_id = :l_org_id --ER#7479609
11574: and h.header_id = ol.header_id
11575: and ol.INVOICE_TO_ORG_ID = :hold_entity_id2

Line 11644: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

11640: , h.HEADER_ID
11641: , ol.line_id
11642: , ''N''
11643: , h.org_id --ER#7479609 :l_org_id
11644: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
11645: WHERE h.OPEN_FLAG = ''Y''
11646: and h.org_id = :l_org_id --ER#7479609
11647: and h.header_id = ol.header_id
11648: and ol.INVOICE_TO_ORG_ID= :hold_entity_id2

Line 11702: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

11698: RAISE FND_API.G_EXC_ERROR;
11699: ELSIF l_sql_rowcount > 0 THEN
11700: SELECT count(*)
11701: into l_parent_count
11702: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
11703: WHERE h.OPEN_FLAG = 'Y'
11704: and h.header_id = ol.header_id
11705: and ol.INVOICE_TO_ORG_ID= p_hold_source_rec.hold_entity_id2
11706: and ol.BLANKET_NUMBER = p_hold_source_rec.hold_entity_id

Line 11895: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

11891: , h.HEADER_ID
11892: , ol.line_id
11893: , ''N''
11894: , h.org_id --ER#7479609 :l_org_id
11895: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
11896: WHERE h.OPEN_FLAG = ''Y''
11897: and h.org_id = :l_org_id --ER#7479609
11898: and h.header_id = ol.header_id
11899: and ol.SHIP_TO_ORG_ID = :hold_entity_id2

Line 11968: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

11964: , h.HEADER_ID
11965: , ol.line_id
11966: , ''N''
11967: , h.org_id --ER#7479609 :l_org_id
11968: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
11969: WHERE h.OPEN_FLAG = ''Y''
11970: and h.org_id = :l_org_id --ER#7479609
11971: and h.header_id = ol.header_id
11972: and ol.SHIP_TO_ORG_ID= :hold_entity_id2

Line 12027: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

12023: RAISE FND_API.G_EXC_ERROR;
12024: ELSIF l_sql_rowcount > 0 THEN
12025: SELECT count(*)
12026: into l_parent_count
12027: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
12028: WHERE h.OPEN_FLAG = 'Y'
12029: and h.header_id = ol.header_id
12030: and ol.SHIP_TO_ORG_ID= p_hold_source_rec.hold_entity_id2
12031: and ol.BLANKET_NUMBER = p_hold_source_rec.hold_entity_id

Line 12110: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

12106: , h.HEADER_ID
12107: , ol.line_id
12108: , ''N''
12109: , h.org_id --ER#7479609 :l_org_id
12110: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
12111: WHERE h.OPEN_FLAG = ''Y''
12112: and h.org_id = :l_org_id --ER#7479609
12113: and h.header_id = ol.header_id
12114: and ol.SHIP_FROM_ORG_ID = :hold_entity_id2

Line 12183: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

12179: , h.HEADER_ID
12180: , ol.line_id
12181: , ''N''
12182: , h.org_id --ER#7479609 :l_org_id
12183: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
12184: WHERE h.OPEN_FLAG = ''Y''
12185: and h.org_id = :l_org_id --ER#7479609
12186: and h.header_id = ol.header_id
12187: and ol.SHIP_FROM_ORG_ID= :hold_entity_id2

Line 12241: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

12237: RAISE FND_API.G_EXC_ERROR;
12238: ELSIF l_sql_rowcount > 0 THEN
12239: SELECT count(*)
12240: into l_parent_count
12241: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
12242: WHERE h.OPEN_FLAG = 'Y'
12243: and h.header_id = ol.header_id
12244: and ol.SHIP_FROM_ORG_ID= p_hold_source_rec.hold_entity_id2
12245: and ol.BLANKET_NUMBER = p_hold_source_rec.hold_entity_id

Line 12324: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

12320: , h.HEADER_ID
12321: , ol.line_id
12322: , ''N''
12323: , h.org_id --ER#7479609 :l_org_id
12324: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
12325: WHERE h.OPEN_FLAG = ''Y''
12326: and h.org_id = :l_org_id --ER#7479609
12327: and h.header_id = ol.header_id
12328: and ol.BLANKET_LINE_NUMBER = :hold_entity_id2

Line 12397: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

12393: , h.HEADER_ID
12394: , ol.line_id
12395: , ''N''
12396: , h.org_id --ER#7479609 :l_org_id
12397: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
12398: WHERE h.OPEN_FLAG = ''Y''
12399: and h.org_id = :l_org_id --ER#7479609
12400: and h.header_id = ol.header_id
12401: and ol.BLANKET_LINE_NUMBER = :hold_entity_id2

Line 12455: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

12451: RAISE FND_API.G_EXC_ERROR;
12452: ELSIF l_sql_rowcount > 0 THEN
12453: SELECT count(*)
12454: into l_parent_count
12455: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
12456: WHERE h.OPEN_FLAG = 'Y'
12457: and h.header_id = ol.header_id
12458: and ol.BLANKET_LINE_NUMBER = p_hold_source_rec.hold_entity_id2
12459: and ol.BLANKET_NUMBER = p_hold_source_rec.hold_entity_id

Line 12537: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

12533: , h.HEADER_ID
12534: , ol.line_id
12535: , ''N''
12536: , h.org_id --ER#7479609 :l_org_id
12537: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
12538: WHERE h.OPEN_FLAG = ''Y''
12539: and h.org_id = :l_org_id --ER#7479609
12540: and h.header_id = ol.header_id
12541: and ol.line_id = :line_id

Line 12609: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

12605: , h.HEADER_ID
12606: , ol.line_id
12607: , ''N''
12608: , h.org_id --ER#7479609 :l_org_id
12609: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
12610: WHERE h.OPEN_FLAG = ''Y''
12611: and h.org_id = :l_org_id --ER#7479609
12612: and h.header_id = ol.header_id
12613: and ol.BLANKET_NUMBER = :hold_entity_id

Line 12666: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

12662: RAISE FND_API.G_EXC_ERROR;
12663: ELSIF l_sql_rowcount > 0 THEN
12664: SELECT count(*)
12665: into l_parent_count
12666: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
12667: WHERE h.OPEN_FLAG = 'Y'
12668: and h.header_id = ol.header_id
12669: and ol.BLANKET_NUMBER = p_hold_source_rec.hold_entity_id
12670: and ol.OPEN_FLAG = 'Y'

Line 12730: FROM OE_ORDER_HEADERS_ALL h

12726: , h.HEADER_ID
12727: , NULL
12728: , ''N''
12729: , h.org_id --ER#7479609 :l_org_id
12730: FROM OE_ORDER_HEADERS_ALL h
12731: WHERE h.OPEN_FLAG = ''Y''
12732: and h.org_id = :l_org_id --ER#7479609
12733: and h.header_id = :hold_entity_id
12734: -- QUOTING change

Line 12789: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

12785: , h.HEADER_ID
12786: , :line_id
12787: , ''N''
12788: , h.org_id --ER#7479609 :l_org_id
12789: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
12790: WHERE h.OPEN_FLAG = ''Y''
12791: and h.org_id = :l_org_id --ER#7479609
12792: and h.header_id = :hold_entity_id
12793: and h.header_id = ol.header_id

Line 12853: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

12849: ELSIF l_sql_rowcount > 0 THEN
12850: x_is_hold_applied := TRUE;
12851: SELECT count(*)
12852: into l_parent_count
12853: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
12854: WHERE h.OPEN_FLAG = 'Y'
12855: and h.header_id = p_hold_source_rec.hold_entity_id
12856: and h.header_id = ol.header_id
12857: and ol.line_id = p_hold_source_rec.line_id

Line 13005: FROM OE_ORDER_HEADERS_ALL h

13001: , h.HEADER_ID
13002: , NULL
13003: , ''N''
13004: , h.org_id --ER#7479609 :l_org_id
13005: FROM OE_ORDER_HEADERS_ALL h
13006: WHERE h.OPEN_FLAG = ''Y''
13007: and h.org_id = :l_org_id --ER#7479609
13008: and h.header_id = :header_id
13009: and h.SOLD_TO_ORG_ID = :hold_entity_id

Line 13063: FROM OE_ORDER_HEADERS_ALL h

13059: , h.HEADER_ID
13060: , NULL
13061: , ''N''
13062: , h.org_id --ER#7479609 :l_org_id
13063: FROM OE_ORDER_HEADERS_ALL h
13064: WHERE h.OPEN_FLAG = ''Y''
13065:
13066: and h.SOLD_TO_ORG_ID = :hold_entity_id
13067: and h.org_id = :l_org_id --ER#7479609

Line 13109: FROM OE_ORDER_HEADERS_ALL h

13105: RAISE FND_API.G_EXC_ERROR;
13106: ELSIF l_sql_rowcount > 0 THEN
13107: SELECT count(*)
13108: into l_parent_count
13109: FROM OE_ORDER_HEADERS_ALL h
13110: WHERE h.OPEN_FLAG = 'Y'
13111:
13112: and h.SOLD_TO_ORG_ID = p_hold_source_rec.hold_entity_id
13113: and nvl(h.TRANSACTION_PHASE_CODE,'F') = 'F'

Line 13454: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

13450: , h.HEADER_ID
13451: , ol.line_id
13452: , ''N''
13453: , h.org_id --ER#7479609 :l_org_id
13454: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
13455: WHERE h.OPEN_FLAG = ''Y''
13456: and h.org_id = :l_org_id
13457: and h.header_id = ol.header_id
13458: and ol.line_id = :line_id

Line 13526: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

13522: , h.HEADER_ID
13523: , ol.line_id
13524: , ''N''
13525: , h.org_id --ER#7479609 :l_org_id
13526: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
13527: WHERE h.OPEN_FLAG = ''Y''
13528: and h.org_id = :l_org_id --ER#7479609
13529: and h.header_id = ol.header_id
13530: and ol.INVOICE_TO_ORG_ID = :hold_entity_id

Line 13582: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

13578: RAISE FND_API.G_EXC_ERROR;
13579: ELSIF l_sql_rowcount > 0 THEN
13580: SELECT count(*)
13581: into l_parent_count
13582: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
13583: WHERE h.OPEN_FLAG = 'Y'
13584: and h.header_id = ol.header_id
13585: and ol.INVOICE_TO_ORG_ID = p_hold_source_rec.hold_entity_id
13586: and ol.OPEN_FLAG = 'Y'

Line 13667: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

13663: , h.HEADER_ID
13664: , ol.line_id
13665: , ''N''
13666: , h.org_id --ER#7479609 :l_org_id
13667: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
13668: WHERE h.OPEN_FLAG = ''Y''
13669: and h.org_id = :l_org_id --ER#7479609
13670: and h.header_id = ol.header_id
13671: and ol.line_id = :line_id

Line 13738: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

13734: , h.HEADER_ID
13735: , ol.line_id
13736: , ''N''
13737: , h.org_id --ER#7479609 :l_org_id
13738: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
13739: WHERE h.OPEN_FLAG = ''Y''
13740: and h.org_id = :l_org_id --ER#7479609
13741: and h.header_id = ol.header_id
13742: and ol.SHIP_TO_ORG_ID = :hold_entity_id

Line 13794: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

13790: RAISE FND_API.G_EXC_ERROR;
13791: ELSIF l_sql_rowcount > 0 THEN
13792: SELECT count(*)
13793: into l_parent_count
13794: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
13795: WHERE h.OPEN_FLAG = 'Y'
13796: and h.header_id = ol.header_id
13797: and ol.SHIP_TO_ORG_ID = p_hold_source_rec.hold_entity_id
13798: and ol.OPEN_FLAG = 'Y'

Line 13878: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

13874: , h.HEADER_ID
13875: , ol.line_id
13876: , ''N''
13877: , h.org_id --ER#7479609 :l_org_id
13878: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
13879: WHERE h.OPEN_FLAG = ''Y''
13880: and h.org_id = :l_org_id --ER#7479609
13881: and h.header_id = ol.header_id
13882: and ol.line_id = :line_id

Line 13949: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

13945: , h.HEADER_ID
13946: , ol.line_id
13947: , ''N''
13948: , h.org_id --ER#7479609 :l_org_id
13949: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
13950: WHERE h.OPEN_FLAG = ''Y''
13951: and h.org_id = :l_org_id --ER#7479609
13952: and h.header_id = ol.header_id
13953: and ol.SHIP_FROM_ORG_ID = :hold_entity_id

Line 14005: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

14001: RAISE FND_API.G_EXC_ERROR;
14002: ELSIF l_sql_rowcount > 0 THEN
14003: SELECT count(*)
14004: into l_parent_count
14005: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
14006: WHERE h.OPEN_FLAG = 'Y'
14007: and h.header_id = ol.header_id
14008: and ol.SHIP_FROM_ORG_ID = p_hold_source_rec.hold_entity_id
14009: and ol.OPEN_FLAG = 'Y'

Line 14089: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

14085: , h.HEADER_ID
14086: , ol.line_id
14087: , ''N''
14088: , h.org_id --ER#7479609 :l_org_id
14089: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
14090: WHERE h.OPEN_FLAG = ''Y''
14091: and h.org_id = :l_org_id --ER#7479609
14092: and h.header_id = ol.header_id
14093: and ol.line_id = :line_id

Line 14161: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

14157: , h.HEADER_ID
14158: , ol.line_id
14159: , ''N''
14160: , h.org_id --ER#7479609 :l_org_id
14161: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
14162: WHERE h.OPEN_FLAG = ''Y''
14163: and h.org_id = :l_org_id --ER#7479609
14164: and h.header_id = ol.header_id
14165: and ol.INVENTORY_ITEM_ID = :hold_entity_id

Line 14216: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol

14212: RAISE FND_API.G_EXC_ERROR;
14213: ELSIF l_sql_rowcount > 0 THEN
14214: SELECT count(*)
14215: into l_parent_count
14216: FROM OE_ORDER_HEADERS_ALL h, OE_ORDER_LINES_ALL ol
14217: WHERE h.OPEN_FLAG = 'Y'
14218: and h.header_id = ol.header_id
14219: and ol.INVENTORY_ITEM_ID = p_hold_source_rec.hold_entity_id
14220: and ol.OPEN_FLAG = 'Y'