1 PACKAGE PA_Progress_Report_Utils AS
2 /* $Header: PAPRUTLS.pls 120.1 2005/08/19 16:45:29 mwasowic noship $ */
3 procedure Get_Report_Start_End_Dates(
4 P_Object_Type IN Varchar2,
5 P_Object_Id IN Number,
6 P_Report_Type_Id IN Number,
7 P_Reporting_Cycle_Id IN Number,
8 P_Reporting_Offset_Days IN Number,
9 P_Publish_Report IN Varchar2,
10 p_report_effective_from IN Date := NULL,
11 X_Report_Start_Date OUT NOCOPY Date, --File.Sql.39 bug 4440895
12 X_Report_End_Date OUT NOCOPY Date --File.Sql.39 bug 4440895
13 );
14
15 /************************************************************************
16 This function detremines the whether a particular action
17 is allowed or not on the progress report, based on the
18 system status of the progres report
19 IN PARAMETERS p_current_rep_status - Current user status code of the report
20 p_action - Action the user wants to perform.Possible values are
21 - 'REWORK'
22 - 'EDIT'
23 - 'SUBMIT'
24 - 'PUBLISH'
25 - 'CANCEL'
26 p_version_id - Version_id of the progress report
27 OUT PARAMETERS x_ret_code - Y ; if action allowed, N- Action not allowed
28 x_retun_status - Success or Failure status
29 x_msg_count - Exception message count
30 x_msg_data - Exception message
31 *************************************************************************/
32 Function check_action_allowed
33 (
34 p_current_rep_status IN VARCHAR2,
35 p_action_code IN VARCHAR2,
36 p_version_id IN NUMBER) RETURN VARCHAR2;
37 -- x_ret_code out varchar2,
38 -- x_return_status out varchar2,
39 -- x_msg_count out number,
40 -- x_msg_data out varchar2);
41
42
43 procedure Validate_Prog_Proj_Dates (p_project_id IN Number,
44 p_scheduled_st_date IN Date,
45 p_scheduled_ed_date IN Date,
46 p_estimated_st_date IN Date,
47 p_estimated_ed_date IN Date,
48 p_actual_st_date IN Date,
49 p_actual_ed_date IN Date,
50 p_percent_complete IN Number,
51 p_est_to_complete IN Number,
52 x_return_status OUT NOCOPY Varchar2, --File.Sql.39 bug 4440895
53 x_msg_count OUT NOCOPY Number, --File.Sql.39 bug 4440895
54 x_msg_data OUT NOCOPY Varchar2); --File.Sql.39 bug 4440895
55
56 PROCEDURE update_perccomplete
57 (
58 p_object_id NUMBER,
59 p_object_type VARCHAR2,
60 p_percent_complete NUMBER,
61 p_asof_date DATE,
62
63 x_return_status OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
64 x_msg_count OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
65 x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
66 ) ;
67
68 PROCEDURE is_template_editable
69 (
70 p_page_id NUMBER,
71
72 x_return_status OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
73 x_msg_count OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
74 x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
75 ) ;
76
77 FUNCTION progress_report_exists
78 (
79 p_object_id NUMBER,
80 p_object_type VARCHAR2
81 ) RETURN BOOLEAN;
82
83
84 PROCEDURE remove_progress_report_setup
85 (
86 p_object_id IN NUMBER := NULL,
87 p_object_type IN VARCHAR2 := NULL,
88
89 x_return_status OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
90 x_msg_count OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
91 x_msg_data OUT NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
92 ) ;
93
94 /* This is the function to get the page_id for the specified objcet of given
95 page type.The function will try to get the page id for the object in the
96 following order.
97 1. Find any page_id associted to the object_id.
98 Association exists at object level?
99 Yes - Use the page id associted at the object level
100 No -
101 2. Find the page associated at the project type level
102 Association exists?
103 Yes - Use the association at Project Type level.
104 No ?
105 3. Get the default page associated at the page type level
106 This is stored in attribute3 in fnd_lookup_values of
107 lookup_code='PA_PAGE_TYPES' and lookup_code = page_type_code
108 Each page type owners must seed a default layout for the page
109 and populate the attribute3 with that value.
110 If the defaulting logic is going to be different, plrease use your own
111 method to derive the page_id for the object.
112 */
113 FUNCTION get_object_page_id (
114 p_page_type_code IN varchar2,
115 p_object_type IN varchar2,
116 p_object_id IN NUMBER,
117 p_report_type_id IN NUMBER := null)
118 return number;
119
120 FUNCTION get_object_region (
121 p_object_type IN varchar2,
122 p_object_id IN NUMBER ,
123 p_placeholder_reg_code varchar2)
124 return varchar2;
125
126 FUNCTION pagelayout_exists
127 (
128 p_object_id NUMBER,
129 p_object_type VARCHAR2
130 ) RETURN BOOLEAN;
131
132 FUNCTION is_delete_page_layout_ok(
133 p_page_type_code IN varchar2,
134 p_object_type IN varchar2,
135 p_object_id IN NUMBER,
136 p_report_type_id IN NUMBER
137 )
138 RETURN VARCHAR2 ;
139
140 FUNCTION is_edit_page_layout_ok(
141 p_page_type_code IN varchar2,
142 p_object_type IN varchar2,
143 p_object_id IN NUMBER,
144 p_report_type_id IN NUMBER
145 )
146 RETURN VARCHAR2 ;
147
148 Function Check_Security_For_ProgRep(p_object_Type IN VARCHAR2,
149 p_object_Id IN NUMBER,
150 p_report_Type_id IN NUMBER,
151 p_Action IN VARCHAR) return VARCHAR2;
152
153 Function Check_Security_For_ProgRep(p_object_Type IN VARCHAR2,
154 p_object_Id IN NUMBER,
155 p_report_type_id IN NUMBER) return NUMBER;
156
157 Function is_cycle_ok_to_delete(p_reporting_cycle_id IN NUMBER) return varchar2;
158
159 Function get_latest_working_report_id(p_object_Type IN VARCHAR2,
160 p_object_Id IN NUMBER,
161 p_report_type_id IN NUMBER) return NUMBER;
162
163 function get_tab_menu_name(p_project_id IN NUMBER) return VARCHAR2;
164
165 PROCEDURE copy_project_tab_menu(
166 p_src_project_id IN NUMBER,
167 p_dest_project_id IN NUMBER,
168 x_msg_count OUT NOCOPY NUMBER, --File.Sql.39 bug 4440895
169 x_msg_data OUT NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
170 x_return_status OUT NOCOPY VARCHAR2); --File.Sql.39 bug 4440895
171
172 END PA_PROGRESS_REPORT_UTILS;