DBA Data[Home] [Help]

APPS.FLM_MULTIPLE_SUPPLIERS dependencies on FLM_MULTIPLE_SUPPLIERS

Line 1: PACKAGE BODY FLM_MULTIPLE_SUPPLIERS

1: PACKAGE BODY FLM_MULTIPLE_SUPPLIERS
2: /* $Header: flmmsupb.pls 120.1.12020000.2 2012/07/13 11:04:35 sisankar ship $ */
3: AS
4: NO_SUPPLIER NUMBER := 0;
5: SINGLE_SUPPLIER NUMBER := 1;

Line 45: log('NO_SUPPLIER', 'flm_multiple_suppliers.validate_supplier_percentages' , l_returnStatus);

41: END;
42:
43: IF (l_sup_flag = 0) THEN
44: x_supplier := NO_SUPPLIER;
45: log('NO_SUPPLIER', 'flm_multiple_suppliers.validate_supplier_percentages' , l_returnStatus);
46: RETURN;
47: ELSIF (l_total_perc = 100) THEN
48: IF (l_sup_flag = 1) THEN
49: x_supplier := SINGLE_SUPPLIER;

Line 50: log('SINGLE_SUPPLIER', 'flm_multiple_suppliers.validate_supplier_percentages' , l_returnStatus);

46: RETURN;
47: ELSIF (l_total_perc = 100) THEN
48: IF (l_sup_flag = 1) THEN
49: x_supplier := SINGLE_SUPPLIER;
50: log('SINGLE_SUPPLIER', 'flm_multiple_suppliers.validate_supplier_percentages' , l_returnStatus);
51: RETURN;
52: ELSE
53: x_supplier := MULTIPLE_SUPPLIER;
54: log('MULTIPLE_SUPPLIER', 'flm_multiple_suppliers.validate_supplier_percentages' , l_returnStatus);

Line 54: log('MULTIPLE_SUPPLIER', 'flm_multiple_suppliers.validate_supplier_percentages' , l_returnStatus);

50: log('SINGLE_SUPPLIER', 'flm_multiple_suppliers.validate_supplier_percentages' , l_returnStatus);
51: RETURN;
52: ELSE
53: x_supplier := MULTIPLE_SUPPLIER;
54: log('MULTIPLE_SUPPLIER', 'flm_multiple_suppliers.validate_supplier_percentages' , l_returnStatus);
55: RETURN;
56: END IF;
57: ELSE
58: RAISE SUPPLIER_PERC_MISMATCH;

Line 67: log('Suppliers percentages dont sum to 100%', 'flm_multiple_suppliers.validate_supplier_percentages' , l_returnStatus);

63: WHEN SUPPLIER_PERC_MISMATCH THEN
64: x_retcode := fnd_api.g_ret_sts_error;
65: fnd_message.set_name('FLM','FLM_SUP_PERC_MISMATCH_ERR');
66: x_err_msg := fnd_message.get;
67: log('Suppliers percentages dont sum to 100%', 'flm_multiple_suppliers.validate_supplier_percentages' , l_returnStatus);
68:
69: WHEN OTHERS THEN
70: x_retcode := fnd_api.g_ret_sts_error;
71: x_err_msg := SQLCODE || substr(SQLERRM, 1, 200);

Line 72: log('exception occurred ' || x_err_msg, 'flm_multiple_suppliers.validate_supplier_percentages' , l_returnStatus);

68:
69: WHEN OTHERS THEN
70: x_retcode := fnd_api.g_ret_sts_error;
71: x_err_msg := SQLCODE || substr(SQLERRM, 1, 200);
72: log('exception occurred ' || x_err_msg, 'flm_multiple_suppliers.validate_supplier_percentages' , l_returnStatus);
73:
74: END validate_supplier_percentages;
75:
76: PROCEDURE GET_SUPPLIER(p_pull_seq_id IN NUMBER,

Line 144: log('After validating supplier', 'flm_multiple_suppliers.get_supplier' , l_returnStatus);

140: x_err_msg => x_err_msg);
141: IF(x_retcode <> fnd_api.g_ret_sts_success) THEN
142: raise fnd_api.g_exc_unexpected_error;
143: END IF;
144: log('After validating supplier', 'flm_multiple_suppliers.get_supplier' , l_returnStatus);
145:
146: --get the supplier_id and site_id from custom hook
147: flm_kanban_custom_pkg.get_default_supplier(p_pull_seq_id => p_pull_seq_id,
148: x_supplier_id => x_supplier_id,

Line 156: 'flm_multiple_suppliers.get_supplier' , l_returnStatus);

152: IF(x_retcode <> fnd_api.g_ret_sts_success) THEN
153: raise fnd_api.g_exc_unexpected_error;
154: END IF;
155: log('Custom hook returned supplier: ' || x_supplier_id || ' supplier site: ' || x_supplier_site_id,
156: 'flm_multiple_suppliers.get_supplier' , l_returnStatus);
157:
158: /* Check if the supplier returned by the custom hook is valid in the organization or not */
159: IF (x_supplier_id IS NOT NULL ) THEN
160: l_invalid_supplier := FLM_KANBAN_PUB.is_supplier_id_invalid(x_supplier_id);

Line 172: log('Using default logic to derive supplier', 'flm_multiple_suppliers.get_supplier' , l_returnStatus);

168: END IF;
169:
170: END IF; -- check for valid supplier
171:
172: log('Using default logic to derive supplier', 'flm_multiple_suppliers.get_supplier' , l_returnStatus);
173:
174: /* No supplier defined at pull sequence. Return null */
175: IF (l_supplier = NO_SUPPLIER) THEN
176: RETURN;

Line 218: 'flm_multiple_suppliers.get_supplier' , l_returnStatus);

214: IF (mul_sup_rec.Count = 1) THEN
215: x_supplier_id := mul_sup_rec(mul_sup_rec.first).supplier_id;
216: x_supplier_site_id := mul_sup_rec(mul_sup_rec.first).supplier_site_id;
217: log('Multiple supplier: ' || x_supplier_id || ' site id: ' || x_supplier_site_id ,
218: 'flm_multiple_suppliers.get_supplier' , l_returnStatus);
219: RETURN;
220: END IF;
221: l_max_act_sup_cards := 0;
222: FOR i IN 1..mul_sup_rec.Count LOOP

Line 246: 'flm_multiple_suppliers.get_supplier' , l_returnStatus);

242: x_supplier_id := mul_sup_rec(mul_sup_rec.first).supplier_id;
243: x_supplier_site_id := mul_sup_rec(mul_sup_rec.first).supplier_site_id;
244:
245: log('Multiple supplier: ' || x_supplier_id || ' site id: ' || x_supplier_site_id ,
246: 'flm_multiple_suppliers.get_supplier' , l_returnStatus);
247:
248: RETURN;
249:
250: EXCEPTION

Line 254: log('Exception: ' || x_err_msg, 'flm_multiple_suppliers.get_supplier' , l_returnStatus);

250: EXCEPTION
251: WHEN OTHERS THEN
252: x_retcode := fnd_api.g_ret_sts_error;
253: x_err_msg := SQLCODE || substr(SQLERRM, 1, 200);
254: log('Exception: ' || x_err_msg, 'flm_multiple_suppliers.get_supplier' , l_returnStatus);
255: END GET_SUPPLIER;
256:
257:
258: PROCEDURE multiple_supplier_kanban_cards(p_pull_seq_id IN NUMBER,

Line 292: log('Calculating percentages', 'flm_multiple_suppliers.multiple_supplier_kanban_cards' , l_returnStatus);

288: END IF;
289: /* Update all the suppliers except last with cards = round(Total Number of cards*Sourcing %)
290: * For the last supplier update with the difference between Total Number of cards and cards for other suppliers
291: */
292: log('Calculating percentages', 'flm_multiple_suppliers.multiple_supplier_kanban_cards' , l_returnStatus);
293: SELECT number_of_cards,future_no_of_cards
294: INTO l_total_cards,l_tot_fut_cards
295: FROM mtl_kanban_pull_sequences
296: WHERE pull_sequence_id = p_pull_seq_id;

Line 321: 'flm_multiple_suppliers.multiple_supplier_kanban_cards' , l_returnStatus);

317: future_no_of_cards=l_future_cards
318: WHERE CURRENT OF supplier_cur;
319:
320: log('Supplier: ' || supplier_rec.supplier_id || ' cards: ' || l_supplier_cards||' Future Cards:'||l_future_cards,
321: 'flm_multiple_suppliers.multiple_supplier_kanban_cards' , l_returnStatus);
322:
323: supplier_rec_last := supplier_rec;
324: FETCH supplier_cur INTO supplier_rec;
325: EXIT WHEN supplier_cur%NOTFOUND;

Line 355: END FLM_MULTIPLE_SUPPLIERS;

351: x_err_msg := SQLCODE || substr(SQLERRM, 1, 200);
352:
353: END multiple_supplier_kanban_cards;
354:
355: END FLM_MULTIPLE_SUPPLIERS;