56: assembly_item_id AII, common_routing_sequence_id CRSI,
57: completion_locator_id CLI, routing_type RT,
58: common_assembly_item_id CAII, completion_subinventory CS,
59: alternate_routing_designator ARD, transaction_id TI
60: from bom_op_routings_interface
61: where process_flag = 2
62: and rownum < 500;
63:
64: ret_code NUMBER;
99: prog_id => prog_id,
100: req_id => request_id,
101: trans_id => c1rec.TI,
102: error_text => err_text,
103: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
104: msg_name => 'BOM_INVALID_ORG_ID',
105: err_text => err_text);
106: update bom_op_routings_interface set
107: process_flag = 3
102: error_text => err_text,
103: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
104: msg_name => 'BOM_INVALID_ORG_ID',
105: err_text => err_text);
106: update bom_op_routings_interface set
107: process_flag = 3
108: where transaction_id = c1rec.TI;
109: if (ret_code <> 0) then
110: return(ret_code);
130: prog_id => prog_id,
131: req_id => request_id,
132: trans_id => c1rec.TI,
133: error_text => err_text,
134: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
135: msg_name => 'BOM_INVALID_RTG_ALTERNATE',
136: err_text => err_text);
137: update bom_op_routings_interface set
138: process_flag = 3
133: error_text => err_text,
134: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
135: msg_name => 'BOM_INVALID_RTG_ALTERNATE',
136: err_text => err_text);
137: update bom_op_routings_interface set
138: process_flag = 3
139: where transaction_id = c1rec.TI;
140:
141: if (ret_code <> 0) then
159: prog_id => prog_id,
160: req_id => request_id,
161: trans_id => c1rec.TI,
162: error_text => err_text,
163: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
164: msg_name => 'BOM_ASSEMBLY_ITEM_INVALID',
165: err_text => err_text);
166: update bom_op_routings_interface set
167: process_flag = 3
162: error_text => err_text,
163: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
164: msg_name => 'BOM_ASSEMBLY_ITEM_INVALID',
165: err_text => err_text);
166: update bom_op_routings_interface set
167: process_flag = 3
168: where transaction_id = c1rec.TI;
169:
170: if (ret_code <> 0) then
183: prog_id => prog_id,
184: req_id => request_id,
185: trans_id => c1rec.TI,
186: error_text => err_text,
187: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
188: msg_name => 'BOM_ROUTING_TYPE_INVALID',
189: err_text => err_text);
190: update bom_op_routings_interface set
191: process_flag = 3
186: error_text => err_text,
187: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
188: msg_name => 'BOM_ROUTING_TYPE_INVALID',
189: err_text => err_text);
190: update bom_op_routings_interface set
191: process_flag = 3
192: where transaction_id = c1rec.TI;
193:
194: if (ret_code <> 0) then
211: prog_id => prog_id,
212: req_id => request_id,
213: trans_id => c1rec.TI,
214: error_text => err_text,
215: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
216: msg_name => 'BOM_DUPLICATE_RTG',
217: err_text => err_text);
218: update bom_op_routings_interface set
219: process_flag = 3
214: error_text => err_text,
215: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
216: msg_name => 'BOM_DUPLICATE_RTG',
217: err_text => err_text);
218: update bom_op_routings_interface set
219: process_flag = 3
220: where transaction_id = c1rec.TI;
221:
222: if (ret_code <> 0) then
246: prog_id => prog_id,
247: req_id => request_id,
248: trans_id => c1rec.TI,
249: error_text => err_text,
250: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
251: msg_name => 'BOM_RTG_INVALID',
252: err_text => err_text);
253: update bom_op_routings_interface set
254: process_flag = 3
249: error_text => err_text,
250: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
251: msg_name => 'BOM_RTG_INVALID',
252: err_text => err_text);
253: update bom_op_routings_interface set
254: process_flag = 3
255: where transaction_id = c1rec.TI;
256:
257: if (ret_code <> 0) then
276: prog_id => prog_id,
277: req_id => request_id,
278: trans_id => c1rec.TI,
279: error_text => err_text,
280: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
281: msg_name => 'BOM_ROUTING_TYPE_ERR',
282: err_text => err_text);
283: update bom_op_routings_interface set
284: process_flag = 3
279: error_text => err_text,
280: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
281: msg_name => 'BOM_ROUTING_TYPE_ERR',
282: err_text => err_text);
283: update bom_op_routings_interface set
284: process_flag = 3
285: where transaction_id = c1rec.TI;
286:
287: if (ret_code <> 0) then
308: prog_id => prog_id,
309: req_id => request_id,
310: trans_id => c1rec.TI,
311: error_text => err_text,
312: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
313: msg_name => 'BOM_COMMON_RTG_NOT_EXIST',
314: err_text => err_text);
315: update bom_op_routings_interface set
316: process_flag = 3
311: error_text => err_text,
312: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
313: msg_name => 'BOM_COMMON_RTG_NOT_EXIST',
314: err_text => err_text);
315: update bom_op_routings_interface set
316: process_flag = 3
317: where transaction_id = c1rec.TI;
318:
319: if (ret_code <> 0) then
341: prog_id => prog_id,
342: req_id => request_id,
343: trans_id => c1rec.TI,
344: error_text => err_text,
345: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
346: msg_name => 'BOM_COMMON_RTG_ERROR',
347: err_text => err_text);
348: update bom_op_routings_interface set
349: process_flag = 3
344: error_text => err_text,
345: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
346: msg_name => 'BOM_COMMON_RTG_ERROR',
347: err_text => err_text);
348: update bom_op_routings_interface set
349: process_flag = 3
350: where transaction_id = c1rec.TI;
351:
352: if (ret_code <> 0) then
655: prog_id => prog_id,
656: req_id => request_id,
657: trans_id => c1rec.TI,
658: error_text => err_text,
659: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
660: msg_name => 'BOM_LOCATOR_INVALID',
661: err_text => err_text);
662: update bom_op_routings_interface set
663: process_flag = 3
658: error_text => err_text,
659: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
660: msg_name => 'BOM_LOCATOR_INVALID',
661: err_text => err_text);
662: update bom_op_routings_interface set
663: process_flag = 3
664: where transaction_id = c1rec.TI;
665:
666: if (ret_code <> 0) then
677: prog_id => prog_id,
678: req_id => request_id,
679: trans_id => c1rec.TI,
680: error_text => err_text,
681: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
682: msg_name => 'BOM_SUBINV_INVALID',
683: err_text => err_text);
684: update bom_op_routings_interface set
685: process_flag = 3
680: error_text => err_text,
681: tbl_name => 'BOM_OP_ROUTINGS_INTERFACE',
682: msg_name => 'BOM_SUBINV_INVALID',
683: err_text => err_text);
684: update bom_op_routings_interface set
685: process_flag = 3
686: where transaction_id = c1rec.TI;
687:
688: if (ret_code <> 0) then
691: goto continue_loop;
692:
693: <
694: stmt_num := 10;
695: update bom_op_routings_interface
696: set process_flag = 4
697: where transaction_id = c1rec.TI;
698:
699: <
987: end;
988: begin
989: select 'Is pointing to a common'
990: into dummy
991: from bom_op_routings_interface
992: where routing_sequence_id = c1rec.RSI
993: and process_flag = 4
994: and common_routing_sequence_id <> c1rec.RSI;
995:
1986:
1987: if (dummy_rtg = 0) then
1988: select count(*)
1989: into dummy_rtg
1990: from bom_op_routings_interface
1991: where process_flag = 4
1992: and organization_id = c0rec.OI
1993: and assembly_item_id = c0rec.AII;
1994:
2265: end;
2266:
2267: select routing_sequence_id
2268: into cnt
2269: from bom_op_routings_interface
2270: where routing_sequence_id = cmn_rtg_id
2271: and nvl(alternate_routing_designator, 'NONE') =
2272: nvl(alt_desg, 'NONE')
2273: and common_routing_sequence_id = routing_sequence_id
2405: ** check in interface table
2406: */
2407: select count(*)
2408: into cnt
2409: from bom_op_routings_interface
2410: where routing_sequence_id = rtg_seq_id
2411: and process_flag = 4;
2412:
2413: if (cnt = 0) then
2495:
2496: begin
2497: select routing_sequence_id
2498: into cnt
2499: from bom_op_routings_interface
2500: where organization_id = org_id
2501: and assembly_item_id = assy_id
2502: and nvl(alternate_routing_designator, 'NONE') =
2503: nvl(alt_desg, 'NONE')
2542:
2543: begin
2544: select routing_sequence_id
2545: into cnt
2546: from bom_op_routings_interface
2547: where organization_id = org_id
2548: and assembly_item_id = assy_id
2549: and alternate_routing_designator is null
2550: and ((rtg_type = 2)