DBA Data[Home] [Help]

APPS.AHL_LTP_RESRC_LEVL_PVT dependencies on AHL_DEBUG_PUB

Line 411: Ahl_Debug_Pub.enable_debug;

407:
408: -- Begin Processing
409:
410: -- Enable Debug (optional)
411: Ahl_Debug_Pub.enable_debug;
412:
413: -- ASSUMPTIONS:
414: -- A Task can appear only once for a given visit (ahl_visit_tasks_b)
415: -- A Department can have only one shift (ahl_department_shifts)

Line 446: Ahl_Debug_Pub.debug('Beginning Processing for Visit: ' || p_visit_id, 'LTP:Derive_Visit_Task_Times');

442: RAISE Fnd_Api.G_EXC_ERROR;
443: END IF;
444:
445: -- Call helper method to do the actual processing
446: Ahl_Debug_Pub.debug('Beginning Processing for Visit: ' || p_visit_id, 'LTP:Derive_Visit_Task_Times');
447: Derive_Task_Op_Times(
448: p_visit_id => p_visit_id,
449: p_start_time => p_start_time,
450: p_end_time => p_end_time,

Line 458: Ahl_Debug_Pub.debug('Completed Processing. Checking for errors', 'LTP:Derive_Visit_Task_Times');

454: x_visit_end_time => x_visit_end_time,
455: x_visit_end_hour => x_visit_end_hour,
456: x_visit_task_times_tbl => x_visit_task_times_tbl);
457:
458: Ahl_Debug_Pub.debug('Completed Processing. Checking for errors', 'LTP:Derive_Visit_Task_Times');
459: -- Check Error Message stack.
460: x_msg_count := Fnd_Msg_Pub.count_msg;
461: IF x_msg_count > 0 THEN
462: RAISE Fnd_Api.G_EXC_ERROR;

Line 478: Ahl_Debug_Pub.disable_debug;

474: p_encoded => Fnd_Api.g_false
475: );
476:
477: -- Disable debug (if enabled)
478: Ahl_Debug_Pub.disable_debug;
479: -- dbms_output.put_line('Exiting LTP:Derive_Visit_Task_Times');
480:
481: EXCEPTION
482: WHEN Fnd_Api.G_EXC_ERROR THEN

Line 624: Ahl_Debug_Pub.enable_debug;

620: -- Initialize API return status to success
621: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
622:
623: -- Enable Debug (optional)
624: Ahl_Debug_Pub.enable_debug;
625:
626: -- Begin Processing
627: -- dbms_output.put_line('Begin Processing');
628: -- Map Dept Name To Dept Id

Line 723: Ahl_Debug_Pub.debug('Completed Processing. Checking for errors', 'LTP');

719:
720: -- Assign output parameters with locally generated table
721: x_plan_rsrc_tbl := l_temp_rsrc_tbl;
722:
723: Ahl_Debug_Pub.debug('Completed Processing. Checking for errors', 'LTP');
724: -- Check Error Message stack.
725: x_msg_count := Fnd_Msg_Pub.count_msg;
726: IF x_msg_count > 0 THEN
727: RAISE Fnd_Api.G_EXC_ERROR;

Line 743: Ahl_Debug_Pub.disable_debug;

739: p_encoded => Fnd_Api.g_false
740: );
741:
742: -- Disable debug (if enabled)
743: Ahl_Debug_Pub.disable_debug;
744:
745: EXCEPTION
746: WHEN Fnd_Api.G_EXC_ERROR THEN
747: ROLLBACK TO Get_Plan_Resources_pvt;

Line 950: Ahl_Debug_Pub.enable_debug;

946: -- Initialize API return status to success
947: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
948:
949: -- Enable Debug (optional)
950: Ahl_Debug_Pub.enable_debug;
951:
952: -- Begin Processing
953:
954: -- yazhou 24Aug2005 starts

Line 1108: Ahl_Debug_Pub.debug('p_plan_id = ' || p_plan_id);

1104: CLOSE l_validate_plan_csr;
1105: END IF;
1106:
1107: -- dbms_output.put_line('p_plan_id = ' || p_plan_id);
1108: Ahl_Debug_Pub.debug('p_plan_id = ' || p_plan_id);
1109:
1110: -- Validate Dates
1111: IF (p_start_time IS NOT NULL AND p_end_time IS NOT NULL AND p_start_time > p_end_time) THEN
1112: Fnd_Message.Set_Name('AHL','AHL_LTP_STIME_GT_ETIME');

Line 1443: Ahl_Debug_Pub.disable_debug;

1439: p_encoded => Fnd_Api.g_false
1440: );
1441:
1442: -- Disable debug (if enabled)
1443: Ahl_Debug_Pub.disable_debug;
1444:
1445: EXCEPTION
1446: WHEN Fnd_Api.G_EXC_ERROR THEN
1447: ROLLBACK TO Get_Rsrc_Req_By_Period_pvt;

Line 1600: Ahl_Debug_Pub.enable_debug;

1596: -- Initialize API return status to success
1597: x_return_status := Fnd_Api.G_RET_STS_SUCCESS;
1598:
1599: -- Enable Debug (optional)
1600: Ahl_Debug_Pub.enable_debug;
1601:
1602: -- Begin Processing
1603: -- dbms_output.put_line('BEGIN Processing');
1604: -- Map Dept Name To Dept Id

Line 1685: Ahl_Debug_Pub.debug('before call filter l_tp_dtls_table.COUNT = ' || l_tp_dtls_table.COUNT);

1681: x_tp_dtls_tbl => l_tp_dtls_table, -- Table for Operation Time Period details
1682: x_visit_task_times_tbl => l_task_times_tbl);
1683:
1684: -- dbms_output.put_line('Completed Get_Plan_Tasks. Calling Filter_By_Resource');
1685: Ahl_Debug_Pub.debug('before call filter l_tp_dtls_table.COUNT = ' || l_tp_dtls_table.COUNT);
1686: Ahl_Debug_Pub.debug('p_resource_id = ' || p_resource_id);
1687: Ahl_Debug_Pub.debug('p_strat_time = ' || p_start_time);
1688: Ahl_Debug_Pub.debug('p_end_time = ' || p_end_time);
1689:

Line 1686: Ahl_Debug_Pub.debug('p_resource_id = ' || p_resource_id);

1682: x_visit_task_times_tbl => l_task_times_tbl);
1683:
1684: -- dbms_output.put_line('Completed Get_Plan_Tasks. Calling Filter_By_Resource');
1685: Ahl_Debug_Pub.debug('before call filter l_tp_dtls_table.COUNT = ' || l_tp_dtls_table.COUNT);
1686: Ahl_Debug_Pub.debug('p_resource_id = ' || p_resource_id);
1687: Ahl_Debug_Pub.debug('p_strat_time = ' || p_start_time);
1688: Ahl_Debug_Pub.debug('p_end_time = ' || p_end_time);
1689:
1690: -- Filter by the required resource and get quantity

Line 1687: Ahl_Debug_Pub.debug('p_strat_time = ' || p_start_time);

1683:
1684: -- dbms_output.put_line('Completed Get_Plan_Tasks. Calling Filter_By_Resource');
1685: Ahl_Debug_Pub.debug('before call filter l_tp_dtls_table.COUNT = ' || l_tp_dtls_table.COUNT);
1686: Ahl_Debug_Pub.debug('p_resource_id = ' || p_resource_id);
1687: Ahl_Debug_Pub.debug('p_strat_time = ' || p_start_time);
1688: Ahl_Debug_Pub.debug('p_end_time = ' || p_end_time);
1689:
1690: -- Filter by the required resource and get quantity
1691: Filter_By_Resource(

Line 1688: Ahl_Debug_Pub.debug('p_end_time = ' || p_end_time);

1684: -- dbms_output.put_line('Completed Get_Plan_Tasks. Calling Filter_By_Resource');
1685: Ahl_Debug_Pub.debug('before call filter l_tp_dtls_table.COUNT = ' || l_tp_dtls_table.COUNT);
1686: Ahl_Debug_Pub.debug('p_resource_id = ' || p_resource_id);
1687: Ahl_Debug_Pub.debug('p_strat_time = ' || p_start_time);
1688: Ahl_Debug_Pub.debug('p_end_time = ' || p_end_time);
1689:
1690: -- Filter by the required resource and get quantity
1691: Filter_By_Resource(
1692: p_resource_id => p_resource_id,

Line 1699: Ahl_Debug_Pub.debug('l_tp_dtls_tablafter filter = ' || l_tp_dtls_table.COUNT);

1695: p_x_tp_dtls_tbl => l_tp_dtls_table);
1696:
1697: -- dbms_output.put_line('l_tp_dtls_table.COUNT = ' || l_tp_dtls_table.COUNT);
1698:
1699: Ahl_Debug_Pub.debug('l_tp_dtls_tablafter filter = ' || l_tp_dtls_table.COUNT);
1700:
1701: -- Sort By Visit, Task
1702: Sort_By_Visit_Task(l_tp_dtls_table);
1703:

Line 1704: Ahl_Debug_Pub.debug('after sort by visit = ' || l_tp_dtls_table.COUNT);

1700:
1701: -- Sort By Visit, Task
1702: Sort_By_Visit_Task(l_tp_dtls_table);
1703:
1704: Ahl_Debug_Pub.debug('after sort by visit = ' || l_tp_dtls_table.COUNT);
1705:
1706: -- Aggregate task quantities and get visit and task names into output table
1707: Aggregate_Task_Quantities(p_resource_id,p_org_name, p_dept_name, l_tp_dtls_table, x_task_req_tbl);
1708:

Line 1709: Ahl_Debug_Pub.debug('x_task_req_tbl.COUNT = ' || x_task_req_tbl.COUNT);

1705:
1706: -- Aggregate task quantities and get visit and task names into output table
1707: Aggregate_Task_Quantities(p_resource_id,p_org_name, p_dept_name, l_tp_dtls_table, x_task_req_tbl);
1708:
1709: Ahl_Debug_Pub.debug('x_task_req_tbl.COUNT = ' || x_task_req_tbl.COUNT);
1710:
1711: -- dbms_output.put_line('x_task_req_tbl.COUNT = ' || x_task_req_tbl.COUNT);
1712: Ahl_Debug_Pub.debug('Completed Processing. Checking FOR errors', 'LTP');
1713: -- Check Error Message stack.

Line 1712: Ahl_Debug_Pub.debug('Completed Processing. Checking FOR errors', 'LTP');

1708:
1709: Ahl_Debug_Pub.debug('x_task_req_tbl.COUNT = ' || x_task_req_tbl.COUNT);
1710:
1711: -- dbms_output.put_line('x_task_req_tbl.COUNT = ' || x_task_req_tbl.COUNT);
1712: Ahl_Debug_Pub.debug('Completed Processing. Checking FOR errors', 'LTP');
1713: -- Check Error Message stack.
1714: x_msg_count := Fnd_Msg_Pub.count_msg;
1715: IF x_msg_count > 0 THEN
1716: RAISE Fnd_Api.G_EXC_ERROR;

Line 1732: Ahl_Debug_Pub.disable_debug;

1728: p_encoded => Fnd_Api.g_false
1729: );
1730:
1731: -- Disable debug (if enabled)
1732: Ahl_Debug_Pub.disable_debug;
1733:
1734: EXCEPTION
1735: WHEN Fnd_Api.G_EXC_ERROR THEN
1736: ROLLBACK TO Get_Task_Requirements_pvt;

Line 2053: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS MR ID:'||x_visit_task_times_tbl(i).mr_route_id);

2049: IF x_visit_task_times_tbl.COUNT >0 THEN
2050: FOR i IN x_visit_task_times_tbl.FIRST..x_visit_task_times_tbl.LAST
2051: LOOP
2052: --
2053: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS MR ID:'||x_visit_task_times_tbl(i).mr_route_id);
2054: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS VTID:'||x_visit_task_times_tbl(i).visit_task_id);
2055: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS STIME:'||x_visit_task_times_tbl(i).task_start_time);
2056: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS ETIME:'||x_visit_task_times_tbl(i).task_end_time);
2057: null;

Line 2054: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS VTID:'||x_visit_task_times_tbl(i).visit_task_id);

2050: FOR i IN x_visit_task_times_tbl.FIRST..x_visit_task_times_tbl.LAST
2051: LOOP
2052: --
2053: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS MR ID:'||x_visit_task_times_tbl(i).mr_route_id);
2054: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS VTID:'||x_visit_task_times_tbl(i).visit_task_id);
2055: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS STIME:'||x_visit_task_times_tbl(i).task_start_time);
2056: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS ETIME:'||x_visit_task_times_tbl(i).task_end_time);
2057: null;
2058: --

Line 2055: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS STIME:'||x_visit_task_times_tbl(i).task_start_time);

2051: LOOP
2052: --
2053: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS MR ID:'||x_visit_task_times_tbl(i).mr_route_id);
2054: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS VTID:'||x_visit_task_times_tbl(i).visit_task_id);
2055: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS STIME:'||x_visit_task_times_tbl(i).task_start_time);
2056: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS ETIME:'||x_visit_task_times_tbl(i).task_end_time);
2057: null;
2058: --
2059: END LOOP;

Line 2056: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS ETIME:'||x_visit_task_times_tbl(i).task_end_time);

2052: --
2053: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS MR ID:'||x_visit_task_times_tbl(i).mr_route_id);
2054: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS VTID:'||x_visit_task_times_tbl(i).visit_task_id);
2055: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS STIME:'||x_visit_task_times_tbl(i).task_start_time);
2056: -- Ahl_Debug_Pub.debug('Exiting GET_PLAN_TASKS ETIME:'||x_visit_task_times_tbl(i).task_end_time);
2057: null;
2058: --
2059: END LOOP;
2060: END IF;

Line 2254: Ahl_Debug_Pub.debug('Invalid visit Id', 'LTP: Derive_Visit_Task_Times');

2250: IF(l_visit_details_csr%NOTFOUND) THEN
2251: Fnd_Message.Set_Name('AHL','AHL_LTP_VISIT_ID_NULL');
2252: Fnd_Msg_Pub.ADD;
2253: CLOSE l_visit_details_csr;
2254: Ahl_Debug_Pub.debug('Invalid visit Id', 'LTP: Derive_Visit_Task_Times');
2255: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
2256: END IF;
2257: CLOSE l_visit_details_csr;
2258:

Line 2429: Ahl_Debug_Pub.debug('Entering Get_Task_Resources, p_task_id = ' || p_task_id);

2425: l_qualified BOOLEAN;
2426: l_time_period_details_tbl Time_Period_Details_Tbl_Type;
2427: BEGIN
2428: -- dbms_output.put_line('Entering Get_Task_Resources, p_task_id = ' || p_task_id);
2429: Ahl_Debug_Pub.debug('Entering Get_Task_Resources, p_task_id = ' || p_task_id);
2430: Ahl_Debug_Pub.debug('Get_Task_Resources, p_x_task_rsrc_tbl.count = ' || p_x_task_rsrc_tbl.count);
2431: Ahl_Debug_Pub.debug('Get_Task_Resources, p_x_task_rsrc_tbl.STIME = ' || p_x_task_rsrc_tbl.count);
2432:
2433: OPEN l_get_route_csr(p_task_id);

Line 2430: Ahl_Debug_Pub.debug('Get_Task_Resources, p_x_task_rsrc_tbl.count = ' || p_x_task_rsrc_tbl.count);

2426: l_time_period_details_tbl Time_Period_Details_Tbl_Type;
2427: BEGIN
2428: -- dbms_output.put_line('Entering Get_Task_Resources, p_task_id = ' || p_task_id);
2429: Ahl_Debug_Pub.debug('Entering Get_Task_Resources, p_task_id = ' || p_task_id);
2430: Ahl_Debug_Pub.debug('Get_Task_Resources, p_x_task_rsrc_tbl.count = ' || p_x_task_rsrc_tbl.count);
2431: Ahl_Debug_Pub.debug('Get_Task_Resources, p_x_task_rsrc_tbl.STIME = ' || p_x_task_rsrc_tbl.count);
2432:
2433: OPEN l_get_route_csr(p_task_id);
2434: FETCH l_get_route_csr INTO l_mr_route_id,l_route_id;

Line 2431: Ahl_Debug_Pub.debug('Get_Task_Resources, p_x_task_rsrc_tbl.STIME = ' || p_x_task_rsrc_tbl.count);

2427: BEGIN
2428: -- dbms_output.put_line('Entering Get_Task_Resources, p_task_id = ' || p_task_id);
2429: Ahl_Debug_Pub.debug('Entering Get_Task_Resources, p_task_id = ' || p_task_id);
2430: Ahl_Debug_Pub.debug('Get_Task_Resources, p_x_task_rsrc_tbl.count = ' || p_x_task_rsrc_tbl.count);
2431: Ahl_Debug_Pub.debug('Get_Task_Resources, p_x_task_rsrc_tbl.STIME = ' || p_x_task_rsrc_tbl.count);
2432:
2433: OPEN l_get_route_csr(p_task_id);
2434: FETCH l_get_route_csr INTO l_mr_route_id,l_route_id;
2435: IF l_get_route_csr%NOTFOUND OR l_route_id IS NULL THEN

Line 2456: Ahl_Debug_Pub.debug('Get_Task_Resources, route id = ' || l_route_id);

2452: END IF;
2453: l_dept_id := NVL(l_vtdept_id,l_vdept_id);
2454: CLOSE l_get_dept_csr;
2455:
2456: Ahl_Debug_Pub.debug('Get_Task_Resources, route id = ' || l_route_id);
2457: --
2458: OPEN l_get_rt_resources_csr(l_route_id);
2459: FETCH l_get_rt_resources_csr INTO l_rt_resource_rec;
2460: --

Line 2468: Ahl_Debug_Pub.debug('Get_Task_Resources, aso resource id = ' || l_rt_resource_rec.ASO_RESOURCE_ID);

2464: l_qualified := TRUE;
2465: -- Get Route Resource Details
2466: IF (l_qualified) THEN
2467:
2468: Ahl_Debug_Pub.debug('Get_Task_Resources, aso resource id = ' || l_rt_resource_rec.ASO_RESOURCE_ID);
2469: -- Get bom resource id for the corresponding aso resource
2470: OPEN l_get_bom_resources_csr(l_rt_resource_rec.ASO_RESOURCE_ID,l_org_id);
2471: FETCH l_get_bom_resources_csr INTO l_bom_resource_id;
2472: IF l_get_bom_resources_csr%NOTFOUND THEN

Line 2481: Ahl_Debug_Pub.debug('ROUTE LEVEL, l_bom_resource_id = ' || l_bom_resource_id);

2477: -- RETURN;
2478: END IF;
2479: CLOSE l_get_bom_resources_csr;
2480: --
2481: Ahl_Debug_Pub.debug('ROUTE LEVEL, l_bom_resource_id = ' || l_bom_resource_id);
2482: Ahl_Debug_Pub.debug('ROUTE LEVEL, l_bom_org_id = ' || l_org_id);
2483: --
2484: Get_Resource_Details(
2485: p_required_capacity => p_required_capacity,

Line 2482: Ahl_Debug_Pub.debug('ROUTE LEVEL, l_bom_org_id = ' || l_org_id);

2478: END IF;
2479: CLOSE l_get_bom_resources_csr;
2480: --
2481: Ahl_Debug_Pub.debug('ROUTE LEVEL, l_bom_resource_id = ' || l_bom_resource_id);
2482: Ahl_Debug_Pub.debug('ROUTE LEVEL, l_bom_org_id = ' || l_org_id);
2483: --
2484: Get_Resource_Details(
2485: p_required_capacity => p_required_capacity,
2486: p_aso_resource_id => l_rt_resource_Rec.ASO_RESOURCE_ID,

Line 2493: Ahl_Debug_Pub.debug('Number of records for resources = ' ||p_x_task_rsrc_tbl.count);

2489: p_start_date => p_tstart_date,
2490: p_end_date => p_tend_date,
2491: p_x_task_rsrc_tbl => p_x_task_rsrc_tbl
2492: );
2493: Ahl_Debug_Pub.debug('Number of records for resources = ' ||p_x_task_rsrc_tbl.count);
2494: END IF;
2495: FETCH l_get_rt_resources_csr INTO l_rt_resource_rec;
2496: EXIT WHEN l_get_rt_resources_csr%NOTFOUND;
2497: END LOOP;

Line 2500: Ahl_Debug_Pub.debug('Get_Task_Resources, operation level route id = ' || l_route_id);

2496: EXIT WHEN l_get_rt_resources_csr%NOTFOUND;
2497: END LOOP;
2498: ELSE
2499:
2500: Ahl_Debug_Pub.debug('Get_Task_Resources, operation level route id = ' || l_route_id);
2501:
2502: -- Get resources from operation level
2503: OPEN l_get_oper_resources_csr(l_route_id);
2504: LOOP

Line 2511: Ahl_Debug_Pub.debug('Get_Task_Resources, aso resource id oper = ' || l_oper_resource_rec.ASO_RESOURCE_ID);

2507: l_qualified := TRUE;
2508: -- Get Route Resource Details
2509: IF (l_qualified) THEN
2510:
2511: Ahl_Debug_Pub.debug('Get_Task_Resources, aso resource id oper = ' || l_oper_resource_rec.ASO_RESOURCE_ID);
2512: Ahl_Debug_Pub.debug('inside, l_org_id = ' || l_org_id);
2513:
2514: -- Get bom resource id for the corresponding aso resource
2515: OPEN l_get_bom_resources_csr(l_oper_resource_rec.ASO_RESOURCE_ID,l_org_id);

Line 2512: Ahl_Debug_Pub.debug('inside, l_org_id = ' || l_org_id);

2508: -- Get Route Resource Details
2509: IF (l_qualified) THEN
2510:
2511: Ahl_Debug_Pub.debug('Get_Task_Resources, aso resource id oper = ' || l_oper_resource_rec.ASO_RESOURCE_ID);
2512: Ahl_Debug_Pub.debug('inside, l_org_id = ' || l_org_id);
2513:
2514: -- Get bom resource id for the corresponding aso resource
2515: OPEN l_get_bom_resources_csr(l_oper_resource_rec.ASO_RESOURCE_ID,l_org_id);
2516: FETCH l_get_bom_resources_csr INTO l_bom_resource_id;

Line 2518: Ahl_Debug_Pub.debug('OPERATION LEVEL, bom resource id oper = ' || l_bom_resource_id);

2514: -- Get bom resource id for the corresponding aso resource
2515: OPEN l_get_bom_resources_csr(l_oper_resource_rec.ASO_RESOURCE_ID,l_org_id);
2516: FETCH l_get_bom_resources_csr INTO l_bom_resource_id;
2517:
2518: Ahl_Debug_Pub.debug('OPERATION LEVEL, bom resource id oper = ' || l_bom_resource_id);
2519:
2520: IF l_get_bom_resources_csr%NOTFOUND THEN
2521: Fnd_Message.Set_Name('AHL','AHL_LTP_NO_BOM_RESRC_ID');
2522: Fnd_Msg_Pub.ADD;

Line 2538: Ahl_Debug_Pub.debug('Number of records for resources = ' ||p_x_task_rsrc_tbl.count);

2534: p_start_date => p_tstart_date,
2535: p_end_date => p_tend_date,
2536: p_x_task_rsrc_tbl => p_x_task_rsrc_tbl
2537: );
2538: Ahl_Debug_Pub.debug('Number of records for resources = ' ||p_x_task_rsrc_tbl.count);
2539: END IF;
2540: END LOOP;
2541: CLOSE l_get_oper_resources_csr;
2542: END IF;

Line 2600: Ahl_Debug_Pub.debug('enter get resource details p_bom_resource_id = ' || p_bom_resource_id);

2596: --
2597: l_table_index NUMBER := p_x_task_rsrc_tbl.COUNT + 1; -- 1 based index
2598:
2599: BEGIN
2600: Ahl_Debug_Pub.debug('enter get resource details p_bom_resource_id = ' || p_bom_resource_id);
2601: Ahl_Debug_Pub.debug('enter get resource details p_bom_department_id = ' || p_bom_department_id);
2602: Ahl_Debug_Pub.debug('get resource details l_table_index: = ' || l_table_index);
2603:
2604: IF (p_bom_resource_id IS NOT NULL) THEN

Line 2601: Ahl_Debug_Pub.debug('enter get resource details p_bom_department_id = ' || p_bom_department_id);

2597: l_table_index NUMBER := p_x_task_rsrc_tbl.COUNT + 1; -- 1 based index
2598:
2599: BEGIN
2600: Ahl_Debug_Pub.debug('enter get resource details p_bom_resource_id = ' || p_bom_resource_id);
2601: Ahl_Debug_Pub.debug('enter get resource details p_bom_department_id = ' || p_bom_department_id);
2602: Ahl_Debug_Pub.debug('get resource details l_table_index: = ' || l_table_index);
2603:
2604: IF (p_bom_resource_id IS NOT NULL) THEN
2605: -- BOM Resource

Line 2602: Ahl_Debug_Pub.debug('get resource details l_table_index: = ' || l_table_index);

2598:
2599: BEGIN
2600: Ahl_Debug_Pub.debug('enter get resource details p_bom_resource_id = ' || p_bom_resource_id);
2601: Ahl_Debug_Pub.debug('enter get resource details p_bom_department_id = ' || p_bom_department_id);
2602: Ahl_Debug_Pub.debug('get resource details l_table_index: = ' || l_table_index);
2603:
2604: IF (p_bom_resource_id IS NOT NULL) THEN
2605: -- BOM Resource
2606: p_x_task_rsrc_tbl(l_table_index).ASO_BOM_TYPE := G_BOM_RESOURCE;

Line 2638: Ahl_Debug_Pub.debug('get resource details p_capacity_units = ' || p_x_task_rsrc_tbl(l_table_index).CAPACITY_UNITS);

2634: ELSE
2635: p_x_task_rsrc_tbl(l_table_index).CAPACITY_UNITS := p_x_task_rsrc_tbl(l_table_index).CAPACITY_UNITS ;
2636: END IF;
2637:
2638: Ahl_Debug_Pub.debug('get resource details p_capacity_units = ' || p_x_task_rsrc_tbl(l_table_index).CAPACITY_UNITS);
2639: p_x_task_rsrc_tbl(l_table_index).RESOURCE_ID := p_aso_resource_id;
2640: --
2641: OPEN l_get_dept_desc_cur(p_bom_department_id);
2642: FETCH l_get_dept_desc_cur INTO l_department_code,

Line 3042: -- Ahl_Debug_Pub.debug('l_operation_id:'||l_operation_id);

3038: LOOP
3039: FETCH l_get_rt_oper_csr INTO l_operation_id, l_operation_step;
3040: EXIT WHEN l_get_rt_oper_csr%NOTFOUND;
3041:
3042: -- Ahl_Debug_Pub.debug('l_operation_id:'||l_operation_id);
3043: l_temp_duration := 0;
3044:
3045: IF (l_log_statement >= l_log_current_level) THEN
3046: fnd_log.string

Line 3454: Ahl_Debug_Pub.debug('No shift/calendar code for department: ' || p_dept_id, 'LTP: Create_Time_Periods');

3450: Fnd_Message.Set_Name('AHL','AHL_LTP_NO_SHIFT_FOR_DEPT');
3451: Fnd_Message.Set_Token('DEPT_ID', l_dept_name);
3452: Fnd_Msg_Pub.ADD;
3453: CLOSE l_dept_shift_csr;
3454: Ahl_Debug_Pub.debug('No shift/calendar code for department: ' || p_dept_id, 'LTP: Create_Time_Periods');
3455: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3456: END IF;
3457: CLOSE l_dept_shift_csr;
3458: -- dbms_output.put_line('L_CALENDAR_CODE := ' || L_CALENDAR_CODE);

Line 3469: Ahl_Debug_Pub.debug('No BOM_CALENDARS entry for calendar code: ' || L_CALENDAR_CODE, 'LTP: Create_Time_Periods');

3465: Fnd_Message.Set_Name('AHL','AHL_LTP_CAL_CODE_INVALID');
3466: Fnd_Message.Set_Token('CAL_CODE', L_CALENDAR_CODE);
3467: Fnd_Msg_Pub.ADD;
3468: CLOSE l_calendar_csr;
3469: Ahl_Debug_Pub.debug('No BOM_CALENDARS entry for calendar code: ' || L_CALENDAR_CODE, 'LTP: Create_Time_Periods');
3470: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3471: END IF;
3472: CLOSE l_calendar_csr;
3473: -- Truncate the date values

Line 3487: Ahl_Debug_Pub.debug('No Work Day Pattern for department: ' || p_dept_id, 'LTP: Create_Time_Periods');

3483: Fnd_Message.Set_Name('AHL','AHL_LTP_NO_PTRN_FOR_DEPT');
3484: Fnd_Message.Set_Token('DEPT_ID', l_dept_name);
3485: Fnd_Msg_Pub.ADD;
3486: CLOSE l_workday_pattern_csr;
3487: Ahl_Debug_Pub.debug('No Work Day Pattern for department: ' || p_dept_id, 'LTP: Create_Time_Periods');
3488: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3489: END IF;
3490: CLOSE l_workday_pattern_csr;
3491:

Line 3503: Ahl_Debug_Pub.debug('No shift start and end times for department: ' || p_dept_id, 'LTP: Create_Time_Periods');

3499: Fnd_Message.Set_Name('AHL','AHL_LTP_NO_SHIFT_FOR_DEPT');
3500: Fnd_Message.Set_Token('DEPT_ID', l_dept_name);
3501: Fnd_Msg_Pub.ADD;
3502: CLOSE l_shift_times_csr;
3503: Ahl_Debug_Pub.debug('No shift start and end times for department: ' || p_dept_id, 'LTP: Create_Time_Periods');
3504: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3505: END IF;
3506: CLOSE l_shift_times_csr;
3507: -- dbms_output.put_line('L_SHIFT_START := ' || L_SHIFT_START);

Line 3527: Ahl_Debug_Pub.debug('Computed date (' || l_temp_start|| ') is outside calendar range', 'LTP: Init_Time_Vars');

3523: -- Working Day: Check if day is in calendar range
3524: IF(l_temp_start > L_CAL_END) THEN
3525: Fnd_Message.Set_Name('AHL','AHL_LTP_INSUFFICIENT_CAL_RANGE');
3526: Fnd_Msg_Pub.ADD;
3527: Ahl_Debug_Pub.debug('Computed date (' || l_temp_start|| ') is outside calendar range', 'LTP: Init_Time_Vars');
3528: RAISE Fnd_Api.G_EXC_ERROR;
3529: END IF;
3530: l_working_day := TRUE;
3531: END IF; -- Not a holiday

Line 3574: Ahl_Debug_Pub.debug('Computed date (' || l_temp_start || ') is outside calendar range', 'LTP: Init_Time_Vars');

3570: -- Working Day: Check if day is in calendar range
3571: IF(l_temp_start > L_CAL_END) THEN
3572: Fnd_Message.Set_Name('AHL','AHL_LTP_INSUFFICIENT_CAL_RANGE');
3573: Fnd_Msg_Pub.ADD;
3574: Ahl_Debug_Pub.debug('Computed date (' || l_temp_start || ') is outside calendar range', 'LTP: Init_Time_Vars');
3575: RAISE Fnd_Api.G_EXC_ERROR;
3576: END IF;
3577: x_per_rsrc_tbl(l_temp_index).PERIOD_START := trunc(l_temp_start);
3578: -- //@@@@@ Remove Hardcoding

Line 3581: Ahl_Debug_Pub.debug('before create time day:'||p_UOM_code||x_per_rsrc_tbl(l_temp_index).PERIOD_STRING);

3577: x_per_rsrc_tbl(l_temp_index).PERIOD_START := trunc(l_temp_start);
3578: -- //@@@@@ Remove Hardcoding
3579: x_per_rsrc_tbl(l_temp_index).PERIOD_STRING := TO_CHAR(l_temp_start, 'DD-MM-YYYY');
3580:
3581: Ahl_Debug_Pub.debug('before create time day:'||p_UOM_code||x_per_rsrc_tbl(l_temp_index).PERIOD_STRING);
3582:
3583: -- yazhou 24Aug2005 starts
3584: -- Resource Leveling Re-design
3585:

Line 3774: Ahl_Debug_Pub.debug('enter aggtegate O'||p_org_name);

3770: IF (p_tp_dtls_table.COUNT = 0) THEN
3771: RETURN;
3772: END IF;
3773: --
3774: Ahl_Debug_Pub.debug('enter aggtegate O'||p_org_name);
3775: Ahl_Debug_Pub.debug('enter aggtegate D'||p_dept_name);
3776:
3777: --Get dept id
3778: OPEN l_get_dept_cur(p_dept_name,p_org_name);

Line 3775: Ahl_Debug_Pub.debug('enter aggtegate D'||p_dept_name);

3771: RETURN;
3772: END IF;
3773: --
3774: Ahl_Debug_Pub.debug('enter aggtegate O'||p_org_name);
3775: Ahl_Debug_Pub.debug('enter aggtegate D'||p_dept_name);
3776:
3777: --Get dept id
3778: OPEN l_get_dept_cur(p_dept_name,p_org_name);
3779: FETCH l_get_dept_cur INTO l_dept_id,l_org_id;

Line 3782: Ahl_Debug_Pub.debug('AFTER CURSOR aggtegate'||l_org_id);

3778: OPEN l_get_dept_cur(p_dept_name,p_org_name);
3779: FETCH l_get_dept_cur INTO l_dept_id,l_org_id;
3780: CLOSE l_get_dept_cur;
3781: --
3782: Ahl_Debug_Pub.debug('AFTER CURSOR aggtegate'||l_org_id);
3783: Ahl_Debug_Pub.debug('AFTER CURSOR aggtegate'||l_dept_id);
3784:
3785: --
3786: l_visit_id := p_tp_dtls_table(p_tp_dtls_table.FIRST).VISIT_ID;

Line 3783: Ahl_Debug_Pub.debug('AFTER CURSOR aggtegate'||l_dept_id);

3779: FETCH l_get_dept_cur INTO l_dept_id,l_org_id;
3780: CLOSE l_get_dept_cur;
3781: --
3782: Ahl_Debug_Pub.debug('AFTER CURSOR aggtegate'||l_org_id);
3783: Ahl_Debug_Pub.debug('AFTER CURSOR aggtegate'||l_dept_id);
3784:
3785: --
3786: l_visit_id := p_tp_dtls_table(p_tp_dtls_table.FIRST).VISIT_ID;
3787: l_task_id := p_tp_dtls_table(p_tp_dtls_table.FIRST).TASK_ID;

Line 3793: Ahl_Debug_Pub.debug('l_qty aggregate visit:'||l_qty);

3789: l_required_qty := p_tp_dtls_table(p_tp_dtls_table.FIRST).REQUIRED_UNITS;
3790: l_available_qty := Get_Available_Units(p_resource_id, l_dept_id);
3791:
3792:
3793: Ahl_Debug_Pub.debug('l_qty aggregate visit:'||l_qty);
3794: Ahl_Debug_Pub.debug('l_visit_id aggregate visit:'||l_visit_id);
3795: Ahl_Debug_Pub.debug('l_task_id aggregate visit:'||l_task_id);
3796:
3797: FOR i IN p_tp_dtls_table.FIRST .. p_tp_dtls_table.LAST LOOP

Line 3794: Ahl_Debug_Pub.debug('l_visit_id aggregate visit:'||l_visit_id);

3790: l_available_qty := Get_Available_Units(p_resource_id, l_dept_id);
3791:
3792:
3793: Ahl_Debug_Pub.debug('l_qty aggregate visit:'||l_qty);
3794: Ahl_Debug_Pub.debug('l_visit_id aggregate visit:'||l_visit_id);
3795: Ahl_Debug_Pub.debug('l_task_id aggregate visit:'||l_task_id);
3796:
3797: FOR i IN p_tp_dtls_table.FIRST .. p_tp_dtls_table.LAST LOOP
3798: IF (p_tp_dtls_table(i).VISIT_ID <> l_visit_id OR p_tp_dtls_table(i).TASK_ID <> l_task_id) THEN

Line 3795: Ahl_Debug_Pub.debug('l_task_id aggregate visit:'||l_task_id);

3791:
3792:
3793: Ahl_Debug_Pub.debug('l_qty aggregate visit:'||l_qty);
3794: Ahl_Debug_Pub.debug('l_visit_id aggregate visit:'||l_visit_id);
3795: Ahl_Debug_Pub.debug('l_task_id aggregate visit:'||l_task_id);
3796:
3797: FOR i IN p_tp_dtls_table.FIRST .. p_tp_dtls_table.LAST LOOP
3798: IF (p_tp_dtls_table(i).VISIT_ID <> l_visit_id OR p_tp_dtls_table(i).TASK_ID <> l_task_id) THEN
3799: -- New Visit Task: Update x_task_req_tbl

Line 3902: Ahl_Debug_Pub.debug('END Task quantites VISIT TASK:'||x_task_req_tbl(i).visit_task_name);

3898: IF x_task_req_tbl.COUNT > 0 THEN
3899: FOR i in x_task_req_tbl.FIRST..x_task_req_tbl.LAST
3900: LOOP
3901: --
3902: Ahl_Debug_Pub.debug('END Task quantites VISIT TASK:'||x_task_req_tbl(i).visit_task_name);
3903: Ahl_Debug_Pub.debug('END Task quantites REQUNITS:'||x_task_req_tbl(i).required_units);
3904: Ahl_Debug_Pub.debug('END Task quantites AUNITS:'||x_task_req_tbl(i).available_units);
3905: --
3906: END LOOP;

Line 3903: Ahl_Debug_Pub.debug('END Task quantites REQUNITS:'||x_task_req_tbl(i).required_units);

3899: FOR i in x_task_req_tbl.FIRST..x_task_req_tbl.LAST
3900: LOOP
3901: --
3902: Ahl_Debug_Pub.debug('END Task quantites VISIT TASK:'||x_task_req_tbl(i).visit_task_name);
3903: Ahl_Debug_Pub.debug('END Task quantites REQUNITS:'||x_task_req_tbl(i).required_units);
3904: Ahl_Debug_Pub.debug('END Task quantites AUNITS:'||x_task_req_tbl(i).available_units);
3905: --
3906: END LOOP;
3907: END IF;

Line 3904: Ahl_Debug_Pub.debug('END Task quantites AUNITS:'||x_task_req_tbl(i).available_units);

3900: LOOP
3901: --
3902: Ahl_Debug_Pub.debug('END Task quantites VISIT TASK:'||x_task_req_tbl(i).visit_task_name);
3903: Ahl_Debug_Pub.debug('END Task quantites REQUNITS:'||x_task_req_tbl(i).required_units);
3904: Ahl_Debug_Pub.debug('END Task quantites AUNITS:'||x_task_req_tbl(i).available_units);
3905: --
3906: END LOOP;
3907: END IF;
3908: --

Line 3941: Ahl_Debug_Pub.debug('Invalid route Id: ' || x_duration, 'LTP: Get_Route_Duration');

3937: Fnd_Message.Set_Name('AHL', 'AHL_LTP_ROUTE_ID_INVALID');
3938: Fnd_Message.Set_Token('ROUTE_ID', p_route_id);
3939: Fnd_Msg_Pub.ADD;
3940: CLOSE l_route_time_span_csr;
3941: Ahl_Debug_Pub.debug('Invalid route Id: ' || x_duration, 'LTP: Get_Route_Duration');
3942: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
3943: END IF;
3944: CLOSE l_route_time_span_csr;
3945:

Line 4102: Ahl_Debug_Pub.debug('No shift/calendar code for department: ' || p_department_id, 'LTP: Init_Time_Vars');

4098: Fnd_Message.Set_Name('AHL','AHL_LTP_NO_SHIFT_FOR_DEPT');
4099: Fnd_Message.Set_Token('DEPT_ID', l_dept_name);
4100: Fnd_Msg_Pub.ADD;
4101: CLOSE l_dept_shift_csr;
4102: Ahl_Debug_Pub.debug('No shift/calendar code for department: ' || p_department_id, 'LTP: Init_Time_Vars');
4103: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4104: END IF;
4105: CLOSE l_dept_shift_csr;
4106: -- dbms_output.put_line('G_CALENDAR_CODE := ' || G_CALENDAR_CODE);

Line 4117: Ahl_Debug_Pub.debug('No BOM_CALENDARS entry for calendar code: ' || G_CALENDAR_CODE, 'LTP: Init_Time_Vars');

4113: Fnd_Message.Set_Name('AHL','AHL_LTP_CAL_CODE_INVALID');
4114: Fnd_Message.Set_Token('CAL_CODE', G_CALENDAR_CODE);
4115: Fnd_Msg_Pub.ADD;
4116: CLOSE l_calendar_csr;
4117: Ahl_Debug_Pub.debug('No BOM_CALENDARS entry for calendar code: ' || G_CALENDAR_CODE, 'LTP: Init_Time_Vars');
4118: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4119: END IF;
4120: CLOSE l_calendar_csr;
4121: -- Truncate the date values

Line 4135: Ahl_Debug_Pub.debug('No shift start and end times for department: ' || p_department_id, 'LTP: Init_Time_Vars');

4131: Fnd_Message.Set_Name('AHL','AHL_LTP_NO_SHIFT_FOR_DEPT');
4132: Fnd_Message.Set_Token('DEPT_ID', l_dept_name);
4133: Fnd_Msg_Pub.ADD;
4134: CLOSE l_shift_times_csr;
4135: Ahl_Debug_Pub.debug('No shift start and end times for department: ' || p_department_id, 'LTP: Init_Time_Vars');
4136: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4137: END IF;
4138: CLOSE l_shift_times_csr;
4139: -- dbms_output.put_line('G_SHIFT_START := ' || G_SHIFT_START);

Line 4156: Ahl_Debug_Pub.debug('No Work Day Pattern for department: ' || p_department_id, 'LTP: Init_Time_Vars');

4152: Fnd_Message.Set_Name('AHL','AHL_LTP_NO_PTRN_FOR_DEPT');
4153: Fnd_Message.Set_Token('DEPT_ID', l_dept_name);
4154: Fnd_Msg_Pub.ADD;
4155: CLOSE l_workday_pattern_csr;
4156: Ahl_Debug_Pub.debug('No Work Day Pattern for department: ' || p_department_id, 'LTP: Init_Time_Vars');
4157: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4158: END IF;
4159: CLOSE l_workday_pattern_csr;
4160:

Line 4175: Ahl_Debug_Pub.debug('Visit start date is null', 'LTP: Init_Time_Vars');

4171:
4172: IF (p_visit_start_date IS NULL) THEN
4173: Fnd_Message.Set_Name('AHL','AHL_LTP_VISIT_ST_DATE_NULL');
4174: Fnd_Msg_Pub.ADD;
4175: Ahl_Debug_Pub.debug('Visit start date is null', 'LTP: Init_Time_Vars');
4176: RAISE Fnd_Api.G_EXC_ERROR;
4177: ELSIF (p_visit_start_date < G_CAL_START OR p_visit_start_date > G_CAL_END) THEN
4178: Fnd_Message.Set_Name('AHL','AHL_LTP_VISIT_ST_DATE_INVALID');
4179: Fnd_Message.Set_Token('VISIT_ST_DATE', p_visit_start_date);

Line 4181: Ahl_Debug_Pub.debug('Visit start date (' || p_visit_start_date || ') is outside calendar range', 'LTP: Init_Time_Vars');

4177: ELSIF (p_visit_start_date < G_CAL_START OR p_visit_start_date > G_CAL_END) THEN
4178: Fnd_Message.Set_Name('AHL','AHL_LTP_VISIT_ST_DATE_INVALID');
4179: Fnd_Message.Set_Token('VISIT_ST_DATE', p_visit_start_date);
4180: Fnd_Msg_Pub.ADD;
4181: Ahl_Debug_Pub.debug('Visit start date (' || p_visit_start_date || ') is outside calendar range', 'LTP: Init_Time_Vars');
4182: RAISE Fnd_Api.G_EXC_ERROR;
4183: END IF;
4184:
4185: --Code fixed by shbhanda on 21st Oct'02

Line 4190: Ahl_Debug_Pub.debug('Visit Start Date = ' ||l_visit_start_date );

4186: -- Ensure that the visit start date falls on a working day
4187: l_curr_wday_index := MOD((l_visit_start_date - G_CAL_START), (G_DAYS_ON + G_DAYS_OFF)) + 1;
4188: WHILE (l_curr_wday_index > G_DAYS_ON) LOOP
4189: -- Day Off
4190: Ahl_Debug_Pub.debug('Visit Start Date = ' ||l_visit_start_date );
4191: l_visit_start_date := l_visit_start_date + 1;
4192: l_curr_wday_index := MOD((l_visit_start_date - G_CAL_START), (G_DAYS_ON + G_DAYS_OFF)) + 1;
4193: Ahl_Debug_Pub.debug('Inside first while loop');
4194: END LOOP;

Line 4193: Ahl_Debug_Pub.debug('Inside first while loop');

4189: -- Day Off
4190: Ahl_Debug_Pub.debug('Visit Start Date = ' ||l_visit_start_date );
4191: l_visit_start_date := l_visit_start_date + 1;
4192: l_curr_wday_index := MOD((l_visit_start_date - G_CAL_START), (G_DAYS_ON + G_DAYS_OFF)) + 1;
4193: Ahl_Debug_Pub.debug('Inside first while loop');
4194: END LOOP;
4195:
4196: -- Not Day Off: Check if Holiday
4197: WHILE (IS_DEPT_Holiday(l_visit_start_date)) LOOP

Line 4198: Ahl_Debug_Pub.debug('Visit Start Date = ' ||l_visit_start_date );

4194: END LOOP;
4195:
4196: -- Not Day Off: Check if Holiday
4197: WHILE (IS_DEPT_Holiday(l_visit_start_date)) LOOP
4198: Ahl_Debug_Pub.debug('Visit Start Date = ' ||l_visit_start_date );
4199: l_visit_start_date := l_visit_start_date + 1;
4200: Ahl_Debug_Pub.debug('Inside second while loop');
4201: -- Holiday
4202: END LOOP;

Line 4200: Ahl_Debug_Pub.debug('Inside second while loop');

4196: -- Not Day Off: Check if Holiday
4197: WHILE (IS_DEPT_Holiday(l_visit_start_date)) LOOP
4198: Ahl_Debug_Pub.debug('Visit Start Date = ' ||l_visit_start_date );
4199: l_visit_start_date := l_visit_start_date + 1;
4200: Ahl_Debug_Pub.debug('Inside second while loop');
4201: -- Holiday
4202: END LOOP;
4203:
4204: -- Commented by shbhanda 21 Oct '02

Line 4212: Ahl_Debug_Pub.debug('Visit start date (' || p_visit_start_date || ') is not a working day', 'LTP: Init_Time_Vars');

4208: -- Day Off
4209: Fnd_Message.Set_Name('AHL','AHL_LTP_VISIT_ST_WDATE_INVALID');
4210: Fnd_Message.Set_Token('VISIT_ST_DATE', p_visit_start_date);
4211: Fnd_Msg_Pub.ADD;
4212: Ahl_Debug_Pub.debug('Visit start date (' || p_visit_start_date || ') is not a working day', 'LTP: Init_Time_Vars');
4213: RAISE Fnd_Api.G_EXC_ERROR;
4214: ELSE
4215: -- Not Day Off: Check if Holiday
4216: IF(IS_DEPT_Holiday(l_visit_start_date)) THEN

Line 4221: Ahl_Debug_Pub.debug('Visit start date (' || p_visit_start_date || ') is not a working day', 'LTP: Init_Time_Vars');

4217: -- Holiday
4218: Fnd_Message.Set_Name('AHL','AHL_LTP_VISIT_ST_WDATE_INVALID');
4219: Fnd_Message.Set_Token('VISIT_ST_DATE', p_visit_start_date);
4220: Fnd_Msg_Pub.ADD;
4221: Ahl_Debug_Pub.debug('Visit start date (' || p_visit_start_date || ') is not a working day', 'LTP: Init_Time_Vars');
4222: RAISE Fnd_Api.G_EXC_ERROR;
4223: END IF;
4224: END IF;*/
4225:

Line 4277: Ahl_Debug_Pub.debug('Computed date (' || l_curr_day || ') is outside calendar range', 'LTP: Init_Time_Vars');

4273: -- Working Day: Check if day is in calendar range
4274: IF(l_curr_day > G_CAL_END) THEN
4275: Fnd_Message.Set_Name('AHL','AHL_LTP_INSUFFICIENT_CAL_RANGE');
4276: Fnd_Msg_Pub.ADD;
4277: Ahl_Debug_Pub.debug('Computed date (' || l_curr_day || ') is outside calendar range', 'LTP: Init_Time_Vars');
4278: RAISE Fnd_Api.G_EXC_ERROR;
4279: END IF;
4280: */
4281: -- yazhou 24Aug2005 ends

Line 4368: Ahl_Debug_Pub.debug('No Shift for Resource: ' || p_resource_id, 'LTP: Resource_In_Duty');

4364: Fnd_Message.Set_Name('AHL','AHL_LTP_NO_SHIFT_FOR_RSRC');
4365: Fnd_Message.Set_Token('RSRC_ID', p_resource_id);
4366: Fnd_Msg_Pub.ADD;
4367: CLOSE l_shift_details_csr;
4368: Ahl_Debug_Pub.debug('No Shift for Resource: ' || p_resource_id, 'LTP: Resource_In_Duty');
4369: RAISE Fnd_Api.G_EXC_UNEXPECTED_ERROR;
4370: END IF;
4371: CLOSE l_shift_details_csr;
4372:

Line 4692: Ahl_Debug_Pub.debug('enter get available p_resource_id:'||p_resource_id);

4688:
4689: -- yazhou 24Aug2005 ends
4690:
4691: BEGIN
4692: Ahl_Debug_Pub.debug('enter get available p_resource_id:'||p_resource_id);
4693: Ahl_Debug_Pub.debug('enter get available p_dept_id:'||p_dept_id);
4694:
4695: --Get available units
4696: OPEN l_get_bom_rsrc_dtls_csr(p_resource_id,p_dept_id);

Line 4693: Ahl_Debug_Pub.debug('enter get available p_dept_id:'||p_dept_id);

4689: -- yazhou 24Aug2005 ends
4690:
4691: BEGIN
4692: Ahl_Debug_Pub.debug('enter get available p_resource_id:'||p_resource_id);
4693: Ahl_Debug_Pub.debug('enter get available p_dept_id:'||p_dept_id);
4694:
4695: --Get available units
4696: OPEN l_get_bom_rsrc_dtls_csr(p_resource_id,p_dept_id);
4697: FETCH l_get_bom_rsrc_dtls_csr INTO l_capacity_units,l_description;

Line 4704: Ahl_Debug_Pub.debug('Inside get available l_capacity_units:'||l_capacity_units);

4700: Fnd_Message.Set_Token('RES_ID', l_description);
4701: Fnd_Msg_Pub.ADD;
4702: END IF;
4703: CLOSE l_get_bom_rsrc_dtls_csr;
4704: Ahl_Debug_Pub.debug('Inside get available l_capacity_units:'||l_capacity_units);
4705:
4706: -- Get shift capacity
4707: OPEN l_get_shift_dtls_csr(p_resource_id,p_dept_id);
4708: FETCH l_get_shift_dtls_csr INTO l_shift_capacity;

Line 4711: Ahl_Debug_Pub.debug('Inside get available l_shift_capacity:'||l_shift_capacity);

4707: OPEN l_get_shift_dtls_csr(p_resource_id,p_dept_id);
4708: FETCH l_get_shift_dtls_csr INTO l_shift_capacity;
4709: CLOSE l_get_shift_dtls_csr;
4710:
4711: Ahl_Debug_Pub.debug('Inside get available l_shift_capacity:'||l_shift_capacity);
4712:
4713: IF l_shift_capacity IS NOT NULL THEN
4714: l_total_quantity := l_shift_capacity;
4715: ELSE

Line 4719: Ahl_Debug_Pub.debug('Inside get available l_total_quantity:'||l_total_quantity);

4715: ELSE
4716: l_total_quantity := l_capacity_units;
4717: END IF;
4718:
4719: Ahl_Debug_Pub.debug('Inside get available l_total_quantity:'||l_total_quantity);
4720:
4721: RETURN l_total_quantity;
4722:
4723: END Get_Available_Units;