DBA Data[Home] [Help]

APPS.EAM_WO_VALIDATE_PVT dependencies on EAM_PROCESS_WO_PVT

Line 67: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Quering Work Order'); END IF;

63: l_out_Mesg_Token_Tbl EAM_ERROR_MESSAGE_PVT.Mesg_Token_Tbl_Type;
64: l_return_status VARCHAR2(1);
65: BEGIN
66:
67: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Quering Work Order'); END IF;
68:
69: EAM_WO_UTILITY_PVT.Query_Row
70: ( p_wip_entity_id => p_eam_wo_rec.wip_entity_id
71: , p_organization_id => p_eam_wo_rec.organization_id

Line 76: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Query Row Returned with : ' || l_return_status); END IF;

72: , x_eam_wo_rec => x_old_eam_wo_rec
73: , x_Return_status => l_return_status
74: );
75:
76: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Query Row Returned with : ' || l_return_status); END IF;
77:
78: IF l_return_status = EAM_PROCESS_WO_PVT.G_RECORD_FOUND AND
79: p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE
80: THEN

Line 78: IF l_return_status = EAM_PROCESS_WO_PVT.G_RECORD_FOUND AND

74: );
75:
76: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Query Row Returned with : ' || l_return_status); END IF;
77:
78: IF l_return_status = EAM_PROCESS_WO_PVT.G_RECORD_FOUND AND
79: p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE
80: THEN
81: l_token_tbl(1).token_name := 'WIP_ENTITY_NAME';
82: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_name;

Line 79: p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE

75:
76: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Query Row Returned with : ' || l_return_status); END IF;
77:
78: IF l_return_status = EAM_PROCESS_WO_PVT.G_RECORD_FOUND AND
79: p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE
80: THEN
81: l_token_tbl(1).token_name := 'WIP_ENTITY_NAME';
82: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_name;
83:

Line 95: ELSIF l_return_status = EAM_PROCESS_WO_PVT.G_RECORD_NOT_FOUND AND

91: l_mesg_token_tbl := l_out_mesg_token_tbl;
92:
93: l_return_status := FND_API.G_RET_STS_ERROR;
94:
95: ELSIF l_return_status = EAM_PROCESS_WO_PVT.G_RECORD_NOT_FOUND AND
96: p_eam_wo_rec.transaction_type IN
97: (EAM_PROCESS_WO_PVT.G_OPR_UPDATE, EAM_PROCESS_WO_PVT.G_OPR_DELETE)
98: THEN
99: l_token_tbl(1).token_name := 'WIP_ENTITY_NAME';

Line 97: (EAM_PROCESS_WO_PVT.G_OPR_UPDATE, EAM_PROCESS_WO_PVT.G_OPR_DELETE)

93: l_return_status := FND_API.G_RET_STS_ERROR;
94:
95: ELSIF l_return_status = EAM_PROCESS_WO_PVT.G_RECORD_NOT_FOUND AND
96: p_eam_wo_rec.transaction_type IN
97: (EAM_PROCESS_WO_PVT.G_OPR_UPDATE, EAM_PROCESS_WO_PVT.G_OPR_DELETE)
98: THEN
99: l_token_tbl(1).token_name := 'WIP_ENTITY_NAME';
100: l_token_tbl(1).token_value := p_eam_wo_rec.wip_entity_name;
101:

Line 126: IF p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_SYNC THEN

122: l_mesg_token_tbl := l_out_mesg_token_tbl;
123: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
124:
125: ELSE /* Assign the relevant transaction type for SYNC operations */
126: IF p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_SYNC THEN
127: IF l_return_status = EAM_PROCESS_WO_PVT.G_RECORD_FOUND THEN
128: x_old_eam_wo_rec.transaction_type := EAM_PROCESS_WO_PVT.G_OPR_UPDATE;
129: ELSE
130: x_old_eam_wo_rec.transaction_type := EAM_PROCESS_WO_PVT.G_OPR_CREATE;

Line 127: IF l_return_status = EAM_PROCESS_WO_PVT.G_RECORD_FOUND THEN

123: l_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
124:
125: ELSE /* Assign the relevant transaction type for SYNC operations */
126: IF p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_SYNC THEN
127: IF l_return_status = EAM_PROCESS_WO_PVT.G_RECORD_FOUND THEN
128: x_old_eam_wo_rec.transaction_type := EAM_PROCESS_WO_PVT.G_OPR_UPDATE;
129: ELSE
130: x_old_eam_wo_rec.transaction_type := EAM_PROCESS_WO_PVT.G_OPR_CREATE;
131: END IF;

Line 128: x_old_eam_wo_rec.transaction_type := EAM_PROCESS_WO_PVT.G_OPR_UPDATE;

124:
125: ELSE /* Assign the relevant transaction type for SYNC operations */
126: IF p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_SYNC THEN
127: IF l_return_status = EAM_PROCESS_WO_PVT.G_RECORD_FOUND THEN
128: x_old_eam_wo_rec.transaction_type := EAM_PROCESS_WO_PVT.G_OPR_UPDATE;
129: ELSE
130: x_old_eam_wo_rec.transaction_type := EAM_PROCESS_WO_PVT.G_OPR_CREATE;
131: END IF;
132: END IF;

Line 130: x_old_eam_wo_rec.transaction_type := EAM_PROCESS_WO_PVT.G_OPR_CREATE;

126: IF p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_SYNC THEN
127: IF l_return_status = EAM_PROCESS_WO_PVT.G_RECORD_FOUND THEN
128: x_old_eam_wo_rec.transaction_type := EAM_PROCESS_WO_PVT.G_OPR_UPDATE;
129: ELSE
130: x_old_eam_wo_rec.transaction_type := EAM_PROCESS_WO_PVT.G_OPR_CREATE;
131: END IF;
132: END IF;
133: l_return_status := FND_API.G_RET_STS_SUCCESS;
134:

Line 171: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Within WO Check Attributes b4 Defaulting . . . '); END IF;

167: BEGIN
168:
169: x_return_status := FND_API.G_RET_STS_SUCCESS;
170:
171: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Within WO Check Attributes b4 Defaulting . . . '); END IF;
172:
173:
174: -- organization_id
175:

Line 176: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating organization_id . . . '); END IF;

172:
173:
174: -- organization_id
175:
176: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating organization_id . . . '); END IF;
177:
178: declare
179: l_disable_date date;
180: begin

Line 220: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating organization_id (EAM enabled) . . . '); END IF;

216:
217:
218: -- organization_id (EAM enabled)
219:
220: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating organization_id (EAM enabled) . . . '); END IF;
221:
222: --Only check EAM enabled for CMRO, part of bug fix 9313320
223: IF p_eam_wo_rec.maintenance_object_source = 2 then
224:

Line 292: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating maintenance_object_source . . . '); END IF;

288: END IF;
289:
290: -- maintenance_object_source
291:
292: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating maintenance_object_source . . . '); END IF;
293:
294: begin
295:
296: if p_eam_wo_rec.maintenance_object_source is null or

Line 349: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating maintenance_object_type . . . '); END IF;

345: end;
346:
347: -- maintenance_object_type
348:
349: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating maintenance_object_type . . . '); END IF;
350:
351: begin
352:
353: if p_eam_wo_rec.maintenance_object_type is null or

Line 407: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating maintenance_object_id . . . '); END IF;

403: end;
404:
405: -- maintenance_object_id
406:
407: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating maintenance_object_id . . . '); END IF;
408:
409: begin
410:
411: if p_eam_wo_rec.maintenance_object_id is null or

Line 421: IF p_eam_wo_rec.transaction_type <> EAM_PROCESS_WO_PVT.G_OPR_CREATE THEN

417: IF p_eam_wo_rec.maintenance_object_type = 3 then
418: --CMRO does not use the EAM family of maintenance orgs concept.
419: IF p_eam_wo_rec.maintenance_object_source = 1 THEN
420:
421: IF p_eam_wo_rec.transaction_type <> EAM_PROCESS_WO_PVT.G_OPR_CREATE THEN
422: select maintenance_object_id into l_old_eam_wo_moid
423: from wip_discrete_jobs
424: where wip_entity_id = p_eam_wo_rec.wip_entity_id
425: and organization_id = p_eam_wo_rec.organization_id

Line 428: IF p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE

424: where wip_entity_id = p_eam_wo_rec.wip_entity_id
425: and organization_id = p_eam_wo_rec.organization_id
426: and rownum = 1;
427: END IF;
428: IF p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE
429: OR (p_eam_wo_rec.transaction_type <> EAM_PROCESS_WO_PVT.G_OPR_CREATE
430: AND l_old_eam_wo_moid <> p_eam_wo_rec.maintenance_object_id) THEN
431: -- Code for create validation
432: select 1 into g_dummy

Line 429: OR (p_eam_wo_rec.transaction_type <> EAM_PROCESS_WO_PVT.G_OPR_CREATE

425: and organization_id = p_eam_wo_rec.organization_id
426: and rownum = 1;
427: END IF;
428: IF p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE
429: OR (p_eam_wo_rec.transaction_type <> EAM_PROCESS_WO_PVT.G_OPR_CREATE
430: AND l_old_eam_wo_moid <> p_eam_wo_rec.maintenance_object_id) THEN
431: -- Code for create validation
432: select 1 into g_dummy
433: from csi_item_instances cii, mtl_parameters mp

Line 499: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating rebuild_item_id . . . '); END IF;

495: end;
496:
497: -- rebuild_item_id
498:
499: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating rebuild_item_id . . . '); END IF;
500:
501: begin
502:
503: -- for CMRO work orders, the rebuild_item_id cannot be null.

Line 536: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating rebuild_item_id and asset_group_id. . . '); END IF;

532: end;
533:
534: -- rebuild_item_id and asset_group_id
535:
536: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating rebuild_item_id and asset_group_id. . . '); END IF;
537:
538: begin
539:
540: -- rebuild_item_id and asset_group_id cannot both be null.

Line 573: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating wip_entity_id . . . '); END IF;

569:
570:
571: -- wip_entity_id
572:
573: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating wip_entity_id . . . '); END IF;
574:
575: begin
576:
577: if p_eam_wo_rec.wip_entity_id is not null and

Line 664: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Within WO Check Attributes . . . '); END IF;

660: BEGIN
661: l_mo_err_flag:= '';
662: x_return_status := FND_API.G_RET_STS_SUCCESS;
663:
664: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Within WO Check Attributes . . . '); END IF;
665:
666:
667: -- organization_id
668:

Line 669: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating organization_id . . . '); END IF;

665:
666:
667: -- organization_id
668:
669: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating organization_id . . . '); END IF;
670:
671: declare
672: l_disable_date date;
673: begin

Line 737: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating organization_id (EAM enabled) . . . '); END IF;

733:
734:
735: -- organization_id (EAM enabled)
736:
737: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating organization_id (EAM enabled) . . . '); END IF;
738:
739: --Only check EAM enabled for CMRO, part of bug fix 9313320
740: IF p_eam_wo_rec.maintenance_object_source = 2 then
741:

Line 807: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating maintenance_object_type . . . '); END IF;

803:
804: END IF;
805: -- maintenance_object_type
806:
807: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating maintenance_object_type . . . '); END IF;
808:
809: begin
810:
811: if (p_eam_wo_rec.maintenance_object_type is not null) then

Line 846: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating maintenance_object_id . . . '); END IF;

842:
843:
844: -- object_source_id
845:
846: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating maintenance_object_id . . . '); END IF;
847:
848: begin
849:
850: if (p_eam_wo_rec.maintenance_object_type is not null) then

Line 854: IF p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE

850: if (p_eam_wo_rec.maintenance_object_type is not null) then
851:
852: if (p_eam_wo_rec.maintenance_object_type = 3 and p_eam_wo_rec.maintenance_object_source = 1) then
853:
854: IF p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE
855: OR (p_eam_wo_rec.transaction_type <> EAM_PROCESS_WO_PVT.G_OPR_CREATE
856: AND p_eam_wo_rec.maintenance_object_id <> p_old_eam_wo_rec.maintenance_object_id) THEN
857: -- Code for creation
858: select 1 into g_dummy

Line 855: OR (p_eam_wo_rec.transaction_type <> EAM_PROCESS_WO_PVT.G_OPR_CREATE

851:
852: if (p_eam_wo_rec.maintenance_object_type = 3 and p_eam_wo_rec.maintenance_object_source = 1) then
853:
854: IF p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE
855: OR (p_eam_wo_rec.transaction_type <> EAM_PROCESS_WO_PVT.G_OPR_CREATE
856: AND p_eam_wo_rec.maintenance_object_id <> p_old_eam_wo_rec.maintenance_object_id) THEN
857: -- Code for creation
858: select 1 into g_dummy
859: from csi_item_instances cii, mtl_parameters mp

Line 913: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating maintenance object . . . '); END IF;

909:
910:
911:
912: -- maintenance object
913: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating maintenance object . . . '); END IF;
914:
915: begin
916:
917: if (p_eam_wo_rec.asset_group_id is not null) and (p_eam_wo_rec.rebuild_item_id is not null) then

Line 947: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating asset_group_id . . . '); END IF;

943:
944: end;
945:
946: -- asset_group_id
947: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating asset_group_id . . . '); END IF;
948:
949: begin
950:
951: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and p_eam_wo_rec.asset_group_id is not null) then

Line 951: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and p_eam_wo_rec.asset_group_id is not null) then

947: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating asset_group_id . . . '); END IF;
948:
949: begin
950:
951: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and p_eam_wo_rec.asset_group_id is not null) then
952:
953: if(p_eam_wo_rec.asset_number is null)
954: then
955: raise fnd_api.g_exc_unexpected_error;

Line 995: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating asset_number . . . '); END IF;

991:
992: end;
993:
994: -- asset_number
995: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating asset_number . . . '); END IF;
996:
997: begin
998:
999: if (p_eam_wo_rec.transaction_type in (EAM_PROCESS_WO_PVT.G_OPR_CREATE,EAM_PROCESS_WO_PVT.G_OPR_UPDATE) and p_eam_wo_rec.asset_number is not null) then

Line 999: if (p_eam_wo_rec.transaction_type in (EAM_PROCESS_WO_PVT.G_OPR_CREATE,EAM_PROCESS_WO_PVT.G_OPR_UPDATE) and p_eam_wo_rec.asset_number is not null) then

995: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating asset_number . . . '); END IF;
996:
997: begin
998:
999: if (p_eam_wo_rec.transaction_type in (EAM_PROCESS_WO_PVT.G_OPR_CREATE,EAM_PROCESS_WO_PVT.G_OPR_UPDATE) and p_eam_wo_rec.asset_number is not null) then
1000:
1001: /* In update mode do not check the current maintenance organization*/
1002: select 1
1003: into g_dummy

Line 1039: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating eam_linear_location_id . . . '); END IF;

1035:
1036:
1037:
1038: -- eam_linear_location_id
1039: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating eam_linear_location_id . . . '); END IF;
1040:
1041: begin
1042:
1043: if (p_eam_wo_rec.transaction_type in (EAM_PROCESS_WO_PVT.G_OPR_CREATE,

Line 1043: if (p_eam_wo_rec.transaction_type in (EAM_PROCESS_WO_PVT.G_OPR_CREATE,

1039: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating eam_linear_location_id . . . '); END IF;
1040:
1041: begin
1042:
1043: if (p_eam_wo_rec.transaction_type in (EAM_PROCESS_WO_PVT.G_OPR_CREATE,
1044: EAM_PROCESS_WO_PVT.G_OPR_UPDATE)
1045: and p_eam_wo_rec.eam_linear_location_id is not null) then
1046:
1047: select 1

Line 1044: EAM_PROCESS_WO_PVT.G_OPR_UPDATE)

1040:
1041: begin
1042:
1043: if (p_eam_wo_rec.transaction_type in (EAM_PROCESS_WO_PVT.G_OPR_CREATE,
1044: EAM_PROCESS_WO_PVT.G_OPR_UPDATE)
1045: and p_eam_wo_rec.eam_linear_location_id is not null) then
1046:
1047: select 1
1048: into g_dummy

Line 1079: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating rebuild_item_id . . . '); END IF;

1075: end;
1076:
1077:
1078: -- rebuild_item_id
1079: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating rebuild_item_id . . . '); END IF;
1080:
1081: begin
1082:
1083: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and p_eam_wo_rec.rebuild_item_id is not null) then

Line 1083: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and p_eam_wo_rec.rebuild_item_id is not null) then

1079: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating rebuild_item_id . . . '); END IF;
1080:
1081: begin
1082:
1083: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and p_eam_wo_rec.rebuild_item_id is not null) then
1084:
1085: IF p_eam_wo_rec.maintenance_object_source = 2 then -- for fix 9313320 do not check maint org for CMRO
1086:
1087: select 1

Line 1132: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating rebuild_serial_number . . . '); END IF;

1128:
1129: end;
1130:
1131: -- rebuild_serial_number
1132: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating rebuild_serial_number . . . '); END IF;
1133:
1134: begin
1135: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then
1136:

Line 1135: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then

1131: -- rebuild_serial_number
1132: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating rebuild_serial_number . . . '); END IF;
1133:
1134: begin
1135: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then
1136:
1137: if(p_eam_wo_rec.rebuild_item_id is null and
1138: p_eam_wo_rec.rebuild_serial_number is not null) then
1139: raise fnd_api.g_exc_unexpected_error;

Line 1169: IF ( p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE

1165: /* Validation added so that rebuild serial number is not
1166: updateable if the WO is in status Released */
1167: /***** Enahancement No. : 2943473 ******/
1168:
1169: IF ( p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE
1170: and p_eam_wo_rec.rebuild_item_id is not null
1171: and p_eam_wo_rec.rebuild_serial_number is not null
1172: and nvl(p_old_eam_wo_rec.rebuild_serial_number,'null_old_serial_number') <>
1173: nvl(p_eam_wo_rec.rebuild_serial_number,'null_old_serial_number') )

Line 1224: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating if rebuild_serial_number is mandatory . . . '); END IF;

1220: -- When a work order created on non instantiated rebuild serial number is released ,its must have an parent work order
1221: -- 3659469
1222:
1223: -- Serial rebuild number is required while releasing the work order if Rebuild number is serial controlled
1224: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating if rebuild_serial_number is mandatory . . . '); END IF;
1225: BEGIN
1226: IF p_eam_wo_rec.status_type = 3
1227: and p_eam_wo_rec.rebuild_item_id IS NOT NULL
1228: and p_eam_wo_rec.rebuild_serial_number IS NULL

Line 1268: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating parent_wip_entity_id . . . '); END IF;

1264:
1265: end ;
1266:
1267: -- parent_wip_entity_id
1268: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating parent_wip_entity_id . . . '); END IF;
1269:
1270: begin
1271: /* Following validation ensures that only WO of parents of serialized
1272: rebuildables can become parent work orders of rebuild WO and any

Line 1283: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating parent_wip_entity_id . rebuild status=' || l_rebuild_status); END IF;

1279:
1280: IF ( p_eam_wo_rec.maintenance_object_type = 3 and p_eam_wo_rec.maintenance_object_source = 1)
1281: THEN
1282:
1283: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating parent_wip_entity_id . rebuild status=' || l_rebuild_status); END IF;
1284:
1285: SELECT 1
1286: INTO g_dummy
1287: FROM mtl_object_genealogy mog, mtl_serial_numbers msn, wip_discrete_jobs wdj,

Line 1353: IF ( p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE

1349: /* While updating parent_wip_entity_id check for any transactions posted on the work order */
1350:
1351: begin
1352:
1353: IF ( p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE
1354: AND p_old_eam_wo_rec.parent_wip_entity_id <> p_eam_wo_rec.parent_wip_entity_id )
1355: THEN
1356: EAM_WORKORDER_UTIL_PKG.CK_MATERIAL_ALLOC_ON_HOLD(X_Org_Id => p_eam_wo_rec.organization_id,
1357: X_Wip_Id => p_eam_wo_rec.wip_entity_id,

Line 1395: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating wip_entity_name . . . '); END IF;

1391:
1392:
1393:
1394: -- job_name
1395: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating wip_entity_name . . . '); END IF;
1396:
1397: declare
1398: l_count NUMBER;
1399: begin

Line 1401: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then

1397: declare
1398: l_count NUMBER;
1399: begin
1400:
1401: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then
1402:
1403: select count(*)
1404: into l_count
1405: from wip_entities

Line 1440: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating wip_entity_id . . . '); END IF;

1436: end;
1437:
1438:
1439: -- job_id
1440: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating wip_entity_id . . . '); END IF;
1441:
1442: declare
1443: l_count NUMBER;
1444: begin

Line 1446: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then

1442: declare
1443: l_count NUMBER;
1444: begin
1445:
1446: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then
1447:
1448: select count(*)
1449: into l_count
1450: from wip_entities

Line 1483: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating firm_planned_flag . . . '); END IF;

1479: end;
1480:
1481:
1482: -- firm_planned_flag
1483: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating firm_planned_flag . . . '); END IF;
1484:
1485: begin
1486:
1487: if p_eam_wo_rec.firm_planned_flag not in (wip_constants.yes, wip_constants.no) then

Line 1519: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating wip_entity_name . . . '); END IF;

1515:
1516:
1517:
1518: -- issue_zero_cost_flag
1519: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating wip_entity_name . . . '); END IF;
1520:
1521: declare
1522: l_count NUMBER;
1523: begin

Line 1557: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating schedule_group_id . . . '); END IF;

1553:
1554:
1555:
1556: -- schedule_group_id
1557: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating schedule_group_id . . . '); END IF;
1558: begin
1559:
1560: if p_eam_wo_rec.schedule_group_id is not null then
1561:

Line 1592: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('p_eam_wo_rec.status_type ' || p_eam_wo_rec.status_type); END IF;

1588: return;
1589:
1590: end;
1591:
1592: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('p_eam_wo_rec.status_type ' || p_eam_wo_rec.status_type); END IF;
1593: --attribute change not allowed for comp_no_chrg,closed,pending-close,failed-close and cancelled
1594: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating attribute change for complete_no_chrg,cancelled,closed,pending-cl,failed-close statuses');END IF;
1595: --start of fix for 3389850
1596:

Line 1594: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating attribute change for complete_no_chrg,cancelled,closed,pending-cl,failed-close statuses');END IF;

1590: end;
1591:
1592: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('p_eam_wo_rec.status_type ' || p_eam_wo_rec.status_type); END IF;
1593: --attribute change not allowed for comp_no_chrg,closed,pending-close,failed-close and cancelled
1594: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating attribute change for complete_no_chrg,cancelled,closed,pending-cl,failed-close statuses');END IF;
1595: --start of fix for 3389850
1596:
1597: begin
1598: IF ( p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE )

Line 1598: IF ( p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE )

1594: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating attribute change for complete_no_chrg,cancelled,closed,pending-cl,failed-close statuses');END IF;
1595: --start of fix for 3389850
1596:
1597: begin
1598: IF ( p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE )
1599: AND (p_eam_wo_rec.status_type IN (5,7,12,14,15)) --if status is complete-no-chrg,cancelled,closed,pending-close and failed-close
1600: AND (p_eam_wo_rec.status_type=p_old_eam_wo_rec.status_type) --status is same
1601: AND ( p_eam_wo_rec.description<>p_old_eam_wo_rec.description
1602: OR p_eam_wo_rec.asset_number<>p_old_eam_wo_rec.asset_number

Line 1702: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating status_type . . . '); END IF;

1698:
1699: --end of fix for 3389850
1700:
1701: -- status_type
1702: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating status_type . . . '); END IF;
1703:
1704: declare
1705:
1706: l_count number;

Line 1715: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and

1711: ch_rel_par_canc exception;
1712:
1713: begin
1714:
1715: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and
1716: p_eam_wo_rec.status_type not in (wip_constants.unreleased, wip_constants.released, wip_constants.hold, wip_constants.draft)) then
1717:
1718: raise fnd_api.g_exc_unexpected_error;
1719:

Line 1720: elsif (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE) then

1716: p_eam_wo_rec.status_type not in (wip_constants.unreleased, wip_constants.released, wip_constants.hold, wip_constants.draft)) then
1717:
1718: raise fnd_api.g_exc_unexpected_error;
1719:
1720: elsif (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE) then
1721: if(p_eam_wo_rec.status_type not in (wip_constants.unreleased, wip_constants.released, wip_constants.comp_chrg,wip_constants.comp_nochrg, wip_constants.closed,
1722: wip_constants.hold, wip_constants.cancelled, wip_constants.pend_sched, wip_constants.draft)
1723: OR ( p_eam_wo_rec.status_type in (wip_constants.draft) and p_old_eam_wo_rec.status_type not in (wip_constants.draft))
1724: /* Added the check so that status will not be updated to status Draft */

Line 1767: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating job_quantity . . . '); END IF;

1763: end;
1764:
1765:
1766: -- job_quantity
1767: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating job_quantity . . . '); END IF;
1768:
1769: begin
1770:
1771: if(p_eam_wo_rec.job_quantity <> 1) then

Line 1800: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating asset_activity_id . . . '); END IF;

1796: end;
1797:
1798:
1799: -- primary_item_id (asset activity)
1800: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating asset_activity_id . . . '); END IF;
1801:
1802: declare
1803: l_eam_op_tbl EAM_PROCESS_WO_PUB.EAM_OP_TBL_TYPE;
1804: l_mat_req_exists number;

Line 1826: and p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE

1822: where wip_entity_id = p_eam_wo_rec.wip_entity_id
1823: and organization_id = p_eam_wo_rec.organization_id;
1824:
1825: if nvl(p_eam_wo_rec.asset_activity_id,-99999) <> nvl(p_old_eam_wo_rec.asset_activity_id,-99999)
1826: and p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE
1827: and (EAM_OP_UTILITY_PVT.NUM_OF_ROW(
1828: p_eam_op_tbl => l_eam_op_tbl
1829: ,p_wip_entity_id => p_eam_wo_rec.wip_entity_id
1830: ,p_organization_id => p_eam_wo_rec.organization_id) = false

Line 1895: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating asset_activity_association . . . '); END IF;

1891:
1892:
1893: -- asset activity association
1894:
1895: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating asset_activity_association . . . '); END IF;
1896:
1897: declare
1898: l_start_date DATE;
1899: l_end_date DATE;

Line 1986: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating wip_supply_type . . . '); END IF;

1982: end;
1983:
1984:
1985: -- wip_supply_type
1986: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating wip_supply_type . . . '); END IF;
1987:
1988: begin
1989:
1990: if(p_eam_wo_rec.wip_supply_type is not null and p_eam_wo_rec.wip_supply_type not in (wip_constants.push, wip_constants.bulk, wip_constants.based_on_bom)) then

Line 2022: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating alternate_routing_designator . . . '); END IF;

2018: end;
2019:
2020:
2021: -- alternate_routing_designator
2022: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating alternate_routing_designator . . . '); END IF;
2023:
2024: begin
2025:
2026: if p_eam_wo_rec.alternate_routing_designator is not null then

Line 2062: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating alternate_bom_designator . . . '); END IF;

2058:
2059: end;
2060:
2061: -- alternate_bom_designator
2062: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating alternate_bom_designator . . . '); END IF;
2063:
2064: begin
2065:
2066: if p_eam_wo_rec.alternate_bom_designator is not null then

Line 2102: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating project_id . . . '); END IF;

2098:
2099: end;
2100:
2101: -- project_id
2102: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating project_id . . . '); END IF;
2103:
2104: declare
2105:
2106: l_min_date DATE;

Line 2165: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating task_id . . . '); END IF;

2161: end;
2162:
2163:
2164: -- task_id
2165: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating task_id . . . '); END IF;
2166:
2167: declare
2168:
2169: l_min_date DATE;

Line 2227: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating PM Suggested dates . . . '); END IF;

2223:
2224:
2225: -- schedule_dates 0
2226:
2227: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating PM Suggested dates . . . '); END IF;
2228:
2229: begin
2230:
2231: if p_eam_wo_rec.pm_suggested_start_date is not null and

Line 2264: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating due_date, requested_start_date . . . '); END IF;

2260:
2261:
2262: -- schedule_dates 1
2263:
2264: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating due_date, requested_start_date . . . '); END IF;
2265:
2266: begin
2267:
2268: if p_eam_wo_rec.due_date is not null and

Line 2301: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating due_date, requested_start_date . . . '); END IF;

2297:
2298:
2299: -- schedule_dates 2
2300:
2301: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating due_date, requested_start_date . . . '); END IF;
2302:
2303: begin
2304:
2305: if p_eam_wo_rec.due_date is null and

Line 2337: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating schedule_dates . . . '); END IF;

2333: end;
2334:
2335:
2336: -- schedule_dates 3
2337: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating schedule_dates . . . '); END IF;
2338:
2339: declare
2340: l_rtg_count NUMBER;
2341: l_date_count NUMBER := 0;

Line 2352: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and l_date_count = 0) then

2348: if p_eam_wo_rec.due_date is not null then
2349: l_date_count := l_date_count + 1;
2350: end if;
2351:
2352: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE and l_date_count = 0) then
2353: --all job creations must have at least one date
2354: raise fnd_api.g_exc_unexpected_error;
2355: end if;
2356:

Line 2426: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating end_item_unit_number . . . '); END IF;

2422: --end of fix for 3396136
2423:
2424:
2425: -- end_item_unit_number
2426: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating end_item_unit_number . . . '); END IF;
2427:
2428: declare
2429: is_unit_effective_item boolean;
2430: l_bom_item_id NUMBER;

Line 2434: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then

2430: l_bom_item_id NUMBER;
2431: begin
2432:
2433: -- Unit number is required for unit effective assemblies.
2434: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then
2435:
2436: if(is_unit_effective_item and p_eam_wo_rec.end_item_unit_number is null) then
2437: fnd_message.set_name('PJM', 'UEFF-UNIT NUMBER REQUIRED');
2438: end if;

Line 2484: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating class_code . . . '); END IF;

2480: end;
2481:
2482:
2483: -- class_code
2484: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating class_code . . . '); END IF;
2485:
2486: declare
2487: l_disable_date date;
2488: WO_CANT_CH_WIPACCT exception;

Line 2566: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating bom_revision . . . '); END IF;

2562: end;
2563:
2564:
2565: -- bom_revision
2566: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating bom_revision . . . '); END IF;
2567:
2568: declare
2569: l_start_date DATE;
2570: begin

Line 2606: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating routing_revision . . . '); END IF;

2602: end;
2603:
2604:
2605: -- routing_revision
2606: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating routing_revision . . . '); END IF;
2607:
2608: declare
2609: l_start_date DATE;
2610: l_count NUMBER;

Line 2657: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating manual_rebuild_flag . . . '); END IF;

2653: end;
2654:
2655:
2656: -- manual_rebuild_flag
2657: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating manual_rebuild_flag . . . '); END IF;
2658:
2659: begin
2660: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then
2661: if(p_eam_wo_rec.manual_rebuild_flag is not null and

Line 2660: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then

2656: -- manual_rebuild_flag
2657: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating manual_rebuild_flag . . . '); END IF;
2658:
2659: begin
2660: if (p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE) then
2661: if(p_eam_wo_rec.manual_rebuild_flag is not null and
2662: (p_eam_wo_rec.rebuild_item_id is null or
2663: p_eam_wo_rec.manual_rebuild_flag not in ('Y', 'N'))) then
2664: raise fnd_api.g_exc_unexpected_error;

Line 2697: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating owing_department_id . . . '); END IF;

2693:
2694: end;
2695:
2696: -- owning_department
2697: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating owing_department_id . . . '); END IF;
2698:
2699: declare
2700: l_job_date DATE;
2701: l_disable_date DATE;

Line 2747: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating notification_required . . . '); END IF;

2743:
2744: end;
2745:
2746: -- notification_required
2747: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating notification_required . . . '); END IF;
2748:
2749: begin
2750: if (p_eam_wo_rec.notification_required is not null and
2751: p_eam_wo_rec.notification_required not in ('Y', 'N')) then

Line 2779: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating shutdown_type . . . '); END IF;

2775:
2776: end;
2777:
2778: -- shutdown_type
2779: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating shutdown_type . . . '); END IF;
2780:
2781: begin
2782: if p_eam_wo_rec.shutdown_type is not null then
2783: select 1

Line 2815: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating tagout_required . . . '); END IF;

2811:
2812: end;
2813:
2814: -- tagout_required
2815: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating tagout_required . . . '); END IF;
2816:
2817: begin
2818: if (p_eam_wo_rec.tagout_required is not null and
2819: p_eam_wo_rec.tagout_required not in ('Y', 'N')) then

Line 2847: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating plan_maintenance . . . '); END IF;

2843:
2844: end;
2845:
2846: -- plan_maintenance
2847: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating plan_maintenance . . . '); END IF;
2848:
2849: begin
2850: if p_eam_wo_rec.plan_maintenance is not null and
2851: p_eam_wo_rec.plan_maintenance not in ('Y', 'N') then

Line 2879: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating work_order_type . . . '); END IF;

2875:
2876: end;
2877:
2878: -- work_order_type
2879: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating work_order_type . . . '); END IF;
2880:
2881: begin
2882: if p_eam_wo_rec.work_order_type is not null then
2883: select 1

Line 2915: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating activity_type . . . '); END IF;

2911:
2912: end;
2913:
2914: -- activity_type
2915: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating activity_type . . . '); END IF;
2916:
2917: begin
2918: if p_eam_wo_rec.activity_type is not null then
2919: select 1

Line 2951: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating activity_cause . . . '); END IF;

2947:
2948: end;
2949:
2950: -- activity_cause
2951: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating activity_cause . . . '); END IF;
2952:
2953: begin
2954: if p_eam_wo_rec.activity_cause is not null then
2955: select 1

Line 2989: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating activity_source . . . '); END IF;

2985:
2986:
2987:
2988: -- activity_source
2989: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating activity_source . . . '); END IF;
2990:
2991: begin
2992: if p_eam_wo_rec.activity_source is not null then
2993: select 1

Line 3026: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating accounting_period . . . '); END IF;

3022: end;
3023:
3024:
3025: -- date_released
3026: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating accounting_period . . . '); END IF;
3027:
3028: --bug#4425025 - need to validate period only when releasing the first time.
3029: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Old Date_released is : '||nvl(to_char(p_old_eam_wo_rec.date_released),'NULL')); END IF;
3030:

Line 3029: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Old Date_released is : '||nvl(to_char(p_old_eam_wo_rec.date_released),'NULL')); END IF;

3025: -- date_released
3026: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating accounting_period . . . '); END IF;
3027:
3028: --bug#4425025 - need to validate period only when releasing the first time.
3029: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Old Date_released is : '||nvl(to_char(p_old_eam_wo_rec.date_released),'NULL')); END IF;
3030:
3031: declare
3032: l_date_released_calc DATE;
3033: l_min_open_period_date DATE;

Line 3096: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating maintenance_object_source . . . '); END IF;

3092:
3093:
3094: -- maintenance_object_source
3095:
3096: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating maintenance_object_source . . . '); END IF;
3097:
3098: begin
3099:
3100: if (p_eam_wo_rec.maintenance_object_source is not null) then

Line 3135: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating user_id . . . '); END IF;

3131:
3132:
3133: -- user_id
3134:
3135: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating user_id . . . '); END IF;
3136:
3137: begin
3138:
3139: if (p_eam_wo_rec.user_id is not null) then

Line 3173: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating responsibility_id . . . '); END IF;

3169:
3170:
3171: -- responsibility_id
3172:
3173: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating responsibility_id . . . '); END IF;
3174:
3175: begin
3176:
3177: /* if (p_eam_wo_rec.responsibility_id is not null) then

Line 3226: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating user_defined_status_id . . . '); END IF;

3222: end;
3223:
3224: -- user_defined_status_id
3225:
3226: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating user_defined_status_id . . . '); END IF;
3227:
3228: begin
3229:
3230: IF (p_eam_wo_rec.user_defined_status_id IS NOT NULL) AND

Line 3266: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating material_issue_by_mo flag . . . '); END IF;

3262: end;
3263:
3264: -- material_issue_by_mo
3265:
3266: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating material_issue_by_mo flag . . . '); END IF;
3267:
3268: begin
3269:
3270: if (p_eam_wo_rec.material_issue_by_mo is null) then

Line 3278: if p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE

3274: end if;
3275:
3276:
3277:
3278: if p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_UPDATE
3279: and p_eam_wo_rec.status_type not in (WIP_CONSTANTS.DRAFT,WIP_CONSTANTS.UNRELEASED) /* Bug no 3349197 */
3280: and not(p_eam_wo_rec.status_type=WIP_CONSTANTS.RELEASED and (p_old_eam_wo_rec.status_type IN (WIP_CONSTANTS.DRAFT,WIP_CONSTANTS.UNRELEASED,WIP_CONSTANTS.CANCELLED))) /*Bug No 3476156*/
3281: and p_eam_wo_rec.material_issue_by_mo <> p_old_eam_wo_rec.material_issue_by_mo then
3282:

Line 3283: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN

3279: and p_eam_wo_rec.status_type not in (WIP_CONSTANTS.DRAFT,WIP_CONSTANTS.UNRELEASED) /* Bug no 3349197 */
3280: and not(p_eam_wo_rec.status_type=WIP_CONSTANTS.RELEASED and (p_old_eam_wo_rec.status_type IN (WIP_CONSTANTS.DRAFT,WIP_CONSTANTS.UNRELEASED,WIP_CONSTANTS.CANCELLED))) /*Bug No 3476156*/
3281: and p_eam_wo_rec.material_issue_by_mo <> p_old_eam_wo_rec.material_issue_by_mo then
3282:
3283: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN
3284: EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating material_issue_by_mo flag . .wip_entity_id' || p_eam_wo_rec.wip_entity_id);
3285: EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating material_issue_by_mo flag . .org_id' || p_eam_wo_rec.organization_id);
3286: END IF;
3287:

Line 3351: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN

3347:
3348: end;
3349:
3350: -- Bug # 4709084 : FAILURE ANALYSIS : Check for failure_code_required..
3351: IF EAM_PROCESS_WO_PVT.GET_DEBUG = 'Y' THEN
3352: EAM_ERROR_MESSAGE_PVT.Write_Debug('Validating failure_code_required . . . ');
3353: END IF;
3354:
3355: if (p_eam_wo_rec.failure_code_required is not null and p_eam_wo_rec.failure_code_required not in ('Y', 'N')) then