DBA Data[Home] [Help]

APPS.EAM_ASSETNUMBER_PUB dependencies on FND_API

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

4: G_PKG_NAME CONSTANT VARCHAR2(30):='EAM_AssetNumber_Pub';
5:
6: PROCEDURE Insert_Asset_Number
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 :=
11: FND_API.G_VALID_LEVEL_FULL ,
12: x_return_status OUT NOCOPY VARCHAR2 ,

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

5:
6: PROCEDURE Insert_Asset_Number
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 :=
11: FND_API.G_VALID_LEVEL_FULL ,
12: x_return_status OUT NOCOPY VARCHAR2 ,
13: x_msg_count OUT NOCOPY NUMBER ,

Line 11: FND_API.G_VALID_LEVEL_FULL ,

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 :=
11: FND_API.G_VALID_LEVEL_FULL ,
12: x_return_status OUT NOCOPY VARCHAR2 ,
13: x_msg_count OUT NOCOPY NUMBER ,
14: x_msg_data OUT NOCOPY VARCHAR2 ,
15: x_object_id OUT NOCOPY NUMBER,

Line 107: IF NOT FND_API.Compatible_API_Call ( l_api_version ,

103: BEGIN
104: -- Standard Start of API savepoint
105: SAVEPOINT Insert_Asset_Number_Pub;
106: -- Standard call to check for call compatibility.
107: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
108: p_api_version ,
109: l_api_name ,
110: G_PKG_NAME )
111: THEN

Line 112: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

108: p_api_version ,
109: l_api_name ,
110: G_PKG_NAME )
111: THEN
112: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
113: END IF;
114: -- Initialize message list if p_init_msg_list is set to TRUE.
115: IF FND_API.to_Boolean( p_init_msg_list ) THEN
116: FND_MSG_PUB.initialize;

Line 115: IF FND_API.to_Boolean( p_init_msg_list ) THEN

111: THEN
112: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
113: END IF;
114: -- Initialize message list if p_init_msg_list is set to TRUE.
115: IF FND_API.to_Boolean( p_init_msg_list ) THEN
116: FND_MSG_PUB.initialize;
117: END IF;
118: -- Initialize API return status to success
119: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 119: x_return_status := FND_API.G_RET_STS_SUCCESS;

115: IF FND_API.to_Boolean( p_init_msg_list ) THEN
116: FND_MSG_PUB.initialize;
117: END IF;
118: -- Initialize API return status to success
119: x_return_status := FND_API.G_RET_STS_SUCCESS;
120: -- API body
121: -- Check the item type (Asset Group or Rebuildable)
122: begin
123: select eam_item_type,serial_number_control_code

Line 130: RAISE FND_API.G_EXC_ERROR;

126: and organization_id = p_CURRENT_ORGANIZATION_ID;
127: exception
128: when no_data_found then
129: add_error('EAM_GEN_INVALID_ITEM_TYPE');
130: RAISE FND_API.G_EXC_ERROR;
131: end;
132:
133: if (l_serial_number_control_code = 1 or l_serial_number_control_code = 6) then
134: add_error('EAM_REB_INVALID_SERIAL_CONTROL');

Line 135: RAISE FND_API.G_EXC_ERROR;

131: end;
132:
133: if (l_serial_number_control_code = 1 or l_serial_number_control_code = 6) then
134: add_error('EAM_REB_INVALID_SERIAL_CONTROL');
135: RAISE FND_API.G_EXC_ERROR;
136:
137: end if;
138:
139: -- select meaning for capital asset

Line 158: RAISE FND_API.G_EXC_ERROR;

154: p_inventory_item_id,
155: l_eam_item_type);
156: if (not l_validate) then
157: add_error('EAM_ABO_INVALID_INV_ITEM');
158: RAISE FND_API.G_EXC_ERROR;
159: end if;
160:
161: -- validate that the serial number does NOT already exist
162: l_validate:=not (eam_common_utilities_pvt.validate_serial_number

Line 169: RAISE FND_API.G_EXC_ERROR;

165: p_serial_number,
166: l_eam_item_type));
167: if (not l_validate) then
168: add_error('EAM_ASSET_NUMBER_EXISTS');
169: RAISE FND_API.G_EXC_ERROR;
170: end if;
171:
172: -- Validate the serial uniqueness specified in the MTL Parameters
173: eam_asset_number_pvt.serial_check(

Line 190: raise FND_API.G_EXC_ERROR;

186: if (l_validate = TRUE) then
187: fnd_message.set_name('EAM','EAM_SER_UNIQ2');
188: fnd_message.set_token('NAME',p_serial_number);
189: fnd_msg_pub.add;
190: raise FND_API.G_EXC_ERROR;
191: else
192: fnd_message.set_name('EAM','EAM_SER_UNIQ1');
193: fnd_message.set_token('NAME',p_serial_number);
194: fnd_msg_pub.add;

Line 195: raise FND_API.G_EXC_ERROR;

191: else
192: fnd_message.set_name('EAM','EAM_SER_UNIQ1');
193: fnd_message.set_token('NAME',p_serial_number);
194: fnd_msg_pub.add;
195: raise FND_API.G_EXC_ERROR;
196: end if;
197: end if;
198:
199: -- validate that the current status is 3

Line 203: RAISE FND_API.G_EXC_ERROR;

199: -- validate that the current status is 3
200: /*l_validate:=(p_current_status=3);
201: if (not l_validate) then
202: add_error('EAM_CURRENT_STATUS');
203: RAISE FND_API.G_EXC_ERROR;
204: end if;
205: */
206:
207: -- validate all the other fields

Line 259: RAISE FND_API.G_EXC_ERROR;

255: elsif (l_reason_failed = 'EAM_REB_INVALID_PN_LOC') then
256: FND_MESSAGE.SET_TOKEN('ASSET',l_rebuild_meaning);
257: end if;
258: FND_MSG_PUB.Add;
259: RAISE FND_API.G_EXC_ERROR;
260: end if;
261:
262: -- Bug # 4770445 : Need to check if p_eam_linear_id is null or not
263:

Line 272: RAISE FND_API.G_EXC_ERROR;

268:
269: IF (l_count > 0) THEN
270: FND_MESSAGE.SET_NAME('EAM', 'EAM_LINEAR_ID_EXISTS_IN_MSN');
271: FND_MSG_PUB.Add;
272: RAISE FND_API.G_EXC_ERROR;
273: END IF;
274: END IF;
275:
276: -- For Bug 9048751

Line 363: if (l_X_RETURN_STATUS <> FND_API.G_RET_STS_SUCCESS) then

359: /* For Bug-10076982 */
360: x_object_id := l_instance_id;
361:
362: -- instantiate
363: if (l_X_RETURN_STATUS <> FND_API.G_RET_STS_SUCCESS) then
364: RAISE FND_API.G_EXC_ERROR;
365: end if;
366:
367: if (p_instantiate_flag = TRUE) then

Line 364: RAISE FND_API.G_EXC_ERROR;

360: x_object_id := l_instance_id;
361:
362: -- instantiate
363: if (l_X_RETURN_STATUS <> FND_API.G_RET_STS_SUCCESS) then
364: RAISE FND_API.G_EXC_ERROR;
365: end if;
366:
367: if (p_instantiate_flag = TRUE) then
368: EAM_ObjectInstantiation_Pub.Instantiate_Object

Line 381: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then

377: p_maintenance_object_id => l_instance_id,
378: p_maintenance_object_type => 3
379: );
380:
381: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
382: FND_MESSAGE.SET_NAME('EAM', 'EAM_INSTANTIATE_OBJECT_FAILED');
383: FND_MSG_PUB.Add;
384: RAISE FND_API.G_EXC_ERROR;
385: end if;

Line 384: RAISE FND_API.G_EXC_ERROR;

380:
381: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
382: FND_MESSAGE.SET_NAME('EAM', 'EAM_INSTANTIATE_OBJECT_FAILED');
383: FND_MSG_PUB.Add;
384: RAISE FND_API.G_EXC_ERROR;
385: end if;
386: end if;
387:
388: -- End of API body.

Line 390: IF FND_API.To_Boolean( p_commit ) THEN

386: end if;
387:
388: -- End of API body.
389: -- Standard check of p_commit.
390: IF FND_API.To_Boolean( p_commit ) THEN
391: COMMIT WORK;
392: END IF;
393: -- Standard call to get message count and if count is 1, get message info.
394: FND_MSG_PUB.Count_And_Get

Line 399: WHEN FND_API.G_EXC_ERROR THEN

395: ( p_count => x_msg_count ,
396: p_data => x_msg_data
397: );
398: EXCEPTION
399: WHEN FND_API.G_EXC_ERROR THEN
400: ROLLBACK TO Insert_Asset_Number_Pub;
401: x_return_status := FND_API.G_RET_STS_ERROR ;
402: FND_MSG_PUB.Count_And_Get
403: ( p_count => x_msg_count ,

Line 401: x_return_status := FND_API.G_RET_STS_ERROR ;

397: );
398: EXCEPTION
399: WHEN FND_API.G_EXC_ERROR THEN
400: ROLLBACK TO Insert_Asset_Number_Pub;
401: x_return_status := FND_API.G_RET_STS_ERROR ;
402: FND_MSG_PUB.Count_And_Get
403: ( p_count => x_msg_count ,
404: p_data => x_msg_data
405: );

Line 406: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

402: FND_MSG_PUB.Count_And_Get
403: ( p_count => x_msg_count ,
404: p_data => x_msg_data
405: );
406: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
407: ROLLBACK TO Insert_Asset_Number_Pub;
408: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
409: FND_MSG_PUB.Count_And_Get
410: ( p_count => x_msg_count ,

Line 408: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

404: p_data => x_msg_data
405: );
406: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
407: ROLLBACK TO Insert_Asset_Number_Pub;
408: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
409: FND_MSG_PUB.Count_And_Get
410: ( p_count => x_msg_count ,
411: p_data => x_msg_data
412: );

Line 415: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

411: p_data => x_msg_data
412: );
413: WHEN OTHERS THEN
414: ROLLBACK TO Insert_Asset_Number_Pub;
415: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
416: IF FND_MSG_PUB.Check_Msg_Level
417: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
418: THEN
419: FND_MSG_PUB.Add_Exc_Msg

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

430:
431:
432: PROCEDURE Update_Asset_Number
433: ( p_api_version IN NUMBER ,
434: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE ,
435: p_commit IN VARCHAR2 := FND_API.G_FALSE ,
436: p_validation_level IN NUMBER :=
437: FND_API.G_VALID_LEVEL_FULL ,
438: x_return_status OUT NOCOPY VARCHAR2 ,

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

431:
432: PROCEDURE Update_Asset_Number
433: ( p_api_version IN NUMBER ,
434: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE ,
435: p_commit IN VARCHAR2 := FND_API.G_FALSE ,
436: p_validation_level IN NUMBER :=
437: FND_API.G_VALID_LEVEL_FULL ,
438: x_return_status OUT NOCOPY VARCHAR2 ,
439: x_msg_count OUT NOCOPY NUMBER ,

Line 437: FND_API.G_VALID_LEVEL_FULL ,

433: ( p_api_version IN NUMBER ,
434: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE ,
435: p_commit IN VARCHAR2 := FND_API.G_FALSE ,
436: p_validation_level IN NUMBER :=
437: FND_API.G_VALID_LEVEL_FULL ,
438: x_return_status OUT NOCOPY VARCHAR2 ,
439: x_msg_count OUT NOCOPY NUMBER ,
440: x_msg_data OUT NOCOPY VARCHAR2 ,
441: --p_GEN_OBJECT_ID IN NUMBER:=NULL,

Line 527: IF NOT FND_API.Compatible_API_Call ( l_api_version ,

523: BEGIN
524: -- Standard Start of API savepoint
525: SAVEPOINT Update_Asset_Number_Pub;
526: -- Standard call to check for call compatibility.
527: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
528: p_api_version ,
529: l_api_name ,
530: G_PKG_NAME )
531: THEN

Line 532: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

528: p_api_version ,
529: l_api_name ,
530: G_PKG_NAME )
531: THEN
532: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
533: END IF;
534: -- Initialize message list if p_init_msg_list is set to TRUE.
535: IF FND_API.to_Boolean( p_init_msg_list ) THEN
536: FND_MSG_PUB.initialize;

Line 535: IF FND_API.to_Boolean( p_init_msg_list ) THEN

531: THEN
532: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
533: END IF;
534: -- Initialize message list if p_init_msg_list is set to TRUE.
535: IF FND_API.to_Boolean( p_init_msg_list ) THEN
536: FND_MSG_PUB.initialize;
537: END IF;
538: -- Initialize API return status to success
539: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 539: x_return_status := FND_API.G_RET_STS_SUCCESS;

535: IF FND_API.to_Boolean( p_init_msg_list ) THEN
536: FND_MSG_PUB.initialize;
537: END IF;
538: -- Initialize API return status to success
539: x_return_status := FND_API.G_RET_STS_SUCCESS;
540: -- API body
541:
542: -- Check the item type (Asset Group or Rebuildable)
543: begin

Line 550: RAISE FND_API.G_EXC_ERROR;

546: and organization_id = p_CURRENT_ORGANIZATION_ID;
547: exception
548: when no_data_found then
549: add_error('EAM_GEN_INVALID_ITEM_TYPE');
550: RAISE FND_API.G_EXC_ERROR;
551: end;
552:
553: -- select meaning for capital asset
554: select meaning into l_asset_meaning

Line 587: RAISE FND_API.G_EXC_ERROR;

583: end if;
584:
585: if (l_instance_id = null) then
586: add_error('EAM_ASSET_NUMBER_NOT_EXIST');
587: RAISE FND_API.G_EXC_ERROR;
588: end if;
589:
590:
591: -- validate all the other fields

Line 644: RAISE FND_API.G_EXC_ERROR;

640: elsif (l_reason_failed = 'EAM_REB_INVALID_PN_LOC') then
641: FND_MESSAGE.SET_TOKEN('ASSET',l_rebuild_meaning);
642: end if;
643: FND_MSG_PUB.Add;
644: RAISE FND_API.G_EXC_ERROR;
645: end if;
646:
647: -- Bug # 4770445 : Need to check if p_eam_linear_id is null or not
648: IF (p_eam_linear_id IS NOT NULL AND p_eam_linear_id <> fnd_api.g_miss_num) THEN

Line 648: IF (p_eam_linear_id IS NOT NULL AND p_eam_linear_id <> fnd_api.g_miss_num) THEN

644: RAISE FND_API.G_EXC_ERROR;
645: end if;
646:
647: -- Bug # 4770445 : Need to check if p_eam_linear_id is null or not
648: IF (p_eam_linear_id IS NOT NULL AND p_eam_linear_id <> fnd_api.g_miss_num) THEN
649: -- Check if eam_linear_id already exists in MSN
650: SELECT count(*) INTO l_count FROM csi_item_instances
651: WHERE linear_location_id = p_eam_linear_id
652: AND instance_id <> l_instance_id AND ROWNUM = 1;

Line 657: RAISE FND_API.G_EXC_ERROR;

653:
654: IF (l_count > 0) THEN
655: FND_MESSAGE.SET_NAME('EAM', 'EAM_LINEAR_ID_EXISTS_IN_MSN');
656: FND_MSG_PUB.Add;
657: RAISE FND_API.G_EXC_ERROR;
658: END IF;
659: END IF;
660:
661: -- check if asset is being de-activated

Line 662: if (p_active_end_date is not null or p_active_end_date <> fnd_api.g_miss_date) then

658: END IF;
659: END IF;
660:
661: -- check if asset is being de-activated
662: if (p_active_end_date is not null or p_active_end_date <> fnd_api.g_miss_date) then
663: begin
664: select current_status
665: into l_old_current_status
666: from mtl_serial_numbers

Line 679: RAISE FND_API.G_EXC_ERROR;

675:
676: if (l_old_current_status = 3) then
677: FND_MESSAGE.SET_NAME('EAM','EAM_ASSET_IN_INVENTORY');
678: FND_MSG_PUB.Add;
679: RAISE FND_API.G_EXC_ERROR;
680: end if;
681: end if;
682:
683: -- For Bug 9048751

Line 765: IF FND_API.To_Boolean( p_commit ) THEN

761:
762:
763: -- End of API body.
764: -- Standard check of p_commit.
765: IF FND_API.To_Boolean( p_commit ) THEN
766: COMMIT WORK;
767: END IF;
768: -- Standard call to get message count and if count is 1, get message info.
769: FND_MSG_PUB.Count_And_Get

Line 774: WHEN FND_API.G_EXC_ERROR THEN

770: ( p_count => x_msg_count ,
771: p_data => x_msg_data
772: );
773: EXCEPTION
774: WHEN FND_API.G_EXC_ERROR THEN
775: ROLLBACK TO Update_Asset_Number_Pub;
776: x_return_status := FND_API.G_RET_STS_ERROR ;
777: FND_MSG_PUB.Count_And_Get
778: ( p_count => x_msg_count ,

Line 776: x_return_status := FND_API.G_RET_STS_ERROR ;

772: );
773: EXCEPTION
774: WHEN FND_API.G_EXC_ERROR THEN
775: ROLLBACK TO Update_Asset_Number_Pub;
776: x_return_status := FND_API.G_RET_STS_ERROR ;
777: FND_MSG_PUB.Count_And_Get
778: ( p_count => x_msg_count ,
779: p_data => x_msg_data
780: );

Line 781: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

777: FND_MSG_PUB.Count_And_Get
778: ( p_count => x_msg_count ,
779: p_data => x_msg_data
780: );
781: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
782: ROLLBACK TO Update_Asset_Number_Pub;
783: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
784: FND_MSG_PUB.Count_And_Get
785: ( p_count => x_msg_count ,

Line 783: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

779: p_data => x_msg_data
780: );
781: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
782: ROLLBACK TO Update_Asset_Number_Pub;
783: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
784: FND_MSG_PUB.Count_And_Get
785: ( p_count => x_msg_count ,
786: p_data => x_msg_data
787: );

Line 790: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

786: p_data => x_msg_data
787: );
788: WHEN OTHERS THEN
789: ROLLBACK TO Update_Asset_Number_Pub;
790: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
791: IF FND_MSG_PUB.Check_Msg_Level
792: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
793: THEN
794: FND_MSG_PUB.Add_Exc_Msg

Line 887: if (p_maintainable_flag is not null and p_maintainable_flag <> fnd_api.g_miss_char) then

883: l_old_network_asset_flag := p_network_asset_flag ;
884: END;
885:
886: -- validate the boolean flags
887: if (p_maintainable_flag is not null and p_maintainable_flag <> fnd_api.g_miss_char) then
888: l_validate:=eam_common_utilities_pvt.validate_boolean_flag
889: (p_maintainable_flag);
890: if (not l_validate) then
891: x_reason_failed:='EAM_MAINTAINABLE_FLAG_INVALID';

Line 930: if (p_network_asset_flag is not null and p_network_asset_flag <> fnd_api.g_miss_char) then

926: END IF;
927:
928: end if;
929:
930: if (p_network_asset_flag is not null and p_network_asset_flag <> fnd_api.g_miss_char) then
931:
932: if (l_eam_item_type = 1) then
933: l_validate:=eam_common_utilities_pvt.validate_boolean_flag
934: (p_network_asset_flag);

Line 951: if (p_EAM_LINEAR_ID is not null and p_EAM_LINEAR_ID <> fnd_api.g_miss_num) then

947: end if;
948:
949:
950: --validate linear id
951: if (p_EAM_LINEAR_ID is not null and p_EAM_LINEAR_ID <> fnd_api.g_miss_num) then
952: l_validate := eam_common_utilities_pvt.validate_linear_id
953: (p_EAM_LINEAR_ID);
954:
955: if (not l_validate) then

Line 970: if (p_owning_department_id is not null and p_owning_department_id <> fnd_api.g_miss_num) then

966: if (p_owning_department_id is null) then
967: x_reason_failed:='EAM_DEPT_ID_NULL';
968: return false;
969: */
970: if (p_owning_department_id is not null and p_owning_department_id <> fnd_api.g_miss_num) then
971: l_validate:=eam_common_utilities_pvt.validate_department_id
972: (p_owning_department_id,
973: p_current_organization_id);
974: if (not l_validate) then

Line 983: if (p_wip_accounting_class_code is not null and p_wip_accounting_class_code <> fnd_api.g_miss_char) then

979: end if;
980: end if;
981:
982: -- validate wip_accounting_class_code
983: if (p_wip_accounting_class_code is not null and p_wip_accounting_class_code <> fnd_api.g_miss_char) then
984: l_validate:=eam_common_utilities_pvt.validate_wip_acct_class_code
985: (p_current_organization_id,
986: p_wip_accounting_class_code);
987: if (not l_validate) then

Line 996: if (p_asset_criticality_code is not null and p_asset_criticality_code <> fnd_api.g_miss_char) then

992: end if;
993: end if;
994:
995: -- validate criticality code
996: if (p_asset_criticality_code is not null and p_asset_criticality_code <> fnd_api.g_miss_char) then
997: l_validate:=eam_common_utilities_pvt.validate_mfg_lookup_code
998: ('MTL_EAM_ASSET_CRITICALITY',
999: p_asset_criticality_code);
1000: if (not l_validate) then

Line 1009: if (p_eam_location_id is not null and p_eam_location_id <> fnd_api.g_miss_num) then

1005: end if;
1006: end if;
1007:
1008: -- validate location_id
1009: if (p_eam_location_id is not null and p_eam_location_id <> fnd_api.g_miss_num) then
1010: l_validate:=eam_common_utilities_pvt.validate_eam_location_id_asset
1011: (p_current_organization_id,
1012: p_eam_location_id);
1013: if (not l_validate) then

Line 1022: if (p_category_id is not null and p_category_id <> fnd_api.g_miss_num) then

1018: end if;
1019: end if;
1020:
1021: -- validate category_id
1022: if (p_category_id is not null and p_category_id <> fnd_api.g_miss_num) then
1023: l_category_set_id := 1000000014;
1024:
1025: SELECT count(*) into l_count
1026: FROM MTL_ITEM_CATEGORIES

Line 1043: if (p_fa_asset_id is not null and p_fa_asset_id <> fnd_api.g_miss_num ) then

1039: end if;
1040: end if;
1041:
1042: -- validate fa asset
1043: if (p_fa_asset_id is not null and p_fa_asset_id <> fnd_api.g_miss_num ) then
1044: -- First, check if fa is installed on the instance.
1045: select count(*) into l_count
1046: from fnd_product_installations
1047: where application_id=140;

Line 1070: if (p_pn_location_id is not null and p_pn_location_id <> fnd_api.g_miss_num ) then

1066: end if;
1067: end if;
1068:
1069: -- validate pn location id
1070: if (p_pn_location_id is not null and p_pn_location_id <> fnd_api.g_miss_num ) then
1071: if (l_eam_item_type = 1) then
1072:
1073: -- First, check if pn is installed on the instance.
1074: select count(*) into l_count

Line 1107: if (p_equipment_object_id is not null and p_equipment_object_id <> fnd_api.g_miss_num) then

1103: -- validate production organization, equipment item, and equipment serial number
1104: -- The above three fields should either be all null or all not-null.
1105: -- If all not-null, the equipment item has to belong to the production organization.
1106: l_prod_null:=true;
1107: if (p_equipment_object_id is not null and p_equipment_object_id <> fnd_api.g_miss_num) then
1108: l_prod_null := false;
1109: end if;
1110: if (l_prod_null = true AND not ((p_prod_organization_id is null or p_prod_organization_id = fnd_api.g_miss_num) and
1111: (p_equipment_item_id is null or p_equipment_item_id = fnd_api.g_miss_num) and

Line 1110: if (l_prod_null = true AND not ((p_prod_organization_id is null or p_prod_organization_id = fnd_api.g_miss_num) and

1106: l_prod_null:=true;
1107: if (p_equipment_object_id is not null and p_equipment_object_id <> fnd_api.g_miss_num) then
1108: l_prod_null := false;
1109: end if;
1110: if (l_prod_null = true AND not ((p_prod_organization_id is null or p_prod_organization_id = fnd_api.g_miss_num) and
1111: (p_equipment_item_id is null or p_equipment_item_id = fnd_api.g_miss_num) and
1112: (p_eqp_serial_number is null or p_eqp_serial_number = fnd_api.g_miss_char))) then
1113: l_prod_null:=false;
1114: if (not (

Line 1111: (p_equipment_item_id is null or p_equipment_item_id = fnd_api.g_miss_num) and

1107: if (p_equipment_object_id is not null and p_equipment_object_id <> fnd_api.g_miss_num) then
1108: l_prod_null := false;
1109: end if;
1110: if (l_prod_null = true AND not ((p_prod_organization_id is null or p_prod_organization_id = fnd_api.g_miss_num) and
1111: (p_equipment_item_id is null or p_equipment_item_id = fnd_api.g_miss_num) and
1112: (p_eqp_serial_number is null or p_eqp_serial_number = fnd_api.g_miss_char))) then
1113: l_prod_null:=false;
1114: if (not (
1115: (p_equipment_item_id is not null) and

Line 1112: (p_eqp_serial_number is null or p_eqp_serial_number = fnd_api.g_miss_char))) then

1108: l_prod_null := false;
1109: end if;
1110: if (l_prod_null = true AND not ((p_prod_organization_id is null or p_prod_organization_id = fnd_api.g_miss_num) and
1111: (p_equipment_item_id is null or p_equipment_item_id = fnd_api.g_miss_num) and
1112: (p_eqp_serial_number is null or p_eqp_serial_number = fnd_api.g_miss_char))) then
1113: l_prod_null:=false;
1114: if (not (
1115: (p_equipment_item_id is not null) and
1116: (p_eqp_serial_number is not null))) then

Line 1128: if (p_equipment_object_id is not null and p_equipment_object_id <> fnd_api.g_miss_num) then

1124: if (l_prod_null=false) then
1125: -- Check that the current_organization is the maintenance
1126: -- organization for the prod_organization
1127:
1128: if (p_equipment_object_id is not null and p_equipment_object_id <> fnd_api.g_miss_num) then
1129: begin
1130: select current_organization_id, inventory_item_id, serial_number
1131: into l_prod_organization_id, l_prod_inventory_item_id, l_prod_serial_number
1132: from mtl_serial_numbers

Line 1136: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1132: from mtl_serial_numbers
1133: where gen_object_id = p_equipment_object_id;
1134: exception
1135: when others then
1136: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1137: end;
1138: else
1139: l_prod_inventory_item_id := p_equipment_item_id;
1140: l_prod_serial_number := p_eqp_serial_number;

Line 1209: if (p_checkin_status is not null and p_checkin_status <> fnd_api.g_miss_num) then

1205: end if;
1206: end if;
1207: -- End of validation for prod org, equipment item, and eqp serial number
1208:
1209: if (p_checkin_status is not null and p_checkin_status <> fnd_api.g_miss_num) then
1210: l_validate:=eam_common_utilities_pvt.validate_mfg_lookup_code
1211: ('EAM_ASSET_OPERATION_TXN_TYPE',
1212: p_checkin_status);
1213: if ( (not l_validate) or (p_network_asset_flag = 'Y') ) then

Line 1222: if (p_operational_log_flag is not null and p_operational_log_flag <> fnd_api.g_miss_char) then

1218: end if;
1219:
1220: end if;
1221:
1222: if (p_operational_log_flag is not null and p_operational_log_flag <> fnd_api.g_miss_char) then
1223: if ((nvl(p_operational_log_flag,'N') not in ('Y','N')) or
1224: (p_network_asset_flag = 'Y' and p_operational_log_flag = 'Y') ) then
1225: x_reason_failed:='EAM_OPERATION_LOG_FLAG_INVALID';
1226: fnd_message.set_name('EAM',x_reason_failed);