39: , x_Return_status OUT NOCOPY VARCHAR2
40: )
41: IS
42: l_eam_wo_rec EAM_PROCESS_WO_PUB.eam_wo_rec_type;
43: l_return_status VARCHAR2(1):= FND_API.G_RET_STS_SUCCESS;
44: l_dummy varchar2(10);
45: BEGIN
46:
47: SELECT we.wip_entity_name
256: x_return_status := EAM_PROCESS_WO_PVT.G_RECORD_NOT_FOUND;
257: x_eam_wo_rec := l_eam_wo_rec;
258:
259: WHEN OTHERS THEN
260: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
261: x_eam_wo_rec := l_eam_wo_rec;
262:
263: END Query_Row;
264:
288: IF EAM_PROCESS_WO_PVT.Get_Debug = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Writing EAM WO rec for ' || p_eam_wo_rec.wip_entity_name); END IF;
289:
290: -- bug no 3444091
291: if p_eam_wo_rec.scheduled_start_date > p_eam_wo_rec.scheduled_completion_date then
292: x_return_status := fnd_api.g_ret_sts_error;
293: fnd_message.set_name('EAM','EAM_WO_WORKORDER_DT_ERR');
294: return;
295: end if;
296:
604: );
605:
606:
607: IF EAM_PROCESS_WO_PVT.Get_Debug = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug ('Creating new Work Order') ; END IF;
608: x_return_status := FND_API.G_RET_STS_SUCCESS;
609:
610:
611: EXCEPTION
612: WHEN OTHERS THEN
615: , p_message_text => G_PKG_NAME ||' :Inserting Record ' || SQLERRM
616: , x_mesg_token_Tbl => x_mesg_token_tbl
617: );
618:
619: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
620:
621: END Insert_Row;
622:
623: /********************************************************************
641: IF EAM_PROCESS_WO_PVT.Get_Debug = 'Y' THEN EAM_ERROR_MESSAGE_PVT.Write_Debug('Updating EAM WO '|| p_eam_wo_rec.wip_entity_name); END IF;
642:
643: -- bug no 3444091
644: if p_eam_wo_rec.scheduled_start_date > p_eam_wo_rec.scheduled_completion_date then
645: x_return_status := fnd_api.g_ret_sts_error;
646: fnd_message.set_name('EAM','EAM_WO_WORKORDER_DT_ERR');
647: return;
648: end if;
649:
777: , planner_maintenance = p_eam_wo_rec.planner_type --vardha
778: WHERE wip_entity_id = p_eam_wo_rec.wip_entity_id
779: AND organization_id = p_eam_wo_rec.organization_id;
780:
781: x_return_status := FND_API.G_RET_STS_SUCCESS;
782:
783: END Update_Row;
784:
785: /*********************************************************************
798: , x_return_status OUT NOCOPY VARCHAR2
799: )
800: IS
801: l_Mesg_Token_tbl EAM_ERROR_MESSAGE_PVT.Mesg_Token_Tbl_Type;
802: l_return_status VARCHAR2(1):= FND_API.G_RET_STS_SUCCESS;
803: BEGIN
804:
805: IF p_eam_wo_rec.transaction_type = EAM_PROCESS_WO_PVT.G_OPR_CREATE
806: THEN