DBA Data[Home] [Help]

APPS.WIP_EAM_GENEALOGY_PVT dependencies on FND_API

Line 8: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

4: G_PKG_NAME CONSTANT VARCHAR2(30) := 'WIP_EAM_GENEALOGY_PVT';
5:
6: PROCEDURE create_eam_genealogy(
7: p_api_version IN NUMBER,
8: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
9: p_commit IN VARCHAR2 := FND_API.G_FALSE,
10: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
11: p_subinventory IN VARCHAR2 := NULL,
12: p_locator_id IN NUMBER := NULL,

Line 9: p_commit IN VARCHAR2 := FND_API.G_FALSE,

5:
6: PROCEDURE create_eam_genealogy(
7: p_api_version IN NUMBER,
8: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
9: p_commit IN VARCHAR2 := FND_API.G_FALSE,
10: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
11: p_subinventory IN VARCHAR2 := NULL,
12: p_locator_id IN NUMBER := NULL,
13: p_object_id IN NUMBER := NULL,

Line 10: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

6: PROCEDURE create_eam_genealogy(
7: p_api_version IN NUMBER,
8: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
9: p_commit IN VARCHAR2 := FND_API.G_FALSE,
10: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
11: p_subinventory IN VARCHAR2 := NULL,
12: p_locator_id IN NUMBER := NULL,
13: p_object_id IN NUMBER := NULL,
14: p_serial_number IN VARCHAR2 := NULL,

Line 81: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version,

77: begin
78: -- l_plog := ( (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) AND l_log );
79: savepoint eam_rebuild_genealogy;
80:
81: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version,
82: p_api_version,
83: l_api_name,
84: g_pkg_name)
85: THEN

Line 87: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

83: l_api_name,
84: g_pkg_name)
85: THEN
86:
87: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
88:
89: END IF;
90:
91: IF FND_API.TO_BOOLEAN(p_init_msg_list)

Line 91: IF FND_API.TO_BOOLEAN(p_init_msg_list)

87: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
88:
89: END IF;
90:
91: IF FND_API.TO_BOOLEAN(p_init_msg_list)
92: THEN
93:
94: FND_MSG_PUB.initialize;
95:

Line 99: x_return_status := FND_API.G_RET_STS_SUCCESS;

95:
96: END IF;
97:
98: -- Initialize API return status to success
99: x_return_status := FND_API.G_RET_STS_SUCCESS;
100: l_return_status := FND_API.G_RET_STS_SUCCESS;
101:
102:
103: if (l_plog) then FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, l_module,

Line 100: l_return_status := FND_API.G_RET_STS_SUCCESS;

96: END IF;
97:
98: -- Initialize API return status to success
99: x_return_status := FND_API.G_RET_STS_SUCCESS;
100: l_return_status := FND_API.G_RET_STS_SUCCESS;
101:
102:
103: if (l_plog) then FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, l_module,
104: 'Start of ' || l_module || '('

Line 127: if (((p_from_eam is null) or (p_from_eam = FND_API.G_FALSE))

123: l_update_txn_id := p_update_txn_id;
124:
125: -- return without error if item is not serial controlled when
126: -- the genealogy is not originating from eam
127: if (((p_from_eam is null) or (p_from_eam = FND_API.G_FALSE))
128: and ((p_object_id is null) and (p_serial_number is null))) then
129: select serial_number_control_code into l_serial_control
130: from mtl_system_items
131: where inventory_item_id = p_inventory_item_id and

Line 135: x_return_status := FND_API.G_RET_STS_SUCCESS;

131: where inventory_item_id = p_inventory_item_id and
132: organization_id = p_organization_id;
133:
134: if (l_serial_control = 1) then
135: x_return_status := FND_API.G_RET_STS_SUCCESS;
136: return;
137: end if;
138: end if;
139:

Line 148: RAISE FND_API.G_EXC_ERROR;

144: if p_serial_number is null or p_inventory_item_id is null or p_organization_id is null then
145: -- if serial_number is null, then quit processing
146: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_ITEM_DOES_NOT_EXIST');
147: FND_MSG_PUB.ADD;
148: RAISE FND_API.G_EXC_ERROR;
149: else
150: l_serial_number := p_serial_number;
151: l_inventory_item_id := p_inventory_item_id;
152: select current_organization_id into l_organization_id

Line 170: RAISE FND_API.G_EXC_ERROR;

166: exception
167: when others then
168: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_ITEM_DOES_NOT_EXIST');
169: FND_MSG_PUB.ADD;
170: RAISE FND_API.G_EXC_ERROR;
171: end;
172: else
173: l_serial_number := p_serial_number;
174: l_inventory_item_id := p_inventory_item_id;

Line 189: RAISE FND_API.G_EXC_ERROR;

185: if p_parent_serial_number is null or p_parent_inventory_item_id is null or p_parent_organization_id is null then
186: -- if there is no parent information, then quit processing
187: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_INVALID_PARENT_ITEM');
188: FND_MSG_PUB.ADD;
189: RAISE FND_API.G_EXC_ERROR;
190:
191: else
192: begin
193:

Line 206: RAISE FND_API.G_EXC_ERROR;

202: exception
203: when others then
204: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_INVALID_PARENT_ITEM');
205: FND_MSG_PUB.ADD;
206: RAISE FND_API.G_EXC_ERROR;
207: end;
208: end if;
209:
210: else

Line 240: RAISE FND_API.G_EXC_ERROR;

236:
237: if l_charge_object_id <> l_parent_object_id then
238: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_WO_WITH_CHARGE_ASSET');
239: FND_MSG_PUB.ADD;
240: RAISE FND_API.G_EXC_ERROR;
241: end if;
242:
243: exception
244: when others then

Line 274: raise FND_API.G_EXC_ERROR;

270: x_msg_count => x_msg_count,
271: x_msg_data => x_msg_data);
272:
273: if (l_return_status = 'E') then
274: raise FND_API.G_EXC_ERROR;
275: elsif (l_return_status = 'U') then
276: raise FND_API.G_EXC_UNEXPECTED_ERROR;
277: end if;
278:

Line 276: raise FND_API.G_EXC_UNEXPECTED_ERROR;

272:
273: if (l_return_status = 'E') then
274: raise FND_API.G_EXC_ERROR;
275: elsif (l_return_status = 'U') then
276: raise FND_API.G_EXC_UNEXPECTED_ERROR;
277: end if;
278:
279: /* R12 Hook for Asset Log #4141712 Begin */
280:

Line 337: if p_commit = FND_API.G_TRUE then

333:
334: /* R12 Hook for Asset Log #4141712 End */
335:
336:
337: if p_commit = FND_API.G_TRUE then
338: commit;
339: end if;
340:
341: exception

Line 342: WHEN FND_API.G_EXC_ERROR THEN

338: commit;
339: end if;
340:
341: exception
342: WHEN FND_API.G_EXC_ERROR THEN
343: ROLLBACK TO eam_rebuild_genealogy;
344:
345: x_return_status := FND_API.G_RET_STS_ERROR;
346:

Line 345: x_return_status := FND_API.G_RET_STS_ERROR;

341: exception
342: WHEN FND_API.G_EXC_ERROR THEN
343: ROLLBACK TO eam_rebuild_genealogy;
344:
345: x_return_status := FND_API.G_RET_STS_ERROR;
346:
347: FND_MSG_PUB.Count_And_Get
348: ( p_encoded => FND_API.G_FALSE,
349: p_count => x_msg_count,

Line 348: ( p_encoded => FND_API.G_FALSE,

344:
345: x_return_status := FND_API.G_RET_STS_ERROR;
346:
347: FND_MSG_PUB.Count_And_Get
348: ( p_encoded => FND_API.G_FALSE,
349: p_count => x_msg_count,
350: p_data => x_msg_data
351: );
352:

Line 356: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

352:
353: WHEN OTHERS THEN
354: ROLLBACK TO eam_rebuild_genealogy;
355:
356: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
357:
358: FND_MSG_PUB.Count_And_Get
359: ( p_encoded => FND_API.G_FALSE,
360: p_count => x_msg_count,

Line 359: ( p_encoded => FND_API.G_FALSE,

355:
356: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
357:
358: FND_MSG_PUB.Count_And_Get
359: ( p_encoded => FND_API.G_FALSE,
360: p_count => x_msg_count,
361: p_data => x_msg_data
362: );
363:

Line 370: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,

366:
367:
368: PROCEDURE update_eam_genealogy(
369: p_api_version IN NUMBER,
370: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
371: p_commit IN VARCHAR2 := FND_API.G_FALSE,
372: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
373: p_object_type IN NUMBER,
374: p_object_id IN NUMBER := NULL,

Line 371: p_commit IN VARCHAR2 := FND_API.G_FALSE,

367:
368: PROCEDURE update_eam_genealogy(
369: p_api_version IN NUMBER,
370: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
371: p_commit IN VARCHAR2 := FND_API.G_FALSE,
372: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
373: p_object_type IN NUMBER,
374: p_object_id IN NUMBER := NULL,
375: p_serial_number IN VARCHAR2 := NULL,

Line 372: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,

368: PROCEDURE update_eam_genealogy(
369: p_api_version IN NUMBER,
370: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
371: p_commit IN VARCHAR2 := FND_API.G_FALSE,
372: p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
373: p_object_type IN NUMBER,
374: p_object_id IN NUMBER := NULL,
375: p_serial_number IN VARCHAR2 := NULL,
376: p_inventory_item_id IN NUMBER := NULL,

Line 441: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version,

437: begin
438:
439: savepoint eam_rebuild_genealogy;
440:
441: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version,
442: p_api_version,
443: l_api_name,
444: g_pkg_name)
445: THEN

Line 447: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

443: l_api_name,
444: g_pkg_name)
445: THEN
446:
447: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
448:
449: END IF;
450:
451:

Line 452: IF FND_API.TO_BOOLEAN(p_init_msg_list)

448:
449: END IF;
450:
451:
452: IF FND_API.TO_BOOLEAN(p_init_msg_list)
453: THEN
454:
455: FND_MSG_PUB.initialize;
456:

Line 460: x_return_status := FND_API.G_RET_STS_SUCCESS;

456:
457: END IF;
458:
459: -- Initialize API return status to success
460: x_return_status := FND_API.G_RET_STS_SUCCESS;
461: l_return_status := FND_API.G_RET_STS_SUCCESS;
462:
463: if (l_plog) then FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, l_module,
464: 'Start of ' || l_module || '('

Line 461: l_return_status := FND_API.G_RET_STS_SUCCESS;

457: END IF;
458:
459: -- Initialize API return status to success
460: x_return_status := FND_API.G_RET_STS_SUCCESS;
461: l_return_status := FND_API.G_RET_STS_SUCCESS;
462:
463: if (l_plog) then FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, l_module,
464: 'Start of ' || l_module || '('
465: || 'p_organization_id='|| p_organization_id || ','

Line 481: if (((p_from_eam is null) or (p_from_eam = FND_API.G_FALSE))

477:
478:
479: -- return without error if serial number is not specified when
480: -- the genealogy is not originating from eam
481: if (((p_from_eam is null) or (p_from_eam = FND_API.G_FALSE))
482: and ((p_serial_number is null) and (p_object_id is null))) then
483: x_return_status := FND_API.G_RET_STS_SUCCESS;
484: return;
485: end if;

Line 483: x_return_status := FND_API.G_RET_STS_SUCCESS;

479: -- return without error if serial number is not specified when
480: -- the genealogy is not originating from eam
481: if (((p_from_eam is null) or (p_from_eam = FND_API.G_FALSE))
482: and ((p_serial_number is null) and (p_object_id is null))) then
483: x_return_status := FND_API.G_RET_STS_SUCCESS;
484: return;
485: end if;
486:
487: -- obtain rebuildable information

Line 497: RAISE FND_API.G_EXC_ERROR;

493:
494: -- if serial_number is null, then quit processing
495: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_ITEM_DOES_NOT_EXIST');
496: FND_MSG_PUB.ADD;
497: RAISE FND_API.G_EXC_ERROR;
498: else
499: l_serial_number := p_serial_number;
500: l_inventory_item_id := p_inventory_item_id;
501: --l_organization_id := p_organization_id;

Line 514: RAISE FND_API.G_EXC_ERROR;

510: exception
511: when others then
512: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_ITEM_DOES_NOT_EXIST');
513: FND_MSG_PUB.ADD;
514: RAISE FND_API.G_EXC_ERROR;
515: end;
516: end if;
517:
518: else

Line 534: RAISE FND_API.G_EXC_ERROR;

530: exception
531: when others then
532: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_ITEM_DOES_NOT_EXIST');
533: FND_MSG_PUB.ADD;
534: RAISE FND_API.G_EXC_ERROR;
535: end;
536:
537: else
538: l_serial_number := p_serial_number;

Line 553: if FND_API.to_Boolean( p_from_eam ) and (p_subinventory is not null) THEN

549: end if;
550:
551:
552: -- perform misc inventory transaction if p_from_eam is set to TRUE.
553: if FND_API.to_Boolean( p_from_eam ) and (p_subinventory is not null) THEN
554:
555:
556: l_subinventory := p_subinventory;
557:

Line 579: RAISE FND_API.G_EXC_ERROR;

575: NULL,
576: 'Z') <> 'Y' then
577: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_INVALID_SUBINVENTORY');
578: FND_MSG_PUB.ADD;
579: RAISE FND_API.G_EXC_ERROR;
580: end if;
581:
582: select restrict_subinventories_code
583: into l_sub_code

Line 604: RAISE FND_API.G_EXC_ERROR;

600: exception
601: when others then
602: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_INVALID_SUBINVENTORY');
603: FND_MSG_PUB.ADD;
604: RAISE FND_API.G_EXC_ERROR;
605: end;
606:
607: if l_dummy <> 10 then
608: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_INVALID_SUBINVENTORY');

Line 610: RAISE FND_API.G_EXC_ERROR;

606:
607: if l_dummy <> 10 then
608: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_INVALID_SUBINVENTORY');
609: FND_MSG_PUB.ADD;
610: RAISE FND_API.G_EXC_ERROR;
611: end if;
612:
613: end if;
614:

Line 640: RAISE FND_API.G_EXC_ERROR;

636:
637: if p_end_date_active is not null and p_end_date_active > sysdate then
638: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_REBUILD_FUTURE_TXN');
639: FND_MSG_PUB.ADD;
640: RAISE FND_API.G_EXC_ERROR;
641: else
642:
643: -- obtain the offset account id from user-defined EAM parameters
644: select maintenance_offset_account into l_dist_acct_id

Line 651: RAISE FND_API.G_EXC_ERROR;

647:
648: if l_dist_acct_id is null then
649: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_NO_OFFSET_ACCOUNT');
650: FND_MSG_PUB.ADD;
651: RAISE FND_API.G_EXC_ERROR;
652: end if;
653:
654: --obtain the revision of the object from MSN
655: select revision into l_revision

Line 689: RAISE FND_API.G_EXC_ERROR;

685: and current_organization_id = l_organization_id and
686: inventory_item_id = l_inventory_item_id;
687:
688: if l_txn_id is null then
689: RAISE FND_API.G_EXC_ERROR;
690: end if;
691:
692: end if;
693:

Line 726: raise FND_API.G_EXC_ERROR;

722: x_msg_count => x_msg_count,
723: x_msg_data => x_msg_data);
724:
725: if (l_return_status = 'E') then
726: raise FND_API.G_EXC_ERROR;
727: elsif (l_return_status = 'U') then
728: raise FND_API.G_EXC_UNEXPECTED_ERROR;
729: end if;
730:

Line 728: raise FND_API.G_EXC_UNEXPECTED_ERROR;

724:
725: if (l_return_status = 'E') then
726: raise FND_API.G_EXC_ERROR;
727: elsif (l_return_status = 'U') then
728: raise FND_API.G_EXC_UNEXPECTED_ERROR;
729: end if;
730:
731: /* R12 Hook for Asset Log #4141712 Begin */
732: --Remove Parent Instance from Child Instance - 17

Line 772: x_return_status:= fnd_api.g_ret_sts_error;

768: , name => 'EAM_INSTANCE_ID_INVALID'
769: );
770:
771: fnd_msg_pub.add;
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 817: x_return_status:= fnd_api.g_ret_sts_error;

813: , name => 'EAM_INSTANCE_ID_INVALID'
814: );
815:
816: fnd_msg_pub.add;
817: x_return_status:= fnd_api.g_ret_sts_error;
818: fnd_msg_pub.Count_And_Get
819: ( p_count => x_msg_count,
820: p_data => x_msg_data
821: );

Line 827: raise FND_API.G_EXC_ERROR;

823: end;
824: /* R12 Hook for Asset Log #4141712 End */
825:
826: else
827: raise FND_API.G_EXC_ERROR;
828: end if;
829:
830: if p_commit = FND_API.G_TRUE then
831: commit;

Line 830: if p_commit = FND_API.G_TRUE then

826: else
827: raise FND_API.G_EXC_ERROR;
828: end if;
829:
830: if p_commit = FND_API.G_TRUE then
831: commit;
832: end if;
833:
834:

Line 836: WHEN FND_API.G_EXC_ERROR THEN

832: end if;
833:
834:
835: exception
836: WHEN FND_API.G_EXC_ERROR THEN
837:
838: ROLLBACK TO eam_rebuild_genealogy;
839:
840: x_return_status := FND_API.G_RET_STS_ERROR;

Line 840: x_return_status := FND_API.G_RET_STS_ERROR;

836: WHEN FND_API.G_EXC_ERROR THEN
837:
838: ROLLBACK TO eam_rebuild_genealogy;
839:
840: x_return_status := FND_API.G_RET_STS_ERROR;
841:
842: FND_MSG_PUB.Count_And_Get
843: ( p_encoded => FND_API.G_FALSE,
844: p_count => x_msg_count,

Line 843: ( p_encoded => FND_API.G_FALSE,

839:
840: x_return_status := FND_API.G_RET_STS_ERROR;
841:
842: FND_MSG_PUB.Count_And_Get
843: ( p_encoded => FND_API.G_FALSE,
844: p_count => x_msg_count,
845: p_data => x_msg_data
846: );
847:

Line 852: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

848: WHEN OTHERS THEN
849:
850: ROLLBACK TO eam_rebuild_genealogy;
851:
852: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
853:
854: FND_MSG_PUB.Count_And_Get
855: ( p_encoded => FND_API.G_FALSE,
856: p_count => x_msg_count,

Line 855: ( p_encoded => FND_API.G_FALSE,

851:
852: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
853:
854: FND_MSG_PUB.Count_And_Get
855: ( p_encoded => FND_API.G_FALSE,
856: p_count => x_msg_count,
857: p_data => x_msg_data
858: );
859: