DBA Data[Home] [Help]

APPS.CSP_FAILURE_RATES_PVT dependencies on CSP_FAILURE_RATES

Line 1: PACKAGE BODY CSP_FAILURE_RATES_PVT as

1: PACKAGE BODY CSP_FAILURE_RATES_PVT as
2: /* $Header: cspvfrtb.pls 120.0 2005/05/25 11:37:49 appldev noship $ */
3: -- Start of Comments
4: -- Package name : CSP_FAILURE_RATES_PVT
5: -- Purpose :

Line 4: -- Package name : CSP_FAILURE_RATES_PVT

1: PACKAGE BODY CSP_FAILURE_RATES_PVT as
2: /* $Header: cspvfrtb.pls 120.0 2005/05/25 11:37:49 appldev noship $ */
3: -- Start of Comments
4: -- Package name : CSP_FAILURE_RATES_PVT
5: -- Purpose :
6: -- History :
7: -- NOTE :
8: -- End of Comments

Line 9: G_PKG_NAME CONSTANT VARCHAR2(30) := 'CSP_FAILURE_RATES_PVT';

5: -- Purpose :
6: -- History :
7: -- NOTE :
8: -- End of Comments
9: G_PKG_NAME CONSTANT VARCHAR2(30) := 'CSP_FAILURE_RATES_PVT';
10: G_FILE_NAME CONSTANT VARCHAR2(12) := 'cspvfrtb.pls';
11:
12: G_USER_ID NUMBER := FND_GLOBAL.USER_ID;
13: G_LOGIN_ID NUMBER := FND_GLOBAL.CONC_LOGIN_ID;

Line 73: l_api_name CONSTANT VARCHAR2(30) := 'csp_failure_rates_pvt';

69: and cplp.level_id like l_level_id||'%'
70: and cdl.service_date > sysdate - l_history_size
71: group by cdl.inventory_item_id;
72:
73: l_api_name CONSTANT VARCHAR2(30) := 'csp_failure_rates_pvt';
74: l_api_version_number CONSTANT NUMBER := 1.0;
75: l_return_status_full VARCHAR2(1);
76: l_sqlcode NUMBER;
77: l_sqlerrm Varchar2(2000);

Line 99: SAVEPOINT CSP_FAILURE_RATES_PVT;

95: -- Alter session
96: -- EXECUTE IMMEDIATE 'ALTER SESSION ENABLE PARALLEL DML';
97:
98: -- Standard Start of API savepoint
99: SAVEPOINT CSP_FAILURE_RATES_PVT;
100:
101: -- Standard call to check for call compatibility.
102: IF NOT FND_API.Compatible_API_Call ( l_api_version_number,
103: p_api_version_number,

Line 121: delete from csp_failure_rates

117: l_history_size := cp.history_size;
118: l_level_id := cp.level_id || '%';
119: l_product_id := cp.product_id;
120:
121: delete from csp_failure_rates
122: where product_id = cp.product_id
123: and planning_parameters_id = cp.planning_parameters_id
124: and manual_failure_rate is null;
125:

Line 129: update csp_failure_rates cfr

125:
126: for cdl in c_debrief_lines loop
127: l_failure_rate := cdl.quantity /
128: (cp.current_population * cp.history_size / 7);
129: update csp_failure_rates cfr
130: set cfr.calculated_failure_rate = l_failure_rate,
131: cfr.last_updated_by = g_user_id,
132: cfr.last_update_date = sysdate,
133: cfr.last_update_login = g_user_id

Line 138: insert into csp_failure_rates(

134: where cfr.planning_parameters_id = cp.planning_parameters_id
135: and cfr.product_id = cp.product_id
136: and cfr.inventory_item_id = cdl.inventory_item_id;
137: if sql%notfound then
138: insert into csp_failure_rates(
139: failure_rate_id,
140: planning_parameters_id,
141: product_id,
142: inventory_item_id,

Line 151: csp_failure_rates_s1.nextval,

147: creation_date,
148: created_by,
149: last_update_login)
150: values(
151: csp_failure_rates_s1.nextval,
152: cp.planning_parameters_id,
153: cp.product_id,
154: cdl.inventory_item_id,
155: l_failure_rate,