DBA Data[Home] [Help]

PACKAGE BODY: APPS.PA_PROGRESS_CLIENT_EXTN

Source


1 package body PA_PROGRESS_CLIENT_EXTN as
2 /* $Header: PAPCTCXB.pls 120.2 2005/09/23 04:54:40 amksingh noship $ */
3 
4 -- Procedure            : GET_TASK_RES_OVERRIDE_INFO
5 -- Type                 : Public Procedure
6 -- Purpose              : This API is to be used to override the default behaviour of Oracle Application
7 --                      : for deriving Actual and Estimated dates for lowest tasks and task assignments.
8 --                      : This API will be called for all lowest tasks and task assignments, while progress
9 --                      : entry and running summarization process. The three places it will be called from are
10 --                      : pa_progress_pub.update_task_progress, pa_assignment_progress_pub.update_assignment_progress
11 --                      : pa_progress_pub.get_summarized_actuals.
12 -- Note                 : The default behavior of this API will be to return the passed dates without any modifications.
13 -- Assumptions          : None.
14 -- Patching Instruction : Please do take backup of this package if any customizations are done. After patch application
15 --                      : , you need to apply this backed up package again.
16 
17 -- Parameters                   Type     Required        Description and Purpose
18 -- ---------------------------  ------   --------        --------------------------------------------------------
19 -- p_project_id		        NUMBER     NO            Unique key for the project.
20 -- p_structure_type		VARCHAR2   NO            Structure Type. Currently only WORKPLAN structure is supported.
21 --                                                       Possible values are WORKPLAN, FINANCIAL.
22 -- p_structure_version_id       NUMEBR     NO            Unique key for workplan structure version.
23 -- p_object_id		        NUMEBR     NO            Unique key for the object info. It is pa_proj_elements.proj_element_id for tasks
24 --                                                       and pa_resource_assignments.resource_list_member_id for task assignments.
25 -- p_object_type	        VARCHAR2   NO            Possible values are 'PA_TASKS', 'PA_ASSIGNMENTS'
26 -- p_object_version_id          NUMEBR     NO            Unique key for the object version info. It is pa_proj_element_versions.element_version_id
27 --                                                       for tasks and task assignments both.
28 -- p_proj_element_id            NUMEBR     NO            Unique key for the task. It is pa_proj_elements.proj_element_id.
29 -- p_task_status		VARCHAR2   NO            Current status for the task. It is pa_percent_completes.status_code.
30 -- p_percent_complete		NUMEBR     NO            Physical percent complete. This is applicable for tasks only.
31 -- p_estimated_start_date	DATE       NO            Estimated start date for task and task assignments.
32 -- p_estimated_finish_date	DATE       NO            Estimated finish date for task and task assignments.
33 -- p_actual_start_date		DATE       NO            Actual start date for task and task assignments.
34 -- p_actual_finish_date		DATE       NO            Actual finish date for task and task assignments.
35 -- x_estimated_start_date	DATE       N/A            Returned Estimated start date for task and task assignments.
36 -- x_estimated_finish_date	DATE       N/A            Returned Estimated finish date for task and task assignments.
37 -- x_actual_start_date		DATE       N/A            Returned Actual start date for task and task assignments.
38 -- x_actual_finish_date		DATE       N/A            Returned Actual finish date for task and task assignments.
39 -- x_return_status		VARCHAR2   N/A            Return Status to identify if any issue in this API. Possible values
40 --                                                        are S for Success, E for Failure, U for Unexpected errors.
41 -- x_msg_count			NUMBER     N/A            Count of the messages pushed into FND message stack.
42 -- x_msg_data			VARCHAR2   N/A            Last message data from FND message stack if exists.
43 
44 
45 
46 PROCEDURE GET_TASK_RES_OVERRIDE_INFO(
47 	p_project_id			IN	NUMBER		:= FND_API.g_miss_num	,
48 	p_structure_type                IN	VARCHAR2	:= 'WORKPLAN'		,
49 	p_structure_version_id		IN	NUMBER		:= FND_API.g_miss_num	,
50 	p_object_type			IN	VARCHAR2	:= FND_API.g_miss_char	,
51 	p_object_id			IN	NUMBER		:= FND_API.g_miss_num	,
52 	p_object_version_id             IN	NUMBER		:= FND_API.g_miss_num	,
53 	p_proj_element_id		IN	NUMBER		:= FND_API.g_miss_num	,
54 	p_task_status			IN	VARCHAR2	:= FND_API.g_miss_num	,
55 	p_percent_complete		IN	NUMBER		:= FND_API.g_miss_num	,
56 	p_estimated_start_date		IN	DATE		:= FND_API.g_miss_date	,
57 	p_estimated_finish_date		IN	DATE		:= FND_API.g_miss_date	,
58 	p_actual_start_date		IN	DATE		:= FND_API.g_miss_date	,
59 	p_actual_finish_date		IN	DATE		:= FND_API.g_miss_date	,
60 	x_estimated_start_date		OUT	NOCOPY	DATE				,
61 	x_estimated_finish_date		OUT	NOCOPY	DATE				,
62 	x_actual_start_date		OUT	NOCOPY	DATE				,
63 	x_actual_finish_date		OUT	NOCOPY	DATE				,
64 	x_return_status			OUT	NOCOPY	VARCHAR2			,
65 	x_msg_count			OUT	NOCOPY	NUMBER				,
66 	x_msg_data			OUT	NOCOPY	VARCHAR2
67 	) IS
68 BEGIN
69 	x_return_status := FND_API.G_RET_STS_SUCCESS; -- Initialize value 'S'
70 	x_estimated_start_date := p_estimated_start_date;
71 	x_estimated_finish_date := p_estimated_finish_date;
72 	x_actual_start_date := p_actual_start_date;
73 	x_actual_finish_date := p_actual_finish_date;
74 
75 	-- Your Override Implmentation code should start from here
76 
77 	-- Sample for Error Message population into message stack
78 	-- IF error condition THEN
79 	--	fnd_message.set_name('PA','<MESSAGE CODE AS DEFINED IN MESSAGES SCREEN>');
80 	--	fnd_msg_pub.add;
81 	--	raise FND_API.G_EXC_ERROR;
82 	-- END IF;
83 
84 	-- Your Override Implmentation code should End here
85 EXCEPTION
86 	WHEN FND_API.G_EXC_ERROR THEN
87 		x_return_status := FND_API.G_RET_STS_ERROR;
88 		x_msg_count := fnd_msg_pub.count_msg;
89 	WHEN OTHERS THEN
90 		x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
91 		fnd_msg_pub.add_exc_msg(p_pkg_name	=> 'PA_PROGRESS_CLIENT_EXTN',
92                               p_procedure_name		=> 'GET_TASK_RES_OVERRIDE_INFO',
93                               p_error_text		=> SUBSTRB(SQLERRM,1,120));
94 		x_msg_count := fnd_msg_pub.count_msg;
95 END GET_TASK_RES_OVERRIDE_INFO;
96 END;