1 PACKAGE BODY WPS_GANTT_UTILITIES AS
2 /* $Header: wpsgantb.pls 115.2 2002/11/01 01:24:33 jenchang noship $ */
3
4
5 /*
6 Procedure that populates the Resource Load by the time bucket
7 required in the Gantt Chart. For now we will not do bucketing by
8 any other time other than daily, but we should pass the bucket
9 information all the way down to the wip_prod_indicators do to the
10 summary before the insertion.
11 */
12
13 PROCEDURE Populate_Bucketed_Res_Load
14 (p_group_id IN NUMBER,
15 p_organization_id IN NUMBER,
16 p_department_id IN NUMBER,
17 p_resource_id IN NUMBER,
18 p_bucket_size IN NUMBER DEFAULT DAILY_BUCKET,
19 p_date_from IN DATE,
20 p_date_to IN DATE,
21 p_userid IN NUMBER,
22 p_applicationid IN NUMBER,
23 p_errnum OUT NOCOPY NUMBER,
24 p_errmesg OUT NOCOPY VARCHAR2 )
25 IS
26 Begin
27
28 /* This is a very simple wrapper routine provided
29 for the Gantt Chart */
30 Wip_Sfcb_Utilities.Populate_Resource_Load (
31 p_group_id => p_group_id,
32 p_organization_id => p_organization_id,
33 p_date_from => p_date_from,
34 p_date_to => p_date_to,
35 p_department_id => p_department_id,
36 p_resource_id => p_resource_id,
37 p_userid => p_userid,
38 p_applicationid => p_applicationid,
39 p_errnum => p_errnum,
40 p_errmesg => p_errmesg );
41
42 return ;
43
44 EXCEPTION
45 WHEN OTHERS THEN
46 fnd_file.put_line(fnd_file.log,'Failed in Resource Load phase of Gantt Utilities');
47 fnd_file.put_line(fnd_file.log, SQLCODE);
48 fnd_file.put_line(fnd_file.log,SQLERRM);
49 --dbms_output.put_line('Failed in Resource Load phase of Gantt Utilities');
50 --dbms_output.put_line(SQLCODE);
51 --dbms_output.put_line(SQLERRM);
52 p_errnum := -1 ;
53 p_errmesg := 'Failed in Resource Load Phase of Gantt Utilities' ;
54 return ;
55
56 End Populate_Bucketed_Res_Load;
57
58
59
60 /* Procedure that populates the resource availability into
61 MRP_NET_RESOURCE_AVAIL, this is used for getting the
62 continuous availability information
63 */
64
65 PROCEDURE Populate_Res_Availability
66 (p_group_id IN NUMBER,
67 p_organization_id IN NUMBER,
68 p_department_id IN NUMBER,
69 p_resource_id IN NUMBER,
70 p_date_from IN DATE,
71 p_date_to IN DATE,
72 p_userid IN NUMBER,
73 p_applicationid IN NUMBER,
74 p_errnum OUT NOCOPY NUMBER,
75 p_errmesg OUT NOCOPY VARCHAR2)
76 IS
77 Begin
78
79 Wip_Prod_Indicators.Calculate_Resource_Avail(
80 p_organization_id => p_organization_id,
81 p_date_from => p_date_from,
82 p_date_to => p_date_to,
83 p_department_id => p_department_id,
84 p_resource_id => p_resource_id,
85 p_errnum => p_errnum,
86 p_errmesg => p_errmesg
87 ) ;
88
89 return ;
90
91 EXCEPTION
92 WHEN OTHERS THEN
93 fnd_file.put_line(fnd_file.log,'Failed in Calculate Resource Avail phase of Gantt Utilities');
94 fnd_file.put_line(fnd_file.log, SQLCODE);
95 fnd_file.put_line(fnd_file.log,SQLERRM);
96 --dbms_output.put_line('Failed in Resource Avail phase of Gantt Utilities');
97 --dbms_output.put_line(SQLCODE);
98 --dbms_output.put_line(SQLERRM);
99 p_errnum := -1 ;
100 p_errmesg := 'Failed in Calculate Resource Avail Phase of Gantt Utilities';
101 return ;
102
103 End Populate_Res_Availability ;
104
105
106
107 END WPS_GANTT_UTILITIES ;