DBA Data[Home] [Help]

APPS.MSC_ATP_PVT dependencies on FND_API

Line 319: x_return_status := FND_API.G_RET_STS_SUCCESS;

315: END IF;
316: --initialize ATP_SET_FLAG TO NO --4460369
317: MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := 'N';
318: -- initialize API return status to success
319: x_return_status := FND_API.G_RET_STS_SUCCESS;
320:
321: MSC_ATP_PVT.G_RES_CONSUME := NVL(FND_PROFILE.value('MSC_ATP_RES_CONSUME'), 'Y');
322: IF PG_DEBUG in ('Y', 'C') THEN
323: msc_sch_wb.atp_debug('Schedule: ' || 'G_RES_CONSUME = '||MSC_ATP_PVT.G_RES_CONSUME);

Line 439: RAISE FND_API.G_EXC_ERROR ;

435: -- Bug 1763731, need not do this check for the time being
436: /*
437: x_atp_table := p_atp_table;
438: x_atp_table.error_code(1) := NO_ASSIGNMENT_SET;
439: RAISE FND_API.G_EXC_ERROR ;
440: */
441: lv_assign_set_id := NULL; -- Use new local variable
442: end;
443:

Line 672: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

668: IF PG_DEBUG in ('Y', 'C') THEN --3720018
669: msc_sch_wb.atp_debug('Schedule: l_return_status: ' || l_return_status);
670: END IF;
671:
672: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
673: IF PG_DEBUG in ('Y', 'C') THEN
674: msc_sch_wb.atp_debug('Schedule: ' || 'Error in Call_delete_row');
675: END IF;
676: x_return_status := FND_API.G_RET_STS_ERROR;

Line 676: x_return_status := FND_API.G_RET_STS_ERROR;

672: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
673: IF PG_DEBUG in ('Y', 'C') THEN
674: msc_sch_wb.atp_debug('Schedule: ' || 'Error in Call_delete_row');
675: END IF;
676: x_return_status := FND_API.G_RET_STS_ERROR;
677: RAISE FND_API.G_EXC_ERROR;
678: END IF;
679:
680: IF (l_delete_atp_rec.error_code(1) = MSC_ATP_PVT.TRY_ATP_LATER) OR

Line 677: RAISE FND_API.G_EXC_ERROR;

673: IF PG_DEBUG in ('Y', 'C') THEN
674: msc_sch_wb.atp_debug('Schedule: ' || 'Error in Call_delete_row');
675: END IF;
676: x_return_status := FND_API.G_RET_STS_ERROR;
677: RAISE FND_API.G_EXC_ERROR;
678: END IF;
679:
680: IF (l_delete_atp_rec.error_code(1) = MSC_ATP_PVT.TRY_ATP_LATER) OR
681: (l_delete_atp_rec.error_code(1) = MSC_ATP_PVT.SUMM_CONC_PROG_RUNNING) THEN

Line 808: IF l_return_status = FND_API.G_RET_STS_ERROR THEN

804: IF PG_DEBUG in ('Y', 'C') THEN
805: msc_sch_wb.atp_debug('Schedule: ' || 'Get_Regions, return status : ' || l_return_status);
806: END IF;
807:
808: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
809: -- something wrong so we want to rollback;
810: IF PG_DEBUG in ('Y', 'C') THEN
811: msc_sch_wb.atp_debug('Schedule: ' || 'expected error in Call to Get_Regions');
812: END IF;

Line 813: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then

809: -- something wrong so we want to rollback;
810: IF PG_DEBUG in ('Y', 'C') THEN
811: msc_sch_wb.atp_debug('Schedule: ' || 'expected error in Call to Get_Regions');
812: END IF;
813: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
814: IF PG_DEBUG in ('Y', 'C') THEN
815: msc_sch_wb.atp_debug('Schedule: ' || 'something wrong in Call to Get_Regions');
816: END IF;
817: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;

Line 817: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;

813: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
814: IF PG_DEBUG in ('Y', 'C') THEN
815: msc_sch_wb.atp_debug('Schedule: ' || 'something wrong in Call to Get_Regions');
816: END IF;
817: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
818: END IF;
819:
820: -- dsting setproc
821: MSC_ATP_PROC.Initialize_Set_Processing(p_atp_table);

Line 1072: IF l_return_status <> FND_API.G_RET_STS_SUCCESS OR

1068: to_char(l_sources.source_type.count));
1069: END IF;
1070:
1071: -- check the return status
1072: IF l_return_status <> FND_API.G_RET_STS_SUCCESS OR
1073: l_sources.source_type.count = 0 THEN
1074:
1075: IF PG_DEBUG in ('Y', 'C') THEN
1076: msc_sch_wb.atp_debug('Schedule: ' || 'atp source fails');

Line 1078: x_return_status := FND_API.G_RET_STS_ERROR;

1074:
1075: IF PG_DEBUG in ('Y', 'C') THEN
1076: msc_sch_wb.atp_debug('Schedule: ' || 'atp source fails');
1077: END IF;
1078: x_return_status := FND_API.G_RET_STS_ERROR;
1079:
1080: IF PG_DEBUG in ('Y', 'C') THEN
1081: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Customer_Id.COUNT :='||l_atp_table.Customer_Id.COUNT);
1082: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Error_Code.COUNT :='||l_atp_table.Error_Code.COUNT);

Line 1866: x_return_status := FND_API.G_RET_STS_ERROR;

1862: -- member item which has ATP flag = 'N'. For other members we will continue as usual
1863: IF PG_DEBUG in ('Y', 'C') THEN
1864: msc_sch_wb.atp_debug('Schedule: ' || 'Member item is not atpable');
1865: END IF;
1866: x_return_status := FND_API.G_RET_STS_ERROR;
1867: l_atp_table.Error_Code(i):= PF_MEMBER_ITEM_NOT_ATPABLE;
1868: RAISE NO_DATA_FOUND;
1869: END IF;
1870: -- since we know the org now, we can get the plan_id if it is PDS

Line 1936: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1932: l_return_status,
1933: NULL --bug3510475
1934: );
1935:
1936: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1937: IF PG_DEBUG in ('Y', 'C') THEN
1938: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
1939: END IF;
1940: x_return_status := FND_API.G_RET_STS_ERROR;

Line 1940: x_return_status := FND_API.G_RET_STS_ERROR;

1936: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
1937: IF PG_DEBUG in ('Y', 'C') THEN
1938: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
1939: END IF;
1940: x_return_status := FND_API.G_RET_STS_ERROR;
1941: RAISE FND_API.G_EXC_ERROR;
1942: END IF;
1943:
1944: IF l_atf_date is not null THEN

Line 1941: RAISE FND_API.G_EXC_ERROR;

1937: IF PG_DEBUG in ('Y', 'C') THEN
1938: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
1939: END IF;
1940: x_return_status := FND_API.G_RET_STS_ERROR;
1941: RAISE FND_API.G_EXC_ERROR;
1942: END IF;
1943:
1944: IF l_atf_date is not null THEN
1945: l_time_phased_atp := 'Y';

Line 2011: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2007: l_return_status,
2008: NULL --bug3510475
2009: );
2010:
2011: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2012: IF PG_DEBUG in ('Y', 'C') THEN
2013: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
2014: END IF;
2015: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2015: x_return_status := FND_API.G_RET_STS_ERROR;

2011: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2012: IF PG_DEBUG in ('Y', 'C') THEN
2013: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
2014: END IF;
2015: x_return_status := FND_API.G_RET_STS_ERROR;
2016: RAISE FND_API.G_EXC_ERROR;
2017: END IF;
2018:
2019: -- ATP4drp changes begin

Line 2016: RAISE FND_API.G_EXC_ERROR;

2012: IF PG_DEBUG in ('Y', 'C') THEN
2013: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
2014: END IF;
2015: x_return_status := FND_API.G_RET_STS_ERROR;
2016: RAISE FND_API.G_EXC_ERROR;
2017: END IF;
2018:
2019: -- ATP4drp changes begin
2020: IF NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type, 1) = 5 THEN

Line 2065: x_return_status := FND_API.G_RET_STS_ERROR;

2061: IF l_plan_id is NULL THEN
2062: IF PG_DEBUG in ('Y', 'C') THEN
2063: msc_sch_wb.atp_debug('Schedule: ' || 'no plan available');
2064: END IF;
2065: x_return_status := FND_API.G_RET_STS_ERROR;
2066: --bug 2854351: Raise plan down time error
2067: --l_atp_table.Error_Code(i):= PLAN_NOT_FOUND;
2068: l_atp_table.Error_Code(i):= MSC_ATP_PVT.PLAN_DOWN_TIME;
2069: RAISE NO_DATA_FOUND;

Line 2074: x_return_status := FND_API.G_RET_STS_ERROR;

2070: ELSIF l_plan_id = -100 THEN
2071: IF PG_DEBUG in ('Y', 'C') THEN
2072: msc_sch_wb.atp_debug('Schedule: ' || 'Summary Concurrent program is running');
2073: END IF;
2074: x_return_status := FND_API.G_RET_STS_ERROR;
2075: l_atp_table.Error_Code(i):= SUMM_CONC_PROG_RUNNING;
2076: RAISE NO_DATA_FOUND;
2077: ELSIF l_plan_id = -200 THEN
2078: IF PG_DEBUG in ('Y', 'C') THEN

Line 2081: x_return_status := FND_API.G_RET_STS_ERROR;

2077: ELSIF l_plan_id = -200 THEN
2078: IF PG_DEBUG in ('Y', 'C') THEN
2079: msc_sch_wb.atp_debug('Schedule: ' || 'Post Plan Alloc progranm has not been run');
2080: END IF;
2081: x_return_status := FND_API.G_RET_STS_ERROR;
2082: l_atp_table.Error_Code(i):= RUN_POST_PLAN_ALLOC;
2083: RAISE NO_DATA_FOUND;
2084:
2085: -- 24x7 ATP

Line 2090: x_return_status := FND_API.G_RET_STS_ERROR;

2086: ELSIF l_plan_id = -300 THEN
2087: if PG_DEBUG in ('Y','C') THEN
2088: msc_sch_wb.atp_debug ('Schedule: ' || 'ATP Downtime . 24x7 ATP');
2089: END IF;
2090: x_return_status := FND_API.G_RET_STS_ERROR;
2091: --- bug 2854351: Show planned down time error
2092: --l_atp_table.Error_Code(i) := TRY_ATP_LATER;
2093: l_atp_table.Error_Code(i) := PLAN_DOWN_TIME;
2094: RAISE NO_DATA_FOUND;

Line 2346: RAISE FND_API.G_EXC_ERROR;

2342: END IF;
2343:
2344: IF l_requested_ship_date is NULL THEN
2345: l_atp_table.error_code(i) := MSC_ATP_PVT.ATP_INVALID_DATE;
2346: RAISE FND_API.G_EXC_ERROR;
2347: END IF;
2348:
2349: --bug 3322846: Move past due ship date to the first working day after sysdate
2350: --L_MOVE_PAST_DUE_TO_SYSDATE := NVL(FND_PROFILE.value('MSC_MOVE_PAST_DUE_TO_SYSDATE'), 'Y'); -- Bug 5584634/5618929

Line 2375: RAISE FND_API.G_EXC_ERROR;

2371: END IF; -- Bug 5584634/5618929
2372:
2373: IF l_requested_ship_date is NULL THEN
2374: l_atp_table.error_code(i) := MSC_ATP_PVT.ATP_INVALID_DATE;
2375: RAISE FND_API.G_EXC_ERROR;
2376: END IF;
2377:
2378: ELSE -- Bug3593394
2379: IF PG_DEBUG in ('Y', 'C') THEN

Line 2515: RAISE FND_API.G_EXC_ERROR;

2511: l_atp_rec.error_code := MSC_ATP_PVT.NOREQ_DATE;
2512: -- krajan : 2437459
2513: l_atp_table.error_code(i) := MSC_ATP_PVT.NOREQ_DATE;
2514:
2515: RAISE FND_API.G_EXC_ERROR;
2516:
2517: ELSIF ((l_atp_rec.requested_ship_date IS NOT NULL) and
2518: (l_atp_rec.requested_arrival_date IS NOT NULL)) THEN
2519:

Line 2524: RAISE FND_API.G_EXC_ERROR;

2520: l_atp_rec.error_code := MSC_ATP_PVT.ATP_MULTI_REQ_DATES;
2521: -- krajan : 2437459
2522: l_atp_table.error_code(i) := MSC_ATP_PVT.ATP_MULTI_REQ_DATES;
2523:
2524: RAISE FND_API.G_EXC_ERROR;
2525: END IF;
2526: IF PG_DEBUG in ('Y', 'C') THEN
2527: msc_sch_wb.atp_debug('Schedule: ' || 'get item attributes for the top item');
2528: END IF;

Line 2769: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2765: l_assign_set_id,
2766: l_atp_period,
2767: l_atp_supply_demand,
2768: l_return_status);
2769: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2770: IF PG_DEBUG in ('Y', 'C') THEN
2771: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails');
2772: END IF;
2773: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2773: x_return_status := FND_API.G_RET_STS_ERROR;

2769: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2770: IF PG_DEBUG in ('Y', 'C') THEN
2771: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails');
2772: END IF;
2773: x_return_status := FND_API.G_RET_STS_ERROR;
2774: --2741997
2775: l_atp_table.Error_Code(i):= l_atp_rec.Error_Code;
2776: RAISE NO_DATA_FOUND;
2777: END IF;

Line 2871: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2867:
2868: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR THEN
2869: l_atp_table.Error_Code(i):= MSC_ATP_PVT.OSS_SOURCING_ERROR;
2870:
2871: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2872: IF PG_DEBUG in ('Y', 'C') THEN
2873: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails');
2874: END IF;
2875: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2875: x_return_status := FND_API.G_RET_STS_ERROR;

2871: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2872: IF PG_DEBUG in ('Y', 'C') THEN
2873: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails');
2874: END IF;
2875: x_return_status := FND_API.G_RET_STS_ERROR;
2876: --2741997
2877: -- l_atp_table.Error_Code(k):= l_atp_rec.Error_Code;
2878: l_atp_table.Error_Code(i):= l_atp_rec.Error_Code;
2879: RAISE NO_DATA_FOUND;

Line 2969: x_return_status := FND_API.G_RET_STS_ERROR;

2965: IF PG_DEBUG in ('Y', 'C') THEN
2966: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails in future case');
2967: END IF;
2968: --2741997
2969: x_return_status := FND_API.G_RET_STS_ERROR;
2970: l_atp_rec.error_code := l_future_atp_rec.Error_code;
2971: l_atp_table.Error_Code(i):= l_atp_rec.Error_Code;
2972: RAISE NO_DATA_FOUND;
2973: END IF;

Line 3075: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3071: END IF;
3072: -- check the return status
3073: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR THEN
3074: l_atp_table.Error_Code(i):= MSC_ATP_PVT.OSS_SOURCING_ERROR;
3075: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3076: RAISE FND_API.G_EXC_ERROR;
3077: END IF;
3078:
3079: --bug 3328421: For past dues sales orders we start ATP check from first working

Line 3076: RAISE FND_API.G_EXC_ERROR;

3072: -- check the return status
3073: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR THEN
3074: l_atp_table.Error_Code(i):= MSC_ATP_PVT.OSS_SOURCING_ERROR;
3075: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3076: RAISE FND_API.G_EXC_ERROR;
3077: END IF;
3078:
3079: --bug 3328421: For past dues sales orders we start ATP check from first working
3080: -- day after sysdate as per shipping calender. Therefore, days late for request date type = ship

Line 3797: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3793: END IF;
3794: IF l_ship_arrival_date_rec.demand_id is not null THEN
3795: IF (G_INV_CTP = 4)THEN
3796: MSC_ATP_DB_UTILS.Flush_Data_In_Pds(l_ship_arrival_date_rec, l_return_status);
3797: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3798: IF PG_DEBUG in ('Y', 'C') THEN
3799: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Pds procedure ');
3800: END IF;
3801: END IF;

Line 3804: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3800: END IF;
3801: END IF;
3802: ELSE
3803: MSC_ATP_DB_UTILS.Flush_Data_In_Ods(l_ship_arrival_date_rec, l_return_status);
3804: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3805: IF PG_DEBUG in ('Y', 'C') THEN
3806: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Ods procedure ');
3807: END IF;
3808: END IF;

Line 3812: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3808: END IF;
3809: END IF;
3810: END IF;
3811:
3812: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3813: IF PG_DEBUG in ('Y', 'C') THEN
3814: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Pds procedure ');
3815: END IF;
3816: RAISE FND_API.G_EXC_ERROR;

Line 3816: RAISE FND_API.G_EXC_ERROR;

3812: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3813: IF PG_DEBUG in ('Y', 'C') THEN
3814: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Pds procedure ');
3815: END IF;
3816: RAISE FND_API.G_EXC_ERROR;
3817: END IF;
3818: END IF;
3819: /* ship_rec_cal changes end */
3820:

Line 5275: x_return_status := FND_API.G_RET_STS_ERROR;

5271:
5272: EXCEPTION
5273:
5274: WHEN NO_DATA_FOUND THEN
5275: x_return_status := FND_API.G_RET_STS_ERROR;
5276:
5277: -- Resetting global variables for additional issue encountered while bug 3295831
5278: IF PG_DEBUG in ('Y', 'C') THEN
5279: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

Line 5411: WHEN FND_API.G_EXC_ERROR THEN

5407:
5408: END IF; -- Bug 1661545
5409:
5410:
5411: WHEN FND_API.G_EXC_ERROR THEN
5412: x_return_status := FND_API.G_RET_STS_ERROR;
5413:
5414: -- Resetting global variables for additional issue encountered while bug 3295831
5415: IF PG_DEBUG in ('Y', 'C') THEN

Line 5412: x_return_status := FND_API.G_RET_STS_ERROR;

5408: END IF; -- Bug 1661545
5409:
5410:
5411: WHEN FND_API.G_EXC_ERROR THEN
5412: x_return_status := FND_API.G_RET_STS_ERROR;
5413:
5414: -- Resetting global variables for additional issue encountered while bug 3295831
5415: IF PG_DEBUG in ('Y', 'C') THEN
5416: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

Line 5559: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

5555: IF PG_DEBUG in ('Y', 'C') THEN
5556: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
5557: msc_sch_wb.atp_debug('Schedule: Invalid Object Found. In it');
5558: END IF;
5559: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5560:
5561: -- Resetting global variables for additional issue encountered while bug 3295831
5562: IF PG_DEBUG in ('Y', 'C') THEN
5563: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

Line 5707: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

5703: IF PG_DEBUG in ('Y', 'C') THEN
5704: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
5705: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_DATE_IN_CAL');
5706: END IF;
5707: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5708:
5709: -- Resetting global variables for additional issue encountered while bug 3295831
5710: IF PG_DEBUG in ('Y', 'C') THEN
5711: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

Line 5855: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

5851: WHEN OTHERS THEN
5852: IF PG_DEBUG in ('Y', 'C') THEN
5853: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
5854: END IF;
5855: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
5856:
5857: -- Resetting global variables for additional issue encountered while bug 3295831
5858: IF PG_DEBUG in ('Y', 'C') THEN
5859: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

Line 6025: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

6021: END IF;
6022:
6023: -- Commented on 9/13/2001 by ngoel as this was causing subscript beyond count
6024: -- since exception wasn't trapped until Call_ATP_No_Commit.
6025: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6026: END Schedule;
6027:
6028:
6029: PROCEDURE ATP_Check (p_atp_record IN OUT NoCopy MRP_ATP_PVT.AtpRec,

Line 6294: x_return_status := FND_API.G_RET_STS_SUCCESS;

6290: msc_sch_wb.atp_debug('**********Begin ATP_Check Procedure************');
6291: END IF;
6292:
6293: -- initialize API return status to success
6294: x_return_status := FND_API.G_RET_STS_SUCCESS;
6295:
6296: -- initialize the error_code to ALLSUCCESS
6297: p_atp_record.error_code := ALLSUCCESS;
6298: IF PG_DEBUG in ('Y', 'C') THEN

Line 6369: RAISE FND_API.G_EXC_ERROR;

6365: IF ((p_atp_record.requested_ship_date IS NULL) and
6366: (p_atp_record.requested_arrival_date IS NULL)) THEN
6367:
6368: p_atp_record.error_code := NOREQ_DATE;
6369: RAISE FND_API.G_EXC_ERROR;
6370:
6371: ELSIF ((p_atp_record.requested_ship_date IS NOT NULL) and
6372: (p_atp_record.requested_arrival_date IS NOT NULL)) THEN
6373:

Line 6375: RAISE FND_API.G_EXC_ERROR;

6371: ELSIF ((p_atp_record.requested_ship_date IS NOT NULL) and
6372: (p_atp_record.requested_arrival_date IS NOT NULL)) THEN
6373:
6374: p_atp_record.error_code := ATP_MULTI_REQ_DATES;
6375: RAISE FND_API.G_EXC_ERROR;
6376: END IF;
6377: --bug3821358
6378: l_sys_next_date := MSC_CALENDAR.NEXT_WORK_DAY(p_atp_record.manufacturing_cal_code, -- use OMC
6379: p_atp_record.instance_id,

Line 6751: RAISE FND_API.G_EXC_ERROR;

6747:
6748: -- bug 1192311
6749: IF l_requested_ship_date is NULL THEN
6750: p_atp_record.error_code := ATP_INVALID_DATE;
6751: RAISE FND_API.G_EXC_ERROR;
6752: END IF;*/
6753:
6754: -- since we may have atp lead time specified for the item,
6755: -- we need to offset x working days from the the ship date.

Line 7104: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

7100: p_atp_record.demand_class,
7101: p_atp_record.atf_date,
7102: l_return_status
7103: );
7104: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
7105: IF PG_DEBUG in ('Y', 'C') THEN
7106: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Set_Alloc_Rule_Variables');
7107: END IF;
7108: RAISE FND_API.G_EXC_ERROR;

Line 7108: RAISE FND_API.G_EXC_ERROR;

7104: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
7105: IF PG_DEBUG in ('Y', 'C') THEN
7106: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Set_Alloc_Rule_Variables');
7107: END IF;
7108: RAISE FND_API.G_EXC_ERROR;
7109: END IF;
7110:
7111: IF l_requested_ship_date <= p_atp_record.atf_date THEN
7112: IF MSC_ATP_PVT.G_MEM_RULE_WITHIN_ATF = 'Y' THEN

Line 8564: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

8560: p_plan_id,
8561: l_demand_id,
8562: l_return_status
8563: );
8564: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8565: IF PG_DEBUG in ('Y', 'C') THEN
8566: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
8567: END IF;
8568: RAISE FND_API.G_EXC_ERROR;

Line 8568: RAISE FND_API.G_EXC_ERROR;

8564: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8565: IF PG_DEBUG in ('Y', 'C') THEN
8566: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
8567: END IF;
8568: RAISE FND_API.G_EXC_ERROR;
8569: END IF;
8570: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'
8571: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN
8572: update msc_alloc_demands

Line 8817: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

8813: p_plan_id,
8814: l_demand_id,
8815: l_return_status
8816: );
8817: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8818: IF PG_DEBUG in ('Y', 'C') THEN
8819: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
8820: END IF;
8821: RAISE FND_API.G_EXC_ERROR;

Line 8821: RAISE FND_API.G_EXC_ERROR;

8817: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8818: IF PG_DEBUG in ('Y', 'C') THEN
8819: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
8820: END IF;
8821: RAISE FND_API.G_EXC_ERROR;
8822: END IF;
8823: /* update atf date quantity */
8824: p_atp_record.atf_date_quantity := l_atp_insert_rec.atf_date_quantity;
8825: /* Reset l_atf_date_qty to 0*/

Line 8998: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

8994: p_plan_id,
8995: l_demand_id,
8996: l_return_status
8997: );
8998: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8999: IF PG_DEBUG in ('Y', 'C') THEN
9000: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
9001: END IF;
9002: RAISE FND_API.G_EXC_ERROR;

Line 9002: RAISE FND_API.G_EXC_ERROR;

8998: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
8999: IF PG_DEBUG in ('Y', 'C') THEN
9000: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
9001: END IF;
9002: RAISE FND_API.G_EXC_ERROR;
9003: END IF;
9004: ELSE
9005: update msc_alloc_demands
9006: set allocated_quantity = p_atp_record.requested_date_quantity + l_stealing_requested_date_qty

Line 9324: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

9320: p_atp_record.atf_date_quantity, -- --bug3397904 changed from NULL
9321: l_return_status,
9322: l_bkwd_pass_atf_date_qty --bug3397904
9323: );
9324: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9325: IF PG_DEBUG in ('Y', 'C') THEN
9326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');
9327: END IF;
9328: RAISE FND_API.G_EXC_ERROR;

Line 9328: RAISE FND_API.G_EXC_ERROR;

9324: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9325: IF PG_DEBUG in ('Y', 'C') THEN
9326: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');
9327: END IF;
9328: RAISE FND_API.G_EXC_ERROR;
9329: END IF;
9330: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'
9331: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN
9332: update msc_alloc_demands

Line 10112: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS OR

10108: and record_type = 3;
10109:
10110: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
10111:
10112: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS OR
10113: l_sources.source_type.count = 0 THEN
10114: -- no sources in supply chain bill, then we assume
10115: -- it has "make at" type
10116: IF PG_DEBUG in ('Y', 'C') THEN

Line 10706: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

10702: p_plan_id --bug3510475 same plan when
10703: --moving from one org to another
10704: );
10705:
10706: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
10707: IF PG_DEBUG in ('Y', 'C') THEN
10708: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
10709: END IF;
10710: x_return_status := FND_API.G_RET_STS_ERROR;

Line 10710: x_return_status := FND_API.G_RET_STS_ERROR;

10706: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
10707: IF PG_DEBUG in ('Y', 'C') THEN
10708: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
10709: END IF;
10710: x_return_status := FND_API.G_RET_STS_ERROR;
10711: RAISE FND_API.G_EXC_ERROR;
10712: END IF;
10713: /* time_phased_atp changes end*/
10714:

Line 10711: RAISE FND_API.G_EXC_ERROR;

10707: IF PG_DEBUG in ('Y', 'C') THEN
10708: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
10709: END IF;
10710: x_return_status := FND_API.G_RET_STS_ERROR;
10711: RAISE FND_API.G_EXC_ERROR;
10712: END IF;
10713: /* time_phased_atp changes end*/
10714:
10715: l_plan_info_rec := MSC_ATP_PVT.G_PLAN_INFO_REC;

Line 12217: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

12213: p_atp_record.children_type := l_atp_rec.children_type;
12214: END IF;
12215: END IF;
12216: -- check the return status
12217: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
12218: RAISE FND_API.G_EXC_ERROR;
12219: END IF;
12220:
12221: IF p_search = BACKWARD_SCHEDULING THEN

Line 12218: RAISE FND_API.G_EXC_ERROR;

12214: END IF;
12215: END IF;
12216: -- check the return status
12217: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
12218: RAISE FND_API.G_EXC_ERROR;
12219: END IF;
12220:
12221: IF p_search = BACKWARD_SCHEDULING THEN
12222: -- rajjain 01/29/03 Bug 2774827

Line 12883: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

12879: p_atp_record.error_code,
12880: l_return_status,
12881: p_plan_id );
12882:
12883: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
12884: IF PG_DEBUG in ('Y', 'C') THEN
12885: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
12886: END IF;
12887: x_return_status := FND_API.G_RET_STS_ERROR;

Line 12887: x_return_status := FND_API.G_RET_STS_ERROR;

12883: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
12884: IF PG_DEBUG in ('Y', 'C') THEN
12885: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
12886: END IF;
12887: x_return_status := FND_API.G_RET_STS_ERROR;
12888: RAISE FND_API.G_EXC_ERROR;
12889: END IF;
12890: --4501944
12891:

Line 12888: RAISE FND_API.G_EXC_ERROR;

12884: IF PG_DEBUG in ('Y', 'C') THEN
12885: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
12886: END IF;
12887: x_return_status := FND_API.G_RET_STS_ERROR;
12888: RAISE FND_API.G_EXC_ERROR;
12889: END IF;
12890: --4501944
12891:
12892: IF PF_ITEM_INFO_REC.bom_item_type =1 and PF_ITEM_INFO_REC.replenish_to_ord_flag = 'Y' THEN

Line 13272: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

13268: l_bill_seq_id,
13269: l_op_seq_id, --4570421
13270: l_return_status);
13271: -- check the return status
13272: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
13273: RAISE FND_API.G_EXC_ERROR;
13274: END IF;
13275: END IF;
13276: --s_cto_rearch

Line 13273: RAISE FND_API.G_EXC_ERROR;

13269: l_op_seq_id, --4570421
13270: l_return_status);
13271: -- check the return status
13272: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
13273: RAISE FND_API.G_EXC_ERROR;
13274: END IF;
13275: END IF;
13276: --s_cto_rearch
13277: IF MSC_ATP_PVT.G_INV_CTP = 4 THEN

Line 13542: FND_API.G_RET_STS_SUCCESS THEN

13538: l_return_status );
13539:
13540: -- check the return status
13541: IF l_return_status <>
13542: FND_API.G_RET_STS_SUCCESS THEN
13543: RAISE FND_API.G_EXC_ERROR;
13544: END IF;
13545:
13546: END IF;

Line 13543: RAISE FND_API.G_EXC_ERROR;

13539:
13540: -- check the return status
13541: IF l_return_status <>
13542: FND_API.G_RET_STS_SUCCESS THEN
13543: RAISE FND_API.G_EXC_ERROR;
13544: END IF;
13545:
13546: END IF;
13547:

Line 13593: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

13589: l_bill_seq_id,
13590: l_op_seq_id, --4570421
13591: l_return_status);
13592: -- check the return status
13593: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
13594: RAISE FND_API.G_EXC_ERROR;
13595: END IF;
13596: END IF;
13597:

Line 13594: RAISE FND_API.G_EXC_ERROR;

13590: l_op_seq_id, --4570421
13591: l_return_status);
13592: -- check the return status
13593: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
13594: RAISE FND_API.G_EXC_ERROR;
13595: END IF;
13596: END IF;
13597:
13598:

Line 13677: ELSIF l_return_status <>FND_API.G_RET_STS_SUCCESS THEN

13673: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR THEN
13674:
13675: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
13676:
13677: ELSIF l_return_status <>FND_API.G_RET_STS_SUCCESS THEN
13678: RAISE FND_API.G_EXC_ERROR;
13679: END IF;
13680:
13681: END IF;

Line 13678: RAISE FND_API.G_EXC_ERROR;

13674:
13675: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
13676:
13677: ELSIF l_return_status <>FND_API.G_RET_STS_SUCCESS THEN
13678: RAISE FND_API.G_EXC_ERROR;
13679: END IF;
13680:
13681: END IF;
13682: END IF;

Line 13882: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

13878: l_bill_seq_id,
13879: l_op_seq_id, --4570421
13880: l_return_status);
13881: -- check the return status
13882: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
13883: RAISE FND_API.G_EXC_ERROR;
13884: END IF;
13885: MSC_ATP_REQ.Get_Res_Requirements(
13886: p_atp_record.instance_id,

Line 13883: RAISE FND_API.G_EXC_ERROR;

13879: l_op_seq_id, --4570421
13880: l_return_status);
13881: -- check the return status
13882: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
13883: RAISE FND_API.G_EXC_ERROR;
13884: END IF;
13885: MSC_ATP_REQ.Get_Res_Requirements(
13886: p_atp_record.instance_id,
13887: p_plan_id,

Line 13915: FND_API.G_RET_STS_SUCCESS THEN

13911: l_return_status );
13912:
13913: -- check the return status
13914: IF l_return_status <>
13915: FND_API.G_RET_STS_SUCCESS THEN
13916: RAISE FND_API.G_EXC_ERROR;
13917: END IF;
13918:
13919: END IF;

Line 13916: RAISE FND_API.G_EXC_ERROR;

13912:
13913: -- check the return status
13914: IF l_return_status <>
13915: FND_API.G_RET_STS_SUCCESS THEN
13916: RAISE FND_API.G_EXC_ERROR;
13917: END IF;
13918:
13919: END IF;
13920:

Line 14005: FND_API.G_RET_STS_SUCCESS THEN

14001:
14002: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
14003:
14004: ELSIF l_return_status <>
14005: FND_API.G_RET_STS_SUCCESS THEN
14006: RAISE FND_API.G_EXC_ERROR;
14007: END IF;
14008:
14009: END IF;

Line 14006: RAISE FND_API.G_EXC_ERROR;

14002: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
14003:
14004: ELSIF l_return_status <>
14005: FND_API.G_RET_STS_SUCCESS THEN
14006: RAISE FND_API.G_EXC_ERROR;
14007: END IF;
14008:
14009: END IF;
14010:

Line 14235: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

14231: l_bill_seq_id,
14232: l_op_seq_id, --4570421
14233: l_return_status);
14234: -- check the return status
14235: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
14236: RAISE FND_API.G_EXC_ERROR;
14237: END IF;
14238: MSC_ATP_REQ.Get_Res_Requirements(
14239: p_atp_record.instance_id,

Line 14236: RAISE FND_API.G_EXC_ERROR;

14232: l_op_seq_id, --4570421
14233: l_return_status);
14234: -- check the return status
14235: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
14236: RAISE FND_API.G_EXC_ERROR;
14237: END IF;
14238: MSC_ATP_REQ.Get_Res_Requirements(
14239: p_atp_record.instance_id,
14240: p_plan_id,

Line 14270: FND_API.G_RET_STS_SUCCESS THEN

14266:
14267: -- check the return status
14268: -- Error Handling Changes krajan
14269: IF l_return_status <>
14270: FND_API.G_RET_STS_SUCCESS THEN
14271: RAISE FND_API.G_EXC_ERROR;
14272: END IF;
14273:
14274: IF PG_DEBUG in ('Y', 'C') THEN

Line 14271: RAISE FND_API.G_EXC_ERROR;

14267: -- check the return status
14268: -- Error Handling Changes krajan
14269: IF l_return_status <>
14270: FND_API.G_RET_STS_SUCCESS THEN
14271: RAISE FND_API.G_EXC_ERROR;
14272: END IF;
14273:
14274: IF PG_DEBUG in ('Y', 'C') THEN
14275: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty = '||l_avail_assembly_qty);

Line 14397: FND_API.G_RET_STS_SUCCESS THEN

14393: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR THEN
14394:
14395: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
14396: ELSIF l_return_status <>
14397: FND_API.G_RET_STS_SUCCESS THEN
14398: RAISE FND_API.G_EXC_ERROR;
14399: END IF;
14400:
14401: IF PG_DEBUG in ('Y', 'C') THEN

Line 14398: RAISE FND_API.G_EXC_ERROR;

14394:
14395: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
14396: ELSIF l_return_status <>
14397: FND_API.G_RET_STS_SUCCESS THEN
14398: RAISE FND_API.G_EXC_ERROR;
14399: END IF;
14400:
14401: IF PG_DEBUG in ('Y', 'C') THEN
14402: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level ='||l_atp_date_this_level);

Line 14917: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

14913: p_plan_id,
14914: l_demand_id,
14915: l_return_status
14916: );
14917: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
14918: IF PG_DEBUG in ('Y', 'C') THEN
14919: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
14920: END IF;
14921: RAISE FND_API.G_EXC_ERROR;

Line 14921: RAISE FND_API.G_EXC_ERROR;

14917: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
14918: IF PG_DEBUG in ('Y', 'C') THEN
14919: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
14920: END IF;
14921: RAISE FND_API.G_EXC_ERROR;
14922: END IF;
14923: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'
14924: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN
14925:

Line 15039: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

15035: p_plan_id,
15036: l_demand_id,
15037: l_return_status
15038: );
15039: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15040: IF PG_DEBUG in ('Y', 'C') THEN
15041: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
15042: END IF;
15043: RAISE FND_API.G_EXC_ERROR;

Line 15043: RAISE FND_API.G_EXC_ERROR;

15039: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15040: IF PG_DEBUG in ('Y', 'C') THEN
15041: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
15042: END IF;
15043: RAISE FND_API.G_EXC_ERROR;
15044: END IF;
15045: END IF;
15046: ELSE
15047: -- if this is the top node, we need to turn on a flag so

Line 15129: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

15125: p_atp_record.quantity_ordered,
15126: p_atp_record.combined_requested_date_qty,
15127: l_return_status
15128: );
15129: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15130: IF PG_DEBUG in ('Y', 'C') THEN
15131: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Update_PF_Bucketed_Demands');
15132: END IF;
15133: RAISE FND_API.G_EXC_ERROR;

Line 15133: RAISE FND_API.G_EXC_ERROR;

15129: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15130: IF PG_DEBUG in ('Y', 'C') THEN
15131: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Update_PF_Bucketed_Demands');
15132: END IF;
15133: RAISE FND_API.G_EXC_ERROR;
15134: END IF;
15135: --alloc_pp
15136: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'
15137: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN

Line 15297: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

15293: NULL, -- pass atf_date_qty as null
15294: l_return_status,
15295: NULL --bug3397904
15296: );
15297: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15298: IF PG_DEBUG in ('Y', 'C') THEN
15299: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');
15300: END IF;
15301: RAISE FND_API.G_EXC_ERROR;

Line 15301: RAISE FND_API.G_EXC_ERROR;

15297: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15298: IF PG_DEBUG in ('Y', 'C') THEN
15299: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');
15300: END IF;
15301: RAISE FND_API.G_EXC_ERROR;
15302: END IF;
15303: --alloc_pp
15304: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'
15305: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN

Line 16127: WHEN FND_API.G_EXC_ERROR THEN

16123: END IF;
16124: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
16125: x_return_status := MSC_ATP_PVT.G_ATO_UNCOLL_ITEM;
16126:
16127: WHEN FND_API.G_EXC_ERROR THEN
16128: IF PG_DEBUG in ('Y', 'C') THEN
16129: msc_sch_wb.atp_debug('something wrong in the ATP_Check 1');
16130: END IF;
16131: x_return_status := FND_API.G_RET_STS_ERROR;

Line 16131: x_return_status := FND_API.G_RET_STS_ERROR;

16127: WHEN FND_API.G_EXC_ERROR THEN
16128: IF PG_DEBUG in ('Y', 'C') THEN
16129: msc_sch_wb.atp_debug('something wrong in the ATP_Check 1');
16130: END IF;
16131: x_return_status := FND_API.G_RET_STS_ERROR;
16132: IF PG_DEBUG in ('Y', 'C') THEN
16133: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for G_EXC_ERROR');
16134: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error := ' || SQLerrm);
16135: END IF;

Line 16142: --x_return_status := FND_API.G_RET_STS_ERROR; --bug3583705

16138: IF PG_DEBUG in ('Y', 'C') THEN
16139: msc_sch_wb.atp_debug('MAtching cal date not found, in atp_check');
16140: END IF;
16141: p_atp_record.error_code := NO_MATCHING_CAL_DATE;
16142: --x_return_status := FND_API.G_RET_STS_ERROR; --bug3583705
16143: RAISE NO_MATCHING_DATE_IN_CAL;
16144:
16145: /************ Bug 1510853 ATP Rule Check ************/
16146: WHEN EXC_NO_ATP_RULE THEN

Line 16151: x_return_status := FND_API.G_RET_STS_ERROR;

16147: IF PG_DEBUG in ('Y', 'C') THEN
16148: msc_sch_wb.atp_debug('No ATP Rule for Item and Org., in atp_check');
16149: END IF;
16150: p_atp_record.error_code := ATP_BAD_RULE;
16151: x_return_status := FND_API.G_RET_STS_ERROR;
16152:
16153: -- Error Handling Modifications
16154: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
16155: IF PG_DEBUG in ('Y', 'C') THEN

Line 16160: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

16156: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
16157: msc_sch_wb.atp_debug('ATP_Check: Invalid Objects found, sqlcode= '||sqlcode);
16158: END IF;
16159:
16160: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16161: IF (p_atp_record.error_code IS NULL) or (p_atp_record.error_code IN (0,61,150)) THEN
16162: p_atp_record.error_code := ATP_INVALID_OBJECTS;
16163: END IF;
16164: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

Line 16176: x_return_status := FND_API.G_RET_STS_ERROR;

16172: IF PG_DEBUG in ('Y', 'C') THEN
16173: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
16174: END IF;
16175: p_atp_record.error_code := INVALID_ALLOC_PROFILE_SETUP;
16176: x_return_status := FND_API.G_RET_STS_ERROR;
16177:
16178: WHEN OTHERS THEN
16179: IF PG_DEBUG in ('Y', 'C') THEN
16180: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for OTHERS');

Line 16185: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

16181: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
16182: msc_sch_wb.atp_debug('something wrong in the ATP_Check 2, sqlcode= '||sqlcode);
16183: END IF;
16184:
16185: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
16186:
16187: /* Check if this is actually coming from a calendar routine*/
16188: l_encoded_text := fnd_message.GET_ENCODED;
16189: IF l_encoded_text IS NULL THEN

Line 16218: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

16214:
16215: IF l_msg_app='MRP' AND l_msg_name='GEN-DATE OUT OF BOUNDS' THEN
16216: RAISE NO_MATCHING_DATE_IN_CAL;
16217: ELSE
16218: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
16219: END IF;
16220: END ATP_Check;
16221:
16222:

Line 16362: x_return_status := FND_API.G_RET_STS_SUCCESS;

16358:
16359: G_TIME_PHASED_SET := 'N'; -- For summary enhancement
16360:
16361: -- initialize API return status to success
16362: x_return_status := FND_API.G_RET_STS_SUCCESS;
16363:
16364: -- Bug 2356892
16365: IF PG_DEBUG in ('Y', 'C') THEN
16366: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Check_CTO: G_INV_CTP : '||G_INV_CTP);

Line 16449: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

16445: IF PG_DEBUG in ('Y', 'C') THEN --3720018
16446: msc_sch_wb.atp_debug('Call_Schedule: l_return_status: ' || l_return_status);
16447: msc_sch_wb.atp_debug('Call_Schedule: l_delete_atp_rec.error_code(1): ' || l_delete_atp_rec.error_code(1));
16448: END IF;
16449: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
16450: IF PG_DEBUG in ('Y', 'C') THEN
16451: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error in Call_delete_row');
16452: END IF;
16453: x_return_status := FND_API.G_RET_STS_ERROR;

Line 16453: x_return_status := FND_API.G_RET_STS_ERROR;

16449: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
16450: IF PG_DEBUG in ('Y', 'C') THEN
16451: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error in Call_delete_row');
16452: END IF;
16453: x_return_status := FND_API.G_RET_STS_ERROR;
16454: RAISE FND_API.G_EXC_ERROR;
16455: END IF;
16456: IF (l_delete_atp_rec.error_code(1) = MSC_ATP_PVT.TRY_ATP_LATER) OR
16457: (l_delete_atp_rec.error_code(1) = MSC_ATP_PVT.SUMM_CONC_PROG_RUNNING) THEN

Line 16454: RAISE FND_API.G_EXC_ERROR;

16450: IF PG_DEBUG in ('Y', 'C') THEN
16451: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error in Call_delete_row');
16452: END IF;
16453: x_return_status := FND_API.G_RET_STS_ERROR;
16454: RAISE FND_API.G_EXC_ERROR;
16455: END IF;
16456: IF (l_delete_atp_rec.error_code(1) = MSC_ATP_PVT.TRY_ATP_LATER) OR
16457: (l_delete_atp_rec.error_code(1) = MSC_ATP_PVT.SUMM_CONC_PROG_RUNNING) THEN
16458: x_atp_table := p_atp_table;

Line 17281: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

17277: END IF;
17278: END LOOP;
17279:
17280: WHEN OTHERS THEN
17281: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
17282: /* Check if this is actually coming from a calendar routine*/
17283: l_encoded_text := fnd_message.GET_ENCODED;
17284: IF l_encoded_text IS NULL THEN
17285: l_msg_app := NULL;

Line 17393: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

17389: -- Check if the Scheduling was successful. In case no, set the error code
17390: -- for all rows where its either success or atp_not_appl or null.
17391:
17392:
17393: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
17394:
17395: IF PG_DEBUG in ('Y', 'C') THEN
17396: msc_sch_wb.atp_debug('Call_Schedule: ' || 'inside return status error');
17397: END IF;

Line 17398: x_return_status := FND_API.G_RET_STS_ERROR;

17394:
17395: IF PG_DEBUG in ('Y', 'C') THEN
17396: msc_sch_wb.atp_debug('Call_Schedule: ' || 'inside return status error');
17397: END IF;
17398: x_return_status := FND_API.G_RET_STS_ERROR;
17399: k := l_atp_output_table.Calling_Module.First;
17400: FOR k in 1.. l_atp_output_table.Calling_Module.COUNT LOOP
17401: --l_atp_output_table.Group_Ship_Date(k):= l_group_date;
17402: IF (l_atp_output_table.Error_Code(k) = ALLSUCCESS) OR

Line 17416: IF l_return_status = FND_API.G_RET_STS_SUCCESS and l_atp_output_table.action(k) <> 100

17412: END IF; --IF l_set_fail_flag = 'Y' THEN
17413: -- rajjain 02/03/2003 Bug 2766713 End
17414: --4500382 Starts
17415: k := l_atp_output_table.action.FIRST;
17416: IF l_return_status = FND_API.G_RET_STS_SUCCESS and l_atp_output_table.action(k) <> 100
17417: and p_atp_table.part_of_set(k) = 'Y' and
17418: (l_atp_output_table.Error_Code(k) = ALLSUCCESS OR
17419: l_atp_output_table.error_code(k) = ATP_NOT_APPL OR
17420: l_atp_output_table.Error_Code(k) is NULL) THEN

Line 18016: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;

18012: WHEN OTHERS THEN
18013: IF PG_DEBUG in ('Y', 'C') THEN
18014: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error occured while selecting inventory_item_id : ' || sqlerrm);
18015: END IF;
18016: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
18017: END;
18018:
18019: IF PG_DEBUG in ('Y', 'C') THEN
18020: msc_sch_wb.atp_debug('Call_Schedule: Inventory Item Id : ' || l_inventory_item_id);

Line 18105: x_return_status := FND_API.G_RET_STS_SUCCESS;

18101:
18102: BEGIN
18103: -- initialize API return status to success
18104:
18105: x_return_status := FND_API.G_RET_STS_SUCCESS;
18106: --bug3940999 setting debug mode explicitly so the messages can be printed
18107: IF p_atp_debug_flag IS NOT NULL THEN
18108: FND_PROFILE.put('MSC_ATP_DEBUG', p_atp_debug_flag);
18109: PG_DEBUG := p_atp_debug_flag;