DBA Data[Home] [Help]

APPS.BOMPCHDU dependencies on MTL_DEMAND

Line 15: | mtl_demand has already been found to be a duplicate. |

11: | This file creates packaged functions that check for matching |
12: | configurations. |
13: | |
14: | BOMPCHDU.is_base_demand_row -- Checks whether a given row in |
15: | mtl_demand has already been found to be a duplicate. |
16: | |
17: | BOMPCHDU.bomfchdu_check_dupl_config -- Checks through each |
18: | row in mtl_demand which has been marked to be processed. |
19: | Depending on profile settings, it may call a custom function |

Line 18: | row in mtl_demand which has been marked to be processed. |

14: | BOMPCHDU.is_base_demand_row -- Checks whether a given row in |
15: | mtl_demand has already been found to be a duplicate. |
16: | |
17: | BOMPCHDU.bomfchdu_check_dupl_config -- Checks through each |
18: | row in mtl_demand which has been marked to be processed. |
19: | Depending on profile settings, it may call a custom function |
20: | for pre-existing configurations or use the matching function |
21: | from match and reserve. Then, it does an in batch match on |
22: | the configurations. |

Line 71: from mtl_demand

67: */
68: sql_stmt_num := 30;
69: select duplicated_config_demand_id, duplicated_config_item_id into
70: l_dup_demand_id, l_dup_item_id
71: from mtl_demand
72: where demand_id = input_demand_id
73: and config_group_id = USERENV('SESSIONID')
74: and config_status = 20
75: and rownum = 1; /* demand_id is a duplicated_config_demand_id

Line 89: table_name := 'MTL_DEMAND';

85: when OTHERS THEN
86: error_message := 'ibdr:' || to_char(sql_stmt_num) || ':' ||
87: substrb(sqlerrm,1,150);
88: message_name := 'BOM_ATO_PROCESS_ERROR';
89: table_name := 'MTL_DEMAND';
90:
91: return(2); /* Error condition */
92:
93: end;

Line 110: from mtl_demand D,

106: ** Declare cursor for fetching demand lines to be checked
107: */
108: CURSOR cc IS
109: select demand_id, demand_source_line
110: from mtl_demand D,
111: mtl_sales_orders S
112: where D.config_group_id = USERENV('SESSIONID')
113: and D.duplicated_config_item_id is NULL
114: and D.demand_source_header_id = S.sales_order_id

Line 182: update mtl_demand

178: table_name);
179: if (status = 1) then
180: if (l_config_item_id is not NULL) then
181: sql_stmt_num := 10;
182: update mtl_demand
183: set duplicated_config_item_id= l_config_item_id
184: where demand_id = l_demand_id;
185: end if; /* end of if config_item is not NULL */
186: else

Line 243: table_name := 'MTL_DEMAND';

239: when OTHERS then
240: status := sql_stmt_num; /*sqlcode; */
241: error_message := 'bcdc:' || to_char(sql_stmt_num) || ':' ||
242: substrb(sqlerrm,1,150);
243: table_name := 'MTL_DEMAND';
244: return (status);
245:
246: end;
247:

Line 275: from mtl_demand md,

271: ** same values of cfm_routing_flag
272: */
273:
274: select NVL(cfm_routing_flag,0) into cfm_value
275: from mtl_demand md,
276: bom_operational_routings bor
277: where md.inventory_item_id = bor.assembly_item_id(+)
278: and md.organization_id = bor.organization_id(+)
279: and bor.alternate_routing_designator(+) is NULL

Line 285: update mtl_demand m

281:
282:
283:
284: stmt_num :=60;
285: update mtl_demand m
286: set m.duplicated_config_item_id = (
287: select BAC1.config_item_id
288: from BOM_ATO_CONFIGURATIONS BAC1, /* the duplicate */
289: so_lines_all solp, /* Parent of ATO Model if any */

Line 343: from mtl_demand

339:
340:
341:
342: select duplicated_config_item_id into match_results
343: from mtl_demand
344: where config_group_id = USERENV('SESSIONID')
345: and demand_id = input_demand_id;
346: /* **** is this REALLY necessary? just updated it*** */
347:

Line 364: table_name := 'MTL_DEMAND';

360: when NO_MODEL_FOUND THEN
361: error_message := 'BOMPCHDU' || to_char(stmt_num) || ':' ||
362: substrb(sqlerrm,1,150);
363: message_name := 'BOM_ATO_PROCESS_ERROR';
364: table_name := 'MTL_DEMAND';
365: return (0);
366:
367: when NO_DATA_FOUND THEN
368:

Line 404: update mtl_demand m

400:
401: temp_item_id := dupl_item_id;
402: stmt_num :=100;
403:
404: update mtl_demand m
405: set m.duplicated_config_item_id = temp_item_id,
406: m.duplicated_config_demand_id = dupl_demand_id
407: where m.config_group_id = USERENV('SESSIONID')
408: and m.demand_id in (

Line 414: mtl_demand m1

410: from so_lines_all soldp, /* parent of duplicate */
411: so_lines_all solp, /* parent of other lines */
412: so_lines_all sol1, /* processing other lines */
413: so_lines_all sold, /* current -- duplicate */
414: mtl_demand m1
415: where sol1.line_id=m1.demand_source_line
416: and m1.config_group_id = USERENV('SESSIONID')
417: and m1.demand_id <> input_demand_id
418: and sold.line_id = copy_line_id

Line 467: table_name := 'MTL_DEMAND';

463:
464: error_message := 'BOMPCHDU:' || to_char(stmt_num) || ':' ||
465: substrb(sqlerrm,1,150);
466: message_name := 'BOM_ATO_PROCESS_ERROR';
467: table_name := 'MTL_DEMAND';
468: return (0);
469:
470: when NO_DATA_FOUND THEN
471: