635: p_REQUEST_ID IN NUMBER DEFAULT NULL,
636: p_RESOURCE_CODE IN VARCHAR2 DEFAULT NULL,
637: p_RESOURCE_TYPE IN NUMBER DEFAULT NULL,
638: p_SOURCE_LINE_ID IN NUMBER DEFAULT NULL,
639: p_STANDARD_RATE_FLAG IN NUMBER DEFAULT NULL,
640: p_TRANSACTION_ID IN NUMBER DEFAULT NULL,
641: p_TRANSACTION_TYPE IN NUMBER DEFAULT NULL,
642: p_TRANSACTION_UOM IN VARCHAR2 DEFAULT NULL,
643: p_USAGE_RATE_OR_AMOUNT IN NUMBER DEFAULT NULL,
729: l_res_txn_rec.resource_seq_num := p_resource_seq_num ;
730: l_res_txn_rec.resource_type := p_resource_type ;
731: l_res_txn_rec.source_code := p_source_code ;
732: l_res_txn_rec.source_line_id := p_source_line_id ;
733: l_res_txn_rec.standard_rate_flag := p_standard_rate_flag ;
734: l_res_txn_rec.task_id := p_task_id ;
735: l_res_txn_rec.transaction_date := x_txn_date ;
736: l_res_txn_rec.transaction_id := p_transaction_id ;
737: l_res_txn_rec.transaction_quantity := p_transaction_quantity ;
1356: select min(scheduled_start_date), max(scheduled_completion_date)
1357: into x_sim_date_from, x_sim_date_to
1358: from wip_open_flow_schedules_v
1359: where line_id = p_line_id
1360: and standard_operation_id = p_line_op_id
1361: -- for the sake of performance
1362: and
1363: (
1364: ( scheduled_start_date >= s_time_from
1401: WFS.alternate_routing_designator,
1402: WFS.current_line_operation
1403: ) = 1
1404: and wfs.line_id = p_line_id
1405: and bos.standard_operation_id = p_line_op_id
1406: and
1407: (
1408: ( wfs.scheduled_start_date >= s_time_from
1409: and wfs.scheduled_start_date < s_time_to)
1517: wip_open_flow_schedules_v wofsv
1518: where
1519: wofsv.organization_id = p_organization_id
1520: and wofsv.line_id = p_line_id
1521: and wofsv.standard_operation_id = p_line_op_id
1522: and ( ( wofsv.scheduled_start_date >= s_time_from
1523: and wofsv.scheduled_start_date < s_time_to)
1524: or
1525: ( wofsv.scheduled_completion_date >= s_time_from
1531: and nvl(bor.alternate_routing_designator,'@@@') =
1532: nvl(wofsv.alternate_routing_designator,'@@@')
1533: and bos.operation_type = 3
1534: and bos.routing_sequence_id = bor.common_routing_sequence_id
1535: and bos.standard_operation_id = p_line_op_id
1536: and bos2.line_op_seq_id = bos.operation_sequence_id
1537: and bors.operation_sequence_id = bos2.operation_sequence_id
1538: and br.resource_id = bors.resource_id
1539: and bd.department_id = bos.department_id ;
1861:
1862: FOR i IN ops_table.first..ops_table.last LOOP
1863:
1864: select bso.operation_code into opcode
1865: from bom_standard_operations bso, bom_operation_sequences bos
1866: where bso.organization_id = p_org_id
1867: and bso.standard_operation_id = bos.standard_operation_id
1868: and bos.operation_sequence_id = ops_table(i).operation_sequence_id;
1869:
1863:
1864: select bso.operation_code into opcode
1865: from bom_standard_operations bso, bom_operation_sequences bos
1866: where bso.organization_id = p_org_id
1867: and bso.standard_operation_id = bos.standard_operation_id
1868: and bos.operation_sequence_id = ops_table(i).operation_sequence_id;
1869:
1870: lineops := lineops || ops_table(i).operation_seq_num || ' ' ||
1871: opcode;