1 PACKAGE gme_gantt_rsrc_pkg AS
2 /* $Header: GMEGNTRS.pls 120.3 2005/06/10 13:57:25 appldev $ */
3 TYPE plantresourcedetailtabletype IS TABLE OF VARCHAR2 (32000)
4 INDEX BY BINARY_INTEGER;
5
6 /**
7 * Select the available resources for the current organization and send them one by
8 * one to the gantt
9 */
10 PROCEDURE get_available_plant_resources (
11 p_organization_id IN NUMBER
12 ,x_nb_resources OUT NOCOPY NUMBER
13 ,x_plant_rsrc_tbl OUT NOCOPY plantresourcedetailtabletype);
14
15 TYPE reschbatchdetailtabletype IS TABLE OF VARCHAR2 (32000)
16 INDEX BY BINARY_INTEGER;
17
18 /**
19 * Fetch pending and WIP batches that consume the selected resource at the selected time.
20 */
21 PROCEDURE get_reschedule_batch_list (
22 p_organization_id IN NUMBER
23 ,p_resource IN VARCHAR2
24 ,p_from_date IN DATE
25 ,p_to_date IN DATE
26 ,x_nb_batches OUT NOCOPY NUMBER
27 ,x_resch_batch_tbl OUT NOCOPY reschbatchdetailtabletype);
28
29 TYPE resourcecoderectype IS RECORD (
30 resources VARCHAR2 (32)
31 );
32
33 TYPE resourcecodetabletype IS TABLE OF resourcecoderectype
34 INDEX BY BINARY_INTEGER;
35
36 TYPE resourceloadtabletype IS TABLE OF VARCHAR2 (32000)
37 INDEX BY BINARY_INTEGER;
38
39 TYPE batchid IS TABLE OF gme_batch_header.batch_id%TYPE;
40
41 TYPE batchno IS TABLE OF gme_batch_header.batch_no%TYPE;
42
43 TYPE batchtype IS TABLE OF gme_batch_header.batch_type%TYPE;
44
45 TYPE batchstatus IS TABLE OF gme_batch_header.batch_status%TYPE;
46
47 TYPE batchdate IS TABLE OF gme_batch_header.plan_start_date%TYPE;
48
49 TYPE enforcestepdep IS TABLE OF gme_batch_header.enforce_step_dependency%TYPE;
50
51 TYPE resdate IS TABLE OF gme_resource_txns_summary.start_date%TYPE;
52
53 TYPE rescount IS TABLE OF NUMBER;
54
55 TYPE rescode IS TABLE OF cr_rsrc_mst.resources%TYPE;
56
57 TYPE resdesc IS TABLE OF cr_rsrc_mst.resource_desc%TYPE;
58
59 /**
60 * Retrieve the resource load data (qty available and scheduled usage)
61 *
62 * 25FEB02 Eddie Oumerretane
63 * Bug # 1919745 Implemented the new resource load summary
64 * table GME_BATCH_STEP_RSRC_SUMMARY. Now resource load data
65 * is retrieved from this new table, replacing the
66 * GME_BATCH_STEP_RESOURCES table.
67 * 10OCT02 Eddie Oumerretane.
68 * Bug # 2565952 Replaced table GME_BATCH_STEP_RSRC_SUMMARY
69 * with GME_RESOURCE_TXNS_SUMMARY table.
70 */
71 PROCEDURE fetch_resource_load (
72 p_resource_code IN OUT NOCOPY VARCHAR2
73 ,p_organization_id IN NUMBER
74 ,p_from_date IN DATE
75 ,p_to_date IN DATE
76 ,x_resource_desc OUT NOCOPY VARCHAR2
77 ,x_resource_uom OUT NOCOPY VARCHAR2
78 ,x_nb_load_interval OUT NOCOPY NUMBER
79 ,x_nb_avail_interval OUT NOCOPY NUMBER
80 ,x_rsrc_avail_tbl OUT NOCOPY resourceloadtabletype
81 ,x_rsrc_load_tbl OUT NOCOPY resourceloadtabletype);
82 END;