749: AND bdri2.resource_id = bdr.resource_id
750: AND ( p_department_id IS NULL OR bdr.department_id = p_department_id )
751: AND ( p_department_id IS NULL OR bdri2.department_id = p_department_id OR bdri2.department_id = bdr.share_from_dept_id ) ;
752:
753: --get the resource code for the resource id from bom_resources
754: CURSOR l_res_code_csr_type(p_resource_id IN NUMBER) IS
755: SELECT br.resource_code,
756: br.unit_of_measure as uom_code
757: FROM bom_resources br
753: --get the resource code for the resource id from bom_resources
754: CURSOR l_res_code_csr_type(p_resource_id IN NUMBER) IS
755: SELECT br.resource_code,
756: br.unit_of_measure as uom_code
757: FROM bom_resources br
758: WHERE br.resource_id = p_resource_id;
759:
760: --get the department code for the department from bom_departments
761: CURSOR l_dept_code_csr_type(p_department_id IN NUMBER) IS
792: ) AS WorkOrderName,
793: (
794: SELECT br.resource_code
795: FROM bom_resource_employees bre,
796: bom_resources br
797: WHERE bre.instance_id = woru.instance_id
798: AND bre.organization_id = woru.organization_id
799: AND bre.effective_start_date <= sysdate
800: AND bre.effective_end_date > sysdate
1298: ) AS WorkOrderName,
1299: (
1300: SELECT br.resource_code
1301: FROM bom_resource_employees bre,
1302: bom_resources br
1303: WHERE bre.instance_id = woru.instance_id
1304: AND bre.organization_id = woru.organization_id
1305: AND bre.effective_start_date <= sysdate
1306: AND bre.effective_end_date > sysdate
1399: AND wo.repetitive_schedule_id IS NULL;
1400:
1401: CURSOR l_res_csr_type(p_wip_entity_id IN NUMBER,p_organization_id IN NUMBER,p_op_seq_num IN NUMBER) IS
1402: SELECT wor.resource_seq_num , wor.usage_rate_or_amount
1403: FROM wip_operation_resources wor, bom_resources br
1404: WHERE wor.wip_entity_id = p_wip_entity_id
1405: AND wor.operation_seq_num = p_op_seq_num
1406: AND wor.ORGANIZATION_ID = p_organization_id
1407: AND wor.repetitive_schedule_id IS NULL