DBA Data[Home] [Help]

APPS.CSI_II_RELATIONSHIPS_PUB dependencies on FND_API

Line 48: IF NOT fnd_api.compatible_api_call ( l_api_version,

44:
45: csi_utility_grp.check_ib_active;
46:
47: -- standard call TO check for call compatibility.
48: IF NOT fnd_api.compatible_api_call ( l_api_version,
49: p_api_version,
50: l_api_name,
51: g_pkg_name)
52: THEN

Line 53: RAISE fnd_api.g_exc_unexpected_error;

49: p_api_version,
50: l_api_name,
51: g_pkg_name)
52: THEN
53: RAISE fnd_api.g_exc_unexpected_error;
54: END IF;
55:
56:
57: -- initialize message list IF p_init_msg_list is set TO true.

Line 58: IF fnd_api.to_boolean( p_init_msg_list )

54: END IF;
55:
56:
57: -- initialize message list IF p_init_msg_list is set TO true.
58: IF fnd_api.to_boolean( p_init_msg_list )
59: THEN
60: fnd_msg_pub.initialize;
61: END IF;
62:

Line 66: x_return_status := fnd_api.g_ret_sts_success;

62:
63:
64:
65: -- initialize api return status TO success
66: x_return_status := fnd_api.g_ret_sts_success;
67:
68: l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
69: -- IF debug_level = 1 THEN dump the PROCEDURE name
70: IF (l_debug_level > 0) THEN

Line 101: p_commit => fnd_api.g_false,

97: -- debug message
98:
99: csi_ii_relationships_pvt.get_relationships(
100: p_api_version => p_api_version,
101: p_commit => fnd_api.g_false,
102: p_init_msg_list => p_init_msg_list,
103: p_validation_level => p_validation_level,
104: p_relationship_query_rec => p_relationship_query_rec,
105: p_depth => p_depth,

Line 118: IF x_return_status = fnd_api.g_ret_sts_error THEN

114:
115:
116:
117: -- check return status FROM the above PROCEDURE call
118: IF x_return_status = fnd_api.g_ret_sts_error THEN
119: RAISE fnd_api.g_exc_error;
120: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
121: RAISE fnd_api.g_exc_unexpected_error;
122: END IF;

Line 119: RAISE fnd_api.g_exc_error;

115:
116:
117: -- check return status FROM the above PROCEDURE call
118: IF x_return_status = fnd_api.g_ret_sts_error THEN
119: RAISE fnd_api.g_exc_error;
120: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
121: RAISE fnd_api.g_exc_unexpected_error;
122: END IF;
123:

Line 120: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

116:
117: -- check return status FROM the above PROCEDURE call
118: IF x_return_status = fnd_api.g_ret_sts_error THEN
119: RAISE fnd_api.g_exc_error;
120: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
121: RAISE fnd_api.g_exc_unexpected_error;
122: END IF;
123:
124: --

Line 121: RAISE fnd_api.g_exc_unexpected_error;

117: -- check return status FROM the above PROCEDURE call
118: IF x_return_status = fnd_api.g_ret_sts_error THEN
119: RAISE fnd_api.g_exc_error;
120: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
121: RAISE fnd_api.g_exc_unexpected_error;
122: END IF;
123:
124: --
125: -- END of api body

Line 140: WHEN fnd_api.g_exc_error THEN

136: p_data => x_msg_data
137: );
138:
139: EXCEPTION
140: WHEN fnd_api.g_exc_error THEN
141: -- ROLLBACK TO get_relationships_pub;
142: x_return_status := fnd_api.g_ret_sts_error ;
143: fnd_msg_pub.count_and_get
144: (p_count => x_msg_count ,

Line 142: x_return_status := fnd_api.g_ret_sts_error ;

138:
139: EXCEPTION
140: WHEN fnd_api.g_exc_error THEN
141: -- ROLLBACK TO get_relationships_pub;
142: x_return_status := fnd_api.g_ret_sts_error ;
143: fnd_msg_pub.count_and_get
144: (p_count => x_msg_count ,
145: p_data => x_msg_data
146: );

Line 148: WHEN fnd_api.g_exc_unexpected_error THEN

144: (p_count => x_msg_count ,
145: p_data => x_msg_data
146: );
147:
148: WHEN fnd_api.g_exc_unexpected_error THEN
149: -- ROLLBACK TO get_relationships_pub;
150: x_return_status := fnd_api.g_ret_sts_unexp_error ;
151: fnd_msg_pub.count_and_get
152: (p_count => x_msg_count ,

Line 150: x_return_status := fnd_api.g_ret_sts_unexp_error ;

146: );
147:
148: WHEN fnd_api.g_exc_unexpected_error THEN
149: -- ROLLBACK TO get_relationships_pub;
150: x_return_status := fnd_api.g_ret_sts_unexp_error ;
151: fnd_msg_pub.count_and_get
152: (p_count => x_msg_count ,
153: p_data => x_msg_data
154: );

Line 158: x_return_status := fnd_api.g_ret_sts_unexp_error ;

154: );
155:
156: WHEN others THEN
157: -- ROLLBACK TO get_relationships_pub;
158: x_return_status := fnd_api.g_ret_sts_unexp_error ;
159: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
160: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
161: END IF;
162: fnd_msg_pub.count_and_get

Line 212: IF NOT fnd_api.compatible_api_call ( l_api_version,

208:
209: csi_utility_grp.check_ib_active;
210:
211: -- standard call TO check for call compatibility.
212: IF NOT fnd_api.compatible_api_call ( l_api_version,
213: p_api_version,
214: l_api_name,
215: g_pkg_name)
216: THEN

Line 217: RAISE fnd_api.g_exc_unexpected_error;

213: p_api_version,
214: l_api_name,
215: g_pkg_name)
216: THEN
217: RAISE fnd_api.g_exc_unexpected_error;
218: END IF;
219:
220:
221: -- initialize message list IF p_init_msg_list is set TO true.

Line 222: IF fnd_api.to_boolean( p_init_msg_list )

218: END IF;
219:
220:
221: -- initialize message list IF p_init_msg_list is set TO true.
222: IF fnd_api.to_boolean( p_init_msg_list )
223: THEN
224: fnd_msg_pub.initialize;
225: END IF;
226:

Line 230: x_return_status := fnd_api.g_ret_sts_success;

226:
227:
228:
229: -- initialize api return status TO success
230: x_return_status := fnd_api.g_ret_sts_success;
231:
232: l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
233: -- IF debug_level = 1 THEN dump the PROCEDURE name
234: IF (l_debug_level > 0) THEN

Line 277: AND nvl(position_reference,fnd_api.g_miss_char) =

273: where relationship_id = (select max(relationship_id)
274: from CSI_II_RELATIONSHIPS
275: WHERE object_id=p_relationship_tbl(l_count).object_id
276: AND subject_id=p_relationship_tbl(l_count).subject_id -- sguthiva added for bug 2370120
277: AND nvl(position_reference,fnd_api.g_miss_char) =
278: nvl(p_relationship_tbl(l_count).position_reference,fnd_api.g_miss_char)
279: AND relationship_type_code=p_relationship_tbl(l_count).relationship_type_code
280: AND active_end_date IS NOT NULL);
281: --

Line 278: nvl(p_relationship_tbl(l_count).position_reference,fnd_api.g_miss_char)

274: from CSI_II_RELATIONSHIPS
275: WHERE object_id=p_relationship_tbl(l_count).object_id
276: AND subject_id=p_relationship_tbl(l_count).subject_id -- sguthiva added for bug 2370120
277: AND nvl(position_reference,fnd_api.g_miss_char) =
278: nvl(p_relationship_tbl(l_count).position_reference,fnd_api.g_miss_char)
279: AND relationship_type_code=p_relationship_tbl(l_count).relationship_type_code
280: AND active_end_date IS NOT NULL);
281: --
282: l_relationship_tbl(1):=p_relationship_tbl(l_count);

Line 288: p_relationship_tbl(l_count).active_end_date = fnd_api.g_miss_date

284: l_relationship_tbl(1).object_version_number:=l_object_version_number;
285: l_relationship_tbl(1).subject_id:=p_relationship_tbl(l_count).subject_id;
286:
287: IF p_relationship_tbl(l_count).active_end_date IS NULL OR
288: p_relationship_tbl(l_count).active_end_date = fnd_api.g_miss_date
289: THEN
290: l_relationship_tbl(1).active_end_date:=NULL;
291: END IF;
292:

Line 295: p_commit => fnd_api.g_false,

291: END IF;
292:
293: csi_ii_relationships_pvt.update_relationship(
294: p_api_version => p_api_version,
295: p_commit => fnd_api.g_false,
296: p_init_msg_list => p_init_msg_list,
297: p_validation_level => p_validation_level,
298: p_relationship_tbl => l_relationship_tbl,
299: p_txn_rec => p_txn_rec,

Line 305: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

301: x_msg_count => x_msg_count,
302: x_msg_data => x_msg_data
303: );
304:
305: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
306: l_msg_index := 1;
307: l_msg_count := x_msg_count;
308: WHILE l_msg_count > 0 LOOP
309: x_msg_data := FND_MSG_PUB.GET

Line 311: FND_API.G_FALSE );

307: l_msg_count := x_msg_count;
308: WHILE l_msg_count > 0 LOOP
309: x_msg_data := FND_MSG_PUB.GET
310: ( l_msg_index,
311: FND_API.G_FALSE );
312: csi_gen_utility_pvt.put_line( ' Error from Update_relationship PVT..');
313: csi_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
314: l_msg_index := l_msg_index + 1;
315: l_msg_count := l_msg_count - 1;

Line 317: RAISE FND_API.G_EXC_ERROR;

313: csi_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
314: l_msg_index := l_msg_index + 1;
315: l_msg_count := l_msg_count - 1;
316: END LOOP;
317: RAISE FND_API.G_EXC_ERROR;
318: END IF;
319: EXCEPTION
320: WHEN NO_DATA_FOUND THEN
321: -- l_relationship_tbl:=l_dummy_tbl;

Line 325: p_commit => fnd_api.g_false,

321: -- l_relationship_tbl:=l_dummy_tbl;
322: l_relationship_tbl(1):=p_relationship_tbl(l_count);
323: csi_ii_relationships_pvt.create_relationship(
324: p_api_version => p_api_version,
325: p_commit => fnd_api.g_false,
326: p_init_msg_list => p_init_msg_list,
327: p_validation_level => p_validation_level,
328: p_relationship_tbl => l_relationship_tbl,
329: p_txn_rec => p_txn_rec,

Line 335: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

331: x_msg_count => x_msg_count,
332: x_msg_data => x_msg_data
333: );
334:
335: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
336: l_msg_index := 1;
337: l_msg_count := x_msg_count;
338: WHILE l_msg_count > 0 LOOP
339: x_msg_data := FND_MSG_PUB.GET

Line 341: FND_API.G_FALSE );

337: l_msg_count := x_msg_count;
338: WHILE l_msg_count > 0 LOOP
339: x_msg_data := FND_MSG_PUB.GET
340: ( l_msg_index,
341: FND_API.G_FALSE );
342: csi_gen_utility_pvt.put_line( ' Error from Create_relationship PVT..');
343: csi_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
344: l_msg_index := l_msg_index + 1;
345: l_msg_count := l_msg_count - 1;

Line 347: RAISE FND_API.G_EXC_ERROR;

343: csi_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
344: l_msg_index := l_msg_index + 1;
345: l_msg_count := l_msg_count - 1;
346: END LOOP;
347: RAISE FND_API.G_EXC_ERROR;
348: END IF;
349:
350: END;
351: p_relationship_tbl(l_count).relationship_id:=l_relationship_tbl(1).relationship_id;

Line 404: ,p_commit => fnd_api.g_false

400: p_relationship_tbl(l_count).object_id);
401: END IF;
402: CSI_BUSINESS_EVENT_PVT.CREATE_INSTANCE_EVENT
403: (p_api_version => p_api_version
404: ,p_commit => fnd_api.g_false
405: ,p_init_msg_list => p_init_msg_list
406: ,p_validation_level => p_validation_level
407: ,p_instance_id => p_relationship_tbl(l_count).subject_id
408: ,p_subject_instance_id => nvl(l_root_asset_id, p_relationship_tbl(l_count).object_id)

Line 414: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

410: ,x_msg_count => x_msg_count
411: ,x_msg_data => x_msg_data
412: );
413:
414: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
415: l_msg_index := 1;
416: l_msg_count := x_msg_count;
417:
418: WHILE l_msg_count > 0 LOOP

Line 421: FND_API.G_FALSE );

417:
418: WHILE l_msg_count > 0 LOOP
419: x_msg_data := FND_MSG_PUB.GET
420: (l_msg_index,
421: FND_API.G_FALSE );
422: csi_gen_utility_pvt.put_line('Error from CSI_BUSINESS_EVENT.CREATE_INSTANCE_EVENT');
423: csi_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
424: l_msg_index := l_msg_index + 1;
425: l_msg_count := l_msg_count - 1;

Line 427: RAISE FND_API.G_EXC_ERROR;

423: csi_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
424: l_msg_index := l_msg_index + 1;
425: l_msg_count := l_msg_count - 1;
426: END LOOP;
427: RAISE FND_API.G_EXC_ERROR;
428: END IF;
429: END IF;
430: END IF;
431: -- End Add Code for Siebel Genesis Project

Line 438: ,p_commit => fnd_api.g_false

434: -- Here we call update_version_time to update date_time_stamp of
435: -- version labels created with this transaction_id to sysdate.
436: csi_item_instance_pvt.update_version_time
437: ( p_api_version => p_api_version
438: ,p_commit => fnd_api.g_false
439: ,p_init_msg_list => p_init_msg_list
440: ,p_validation_level => p_validation_level
441: ,p_txn_rec => p_txn_rec
442: ,x_return_status => x_return_status

Line 446: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

442: ,x_return_status => x_return_status
443: ,x_msg_count => x_msg_count
444: ,x_msg_data => x_msg_data);
445:
446: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
447: l_msg_index := 1;
448: l_msg_count := x_msg_count;
449: WHILE l_msg_count > 0 LOOP
450: x_msg_data := FND_MSG_PUB.GET

Line 452: FND_API.G_FALSE );

448: l_msg_count := x_msg_count;
449: WHILE l_msg_count > 0 LOOP
450: x_msg_data := FND_MSG_PUB.GET
451: ( l_msg_index,
452: FND_API.G_FALSE );
453: csi_gen_utility_pvt.put_line( ' Error from UPDATE_VERSION_TIME..');
454: csi_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
455: l_msg_index := l_msg_index + 1;
456: l_msg_count := l_msg_count - 1;

Line 458: RAISE FND_API.G_EXC_ERROR;

454: csi_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
455: l_msg_index := l_msg_index + 1;
456: l_msg_count := l_msg_count - 1;
457: END LOOP;
458: RAISE FND_API.G_EXC_ERROR;
459: END IF;
460:
461:
462: -- check return status FROM the above PROCEDURE call

Line 463: IF x_return_status = fnd_api.g_ret_sts_error THEN

459: END IF;
460:
461:
462: -- check return status FROM the above PROCEDURE call
463: IF x_return_status = fnd_api.g_ret_sts_error THEN
464: RAISE fnd_api.g_exc_error;
465: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
466: RAISE fnd_api.g_exc_unexpected_error;
467: END IF;

Line 464: RAISE fnd_api.g_exc_error;

460:
461:
462: -- check return status FROM the above PROCEDURE call
463: IF x_return_status = fnd_api.g_ret_sts_error THEN
464: RAISE fnd_api.g_exc_error;
465: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
466: RAISE fnd_api.g_exc_unexpected_error;
467: END IF;
468:

Line 465: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

461:
462: -- check return status FROM the above PROCEDURE call
463: IF x_return_status = fnd_api.g_ret_sts_error THEN
464: RAISE fnd_api.g_exc_error;
465: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
466: RAISE fnd_api.g_exc_unexpected_error;
467: END IF;
468:
469: --

Line 466: RAISE fnd_api.g_exc_unexpected_error;

462: -- check return status FROM the above PROCEDURE call
463: IF x_return_status = fnd_api.g_ret_sts_error THEN
464: RAISE fnd_api.g_exc_error;
465: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
466: RAISE fnd_api.g_exc_unexpected_error;
467: END IF;
468:
469: --
470: -- END of api body.

Line 474: IF fnd_api.to_boolean( p_commit )

470: -- END of api body.
471: --
472:
473: -- standard check for p_commit
474: IF fnd_api.to_boolean( p_commit )
475: THEN
476: COMMIT WORK;
477: END IF;
478:

Line 491: WHEN fnd_api.g_exc_error THEN

487: p_data => x_msg_data
488: );
489:
490: EXCEPTION
491: WHEN fnd_api.g_exc_error THEN
492: ROLLBACK TO create_relationship_pub;
493: x_return_status := fnd_api.g_ret_sts_error ;
494: fnd_msg_pub.count_and_get
495: (p_count => x_msg_count ,

Line 493: x_return_status := fnd_api.g_ret_sts_error ;

489:
490: EXCEPTION
491: WHEN fnd_api.g_exc_error THEN
492: ROLLBACK TO create_relationship_pub;
493: x_return_status := fnd_api.g_ret_sts_error ;
494: fnd_msg_pub.count_and_get
495: (p_count => x_msg_count ,
496: p_data => x_msg_data
497: );

Line 499: WHEN fnd_api.g_exc_unexpected_error THEN

495: (p_count => x_msg_count ,
496: p_data => x_msg_data
497: );
498:
499: WHEN fnd_api.g_exc_unexpected_error THEN
500: ROLLBACK TO create_relationship_pub;
501: x_return_status := fnd_api.g_ret_sts_unexp_error ;
502: fnd_msg_pub.count_and_get
503: (p_count => x_msg_count ,

Line 501: x_return_status := fnd_api.g_ret_sts_unexp_error ;

497: );
498:
499: WHEN fnd_api.g_exc_unexpected_error THEN
500: ROLLBACK TO create_relationship_pub;
501: x_return_status := fnd_api.g_ret_sts_unexp_error ;
502: fnd_msg_pub.count_and_get
503: (p_count => x_msg_count ,
504: p_data => x_msg_data
505: );

Line 509: x_return_status := fnd_api.g_ret_sts_unexp_error ;

505: );
506:
507: WHEN OTHERS THEN
508: ROLLBACK TO create_relationship_pub;
509: x_return_status := fnd_api.g_ret_sts_unexp_error ;
510: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
511: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
512: END IF;
513: fnd_msg_pub.count_and_get

Line 556: IF NOT fnd_api.compatible_api_call ( l_api_version,

552:
553: csi_utility_grp.check_ib_active;
554:
555: -- standard call TO check for call compatibility.
556: IF NOT fnd_api.compatible_api_call ( l_api_version,
557: p_api_version,
558: l_api_name,
559: g_pkg_name)
560: THEN

Line 561: RAISE fnd_api.g_exc_unexpected_error;

557: p_api_version,
558: l_api_name,
559: g_pkg_name)
560: THEN
561: RAISE fnd_api.g_exc_unexpected_error;
562: END IF;
563:
564:
565: -- initialize message list IF p_init_msg_list is set TO true.

Line 566: IF fnd_api.to_boolean( p_init_msg_list )

562: END IF;
563:
564:
565: -- initialize message list IF p_init_msg_list is set TO true.
566: IF fnd_api.to_boolean( p_init_msg_list )
567: THEN
568: fnd_msg_pub.initialize;
569: END IF;
570:

Line 573: x_return_status := fnd_api.g_ret_sts_success;

569: END IF;
570:
571:
572: -- initialize api return status TO success
573: x_return_status := fnd_api.g_ret_sts_success;
574:
575: l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
576: -- IF debug_level = 1 THEN dump the PROCEDURE name
577: IF (l_debug_level > 0) THEN

Line 608: l_replace_flag:=fnd_api.g_false;

604: l_line_count := l_relationship_tbl.count;
605:
606: FOR l_count IN 1..l_line_count
607: LOOP
608: l_replace_flag:=fnd_api.g_false;
609: IF l_relationship_tbl(l_count).relationship_id IS NOT NULL AND
610: l_relationship_tbl(l_count).relationship_id <> fnd_api.g_miss_num AND
611: l_relationship_tbl(l_count).active_end_date IS NOT NULL AND
612: l_relationship_tbl(l_count).active_end_date <> fnd_api.g_miss_date

Line 610: l_relationship_tbl(l_count).relationship_id <> fnd_api.g_miss_num AND

606: FOR l_count IN 1..l_line_count
607: LOOP
608: l_replace_flag:=fnd_api.g_false;
609: IF l_relationship_tbl(l_count).relationship_id IS NOT NULL AND
610: l_relationship_tbl(l_count).relationship_id <> fnd_api.g_miss_num AND
611: l_relationship_tbl(l_count).active_end_date IS NOT NULL AND
612: l_relationship_tbl(l_count).active_end_date <> fnd_api.g_miss_date
613: -- Here I got a record which has an end date.
614: THEN

Line 612: l_relationship_tbl(l_count).active_end_date <> fnd_api.g_miss_date

608: l_replace_flag:=fnd_api.g_false;
609: IF l_relationship_tbl(l_count).relationship_id IS NOT NULL AND
610: l_relationship_tbl(l_count).relationship_id <> fnd_api.g_miss_num AND
611: l_relationship_tbl(l_count).active_end_date IS NOT NULL AND
612: l_relationship_tbl(l_count).active_end_date <> fnd_api.g_miss_date
613: -- Here I got a record which has an end date.
614: THEN
615: FOR l_search IN 1..l_line_count
616: LOOP

Line 620: l_relationship_tbl(l_search).active_end_date = fnd_api.g_miss_date OR

616: LOOP
617: IF l_relationship_tbl(l_search).subject_id = l_relationship_tbl(l_count).subject_id AND
618: l_relationship_tbl(l_search).object_id <> l_relationship_tbl(l_count).object_id AND
619: (l_relationship_tbl(l_search).active_end_date IS NULL OR
620: l_relationship_tbl(l_search).active_end_date = fnd_api.g_miss_date OR
621: l_relationship_tbl(l_search).active_end_date > SYSDATE)
622: THEN
623: -- Here I found a record with the same subject, meaning parent swap.
624: l_replace_flag:=fnd_api.g_true;

Line 624: l_replace_flag:=fnd_api.g_true;

620: l_relationship_tbl(l_search).active_end_date = fnd_api.g_miss_date OR
621: l_relationship_tbl(l_search).active_end_date > SYSDATE)
622: THEN
623: -- Here I found a record with the same subject, meaning parent swap.
624: l_replace_flag:=fnd_api.g_true;
625: EXIT;
626: END IF;
627: END LOOP;
628:

Line 632: l_relationship_tbl(l_count).relationship_id <> fnd_api.g_miss_num)) AND

628:
629: END IF;
630:
631: IF ((l_relationship_tbl(l_count).relationship_id IS NOT NULL AND
632: l_relationship_tbl(l_count).relationship_id <> fnd_api.g_miss_num)) AND
633: x_return_status = FND_API.G_RET_STS_SUCCESS
634: THEN
635:
636: l_rel_tbl.delete;

Line 633: x_return_status = FND_API.G_RET_STS_SUCCESS

629: END IF;
630:
631: IF ((l_relationship_tbl(l_count).relationship_id IS NOT NULL AND
632: l_relationship_tbl(l_count).relationship_id <> fnd_api.g_miss_num)) AND
633: x_return_status = FND_API.G_RET_STS_SUCCESS
634: THEN
635:
636: l_rel_tbl.delete;
637: l_rel_tbl(1):=l_relationship_tbl(l_count);

Line 642: p_commit => fnd_api.g_false,

638: csi_gen_utility_pvt.put_line('Value of relationship_id is : '||l_rel_tbl(1).relationship_id);
639: csi_gen_utility_pvt.put_line('Value of replace_flag is :'||l_replace_flag);
640: csi_ii_relationships_pvt.update_relationship(
641: p_api_version => p_api_version,
642: p_commit => fnd_api.g_false,
643: p_init_msg_list => p_init_msg_list,
644: p_validation_level => p_validation_level,
645: p_relationship_tbl => l_rel_tbl,
646: p_replace_flag => l_replace_flag,

Line 657: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

653:
654: END LOOP;
655: -- End addition for replacement
656:
657: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
658: l_msg_index := 1;
659: l_msg_count := x_msg_count;
660: WHILE l_msg_count > 0 LOOP
661: x_msg_data := FND_MSG_PUB.GET

Line 663: FND_API.G_FALSE );

659: l_msg_count := x_msg_count;
660: WHILE l_msg_count > 0 LOOP
661: x_msg_data := FND_MSG_PUB.GET
662: ( l_msg_index,
663: FND_API.G_FALSE );
664: csi_gen_utility_pvt.put_line( ' Error from csi_ii_relationships_pvt.update_relationship..');
665: csi_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
666: l_msg_index := l_msg_index + 1;
667: l_msg_count := l_msg_count - 1;

Line 669: RAISE FND_API.G_EXC_ERROR;

665: csi_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
666: l_msg_index := l_msg_index + 1;
667: l_msg_count := l_msg_count - 1;
668: END LOOP;
669: RAISE FND_API.G_EXC_ERROR;
670: END IF;
671:
672: -- Added for replacement
673:

Line 677: l_relationship_tbl(l_count).relationship_id = fnd_api.g_miss_num)) AND

673:
674: FOR l_count IN 1..l_line_count
675: LOOP
676: IF ((l_relationship_tbl(l_count).relationship_id IS NULL OR
677: l_relationship_tbl(l_count).relationship_id = fnd_api.g_miss_num)) AND
678: x_return_status = FND_API.G_RET_STS_SUCCESS
679: THEN
680: l_rel_tbl.delete;
681: l_rel_tbl(1):=l_relationship_tbl(l_count);

Line 678: x_return_status = FND_API.G_RET_STS_SUCCESS

674: FOR l_count IN 1..l_line_count
675: LOOP
676: IF ((l_relationship_tbl(l_count).relationship_id IS NULL OR
677: l_relationship_tbl(l_count).relationship_id = fnd_api.g_miss_num)) AND
678: x_return_status = FND_API.G_RET_STS_SUCCESS
679: THEN
680: l_rel_tbl.delete;
681: l_rel_tbl(1):=l_relationship_tbl(l_count);
682: csi_ii_relationships_pvt.create_relationship(

Line 684: p_commit => fnd_api.g_false,

680: l_rel_tbl.delete;
681: l_rel_tbl(1):=l_relationship_tbl(l_count);
682: csi_ii_relationships_pvt.create_relationship(
683: p_api_version => p_api_version,
684: p_commit => fnd_api.g_false,
685: p_init_msg_list => p_init_msg_list,
686: p_validation_level => p_validation_level,
687: p_relationship_tbl => l_rel_tbl,
688: p_txn_rec => p_txn_rec,

Line 696: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

692: );
693: END IF;
694: END LOOP;
695:
696: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
697: l_msg_index := 1;
698: l_msg_count := x_msg_count;
699: WHILE l_msg_count > 0
700: LOOP

Line 703: FND_API.G_FALSE );

699: WHILE l_msg_count > 0
700: LOOP
701: x_msg_data := FND_MSG_PUB.GET
702: ( l_msg_index,
703: FND_API.G_FALSE );
704: csi_gen_utility_pvt.put_line( ' Error from csi_ii_relationships_pvt.create_relationship..');
705: csi_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
706: l_msg_index := l_msg_index + 1;
707: l_msg_count := l_msg_count - 1;

Line 709: RAISE FND_API.G_EXC_ERROR;

705: csi_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
706: l_msg_index := l_msg_index + 1;
707: l_msg_count := l_msg_count - 1;
708: END LOOP;
709: RAISE FND_API.G_EXC_ERROR;
710: END IF;
711:
712: -- End addition for replacement
713:

Line 716: IF x_return_status = fnd_api.g_ret_sts_error THEN

712: -- End addition for replacement
713:
714:
715: -- check return status FROM the above PROCEDURE call
716: IF x_return_status = fnd_api.g_ret_sts_error THEN
717: RAISE fnd_api.g_exc_error;
718: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
719: RAISE fnd_api.g_exc_unexpected_error;
720: END IF;

Line 717: RAISE fnd_api.g_exc_error;

713:
714:
715: -- check return status FROM the above PROCEDURE call
716: IF x_return_status = fnd_api.g_ret_sts_error THEN
717: RAISE fnd_api.g_exc_error;
718: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
719: RAISE fnd_api.g_exc_unexpected_error;
720: END IF;
721:

Line 718: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

714:
715: -- check return status FROM the above PROCEDURE call
716: IF x_return_status = fnd_api.g_ret_sts_error THEN
717: RAISE fnd_api.g_exc_error;
718: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
719: RAISE fnd_api.g_exc_unexpected_error;
720: END IF;
721:
722: --

Line 719: RAISE fnd_api.g_exc_unexpected_error;

715: -- check return status FROM the above PROCEDURE call
716: IF x_return_status = fnd_api.g_ret_sts_error THEN
717: RAISE fnd_api.g_exc_error;
718: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
719: RAISE fnd_api.g_exc_unexpected_error;
720: END IF;
721:
722: --
723: -- END of api body

Line 730: ,p_commit => fnd_api.g_false

726: -- Here we call update_version_time to update date_time_stamp of
727: -- version labels created with this transaction_id to sysdate.
728: csi_item_instance_pvt.update_version_time
729: ( p_api_version => p_api_version
730: ,p_commit => fnd_api.g_false
731: ,p_init_msg_list => p_init_msg_list
732: ,p_validation_level => p_validation_level
733: ,p_txn_rec => p_txn_rec
734: ,x_return_status => x_return_status

Line 738: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN

734: ,x_return_status => x_return_status
735: ,x_msg_count => x_msg_count
736: ,x_msg_data => x_msg_data);
737:
738: IF NOT(x_return_status = FND_API.G_RET_STS_SUCCESS) THEN
739: l_msg_index := 1;
740: l_msg_count := x_msg_count;
741: WHILE l_msg_count > 0 LOOP
742: x_msg_data := FND_MSG_PUB.GET

Line 744: FND_API.G_FALSE );

740: l_msg_count := x_msg_count;
741: WHILE l_msg_count > 0 LOOP
742: x_msg_data := FND_MSG_PUB.GET
743: ( l_msg_index,
744: FND_API.G_FALSE );
745: csi_gen_utility_pvt.put_line( ' Error from UPDATE_VERSION_TIME..');
746: csi_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
747: l_msg_index := l_msg_index + 1;
748: l_msg_count := l_msg_count - 1;

Line 750: RAISE FND_API.G_EXC_ERROR;

746: csi_gen_utility_pvt.put_line('MESSAGE DATA = '||x_msg_data);
747: l_msg_index := l_msg_index + 1;
748: l_msg_count := l_msg_count - 1;
749: END LOOP;
750: RAISE FND_API.G_EXC_ERROR;
751: END IF;
752: -- standard check for p_commit
753: IF fnd_api.to_boolean( p_commit )
754: THEN

Line 753: IF fnd_api.to_boolean( p_commit )

749: END LOOP;
750: RAISE FND_API.G_EXC_ERROR;
751: END IF;
752: -- standard check for p_commit
753: IF fnd_api.to_boolean( p_commit )
754: THEN
755: COMMIT WORK;
756: END IF;
757:

Line 770: WHEN fnd_api.g_exc_error THEN

766: p_data => x_msg_data
767: );
768:
769: EXCEPTION
770: WHEN fnd_api.g_exc_error THEN
771: ROLLBACK TO update_relationship_pub;
772: x_return_status := fnd_api.g_ret_sts_error ;
773: fnd_msg_pub.count_and_get
774: (p_count => x_msg_count ,

Line 772: x_return_status := fnd_api.g_ret_sts_error ;

768:
769: EXCEPTION
770: WHEN fnd_api.g_exc_error THEN
771: ROLLBACK TO update_relationship_pub;
772: x_return_status := fnd_api.g_ret_sts_error ;
773: fnd_msg_pub.count_and_get
774: (p_count => x_msg_count ,
775: p_data => x_msg_data
776: );

Line 778: WHEN fnd_api.g_exc_unexpected_error THEN

774: (p_count => x_msg_count ,
775: p_data => x_msg_data
776: );
777:
778: WHEN fnd_api.g_exc_unexpected_error THEN
779: ROLLBACK TO update_relationship_pub;
780: x_return_status := fnd_api.g_ret_sts_unexp_error ;
781: fnd_msg_pub.count_and_get
782: (p_count => x_msg_count ,

Line 780: x_return_status := fnd_api.g_ret_sts_unexp_error ;

776: );
777:
778: WHEN fnd_api.g_exc_unexpected_error THEN
779: ROLLBACK TO update_relationship_pub;
780: x_return_status := fnd_api.g_ret_sts_unexp_error ;
781: fnd_msg_pub.count_and_get
782: (p_count => x_msg_count ,
783: p_data => x_msg_data
784: );

Line 788: x_return_status := fnd_api.g_ret_sts_unexp_error ;

784: );
785:
786: WHEN OTHERS THEN
787: ROLLBACK TO update_relationship_pub;
788: x_return_status := fnd_api.g_ret_sts_unexp_error ;
789: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
790: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
791: END IF;
792: fnd_msg_pub.count_and_get

Line 830: IF NOT fnd_api.compatible_api_call ( l_api_version,

826:
827: csi_utility_grp.check_ib_active;
828:
829: -- standard call TO check for call compatibility.
830: IF NOT fnd_api.compatible_api_call ( l_api_version,
831: p_api_version,
832: l_api_name,
833: g_pkg_name)
834: THEN

Line 835: RAISE fnd_api.g_exc_unexpected_error;

831: p_api_version,
832: l_api_name,
833: g_pkg_name)
834: THEN
835: RAISE fnd_api.g_exc_unexpected_error;
836: END IF;
837:
838:
839: -- initialize message list IF p_init_msg_list is set TO true.

Line 840: IF fnd_api.to_boolean( p_init_msg_list )

836: END IF;
837:
838:
839: -- initialize message list IF p_init_msg_list is set TO true.
840: IF fnd_api.to_boolean( p_init_msg_list )
841: THEN
842: fnd_msg_pub.initialize;
843: END IF;
844:

Line 847: x_return_status := fnd_api.g_ret_sts_success;

843: END IF;
844:
845:
846: -- initialize api return status TO success
847: x_return_status := fnd_api.g_ret_sts_success;
848:
849: l_debug_level:=fnd_profile.value('CSI_DEBUG_LEVEL');
850: -- IF debug_level = 1 THEN dump the PROCEDURE name
851: IF (l_debug_level > 0) THEN

Line 880: p_commit => fnd_api.g_false,

876: *****/
877:
878: csi_ii_relationships_pvt.expire_relationship(
879: p_api_version => p_api_version,
880: p_commit => fnd_api.g_false,
881: p_init_msg_list => p_init_msg_list,
882: p_validation_level => p_validation_level,
883: p_relationship_rec => p_relationship_rec,
884: p_txn_rec => p_txn_rec,

Line 896: IF x_return_status = fnd_api.g_ret_sts_error THEN

892:
893:
894:
895: -- check return status FROM the above PROCEDURE call
896: IF x_return_status = fnd_api.g_ret_sts_error THEN
897: RAISE fnd_api.g_exc_error;
898: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
899: RAISE fnd_api.g_exc_unexpected_error;
900: END IF;

Line 897: RAISE fnd_api.g_exc_error;

893:
894:
895: -- check return status FROM the above PROCEDURE call
896: IF x_return_status = fnd_api.g_ret_sts_error THEN
897: RAISE fnd_api.g_exc_error;
898: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
899: RAISE fnd_api.g_exc_unexpected_error;
900: END IF;
901:

Line 898: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

894:
895: -- check return status FROM the above PROCEDURE call
896: IF x_return_status = fnd_api.g_ret_sts_error THEN
897: RAISE fnd_api.g_exc_error;
898: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
899: RAISE fnd_api.g_exc_unexpected_error;
900: END IF;
901:
902:

Line 899: RAISE fnd_api.g_exc_unexpected_error;

895: -- check return status FROM the above PROCEDURE call
896: IF x_return_status = fnd_api.g_ret_sts_error THEN
897: RAISE fnd_api.g_exc_error;
898: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN
899: RAISE fnd_api.g_exc_unexpected_error;
900: END IF;
901:
902:
903:

Line 905: IF fnd_api.to_boolean( p_commit )

901:
902:
903:
904: -- standard check for p_commit
905: IF fnd_api.to_boolean( p_commit )
906: THEN
907: COMMIT WORK;
908: END IF;
909:

Line 922: WHEN fnd_api.g_exc_error THEN

918: p_data => x_msg_data
919: );
920:
921: EXCEPTION
922: WHEN fnd_api.g_exc_error THEN
923: ROLLBACK TO expire_relationship_pub;
924: x_return_status := fnd_api.g_ret_sts_error ;
925: fnd_msg_pub.count_and_get
926: (p_count => x_msg_count ,

Line 924: x_return_status := fnd_api.g_ret_sts_error ;

920:
921: EXCEPTION
922: WHEN fnd_api.g_exc_error THEN
923: ROLLBACK TO expire_relationship_pub;
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: );

Line 930: WHEN fnd_api.g_exc_unexpected_error THEN

926: (p_count => x_msg_count ,
927: p_data => x_msg_data
928: );
929:
930: WHEN fnd_api.g_exc_unexpected_error THEN
931: ROLLBACK TO expire_relationship_pub;
932: x_return_status := fnd_api.g_ret_sts_unexp_error ;
933: fnd_msg_pub.count_and_get
934: (p_count => x_msg_count ,

Line 932: x_return_status := fnd_api.g_ret_sts_unexp_error ;

928: );
929:
930: WHEN fnd_api.g_exc_unexpected_error THEN
931: ROLLBACK TO expire_relationship_pub;
932: x_return_status := fnd_api.g_ret_sts_unexp_error ;
933: fnd_msg_pub.count_and_get
934: (p_count => x_msg_count ,
935: p_data => x_msg_data
936: );

Line 940: x_return_status := fnd_api.g_ret_sts_unexp_error ;

936: );
937:
938: WHEN OTHERS THEN
939: ROLLBACK TO expire_relationship_pub;
940: x_return_status := fnd_api.g_ret_sts_unexp_error ;
941: IF fnd_msg_pub.check_msg_level(fnd_msg_pub.g_msg_lvl_unexp_error) THEN
942: fnd_msg_pub.add_exc_msg(g_pkg_name ,l_api_name);
943: END IF;
944: fnd_msg_pub.count_and_get