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

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

Line 110: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

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

Line 113: IF FND_API.to_Boolean( p_init_msg_list ) THEN

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

Line 117: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

Line 128: RAISE FND_API.G_EXC_ERROR;

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

Line 133: RAISE FND_API.G_EXC_ERROR;

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

Line 156: RAISE FND_API.G_EXC_ERROR;

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

Line 167: RAISE FND_API.G_EXC_ERROR;

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

Line 188: raise FND_API.G_EXC_ERROR;

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

Line 193: raise FND_API.G_EXC_ERROR;

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

Line 201: RAISE FND_API.G_EXC_ERROR;

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

Line 257: RAISE FND_API.G_EXC_ERROR;

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

Line 270: RAISE FND_API.G_EXC_ERROR;

266:
267: IF (l_count > 0) THEN
268: FND_MESSAGE.SET_NAME('EAM', 'EAM_LINEAR_ID_EXISTS_IN_MSN');
269: FND_MSG_PUB.Add;
270: RAISE FND_API.G_EXC_ERROR;
271: END IF;
272: END IF;
273:
274: eam_asset_number_pvt.create_asset

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

341: ,X_MSG_DATA => l_X_MSG_DATA
342: );
343:
344: -- instantiate
345: if (l_X_RETURN_STATUS <> FND_API.G_RET_STS_SUCCESS) then
346: RAISE FND_API.G_EXC_ERROR;
347: end if;
348:
349: if (p_instantiate_flag = TRUE) then

Line 346: RAISE FND_API.G_EXC_ERROR;

342: );
343:
344: -- instantiate
345: if (l_X_RETURN_STATUS <> FND_API.G_RET_STS_SUCCESS) then
346: RAISE FND_API.G_EXC_ERROR;
347: end if;
348:
349: if (p_instantiate_flag = TRUE) then
350: EAM_ObjectInstantiation_Pub.Instantiate_Object

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

359: p_maintenance_object_id => l_instance_id,
360: p_maintenance_object_type => 3
361: );
362:
363: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
364: FND_MESSAGE.SET_NAME('EAM', 'EAM_INSTANTIATE_OBJECT_FAILED');
365: FND_MSG_PUB.Add;
366: RAISE FND_API.G_EXC_ERROR;
367: end if;

Line 366: RAISE FND_API.G_EXC_ERROR;

362:
363: if (l_return_status <> FND_API.G_RET_STS_SUCCESS) then
364: FND_MESSAGE.SET_NAME('EAM', 'EAM_INSTANTIATE_OBJECT_FAILED');
365: FND_MSG_PUB.Add;
366: RAISE FND_API.G_EXC_ERROR;
367: end if;
368: end if;
369:
370: -- End of API body.

Line 372: IF FND_API.To_Boolean( p_commit ) THEN

368: end if;
369:
370: -- End of API body.
371: -- Standard check of p_commit.
372: IF FND_API.To_Boolean( p_commit ) THEN
373: COMMIT WORK;
374: END IF;
375: -- Standard call to get message count and if count is 1, get message info.
376: FND_MSG_PUB.Count_And_Get

Line 381: WHEN FND_API.G_EXC_ERROR THEN

377: ( p_count => x_msg_count ,
378: p_data => x_msg_data
379: );
380: EXCEPTION
381: WHEN FND_API.G_EXC_ERROR THEN
382: ROLLBACK TO Insert_Asset_Number_Pub;
383: x_return_status := FND_API.G_RET_STS_ERROR ;
384: FND_MSG_PUB.Count_And_Get
385: ( p_count => x_msg_count ,

Line 383: x_return_status := FND_API.G_RET_STS_ERROR ;

379: );
380: EXCEPTION
381: WHEN FND_API.G_EXC_ERROR THEN
382: ROLLBACK TO Insert_Asset_Number_Pub;
383: x_return_status := FND_API.G_RET_STS_ERROR ;
384: FND_MSG_PUB.Count_And_Get
385: ( p_count => x_msg_count ,
386: p_data => x_msg_data
387: );

Line 388: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

384: FND_MSG_PUB.Count_And_Get
385: ( p_count => x_msg_count ,
386: p_data => x_msg_data
387: );
388: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
389: ROLLBACK TO Insert_Asset_Number_Pub;
390: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
391: FND_MSG_PUB.Count_And_Get
392: ( p_count => x_msg_count ,

Line 390: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

386: p_data => x_msg_data
387: );
388: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
389: ROLLBACK TO Insert_Asset_Number_Pub;
390: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
391: FND_MSG_PUB.Count_And_Get
392: ( p_count => x_msg_count ,
393: p_data => x_msg_data
394: );

Line 397: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

393: p_data => x_msg_data
394: );
395: WHEN OTHERS THEN
396: ROLLBACK TO Insert_Asset_Number_Pub;
397: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
398: IF FND_MSG_PUB.Check_Msg_Level
399: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
400: THEN
401: FND_MSG_PUB.Add_Exc_Msg

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

412:
413:
414: PROCEDURE Update_Asset_Number
415: ( p_api_version IN NUMBER ,
416: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE ,
417: p_commit IN VARCHAR2 := FND_API.G_FALSE ,
418: p_validation_level IN NUMBER :=
419: FND_API.G_VALID_LEVEL_FULL ,
420: x_return_status OUT NOCOPY VARCHAR2 ,

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

413:
414: PROCEDURE Update_Asset_Number
415: ( p_api_version IN NUMBER ,
416: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE ,
417: p_commit IN VARCHAR2 := FND_API.G_FALSE ,
418: p_validation_level IN NUMBER :=
419: FND_API.G_VALID_LEVEL_FULL ,
420: x_return_status OUT NOCOPY VARCHAR2 ,
421: x_msg_count OUT NOCOPY NUMBER ,

Line 419: FND_API.G_VALID_LEVEL_FULL ,

415: ( p_api_version IN NUMBER ,
416: p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE ,
417: p_commit IN VARCHAR2 := FND_API.G_FALSE ,
418: p_validation_level IN NUMBER :=
419: FND_API.G_VALID_LEVEL_FULL ,
420: x_return_status OUT NOCOPY VARCHAR2 ,
421: x_msg_count OUT NOCOPY NUMBER ,
422: x_msg_data OUT NOCOPY VARCHAR2 ,
423: --p_GEN_OBJECT_ID IN NUMBER:=NULL,

Line 507: IF NOT FND_API.Compatible_API_Call ( l_api_version ,

503: BEGIN
504: -- Standard Start of API savepoint
505: SAVEPOINT Update_Asset_Number_Pub;
506: -- Standard call to check for call compatibility.
507: IF NOT FND_API.Compatible_API_Call ( l_api_version ,
508: p_api_version ,
509: l_api_name ,
510: G_PKG_NAME )
511: THEN

Line 512: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

508: p_api_version ,
509: l_api_name ,
510: G_PKG_NAME )
511: THEN
512: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
513: END IF;
514: -- Initialize message list if p_init_msg_list is set to TRUE.
515: IF FND_API.to_Boolean( p_init_msg_list ) THEN
516: FND_MSG_PUB.initialize;

Line 515: IF FND_API.to_Boolean( p_init_msg_list ) THEN

511: THEN
512: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
513: END IF;
514: -- Initialize message list if p_init_msg_list is set to TRUE.
515: IF FND_API.to_Boolean( p_init_msg_list ) THEN
516: FND_MSG_PUB.initialize;
517: END IF;
518: -- Initialize API return status to success
519: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 519: x_return_status := FND_API.G_RET_STS_SUCCESS;

515: IF FND_API.to_Boolean( p_init_msg_list ) THEN
516: FND_MSG_PUB.initialize;
517: END IF;
518: -- Initialize API return status to success
519: x_return_status := FND_API.G_RET_STS_SUCCESS;
520: -- API body
521:
522: -- Check the item type (Asset Group or Rebuildable)
523: begin

Line 530: RAISE FND_API.G_EXC_ERROR;

526: and organization_id = p_CURRENT_ORGANIZATION_ID;
527: exception
528: when no_data_found then
529: add_error('EAM_GEN_INVALID_ITEM_TYPE');
530: RAISE FND_API.G_EXC_ERROR;
531: end;
532:
533: -- select meaning for capital asset
534: select meaning into l_asset_meaning

Line 567: RAISE FND_API.G_EXC_ERROR;

563: end if;
564:
565: if (l_instance_id = null) then
566: add_error('EAM_ASSET_NUMBER_NOT_EXIST');
567: RAISE FND_API.G_EXC_ERROR;
568: end if;
569:
570:
571: -- validate all the other fields

Line 624: RAISE FND_API.G_EXC_ERROR;

620: elsif (l_reason_failed = 'EAM_REB_INVALID_PN_LOC') then
621: FND_MESSAGE.SET_TOKEN('ASSET',l_rebuild_meaning);
622: end if;
623: FND_MSG_PUB.Add;
624: RAISE FND_API.G_EXC_ERROR;
625: end if;
626:
627: -- Bug # 4770445 : Need to check if p_eam_linear_id is null or not
628: IF (p_eam_linear_id IS NOT NULL AND p_eam_linear_id <> fnd_api.g_miss_num) THEN

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

624: RAISE FND_API.G_EXC_ERROR;
625: end if;
626:
627: -- Bug # 4770445 : Need to check if p_eam_linear_id is null or not
628: IF (p_eam_linear_id IS NOT NULL AND p_eam_linear_id <> fnd_api.g_miss_num) THEN
629: -- Check if eam_linear_id already exists in MSN
630: SELECT count(*) INTO l_count FROM csi_item_instances
631: WHERE linear_location_id = p_eam_linear_id
632: AND instance_id <> l_instance_id AND ROWNUM = 1;

Line 637: RAISE FND_API.G_EXC_ERROR;

633:
634: IF (l_count > 0) THEN
635: FND_MESSAGE.SET_NAME('EAM', 'EAM_LINEAR_ID_EXISTS_IN_MSN');
636: FND_MSG_PUB.Add;
637: RAISE FND_API.G_EXC_ERROR;
638: END IF;
639: END IF;
640:
641: -- check if asset is being de-activated

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

638: END IF;
639: END IF;
640:
641: -- check if asset is being de-activated
642: if (p_active_end_date is not null or p_active_end_date <> fnd_api.g_miss_date) then
643: begin
644: select current_status
645: into l_old_current_status
646: from mtl_serial_numbers

Line 659: RAISE FND_API.G_EXC_ERROR;

655:
656: if (l_old_current_status = 3) then
657: FND_MESSAGE.SET_NAME('EAM','EAM_ASSET_IN_INVENTORY');
658: FND_MSG_PUB.Add;
659: RAISE FND_API.G_EXC_ERROR;
660: end if;
661: end if;
662:
663: EAM_ASSET_NUMBER_PVT.update_asset

Line 733: IF FND_API.To_Boolean( p_commit ) THEN

729:
730:
731: -- End of API body.
732: -- Standard check of p_commit.
733: IF FND_API.To_Boolean( p_commit ) THEN
734: COMMIT WORK;
735: END IF;
736: -- Standard call to get message count and if count is 1, get message info.
737: FND_MSG_PUB.Count_And_Get

Line 742: WHEN FND_API.G_EXC_ERROR THEN

738: ( p_count => x_msg_count ,
739: p_data => x_msg_data
740: );
741: EXCEPTION
742: WHEN FND_API.G_EXC_ERROR THEN
743: ROLLBACK TO Update_Asset_Number_Pub;
744: x_return_status := FND_API.G_RET_STS_ERROR ;
745: FND_MSG_PUB.Count_And_Get
746: ( p_count => x_msg_count ,

Line 744: x_return_status := FND_API.G_RET_STS_ERROR ;

740: );
741: EXCEPTION
742: WHEN FND_API.G_EXC_ERROR THEN
743: ROLLBACK TO Update_Asset_Number_Pub;
744: x_return_status := FND_API.G_RET_STS_ERROR ;
745: FND_MSG_PUB.Count_And_Get
746: ( p_count => x_msg_count ,
747: p_data => x_msg_data
748: );

Line 749: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

745: FND_MSG_PUB.Count_And_Get
746: ( p_count => x_msg_count ,
747: p_data => x_msg_data
748: );
749: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
750: ROLLBACK TO Update_Asset_Number_Pub;
751: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
752: FND_MSG_PUB.Count_And_Get
753: ( p_count => x_msg_count ,

Line 751: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

747: p_data => x_msg_data
748: );
749: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
750: ROLLBACK TO Update_Asset_Number_Pub;
751: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
752: FND_MSG_PUB.Count_And_Get
753: ( p_count => x_msg_count ,
754: p_data => x_msg_data
755: );

Line 758: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;

754: p_data => x_msg_data
755: );
756: WHEN OTHERS THEN
757: ROLLBACK TO Update_Asset_Number_Pub;
758: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
759: IF FND_MSG_PUB.Check_Msg_Level
760: (FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR)
761: THEN
762: FND_MSG_PUB.Add_Exc_Msg

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

851: l_old_network_asset_flag := p_network_asset_flag ;
852: END;
853:
854: -- validate the boolean flags
855: if (p_maintainable_flag is not null and p_maintainable_flag <> fnd_api.g_miss_char) then
856: l_validate:=eam_common_utilities_pvt.validate_boolean_flag
857: (p_maintainable_flag);
858: if (not l_validate) then
859: x_reason_failed:='EAM_MAINTAINABLE_FLAG_INVALID';

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

894: END IF;
895:
896: end if;
897:
898: if (p_network_asset_flag is not null and p_network_asset_flag <> fnd_api.g_miss_char) then
899:
900: if (l_eam_item_type = 1) then
901: l_validate:=eam_common_utilities_pvt.validate_boolean_flag
902: (p_network_asset_flag);

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

915: end if;
916:
917:
918: --validate linear id
919: if (p_EAM_LINEAR_ID is not null and p_EAM_LINEAR_ID <> fnd_api.g_miss_num) then
920: l_validate := eam_common_utilities_pvt.validate_linear_id
921: (p_EAM_LINEAR_ID);
922:
923: if (not l_validate) then

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

934: if (p_owning_department_id is null) then
935: x_reason_failed:='EAM_DEPT_ID_NULL';
936: return false;
937: */
938: if (p_owning_department_id is not null and p_owning_department_id <> fnd_api.g_miss_num) then
939: l_validate:=eam_common_utilities_pvt.validate_department_id
940: (p_owning_department_id,
941: p_current_organization_id);
942: if (not l_validate) then

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

947: end if;
948: end if;
949:
950: -- validate wip_accounting_class_code
951: if (p_wip_accounting_class_code is not null and p_wip_accounting_class_code <> fnd_api.g_miss_char) then
952: l_validate:=eam_common_utilities_pvt.validate_wip_acct_class_code
953: (p_current_organization_id,
954: p_wip_accounting_class_code);
955: if (not l_validate) then

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

960: end if;
961: end if;
962:
963: -- validate criticality code
964: if (p_asset_criticality_code is not null and p_asset_criticality_code <> fnd_api.g_miss_char) then
965: l_validate:=eam_common_utilities_pvt.validate_mfg_lookup_code
966: ('MTL_EAM_ASSET_CRITICALITY',
967: p_asset_criticality_code);
968: if (not l_validate) then

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

973: end if;
974: end if;
975:
976: -- validate location_id
977: if (p_eam_location_id is not null and p_eam_location_id <> fnd_api.g_miss_num) then
978: l_validate:=eam_common_utilities_pvt.validate_eam_location_id_asset
979: (p_current_organization_id,
980: p_eam_location_id);
981: if (not l_validate) then

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

986: end if;
987: end if;
988:
989: -- validate category_id
990: if (p_category_id is not null and p_category_id <> fnd_api.g_miss_num) then
991: l_category_set_id := 1000000014;
992:
993: SELECT count(*) into l_count
994: FROM MTL_ITEM_CATEGORIES

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

1007: end if;
1008: end if;
1009:
1010: -- validate fa asset
1011: if (p_fa_asset_id is not null and p_fa_asset_id <> fnd_api.g_miss_num ) then
1012: -- First, check if fa is installed on the instance.
1013: select count(*) into l_count
1014: from fnd_product_installations
1015: where application_id=140;

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

1034: end if;
1035: end if;
1036:
1037: -- validate pn location id
1038: if (p_pn_location_id is not null and p_pn_location_id <> fnd_api.g_miss_num ) then
1039: if (l_eam_item_type = 1) then
1040:
1041: -- First, check if pn is installed on the instance.
1042: select count(*) into l_count

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

1071: -- validate production organization, equipment item, and equipment serial number
1072: -- The above three fields should either be all null or all not-null.
1073: -- If all not-null, the equipment item has to belong to the production organization.
1074: l_prod_null:=true;
1075: if (p_equipment_object_id is not null and p_equipment_object_id <> fnd_api.g_miss_num) then
1076: l_prod_null := false;
1077: end if;
1078: if (l_prod_null = true AND not ((p_prod_organization_id is null or p_prod_organization_id = fnd_api.g_miss_num) and
1079: (p_equipment_item_id is null or p_equipment_item_id = fnd_api.g_miss_num) and

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

1074: l_prod_null:=true;
1075: if (p_equipment_object_id is not null and p_equipment_object_id <> fnd_api.g_miss_num) then
1076: l_prod_null := false;
1077: end if;
1078: if (l_prod_null = true AND not ((p_prod_organization_id is null or p_prod_organization_id = fnd_api.g_miss_num) and
1079: (p_equipment_item_id is null or p_equipment_item_id = fnd_api.g_miss_num) and
1080: (p_eqp_serial_number is null or p_eqp_serial_number = fnd_api.g_miss_char))) then
1081: l_prod_null:=false;
1082: if (not (

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

1075: if (p_equipment_object_id is not null and p_equipment_object_id <> fnd_api.g_miss_num) then
1076: l_prod_null := false;
1077: end if;
1078: if (l_prod_null = true AND not ((p_prod_organization_id is null or p_prod_organization_id = fnd_api.g_miss_num) and
1079: (p_equipment_item_id is null or p_equipment_item_id = fnd_api.g_miss_num) and
1080: (p_eqp_serial_number is null or p_eqp_serial_number = fnd_api.g_miss_char))) then
1081: l_prod_null:=false;
1082: if (not (
1083: (p_equipment_item_id is not null) and

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

1076: l_prod_null := false;
1077: end if;
1078: if (l_prod_null = true AND not ((p_prod_organization_id is null or p_prod_organization_id = fnd_api.g_miss_num) and
1079: (p_equipment_item_id is null or p_equipment_item_id = fnd_api.g_miss_num) and
1080: (p_eqp_serial_number is null or p_eqp_serial_number = fnd_api.g_miss_char))) then
1081: l_prod_null:=false;
1082: if (not (
1083: (p_equipment_item_id is not null) and
1084: (p_eqp_serial_number is not null))) then

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

1092: if (l_prod_null=false) then
1093: -- Check that the current_organization is the maintenance
1094: -- organization for the prod_organization
1095:
1096: if (p_equipment_object_id is not null and p_equipment_object_id <> fnd_api.g_miss_num) then
1097: begin
1098: select current_organization_id, inventory_item_id, serial_number
1099: into l_prod_organization_id, l_prod_inventory_item_id, l_prod_serial_number
1100: from mtl_serial_numbers

Line 1104: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1100: from mtl_serial_numbers
1101: where gen_object_id = p_equipment_object_id;
1102: exception
1103: when others then
1104: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1105: end;
1106: else
1107: l_prod_inventory_item_id := p_equipment_item_id;
1108: l_prod_serial_number := p_eqp_serial_number;

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

1173: end if;
1174: end if;
1175: -- End of validation for prod org, equipment item, and eqp serial number
1176:
1177: if (p_checkin_status is not null and p_checkin_status <> fnd_api.g_miss_num) then
1178: l_validate:=eam_common_utilities_pvt.validate_mfg_lookup_code
1179: ('EAM_ASSET_OPERATION_TXN_TYPE',
1180: p_checkin_status);
1181: if ( (not l_validate) or (p_network_asset_flag = 'Y') ) then

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

1186: end if;
1187:
1188: end if;
1189:
1190: if (p_operational_log_flag is not null and p_operational_log_flag <> fnd_api.g_miss_char) then
1191: if ((nvl(p_operational_log_flag,'N') not in ('Y','N')) or
1192: (p_network_asset_flag = 'Y' and p_operational_log_flag = 'Y') ) then
1193: x_reason_failed:='EAM_OPERATION_LOG_FLAG_INVALID';
1194: fnd_message.set_name('EAM',x_reason_failed);