DBA Data[Home] [Help]

PACKAGE: APPS.PMI_COMMON_PKG

Source


1 PACKAGE pmi_common_pkg as
2 /* $Header: PMICOMMS.pls 120.0 2005/05/24 16:54:45 appldev noship $ */
3 
4 /* ###########################################################################
5    Function PMICO_GET_COST
6 
7    Wrapper Function   on GMF_COMMON.cmcommon_get_Cost
8    Input Parameters
9          Item_id    Item_id
10          Whse_code  Warehouse Code
11          Trans_date Transaction Date
12          Cost_mthd  Cost Method
13     Description:
14 
15     Return Value Accounting Cost from GL_ITEM_CST table
16 
17     Note : This function return cost only if the cost is posted against GL tables
18            i.e if Cost update is run after Cost Rollup for the periods
19            Refer GMF_COMMON.cmcommon_get_Cost package for further Details
20 
21 ***************************************************************************
22 */
23 
24  FUNCTION PMICO_GET_COST(p_Item_id       IN ic_item_mst.item_id%TYPE,
25              p_Whse_code     IN ic_whse_mst.whse_code%TYPE,
26              p_Cost_mthd     IN cm_cmpt_dtl.cost_mthd_code%TYPE DEFAULT NULL,
27 	       p_Transaction_date    IN DATE)
28      RETURN NUMBER;
29 
30 /*
31   ###########################################################################
32    Function PMICO_GET_MULCURR_AMT
33 
34    Wrapper Function   on GMF_GLCOMMON_DB.get_closest_rate
35    Input Parameters
36          From Currency
37          To Currency
38          Exchange Rate Date
39          Amount to be converted
40     Description:
41     Return The converted amount from-currency to-currency. If conversion fails
42     returns the 0
43     Note :
44 
45     #####################################################################
46 */
47 
48     /* Package Variables for the function to avoid repetative calculations */
49 
50        PV_PMICO_GMA_F_CURR    gl_curr_mst.currency_code%TYPE;
51        PV_PMICO_GMA_T_CURR    gl_curr_mst.currency_code%TYPE;
52        PV_PMICO_GMA_RATE_DT   DATE;
53        PV_PMICO_GMA_SIGN      NUMBER;
54        PV_PMICO_GMA_XCNG_RATE NUMBER;
55 
56      FUNCTION PMICO_GET_MULCURR_AMT(
57                   p_From_Curr             IN gl_curr_mst.currency_code%TYPE,
58                   p_To_Curr               IN gl_curr_mst.currency_code%TYPE,
59                   p_Rate_date             IN DATE,
60 		      p_amount                IN NUMBER)
61      RETURN NUMBER;
62 
63 /* #####################################################################
64    Function PMICO_CURRCONV_ERROR
65 
66    Wrapper Function   on GMF_GLCOMMON_DB.get_closest_rate
67    Input Parameters
68          From Currency
69          To Currency
70          Exchange Rate Date
71 
72     Description:
73     This function checks the availability of Currency cinversion for the date given.
74     Return 1 If conversion Does not exist or returns 0 if conversion exist
75 
76     Note :
77 
78     ###################################################################### */
79 
80     /* Package Variables for the function to avoid repetative calculations */
81 
82        PV_PMICO_CE_F_CURR    gl_curr_mst.currency_code%TYPE;
83        PV_PMICO_CE_T_CURR    gl_curr_mst.currency_code%TYPE;
84        PV_PMICO_CE_RATE_DT   DATE;
85        PV_PMICO_CE_XCNG_ERROR     NUMBER;
86 
87      FUNCTION PMICO_CURRCONV_ERROR (
88                p_From_Curr             IN gl_curr_mst.currency_code%TYPE,
89                p_To_Curr               IN gl_curr_mst.currency_code%TYPE,
90                p_Rate_date             IN DATE)
91      RETURN NUMBER;
92 
93 
94 /*
95 *******************************************************************************
96 ***   Function PMICO_GET_TARGET
97 ***
98 ***   Input Parameters
99 ***      Target Short Name
100 ***      ORG Level Value ID
101 ***      Dimension Level 1 Value ID
102 ***      Period Type (GL Period Type Eg. Year,Quarter,Month
103 ***      Period Set Name (GL Calendar Name)
104 ***      Plan Id         (Business Plan Id)
105 ***      From Date
106 ***      To Date
107 ***      View By         1-- Time 2-- Organization
108 ***      Period Num      (GL Periods Period Num)
109 ***
110 ***
111 ***    Description:
112 ***      This function gets the target from bis targets based on input
113 ***    parameters. Returns Target value if target exists otherwise returns
114 ***    null.
115 ******************************************************************************
116 */
117 FUNCTION  PMICO_GET_TARGET(p_target_shortname      VARCHAR2,
118                             p_ORG_LVL_ID           VARCHAR2,
119                             p_DIM1_LVL_ID          VARCHAR2,
120                             p_period_type          VARCHAR2,
121                             P_period_set_name      VARCHAR2,
122                             p_plan_id              NUMBER,
123                             p_from_date            DATE,
124                             p_to_date              DATE,
125                             p_param_view_by        NUMBER,
126                             p_period_num           NUMBER DEFAULT 0)
127                      RETURN NUMBER;
128 END pmi_common_pkg;