DBA Data[Home] [Help]

APPS.MSC_ATP_PVT dependencies on FND_API

Line 346: x_return_status := FND_API.G_RET_STS_SUCCESS;

342: END IF;
343: --initialize ATP_SET_FLAG TO NO --4460369
344: MSC_ATP_PVT.G_ATP_ITEM_PRESENT_IN_SET := 'N';
345: -- initialize API return status to success
346: x_return_status := FND_API.G_RET_STS_SUCCESS;
347:
348: MSC_ATP_PVT.G_RES_CONSUME := NVL(FND_PROFILE.value('MSC_ATP_RES_CONSUME'), 'Y');
349: IF PG_DEBUG in ('Y', 'C') THEN
350: msc_sch_wb.atp_debug('Schedule: ' || 'G_RES_CONSUME = '||MSC_ATP_PVT.G_RES_CONSUME);

Line 469: RAISE FND_API.G_EXC_ERROR ;

465: -- Bug 1763731, need not do this check for the time being
466: /*
467: x_atp_table := p_atp_table;
468: x_atp_table.error_code(1) := NO_ASSIGNMENT_SET;
469: RAISE FND_API.G_EXC_ERROR ;
470: */
471: lv_assign_set_id := NULL; -- Use new local variable
472: end;
473:

Line 702: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

698: IF PG_DEBUG in ('Y', 'C') THEN --3720018
699: msc_sch_wb.atp_debug('Schedule: l_return_status: ' || l_return_status);
700: END IF;
701:
702: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
703: IF PG_DEBUG in ('Y', 'C') THEN
704: msc_sch_wb.atp_debug('Schedule: ' || 'Error in Call_delete_row');
705: END IF;
706: x_return_status := FND_API.G_RET_STS_ERROR;

Line 706: x_return_status := FND_API.G_RET_STS_ERROR;

702: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
703: IF PG_DEBUG in ('Y', 'C') THEN
704: msc_sch_wb.atp_debug('Schedule: ' || 'Error in Call_delete_row');
705: END IF;
706: x_return_status := FND_API.G_RET_STS_ERROR;
707: RAISE FND_API.G_EXC_ERROR;
708: END IF;
709:
710: IF (l_delete_atp_rec.error_code(1) = MSC_ATP_PVT.TRY_ATP_LATER) OR

Line 707: RAISE FND_API.G_EXC_ERROR;

703: IF PG_DEBUG in ('Y', 'C') THEN
704: msc_sch_wb.atp_debug('Schedule: ' || 'Error in Call_delete_row');
705: END IF;
706: x_return_status := FND_API.G_RET_STS_ERROR;
707: RAISE FND_API.G_EXC_ERROR;
708: END IF;
709:
710: IF (l_delete_atp_rec.error_code(1) = MSC_ATP_PVT.TRY_ATP_LATER) OR
711: (l_delete_atp_rec.error_code(1) = MSC_ATP_PVT.SUMM_CONC_PROG_RUNNING) THEN

Line 848: IF l_return_status = FND_API.G_RET_STS_ERROR THEN

844: IF PG_DEBUG in ('Y', 'C') THEN
845: msc_sch_wb.atp_debug('Schedule: ' || 'Get_Regions, return status : ' || l_return_status);
846: END IF;
847:
848: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
849: -- something wrong so we want to rollback;
850: IF PG_DEBUG in ('Y', 'C') THEN
851: msc_sch_wb.atp_debug('Schedule: ' || 'expected error in Call to Get_Regions');
852: END IF;

Line 853: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then

849: -- something wrong so we want to rollback;
850: IF PG_DEBUG in ('Y', 'C') THEN
851: msc_sch_wb.atp_debug('Schedule: ' || 'expected error in Call to Get_Regions');
852: END IF;
853: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
854: IF PG_DEBUG in ('Y', 'C') THEN
855: msc_sch_wb.atp_debug('Schedule: ' || 'something wrong in Call to Get_Regions');
856: END IF;
857: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;

Line 857: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;

853: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
854: IF PG_DEBUG in ('Y', 'C') THEN
855: msc_sch_wb.atp_debug('Schedule: ' || 'something wrong in Call to Get_Regions');
856: END IF;
857: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
858: END IF;
859:
860: -- dsting setproc
861: MSC_ATP_PROC.Initialize_Set_Processing(p_atp_table);

Line 1114: IF l_return_status <> FND_API.G_RET_STS_SUCCESS OR

1110: to_char(l_sources.source_type.count));
1111: END IF;
1112:
1113: -- check the return status
1114: IF l_return_status <> FND_API.G_RET_STS_SUCCESS OR
1115: l_sources.source_type.count = 0 THEN
1116:
1117: IF PG_DEBUG in ('Y', 'C') THEN
1118: msc_sch_wb.atp_debug('Schedule: ' || 'atp source fails');

Line 1120: x_return_status := FND_API.G_RET_STS_ERROR;

1116:
1117: IF PG_DEBUG in ('Y', 'C') THEN
1118: msc_sch_wb.atp_debug('Schedule: ' || 'atp source fails');
1119: END IF;
1120: x_return_status := FND_API.G_RET_STS_ERROR;
1121:
1122: IF PG_DEBUG in ('Y', 'C') THEN
1123: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Customer_Id.COUNT :='||l_atp_table.Customer_Id.COUNT);
1124: msc_sch_wb.atp_debug('Schedule: ' || 'l_atp_table.Error_Code.COUNT :='||l_atp_table.Error_Code.COUNT);

Line 1930: x_return_status := FND_API.G_RET_STS_ERROR;

1926: -- member item which has ATP flag = 'N'. For other members we will continue as usual
1927: IF PG_DEBUG in ('Y', 'C') THEN
1928: msc_sch_wb.atp_debug('Schedule: ' || 'Member item is not atpable');
1929: END IF;
1930: x_return_status := FND_API.G_RET_STS_ERROR;
1931: l_atp_table.Error_Code(i):= PF_MEMBER_ITEM_NOT_ATPABLE;
1932: RAISE NO_DATA_FOUND;
1933: END IF;
1934: -- since we know the org now, we can get the plan_id if it is PDS

Line 2000: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

1996: l_return_status,
1997: NULL --bug3510475
1998: );
1999:
2000: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2001: IF PG_DEBUG in ('Y', 'C') THEN
2002: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
2003: END IF;
2004: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2004: x_return_status := FND_API.G_RET_STS_ERROR;

2000: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2001: IF PG_DEBUG in ('Y', 'C') THEN
2002: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
2003: END IF;
2004: x_return_status := FND_API.G_RET_STS_ERROR;
2005: RAISE FND_API.G_EXC_ERROR;
2006: END IF;
2007:
2008: IF l_atf_date is not null THEN

Line 2005: RAISE FND_API.G_EXC_ERROR;

2001: IF PG_DEBUG in ('Y', 'C') THEN
2002: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
2003: END IF;
2004: x_return_status := FND_API.G_RET_STS_ERROR;
2005: RAISE FND_API.G_EXC_ERROR;
2006: END IF;
2007:
2008: IF l_atf_date is not null THEN
2009: l_time_phased_atp := 'Y';

Line 2075: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

2071: l_return_status,
2072: NULL --bug3510475
2073: );
2074:
2075: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2076: IF PG_DEBUG in ('Y', 'C') THEN
2077: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
2078: END IF;
2079: x_return_status := FND_API.G_RET_STS_ERROR;

Line 2079: x_return_status := FND_API.G_RET_STS_ERROR;

2075: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
2076: IF PG_DEBUG in ('Y', 'C') THEN
2077: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
2078: END IF;
2079: x_return_status := FND_API.G_RET_STS_ERROR;
2080: RAISE FND_API.G_EXC_ERROR;
2081: END IF;
2082:
2083: -- ATP4drp changes begin

Line 2080: RAISE FND_API.G_EXC_ERROR;

2076: IF PG_DEBUG in ('Y', 'C') THEN
2077: msc_sch_wb.atp_debug('Schedule: ' || 'ATP Downtime during Re-schedule');
2078: END IF;
2079: x_return_status := FND_API.G_RET_STS_ERROR;
2080: RAISE FND_API.G_EXC_ERROR;
2081: END IF;
2082:
2083: -- ATP4drp changes begin
2084: IF NVL(MSC_ATP_PVT.G_PLAN_INFO_REC.plan_type, 1) = 5 THEN

Line 2129: x_return_status := FND_API.G_RET_STS_ERROR;

2125: IF l_plan_id is NULL THEN
2126: IF PG_DEBUG in ('Y', 'C') THEN
2127: msc_sch_wb.atp_debug('Schedule: ' || 'no plan available');
2128: END IF;
2129: x_return_status := FND_API.G_RET_STS_ERROR;
2130: --bug 2854351: Raise plan down time error
2131: --l_atp_table.Error_Code(i):= PLAN_NOT_FOUND;
2132: l_atp_table.Error_Code(i):= MSC_ATP_PVT.PLAN_DOWN_TIME;
2133: RAISE NO_DATA_FOUND;

Line 2138: x_return_status := FND_API.G_RET_STS_ERROR;

2134: ELSIF l_plan_id = -100 THEN
2135: IF PG_DEBUG in ('Y', 'C') THEN
2136: msc_sch_wb.atp_debug('Schedule: ' || 'Summary Concurrent program is running');
2137: END IF;
2138: x_return_status := FND_API.G_RET_STS_ERROR;
2139: l_atp_table.Error_Code(i):= SUMM_CONC_PROG_RUNNING;
2140: RAISE NO_DATA_FOUND;
2141: ELSIF l_plan_id = -200 THEN
2142: IF PG_DEBUG in ('Y', 'C') THEN

Line 2145: x_return_status := FND_API.G_RET_STS_ERROR;

2141: ELSIF l_plan_id = -200 THEN
2142: IF PG_DEBUG in ('Y', 'C') THEN
2143: msc_sch_wb.atp_debug('Schedule: ' || 'Post Plan Alloc progranm has not been run');
2144: END IF;
2145: x_return_status := FND_API.G_RET_STS_ERROR;
2146: l_atp_table.Error_Code(i):= RUN_POST_PLAN_ALLOC;
2147: RAISE NO_DATA_FOUND;
2148:
2149: -- 24x7 ATP

Line 2154: x_return_status := FND_API.G_RET_STS_ERROR;

2150: ELSIF l_plan_id = -300 THEN
2151: if PG_DEBUG in ('Y','C') THEN
2152: msc_sch_wb.atp_debug ('Schedule: ' || 'ATP Downtime . 24x7 ATP');
2153: END IF;
2154: x_return_status := FND_API.G_RET_STS_ERROR;
2155: --- bug 2854351: Show planned down time error
2156: --l_atp_table.Error_Code(i) := TRY_ATP_LATER;
2157: l_atp_table.Error_Code(i) := PLAN_DOWN_TIME;
2158: RAISE NO_DATA_FOUND;

Line 2598: RAISE FND_API.G_EXC_ERROR;

2594: END IF;
2595:
2596: IF l_requested_ship_date is NULL THEN
2597: l_atp_table.error_code(i) := MSC_ATP_PVT.ATP_INVALID_DATE;
2598: RAISE FND_API.G_EXC_ERROR;
2599: END IF;
2600:
2601: --bug 3322846: Move past due ship date to the first working day after sysdate
2602: --L_MOVE_PAST_DUE_TO_SYSDATE := NVL(FND_PROFILE.value('MSC_MOVE_PAST_DUE_TO_SYSDATE'), 'Y'); -- Bug 5584634/5618929

Line 2627: RAISE FND_API.G_EXC_ERROR;

2623: END IF; -- Bug 5584634/5618929
2624:
2625: IF l_requested_ship_date is NULL THEN
2626: l_atp_table.error_code(i) := MSC_ATP_PVT.ATP_INVALID_DATE;
2627: RAISE FND_API.G_EXC_ERROR;
2628: END IF;
2629:
2630: ELSE -- Bug3593394
2631: IF PG_DEBUG in ('Y', 'C') THEN

Line 2773: RAISE FND_API.G_EXC_ERROR;

2769: l_atp_rec.error_code := MSC_ATP_PVT.NOREQ_DATE;
2770: -- krajan : 2437459
2771: l_atp_table.error_code(i) := MSC_ATP_PVT.NOREQ_DATE;
2772:
2773: RAISE FND_API.G_EXC_ERROR;
2774:
2775: ELSIF ((l_atp_rec.requested_ship_date IS NOT NULL) and
2776: (l_atp_rec.requested_arrival_date IS NOT NULL)) THEN
2777:

Line 2782: RAISE FND_API.G_EXC_ERROR;

2778: l_atp_rec.error_code := MSC_ATP_PVT.ATP_MULTI_REQ_DATES;
2779: -- krajan : 2437459
2780: l_atp_table.error_code(i) := MSC_ATP_PVT.ATP_MULTI_REQ_DATES;
2781:
2782: RAISE FND_API.G_EXC_ERROR;
2783: END IF;
2784: IF PG_DEBUG in ('Y', 'C') THEN
2785: msc_sch_wb.atp_debug('Schedule: ' || 'get item attributes for the top item');
2786: END IF;

Line 3028: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3024: l_assign_set_id,
3025: l_atp_period,
3026: l_atp_supply_demand,
3027: l_return_status);
3028: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3029: IF PG_DEBUG in ('Y', 'C') THEN
3030: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails');
3031: END IF;
3032: x_return_status := FND_API.G_RET_STS_ERROR;

Line 3032: x_return_status := FND_API.G_RET_STS_ERROR;

3028: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3029: IF PG_DEBUG in ('Y', 'C') THEN
3030: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails');
3031: END IF;
3032: x_return_status := FND_API.G_RET_STS_ERROR;
3033: --2741997
3034: l_atp_table.Error_Code(i):= l_atp_rec.Error_Code;
3035: RAISE NO_DATA_FOUND;
3036: END IF;

Line 3134: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3130:
3131: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR THEN
3132: l_atp_table.Error_Code(i):= MSC_ATP_PVT.OSS_SOURCING_ERROR;
3133:
3134: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3135: IF PG_DEBUG in ('Y', 'C') THEN
3136: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails');
3137: END IF;
3138: x_return_status := FND_API.G_RET_STS_ERROR;

Line 3138: x_return_status := FND_API.G_RET_STS_ERROR;

3134: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3135: IF PG_DEBUG in ('Y', 'C') THEN
3136: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails');
3137: END IF;
3138: x_return_status := FND_API.G_RET_STS_ERROR;
3139: --2741997
3140: -- l_atp_table.Error_Code(k):= l_atp_rec.Error_Code;
3141: l_atp_table.Error_Code(i):= l_atp_rec.Error_Code;
3142: RAISE NO_DATA_FOUND;

Line 3257: x_return_status := FND_API.G_RET_STS_ERROR;

3253: IF PG_DEBUG in ('Y', 'C') THEN
3254: msc_sch_wb.atp_debug('Schedule: ' || 'atp check fails in future case');
3255: END IF;
3256: --2741997
3257: x_return_status := FND_API.G_RET_STS_ERROR;
3258: l_atp_rec.error_code := l_future_atp_rec.Error_code;
3259: l_atp_table.Error_Code(i):= l_atp_rec.Error_Code;
3260: RAISE NO_DATA_FOUND;
3261: END IF;

Line 3424: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3420:
3421: IF l_ctp_parent_peg_id.count > 0 then
3422: --Remove pegging and s/d inventory item id is negative.
3423: MSC_ATP_DB_UTILS.Delete_SD_Rec(l_ctp_parent_peg_id,l_return_status);
3424: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3425: IF PG_DEBUG in ('Y', 'C') THEN
3426: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Delete_SD_Rec');
3427: END IF;
3428: END IF;

Line 3439: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3435:
3436: IF l_steal_atp_peg_id.count > 0 and MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' then
3437: --Remove stealing records/pegging
3438: MSC_ATP_DB_UTILS.Delete_SD_Rec(l_steal_atp_peg_id,l_return_status);
3439: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3440: IF PG_DEBUG in ('Y', 'C') THEN
3441: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Delete_SD_Rec');
3442: END IF;
3443: END IF;

Line 3474: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3470: msc_sch_wb.atp_debug('Schedule: ' || 'G_FW_STEAL_PEGGING_ID ' || G_FW_STEAL_PEGGING_ID(i));
3471: END IF;
3472: IF G_FW_STEAL_PEGGING_ID(i) is not null THEN
3473: MSC_ATP_DB_UTILS.Hide_SD_Rec(G_FW_STEAL_PEGGING_ID(i),l_return_status);
3474: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3475: IF PG_DEBUG in ('Y', 'C') THEN
3476: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Hide_SD_Rec');
3477: END IF;
3478: END IF;

Line 3491: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3487: END IF;
3488: IF G_FW_CTP_PEGGING_ID(i) is not null THEN
3489: --Hide the CTP records with -1*inventory_item_id
3490: MSC_ATP_DB_UTILS.Hide_SD_Rec(G_FW_CTP_PEGGING_ID(i),l_return_status);
3491: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3492: IF PG_DEBUG in ('Y', 'C') THEN
3493: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Hide_SD_Rec');
3494: END IF;
3495: END IF;

Line 3611: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3607:
3608: IF l_ctp_parent_peg_id.count > 0 then
3609: --Restore the details from pegging, org is negative
3610: MSC_ATP_DB_UTILS.Restore_SD_Rec(l_ctp_parent_peg_id,l_return_status);
3611: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3612: IF PG_DEBUG in ('Y', 'C') THEN
3613: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Restore_SD_Rec');
3614: END IF;
3615: END IF;

Line 3626: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3622: END IF;
3623:
3624: IF l_steal_atp_peg_id.count > 0 AND MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y' THEN
3625: MSC_ATP_DB_UTILS.Restore_SD_Rec(l_steal_atp_peg_id,l_return_status);
3626: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3627: IF PG_DEBUG in ('Y', 'C') THEN
3628: msc_sch_wb.atp_debug('Schedule: ' || 'Error occured in procedure Restore_SD_Rec');
3629: END IF;
3630: END IF;

Line 3666: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

3662: END IF;
3663: -- check the return status
3664: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR THEN
3665: l_atp_table.Error_Code(i):= MSC_ATP_PVT.OSS_SOURCING_ERROR;
3666: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3667: RAISE FND_API.G_EXC_ERROR;
3668: END IF;
3669:
3670: --bug 3328421: For past dues sales orders we start ATP check from first working

Line 3667: RAISE FND_API.G_EXC_ERROR;

3663: -- check the return status
3664: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR THEN
3665: l_atp_table.Error_Code(i):= MSC_ATP_PVT.OSS_SOURCING_ERROR;
3666: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3667: RAISE FND_API.G_EXC_ERROR;
3668: END IF;
3669:
3670: --bug 3328421: For past dues sales orders we start ATP check from first working
3671: -- day after sysdate as per shipping calender. Therefore, days late for request date type = ship

Line 4398: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

4394: END IF;
4395: IF l_ship_arrival_date_rec.demand_id is not null THEN
4396: IF (G_INV_CTP = 4)THEN
4397: MSC_ATP_DB_UTILS.Flush_Data_In_Pds(l_ship_arrival_date_rec, l_return_status);
4398: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4399: IF PG_DEBUG in ('Y', 'C') THEN
4400: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Pds procedure ');
4401: END IF;
4402: END IF;

Line 4405: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

4401: END IF;
4402: END IF;
4403: ELSE
4404: MSC_ATP_DB_UTILS.Flush_Data_In_Ods(l_ship_arrival_date_rec, l_return_status);
4405: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4406: IF PG_DEBUG in ('Y', 'C') THEN
4407: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Ods procedure ');
4408: END IF;
4409: END IF;

Line 4413: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

4409: END IF;
4410: END IF;
4411: END IF;
4412:
4413: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4414: IF PG_DEBUG in ('Y', 'C') THEN
4415: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Pds procedure ');
4416: END IF;
4417: RAISE FND_API.G_EXC_ERROR;

Line 4417: RAISE FND_API.G_EXC_ERROR;

4413: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
4414: IF PG_DEBUG in ('Y', 'C') THEN
4415: msc_sch_wb.atp_debug('Schedule: ' || 'Error in call to Flush_Data_In_Pds procedure ');
4416: END IF;
4417: RAISE FND_API.G_EXC_ERROR;
4418: END IF;
4419: END IF;
4420: /* ship_rec_cal changes end */
4421:

Line 5881: x_return_status := FND_API.G_RET_STS_ERROR;

5877:
5878: EXCEPTION
5879:
5880: WHEN NO_DATA_FOUND THEN
5881: x_return_status := FND_API.G_RET_STS_ERROR;
5882:
5883: -- Resetting global variables for additional issue encountered while bug 3295831
5884: IF PG_DEBUG in ('Y', 'C') THEN
5885: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

Line 6019: WHEN FND_API.G_EXC_ERROR THEN

6015:
6016: END IF; -- Bug 1661545
6017:
6018:
6019: WHEN FND_API.G_EXC_ERROR THEN
6020: x_return_status := FND_API.G_RET_STS_ERROR;
6021:
6022: -- Resetting global variables for additional issue encountered while bug 3295831
6023: IF PG_DEBUG in ('Y', 'C') THEN

Line 6020: x_return_status := FND_API.G_RET_STS_ERROR;

6016: END IF; -- Bug 1661545
6017:
6018:
6019: WHEN FND_API.G_EXC_ERROR THEN
6020: x_return_status := FND_API.G_RET_STS_ERROR;
6021:
6022: -- Resetting global variables for additional issue encountered while bug 3295831
6023: IF PG_DEBUG in ('Y', 'C') THEN
6024: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

Line 6169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

6165: IF PG_DEBUG in ('Y', 'C') THEN
6166: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
6167: msc_sch_wb.atp_debug('Schedule: Invalid Object Found. In it');
6168: END IF;
6169: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6170:
6171: -- Resetting global variables for additional issue encountered while bug 3295831
6172: IF PG_DEBUG in ('Y', 'C') THEN
6173: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

Line 6319: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

6315: IF PG_DEBUG in ('Y', 'C') THEN
6316: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
6317: msc_sch_wb.atp_debug('Schedule: ' || 'NO_MATCHING_DATE_IN_CAL');
6318: END IF;
6319: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6320:
6321: -- Resetting global variables for additional issue encountered while bug 3295831
6322: IF PG_DEBUG in ('Y', 'C') THEN
6323: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

Line 6469: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

6465: WHEN OTHERS THEN
6466: IF PG_DEBUG in ('Y', 'C') THEN
6467: msc_sch_wb.atp_debug('Schedule: ' || 'error := ' || sqlerrm);
6468: END IF;
6469: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
6470:
6471: -- Resetting global variables for additional issue encountered while bug 3295831
6472: IF PG_DEBUG in ('Y', 'C') THEN
6473: msc_sch_wb.atp_debug('Schedule: ' || 'Resetting G_INV_CTP and G_ALLOCATED_ATP' );

Line 6641: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

6637: END IF;
6638:
6639: -- Commented on 9/13/2001 by ngoel as this was causing subscript beyond count
6640: -- since exception wasn't trapped until Call_ATP_No_Commit.
6641: -- RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
6642: END Schedule;
6643:
6644:
6645: PROCEDURE ATP_Check (p_atp_record IN OUT NoCopy MRP_ATP_PVT.AtpRec,

Line 6911: x_return_status := FND_API.G_RET_STS_SUCCESS;

6907: msc_sch_wb.atp_debug('**********Begin ATP_Check Procedure************');
6908: END IF;
6909:
6910: -- initialize API return status to success
6911: x_return_status := FND_API.G_RET_STS_SUCCESS;
6912:
6913: -- initialize the error_code to ALLSUCCESS
6914: p_atp_record.error_code := ALLSUCCESS;
6915: IF PG_DEBUG in ('Y', 'C') THEN

Line 7003: RAISE FND_API.G_EXC_ERROR;

6999: IF ((p_atp_record.requested_ship_date IS NULL) and
7000: (p_atp_record.requested_arrival_date IS NULL)) THEN
7001:
7002: p_atp_record.error_code := NOREQ_DATE;
7003: RAISE FND_API.G_EXC_ERROR;
7004:
7005: ELSIF ((p_atp_record.requested_ship_date IS NOT NULL) and
7006: (p_atp_record.requested_arrival_date IS NOT NULL)) THEN
7007:

Line 7009: RAISE FND_API.G_EXC_ERROR;

7005: ELSIF ((p_atp_record.requested_ship_date IS NOT NULL) and
7006: (p_atp_record.requested_arrival_date IS NOT NULL)) THEN
7007:
7008: p_atp_record.error_code := ATP_MULTI_REQ_DATES;
7009: RAISE FND_API.G_EXC_ERROR;
7010: END IF;
7011: --bug3821358
7012: l_sys_next_date := MSC_CALENDAR.NEXT_WORK_DAY(p_atp_record.manufacturing_cal_code, -- use OMC
7013: p_atp_record.instance_id,

Line 7385: RAISE FND_API.G_EXC_ERROR;

7381:
7382: -- bug 1192311
7383: IF l_requested_ship_date is NULL THEN
7384: p_atp_record.error_code := ATP_INVALID_DATE;
7385: RAISE FND_API.G_EXC_ERROR;
7386: END IF;*/
7387:
7388: -- since we may have atp lead time specified for the item,
7389: -- we need to offset x working days from the the ship date.

Line 7738: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

7734: p_atp_record.demand_class,
7735: p_atp_record.atf_date,
7736: l_return_status
7737: );
7738: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
7739: IF PG_DEBUG in ('Y', 'C') THEN
7740: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Set_Alloc_Rule_Variables');
7741: END IF;
7742: RAISE FND_API.G_EXC_ERROR;

Line 7742: RAISE FND_API.G_EXC_ERROR;

7738: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
7739: IF PG_DEBUG in ('Y', 'C') THEN
7740: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Set_Alloc_Rule_Variables');
7741: END IF;
7742: RAISE FND_API.G_EXC_ERROR;
7743: END IF;
7744:
7745: IF l_requested_ship_date <= p_atp_record.atf_date THEN
7746: IF MSC_ATP_PVT.G_MEM_RULE_WITHIN_ATF = 'Y' THEN

Line 9256: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

9252: p_plan_id,
9253: l_demand_id,
9254: l_return_status
9255: );
9256: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9257: IF PG_DEBUG in ('Y', 'C') THEN
9258: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
9259: END IF;
9260: RAISE FND_API.G_EXC_ERROR;

Line 9260: RAISE FND_API.G_EXC_ERROR;

9256: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9257: IF PG_DEBUG in ('Y', 'C') THEN
9258: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
9259: END IF;
9260: RAISE FND_API.G_EXC_ERROR;
9261: END IF;
9262: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'
9263: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN
9264: update msc_alloc_demands

Line 9510: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

9506: p_plan_id,
9507: l_demand_id,
9508: l_return_status
9509: );
9510: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9511: IF PG_DEBUG in ('Y', 'C') THEN
9512: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
9513: END IF;
9514: RAISE FND_API.G_EXC_ERROR;

Line 9514: RAISE FND_API.G_EXC_ERROR;

9510: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9511: IF PG_DEBUG in ('Y', 'C') THEN
9512: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
9513: END IF;
9514: RAISE FND_API.G_EXC_ERROR;
9515: END IF;
9516: /* update atf date quantity */
9517: p_atp_record.atf_date_quantity := l_atp_insert_rec.atf_date_quantity;
9518: /* Reset l_atf_date_qty to 0*/

Line 9703: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

9699: p_plan_id,
9700: l_demand_id,
9701: l_return_status
9702: );
9703: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9704: IF PG_DEBUG in ('Y', 'C') THEN
9705: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
9706: END IF;
9707: RAISE FND_API.G_EXC_ERROR;

Line 9707: RAISE FND_API.G_EXC_ERROR;

9703: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
9704: IF PG_DEBUG in ('Y', 'C') THEN
9705: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
9706: END IF;
9707: RAISE FND_API.G_EXC_ERROR;
9708: END IF;
9709: ELSE
9710: update msc_alloc_demands
9711: set allocated_quantity = p_atp_record.requested_date_quantity + l_stealing_requested_date_qty

Line 10030: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

10026: p_atp_record.atf_date_quantity, -- --bug3397904 changed from NULL
10027: l_return_status,
10028: l_bkwd_pass_atf_date_qty --bug3397904
10029: );
10030: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
10031: IF PG_DEBUG in ('Y', 'C') THEN
10032: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');
10033: END IF;
10034: RAISE FND_API.G_EXC_ERROR;

Line 10034: RAISE FND_API.G_EXC_ERROR;

10030: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
10031: IF PG_DEBUG in ('Y', 'C') THEN
10032: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');
10033: END IF;
10034: RAISE FND_API.G_EXC_ERROR;
10035: END IF;
10036: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'
10037: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN
10038: update msc_alloc_demands

Line 10821: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS OR

10817: and record_type = 3;
10818:
10819: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
10820:
10821: ELSIF l_return_status <> FND_API.G_RET_STS_SUCCESS OR
10822: l_sources.source_type.count = 0 THEN
10823: -- no sources in supply chain bill, then we assume
10824: -- it has "make at" type
10825: IF PG_DEBUG in ('Y', 'C') THEN

Line 11461: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

11457: p_plan_id --bug3510475 same plan when
11458: --moving from one org to another
11459: );
11460:
11461: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
11462: IF PG_DEBUG in ('Y', 'C') THEN
11463: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
11464: END IF;
11465: x_return_status := FND_API.G_RET_STS_ERROR;

Line 11465: x_return_status := FND_API.G_RET_STS_ERROR;

11461: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
11462: IF PG_DEBUG in ('Y', 'C') THEN
11463: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
11464: END IF;
11465: x_return_status := FND_API.G_RET_STS_ERROR;
11466: RAISE FND_API.G_EXC_ERROR;
11467: END IF;
11468: /* time_phased_atp changes end*/
11469:

Line 11466: RAISE FND_API.G_EXC_ERROR;

11462: IF PG_DEBUG in ('Y', 'C') THEN
11463: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
11464: END IF;
11465: x_return_status := FND_API.G_RET_STS_ERROR;
11466: RAISE FND_API.G_EXC_ERROR;
11467: END IF;
11468: /* time_phased_atp changes end*/
11469:
11470: l_plan_info_rec := MSC_ATP_PVT.G_PLAN_INFO_REC;

Line 13005: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

13001: p_atp_record.children_type := l_atp_rec.children_type;
13002: END IF;
13003: END IF;
13004: -- check the return status
13005: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
13006: RAISE FND_API.G_EXC_ERROR;
13007: END IF;
13008:
13009: IF p_search = BACKWARD_SCHEDULING THEN

Line 13006: RAISE FND_API.G_EXC_ERROR;

13002: END IF;
13003: END IF;
13004: -- check the return status
13005: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
13006: RAISE FND_API.G_EXC_ERROR;
13007: END IF;
13008:
13009: IF p_search = BACKWARD_SCHEDULING THEN
13010: -- rajjain 01/29/03 Bug 2774827

Line 13676: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

13672: p_atp_record.error_code,
13673: l_return_status,
13674: p_plan_id );
13675:
13676: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
13677: IF PG_DEBUG in ('Y', 'C') THEN
13678: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
13679: END IF;
13680: x_return_status := FND_API.G_RET_STS_ERROR;

Line 13680: x_return_status := FND_API.G_RET_STS_ERROR;

13676: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
13677: IF PG_DEBUG in ('Y', 'C') THEN
13678: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
13679: END IF;
13680: x_return_status := FND_API.G_RET_STS_ERROR;
13681: RAISE FND_API.G_EXC_ERROR;
13682: END IF;
13683: --4501944
13684: END IF;

Line 13681: RAISE FND_API.G_EXC_ERROR;

13677: IF PG_DEBUG in ('Y', 'C') THEN
13678: msc_sch_wb.atp_debug('ATP_Check: ' || 'ATP Downtime');
13679: END IF;
13680: x_return_status := FND_API.G_RET_STS_ERROR;
13681: RAISE FND_API.G_EXC_ERROR;
13682: END IF;
13683: --4501944
13684: END IF;
13685:

Line 14069: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

14065: l_bill_seq_id,
14066: l_op_seq_id, --4570421
14067: l_return_status);
14068: -- check the return status
14069: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
14070: RAISE FND_API.G_EXC_ERROR;
14071: END IF;
14072: END IF;
14073: --s_cto_rearch

Line 14070: RAISE FND_API.G_EXC_ERROR;

14066: l_op_seq_id, --4570421
14067: l_return_status);
14068: -- check the return status
14069: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
14070: RAISE FND_API.G_EXC_ERROR;
14071: END IF;
14072: END IF;
14073: --s_cto_rearch
14074: IF MSC_ATP_PVT.G_INV_CTP = 4 THEN

Line 14374: FND_API.G_RET_STS_SUCCESS THEN

14370: l_return_status );
14371:
14372: -- check the return status
14373: IF l_return_status <>
14374: FND_API.G_RET_STS_SUCCESS THEN
14375: RAISE FND_API.G_EXC_ERROR;
14376: END IF;
14377: --optional_fw
14378: IF MSC_ATP_PVT.G_OPTIONAL_FW is not null THEN

Line 14375: RAISE FND_API.G_EXC_ERROR;

14371:
14372: -- check the return status
14373: IF l_return_status <>
14374: FND_API.G_RET_STS_SUCCESS THEN
14375: RAISE FND_API.G_EXC_ERROR;
14376: END IF;
14377: --optional_fw
14378: IF MSC_ATP_PVT.G_OPTIONAL_FW is not null THEN
14379: p_atp_record.error_code := ATP_REQ_DATE_FAIL;

Line 14429: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

14425: l_bill_seq_id,
14426: l_op_seq_id, --4570421
14427: l_return_status);
14428: -- check the return status
14429: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
14430: RAISE FND_API.G_EXC_ERROR;
14431: END IF;
14432: END IF;
14433:

Line 14430: RAISE FND_API.G_EXC_ERROR;

14426: l_op_seq_id, --4570421
14427: l_return_status);
14428: -- check the return status
14429: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
14430: RAISE FND_API.G_EXC_ERROR;
14431: END IF;
14432: END IF;
14433:
14434:

Line 14513: ELSIF l_return_status <>FND_API.G_RET_STS_SUCCESS THEN

14509: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR THEN
14510:
14511: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
14512:
14513: ELSIF l_return_status <>FND_API.G_RET_STS_SUCCESS THEN
14514: RAISE FND_API.G_EXC_ERROR;
14515: END IF;
14516: --optional_fw
14517: IF MSC_ATP_PVT.G_OPTIONAL_FW is not null THEN

Line 14514: RAISE FND_API.G_EXC_ERROR;

14510:
14511: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
14512:
14513: ELSIF l_return_status <>FND_API.G_RET_STS_SUCCESS THEN
14514: RAISE FND_API.G_EXC_ERROR;
14515: END IF;
14516: --optional_fw
14517: IF MSC_ATP_PVT.G_OPTIONAL_FW is not null THEN
14518: p_atp_record.error_code := ATP_REQ_DATE_FAIL;

Line 14722: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

14718: l_bill_seq_id,
14719: l_op_seq_id, --4570421
14720: l_return_status);
14721: -- check the return status
14722: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
14723: RAISE FND_API.G_EXC_ERROR;
14724: END IF;
14725: MSC_ATP_REQ.Get_Res_Requirements(
14726: p_atp_record.instance_id,

Line 14723: RAISE FND_API.G_EXC_ERROR;

14719: l_op_seq_id, --4570421
14720: l_return_status);
14721: -- check the return status
14722: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
14723: RAISE FND_API.G_EXC_ERROR;
14724: END IF;
14725: MSC_ATP_REQ.Get_Res_Requirements(
14726: p_atp_record.instance_id,
14727: p_plan_id,

Line 14755: FND_API.G_RET_STS_SUCCESS THEN

14751: l_return_status );
14752:
14753: -- check the return status
14754: IF l_return_status <>
14755: FND_API.G_RET_STS_SUCCESS THEN
14756: RAISE FND_API.G_EXC_ERROR;
14757: END IF;
14758:
14759: END IF;

Line 14756: RAISE FND_API.G_EXC_ERROR;

14752:
14753: -- check the return status
14754: IF l_return_status <>
14755: FND_API.G_RET_STS_SUCCESS THEN
14756: RAISE FND_API.G_EXC_ERROR;
14757: END IF;
14758:
14759: END IF;
14760:

Line 14845: FND_API.G_RET_STS_SUCCESS THEN

14841:
14842: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
14843:
14844: ELSIF l_return_status <>
14845: FND_API.G_RET_STS_SUCCESS THEN
14846: RAISE FND_API.G_EXC_ERROR;
14847: END IF;
14848:
14849: END IF;

Line 14846: RAISE FND_API.G_EXC_ERROR;

14842: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
14843:
14844: ELSIF l_return_status <>
14845: FND_API.G_RET_STS_SUCCESS THEN
14846: RAISE FND_API.G_EXC_ERROR;
14847: END IF;
14848:
14849: END IF;
14850:

Line 15075: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

15071: l_bill_seq_id,
15072: l_op_seq_id, --4570421
15073: l_return_status);
15074: -- check the return status
15075: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15076: RAISE FND_API.G_EXC_ERROR;
15077: END IF;
15078: MSC_ATP_REQ.Get_Res_Requirements(
15079: p_atp_record.instance_id,

Line 15076: RAISE FND_API.G_EXC_ERROR;

15072: l_op_seq_id, --4570421
15073: l_return_status);
15074: -- check the return status
15075: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15076: RAISE FND_API.G_EXC_ERROR;
15077: END IF;
15078: MSC_ATP_REQ.Get_Res_Requirements(
15079: p_atp_record.instance_id,
15080: p_plan_id,

Line 15110: FND_API.G_RET_STS_SUCCESS THEN

15106:
15107: -- check the return status
15108: -- Error Handling Changes krajan
15109: IF l_return_status <>
15110: FND_API.G_RET_STS_SUCCESS THEN
15111: RAISE FND_API.G_EXC_ERROR;
15112: END IF;
15113:
15114: IF PG_DEBUG in ('Y', 'C') THEN

Line 15111: RAISE FND_API.G_EXC_ERROR;

15107: -- check the return status
15108: -- Error Handling Changes krajan
15109: IF l_return_status <>
15110: FND_API.G_RET_STS_SUCCESS THEN
15111: RAISE FND_API.G_EXC_ERROR;
15112: END IF;
15113:
15114: IF PG_DEBUG in ('Y', 'C') THEN
15115: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_avail_assembly_qty = '||l_avail_assembly_qty);

Line 15237: FND_API.G_RET_STS_SUCCESS THEN

15233: IF l_return_status = MSC_ATP_PVT.CTO_OSS_ERROR THEN
15234:
15235: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
15236: ELSIF l_return_status <>
15237: FND_API.G_RET_STS_SUCCESS THEN
15238: RAISE FND_API.G_EXC_ERROR;
15239: END IF;
15240:
15241: IF PG_DEBUG in ('Y', 'C') THEN

Line 15238: RAISE FND_API.G_EXC_ERROR;

15234:
15235: RAISE MSC_ATP_PVT.INVALID_OSS_SOURCE;
15236: ELSIF l_return_status <>
15237: FND_API.G_RET_STS_SUCCESS THEN
15238: RAISE FND_API.G_EXC_ERROR;
15239: END IF;
15240:
15241: IF PG_DEBUG in ('Y', 'C') THEN
15242: msc_sch_wb.atp_debug('ATP_Check: ' || 'l_atp_date_this_level ='||l_atp_date_this_level);

Line 15761: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

15757: p_plan_id,
15758: l_demand_id,
15759: l_return_status
15760: );
15761: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15762: IF PG_DEBUG in ('Y', 'C') THEN
15763: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
15764: END IF;
15765: RAISE FND_API.G_EXC_ERROR;

Line 15765: RAISE FND_API.G_EXC_ERROR;

15761: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15762: IF PG_DEBUG in ('Y', 'C') THEN
15763: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
15764: END IF;
15765: RAISE FND_API.G_EXC_ERROR;
15766: END IF;
15767: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'
15768: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN
15769:

Line 15888: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

15884: p_plan_id,
15885: l_demand_id,
15886: l_return_status
15887: );
15888: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15889: IF PG_DEBUG in ('Y', 'C') THEN
15890: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
15891: END IF;
15892: RAISE FND_API.G_EXC_ERROR;

Line 15892: RAISE FND_API.G_EXC_ERROR;

15888: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15889: IF PG_DEBUG in ('Y', 'C') THEN
15890: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Increment_Bucketed_Demands_Qty');
15891: END IF;
15892: RAISE FND_API.G_EXC_ERROR;
15893: END IF;
15894: END IF;
15895: ELSE
15896: -- if this is the top node, we need to turn on a flag so

Line 15979: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

15975: p_atp_record.quantity_ordered,
15976: p_atp_record.combined_requested_date_qty,
15977: l_return_status
15978: );
15979: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15980: IF PG_DEBUG in ('Y', 'C') THEN
15981: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Update_PF_Bucketed_Demands');
15982: END IF;
15983: RAISE FND_API.G_EXC_ERROR;

Line 15983: RAISE FND_API.G_EXC_ERROR;

15979: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
15980: IF PG_DEBUG in ('Y', 'C') THEN
15981: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Update_PF_Bucketed_Demands');
15982: END IF;
15983: RAISE FND_API.G_EXC_ERROR;
15984: END IF;
15985: --alloc_pp
15986: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'
15987: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN

Line 16148: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

16144: NULL, -- pass atf_date_qty as null
16145: l_return_status,
16146: NULL --bug3397904
16147: );
16148: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
16149: IF PG_DEBUG in ('Y', 'C') THEN
16150: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');
16151: END IF;
16152: RAISE FND_API.G_EXC_ERROR;

Line 16152: RAISE FND_API.G_EXC_ERROR;

16148: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
16149: IF PG_DEBUG in ('Y', 'C') THEN
16150: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error occured in procedure Move_PF_Bucketed_Demands');
16151: END IF;
16152: RAISE FND_API.G_EXC_ERROR;
16153: END IF;
16154: --alloc_pp
16155: ELSIF MSC_ATP_PVT.G_INV_CTP = 4 and MSC_ATP_PVT.G_ALLOCATED_ATP = 'Y'
16156: AND MSC_ATP_PVT.G_HIERARCHY_PROFILE = 1 AND MSC_ATP_PVT.G_ALLOCATION_METHOD = 1 THEN

Line 16980: WHEN FND_API.G_EXC_ERROR THEN

16976: END IF;
16977: p_atp_record.error_code := MSC_ATP_PVT.ATP_ITEM_NOT_COLLECTED;
16978: x_return_status := MSC_ATP_PVT.G_ATO_UNCOLL_ITEM;
16979:
16980: WHEN FND_API.G_EXC_ERROR THEN
16981: IF PG_DEBUG in ('Y', 'C') THEN
16982: msc_sch_wb.atp_debug('something wrong in the ATP_Check 1');
16983: END IF;
16984: x_return_status := FND_API.G_RET_STS_ERROR;

Line 16984: x_return_status := FND_API.G_RET_STS_ERROR;

16980: WHEN FND_API.G_EXC_ERROR THEN
16981: IF PG_DEBUG in ('Y', 'C') THEN
16982: msc_sch_wb.atp_debug('something wrong in the ATP_Check 1');
16983: END IF;
16984: x_return_status := FND_API.G_RET_STS_ERROR;
16985: IF PG_DEBUG in ('Y', 'C') THEN
16986: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for G_EXC_ERROR');
16987: msc_sch_wb.atp_debug('ATP_Check: ' || 'Error := ' || SQLerrm);
16988: END IF;

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

16991: IF PG_DEBUG in ('Y', 'C') THEN
16992: msc_sch_wb.atp_debug('MAtching cal date not found, in atp_check');
16993: END IF;
16994: p_atp_record.error_code := NO_MATCHING_CAL_DATE;
16995: --x_return_status := FND_API.G_RET_STS_ERROR; --bug3583705
16996: RAISE NO_MATCHING_DATE_IN_CAL;
16997:
16998: /************ Bug 1510853 ATP Rule Check ************/
16999: WHEN EXC_NO_ATP_RULE THEN

Line 17004: x_return_status := FND_API.G_RET_STS_ERROR;

17000: IF PG_DEBUG in ('Y', 'C') THEN
17001: msc_sch_wb.atp_debug('No ATP Rule for Item and Org., in atp_check');
17002: END IF;
17003: p_atp_record.error_code := ATP_BAD_RULE;
17004: x_return_status := FND_API.G_RET_STS_ERROR;
17005:
17006: -- Error Handling Modifications
17007: WHEN MSC_ATP_PUB.ATP_INVALID_OBJECTS_FOUND THEN
17008: IF PG_DEBUG in ('Y', 'C') THEN

Line 17013: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

17009: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
17010: msc_sch_wb.atp_debug('ATP_Check: Invalid Objects found, sqlcode= '||sqlcode);
17011: END IF;
17012:
17013: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
17014: IF (p_atp_record.error_code IS NULL) or (p_atp_record.error_code IN (0,61,150)) THEN
17015: p_atp_record.error_code := ATP_INVALID_OBJECTS;
17016: END IF;
17017: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN

Line 17029: x_return_status := FND_API.G_RET_STS_ERROR;

17025: IF PG_DEBUG in ('Y', 'C') THEN
17026: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
17027: END IF;
17028: p_atp_record.error_code := INVALID_ALLOC_PROFILE_SETUP;
17029: x_return_status := FND_API.G_RET_STS_ERROR;
17030:
17031: WHEN OTHERS THEN
17032: IF PG_DEBUG in ('Y', 'C') THEN
17033: msc_sch_wb.atp_debug('ATP_CHECK: IN Error block for OTHERS');

Line 17038: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

17034: msc_sch_wb.atp_debug('ATP_Check: ' || 'error := ' || sqlerrm);
17035: msc_sch_wb.atp_debug('something wrong in the ATP_Check 2, sqlcode= '||sqlcode);
17036: END IF;
17037:
17038: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
17039:
17040: /* Check if this is actually coming from a calendar routine*/
17041: l_encoded_text := fnd_message.GET_ENCODED;
17042: IF l_encoded_text IS NULL THEN

Line 17071: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

17067:
17068: IF l_msg_app='MRP' AND l_msg_name='GEN-DATE OUT OF BOUNDS' THEN
17069: RAISE NO_MATCHING_DATE_IN_CAL;
17070: ELSE
17071: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
17072: END IF;
17073: END ATP_Check;
17074:
17075:

Line 17217: x_return_status := FND_API.G_RET_STS_SUCCESS;

17213:
17214: G_TIME_PHASED_SET := 'N'; -- For summary enhancement
17215:
17216: -- initialize API return status to success
17217: x_return_status := FND_API.G_RET_STS_SUCCESS;
17218:
17219: -- Bug 2356892
17220: IF PG_DEBUG in ('Y', 'C') THEN
17221: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Check_CTO: G_INV_CTP : '||G_INV_CTP);

Line 17312: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

17308: IF PG_DEBUG in ('Y', 'C') THEN --3720018
17309: msc_sch_wb.atp_debug('Call_Schedule: l_return_status: ' || l_return_status);
17310: msc_sch_wb.atp_debug('Call_Schedule: l_delete_atp_rec.error_code(1): ' || l_delete_atp_rec.error_code(1));
17311: END IF;
17312: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
17313: IF PG_DEBUG in ('Y', 'C') THEN
17314: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error in Call_delete_row');
17315: END IF;
17316: x_return_status := FND_API.G_RET_STS_ERROR;

Line 17316: x_return_status := FND_API.G_RET_STS_ERROR;

17312: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
17313: IF PG_DEBUG in ('Y', 'C') THEN
17314: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error in Call_delete_row');
17315: END IF;
17316: x_return_status := FND_API.G_RET_STS_ERROR;
17317: RAISE FND_API.G_EXC_ERROR;
17318: END IF;
17319: IF (l_delete_atp_rec.error_code(1) = MSC_ATP_PVT.TRY_ATP_LATER) OR
17320: (l_delete_atp_rec.error_code(1) = MSC_ATP_PVT.SUMM_CONC_PROG_RUNNING) THEN

Line 17317: RAISE FND_API.G_EXC_ERROR;

17313: IF PG_DEBUG in ('Y', 'C') THEN
17314: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error in Call_delete_row');
17315: END IF;
17316: x_return_status := FND_API.G_RET_STS_ERROR;
17317: RAISE FND_API.G_EXC_ERROR;
17318: END IF;
17319: IF (l_delete_atp_rec.error_code(1) = MSC_ATP_PVT.TRY_ATP_LATER) OR
17320: (l_delete_atp_rec.error_code(1) = MSC_ATP_PVT.SUMM_CONC_PROG_RUNNING) THEN
17321: x_atp_table := p_atp_table;

Line 18152: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

18148: END IF;
18149: END LOOP;
18150:
18151: WHEN OTHERS THEN
18152: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
18153: /* Check if this is actually coming from a calendar routine*/
18154: l_encoded_text := fnd_message.GET_ENCODED;
18155: IF l_encoded_text IS NULL THEN
18156: l_msg_app := NULL;

Line 18265: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN

18261: -- Check if the Scheduling was successful. In case no, set the error code
18262: -- for all rows where its either success or atp_not_appl or null.
18263:
18264:
18265: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
18266:
18267: IF PG_DEBUG in ('Y', 'C') THEN
18268: msc_sch_wb.atp_debug('Call_Schedule: ' || 'inside return status error');
18269: END IF;

Line 18270: x_return_status := FND_API.G_RET_STS_ERROR;

18266:
18267: IF PG_DEBUG in ('Y', 'C') THEN
18268: msc_sch_wb.atp_debug('Call_Schedule: ' || 'inside return status error');
18269: END IF;
18270: x_return_status := FND_API.G_RET_STS_ERROR;
18271: k := l_atp_output_table.Calling_Module.First;
18272: FOR k in 1.. l_atp_output_table.Calling_Module.COUNT LOOP
18273: --l_atp_output_table.Group_Ship_Date(k):= l_group_date;
18274: IF (l_atp_output_table.Error_Code(k) = ALLSUCCESS) OR

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

18284: END IF; --IF l_set_fail_flag = 'Y' THEN
18285: -- rajjain 02/03/2003 Bug 2766713 End
18286: --4500382 Starts
18287: k := l_atp_output_table.action.FIRST;
18288: IF l_return_status = FND_API.G_RET_STS_SUCCESS and l_atp_output_table.action(k) <> 100
18289: and p_atp_table.part_of_set(k) = 'Y' and
18290: (l_atp_output_table.Error_Code(k) = ALLSUCCESS OR
18291: l_atp_output_table.error_code(k) = ATP_NOT_APPL OR
18292: l_atp_output_table.Error_Code(k) is NULL) THEN

Line 18890: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;

18886: WHEN OTHERS THEN
18887: IF PG_DEBUG in ('Y', 'C') THEN
18888: msc_sch_wb.atp_debug('Call_Schedule: ' || 'Error occured while selecting inventory_item_id : ' || sqlerrm);
18889: END IF;
18890: RAISE FND_API.G_EXC_UNEXPECTED_ERROR ;
18891: END;
18892:
18893: IF PG_DEBUG in ('Y', 'C') THEN
18894: msc_sch_wb.atp_debug('Call_Schedule: Inventory Item Id : ' || l_inventory_item_id);

Line 18979: x_return_status := FND_API.G_RET_STS_SUCCESS;

18975:
18976: BEGIN
18977: -- initialize API return status to success
18978:
18979: x_return_status := FND_API.G_RET_STS_SUCCESS;
18980: --bug3940999 setting debug mode explicitly so the messages can be printed
18981: IF p_atp_debug_flag IS NOT NULL THEN
18982: FND_PROFILE.put('MSC_ATP_DEBUG', p_atp_debug_flag);
18983: PG_DEBUG := p_atp_debug_flag;