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 444: IF NOT FND_API.COMPATIBLE_API_CALL(l_api_version,

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

Line 450: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

446: l_api_name,
447: g_pkg_name)
448: THEN
449:
450: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
451:
452: END IF;
453:
454:

Line 455: IF FND_API.TO_BOOLEAN(p_init_msg_list)

451:
452: END IF;
453:
454:
455: IF FND_API.TO_BOOLEAN(p_init_msg_list)
456: THEN
457:
458: FND_MSG_PUB.initialize;
459:

Line 463: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

Line 464: l_return_status := FND_API.G_RET_STS_SUCCESS;

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

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

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

Line 486: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

Line 500: RAISE FND_API.G_EXC_ERROR;

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

Line 517: RAISE FND_API.G_EXC_ERROR;

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

Line 537: RAISE FND_API.G_EXC_ERROR;

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

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

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

Line 582: RAISE FND_API.G_EXC_ERROR;

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

Line 607: RAISE FND_API.G_EXC_ERROR;

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

Line 613: RAISE FND_API.G_EXC_ERROR;

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

Line 650: RAISE FND_API.G_EXC_ERROR;

646: if(x_locator_ctrl = 2 or x_locator_ctrl = 3) then
647: if(p_locator_id IS NULL) then
648: FND_MESSAGE.SET_NAME('EAM', 'EAM_RET_MAT_LOCATOR_NEEDED');
649: FND_MSG_PUB.ADD;
650: RAISE FND_API.G_EXC_ERROR;
651: end if;
652: elsif(x_locator_ctrl = 1) then -- If the locator control is NOControl
653: if(p_locator_id IS NOT NULL) then
654: FND_MESSAGE.SET_NAME('EAM', 'EAM_RET_MAT_LOCATOR_RESTRICTED');

Line 656: RAISE FND_API.G_EXC_ERROR;

652: elsif(x_locator_ctrl = 1) then -- If the locator control is NOControl
653: if(p_locator_id IS NOT NULL) then
654: FND_MESSAGE.SET_NAME('EAM', 'EAM_RET_MAT_LOCATOR_RESTRICTED');
655: FND_MSG_PUB.ADD;
656: RAISE FND_API.G_EXC_ERROR;
657: end if;
658: end if; -- end of locator_control checkif
659:
660:

Line 669: RAISE FND_API.G_EXC_ERROR;

665:
666: if p_end_date_active is not null and p_end_date_active > sysdate then
667: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_REBUILD_FUTURE_TXN');
668: FND_MSG_PUB.ADD;
669: RAISE FND_API.G_EXC_ERROR;
670: else
671:
672: -- obtain the offset account id from user-defined EAM parameters
673: select maintenance_offset_account into l_dist_acct_id

Line 680: RAISE FND_API.G_EXC_ERROR;

676:
677: if l_dist_acct_id is null then
678: FND_MESSAGE.SET_NAME('WIP', 'WIP_EAM_NO_OFFSET_ACCOUNT');
679: FND_MSG_PUB.ADD;
680: RAISE FND_API.G_EXC_ERROR;
681: end if;
682:
683: --obtain the revision of the object from MSN
684: select revision into l_revision

Line 718: RAISE FND_API.G_EXC_ERROR;

714: and current_organization_id = l_organization_id and
715: inventory_item_id = l_inventory_item_id;
716:
717: if l_txn_id is null then
718: RAISE FND_API.G_EXC_ERROR;
719: end if;
720:
721: end if;
722:

Line 755: raise FND_API.G_EXC_ERROR;

751: x_msg_count => x_msg_count,
752: x_msg_data => x_msg_data);
753:
754: if (l_return_status = 'E') then
755: raise FND_API.G_EXC_ERROR;
756: elsif (l_return_status = 'U') then
757: raise FND_API.G_EXC_UNEXPECTED_ERROR;
758: end if;
759:

Line 757: raise FND_API.G_EXC_UNEXPECTED_ERROR;

753:
754: if (l_return_status = 'E') then
755: raise FND_API.G_EXC_ERROR;
756: elsif (l_return_status = 'U') then
757: raise FND_API.G_EXC_UNEXPECTED_ERROR;
758: end if;
759:
760: /* R12 Hook for Asset Log #4141712 Begin */
761: --Remove Parent Instance from Child Instance - 17

Line 801: x_return_status:= fnd_api.g_ret_sts_error;

797: , name => 'EAM_INSTANCE_ID_INVALID'
798: );
799:
800: fnd_msg_pub.add;
801: x_return_status:= fnd_api.g_ret_sts_error;
802: fnd_msg_pub.Count_And_Get
803: ( p_count => x_msg_count,
804: p_data => x_msg_data
805: );

Line 846: x_return_status:= fnd_api.g_ret_sts_error;

842: , name => 'EAM_INSTANCE_ID_INVALID'
843: );
844:
845: fnd_msg_pub.add;
846: x_return_status:= fnd_api.g_ret_sts_error;
847: fnd_msg_pub.Count_And_Get
848: ( p_count => x_msg_count,
849: p_data => x_msg_data
850: );

Line 856: raise FND_API.G_EXC_ERROR;

852: end;
853: /* R12 Hook for Asset Log #4141712 End */
854:
855: else
856: raise FND_API.G_EXC_ERROR;
857: end if;
858:
859: if p_commit = FND_API.G_TRUE then
860: commit;

Line 859: if p_commit = FND_API.G_TRUE then

855: else
856: raise FND_API.G_EXC_ERROR;
857: end if;
858:
859: if p_commit = FND_API.G_TRUE then
860: commit;
861: end if;
862:
863:

Line 865: WHEN FND_API.G_EXC_ERROR THEN

861: end if;
862:
863:
864: exception
865: WHEN FND_API.G_EXC_ERROR THEN
866:
867: ROLLBACK TO eam_rebuild_genealogy;
868:
869: x_return_status := FND_API.G_RET_STS_ERROR;

Line 869: x_return_status := FND_API.G_RET_STS_ERROR;

865: WHEN FND_API.G_EXC_ERROR THEN
866:
867: ROLLBACK TO eam_rebuild_genealogy;
868:
869: x_return_status := FND_API.G_RET_STS_ERROR;
870:
871: FND_MSG_PUB.Count_And_Get
872: ( p_encoded => FND_API.G_FALSE,
873: p_count => x_msg_count,

Line 872: ( p_encoded => FND_API.G_FALSE,

868:
869: x_return_status := FND_API.G_RET_STS_ERROR;
870:
871: FND_MSG_PUB.Count_And_Get
872: ( p_encoded => FND_API.G_FALSE,
873: p_count => x_msg_count,
874: p_data => x_msg_data
875: );
876:

Line 881: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

877: WHEN OTHERS THEN
878:
879: ROLLBACK TO eam_rebuild_genealogy;
880:
881: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
882:
883: FND_MSG_PUB.Count_And_Get
884: ( p_encoded => FND_API.G_FALSE,
885: p_count => x_msg_count,

Line 884: ( p_encoded => FND_API.G_FALSE,

880:
881: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
882:
883: FND_MSG_PUB.Count_And_Get
884: ( p_encoded => FND_API.G_FALSE,
885: p_count => x_msg_count,
886: p_data => x_msg_data
887: );
888: