8: g_login_id NUMBER := fnd_global.login_id;
9:
10: PROCEDURE create_txn_org_assgn_dtls(
11: p_api_version IN number,
12: p_commit IN varchar2 := fnd_api.g_false,
13: p_init_msg_list IN varchar2 := fnd_api.g_false,
14: p_validation_level IN number := fnd_api.g_valid_level_full,
15: p_txn_org_assgn_rec IN OUT NOCOPY csi_t_datastructures_grp.txn_org_assgn_rec,
16: x_return_status OUT NOCOPY varchar2,
9:
10: PROCEDURE create_txn_org_assgn_dtls(
11: p_api_version IN number,
12: p_commit IN varchar2 := fnd_api.g_false,
13: p_init_msg_list IN varchar2 := fnd_api.g_false,
14: p_validation_level IN number := fnd_api.g_valid_level_full,
15: p_txn_org_assgn_rec IN OUT NOCOPY csi_t_datastructures_grp.txn_org_assgn_rec,
16: x_return_status OUT NOCOPY varchar2,
17: x_msg_count OUT NOCOPY number,
10: PROCEDURE create_txn_org_assgn_dtls(
11: p_api_version IN number,
12: p_commit IN varchar2 := fnd_api.g_false,
13: p_init_msg_list IN varchar2 := fnd_api.g_false,
14: p_validation_level IN number := fnd_api.g_valid_level_full,
15: p_txn_org_assgn_rec IN OUT NOCOPY csi_t_datastructures_grp.txn_org_assgn_rec,
16: x_return_status OUT NOCOPY varchar2,
17: x_msg_count OUT NOCOPY number,
18: x_msg_data OUT NOCOPY varchar2)
24: l_debug_level NUMBER;
25: l_txn_operating_unit_id NUMBER;
26: l_preserve_detail_flag VARCHAR2(1);
27:
28: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
29: l_valid BOOLEAN;
30:
31: BEGIN
32:
33: -- Standard Start of API savepoint
34: SAVEPOINT create_txn_org_assgn_dtls;
35:
36: -- Initialize message list if p_init_msg_list is set to TRUE.
37: IF fnd_api.to_Boolean( p_init_msg_list ) THEN
38: fnd_msg_pub.initialize;
39: END IF;
40:
41: -- Initialize API return status to success
38: fnd_msg_pub.initialize;
39: END IF;
40:
41: -- Initialize API return status to success
42: x_return_status := fnd_api.G_RET_STS_SUCCESS;
43:
44: -- Standard call to check for call compatibility.
45: IF NOT
46:
43:
44: -- Standard call to check for call compatibility.
45: IF NOT
46:
47: fnd_api.Compatible_API_Call (
48: p_current_version_number => l_api_version,
49: p_caller_version_number => p_api_version,
50: p_api_name => l_api_name,
51: p_pkg_name => G_PKG_NAME) THEN
49: p_caller_version_number => p_api_version,
50: p_api_name => l_api_name,
51: p_pkg_name => G_PKG_NAME) THEN
52:
53: RAISE fnd_api.g_exc_unexpected_error;
54:
55: END IF;
56:
57: --debug info
85: csi_org_unit_vld_pvt.is_valid_operating_unit_id(
86: p_operating_unit_id => p_txn_org_assgn_rec.operating_unit_id);
87: IF NOT (l_valid) THEN
88: csi_t_gen_utility_pvt.add('Validate operating unit id failed.');
89: RAISE fnd_api.g_exc_error;
90: END IF;
91:
92: -- validate relationship_type_code
93: l_valid :=
95: p_relationship_type_code => p_txn_org_assgn_rec.relationship_type_code);
96:
97: IF NOT (l_valid) THEN
98: csi_t_gen_utility_pvt.add('Validate ou relationship type code failed.');
99: RAISE fnd_api.g_exc_error;
100: END IF;
101:
102: IF nvl(p_txn_org_assgn_rec.instance_ou_id,fnd_api.g_miss_num) <>
103: fnd_api.g_miss_num
98: csi_t_gen_utility_pvt.add('Validate ou relationship type code failed.');
99: RAISE fnd_api.g_exc_error;
100: END IF;
101:
102: IF nvl(p_txn_org_assgn_rec.instance_ou_id,fnd_api.g_miss_num) <>
103: fnd_api.g_miss_num
104: THEN
105:
106: csi_t_vldn_routines_pvt.validate_instance_reference(
99: RAISE fnd_api.g_exc_error;
100: END IF;
101:
102: IF nvl(p_txn_org_assgn_rec.instance_ou_id,fnd_api.g_miss_num) <>
103: fnd_api.g_miss_num
104: THEN
105:
106: csi_t_vldn_routines_pvt.validate_instance_reference(
107: p_level => 'ORG_ASSGN',
108: p_level_dtl_id => p_txn_org_assgn_rec.txn_line_detail_id,
109: p_level_inst_ref_id => p_txn_org_assgn_rec.instance_ou_id,
110: x_return_status => l_return_status);
111:
112: IF l_return_status <> fnd_api.g_ret_sts_success THEN
113: RAISE fnd_api.g_exc_error;
114: END IF;
115:
116: END IF;
109: p_level_inst_ref_id => p_txn_org_assgn_rec.instance_ou_id,
110: x_return_status => l_return_status);
111:
112: IF l_return_status <> fnd_api.g_ret_sts_success THEN
113: RAISE fnd_api.g_exc_error;
114: END IF;
115:
116: END IF;
117:
114: END IF;
115:
116: END IF;
117:
118: SELECT decode(nvl(p_txn_org_assgn_rec.preserve_detail_flag,fnd_api.g_miss_char),
119: fnd_api.g_miss_char, 'Y', p_txn_org_assgn_rec.preserve_detail_flag)
120: INTO l_preserve_detail_flag
121: FROM sys.dual;
122:
115:
116: END IF;
117:
118: SELECT decode(nvl(p_txn_org_assgn_rec.preserve_detail_flag,fnd_api.g_miss_char),
119: fnd_api.g_miss_char, 'Y', p_txn_org_assgn_rec.preserve_detail_flag)
120: INTO l_preserve_detail_flag
121: FROM sys.dual;
122:
123: -- call table handler
121: FROM sys.dual;
122:
123: -- call table handler
124:
125: if nvl(p_txn_org_assgn_rec.txn_operating_unit_id,fnd_api.g_miss_num) <>
126: fnd_api.g_miss_num then
127: l_txn_operating_unit_id := p_txn_org_assgn_rec.txn_operating_unit_id;
128: end if;
129:
122:
123: -- call table handler
124:
125: if nvl(p_txn_org_assgn_rec.txn_operating_unit_id,fnd_api.g_miss_num) <>
126: fnd_api.g_miss_num then
127: l_txn_operating_unit_id := p_txn_org_assgn_rec.txn_operating_unit_id;
128: end if;
129:
130: --debug info
171: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
172: fnd_message.set_token('MESSAGE',
173: 'csi_t_org_assignments_pkg.insert_row Failed. '||substr(sqlerrm,1,200));
174: fnd_msg_pub.add;
175: raise fnd_api.g_exc_error;
176: end;
177:
178: p_txn_org_assgn_rec.txn_operating_unit_id := l_txn_operating_unit_id;
179:
177:
178: p_txn_org_assgn_rec.txn_operating_unit_id := l_txn_operating_unit_id;
179:
180: -- Standard check of p_commit.
181: IF fnd_api.To_Boolean( p_commit ) THEN
182: COMMIT WORK;
183: END IF;
184:
185: IF csi_t_gen_utility_pvt.g_debug = fnd_api.g_true THEN
181: IF fnd_api.To_Boolean( p_commit ) THEN
182: COMMIT WORK;
183: END IF;
184:
185: IF csi_t_gen_utility_pvt.g_debug = fnd_api.g_true THEN
186: csi_t_gen_utility_pvt.set_debug_off;
187: END IF;
188:
189: -- Standard call to get message count and if count is get message info.
191: p_count => x_msg_count,
192: p_data => x_msg_data);
193:
194: EXCEPTION
195: WHEN fnd_api.G_EXC_ERROR THEN
196:
197: ROLLBACK TO Create_Txn_Org_Assgn_Dtls;
198: x_return_status := fnd_api.G_RET_STS_ERROR ;
199: fnd_msg_pub.count_and_get (
194: EXCEPTION
195: WHEN fnd_api.G_EXC_ERROR THEN
196:
197: ROLLBACK TO Create_Txn_Org_Assgn_Dtls;
198: x_return_status := fnd_api.G_RET_STS_ERROR ;
199: fnd_msg_pub.count_and_get (
200: p_count => x_msg_count,
201: p_data => x_msg_data);
202:
199: fnd_msg_pub.count_and_get (
200: p_count => x_msg_count,
201: p_data => x_msg_data);
202:
203: WHEN fnd_api.g_exc_unexpected_error THEN
204:
205: ROLLBACK TO Create_Txn_Org_Assgn_Dtls;
206: x_return_status := fnd_api.g_ret_sts_unexp_error ;
207:
202:
203: WHEN fnd_api.g_exc_unexpected_error THEN
204:
205: ROLLBACK TO Create_Txn_Org_Assgn_Dtls;
206: x_return_status := fnd_api.g_ret_sts_unexp_error ;
207:
208: fnd_msg_pub.count_and_get(
209: p_count => x_msg_count,
210: p_data => x_msg_data);
211:
212: WHEN OTHERS THEN
213:
214: ROLLBACK TO Create_Txn_Org_Assgn_Dtls;
215: x_return_status := fnd_api.g_ret_sts_unexp_error ;
216:
217: IF fnd_msg_pub.check_msg_level(
218: p_message_level => fnd_msg_pub.g_msg_lvl_unexp_error) THEN
219:
230: END create_txn_org_assgn_dtls;
231:
232: PROCEDURE update_txn_org_assgn_dtls(
233: p_api_version IN NUMBER
234: ,p_commit IN VARCHAR2 := fnd_api.g_false
235: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
236: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
237: ,p_txn_org_assgn_tbl IN csi_t_datastructures_grp.txn_org_assgn_tbl
238: ,x_return_status OUT NOCOPY VARCHAR2
231:
232: PROCEDURE update_txn_org_assgn_dtls(
233: p_api_version IN NUMBER
234: ,p_commit IN VARCHAR2 := fnd_api.g_false
235: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
236: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
237: ,p_txn_org_assgn_tbl IN csi_t_datastructures_grp.txn_org_assgn_tbl
238: ,x_return_status OUT NOCOPY VARCHAR2
239: ,x_msg_count OUT NOCOPY NUMBER
232: PROCEDURE update_txn_org_assgn_dtls(
233: p_api_version IN NUMBER
234: ,p_commit IN VARCHAR2 := fnd_api.g_false
235: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
236: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
237: ,p_txn_org_assgn_tbl IN csi_t_datastructures_grp.txn_org_assgn_tbl
238: ,x_return_status OUT NOCOPY VARCHAR2
239: ,x_msg_count OUT NOCOPY NUMBER
240: ,x_msg_data OUT NOCOPY VARCHAR2)
259: -- Standard Start of API savepoint
260: SAVEPOINT update_txn_org_assgn_dtls;
261:
262: -- Initialize message list if p_init_msg_list is set to TRUE.
263: IF fnd_api.to_Boolean( p_init_msg_list ) THEN
264: fnd_msg_pub.initialize;
265: END IF;
266:
267: -- Initialize API return status to success
264: fnd_msg_pub.initialize;
265: END IF;
266:
267: -- Initialize API return status to success
268: x_return_status := fnd_api.G_RET_STS_SUCCESS;
269:
270: -- Standard call to check for call compatibility.
271: IF NOT
272:
269:
270: -- Standard call to check for call compatibility.
271: IF NOT
272:
273: fnd_api.Compatible_API_Call (
274: p_current_version_number => l_api_version,
275: p_caller_version_number => p_api_version,
276: p_api_name => l_api_name,
277: p_pkg_name => G_PKG_NAME) THEN
275: p_caller_version_number => p_api_version,
276: p_api_name => l_api_name,
277: p_pkg_name => G_PKG_NAME) THEN
278:
279: RAISE fnd_api.g_exc_unexpected_error;
280:
281: END IF;
282:
283: --debug info
312: csi_t_vldn_routines_pvt.validate_txn_ou_id(
313: p_txn_operating_unit_id => l_ou_rec.txn_operating_unit_id,
314: x_return_status => l_return_status);
315:
316: IF l_return_status <> fnd_api.g_ret_sts_success THEN
317:
318: FND_MESSAGE.set_name('CSI','CSI_TXN_OU_ID_INVALID');
319: FND_MESSAGE.set_token('TXN_OU_ID',l_ou_rec.txn_operating_unit_id);
320: fnd_msg_pub.add;
317:
318: FND_MESSAGE.set_name('CSI','CSI_TXN_OU_ID_INVALID');
319: FND_MESSAGE.set_token('TXN_OU_ID',l_ou_rec.txn_operating_unit_id);
320: fnd_msg_pub.add;
321: RAISE fnd_api.g_exc_error;
322:
323: END IF;
324:
325: FOR l_ou_cur_rec in ou_cur(l_ou_rec.txn_operating_unit_id)
338: FND_MESSAGE.set_name('CSI','CSI_TXN_UPD_DEL_NOT_ALLOWED');
339: FND_MESSAGE.set_token('LVL_ID', l_ou_rec.txn_operating_unit_id);
340: FND_MESSAGE.set_token('STATUS',l_processing_status);
341: fnd_msg_pub.add;
342: RAISE fnd_api.g_exc_error;
343:
344: END IF;
345:
346: l_ou_rec.operating_unit_id :=
346: l_ou_rec.operating_unit_id :=
347: p_txn_org_assgn_tbl(l_ind).operating_unit_id;
348:
349: -- validate operating_unit_id
350: IF l_ou_rec.operating_unit_id <> fnd_api.g_miss_num THEN
351:
352: l_valid :=
353: csi_org_unit_vld_pvt.is_valid_operating_unit_id(
354: p_operating_unit_id => l_ou_rec.operating_unit_id);
353: csi_org_unit_vld_pvt.is_valid_operating_unit_id(
354: p_operating_unit_id => l_ou_rec.operating_unit_id);
355: IF NOT (l_valid) THEN
356: csi_t_gen_utility_pvt.add('Validate operating unit id failed.');
357: RAISE fnd_api.g_exc_error;
358: END IF;
359:
360: END IF;
361:
362: l_ou_rec.relationship_type_code:=
363: p_txn_org_assgn_tbl(l_ind).relationship_type_code;
364:
365: -- validate org relationship_type_code
366: IF l_ou_rec.relationship_type_code <> fnd_api.g_miss_char THEN
367:
368: l_valid :=
369: csi_org_unit_vld_pvt.is_valid_rel_type_code(
370: p_relationship_type_code => l_ou_rec.relationship_type_code);
369: csi_org_unit_vld_pvt.is_valid_rel_type_code(
370: p_relationship_type_code => l_ou_rec.relationship_type_code);
371: IF NOT (l_valid) THEN
372: csi_t_gen_utility_pvt.add('Validate ou relationship type code failed.');
373: RAISE fnd_api.g_exc_error;
374: END IF;
375:
376: END IF;
377:
387: l_ou_rec.instance_ou_id :=
388: p_txn_org_assgn_tbl(l_ind).instance_ou_id;
389:
390: -- validate instance_ou_id
391: IF nvl(l_ou_rec.instance_ou_id,fnd_api.g_miss_num) <> fnd_api.g_miss_num
392: THEN
393:
394: l_valid :=
395: csi_org_unit_vld_pvt.is_valid_instance_ou_id(
395: csi_org_unit_vld_pvt.is_valid_instance_ou_id(
396: p_instance_ou_id => l_ou_rec.instance_ou_id);
397: IF (l_valid) THEN
398: csi_t_gen_utility_pvt.add('Validate instance ou id failed.');
399: RAISE fnd_api.g_exc_error;
400: END IF;
401:
402: END IF;
403:
468: fnd_message.set_name('FND', 'FND_GENERIC_MESSAGE');
469: fnd_message.set_token('MESSAGE',
470: 'csi_t_org_assignments_pkg.update_row failed. '||substr(sqlerrm,1,200));
471: fnd_msg_pub.add;
472: raise fnd_api.g_exc_error;
473: end;
474:
475: END LOOP;
476: END LOOP;
477:
478: END IF;
479:
480: -- Standard check of p_commit.
481: IF fnd_api.To_Boolean( p_commit ) THEN
482: COMMIT WORK;
483: END IF;
484:
485: -- Standard call to get message count and if count is get message info.
487: p_count => x_msg_count,
488: p_data => x_msg_data);
489:
490: EXCEPTION
491: WHEN fnd_api.G_EXC_ERROR THEN
492:
493: ROLLBACK TO update_txn_org_assgn_dtls;
494: x_return_status := fnd_api.G_RET_STS_ERROR ;
495: fnd_msg_pub.count_and_get (
490: EXCEPTION
491: WHEN fnd_api.G_EXC_ERROR THEN
492:
493: ROLLBACK TO update_txn_org_assgn_dtls;
494: x_return_status := fnd_api.G_RET_STS_ERROR ;
495: fnd_msg_pub.count_and_get (
496: p_count => x_msg_count,
497: p_data => x_msg_data);
498:
495: fnd_msg_pub.count_and_get (
496: p_count => x_msg_count,
497: p_data => x_msg_data);
498:
499: WHEN fnd_api.g_exc_unexpected_error THEN
500:
501: ROLLBACK TO update_txn_org_assgn_dtls;
502: x_return_status := fnd_api.g_ret_sts_unexp_error ;
503:
498:
499: WHEN fnd_api.g_exc_unexpected_error THEN
500:
501: ROLLBACK TO update_txn_org_assgn_dtls;
502: x_return_status := fnd_api.g_ret_sts_unexp_error ;
503:
504: fnd_msg_pub.count_and_get(
505: p_count => x_msg_count,
506: p_data => x_msg_data);
507:
508: WHEN OTHERS THEN
509:
510: ROLLBACK TO update_txn_org_assgn_dtls;
511: x_return_status := fnd_api.g_ret_sts_unexp_error ;
512:
513: IF fnd_msg_pub.check_msg_level(
514: p_message_level => fnd_msg_pub.g_msg_lvl_unexp_error) THEN
515:
526: END update_txn_org_assgn_dtls;
527:
528: PROCEDURE delete_txn_org_assgn_dtls(
529: p_api_version IN NUMBER
530: ,p_commit IN VARCHAR2 := fnd_api.g_false
531: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
532: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
533: ,p_txn_org_assgn_ids_tbl IN csi_t_datastructures_grp.txn_org_assgn_ids_tbl
534: ,x_return_status OUT NOCOPY VARCHAR2
527:
528: PROCEDURE delete_txn_org_assgn_dtls(
529: p_api_version IN NUMBER
530: ,p_commit IN VARCHAR2 := fnd_api.g_false
531: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
532: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
533: ,p_txn_org_assgn_ids_tbl IN csi_t_datastructures_grp.txn_org_assgn_ids_tbl
534: ,x_return_status OUT NOCOPY VARCHAR2
535: ,x_msg_count OUT NOCOPY NUMBER
528: PROCEDURE delete_txn_org_assgn_dtls(
529: p_api_version IN NUMBER
530: ,p_commit IN VARCHAR2 := fnd_api.g_false
531: ,p_init_msg_list IN VARCHAR2 := fnd_api.g_false
532: ,p_validation_level IN NUMBER := fnd_api.g_valid_level_full
533: ,p_txn_org_assgn_ids_tbl IN csi_t_datastructures_grp.txn_org_assgn_ids_tbl
534: ,x_return_status OUT NOCOPY VARCHAR2
535: ,x_msg_count OUT NOCOPY NUMBER
536: ,x_msg_data OUT NOCOPY VARCHAR2)
554: -- Standard Start of API savepoint
555: SAVEPOINT delete_txn_org_assgn_dtls;
556:
557: -- Initialize message list if p_init_msg_list is set to TRUE.
558: IF fnd_api.to_Boolean( p_init_msg_list ) THEN
559: fnd_msg_pub.initialize;
560: END IF;
561:
562: -- Initialize API return status to success
559: fnd_msg_pub.initialize;
560: END IF;
561:
562: -- Initialize API return status to success
563: x_return_status := fnd_api.G_RET_STS_SUCCESS;
564:
565: -- Standard call to check for call compatibility.
566: IF NOT
567:
564:
565: -- Standard call to check for call compatibility.
566: IF NOT
567:
568: fnd_api.Compatible_API_Call (
569: p_current_version_number => l_api_version,
570: p_caller_version_number => p_api_version,
571: p_api_name => l_api_name,
572: p_pkg_name => G_PKG_NAME) THEN
570: p_caller_version_number => p_api_version,
571: p_api_name => l_api_name,
572: p_pkg_name => G_PKG_NAME) THEN
573:
574: RAISE fnd_api.g_exc_unexpected_error;
575:
576: END IF;
577:
578: --debug info
596: END IF;
597:
598: l_txn_ou_id := p_txn_org_assgn_ids_tbl(l_ind).txn_operating_unit_id;
599:
600: IF nvl(l_txn_ou_id, fnd_api.g_miss_num) <> fnd_api.g_miss_num THEN
601:
602: csi_t_vldn_routines_pvt.validate_txn_ou_id(
603: p_txn_operating_unit_id => l_txn_ou_id,
604: x_return_status => l_return_status);
602: csi_t_vldn_routines_pvt.validate_txn_ou_id(
603: p_txn_operating_unit_id => l_txn_ou_id,
604: x_return_status => l_return_status);
605:
606: IF l_return_status <> fnd_api.g_ret_sts_success THEN
607:
608: FND_MESSAGE.set_name('CSI','CSI_TXN_OU_ID_INVALID');
609: FND_MESSAGE.set_token('TXN_OU_ID',l_txn_ou_id);
610: fnd_msg_pub.add;
607:
608: FND_MESSAGE.set_name('CSI','CSI_TXN_OU_ID_INVALID');
609: FND_MESSAGE.set_token('TXN_OU_ID',l_txn_ou_id);
610: fnd_msg_pub.add;
611: RAISE fnd_api.g_exc_error;
612:
613: END IF;
614:
615: --debug info
633: csi_t_vldn_routines_pvt.validate_txn_line_detail_id(
634: p_txn_line_detail_id => l_line_dtl_id,
635: x_return_status => l_return_status);
636:
637: IF l_return_status <> fnd_api.g_ret_sts_success THEN
638:
639: FND_MESSAGE.set_name('CSI','CSI_TXN_LINE_DTL_ID_INVALID');
640: FND_MESSAGE.set_token('LINE_DTL_ID',l_line_dtl_id);
641: fnd_msg_pub.add;
638:
639: FND_MESSAGE.set_name('CSI','CSI_TXN_LINE_DTL_ID_INVALID');
640: FND_MESSAGE.set_token('LINE_DTL_ID',l_line_dtl_id);
641: fnd_msg_pub.add;
642: RAISE fnd_api.g_exc_error;
643:
644: END IF;
645:
646: FOR ou_rec in ou_cur (l_line_dtl_id)
661:
662: END IF;
663:
664: -- Standard check of p_commit.
665: IF fnd_api.To_Boolean( p_commit ) THEN
666: COMMIT WORK;
667: END IF;
668:
669: -- Standard call to get message count and if count is get message info.
671: p_count => x_msg_count,
672: p_data => x_msg_data);
673:
674: EXCEPTION
675: WHEN fnd_api.G_EXC_ERROR THEN
676:
677: ROLLBACK TO delete_txn_org_assgn_dtls;
678: x_return_status := fnd_api.G_RET_STS_ERROR ;
679: fnd_msg_pub.count_and_get (
674: EXCEPTION
675: WHEN fnd_api.G_EXC_ERROR THEN
676:
677: ROLLBACK TO delete_txn_org_assgn_dtls;
678: x_return_status := fnd_api.G_RET_STS_ERROR ;
679: fnd_msg_pub.count_and_get (
680: p_count => x_msg_count,
681: p_data => x_msg_data);
682:
679: fnd_msg_pub.count_and_get (
680: p_count => x_msg_count,
681: p_data => x_msg_data);
682:
683: WHEN fnd_api.g_exc_unexpected_error THEN
684:
685: ROLLBACK TO delete_txn_org_assgn_dtls;
686: x_return_status := fnd_api.g_ret_sts_unexp_error ;
687:
682:
683: WHEN fnd_api.g_exc_unexpected_error THEN
684:
685: ROLLBACK TO delete_txn_org_assgn_dtls;
686: x_return_status := fnd_api.g_ret_sts_unexp_error ;
687:
688: fnd_msg_pub.count_and_get(
689: p_count => x_msg_count,
690: p_data => x_msg_data);
691:
692: WHEN OTHERS THEN
693:
694: ROLLBACK TO delete_txn_org_assgn_dtls;
695: x_return_status := fnd_api.g_ret_sts_unexp_error ;
696:
697: IF fnd_msg_pub.check_msg_level(
698: p_message_level => fnd_msg_pub.g_msg_lvl_unexp_error) THEN
699:
813: p_txn_line_detail_tbl in csi_t_datastructures_grp.txn_line_detail_tbl,
814: x_org_assgn_tbl OUT NOCOPY csi_t_datastructures_grp.txn_org_assgn_tbl,
815: x_return_status OUT NOCOPY varchar2)
816: IS
817: l_return_status varchar2(1) := fnd_api.g_ret_sts_success;
818: l_c_ind binary_integer := 0;
819: l_oa_tbl csi_t_datastructures_grp.txn_org_assgn_tbl;
820: l_tmp_oa_tbl csi_t_datastructures_grp.txn_org_assgn_tbl;
821: BEGIN
818: l_c_ind binary_integer := 0;
819: l_oa_tbl csi_t_datastructures_grp.txn_org_assgn_tbl;
820: l_tmp_oa_tbl csi_t_datastructures_grp.txn_org_assgn_tbl;
821: BEGIN
822: x_return_status := fnd_api.g_ret_sts_success;
823:
824: IF p_txn_line_detail_tbl.COUNT > 0 THEN
825: FOR l_ind IN p_txn_line_detail_tbl.FIRST .. p_txn_line_detail_tbl.LAST
826: LOOP
830: p_line_dtl_id => p_txn_line_detail_tbl(l_ind).txn_line_detail_id,
831: x_org_assgn_tbl => l_tmp_oa_tbl,
832: x_return_status => l_return_status);
833:
834: IF x_return_status <> fnd_api.g_ret_sts_success THEN
835: RAISE fnd_api.g_exc_error;
836: END IF;
837:
838: IF l_tmp_oa_tbl.count > 0 THEN
831: x_org_assgn_tbl => l_tmp_oa_tbl,
832: x_return_status => l_return_status);
833:
834: IF x_return_status <> fnd_api.g_ret_sts_success THEN
835: RAISE fnd_api.g_exc_error;
836: END IF;
837:
838: IF l_tmp_oa_tbl.count > 0 THEN
839: FOR l_t_ind IN l_tmp_oa_tbl.FIRST .. l_tmp_oa_tbl.LAST
846: END LOOP;
847: END IF;
848: x_org_assgn_tbl := l_oa_tbl;
849: EXCEPTION
850: WHEN fnd_api.g_exc_error THEN
851: x_return_status := fnd_api.g_ret_sts_error;
852: END get_all_org_assgn_dtls;
853:
854: END csi_t_txn_ous_pvt;
847: END IF;
848: x_org_assgn_tbl := l_oa_tbl;
849: EXCEPTION
850: WHEN fnd_api.g_exc_error THEN
851: x_return_status := fnd_api.g_ret_sts_error;
852: END get_all_org_assgn_dtls;
853:
854: END csi_t_txn_ous_pvt;