DBA Data[Home] [Help]

APPS.CN_COLLECTION_AIA_OM_PUB dependencies on CN_COLLECTION_AIA_OM_PUB

Line 1: PACKAGE BODY CN_COLLECTION_AIA_OM_PUB AS

1: PACKAGE BODY CN_COLLECTION_AIA_OM_PUB AS
2: /* $Header: CNPCLTROMB.pls 120.1 2010/10/26 10:43:51 sseshaiy noship $*/
3:
4: g_pkg_name constant VARCHAR2(30) := 'CN_COLLECTION_AIA_OM_PUB';
5: g_file_name constant VARCHAR2(15) := 'CNPCLTROMB.pls';

Line 4: g_pkg_name constant VARCHAR2(30) := 'CN_COLLECTION_AIA_OM_PUB';

1: PACKAGE BODY CN_COLLECTION_AIA_OM_PUB AS
2: /* $Header: CNPCLTROMB.pls 120.1 2010/10/26 10:43:51 sseshaiy noship $*/
3:
4: g_pkg_name constant VARCHAR2(30) := 'CN_COLLECTION_AIA_OM_PUB';
5: g_file_name constant VARCHAR2(15) := 'CNPCLTROMB.pls';
6: g_cn_debug VARCHAR2(1) := fnd_profile.VALUE('CN_DEBUG');
7:
8: PROCEDURE debugmsg(msg VARCHAR2) IS

Line 15: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'cn.plsql.CN_COLLECTION_AIA_OM_PUB', msg);

11: IF g_cn_debug = 'Y' THEN
12: cn_message_pkg.debug(SUBSTR(msg, 1, 254));
13: --fnd_file.PUT_LINE(fnd_file.LOG, msg);
14: if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
15: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, 'cn.plsql.CN_COLLECTION_AIA_OM_PUB', msg);
16: end if;
17: END IF;
18:
19: -- comment out dbms_output before checking in file

Line 39: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_employee_number: p_salesrep_id, org_id: ' || p_salesrep_id || ' , ' || p_org_id);

35:
36: l_empnum_cr get_emp_num_cur%ROWTYPE;
37: l_employee_num cn_aia_order_capture.employee_number%TYPE;
38: BEGIN
39: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_employee_number: p_salesrep_id, org_id: ' || p_salesrep_id || ' , ' || p_org_id);
40: l_employee_num := '-1';
41:
42: if(p_salesrep_id is not null) Then
43: FOR l_empnum_cr IN get_emp_num_cur

Line 51: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_employee_number: l_employee_num: ' || l_employee_num);

47: END If;
48:
49: RETURN l_employee_num;
50:
51: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_employee_number: l_employee_num: ' || l_employee_num);
52:
53: EXCEPTION
54: WHEN others THEN
55: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_employee_number: exception others: ' || sqlerrm(SQLCODE()));

Line 55: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_employee_number: exception others: ' || sqlerrm(SQLCODE()));

51: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_employee_number: l_employee_num: ' || l_employee_num);
52:
53: EXCEPTION
54: WHEN others THEN
55: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_employee_number: exception others: ' || sqlerrm(SQLCODE()));
56: RETURN l_employee_num;
57: END;
58:
59: -- Function name : get_exchange_rate

Line 91: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: p_curr_code, org_id: ' || p_from_currency || ' , ' || p_org_id);

87: l_conversion_type VARCHAR2(30);
88: l_check_max CHAR(1) := 'Y';
89:
90: BEGIN
91: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: p_curr_code, org_id: ' || p_from_currency || ' , ' || p_org_id);
92: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate:p_conversion_date: ' || p_conversion_date);
93: --
94: l_to_currency := cn_global_var.get_currency_code(p_org_id);
95: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: l_to_currency: ' || l_to_currency);

Line 92: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate:p_conversion_date: ' || p_conversion_date);

88: l_check_max CHAR(1) := 'Y';
89:
90: BEGIN
91: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: p_curr_code, org_id: ' || p_from_currency || ' , ' || p_org_id);
92: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate:p_conversion_date: ' || p_conversion_date);
93: --
94: l_to_currency := cn_global_var.get_currency_code(p_org_id);
95: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: l_to_currency: ' || l_to_currency);
96: --

Line 95: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: l_to_currency: ' || l_to_currency);

91: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: p_curr_code, org_id: ' || p_from_currency || ' , ' || p_org_id);
92: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate:p_conversion_date: ' || p_conversion_date);
93: --
94: l_to_currency := cn_global_var.get_currency_code(p_org_id);
95: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: l_to_currency: ' || l_to_currency);
96: --
97: if( p_from_currency = l_to_currency) Then
98: return 1;
99: end if;

Line 102: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: l_conversion_type: ' || l_conversion_type);

98: return 1;
99: end if;
100:
101: l_conversion_type := nvl(CN_SYSTEM_PARAMETERS.VALUE('CN_CONVERSION_TYPE', p_org_id), 'Corporate');
102: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: l_conversion_type: ' || l_conversion_type);
103: --
104: FOR rec IN c1(l_to_currency,l_conversion_type)
105: LOOP
106: l_conversion_date := rec.conversion_date;

Line 123: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: l_conversion_date: ' || l_conversion_date);

119: --
120: IF (l_check_max = 'Y') THEN
121: RETURN l_exchange_rate;
122: ELSE
123: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: l_conversion_date: ' || l_conversion_date);
124: l_exchange_rate := gl_currency_api.get_rate(p_from_currency,
125: l_to_currency,
126: l_conversion_date,
127: l_conversion_type);

Line 131: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: l_exchange_rate: ' || l_exchange_rate);

127: l_conversion_type);
128: END IF;
129:
130: --
131: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: l_exchange_rate: ' || l_exchange_rate);
132:
133: RETURN l_exchange_rate;
134:
135: EXCEPTION

Line 137: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: exception others: ' || sqlerrm(SQLCODE()));

133: RETURN l_exchange_rate;
134:
135: EXCEPTION
136: WHEN others THEN
137: debugmsg('CN_COLLECTION_AIA_OM_PUB.get_exchange_rate: exception others: ' || sqlerrm(SQLCODE()));
138: RETURN l_exchange_rate;
139: END;
140:
141: -- API name : oic_pre_load_data_process

Line 166: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: start: ');

162: l_exchange_rate NUMBER := 0;
163: l_revenue_type VARCHAR2(30) := 'REVENUE';
164:
165: BEGIN
166: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: start: ');
167: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: p_org_id : ' || p_org_id);
168: SAVEPOINT oic_pre_load;
169: x_return_status := fnd_api.g_ret_sts_success;
170:

Line 167: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: p_org_id : ' || p_org_id);

163: l_revenue_type VARCHAR2(30) := 'REVENUE';
164:
165: BEGIN
166: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: start: ');
167: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: p_org_id : ' || p_org_id);
168: SAVEPOINT oic_pre_load;
169: x_return_status := fnd_api.g_ret_sts_success;
170:
171: OPEN fetch_aia_salesreps_cur;

Line 172: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: inside fetch_aia_salesreps_cur: ');

168: SAVEPOINT oic_pre_load;
169: x_return_status := fnd_api.g_ret_sts_success;
170:
171: OPEN fetch_aia_salesreps_cur;
172: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: inside fetch_aia_salesreps_cur: ');
173: LOOP
174: FETCH fetch_aia_salesreps_cur bulk collect
175: INTO salesreps_tbl limit 1000;
176:

Line 183: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: l_employee_num : ' || l_employee_num);

179: l_employee_num := get_employee_number(salesreps_tbl(indx).salesrep_id,p_org_id);
180: l_exchange_rate := get_exchange_rate(salesreps_tbl(indx).amt_curcy_cd,salesreps_tbl(indx).processed_date,p_org_id);
181: l_revenue_type := nvl(salesreps_tbl(indx).revenue_type, 'REVENUE');
182:
183: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: l_employee_num : ' || l_employee_num);
184: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: l_exchange_rate : ' || l_exchange_rate);
185: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: l_revenue_type : ' || l_revenue_type);
186:
187:

Line 184: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: l_exchange_rate : ' || l_exchange_rate);

180: l_exchange_rate := get_exchange_rate(salesreps_tbl(indx).amt_curcy_cd,salesreps_tbl(indx).processed_date,p_org_id);
181: l_revenue_type := nvl(salesreps_tbl(indx).revenue_type, 'REVENUE');
182:
183: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: l_employee_num : ' || l_employee_num);
184: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: l_exchange_rate : ' || l_exchange_rate);
185: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: l_revenue_type : ' || l_revenue_type);
186:
187:
188: UPDATE cn_aia_order_capture

Line 185: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: l_revenue_type : ' || l_revenue_type);

181: l_revenue_type := nvl(salesreps_tbl(indx).revenue_type, 'REVENUE');
182:
183: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: l_employee_num : ' || l_employee_num);
184: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: l_exchange_rate : ' || l_exchange_rate);
185: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: l_revenue_type : ' || l_revenue_type);
186:
187:
188: UPDATE cn_aia_order_capture
189: SET employee_number = l_employee_num,

Line 211: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: after fetch_aia_salesreps_cur close statement: ');

207: END LOOP;
208:
209: CLOSE fetch_aia_salesreps_cur;
210:
211: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: after fetch_aia_salesreps_cur close statement: ');
212: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: end: ');
213:
214: COMMIT;
215:

Line 212: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: end: ');

208:
209: CLOSE fetch_aia_salesreps_cur;
210:
211: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: after fetch_aia_salesreps_cur close statement: ');
212: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: end: ');
213:
214: COMMIT;
215:
216: EXCEPTION

Line 221: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: exception others: ' || errbuf);

217: WHEN others THEN
218: x_return_status := 'F';
219: retcode := 2;
220: errbuf := SQLERRM(SQLCODE());
221: debugmsg('CN_COLLECTION_AIA_OM_PUB.oic_pre_load_data_process: exception others: ' || errbuf);
222: ROLLBACK TO oic_pre_load;
223:
224: END oic_pre_load_data_process;
225:

Line 243: debugmsg('CN_COLLECTION_AIA_OM_PUB.pre_aia_om_load_process: start: ');

239:
240: x_return_status VARCHAR2(1);
241:
242: BEGIN
243: debugmsg('CN_COLLECTION_AIA_OM_PUB.pre_aia_om_load_process: start: ');
244: x_return_status := fnd_api.g_ret_sts_success;
245: retcode := 0;
246: errbuf := '';
247:

Line 250: debugmsg('CN_COLLECTION_AIA_OM_PUB.pre_aia_om_load_process: after cn_cust_aia_ord_proc_pub.ct_aia_om_pre_processing call: ');

246: errbuf := '';
247:
248: cn_cust_aia_ord_proc_pub.ct_aia_om_pre_processing(x_return_status => x_return_status);
249:
250: debugmsg('CN_COLLECTION_AIA_OM_PUB.pre_aia_om_load_process: after cn_cust_aia_ord_proc_pub.ct_aia_om_pre_processing call: ');
251: debugmsg('CN_COLLECTION_AIA_OM_PUB.pre_aia_om_load_process: x_return_status: ' || x_return_status);
252:
253: IF(x_return_status <> 'S') THEN
254: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 251: debugmsg('CN_COLLECTION_AIA_OM_PUB.pre_aia_om_load_process: x_return_status: ' || x_return_status);

247:
248: cn_cust_aia_ord_proc_pub.ct_aia_om_pre_processing(x_return_status => x_return_status);
249:
250: debugmsg('CN_COLLECTION_AIA_OM_PUB.pre_aia_om_load_process: after cn_cust_aia_ord_proc_pub.ct_aia_om_pre_processing call: ');
251: debugmsg('CN_COLLECTION_AIA_OM_PUB.pre_aia_om_load_process: x_return_status: ' || x_return_status);
252:
253: IF(x_return_status <> 'S') THEN
254: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
255: END IF;

Line 262: debugmsg('CN_COLLECTION_AIA_OM_PUB.pre_aia_om_load_process: after oic_pre_load_data_process call: ');

258: retcode => retcode,
259: p_org_id => p_org_id,
260: x_return_status => x_return_status);
261:
262: debugmsg('CN_COLLECTION_AIA_OM_PUB.pre_aia_om_load_process: after oic_pre_load_data_process call: ');
263: debugmsg('CN_COLLECTION_AIA_OM_PUB.pre_aia_om_load_process: x_return_status: ' || x_return_status);
264:
265: IF(x_return_status <> 'S') THEN
266: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 263: debugmsg('CN_COLLECTION_AIA_OM_PUB.pre_aia_om_load_process: x_return_status: ' || x_return_status);

259: p_org_id => p_org_id,
260: x_return_status => x_return_status);
261:
262: debugmsg('CN_COLLECTION_AIA_OM_PUB.pre_aia_om_load_process: after oic_pre_load_data_process call: ');
263: debugmsg('CN_COLLECTION_AIA_OM_PUB.pre_aia_om_load_process: x_return_status: ' || x_return_status);
264:
265: IF(x_return_status <> 'S') THEN
266: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
267: END IF;

Line 296: END CN_COLLECTION_AIA_OM_PUB;

292: x_return_status := fnd_api.g_ret_sts_success;
293:
294: END post_aia_om_load_process;
295:
296: END CN_COLLECTION_AIA_OM_PUB;