13: CURSOR oper_info ( p_group_id number,
14: p_wip_entity_id number,
15: p_organization_id number,
16: p_substitution_type number) IS
17: SELECT distinct parent_header_id,operation_seq_num, standard_operation_id,
18: department_id, description , first_unit_start_date,
19: first_unit_completion_date, last_unit_start_date,
20: last_unit_completion_date, minimum_transfer_quantity,
21: count_point_type, backflush_flag,last_update_date,
43: Default_Oper(p_group_id, cur_row.parent_header_id,
44: p_wip_entity_id, p_organization_id,
45: cur_row.operation_seq_num, p_substitution_type,
46: cur_row.description,cur_row.department_id,
47: cur_row.standard_operation_id,
48: cur_row.first_unit_start_date,
49: cur_row.first_unit_completion_date,
50: cur_row.last_unit_start_date,
51: cur_row.last_unit_completion_date,
69: p_operation_seq_num number,
70: p_substitution_type number,
71: p_description varchar2 := NULL,
72: p_department_id number := NULL,
73: p_standard_operation_id number:=NULL,
74: p_fusd date := NULL,
75: p_fucd date := NULL,
76: p_lusd date := NULL,
77: p_lucd date := NULL,
92: l_first_unit_completion_date DATE;
93: l_last_unit_start_date DATE;
94: l_last_unit_completion_date DATE;
95: l_start_quantity NUMBER;
96: l_standard_oper number;
97: l_parent_header number;
98:
99: BEGIN
100:
108: l_first_unit_completion_date := null;
109: l_last_unit_start_date := null;
110: l_last_unit_completion_date := null;
111: l_start_quantity := 0;
112: l_standard_oper := 0;
113: l_parent_header := 0;
114:
115: begin
116:
125: END IF;
126:
127: IF p_substitution_type = WIP_JOB_DETAILS.WIP_ADD THEN
128:
129: IF p_standard_operation_id IS NOT NULL
130: AND p_standard_operation_id IS NOT NULL THEN
131:
132: select count(*) into l_standard_oper
133: from bom_standard_operations
126:
127: IF p_substitution_type = WIP_JOB_DETAILS.WIP_ADD THEN
128:
129: IF p_standard_operation_id IS NOT NULL
130: AND p_standard_operation_id IS NOT NULL THEN
131:
132: select count(*) into l_standard_oper
133: from bom_standard_operations
134: where standard_operation_id = p_standard_operation_id
128:
129: IF p_standard_operation_id IS NOT NULL
130: AND p_standard_operation_id IS NOT NULL THEN
131:
132: select count(*) into l_standard_oper
133: from bom_standard_operations
134: where standard_operation_id = p_standard_operation_id
135: and organization_id = p_organization_id;
136:
129: IF p_standard_operation_id IS NOT NULL
130: AND p_standard_operation_id IS NOT NULL THEN
131:
132: select count(*) into l_standard_oper
133: from bom_standard_operations
134: where standard_operation_id = p_standard_operation_id
135: and organization_id = p_organization_id;
136:
137: IF l_standard_oper = 1 THEN
130: AND p_standard_operation_id IS NOT NULL THEN
131:
132: select count(*) into l_standard_oper
133: from bom_standard_operations
134: where standard_operation_id = p_standard_operation_id
135: and organization_id = p_organization_id;
136:
137: IF l_standard_oper = 1 THEN
138: SELECT department_id, minimum_transfer_quantity,
133: from bom_standard_operations
134: where standard_operation_id = p_standard_operation_id
135: and organization_id = p_organization_id;
136:
137: IF l_standard_oper = 1 THEN
138: SELECT department_id, minimum_transfer_quantity,
139: count_point_type, operation_description,
140: backflush_flag
141: INTO l_department_id, l_min_xfer_qty, l_count_point_type,
139: count_point_type, operation_description,
140: backflush_flag
141: INTO l_department_id, l_min_xfer_qty, l_count_point_type,
142: l_operation_description, l_backflush_flag
143: FROM BOM_STANDARD_OPERATIONS
144: WHERE standard_operation_id = p_standard_operation_id
145: AND organization_id = p_organization_id;
146: END IF;
147:
140: backflush_flag
141: INTO l_department_id, l_min_xfer_qty, l_count_point_type,
142: l_operation_description, l_backflush_flag
143: FROM BOM_STANDARD_OPERATIONS
144: WHERE standard_operation_id = p_standard_operation_id
145: AND organization_id = p_organization_id;
146: END IF;
147:
148: END IF;