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 405: ,p_commit => fnd_api.g_false

401: END IF;
402: --Bug 6990065, base bug 6916919, by requirement, update event should be raised instead of create event when relationship is created
403: CSI_BUSINESS_EVENT_PVT.UPDATE_INSTANCE_EVENT
404: (p_api_version => p_api_version
405: ,p_commit => fnd_api.g_false
406: ,p_init_msg_list => p_init_msg_list
407: ,p_validation_level => p_validation_level
408: ,p_instance_id => p_relationship_tbl(l_count).subject_id
409: ,p_subject_instance_id => nvl(l_root_asset_id, p_relationship_tbl(l_count).object_id)

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

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

Line 422: FND_API.G_FALSE );

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

Line 428: RAISE FND_API.G_EXC_ERROR;

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

Line 439: ,p_commit => fnd_api.g_false

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

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

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

Line 453: FND_API.G_FALSE );

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

Line 459: RAISE FND_API.G_EXC_ERROR;

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

Line 464: IF x_return_status = fnd_api.g_ret_sts_error THEN

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

Line 465: RAISE fnd_api.g_exc_error;

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

Line 466: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

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

Line 467: RAISE fnd_api.g_exc_unexpected_error;

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

Line 475: IF fnd_api.to_boolean( p_commit )

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

Line 492: WHEN fnd_api.g_exc_error THEN

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

Line 494: x_return_status := fnd_api.g_ret_sts_error ;

490:
491: EXCEPTION
492: WHEN fnd_api.g_exc_error THEN
493: ROLLBACK TO create_relationship_pub;
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: );

Line 500: WHEN fnd_api.g_exc_unexpected_error THEN

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

Line 502: x_return_status := fnd_api.g_ret_sts_unexp_error ;

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

Line 510: x_return_status := fnd_api.g_ret_sts_unexp_error ;

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

Line 557: IF NOT fnd_api.compatible_api_call ( l_api_version,

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

Line 562: RAISE fnd_api.g_exc_unexpected_error;

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

Line 567: IF fnd_api.to_boolean( p_init_msg_list )

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

Line 574: x_return_status := fnd_api.g_ret_sts_success;

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

Line 609: l_replace_flag:=fnd_api.g_false;

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

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

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

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

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

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

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

Line 625: l_replace_flag:=fnd_api.g_true;

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

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

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

Line 634: x_return_status = FND_API.G_RET_STS_SUCCESS

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

Line 643: p_commit => fnd_api.g_false,

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

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

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

Line 664: FND_API.G_FALSE );

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

Line 670: RAISE FND_API.G_EXC_ERROR;

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

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

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

Line 679: x_return_status = FND_API.G_RET_STS_SUCCESS

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

Line 685: p_commit => fnd_api.g_false,

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

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

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

Line 704: FND_API.G_FALSE );

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

Line 710: RAISE FND_API.G_EXC_ERROR;

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

Line 717: IF x_return_status = fnd_api.g_ret_sts_error THEN

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

Line 718: RAISE fnd_api.g_exc_error;

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

Line 719: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

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

Line 720: RAISE fnd_api.g_exc_unexpected_error;

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

Line 731: ,p_commit => fnd_api.g_false

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

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

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

Line 745: FND_API.G_FALSE );

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

Line 751: RAISE FND_API.G_EXC_ERROR;

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

Line 754: IF fnd_api.to_boolean( p_commit )

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

Line 771: WHEN fnd_api.g_exc_error THEN

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

Line 773: x_return_status := fnd_api.g_ret_sts_error ;

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

Line 779: WHEN fnd_api.g_exc_unexpected_error THEN

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

Line 781: x_return_status := fnd_api.g_ret_sts_unexp_error ;

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

Line 789: x_return_status := fnd_api.g_ret_sts_unexp_error ;

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

Line 831: IF NOT fnd_api.compatible_api_call ( l_api_version,

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

Line 836: RAISE fnd_api.g_exc_unexpected_error;

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

Line 841: IF fnd_api.to_boolean( p_init_msg_list )

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

Line 848: x_return_status := fnd_api.g_ret_sts_success;

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

Line 881: p_commit => fnd_api.g_false,

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

Line 897: IF x_return_status = fnd_api.g_ret_sts_error THEN

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

Line 898: RAISE fnd_api.g_exc_error;

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

Line 899: ELSIF x_return_status = fnd_api.g_ret_sts_unexp_error THEN

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

Line 900: RAISE fnd_api.g_exc_unexpected_error;

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

Line 906: IF fnd_api.to_boolean( p_commit )

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

Line 923: WHEN fnd_api.g_exc_error THEN

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

Line 925: x_return_status := fnd_api.g_ret_sts_error ;

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

Line 931: WHEN fnd_api.g_exc_unexpected_error THEN

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

Line 933: x_return_status := fnd_api.g_ret_sts_unexp_error ;

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

Line 941: x_return_status := fnd_api.g_ret_sts_unexp_error ;

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