25: END api_log;
26:
27: PROCEDURE create_txn_ext_attrib_dtls(
28: p_api_version IN number,
29: p_commit IN varchar2 := fnd_api.g_false,
30: p_init_msg_list IN varchar2 := fnd_api.g_false,
31: p_validation_level IN number := fnd_api.g_valid_level_full,
32: p_txn_ext_attrib_vals_rec IN OUT NOCOPY csi_t_datastructures_grp.txn_ext_attrib_vals_rec,
33: x_return_status OUT NOCOPY varchar2,
26:
27: PROCEDURE create_txn_ext_attrib_dtls(
28: p_api_version IN number,
29: p_commit IN varchar2 := fnd_api.g_false,
30: p_init_msg_list IN varchar2 := fnd_api.g_false,
31: p_validation_level IN number := fnd_api.g_valid_level_full,
32: p_txn_ext_attrib_vals_rec IN OUT NOCOPY csi_t_datastructures_grp.txn_ext_attrib_vals_rec,
33: x_return_status OUT NOCOPY varchar2,
34: x_msg_count OUT NOCOPY number,
27: PROCEDURE create_txn_ext_attrib_dtls(
28: p_api_version IN number,
29: p_commit IN varchar2 := fnd_api.g_false,
30: p_init_msg_list IN varchar2 := fnd_api.g_false,
31: p_validation_level IN number := fnd_api.g_valid_level_full,
32: p_txn_ext_attrib_vals_rec IN OUT NOCOPY csi_t_datastructures_grp.txn_ext_attrib_vals_rec,
33: x_return_status OUT NOCOPY varchar2,
34: x_msg_count OUT NOCOPY number,
35: x_msg_data OUT NOCOPY varchar2)
50: -- Standard Start of API savepoint
51: SAVEPOINT create_txn_ext_attrib_dtls;
52:
53: -- Initialize message list if p_init_msg_list is set to TRUE.
54: IF fnd_api.to_Boolean( p_init_msg_list ) THEN
55: fnd_msg_pub.initialize;
56: END IF;
57:
58: -- Initialize API return status to success
55: fnd_msg_pub.initialize;
56: END IF;
57:
58: -- Initialize API return status to success
59: x_return_status := fnd_api.G_RET_STS_SUCCESS;
60:
61: -- Standard call to check for call compatibility.
62: IF NOT
63:
60:
61: -- Standard call to check for call compatibility.
62: IF NOT
63:
64: fnd_api.Compatible_API_Call (
65: p_current_version_number => l_api_version,
66: p_caller_version_number => p_api_version,
67: p_api_name => l_api_name,
68: p_pkg_name => G_PKG_NAME) THEN
66: p_caller_version_number => p_api_version,
67: p_api_name => l_api_name,
68: p_pkg_name => G_PKG_NAME) THEN
69:
70: RAISE fnd_api.g_exc_unexpected_error;
71:
72: END IF;
73:
74: -- Check the profile option debug_level for debug message reporting
89:
90: END IF;
91:
92: -- Added for CZ Integration (Begin)
93: IF NVL(p_txn_ext_attrib_vals_rec.attribute_source_id,fnd_api.g_miss_num)
94: = fnd_api.g_miss_num
95: THEN
96: IF p_txn_ext_attrib_vals_rec.api_caller_identity <> 'CONFIG'
97: THEN
90: END IF;
91:
92: -- Added for CZ Integration (Begin)
93: IF NVL(p_txn_ext_attrib_vals_rec.attribute_source_id,fnd_api.g_miss_num)
94: = fnd_api.g_miss_num
95: THEN
96: IF p_txn_ext_attrib_vals_rec.api_caller_identity <> 'CONFIG'
97: THEN
98: FND_MESSAGE.set_name('CSI','CSI_TXN_NOT_CZ_CALLER');
97: THEN
98: FND_MESSAGE.set_name('CSI','CSI_TXN_NOT_CZ_CALLER');
99: FND_MESSAGE.set_token('API_CALLER',p_txn_ext_attrib_vals_rec.api_caller_identity) ;
100: FND_MSG_PUB.add;
101: RAISE FND_API.g_exc_error;
102: END IF ;
103: -- get the attrib_source_id
104: IF NVL(p_txn_ext_attrib_vals_rec.attribute_code, fnd_api.g_miss_char) <> fnd_api.g_miss_char
105: AND NVL(p_txn_ext_attrib_vals_rec.attribute_level, fnd_api.g_miss_char) <> fnd_api.g_miss_char
100: FND_MSG_PUB.add;
101: RAISE FND_API.g_exc_error;
102: END IF ;
103: -- get the attrib_source_id
104: IF NVL(p_txn_ext_attrib_vals_rec.attribute_code, fnd_api.g_miss_char) <> fnd_api.g_miss_char
105: AND NVL(p_txn_ext_attrib_vals_rec.attribute_level, fnd_api.g_miss_char) <> fnd_api.g_miss_char
106: THEN
107: ---Both the attribs are given
108: get_ext_attrib_id ( p_txn_ext_attrib_vals_rec.attribute_code
101: RAISE FND_API.g_exc_error;
102: END IF ;
103: -- get the attrib_source_id
104: IF NVL(p_txn_ext_attrib_vals_rec.attribute_code, fnd_api.g_miss_char) <> fnd_api.g_miss_char
105: AND NVL(p_txn_ext_attrib_vals_rec.attribute_level, fnd_api.g_miss_char) <> fnd_api.g_miss_char
106: THEN
107: ---Both the attribs are given
108: get_ext_attrib_id ( p_txn_ext_attrib_vals_rec.attribute_code
109: ,p_txn_ext_attrib_vals_rec.attribute_level
113: ,x_return_status
114: ,x_error_msg );
115:
116: debug ('After calling get_ext_attrib_id : attrib id - attrib_source_table :'|| x_attribute_id || ' - '||p_txn_ext_attrib_vals_rec.attrib_source_table);
117: IF NOT (x_return_status = fnd_api.g_ret_sts_success)
118: THEN
119: debug ('Call to get_ext_attrib_id failed ..');
120: FND_MESSAGE.set_token('ATTRIB_LEVEL',p_txn_ext_attrib_vals_rec.attribute_level);
121: fnd_msg_pub.add;
118: THEN
119: debug ('Call to get_ext_attrib_id failed ..');
120: FND_MESSAGE.set_token('ATTRIB_LEVEL',p_txn_ext_attrib_vals_rec.attribute_level);
121: fnd_msg_pub.add;
122: RAISE fnd_api.g_exc_error;
123: END IF ;
124: ELSIF NVL(p_txn_ext_attrib_vals_rec.attribute_code, fnd_api.g_miss_char) <> fnd_api.g_miss_char
125: AND NVL(p_txn_ext_attrib_vals_rec.attribute_level, fnd_api.g_miss_char) = fnd_api.g_miss_char
126: THEN
120: FND_MESSAGE.set_token('ATTRIB_LEVEL',p_txn_ext_attrib_vals_rec.attribute_level);
121: fnd_msg_pub.add;
122: RAISE fnd_api.g_exc_error;
123: END IF ;
124: ELSIF NVL(p_txn_ext_attrib_vals_rec.attribute_code, fnd_api.g_miss_char) <> fnd_api.g_miss_char
125: AND NVL(p_txn_ext_attrib_vals_rec.attribute_level, fnd_api.g_miss_char) = fnd_api.g_miss_char
126: THEN
127: ---Attrib level is NOT passed
128: ---First trywith different attrib levels
121: fnd_msg_pub.add;
122: RAISE fnd_api.g_exc_error;
123: END IF ;
124: ELSIF NVL(p_txn_ext_attrib_vals_rec.attribute_code, fnd_api.g_miss_char) <> fnd_api.g_miss_char
125: AND NVL(p_txn_ext_attrib_vals_rec.attribute_level, fnd_api.g_miss_char) = fnd_api.g_miss_char
126: THEN
127: ---Attrib level is NOT passed
128: ---First trywith different attrib levels
129: debug ('Attribute level is not passed ');
149: ,p_txn_ext_attrib_vals_rec.attrib_source_table
150: ,x_return_status
151: ,x_error_msg );
152:
153: IF NOT (x_return_status = fnd_api.g_ret_sts_success)
154: THEN
155: IF i=4 THEN
156: debug ('Call to get_ext_attrib_id failed ..');
157: FND_MESSAGE.set_token('ATTRIB_LEVEL','');
155: IF i=4 THEN
156: debug ('Call to get_ext_attrib_id failed ..');
157: FND_MESSAGE.set_token('ATTRIB_LEVEL','');
158: fnd_msg_pub.add;
159: RAISE fnd_api.g_exc_error;
160: END IF;
161: END IF ;
162:
163: IF NVL(x_attribute_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
159: RAISE fnd_api.g_exc_error;
160: END IF;
161: END IF ;
162:
163: IF NVL(x_attribute_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
164: THEN
165: ---Attribute ID is derived
166: ---Exit from this loop we don't need to go further
167: EXIT ;
175: fnd_message.set_token('MESSAGE',
176: 'No Attribute code is passed ');
177: fnd_msg_pub.add;
178: debug ( 'Attribute Code is null so raise the error :');
179: RAISE fnd_api.g_exc_error;
180: END IF ;
181: debug ( 'checking x_attribute_id :'|| x_attribute_id) ;
182: IF NVL(x_attribute_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
183: THEN
178: debug ( 'Attribute Code is null so raise the error :');
179: RAISE fnd_api.g_exc_error;
180: END IF ;
181: debug ( 'checking x_attribute_id :'|| x_attribute_id) ;
182: IF NVL(x_attribute_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
183: THEN
184: p_txn_ext_attrib_vals_rec.attribute_source_id := x_attribute_id ;
185: ELSE
186: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
187: fnd_message.set_token('MESSAGE',
188: 'Either no Attribute code is passed OR csi_t_extend_attribs_pkg.get_attrib_id failed');
189: fnd_msg_pub.add;
190: debug ( 'Attribute id is null so raise the error :');
191: RAISE fnd_api.g_exc_error;
192: END IF ;
193: END IF ; --(p_txn_ext_attrib_vals_rec.attrib_source_id is not passed
194: -- Added for CZ Integration (End)
195:
215: p_attrib_source_table => p_txn_ext_attrib_vals_rec.attrib_source_table,
216: p_attrib_source_id => p_txn_ext_attrib_vals_rec.attribute_source_id,
217: x_return_status => l_return_status);
218:
219: IF l_return_status <> fnd_api.g_ret_sts_success THEN
220: RAISE fnd_api.g_exc_error;
221: END IF;
222:
223: -- defaulting the preserve detail flag
216: p_attrib_source_id => p_txn_ext_attrib_vals_rec.attribute_source_id,
217: x_return_status => l_return_status);
218:
219: IF l_return_status <> fnd_api.g_ret_sts_success THEN
220: RAISE fnd_api.g_exc_error;
221: END IF;
222:
223: -- defaulting the preserve detail flag
224:
221: END IF;
222:
223: -- defaulting the preserve detail flag
224:
225: SELECT decode( nvl(p_txn_ext_attrib_vals_rec.preserve_detail_flag,fnd_api.g_miss_char),
226: fnd_api.g_miss_char, 'Y', p_txn_ext_attrib_vals_rec.preserve_detail_flag)
227: INTO l_preserve_detail_flag
228: FROM sys.dual;
229:
222:
223: -- defaulting the preserve detail flag
224:
225: SELECT decode( nvl(p_txn_ext_attrib_vals_rec.preserve_detail_flag,fnd_api.g_miss_char),
226: fnd_api.g_miss_char, 'Y', p_txn_ext_attrib_vals_rec.preserve_detail_flag)
227: INTO l_preserve_detail_flag
228: FROM sys.dual;
229:
230: -- defaulting the process_flag
227: INTO l_preserve_detail_flag
228: FROM sys.dual;
229:
230: -- defaulting the process_flag
231: IF nvl(p_txn_ext_attrib_vals_rec.attribute_value, fnd_api.g_miss_char) = fnd_api.g_miss_char
232: THEN
233: l_process_flag := 'N';
234: ELSE
235: l_process_flag := p_txn_ext_attrib_vals_rec.process_flag;
234: ELSE
235: l_process_flag := p_txn_ext_attrib_vals_rec.process_flag;
236: END IF;
237:
238: IF nvl(p_txn_ext_attrib_vals_rec.txn_attrib_detail_id,fnd_api.g_miss_num) <>
239: fnd_api.g_miss_num THEN
240: l_txn_attrib_detail_id := p_txn_ext_attrib_vals_rec.txn_attrib_detail_id;
241: END IF;
242:
235: l_process_flag := p_txn_ext_attrib_vals_rec.process_flag;
236: END IF;
237:
238: IF nvl(p_txn_ext_attrib_vals_rec.txn_attrib_detail_id,fnd_api.g_miss_num) <>
239: fnd_api.g_miss_num THEN
240: l_txn_attrib_detail_id := p_txn_ext_attrib_vals_rec.txn_attrib_detail_id;
241: END IF;
242:
243: --debug info
285: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
286: fnd_message.set_token('MESSAGE',
287: 'csi_t_extend_attribs_pkg.insert_row Failed. '||substr(sqlerrm,1,200));
288: fnd_msg_pub.add;
289: RAISE fnd_api.g_exc_error;
290: END;
291:
292: p_txn_ext_attrib_vals_rec.txn_attrib_detail_id := l_txn_attrib_detail_id;
293:
291:
292: p_txn_ext_attrib_vals_rec.txn_attrib_detail_id := l_txn_attrib_detail_id;
293:
294: -- Standard check of p_commit.
295: IF fnd_api.To_Boolean( p_commit ) THEN
296: COMMIT WORK;
297: END IF;
298:
299: IF csi_t_gen_utility_pvt.g_debug = fnd_api.g_true THEN
295: IF fnd_api.To_Boolean( p_commit ) THEN
296: COMMIT WORK;
297: END IF;
298:
299: IF csi_t_gen_utility_pvt.g_debug = fnd_api.g_true THEN
300: csi_t_gen_utility_pvt.set_debug_off;
301: END IF;
302:
303: -- Standard call to get message count and if count is get message info.
305: p_count => x_msg_count,
306: p_data => x_msg_data);
307:
308: EXCEPTION
309: WHEN fnd_api.g_exc_error THEN
310:
311: ROLLBACK TO create_txn_ext_attrib_dtls;
312: x_return_status := fnd_api.g_ret_sts_error ;
313: fnd_msg_pub.count_and_get (
308: EXCEPTION
309: WHEN fnd_api.g_exc_error THEN
310:
311: ROLLBACK TO create_txn_ext_attrib_dtls;
312: x_return_status := fnd_api.g_ret_sts_error ;
313: fnd_msg_pub.count_and_get (
314: p_count => x_msg_count,
315: p_data => x_msg_data);
316:
313: fnd_msg_pub.count_and_get (
314: p_count => x_msg_count,
315: p_data => x_msg_data);
316:
317: WHEN fnd_api.g_exc_unexpected_error THEN
318:
319: ROLLBACK TO create_txn_ext_attrib_dtls;
320: x_return_status := fnd_api.g_ret_sts_unexp_error ;
321:
316:
317: WHEN fnd_api.g_exc_unexpected_error THEN
318:
319: ROLLBACK TO create_txn_ext_attrib_dtls;
320: x_return_status := fnd_api.g_ret_sts_unexp_error ;
321:
322: fnd_msg_pub.count_and_get(
323: p_count => x_msg_count,
324: p_data => x_msg_data);
325:
326: WHEN OTHERS THEN
327:
328: ROLLBACK TO create_txn_ext_attrib_dtls;
329: x_return_status := fnd_api.g_ret_sts_unexp_error ;
330:
331: IF fnd_msg_pub.Check_Msg_Level(
332: p_message_level => fnd_msg_pub.G_MSG_LVL_UNEXP_ERROR) THEN
333:
344: END create_txn_ext_attrib_dtls;
345:
346: PROCEDURE update_txn_ext_attrib_dtls(
347: p_api_version IN number,
348: p_commit IN varchar2 := fnd_api.g_false,
349: p_init_msg_list IN varchar2 := fnd_api.g_false,
350: p_validation_level IN number := fnd_api.g_valid_level_full,
351: p_txn_ext_attrib_vals_tbl IN csi_t_datastructures_grp.txn_ext_attrib_vals_tbl,
352: x_return_status OUT NOCOPY varchar2,
345:
346: PROCEDURE update_txn_ext_attrib_dtls(
347: p_api_version IN number,
348: p_commit IN varchar2 := fnd_api.g_false,
349: p_init_msg_list IN varchar2 := fnd_api.g_false,
350: p_validation_level IN number := fnd_api.g_valid_level_full,
351: p_txn_ext_attrib_vals_tbl IN csi_t_datastructures_grp.txn_ext_attrib_vals_tbl,
352: x_return_status OUT NOCOPY varchar2,
353: x_msg_count OUT NOCOPY number,
346: PROCEDURE update_txn_ext_attrib_dtls(
347: p_api_version IN number,
348: p_commit IN varchar2 := fnd_api.g_false,
349: p_init_msg_list IN varchar2 := fnd_api.g_false,
350: p_validation_level IN number := fnd_api.g_valid_level_full,
351: p_txn_ext_attrib_vals_tbl IN csi_t_datastructures_grp.txn_ext_attrib_vals_tbl,
352: x_return_status OUT NOCOPY varchar2,
353: x_msg_count OUT NOCOPY number,
354: x_msg_data OUT NOCOPY varchar2)
387: -- Standard Start of API savepoint
388: SAVEPOINT update_txn_ext_attrib_dtls;
389:
390: -- Initialize message list if p_init_msg_list is set to TRUE.
391: IF fnd_api.to_Boolean( p_init_msg_list ) THEN
392: fnd_msg_pub.initialize;
393: END IF;
394:
395: -- Initialize API return status to success
392: fnd_msg_pub.initialize;
393: END IF;
394:
395: -- Initialize API return status to success
396: x_return_status := fnd_api.G_RET_STS_SUCCESS;
397:
398: -- Standard call to check for call compatibility.
399: IF NOT
400:
397:
398: -- Standard call to check for call compatibility.
399: IF NOT
400:
401: fnd_api.Compatible_API_Call (
402: p_current_version_number => l_api_version,
403: p_caller_version_number => p_api_version,
404: p_api_name => l_api_name,
405: p_pkg_name => g_pkg_name) THEN
403: p_caller_version_number => p_api_version,
404: p_api_name => l_api_name,
405: p_pkg_name => g_pkg_name) THEN
406:
407: RAISE fnd_api.g_exc_unexpected_error;
408:
409: END IF;
410:
411: -- Check the profile option debug_level for debug message reporting
432: END IF;
433:
434: -- Added for CZ Integration (Begin)
435: IF NVL(l_txn_ext_attrib_vals_tbl(l_ind).attribute_source_id,
436: fnd_api.g_miss_num) = fnd_api.g_miss_num
437: THEN
438: IF l_txn_ext_attrib_vals_tbl(l_ind).api_caller_identity <> 'CONFIG'
439: THEN
440: FND_MESSAGE.set_name('CSI','CSI_TXN_NOT_CZ_CALLER');
439: THEN
440: FND_MESSAGE.set_name('CSI','CSI_TXN_NOT_CZ_CALLER');
441: FND_MESSAGE.set_token('API_CALLER',l_txn_ext_attrib_vals_tbl(l_ind).api_caller_identity) ;
442: FND_MSG_PUB.add;
443: RAISE FND_API.g_exc_error;
444: END IF ;
445: -- get the attrib_source_id
446: IF NVL(l_txn_ext_attrib_vals_tbl(l_ind).attribute_code, fnd_api.g_miss_char) <> fnd_api.g_miss_char
447: AND NVL(l_txn_ext_attrib_vals_tbl(l_ind).attribute_level, fnd_api.g_miss_char) <> fnd_api.g_miss_char
442: FND_MSG_PUB.add;
443: RAISE FND_API.g_exc_error;
444: END IF ;
445: -- get the attrib_source_id
446: IF NVL(l_txn_ext_attrib_vals_tbl(l_ind).attribute_code, fnd_api.g_miss_char) <> fnd_api.g_miss_char
447: AND NVL(l_txn_ext_attrib_vals_tbl(l_ind).attribute_level, fnd_api.g_miss_char) <> fnd_api.g_miss_char
448: THEN
449: ---Both the attribs are given
450: get_ext_attrib_id ( l_txn_ext_attrib_vals_tbl(l_ind).attribute_code
443: RAISE FND_API.g_exc_error;
444: END IF ;
445: -- get the attrib_source_id
446: IF NVL(l_txn_ext_attrib_vals_tbl(l_ind).attribute_code, fnd_api.g_miss_char) <> fnd_api.g_miss_char
447: AND NVL(l_txn_ext_attrib_vals_tbl(l_ind).attribute_level, fnd_api.g_miss_char) <> fnd_api.g_miss_char
448: THEN
449: ---Both the attribs are given
450: get_ext_attrib_id ( l_txn_ext_attrib_vals_tbl(l_ind).attribute_code
451: ,l_txn_ext_attrib_vals_tbl(l_ind).attribute_level
454: ,l_txn_ext_attrib_vals_tbl(l_ind).attrib_source_table
455: ,x_return_status
456: ,l_error_msg );
457:
458: IF NOT (x_return_status = fnd_api.g_ret_sts_success)
459: THEN
460: debug ('Call to get_ext_attrib_id failed ..');
461: FND_MESSAGE.set_token('ATTRIB_LEVEL',l_txn_ext_attrib_vals_tbl(l_ind).attribute_level);
462: fnd_msg_pub.add;
459: THEN
460: debug ('Call to get_ext_attrib_id failed ..');
461: FND_MESSAGE.set_token('ATTRIB_LEVEL',l_txn_ext_attrib_vals_tbl(l_ind).attribute_level);
462: fnd_msg_pub.add;
463: RAISE fnd_api.g_exc_error;
464: END IF ;
465: ELSIF NVL(l_txn_ext_attrib_vals_tbl(l_ind).attribute_code, fnd_api.g_miss_char) <> fnd_api.g_miss_char
466: AND NVL(l_txn_ext_attrib_vals_tbl(l_ind).attribute_level, fnd_api.g_miss_char) = fnd_api.g_miss_char
467: THEN
461: FND_MESSAGE.set_token('ATTRIB_LEVEL',l_txn_ext_attrib_vals_tbl(l_ind).attribute_level);
462: fnd_msg_pub.add;
463: RAISE fnd_api.g_exc_error;
464: END IF ;
465: ELSIF NVL(l_txn_ext_attrib_vals_tbl(l_ind).attribute_code, fnd_api.g_miss_char) <> fnd_api.g_miss_char
466: AND NVL(l_txn_ext_attrib_vals_tbl(l_ind).attribute_level, fnd_api.g_miss_char) = fnd_api.g_miss_char
467: THEN
468: ---Attrib level is NOT passed
469: ---First trywith different attrib levels
462: fnd_msg_pub.add;
463: RAISE fnd_api.g_exc_error;
464: END IF ;
465: ELSIF NVL(l_txn_ext_attrib_vals_tbl(l_ind).attribute_code, fnd_api.g_miss_char) <> fnd_api.g_miss_char
466: AND NVL(l_txn_ext_attrib_vals_tbl(l_ind).attribute_level, fnd_api.g_miss_char) = fnd_api.g_miss_char
467: THEN
468: ---Attrib level is NOT passed
469: ---First trywith different attrib levels
470: debug ('Attribute level is not passed ');
491: ,l_txn_ext_attrib_vals_tbl(l_ind).attrib_source_table
492: ,x_return_status
493: ,l_error_msg );
494:
495: IF NOT (x_return_status = fnd_api.g_ret_sts_success)
496: THEN
497: IF i=4 THEN
498: debug ('Call to get_ext_attrib_id failed ..');
499: FND_MESSAGE.set_token('ATTRIB_LEVEL','');
497: IF i=4 THEN
498: debug ('Call to get_ext_attrib_id failed ..');
499: FND_MESSAGE.set_token('ATTRIB_LEVEL','');
500: fnd_msg_pub.add;
501: RAISE fnd_api.g_exc_error;
502: END IF;
503: END IF ;
504:
505: debug ( 'l_attribute_id :'|| l_attribute_id) ;
502: END IF;
503: END IF ;
504:
505: debug ( 'l_attribute_id :'|| l_attribute_id) ;
506: IF NVL(l_attribute_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
507: THEN
508: ---Attribute ID is derived
509: ---Exit from this loop we dont need to go further
510: EXIT ;
516: fnd_message.set_token('MESSAGE',
517: 'No attribute code is passed ');
518: fnd_msg_pub.add;
519: debug ( 'Attribute id is null so raise the error :');
520: RAISE fnd_api.g_exc_error;
521: END IF ;
522: IF NVL(l_attribute_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
523: THEN
524: l_txn_ext_attrib_vals_tbl(l_ind).attribute_source_id := l_attribute_id ;
518: fnd_msg_pub.add;
519: debug ( 'Attribute id is null so raise the error :');
520: RAISE fnd_api.g_exc_error;
521: END IF ;
522: IF NVL(l_attribute_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
523: THEN
524: l_txn_ext_attrib_vals_tbl(l_ind).attribute_source_id := l_attribute_id ;
525: ELSE
526: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
527: fnd_message.set_token('MESSAGE',
528: 'csi_t_extend_attribs_pkg.get_attrib_id failed');
529: fnd_msg_pub.add;
530: debug ( 'Attribute id is null so raise the error :');
531: RAISE fnd_api.g_exc_error;
532: END IF ;
533: END IF ; --l_txn_ext_attrib_vals_tbl(l_ind).source_id
534: -- Added for CZ Integration (End)
535:
544: csi_t_vldn_routines_pvt.validate_txn_attrib_detail_id(
545: p_txn_attrib_detail_id => l_ext_att_id,
546: x_return_status => l_return_status);
547:
548: IF l_return_status <> fnd_api.g_ret_sts_success THEN
549:
550: FND_MESSAGE.set_name('CSI','CSI_TXN_EXT_ATTRIB_ID_INVALID');
551: FND_MESSAGE.set_token('EXT_ATT_ID',l_ext_att_id);
552: fnd_msg_pub.add;
549:
550: FND_MESSAGE.set_name('CSI','CSI_TXN_EXT_ATTRIB_ID_INVALID');
551: FND_MESSAGE.set_token('EXT_ATT_ID',l_ext_att_id);
552: fnd_msg_pub.add;
553: RAISE fnd_api.g_exc_error;
554:
555: END IF;
556:
557: l_ea_rec.txn_attrib_detail_id := l_ext_att_id;
572: FND_MESSAGE.set_name('CSI','CSI_TXN_UPD_DEL_NOT_ALLOWED');
573: FND_MESSAGE.set_token('LVL_ID', l_ext_att_id);
574: FND_MESSAGE.set_token('STATUS',l_processing_status);
575: fnd_msg_pub.add;
576: RAISE fnd_api.g_exc_error;
577:
578: END IF;
579:
580: IF nvl(l_txn_ext_attrib_vals_tbl(l_ind).attribute_source_id, fnd_api.g_miss_num) <>
576: RAISE fnd_api.g_exc_error;
577:
578: END IF;
579:
580: IF nvl(l_txn_ext_attrib_vals_tbl(l_ind).attribute_source_id, fnd_api.g_miss_num) <>
581: fnd_api.g_miss_num
582: THEN
583:
584: csi_t_vldn_routines_pvt.validate_attrib_source_id(
577:
578: END IF;
579:
580: IF nvl(l_txn_ext_attrib_vals_tbl(l_ind).attribute_source_id, fnd_api.g_miss_num) <>
581: fnd_api.g_miss_num
582: THEN
583:
584: csi_t_vldn_routines_pvt.validate_attrib_source_id(
585: p_attrib_source_table => l_txn_ext_attrib_vals_tbl(l_ind).attrib_source_table,
585: p_attrib_source_table => l_txn_ext_attrib_vals_tbl(l_ind).attrib_source_table,
586: p_attrib_source_id => l_txn_ext_attrib_vals_tbl(l_ind).attribute_source_id,
587: x_return_status => l_return_status);
588:
589: IF l_return_status <> fnd_api.g_ret_sts_success THEN
590: raise fnd_api.g_exc_error;
591: END IF;
592:
593: END IF;
586: p_attrib_source_id => l_txn_ext_attrib_vals_tbl(l_ind).attribute_source_id,
587: x_return_status => l_return_status);
588:
589: IF l_return_status <> fnd_api.g_ret_sts_success THEN
590: raise fnd_api.g_exc_error;
591: END IF;
592:
593: END IF;
594:
592:
593: END IF;
594:
595: l_ea_rec.attribute_source_id :=
596: nvl(l_txn_ext_attrib_vals_tbl(l_ind).attribute_source_id, fnd_api.g_miss_num);
597:
598: l_ea_rec.attrib_source_table :=
599: nvl(l_txn_ext_attrib_vals_tbl(l_ind).attrib_source_table, fnd_api.g_miss_char);
600:
595: l_ea_rec.attribute_source_id :=
596: nvl(l_txn_ext_attrib_vals_tbl(l_ind).attribute_source_id, fnd_api.g_miss_num);
597:
598: l_ea_rec.attrib_source_table :=
599: nvl(l_txn_ext_attrib_vals_tbl(l_ind).attrib_source_table, fnd_api.g_miss_char);
600:
601: l_ea_rec.attribute_value :=
602: l_txn_ext_attrib_vals_tbl(l_ind).attribute_value;
603:
600:
601: l_ea_rec.attribute_value :=
602: l_txn_ext_attrib_vals_tbl(l_ind).attribute_value;
603:
604: IF nvl(l_ea_rec.attribute_value, fnd_api.g_miss_char) = fnd_api.g_miss_char
605: AND
606: l_ea_cur_rec.attribute_value = NULL
607: THEN
608: l_ea_rec.process_flag := 'N';
700: p_attribute12 => l_ea_rec.attribute12 ,
701: p_attribute13 => l_ea_rec.attribute13 ,
702: p_attribute14 => l_ea_rec.attribute14 ,
703: p_attribute15 => l_ea_rec.attribute15 ,
704: p_created_by => fnd_api.g_miss_num,
705: p_creation_date => fnd_api.g_miss_date,
706: p_last_updated_by => g_user_id,
707: p_last_update_date => sysdate,
708: p_last_update_login => g_login_id,
701: p_attribute13 => l_ea_rec.attribute13 ,
702: p_attribute14 => l_ea_rec.attribute14 ,
703: p_attribute15 => l_ea_rec.attribute15 ,
704: p_created_by => fnd_api.g_miss_num,
705: p_creation_date => fnd_api.g_miss_date,
706: p_last_updated_by => g_user_id,
707: p_last_update_date => sysdate,
708: p_last_update_login => g_login_id,
709: p_object_version_number => l_ea_rec.object_version_number,
714: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
715: fnd_message.set_token('MESSAGE',
716: 'csi_t_extend_attribs_pkg.update_row Failed. '||substr(sqlerrm,1,200));
717: fnd_msg_pub.add;
718: raise fnd_api.g_exc_error;
719: end;
720:
721: END LOOP;
722: END LOOP;
722: END LOOP;
723:
724: END IF;
725: -- Standard check of p_commit.
726: IF fnd_api.To_Boolean( p_commit ) THEN
727: COMMIT WORK;
728: END IF;
729: -- Standard call to get message count and if count is get message info.
730: fnd_msg_pub.count_and_get(
731: p_count => x_msg_count,
732: p_data => x_msg_data);
733:
734: EXCEPTION
735: WHEN fnd_api.g_exc_error THEN
736:
737: ROLLBACK TO update_txn_ext_attrib_dtls;
738: x_return_status := fnd_api.g_ret_sts_error ;
739: fnd_msg_pub.count_and_get (
734: EXCEPTION
735: WHEN fnd_api.g_exc_error THEN
736:
737: ROLLBACK TO update_txn_ext_attrib_dtls;
738: x_return_status := fnd_api.g_ret_sts_error ;
739: fnd_msg_pub.count_and_get (
740: p_count => x_msg_count,
741: p_data => x_msg_data);
742:
739: fnd_msg_pub.count_and_get (
740: p_count => x_msg_count,
741: p_data => x_msg_data);
742:
743: WHEN fnd_api.g_exc_unexpected_error THEN
744:
745: ROLLBACK TO update_txn_ext_attrib_dtls;
746: x_return_status := fnd_api.g_ret_sts_unexp_error ;
747:
742:
743: WHEN fnd_api.g_exc_unexpected_error THEN
744:
745: ROLLBACK TO update_txn_ext_attrib_dtls;
746: x_return_status := fnd_api.g_ret_sts_unexp_error ;
747:
748: fnd_msg_pub.count_and_get(
749: p_count => x_msg_count,
750: p_data => x_msg_data);
751:
752: WHEN OTHERS THEN
753:
754: ROLLBACK TO update_txn_ext_attrib_dtls;
755: x_return_status := fnd_api.g_ret_sts_unexp_error ;
756:
757: IF fnd_msg_pub.Check_Msg_Level(
758: p_message_level => fnd_msg_pub.G_MSG_LVL_UNEXP_ERROR) THEN
759:
771:
772: PROCEDURE delete_txn_ext_attrib_dtls
773: (
774: p_api_version IN NUMBER
775: ,p_commit IN VARCHAR2 := fnd_api.g_false
776: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
777: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
778: ,p_txn_ext_attrib_ids_tbl IN csi_t_datastructures_grp.txn_ext_attrib_ids_tbl
779: ,x_return_status OUT NOCOPY VARCHAR2
772: PROCEDURE delete_txn_ext_attrib_dtls
773: (
774: p_api_version IN NUMBER
775: ,p_commit IN VARCHAR2 := fnd_api.g_false
776: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
777: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
778: ,p_txn_ext_attrib_ids_tbl IN csi_t_datastructures_grp.txn_ext_attrib_ids_tbl
779: ,x_return_status OUT NOCOPY VARCHAR2
780: ,x_msg_count OUT NOCOPY NUMBER
773: (
774: p_api_version IN NUMBER
775: ,p_commit IN VARCHAR2 := fnd_api.g_false
776: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
777: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
778: ,p_txn_ext_attrib_ids_tbl IN csi_t_datastructures_grp.txn_ext_attrib_ids_tbl
779: ,x_return_status OUT NOCOPY VARCHAR2
780: ,x_msg_count OUT NOCOPY NUMBER
781: ,x_msg_data OUT NOCOPY VARCHAR2
801: -- Standard Start of API savepoint
802: SAVEPOINT delete_txn_ext_attrib_dtls;
803:
804: -- Initialize message list if p_init_msg_list is set to TRUE.
805: IF fnd_api.to_Boolean( p_init_msg_list ) THEN
806: fnd_msg_pub.initialize;
807: END IF;
808:
809: -- Initialize API return status to success
806: fnd_msg_pub.initialize;
807: END IF;
808:
809: -- Initialize API return status to success
810: x_return_status := fnd_api.G_RET_STS_SUCCESS;
811:
812: -- Standard call to check for call compatibility.
813: IF NOT
814:
811:
812: -- Standard call to check for call compatibility.
813: IF NOT
814:
815: fnd_api.Compatible_API_Call (
816: p_current_version_number => l_api_version,
817: p_caller_version_number => p_api_version,
818: p_api_name => l_api_name,
819: p_pkg_name => G_PKG_NAME) THEN
817: p_caller_version_number => p_api_version,
818: p_api_name => l_api_name,
819: p_pkg_name => G_PKG_NAME) THEN
820:
821: RAISE fnd_api.g_exc_unexpected_error;
822:
823: END IF;
824:
825: -- Check the profile option debug_level for debug message reporting
842: END IF;
843:
844: l_ext_att_id := p_txn_ext_attrib_ids_tbl(l_ind).txn_attrib_detail_id;
845:
846: IF nvl(l_ext_att_id, fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
847:
848: -- validate txn_attrib_detail_id
849: csi_t_vldn_routines_pvt.validate_txn_attrib_detail_id(
850: p_txn_attrib_detail_id => l_ext_att_id,
849: csi_t_vldn_routines_pvt.validate_txn_attrib_detail_id(
850: p_txn_attrib_detail_id => l_ext_att_id,
851: x_return_status => l_return_status);
852:
853: IF l_return_status <> fnd_api.g_ret_sts_success THEN
854:
855: FND_MESSAGE.set_name('CSI','CSI_TXN_EXT_ATTRIB_ID_INVALID');
856: FND_MESSAGE.set_token('EXT_ATT_ID',l_ext_att_id);
857: fnd_msg_pub.add;
854:
855: FND_MESSAGE.set_name('CSI','CSI_TXN_EXT_ATTRIB_ID_INVALID');
856: FND_MESSAGE.set_token('EXT_ATT_ID',l_ext_att_id);
857: fnd_msg_pub.add;
858: RAISE fnd_api.g_exc_error;
859:
860: END IF;
861:
862: csi_t_gen_utility_pvt.dump_api_info(
879: csi_t_vldn_routines_pvt.validate_txn_line_detail_id(
880: p_txn_line_detail_id => l_line_dtl_id,
881: x_return_status => l_return_status);
882:
883: IF l_return_status <> fnd_api.g_ret_sts_success THEN
884:
885: FND_MESSAGE.set_name('CSI','CSI_TXN_LINE_DTL_ID_INVALID');
886: FND_MESSAGE.set_token('LINE_DTL_ID',l_line_dtl_id);
887: fnd_msg_pub.add;
884:
885: FND_MESSAGE.set_name('CSI','CSI_TXN_LINE_DTL_ID_INVALID');
886: FND_MESSAGE.set_token('LINE_DTL_ID',l_line_dtl_id);
887: fnd_msg_pub.add;
888: RAISE fnd_api.g_exc_error;
889:
890: END IF;
891:
892: FOR ea_rec in ea_cur (l_line_dtl_id)
907:
908: END IF;
909:
910: -- Standard check of p_commit.
911: IF fnd_api.To_Boolean( p_commit ) THEN
912: COMMIT WORK;
913: END IF;
914:
915: -- Standard call to get message count and if count is get message info.
917: p_count => x_msg_count,
918: p_data => x_msg_data);
919:
920: EXCEPTION
921: WHEN fnd_api.g_exc_error THEN
922:
923: ROLLBACK TO delete_txn_ext_attrib_dtls;
924: x_return_status := fnd_api.g_ret_sts_error ;
925: fnd_msg_pub.count_and_get (
920: EXCEPTION
921: WHEN fnd_api.g_exc_error THEN
922:
923: ROLLBACK TO delete_txn_ext_attrib_dtls;
924: x_return_status := fnd_api.g_ret_sts_error ;
925: fnd_msg_pub.count_and_get (
926: p_count => x_msg_count,
927: p_data => x_msg_data);
928:
925: fnd_msg_pub.count_and_get (
926: p_count => x_msg_count,
927: p_data => x_msg_data);
928:
929: WHEN fnd_api.g_exc_unexpected_error THEN
930:
931: ROLLBACK TO delete_txn_ext_attrib_dtls;
932: x_return_status := fnd_api.g_ret_sts_unexp_error ;
933:
928:
929: WHEN fnd_api.g_exc_unexpected_error THEN
930:
931: ROLLBACK TO delete_txn_ext_attrib_dtls;
932: x_return_status := fnd_api.g_ret_sts_unexp_error ;
933:
934: fnd_msg_pub.count_and_get(
935: p_count => x_msg_count,
936: p_data => x_msg_data);
937:
938: WHEN OTHERS THEN
939:
940: ROLLBACK TO delete_txn_ext_attrib_dtls;
941: x_return_status := fnd_api.g_ret_sts_unexp_error ;
942:
943: IF fnd_msg_pub.check_msg_level(
944: p_message_level => fnd_msg_pub.g_msg_lvl_unexp_error) THEN
945:
1067: l_ind binary_integer;
1068:
1069: BEGIN
1070:
1071: x_return_status := fnd_api.g_ret_sts_success;
1072:
1073: l_select_stmt :=
1074: 'select attribute_id, attribute_level, master_organization_id,'||
1075: ' inventory_item_id, item_category_id, instance_id, attribute_code,'||
1312: p_txn_line_detail_tbl in csi_t_datastructures_grp.txn_line_detail_tbl,
1313: x_csi_ea_vals_tbl OUT NOCOPY csi_t_datastructures_grp.csi_ext_attrib_vals_tbl,
1314: x_return_status OUT NOCOPY varchar2)
1315: IS
1316: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
1317: l_ceav_tbl csi_t_datastructures_grp.csi_ext_attrib_vals_tbl;
1318: l_tmp_ceav_tbl csi_t_datastructures_grp.csi_ext_attrib_vals_tbl;
1319: l_c_ind binary_integer := 0;
1320:
1318: l_tmp_ceav_tbl csi_t_datastructures_grp.csi_ext_attrib_vals_tbl;
1319: l_c_ind binary_integer := 0;
1320:
1321: BEGIN
1322: x_return_status := fnd_api.g_ret_sts_success;
1323: api_log('get_all_csi_ext_attrib_vals');
1324:
1325: IF p_txn_line_detail_tbl.COUNT > 0 THEN
1326: FOR l_ind IN p_txn_line_detail_tbl.FIRST .. p_txn_line_detail_tbl.LAST
1325: IF p_txn_line_detail_tbl.COUNT > 0 THEN
1326: FOR l_ind IN p_txn_line_detail_tbl.FIRST .. p_txn_line_detail_tbl.LAST
1327: LOOP
1328:
1329: IF nvl(p_txn_line_detail_tbl(l_ind).instance_id, fnd_api.g_miss_num) <>
1330: fnd_api.g_miss_num
1331: THEN
1332:
1333: l_tmp_ceav_tbl.delete;
1326: FOR l_ind IN p_txn_line_detail_tbl.FIRST .. p_txn_line_detail_tbl.LAST
1327: LOOP
1328:
1329: IF nvl(p_txn_line_detail_tbl(l_ind).instance_id, fnd_api.g_miss_num) <>
1330: fnd_api.g_miss_num
1331: THEN
1332:
1333: l_tmp_ceav_tbl.delete;
1334:
1336: p_instance_id => p_txn_line_detail_tbl(l_ind).instance_id,
1337: x_csi_ea_vals_tbl => l_tmp_ceav_tbl,
1338: x_return_status => l_return_status);
1339:
1340: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1341: raise fnd_api.g_exc_error;
1342: END IF;
1343:
1344: IF l_tmp_ceav_tbl.count > 0 THEN
1337: x_csi_ea_vals_tbl => l_tmp_ceav_tbl,
1338: x_return_status => l_return_status);
1339:
1340: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1341: raise fnd_api.g_exc_error;
1342: END IF;
1343:
1344: IF l_tmp_ceav_tbl.count > 0 THEN
1345: FOR l_t_ind IN l_tmp_ceav_tbl.FIRST .. l_tmp_ceav_tbl.LAST
1355: END IF;
1356: x_csi_ea_vals_tbl := l_ceav_tbl;
1357:
1358: EXCEPTION
1359: WHEN fnd_api.g_exc_error THEN
1360: x_return_status := fnd_api.g_ret_sts_error;
1361: END get_all_csi_ext_attrib_vals;
1362:
1363: PROCEDURE get_all_csi_ext_attribs(
1356: x_csi_ea_vals_tbl := l_ceav_tbl;
1357:
1358: EXCEPTION
1359: WHEN fnd_api.g_exc_error THEN
1360: x_return_status := fnd_api.g_ret_sts_error;
1361: END get_all_csi_ext_attrib_vals;
1362:
1363: PROCEDURE get_all_csi_ext_attribs(
1364: p_txn_line_detail_tbl in csi_t_datastructures_grp.txn_line_detail_tbl,
1365: x_csi_ext_attribs_tbl OUT NOCOPY csi_t_datastructures_grp.csi_ext_attribs_tbl,
1366: x_return_status OUT NOCOPY varchar2)
1367: IS
1368:
1369: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
1370: l_cea_tbl csi_t_datastructures_grp.csi_ext_attribs_tbl;
1371: l_tmp_cea_tbl csi_t_datastructures_grp.csi_ext_attribs_tbl;
1372: l_c_ind binary_integer := 0;
1373: l_instance_id number := null;
1372: l_c_ind binary_integer := 0;
1373: l_instance_id number := null;
1374:
1375: BEGIN
1376: x_return_status := fnd_api.g_ret_sts_success;
1377: api_log('get_all_csi_ext_attribs');
1378:
1379: IF p_txn_line_detail_tbl.count > 0 THEN
1380: FOR l_ind IN p_txn_line_detail_tbl.FIRST .. p_txn_line_detail_tbl.LAST
1379: IF p_txn_line_detail_tbl.count > 0 THEN
1380: FOR l_ind IN p_txn_line_detail_tbl.FIRST .. p_txn_line_detail_tbl.LAST
1381: LOOP
1382:
1383: IF nvl(p_txn_line_detail_tbl(l_ind).instance_id, fnd_api.g_miss_num) =
1384: fnd_api.g_miss_num
1385: THEN
1386: l_instance_id := null;
1387: ELSE
1380: FOR l_ind IN p_txn_line_detail_tbl.FIRST .. p_txn_line_detail_tbl.LAST
1381: LOOP
1382:
1383: IF nvl(p_txn_line_detail_tbl(l_ind).instance_id, fnd_api.g_miss_num) =
1384: fnd_api.g_miss_num
1385: THEN
1386: l_instance_id := null;
1387: ELSE
1388: l_instance_id := p_txn_line_detail_tbl(l_ind).instance_id;
1395: p_instance_id => l_instance_id,
1396: x_csi_ext_attribs_tbl => l_tmp_cea_tbl,
1397: x_return_status => l_return_status);
1398:
1399: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1400: RAISE fnd_api.g_exc_error;
1401: END IF;
1402:
1403: IF l_tmp_cea_tbl.COUNT > 0 THEN
1396: x_csi_ext_attribs_tbl => l_tmp_cea_tbl,
1397: x_return_status => l_return_status);
1398:
1399: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1400: RAISE fnd_api.g_exc_error;
1401: END IF;
1402:
1403: IF l_tmp_cea_tbl.COUNT > 0 THEN
1404: FOR l_t_ind IN l_tmp_cea_tbl.FIRST .. l_tmp_cea_tbl.LAST
1412: END IF;
1413: x_csi_ext_attribs_tbl := l_cea_tbl;
1414:
1415: EXCEPTION
1416: WHEN fnd_api.g_exc_error THEN
1417: x_return_status := fnd_api.g_ret_sts_error;
1418: END get_all_csi_ext_attribs;
1419:
1420: PROCEDURE get_all_ext_attrib_dtls(
1413: x_csi_ext_attribs_tbl := l_cea_tbl;
1414:
1415: EXCEPTION
1416: WHEN fnd_api.g_exc_error THEN
1417: x_return_status := fnd_api.g_ret_sts_error;
1418: END get_all_csi_ext_attribs;
1419:
1420: PROCEDURE get_all_ext_attrib_dtls(
1421: p_txn_line_detail_tbl in csi_t_datastructures_grp.txn_line_detail_tbl,
1421: p_txn_line_detail_tbl in csi_t_datastructures_grp.txn_line_detail_tbl,
1422: x_ext_attrib_tbl OUT NOCOPY csi_t_datastructures_grp.txn_ext_attrib_vals_tbl,
1423: x_return_status OUT NOCOPY varchar2)
1424: IS
1425: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
1426: l_c_ind binary_integer := 0;
1427: l_teav_tbl csi_t_datastructures_grp.txn_ext_attrib_vals_tbl;
1428: l_tmp_teav_tbl csi_t_datastructures_grp.txn_ext_attrib_vals_tbl;
1429:
1427: l_teav_tbl csi_t_datastructures_grp.txn_ext_attrib_vals_tbl;
1428: l_tmp_teav_tbl csi_t_datastructures_grp.txn_ext_attrib_vals_tbl;
1429:
1430: BEGIN
1431: x_return_status := fnd_api.g_ret_sts_success;
1432: api_log('get_all_ext_attrib_dtls');
1433:
1434: IF p_txn_line_detail_tbl.count > 0 THEN
1435: FOR l_ind IN p_txn_line_detail_tbl.FIRST .. p_txn_line_detail_tbl.LAST
1441: p_line_dtl_id => p_txn_line_detail_tbl(l_ind).txn_line_detail_id,
1442: x_ext_attrib_tbl => l_tmp_teav_tbl,
1443: x_return_status => l_return_status);
1444:
1445: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1446: raise fnd_api.g_exc_error;
1447: END IF;
1448: IF l_tmp_teav_tbl.count > 0 THEN
1449: FOR l_t_ind IN l_tmp_teav_tbl.FIRST .. l_tmp_teav_tbl.LAST
1442: x_ext_attrib_tbl => l_tmp_teav_tbl,
1443: x_return_status => l_return_status);
1444:
1445: IF l_return_status <> fnd_api.g_ret_sts_success THEN
1446: raise fnd_api.g_exc_error;
1447: END IF;
1448: IF l_tmp_teav_tbl.count > 0 THEN
1449: FOR l_t_ind IN l_tmp_teav_tbl.FIRST .. l_tmp_teav_tbl.LAST
1450: LOOP
1458:
1459: x_ext_attrib_tbl := l_teav_tbl;
1460:
1461: EXCEPTION
1462: WHEN fnd_api.g_exc_error THEN
1463: x_return_status := fnd_api.g_ret_sts_error;
1464: END get_all_ext_attrib_dtls;
1465:
1466: -- Added for CZ Integration (Begin)
1459: x_ext_attrib_tbl := l_teav_tbl;
1460:
1461: EXCEPTION
1462: WHEN fnd_api.g_exc_error THEN
1463: x_return_status := fnd_api.g_ret_sts_error;
1464: END get_all_ext_attrib_dtls;
1465:
1466: -- Added for CZ Integration (Begin)
1467: PROCEDURE get_ext_attrib_id(
1592: BEGIN
1593: debug ('Begin : get_source_attribute_id -' ||p_attrib_code||' - '||
1594: p_attrib_level || ' - '|| p_txn_line_detail_id);
1595:
1596: x_return_status := fnd_api.g_ret_sts_success ;
1597: x_attribute_id := NULL ;
1598: l_instance_id := NULL ;
1599: x_source_table := NULL ;
1600: l_attribute_value_id := NULL ;
1615: FND_MESSAGE.set_name('CSI','CSI_TXN_TOO_MANY_EXT_ATT');
1616: FND_MESSAGE.set_token('ATTRIB_CODE',p_attrib_code);
1617: FND_MESSAGE.set_token('ATTRIB_LEVEL',p_attrib_level);
1618: fnd_msg_pub.add;
1619: RAISE fnd_api.g_exc_error ;
1620: END IF ;
1621: ELSIF p_attrib_level = 'CATEGORY'
1622: THEN
1623: -- bug 4028827 , cursor optimization changes
1635: x_error_msg := 'Unable to derive attribute id .....';
1636: FND_MESSAGE.set_name('CSI','CSI_TXN_TOO_MANY_EXT_ATT');
1637: FND_MESSAGE.set_token('ATTRIB_CODE',p_attrib_code);
1638: FND_MESSAGE.set_token('ATTRIB_LEVEL',p_attrib_level);
1639: RAISE fnd_api.g_exc_error ;
1640: END IF ;
1641: ELSIF p_attrib_level = 'ITEM'
1642: THEN
1643: FOR get_item_attrib_rec IN get_item_attrib_cur(p_attrib_code)
1652: x_error_msg := 'Unable to derive attribute id .....';
1653: FND_MESSAGE.set_name('CSI','CSI_TXN_TOO_MANY_EXT_ATT');
1654: FND_MESSAGE.set_token('ATTRIB_CODE',p_attrib_code);
1655: FND_MESSAGE.set_token('ATTRIB_LEVEL',p_attrib_level);
1656: RAISE fnd_api.g_exc_error ;
1657: END IF ;
1658: ELSIF p_attrib_level = 'INSTANCE'
1659: THEN
1660: FOR get_instance_attrib_rec IN get_instance_attrib_cur(p_attrib_code)
1670: x_error_msg := 'Unable to derive attribute id .....';
1671: FND_MESSAGE.set_name('CSI','CSI_TXN_TOO_MANY_EXT_ATT');
1672: FND_MESSAGE.set_token('ATTRIB_CODE',p_attrib_code);
1673: FND_MESSAGE.set_token('ATTRIB_LEVEL',p_attrib_level);
1674: RAISE fnd_api.g_exc_error ;
1675: END IF ;
1676: END IF ; --p_attrib_level
1677:
1678: debug ('x_attribute_id :'|| x_attribute_id);
1697: THEN
1698: FND_MESSAGE.set_name('CSI','CSI_TXN_TOO_MANY_EXT_ATT_VALS');
1699: FND_MESSAGE.set_token('ATTRIB_ID',x_attribute_id);
1700: FND_MESSAGE.set_token('INSTANCE_ID',l_instance_id);
1701: RAISE fnd_api.g_exc_error ;
1702: END IF ;
1703: IF l_attribute_value_id IS NOT NULL
1704: THEN
1705: x_source_table := 'CSI_IEA_VALUES' ;
1712: l_attrib_param := 'Item ID:'||l_inv_item_id||' Orgn ID:'||l_inv_orgn_id||'Category ID: '||l_item_category||'Instance ID: '||l_instance_id;
1713: FND_MESSAGE.set_name('CSI','CSI_TXN_EXT_ATT_NOT_FOUND');
1714: FND_MESSAGE.set_token('ATTRIB_CODE',p_attrib_code);
1715: FND_MESSAGE.set_token('ATTRIB_PARAM',l_attrib_param);
1716: RAISE fnd_api.g_exc_error ;
1717: END IF ;
1718: EXCEPTION
1719: WHEN fnd_api.g_exc_error
1720: THEN
1715: FND_MESSAGE.set_token('ATTRIB_PARAM',l_attrib_param);
1716: RAISE fnd_api.g_exc_error ;
1717: END IF ;
1718: EXCEPTION
1719: WHEN fnd_api.g_exc_error
1720: THEN
1721: x_attribute_id := NULL ;
1722: x_return_status := fnd_api.g_ret_sts_error;
1723: END get_ext_attrib_id ;
1718: EXCEPTION
1719: WHEN fnd_api.g_exc_error
1720: THEN
1721: x_attribute_id := NULL ;
1722: x_return_status := fnd_api.g_ret_sts_error;
1723: END get_ext_attrib_id ;
1724:
1725: -- Added for CZ Integration (End)
1726: