DBA Data[Home] [Help]

PACKAGE: APPS.PA_FP_FCST_GEN_AMT_UTILS

Source


1 PACKAGE PA_FP_FCST_GEN_AMT_UTILS as
2 /* $Header: PAFPGFUS.pls 120.3 2007/02/06 09:59:37 dthakker noship $ */
3 PROCEDURE COMPARE_ETC_SRC_TARGET_FP_OPT
4           (P_PROJECT_ID                     IN            PA_PROJ_FP_OPTIONS.PROJECT_ID%TYPE,
5            P_WP_SRC_PLAN_VER_ID 	    IN            PA_BUDGET_VERSIONS.BUDGET_VERSION_ID%TYPE,
6            P_FP_SRC_PLAN_VER_ID 	    IN            PA_BUDGET_VERSIONS.BUDGET_VERSION_ID%TYPE,
7            P_FP_TARGET_PLAN_VER_ID 	    IN            PA_BUDGET_VERSIONS.BUDGET_VERSION_ID%TYPE,
8            X_SAME_PLANNING_OPTION_FLAG      OUT  NOCOPY   VARCHAR2,
9            X_RETURN_STATUS                  OUT  NOCOPY   VARCHAR2,
10            X_MSG_COUNT                      OUT  NOCOPY   NUMBER,
11            X_MSG_DATA	                    OUT  NOCOPY   VARCHAR2);
12 
13 /***
14  	  * For Remaining Plan, Work Quantity, and non-Commitment ETC,
15  	  * whether an ETC quantity/amount should be generated or not
16  	  * is a function of its sign (i.e. positive or negative) in
17  	  * relation to the sign of the (plan) amount it is derived from.
18  	  * This function tests whether plan and ETC quantity/amounts
19  	  * having matching signs.
20  	  *
21  	  * The function behaves as follows:
22  	  * Returns TRUE if (plan >= 0 and etc > 0) or (plan < 0 and etc < 0).
23  	  * Returns FALSE otherwise.
24  	  *
25  	  * Parameters:
26  	  *   P_PLAN_QTY_OR_AMT
27  	  *      The plan quantity or amount used to compute the value
28  	  *      of p_etc_qty_or_amt.
29  	  *   P_ETC_QTY_OR_AMT
30  	  *      The ETC quantity or amount computed from p_plan_qty_or_amt.
31  	  *   P_CALLING_MODULE
32  	  *      The module calling this function. Valid values include:
33  	  *      'FORECAST_GENERATION'
34  	  *      'WORKPLAN'
35  	  *      This parameter can be used later to change the behavior
36  	  *      of this function based on the needs of a calling module.
37  	  */
38  	 FUNCTION PLAN_ETC_SIGNS_MATCH
39  	        ( P_PLAN_QTY_OR_AMT  IN  NUMBER,
40  	          P_ETC_QTY_OR_AMT   IN  NUMBER,
41  	          P_CALLING_MODULE   IN  VARCHAR2 DEFAULT 'FORECAST_GENERATION' )
42  	 RETURN BOOLEAN;
43 
44  	 /*
45  	  * For Workplan progress, this function computes the ETC quantity based
46  	  * on Planned and Actual Qty by applying the following rules. This function
47  	  * is another variation of function PLAN_ETC_SIGNS_MATCH in this package.
48  	  *
49  	  * 1. If actual > plan and plan is negative, ETC = Plan - Actual
50  	  * 2. If actual > plan and plan is positive, ETC = 0
51  	  * 3. If actual < plan and plan is negative, ETC = 0
52  	  * 4. If actual < plan and plan is positive, ETC = Plan - Actual
53  	  * 5. If actual = plan, ETC = 0
54  	  *
55  	  * Parameters:
56  	  *   P_PLAN_QTY_OR_AMT
57  	  *      The plan quantity or amount used to compute the value
58  	  *      of p_etc_qty_or_amt.
59  	  *   P_ACT_QTY_OR_AMT
60  	  *      The actual quantity or amount computed from p_plan_qty_or_amt.
61  	  *   P_CALLING_MODULE
62  	  *      The module calling this function. Valid values include:
63  	  *      'FORECAST_GENERATION'
64  	  *      'WORKPLAN'
65  	  *      This parameter can be used later to change the behavior
66  	  *      of this function based on the needs of a calling module.
67  	  */
68  	 FUNCTION GET_ETC_FROM_PLAN_ACT
69  	       ( P_PLAN_QTY_OR_AMT  IN  NUMBER,
70  	         P_ACT_QTY_OR_AMT   IN  NUMBER,
71  	         P_CALLING_MODULE   IN  VARCHAR2 DEFAULT 'FORECAST_GENERATION' )
72  	 RETURN NUMBER;
73 
74 END PA_FP_FCST_GEN_AMT_UTILS;