DBA Data[Home] [Help]

PACKAGE: APPS.EAM_WB_UTILS

Source


1 PACKAGE EAM_WB_UTILS AUTHID CURRENT_USER AS
2 /* $Header: EAMWBUTS.pls 120.8.12020000.2 2013/01/30 12:38:13 srkotika ship $ */
3 
4   type t_WorkBenchIdTable is table of NUMBER index by binary_integer ;
5 
6   -- declare a PL/SQL table to record pm_forecast_id's
7   current_forecasts_index system.eam_wipid_tab_type;
8   current_forecasts_index2 t_WorkBenchIdTable;
9   current_forecasts t_WorkBenchIdTable;
10 
11   empty_id_list t_WorkBenchIdTable; -- to clear current_forecasts
12 
13   -- declare 2 PL/SQL tables to record wip_entity_id's
14   -- one fore Draft (not_ready under WPS), one for others
15   work_orders_not_ready t_WorkBenchIdTable;
16   work_orders_unreleased t_WorkBenchIdTable;
17   work_orders_released t_WorkBenchIdTable;
18 
19   -- processes for manipulating forecast table
20   procedure add_forecast(p_pm_forecast_id number);
21   procedure remove_forecast(p_pm_forecast_id number);
22   procedure clear_forecasts;
23   function get_forecast_total return number;
24 
25   --  Procedure for autonomously converting work orders through concurrent P
26   procedure convert_work_orders(p_pm_group_id number,x_request_id OUT NOCOPY number);
27 
28   --  Procedure for autonomously converting work orders through WO Business Object API
29   procedure convert_work_orders2(p_pm_group_id number,
30                                  p_project_id IN NUMBER DEFAULT NULL,
31                                  p_task_id IN NUMBER DEFAULT NULL,
32                                  p_parent_wo_id IN NUMBER DEFAULT NULL,
33                                  p_planner_code IN NUMBER DEFAULT NULL, -- added for WO defaults ER
34                                  p_return_status OUT NOCOPY VARCHAR2,
35                                  p_msg OUT NOCOPY VARCHAR2);
36 
37   procedure convert_work_orders3(p_pm_group_id number,
38                                  p_project_id IN NUMBER DEFAULT NULL,
39                                  p_task_id IN NUMBER DEFAULT NULL,
40                                  p_parent_wo_id IN NUMBER DEFAULT NULL,
41                                  p_return_status OUT NOCOPY VARCHAR2,
42                                  p_msg OUT NOCOPY VARCHAR2);
43 
44   -- wrapper for autonomous commit in pm scheduler
45   function run_pm_scheduler(
46 			p_view_non_scheduled IN varchar2,
47 			p_start_date IN date,
48 			p_end_date IN date,
49 			p_org_id IN number,
50 			p_user_id IN number,
51 			p_stmt IN varchar2,
52 			p_setname_id IN number,
53 			p_combine_default IN varchar2) return number;
54 
55  -- wrapper for autonomous commit in pm scheduler
56   procedure run_pm_scheduler2(
57 			p_view_non_scheduled IN varchar2,
58 			p_start_date IN date,
59 			p_end_date IN date,
60 			p_org_id IN number,
61 			p_user_id IN number,
62 			p_stmt IN varchar2,
63 			p_setname_id IN number,
64 			p_combine_default IN varchar2,
65             p_forecast_set_id IN number,
66 	    p_source IN varchar2);
67 
68   -- clear eam_forecasted_work_orders table before exiting form
69   procedure clear_forecasted_work_orders(p_group_id number);
70 
71   -- processes for manipulating work order tables
72   procedure add_work_order(p_wip_entity_id number,wo_type number);
73   procedure remove_work_order(p_wip_entity_id number,wo_type number);
74   procedure clear_work_orders;
75 procedure clear_released_work_orders;
76   function get_work_order_total return number;
77     function get_work_order_release_total return number;
78 
79   --  Procedure for autonomously releasing work orders through concurrent P
80   --  when there are Draft work orders under WPS installed
81   procedure release_work_orders(p_group_id number,p_org_id number, p_auto_firm_flag varchar2);
82 
83   procedure complete_work_orders(p_org_id number);
84 
85   --function to check whether the previous sequnce suggesitions are implemnted or not.
86   FUNCTION check_previous_implements(p_pm_group_id number)
87   return boolean;
88 
89    --Function to return the default owning department
90  	   function  get_owning_dept_default(
91  	                                  p_organization_id         IN number,
92  	                                  p_maintenance_object_type IN number,
93  	                                  p_maintenance_object_id   IN number,
94  	                                  p_rebuild_item_id         IN number,
95  	                                  p_primary_item_id         IN number
96  	                                  )    return number;
97 
98 END eam_wb_utils;
99