864: --dbms_output.put_line('Entering : validate_order_header');
865: IF (FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
866: FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE, L_DEBUG_KEY || '.begin', 'Begin Procedure');
867: END IF;
868: l_operating_unit_id := mo_global.get_current_org_id();
869: IF (l_operating_unit_id IS NULL) THEN
870: FND_MESSAGE.Set_Name('AHL', 'AHL_OSP_ORG_NOT_SET');
871: FND_MSG_PUB.ADD;
872: END IF;
2327: AND wdj.wip_entity_id = wo.wip_entity_id
2328: AND wdj.owning_department = bmd.department_id
2329: AND upper(bmd.department_class_code) = 'VENDOR'
2330: AND org.organization_id = vst.organization_id
2331: AND NVL (org.operating_unit, mo_global.get_current_org_id ()) = mo_global.get_current_org_id()
2332: AND wo.status_code = G_OSP_WO_RELEASED;
2333:
2334: l_exist VARCHAR2(1);
2335: L_DEBUG_KEY CONSTANT VARCHAR2(150) := G_LOG_PREFIX || '.validate_workorder';
3972: --index defined on osp_order_number if two concurrent users submit the OSP Order creation at
3973: --the same time
3974: l_osp_order_number := l_osp_order_id;
3975: --Derive operating_unit_id
3976: l_operating_unit_id :=mo_global.get_current_org_id();
3977: IF (l_operating_unit_id IS NULL) THEN
3978: FND_MESSAGE.Set_Name('AHL', 'AHL_OSP_ORG_NOT_SET');
3979: FND_MSG_PUB.ADD;
3980: RAISE FND_API.G_EXC_ERROR;
4077: AND wo.visit_id = vst.visit_id
4078: AND wo.visit_task_id = vts.visit_task_id
4079: AND vst.visit_id = vts.visit_id
4080: AND vst.organization_id = org.organization_id
4081: AND NVL (org.operating_unit, mo_global.get_current_org_id ())= mo_global.get_current_org_id();
4082:
4083: l_item_service_rels_tbl(i).inv_org_id := l_organization_id;
4084: l_item_service_rels_tbl(i).inv_item_id := l_inventory_item_id;
4085: l_item_service_rels_tbl(i).service_item_id := l_service_item_id;