DBA Data[Home] [Help]

APPS.MSD_DEM_COLLECT_CURRENCY dependencies on MSD_DEM_COMMON_UTILITIES

Line 11: l_stmt := 'select max(datet), min(datet) from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'INPUTS');

7: l_stmt VARCHAR2(1000);
8:
9: BEGIN
10:
11: l_stmt := 'select max(datet), min(datet) from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'INPUTS');
12:
13: EXECUTE IMMEDIATE l_stmt
14: INTO l_max_date,
15: l_min_date;

Line 19: msd_dem_common_utilities.log_message(SUBSTR(sqlerrm, 1, 150));

15: l_min_date;
16:
17: EXCEPTION
18: WHEN others THEN
19: msd_dem_common_utilities.log_message(SUBSTR(sqlerrm, 1, 150));
20: msd_dem_common_utilities.log_debug(SUBSTR(sqlerrm, 1, 150));
21:
22: END;
23:

Line 20: msd_dem_common_utilities.log_debug(SUBSTR(sqlerrm, 1, 150));

16:
17: EXCEPTION
18: WHEN others THEN
19: msd_dem_common_utilities.log_message(SUBSTR(sqlerrm, 1, 150));
20: msd_dem_common_utilities.log_debug(SUBSTR(sqlerrm, 1, 150));
21:
22: END;
23:
24: PROCEDURE process_currency(retcode OUT NOCOPY VARCHAR2,

Line 79: l_stmt_get_seeded_unit := 'select real_value from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') ||

75: l_stmt VARCHAR2(2000);
76:
77: BEGIN
78:
79: l_stmt_get_seeded_unit := 'select real_value from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') ||
80: ' where real_value = ''' || p_currency_code || '''';
81:
82: open get_seeded_unit for l_stmt_get_seeded_unit;
83: fetch get_seeded_unit into l_get_seeded_unit;

Line 93: l_stmt_old_currency_real_value := 'select real_value_id, real_table from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') || ' where real_value = ''' || p_currency_code || '''';

89: CLOSE verify_entities_inuse;
90:
91: IF l_verify_entities_inuse IS NOT NULL THEN
92:
93: l_stmt_old_currency_real_value := 'select real_value_id, real_table from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') || ' where real_value = ''' || p_currency_code || '''';
94:
95: OPEN get_old_currency_real_value FOR l_stmt_old_currency_real_value;
96: FETCH get_old_currency_real_value
97: INTO new_currency;

Line 100: -- msd_dem_common_utilities.log_message('Currency Code: '||p_currency_code ||' already exists.');

96: FETCH get_old_currency_real_value
97: INTO new_currency;
98: CLOSE get_old_currency_real_value;
99:
100: -- msd_dem_common_utilities.log_message('Currency Code: '||p_currency_code ||' already exists.');
101:
102: ELSIF l_verify_entities_inuse IS NULL THEN
103:
104: if l_get_seeded_unit is not null then

Line 105: msd_dem_common_utilities.log_message('Seeded Display Unit with name ' || p_currency_code || ' exist in Demantra. This Currency will not be created');

101:
102: ELSIF l_verify_entities_inuse IS NULL THEN
103:
104: if l_get_seeded_unit is not null then
105: msd_dem_common_utilities.log_message('Seeded Display Unit with name ' || p_currency_code || ' exist in Demantra. This Currency will not be created');
106: msd_dem_common_utilities.log_debug('Seeded Display Unit with name ' || p_currency_code || ' exist in Demantra. This Currency will not be created');
107: retcode := 1;
108: return;
109: end if;

Line 106: msd_dem_common_utilities.log_debug('Seeded Display Unit with name ' || p_currency_code || ' exist in Demantra. This Currency will not be created');

102: ELSIF l_verify_entities_inuse IS NULL THEN
103:
104: if l_get_seeded_unit is not null then
105: msd_dem_common_utilities.log_message('Seeded Display Unit with name ' || p_currency_code || ' exist in Demantra. This Currency will not be created');
106: msd_dem_common_utilities.log_debug('Seeded Display Unit with name ' || p_currency_code || ' exist in Demantra. This Currency will not be created');
107: retcode := 1;
108: return;
109: end if;
110:

Line 111: msd_dem_common_utilities.log_message('Creating Currency : ' || p_currency_code);

107: retcode := 1;
108: return;
109: end if;
110:
111: msd_dem_common_utilities.log_message('Creating Currency : ' || p_currency_code);
112:
113: -- Bug#7199587 syenamar
114: -- Use 'real_table' field to look for empty dummy currencies, 'real_value' field might contain value in any supported language other than english
115:

Line 116: l_stmt_new_currency_real_value := 'select real_value_id, real_table from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') ||

112:
113: -- Bug#7199587 syenamar
114: -- Use 'real_table' field to look for empty dummy currencies, 'real_value' field might contain value in any supported language other than english
115:
116: l_stmt_new_currency_real_value := 'select real_value_id, real_table from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') ||
117: ' where real_value_id in ' ||
118: ' (select distinct real_value_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') ||
119: ' minus ' ||
120: ' select distinct real_value_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS_INDEX') || ') ' ||

Line 118: ' (select distinct real_value_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') ||

114: -- Use 'real_table' field to look for empty dummy currencies, 'real_value' field might contain value in any supported language other than english
115:
116: l_stmt_new_currency_real_value := 'select real_value_id, real_table from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') ||
117: ' where real_value_id in ' ||
118: ' (select distinct real_value_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') ||
119: ' minus ' ||
120: ' select distinct real_value_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS_INDEX') || ') ' ||
121: ' and real_table in ' ||
122: ' (select real_table from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') || ' where real_table like ''EBSCURRENCY%''' ||

Line 120: ' select distinct real_value_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS_INDEX') || ') ' ||

116: l_stmt_new_currency_real_value := 'select real_value_id, real_table from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') ||
117: ' where real_value_id in ' ||
118: ' (select distinct real_value_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') ||
119: ' minus ' ||
120: ' select distinct real_value_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS_INDEX') || ') ' ||
121: ' and real_table in ' ||
122: ' (select real_table from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') || ' where real_table like ''EBSCURRENCY%''' ||
123: ' minus ' ||
124: ' select table_name from msd_dem_entities_inuse where ebs_entity = ''Currency'')' ||

Line 122: ' (select real_table from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') || ' where real_table like ''EBSCURRENCY%''' ||

118: ' (select distinct real_value_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') ||
119: ' minus ' ||
120: ' select distinct real_value_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS_INDEX') || ') ' ||
121: ' and real_table in ' ||
122: ' (select real_table from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') || ' where real_table like ''EBSCURRENCY%''' ||
123: ' minus ' ||
124: ' select table_name from msd_dem_entities_inuse where ebs_entity = ''Currency'')' ||
125: ' and rownum < 2';
126: msd_dem_common_utilities.log_debug(l_stmt_new_currency_real_value);

Line 126: msd_dem_common_utilities.log_debug(l_stmt_new_currency_real_value);

122: ' (select real_table from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') || ' where real_table like ''EBSCURRENCY%''' ||
123: ' minus ' ||
124: ' select table_name from msd_dem_entities_inuse where ebs_entity = ''Currency'')' ||
125: ' and rownum < 2';
126: msd_dem_common_utilities.log_debug(l_stmt_new_currency_real_value);
127: -- syenamar
128:
129: OPEN get_new_currency_real_value FOR l_stmt_new_currency_real_value;
130: FETCH get_new_currency_real_value

Line 134: msd_dem_common_utilities.log_message('Cannot create new currency' || ' as no more empty dummy currency exists.');

130: FETCH get_new_currency_real_value
131: INTO new_currency;
132:
133: IF get_new_currency_real_value % NOTFOUND THEN
134: msd_dem_common_utilities.log_message('Cannot create new currency' || ' as no more empty dummy currency exists.');
135: msd_dem_common_utilities.log_debug('Cannot create new currency' || ' as no more empty dummy currency exists.');
136: CLOSE get_new_currency_real_value;
137: retcode := 1;
138: RETURN;

Line 135: msd_dem_common_utilities.log_debug('Cannot create new currency' || ' as no more empty dummy currency exists.');

131: INTO new_currency;
132:
133: IF get_new_currency_real_value % NOTFOUND THEN
134: msd_dem_common_utilities.log_message('Cannot create new currency' || ' as no more empty dummy currency exists.');
135: msd_dem_common_utilities.log_debug('Cannot create new currency' || ' as no more empty dummy currency exists.');
136: CLOSE get_new_currency_real_value;
137: retcode := 1;
138: RETURN;
139: END IF;

Line 169: l_stmt := 'update ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') || '

165: ,:8
166: )';
167:
168: EXECUTE IMMEDIATE l_stmt USING p_currency_code, new_currency.real_table, sysdate, fnd_global.user_id, sysdate, fnd_global.user_id, fnd_global.user_id;
169: l_stmt := 'update ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'REAL_VALUES') || '
170: set real_value = :1
171: where real_value_id = :2';
172:
173: EXECUTE IMMEDIATE l_stmt USING p_currency_code,

Line 179: /*l_stmt_get_component := 'select dcm_product_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS') || ' where product_name = '''

175:
176: -- Bug#7199587 syenamar
177: -- Use component id obtained from lookup
178:
179: /*l_stmt_get_component := 'select dcm_product_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS') || ' where product_name = '''
180: || msd_dem_common_utilities.get_lookup_value('MSD_DEM_COMPONENTS', 'DEMAND_MANAGEMENT') || '''';
181:
182: OPEN get_component FOR l_stmt_get_component;
183: FETCH get_component

Line 180: || msd_dem_common_utilities.get_lookup_value('MSD_DEM_COMPONENTS', 'DEMAND_MANAGEMENT') || '''';

176: -- Bug#7199587 syenamar
177: -- Use component id obtained from lookup
178:
179: /*l_stmt_get_component := 'select dcm_product_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS') || ' where product_name = '''
180: || msd_dem_common_utilities.get_lookup_value('MSD_DEM_COMPONENTS', 'DEMAND_MANAGEMENT') || '''';
181:
182: OPEN get_component FOR l_stmt_get_component;
183: FETCH get_component
184: INTO l_component_id;

Line 188: l_component_id := to_number(msd_dem_common_utilities.get_app_id_text('MSD_DEM_DEMANTRA_OBJECT_ID',

184: INTO l_component_id;
185: CLOSE get_component;*/
186:
187: /* Bug#8224935 - APP ID */ -- nallkuma
188: l_component_id := to_number(msd_dem_common_utilities.get_app_id_text('MSD_DEM_DEMANTRA_OBJECT_ID',
189: 'COMP_DM',
190: 1,
191: 'dcm_product_id'));
192:

Line 193: l_stmt := 'insert into ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS_INDEX') || '

189: 'COMP_DM',
190: 1,
191: 'dcm_product_id'));
192:
193: l_stmt := 'insert into ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS_INDEX') || '
194: (dcm_product_id
195: ,real_value_id
196: )
197: (

Line 205: /*l_stmt_get_component_sop := 'select dcm_product_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS') || ' where product_name = '''

201: new_currency.real_value_id;
202:
203:
204:
205: /*l_stmt_get_component_sop := 'select dcm_product_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS') || ' where product_name = '''
206: || msd_dem_common_utilities.get_lookup_value('MSD_DEM_COMPONENTS', 'SOP') || '''';
207:
208: OPEN get_component_sop FOR l_stmt_get_component_sop;
209: FETCH get_component_sop

Line 206: || msd_dem_common_utilities.get_lookup_value('MSD_DEM_COMPONENTS', 'SOP') || '''';

202:
203:
204:
205: /*l_stmt_get_component_sop := 'select dcm_product_id from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS') || ' where product_name = '''
206: || msd_dem_common_utilities.get_lookup_value('MSD_DEM_COMPONENTS', 'SOP') || '''';
207:
208: OPEN get_component_sop FOR l_stmt_get_component_sop;
209: FETCH get_component_sop
210: INTO l_component_id_sop;

Line 214: l_component_id_sop := to_number(msd_dem_common_utilities.get_app_id_text('MSD_DEM_DEMANTRA_OBJECT_ID',

210: INTO l_component_id_sop;
211: CLOSE get_component_sop;*/
212:
213: /* Bug#8224935 - APP ID */ -- nallkuma
214: l_component_id_sop := to_number(msd_dem_common_utilities.get_app_id_text('MSD_DEM_DEMANTRA_OBJECT_ID',
215: 'COMP_SOP',
216: 1,
217: 'dcm_product_id'));
218:

Line 219: l_stmt := 'insert into ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS_INDEX') || '

215: 'COMP_SOP',
216: 1,
217: 'dcm_product_id'));
218:
219: l_stmt := 'insert into ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DCM_PRODUCTS_INDEX') || '
220: (dcm_product_id
221: ,real_value_id
222: )
223: (

Line 229: l_stmt := 'insert into ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'INDEXES_FOR_UNITS') ||

225: )';
226: EXECUTE IMMEDIATE l_stmt USING l_component_id_sop, new_currency.real_value_id;
227: -- syenamar
228:
229: l_stmt := 'insert into ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'INDEXES_FOR_UNITS') ||
230: ' (display_units_id, real_value_id) ' ||
231: ' (select display_units_id, :1 from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DISPLAY_UNITS') || ' du, msd_dem_entities_inuse mdei ' ||
232: ' where mdei.ebs_entity = ''PRL'' and mdei.internal_name = du.display_units)';
233:

Line 231: ' (select display_units_id, :1 from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DISPLAY_UNITS') || ' du, msd_dem_entities_inuse mdei ' ||

227: -- syenamar
228:
229: l_stmt := 'insert into ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'INDEXES_FOR_UNITS') ||
230: ' (display_units_id, real_value_id) ' ||
231: ' (select display_units_id, :1 from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DISPLAY_UNITS') || ' du, msd_dem_entities_inuse mdei ' ||
232: ' where mdei.ebs_entity = ''PRL'' and mdei.internal_name = du.display_units)';
233:
234: msd_dem_common_utilities.log_debug(l_stmt);
235:

Line 234: msd_dem_common_utilities.log_debug(l_stmt);

230: ' (display_units_id, real_value_id) ' ||
231: ' (select display_units_id, :1 from ' || msd_dem_common_utilities.get_lookup_value('MSD_DEM_TABLES', 'DISPLAY_UNITS') || ' du, msd_dem_entities_inuse mdei ' ||
232: ' where mdei.ebs_entity = ''PRL'' and mdei.internal_name = du.display_units)';
233:
234: msd_dem_common_utilities.log_debug(l_stmt);
235:
236: execute immediate l_stmt using new_currency.real_value_id;
237:
238: END IF;

Line 240: msd_dem_common_utilities.log_message('Collecting Currency : ' || p_currency_code);

236: execute immediate l_stmt using new_currency.real_value_id;
237:
238: END IF;
239:
240: msd_dem_common_utilities.log_message('Collecting Currency : ' || p_currency_code);
241: msd_dem_common_utilities.log_debug('Collecting Currency : ' || p_currency_code);
242:
243: msd_dem_common_utilities.log_debug('Start Time: ' || to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS'));
244:

Line 241: msd_dem_common_utilities.log_debug('Collecting Currency : ' || p_currency_code);

237:
238: END IF;
239:
240: msd_dem_common_utilities.log_message('Collecting Currency : ' || p_currency_code);
241: msd_dem_common_utilities.log_debug('Collecting Currency : ' || p_currency_code);
242:
243: msd_dem_common_utilities.log_debug('Start Time: ' || to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS'));
244:
245: l_stmt := 'delete from ' || fnd_profile.VALUE('MSD_DEM_SCHEMA') || '.' || new_currency.real_table || ' where index_date between :1 and :2 ';

Line 243: msd_dem_common_utilities.log_debug('Start Time: ' || to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS'));

239:
240: msd_dem_common_utilities.log_message('Collecting Currency : ' || p_currency_code);
241: msd_dem_common_utilities.log_debug('Collecting Currency : ' || p_currency_code);
242:
243: msd_dem_common_utilities.log_debug('Start Time: ' || to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS'));
244:
245: l_stmt := 'delete from ' || fnd_profile.VALUE('MSD_DEM_SCHEMA') || '.' || new_currency.real_table || ' where index_date between :1 and :2 ';
246:
247: msd_dem_common_utilities.log_debug('Bind Variables: ');

Line 247: msd_dem_common_utilities.log_debug('Bind Variables: ');

243: msd_dem_common_utilities.log_debug('Start Time: ' || to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS'));
244:
245: l_stmt := 'delete from ' || fnd_profile.VALUE('MSD_DEM_SCHEMA') || '.' || new_currency.real_table || ' where index_date between :1 and :2 ';
246:
247: msd_dem_common_utilities.log_debug('Bind Variables: ');
248: msd_dem_common_utilities.log_debug('From Date: ' || p_from_date);
249: msd_dem_common_utilities.log_debug('To Date: ' || p_to_date);
250: msd_dem_common_utilities.log_debug('Delete statement for currency: ' || l_stmt);
251:

Line 248: msd_dem_common_utilities.log_debug('From Date: ' || p_from_date);

244:
245: l_stmt := 'delete from ' || fnd_profile.VALUE('MSD_DEM_SCHEMA') || '.' || new_currency.real_table || ' where index_date between :1 and :2 ';
246:
247: msd_dem_common_utilities.log_debug('Bind Variables: ');
248: msd_dem_common_utilities.log_debug('From Date: ' || p_from_date);
249: msd_dem_common_utilities.log_debug('To Date: ' || p_to_date);
250: msd_dem_common_utilities.log_debug('Delete statement for currency: ' || l_stmt);
251:
252: EXECUTE IMMEDIATE l_stmt USING p_from_date,

Line 249: msd_dem_common_utilities.log_debug('To Date: ' || p_to_date);

245: l_stmt := 'delete from ' || fnd_profile.VALUE('MSD_DEM_SCHEMA') || '.' || new_currency.real_table || ' where index_date between :1 and :2 ';
246:
247: msd_dem_common_utilities.log_debug('Bind Variables: ');
248: msd_dem_common_utilities.log_debug('From Date: ' || p_from_date);
249: msd_dem_common_utilities.log_debug('To Date: ' || p_to_date);
250: msd_dem_common_utilities.log_debug('Delete statement for currency: ' || l_stmt);
251:
252: EXECUTE IMMEDIATE l_stmt USING p_from_date,
253: p_to_date;

Line 250: msd_dem_common_utilities.log_debug('Delete statement for currency: ' || l_stmt);

246:
247: msd_dem_common_utilities.log_debug('Bind Variables: ');
248: msd_dem_common_utilities.log_debug('From Date: ' || p_from_date);
249: msd_dem_common_utilities.log_debug('To Date: ' || p_to_date);
250: msd_dem_common_utilities.log_debug('Delete statement for currency: ' || l_stmt);
251:
252: EXECUTE IMMEDIATE l_stmt USING p_from_date,
253: p_to_date;
254:

Line 269: msd_dem_common_utilities.log_debug(l_stmt);

265: ' and conversion_type = fnd_profile.valueDBLINK(''MSD_DEM_CONVERSION_TYPE'') )';
266: l_stmt := REPLACE(l_stmt, 'DBLINK', g_dblink);
267: END IF;
268:
269: msd_dem_common_utilities.log_debug(l_stmt);
270:
271: EXECUTE IMMEDIATE l_stmt USING p_from_date,
272: p_to_date;
273: COMMIT;

Line 280: msd_dem_common_utilities.log_message('No records exist for currency ' || p_currency_code || ' between ' || p_from_date || ' and ' || p_to_date);

276:
277: execute immediate l_stmt into l_cur_count;
278:
279: if l_cur_count = 0 then
280: msd_dem_common_utilities.log_message('No records exist for currency ' || p_currency_code || ' between ' || p_from_date || ' and ' || p_to_date);
281: end if;
282:
283: msd_dem_common_utilities.log_debug('End Time: ' || to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS'));
284: msd_dem_common_utilities.log_message('Currency : ' || p_currency_code || ' collection is finished.');

Line 283: msd_dem_common_utilities.log_debug('End Time: ' || to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS'));

279: if l_cur_count = 0 then
280: msd_dem_common_utilities.log_message('No records exist for currency ' || p_currency_code || ' between ' || p_from_date || ' and ' || p_to_date);
281: end if;
282:
283: msd_dem_common_utilities.log_debug('End Time: ' || to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS'));
284: msd_dem_common_utilities.log_message('Currency : ' || p_currency_code || ' collection is finished.');
285: msd_dem_common_utilities.log_debug('Currency : ' || p_currency_code || ' collection is finished.');
286:
287: END;

Line 284: msd_dem_common_utilities.log_message('Currency : ' || p_currency_code || ' collection is finished.');

280: msd_dem_common_utilities.log_message('No records exist for currency ' || p_currency_code || ' between ' || p_from_date || ' and ' || p_to_date);
281: end if;
282:
283: msd_dem_common_utilities.log_debug('End Time: ' || to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS'));
284: msd_dem_common_utilities.log_message('Currency : ' || p_currency_code || ' collection is finished.');
285: msd_dem_common_utilities.log_debug('Currency : ' || p_currency_code || ' collection is finished.');
286:
287: END;
288:

Line 285: msd_dem_common_utilities.log_debug('Currency : ' || p_currency_code || ' collection is finished.');

281: end if;
282:
283: msd_dem_common_utilities.log_debug('End Time: ' || to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS'));
284: msd_dem_common_utilities.log_message('Currency : ' || p_currency_code || ' collection is finished.');
285: msd_dem_common_utilities.log_debug('Currency : ' || p_currency_code || ' collection is finished.');
286:
287: END;
288:
289: PROCEDURE collect_currency(errbuf OUT NOCOPY VARCHAR2,

Line 324: msd_dem_common_utilities.log_debug('Entering: msd_dem_collect_currency.collect_currency - ' || to_char(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

320: l_curr_code VARCHAR2(30);
321:
322: BEGIN
323:
324: msd_dem_common_utilities.log_debug('Entering: msd_dem_collect_currency.collect_currency - ' || to_char(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
325: msd_dem_common_utilities.log_message('Entering: msd_dem_collect_currency.collect_currency - ' || to_char(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
326:
327: /* Get the db link to the source instance */ msd_dem_common_utilities.get_dblink(x_errbuf, x_retcode, p_instance_id, g_dblink);
328:

Line 325: msd_dem_common_utilities.log_message('Entering: msd_dem_collect_currency.collect_currency - ' || to_char(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

321:
322: BEGIN
323:
324: msd_dem_common_utilities.log_debug('Entering: msd_dem_collect_currency.collect_currency - ' || to_char(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
325: msd_dem_common_utilities.log_message('Entering: msd_dem_collect_currency.collect_currency - ' || to_char(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
326:
327: /* Get the db link to the source instance */ msd_dem_common_utilities.get_dblink(x_errbuf, x_retcode, p_instance_id, g_dblink);
328:
329: IF(x_retcode = '-1') THEN

Line 327: /* Get the db link to the source instance */ msd_dem_common_utilities.get_dblink(x_errbuf, x_retcode, p_instance_id, g_dblink);

323:
324: msd_dem_common_utilities.log_debug('Entering: msd_dem_collect_currency.collect_currency - ' || to_char(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
325: msd_dem_common_utilities.log_message('Entering: msd_dem_collect_currency.collect_currency - ' || to_char(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
326:
327: /* Get the db link to the source instance */ msd_dem_common_utilities.get_dblink(x_errbuf, x_retcode, p_instance_id, g_dblink);
328:
329: IF(x_retcode = '-1') THEN
330: retcode := -1;
331: errbuf := x_errbuf;

Line 332: msd_dem_common_utilities.log_message('Error(1): msd_dem_collect_currency.collect_currency - ' || to_char(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

328:
329: IF(x_retcode = '-1') THEN
330: retcode := -1;
331: errbuf := x_errbuf;
332: msd_dem_common_utilities.log_message('Error(1): msd_dem_collect_currency.collect_currency - ' || to_char(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
333: RETURN;
334: END IF;
335:
336: /* Get the min and max date in demantra time */

Line 350: msd_dem_common_utilities.log_message('Error: msd_dem_collect_currency.collect_currency- ' || to_char(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));

346:
347: IF(l_date_from > l_date_to) THEN
348: retcode := -1;
349: errbuf := 'From Date should not be greater than To Date.';
350: msd_dem_common_utilities.log_message('Error: msd_dem_collect_currency.collect_currency- ' || to_char(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
351: msd_dem_common_utilities.log_message(errbuf);
352: RETURN;
353: END IF;
354:

Line 351: msd_dem_common_utilities.log_message(errbuf);

347: IF(l_date_from > l_date_to) THEN
348: retcode := -1;
349: errbuf := 'From Date should not be greater than To Date.';
350: msd_dem_common_utilities.log_message('Error: msd_dem_collect_currency.collect_currency- ' || to_char(systimestamp, 'DD-MON-YYYY HH24:MI:SS'));
351: msd_dem_common_utilities.log_message(errbuf);
352: RETURN;
353: END IF;
354:
355: IF(p_all_currencies = 2) THEN

Line 360: msd_dem_common_utilities.log_message('Both include list and exclude list are specified for currency collection. Please specify either include list or excluse list.');

356:
357: IF p_include_currency_list IS NOT NULL
358: AND p_exclude_currency_list IS NOT NULL THEN
359:
360: msd_dem_common_utilities.log_message('Both include list and exclude list are specified for currency collection. Please specify either include list or excluse list.');
361: msd_dem_common_utilities.log_debug('Both include list and exclude list are specified for currency collection. Please specify either include list or excluse list.');
362: retcode := -1;
363: RETURN;
364: ELSIF p_include_currency_list IS NULL

Line 361: msd_dem_common_utilities.log_debug('Both include list and exclude list are specified for currency collection. Please specify either include list or excluse list.');

357: IF p_include_currency_list IS NOT NULL
358: AND p_exclude_currency_list IS NOT NULL THEN
359:
360: msd_dem_common_utilities.log_message('Both include list and exclude list are specified for currency collection. Please specify either include list or excluse list.');
361: msd_dem_common_utilities.log_debug('Both include list and exclude list are specified for currency collection. Please specify either include list or excluse list.');
362: retcode := -1;
363: RETURN;
364: ELSIF p_include_currency_list IS NULL
365: AND p_exclude_currency_list IS NULL THEN

Line 367: msd_dem_common_utilities.log_message('None of include list and exclude list are not specified for currency collection. Please specify either include list or excluse list.');

363: RETURN;
364: ELSIF p_include_currency_list IS NULL
365: AND p_exclude_currency_list IS NULL THEN
366:
367: msd_dem_common_utilities.log_message('None of include list and exclude list are not specified for currency collection. Please specify either include list or excluse list.');
368: msd_dem_common_utilities.log_debug('None of include list and exclude list are not specified for currency collection. Please specify either include list or excluse list.');
369: retcode := -1;
370: RETURN;
371:

Line 368: msd_dem_common_utilities.log_debug('None of include list and exclude list are not specified for currency collection. Please specify either include list or excluse list.');

364: ELSIF p_include_currency_list IS NULL
365: AND p_exclude_currency_list IS NULL THEN
366:
367: msd_dem_common_utilities.log_message('None of include list and exclude list are not specified for currency collection. Please specify either include list or excluse list.');
368: msd_dem_common_utilities.log_debug('None of include list and exclude list are not specified for currency collection. Please specify either include list or excluse list.');
369: retcode := -1;
370: RETURN;
371:
372: END IF;

Line 414: msd_dem_common_utilities.log_debug(l_stmt);

410: l_stmt := l_stmt || ' in ' || '(' || l_list || ')';
411:
412: END IF;
413:
414: msd_dem_common_utilities.log_debug(l_stmt);
415:
416: OPEN c_get_curr_code FOR l_stmt;
417:
418: LOOP

Line 426: msd_dem_common_utilities.log_message('Warning: Base Currency is selected for collection');

422: EXIT
423: WHEN c_get_curr_code % NOTFOUND;
424:
425: /*if l_curr_code = l_base_curr then
426: msd_dem_common_utilities.log_message('Warning: Base Currency is selected for collection');
427: retcode := 1;
428: goto continue;
429: end if;*/
430:

Line 447: msd_dem_common_utilities.log_message('Warning: Base Currency ' || l_base_curr || ' is selected. Base Currency cannot be collected.');

443:
444: CLOSE c_get_curr_code;
445:
446: if instr(l_list2, l_base_curr) > 0 then
447: msd_dem_common_utilities.log_message('Warning: Base Currency ' || l_base_curr || ' is selected. Base Currency cannot be collected.');
448: l_list2 := RTRIM(l_list2, l_base_curr || ',');
449: retcode := 1;
450: end if;
451:

Line 456: msd_dem_common_utilities.log_message('Warning: Currencies: ' || l_list2 || ' do not exist.');

452: l_list2 := RTRIM(l_list2, ',');
453:
454: IF(l_list2 IS NOT NULL) THEN
455: retcode := 1;
456: msd_dem_common_utilities.log_message('Warning: Currencies: ' || l_list2 || ' do not exist.');
457: END IF;
458:
459: if retcode <> -1 and retcode <> 1 then
460: retcode := 0;

Line 467: msd_dem_common_utilities.log_message(errbuf);

463:
464: EXCEPTION
465: WHEN others THEN
466: errbuf := SUBSTR(sqlerrm, 1, 150);
467: msd_dem_common_utilities.log_message(errbuf);
468: msd_dem_common_utilities.log_debug(errbuf);
469: retcode := -1;
470:
471: END;

Line 468: msd_dem_common_utilities.log_debug(errbuf);

464: EXCEPTION
465: WHEN others THEN
466: errbuf := SUBSTR(sqlerrm, 1, 150);
467: msd_dem_common_utilities.log_message(errbuf);
468: msd_dem_common_utilities.log_debug(errbuf);
469: retcode := -1;
470:
471: END;
472: