DBA Data[Home] [Help]

APPS.MRP_LINE_SCHEDULE_ALGORITHM dependencies on WIP_FLOW_SCHEDULES

Line 12: FROM wip_flow_schedules

8: -- the specified line.
9:
10: CURSOR item_list (p_org_id NUMBER) IS
11: SELECT DISTINCT primary_item_id
12: FROM wip_flow_schedules
13: WHERE request_id = USERENV('SESSIONID')
14: AND organization_id = p_org_id
15: AND wip_entity_id >= G_WIP_ENTITY_ID;
16:

Line 22: FROM wip_flow_schedules

18: -- scheduled on the specified line.
19:
20: CURSOR schedule_group_list (p_org_id NUMBER) IS
21: SELECT DISTINCT schedule_group_id schedule_group
22: FROM wip_flow_schedules
23: WHERE request_id = USERENV('SESSIONID')
24: AND organization_id = p_org_id
25: AND wip_entity_id >= G_WIP_ENTITY_ID;
26:

Line 32: FROM wip_flow_schedules

28: and routing_revision_date to be selected by the sursor. */
29: CURSOR fs_list (p_line_id NUMBER, p_org_id NUMBER) IS
30: SELECT wip_entity_id, schedule_group_id, scheduled_completion_date,
31: primary_item_id, bom_revision_date, routing_revision_date
32: FROM wip_flow_schedules
33: WHERE request_id = USERENV('SESSIONID')
34: AND line_id = p_line_id
35: AND organization_id = p_org_id
36: AND scheduled_flag = C_YES

Line 58: FROM wip_flow_schedules

54: CURSOR flow_schedule_list (p_line_id NUMBER, p_org_id NUMBER, p_date NUMBER)
55: IS
56: SELECT wip_entity_id,planned_quantity,quantity_completed,
57: schedule_group_id,build_sequence,primary_item_id
58: FROM wip_flow_schedules
59: WHERE to_number(to_char(scheduled_completion_date,'J'))
60: = p_date
61: AND line_id = p_line_id
62: AND organization_id = p_org_id

Line 99: ' FROM oe_order_lines_all sol,wip_flow_schedules fs '||

95: ' sol.planning_priority planning_priority, '||
96: ' fs.primary_item_id primary_item_id, '||
97: ' fs.planned_quantity planned_quantity, '||
98: ' fs.schedule_group_id schedule_group_id '||
99: ' FROM oe_order_lines_all sol,wip_flow_schedules fs '||
100: ' WHERE fs.request_id = :v_session_id '||
101: ' AND fs.organization_id = :p_org_id '||
102: ' AND fs.line_id = :p_line_id '||
103: ' AND sol.line_id(+) = fs.demand_source_line '||

Line 253: from wip_flow_schedules

249:
250: -- Get total_quantity to be scheduled
251: select sum(planned_quantity)
252: into v_qty_to_sched
253: from wip_flow_schedules
254: where request_id = USERENV('SESSIONID')
255: and line_id = p_line_id
256: and organization_id = p_org_id
257: and scheduled_flag = C_NO

Line 298: FROM wip_flow_schedules

294:
295: SELECT NVL(SUM(NVL(planned_quantity,0)
296: -NVL(quantity_completed,0)),0)
297: INTO v_sum_fs
298: FROM wip_flow_schedules
299: WHERE line_id = p_line_id
300: AND organization_id = p_org_id
301: --fix bug#3783650
302: --AND to_number(to_char(scheduled_completion_date,'J'))

Line 509: FROM wip_flow_schedules

505:
506: -- Determine if flow schedules originate from sales orders or planned orders
507: SELECT demand_source_type
508: INTO v_source_type
509: FROM wip_flow_schedules
510: WHERE request_id = USERENV('SESSIONID')
511: AND scheduled_flag = C_NO
512: AND rownum = 1
513: AND wip_entity_id >= G_WIP_ENTITY_ID;

Line 715: FROM wip_flow_schedules fs

711:
712: IF schedule_group_rec.schedule_group IS NOT NULL THEN
713: SELECT NVL(MAX(build_sequence),0)
714: INTO p_build_seq_tab(schedule_group_rec.schedule_group).buildseq
715: FROM wip_flow_schedules fs
716: WHERE fs.schedule_group_id = schedule_group_rec.schedule_group
717: AND fs.line_id = p_line_id
718: AND fs.organization_id = p_org_id
719: AND scheduled_flag = C_YES;

Line 727: FROM wip_flow_schedules fs

723: ELSE
724:
725: SELECT NVL(MAX(build_sequence),0)
726: INTO v_null_build_seq
727: FROM wip_flow_schedules fs
728: WHERE fs.schedule_group_id IS NULL
729: AND fs.line_id = p_line_id
730: AND fs.organization_id = p_org_id
731: AND scheduled_flag = C_YES;

Line 860: FROM wip_flow_schedules

856: v_line_rate := TRUNC(v_hr_line_rate * (v_end_time - v_start_time)/3600);
857:
858: SELECT max(scheduled_completion_date)
859: INTO l_last_comp_date
860: FROM wip_flow_schedules
861: WHERE scheduled_completion_date >= to_date(v_date,'J')+v_start_time/86400
862: AND scheduled_completion_date <= to_date(v_date,'J')+v_end_time/86400
863: AND line_id = p_line_id
864: AND organization_id = p_org_id

Line 953: FROM wip_flow_schedules fs

949:
950: SELECT NVL(SUM(NVL(planned_quantity,0)
951: -NVL(quantity_completed,0)),0)
952: INTO p_demand_tab(item_list_rec.primary_item_id).totalDemand
953: FROM wip_flow_schedules fs
954: WHERE fs.request_id = USERENV('SESSIONID')
955: AND fs.primary_item_id = item_list_rec.primary_item_id
956: AND fs.line_id = p_line_id
957: AND fs.organization_id = p_org_id

Line 1001: FROM wip_flow_schedules fs

997:
998: CURSOR item_demand_cursor IS
999: SELECT primary_item_id, SUM(TRUNC(NVL(planned_quantity,0)
1000: -NVL(quantity_completed,0)-0.00000001)+1) quantity
1001: FROM wip_flow_schedules fs
1002: WHERE fs.request_id = USERENV('SESSIONID')
1003: AND fs.line_id = p_line_id
1004: AND fs.organization_id = p_org_id
1005: AND fs.scheduled_flag = C_NO

Line 1346: UPDATE wip_flow_schedules

1342: FROM DUAL;
1343:
1344: V_ERROR_LINE := 3;
1345:
1346: UPDATE wip_flow_schedules
1347: SET planned_quantity =
1348: v_itemQty_tab(fs_select_rec.primary_item_id).remainQty
1349: WHERE wip_entity_id = fs_select_rec.wip_entity
1350: AND organization_id = p_org_id;

Line 1380: INSERT INTO wip_flow_schedules(

1376: --v_schedule_number := NVL(substr(FND_PROFILE.value('WIP_JOB_PREFIX'),1,20),'X')
1377: -- || to_char(v_temp);
1378: v_schedule_number := 'FLM-INTERNAL'|| to_char(v_temp);
1379:
1380: INSERT INTO wip_flow_schedules(
1381: scheduled_flag,
1382: wip_entity_id,
1383: organization_id,
1384: last_update_date,

Line 1505: FROM wip_flow_schedules fs

1501: fs.completion_locator_id,
1502: fs.demand_class,
1503: fs.attribute_category,
1504: fs.kanban_card_id
1505: FROM wip_flow_schedules fs
1506: WHERE fs.wip_entity_id = fs_select_rec.wip_entity
1507: AND line_id = p_line_id
1508: AND organization_id = p_org_id;
1509:

Line 1549: INSERT INTO wip_flow_schedules(

1545: --v_schedule_number := NVL(substr(FND_PROFILE.value('WIP_JOB_PREFIX'),1,20),'X')
1546: -- || to_char(v_temp);
1547: v_schedule_number := 'FLM-INTERNAL'|| to_char(v_temp);
1548:
1549: INSERT INTO wip_flow_schedules(
1550: scheduled_flag,
1551: wip_entity_id,
1552: organization_id,
1553: last_update_date,

Line 1676: FROM wip_flow_schedules fs

1672: fs.completion_locator_id,
1673: fs.demand_class,
1674: fs.attribute_category,
1675: fs.kanban_card_id
1676: FROM wip_flow_schedules fs
1677: WHERE fs.wip_entity_id = v_itemQty_tab(item_list_rec.primary_item_id).wip_id
1678: AND line_id = p_line_id
1679: AND organization_id = p_org_id;
1680:

Line 1687: FROM wip_flow_schedules

1683: END IF;
1684: END LOOP;
1685:
1686: DELETE
1687: FROM wip_flow_schedules
1688: WHERE planned_quantity = 0
1689: AND line_id = p_line_id
1690: AND organization_id = p_org_id;
1691:

Line 1772: UPDATE wip_flow_schedules fs

1768:
1769: v_round_total := v_round_total +
1770: (v_round_qty - fs_select_rec.planned_quantity);
1771:
1772: UPDATE wip_flow_schedules fs
1773: SET planned_quantity = v_round_qty
1774: WHERE fs.wip_entity_id = fs_select_rec.wip_entity
1775: AND organization_id = p_org_id;
1776:

Line 1813: UPDATE wip_flow_schedules fs

1809: IF fs_select_rec.planned_quantity > v_round_total THEN
1810:
1811: V_ERROR_LINE := 7;
1812:
1813: UPDATE wip_flow_schedules fs
1814: SET planned_quantity = fs_select_rec.planned_quantity -
1815: v_round_total
1816: WHERE fs.wip_entity_id = fs_select_rec.wip_entity
1817: AND organization_id = p_org_id;

Line 1829: FROM wip_flow_schedules

1825:
1826: V_ERROR_LINE := 9;
1827:
1828: DELETE
1829: FROM wip_flow_schedules
1830: WHERE wip_entity_id = fs_select_rec.wip_entity
1831: AND organization_id = p_org_id;
1832:
1833: V_ERROR_LINE := 10;

Line 1939: FROM wip_flow_schedules fs

1935:
1936: -- Obtain the maximum sequence for the null schedule group
1937: SELECT NVL(MAX(build_sequence),0)
1938: INTO v_null_build_seq
1939: FROM wip_flow_schedules fs
1940: WHERE fs.schedule_group_id IS NULL
1941: AND fs.line_id = p_line_id
1942: AND fs.organization_id = p_org_id
1943: AND scheduled_flag = C_YES;

Line 2021: from wip_flow_schedules

2017: v_current_wip := fs_select_rec.wip_entity;
2018:
2019: select scheduled_completion_date, demand_source_line
2020: into date_temp, trans_temp
2021: from wip_flow_schedules
2022: where wip_entity_id = v_current_wip
2023: and organization_id = p_org_id;
2024:
2025: -- LOOP used for making sure that all quantity of the flow schedule has

Line 2128: UPDATE wip_flow_schedules

2124: v_end_time);
2125: END IF;
2126:
2127:
2128: UPDATE wip_flow_schedules
2129: SET scheduled_start_date = v_begin_time,
2130: scheduled_completion_date = v_completion_time,
2131: scheduled_flag = C_YES,
2132: build_sequence = v_build_seq

Line 2138: from wip_flow_schedules

2134: AND organization_id = p_org_id;
2135:
2136: select planned_quantity
2137: into qty_temp
2138: from wip_flow_schedules
2139: where wip_entity_id = v_current_wip
2140: and organization_id = p_org_id;
2141:
2142: V_ERROR_LINE := 7;

Line 2167: FROM wip_flow_schedules

2163: -- to_char(v_current_cap));
2164:
2165: SELECT primary_item_id
2166: INTO v_current_item
2167: FROM wip_flow_schedules
2168: WHERE wip_entity_id = v_current_wip
2169: AND organization_id = p_org_id;
2170:
2171: V_ERROR_LINE := 8;

Line 2232: UPDATE wip_flow_schedules

2228: v_end_time);
2229: END IF;
2230:
2231:
2232: UPDATE wip_flow_schedules
2233: SET scheduled_start_date = v_begin_time,
2234: scheduled_completion_date = v_completion_time,
2235: planned_quantity = v_current_cap,
2236: scheduled_flag = C_YES,

Line 2243: from wip_flow_schedules

2239: AND organization_id = p_org_id;
2240:
2241: select planned_quantity
2242: into qty_temp
2243: from wip_flow_schedules
2244: where wip_entity_id = v_current_wip
2245: and organization_id = p_org_id;
2246:
2247: V_ERROR_LINE := 10;

Line 2263: INSERT INTO wip_flow_schedules(

2259: --Bug 6122344
2260: --v_schedule_number := NVL(substr(FND_PROFILE.value('WIP_JOB_PREFIX'),1,20),'X') || to_char(v_temp);
2261: v_schedule_number := 'FLM-INTERNAL'|| to_char(v_temp);
2262:
2263: INSERT INTO wip_flow_schedules(
2264: scheduled_flag,
2265: wip_entity_id,
2266: organization_id,
2267: last_update_date,

Line 2389: FROM wip_flow_schedules fs

2385: fs.completion_locator_id,
2386: fs.demand_class,
2387: fs.attribute_category,
2388: fs.kanban_card_id
2389: FROM wip_flow_schedules fs
2390: WHERE fs.wip_entity_id = fs_select_rec.wip_entity
2391: AND organization_id = p_org_id;
2392:
2393: V_ERROR_LINE := 12;

Line 2997: UPDATE wip_flow_schedules

2993: v_end_time);
2994: END IF;
2995:
2996:
2997: UPDATE wip_flow_schedules
2998: SET scheduled_start_date = v_begin_time,
2999: scheduled_completion_date = v_completion_time,
3000: scheduled_flag = C_YES
3001: WHERE wip_entity_id = v_current_wip

Line 3054: UPDATE wip_flow_schedules

3050: v_end_time);
3051: END IF;
3052:
3053:
3054: UPDATE wip_flow_schedules
3055: SET scheduled_start_date = v_begin_time,
3056: scheduled_completion_date = v_completion_time,
3057: planned_quantity = v_alloc_qty,
3058: scheduled_flag = C_YES

Line 3079: INSERT INTO wip_flow_schedules(

3075: --v_schedule_number := NVL(substr(FND_PROFILE.value('WIP_JOB_PREFIX'),1,20),'X')
3076: -- || to_char(v_temp);
3077: v_schedule_number := 'FLM-INTERNAL'|| to_char(v_temp);
3078:
3079: INSERT INTO wip_flow_schedules(
3080: scheduled_flag,
3081: wip_entity_id,
3082: organization_id,
3083: last_update_date,

Line 3205: FROM wip_flow_schedules fs

3201: fs.completion_locator_id,
3202: fs.demand_class,
3203: fs.attribute_category,
3204: fs.kanban_card_id
3205: FROM wip_flow_schedules fs
3206: WHERE fs.wip_entity_id = fs_select_rec.wip_entity
3207: AND organization_id = p_org_id;
3208:
3209: V_ERROR_LINE := 19;

Line 3277: FROM wip_flow_schedules fs

3273:
3274: -- Obtain the maximum sequence for the null schedule group
3275: SELECT NVL(MAX(build_sequence),0)
3276: INTO v_null_build_seq
3277: FROM wip_flow_schedules fs
3278: WHERE fs.schedule_group_id IS NULL
3279: AND fs.line_id = p_line_id
3280: AND fs.organization_id = p_org_id
3281: AND scheduled_flag = C_YES;

Line 3311: UPDATE wip_flow_schedules

3307: -- dbms_output.put_line('The build sequence is: '||to_char(v_build_seq));
3308:
3309: END IF;
3310:
3311: UPDATE wip_flow_schedules
3312: SET build_sequence = v_build_seq
3313: WHERE wip_entity_id = fs_list_rec.wip_entity_id
3314: AND organization_id = p_org_id;
3315:

Line 3335: -- and then written to the wip_flow_schedules table.

3331: END update_buildseq;
3332:
3333: -- This procedure schedules the flow schedules using the mix model algorithm.
3334: -- The flow schedules are first temporarily populated in a pl/sql table
3335: -- and then written to the wip_flow_schedules table.
3336:
3337: PROCEDURE schedule_mix_model(
3338: p_line_id IN NUMBER,
3339: p_org_id IN NUMBER,

Line 3528: UPDATE wip_flow_schedules

3524: -- dbms_output.put_line('The sequence is: '||to_char(v_sequence));
3525:
3526: -- MRP_UTIL.MRP_TIMING('Inside cursor loop, BEGIN update flow schedule');
3527:
3528: UPDATE wip_flow_schedules
3529: SET build_sequence = v_sequence
3530: WHERE wip_entity_id = fs_select_rec.wip_entity
3531: AND organization_id = p_org_id;
3532:

Line 3568: FROM wip_flow_schedules fs

3564:
3565: -- Obtain the maximum sequence for the null schedule group
3566: SELECT NVL(MAX(build_sequence),0)
3567: INTO v_null_build_seq
3568: FROM wip_flow_schedules fs
3569: WHERE fs.schedule_group_id IS NULL
3570: AND fs.line_id = p_line_id
3571: AND fs.organization_id = p_org_id
3572: AND scheduled_flag = C_YES;

Line 3609: FROM wip_flow_schedules

3605: -- MRP_UTIL.MRP_TIMING('Inside pattern, BEGIN select statement');
3606:
3607: SELECT wip_entity_id,planned_quantity,schedule_group_id
3608: INTO v_current_wip,v_planned_quantity,v_schedule_group
3609: FROM wip_flow_schedules
3610: WHERE primary_item_id = p_item_demand_tab(v_current_num).item
3611: AND organization_id = p_org_id
3612: AND line_id = p_line_id
3613: AND scheduled_flag = C_NO

Line 3731: FROM wip_flow_schedules

3727: v_bom_revision_date, v_routing_revision_date,
3728: v_alternate_bom_designator,v_alternate_routing_designator,
3729: v_completion_subinventory, v_completion_locator_id,
3730: v_demand_class, v_attribute_category,v_kanban_card_id
3731: FROM wip_flow_schedules
3732: WHERE wip_entity_id = v_current_wip
3733: AND organization_id = p_org_id
3734: AND request_id = userenv('sessionid')
3735: AND wip_entity_id >= G_WIP_ENTITY_ID;

Line 3808: FROM wip_flow_schedules

3804:
3805: -- MRP_UTIL.MRP_TIMING('END insert');
3806:
3807: DELETE
3808: FROM wip_flow_schedules
3809: WHERE wip_entity_id = v_current_wip
3810: AND organization_id = p_org_id;
3811:
3812: V_ERROR_LINE := 9;

Line 3924: FROM wip_flow_schedules

3920: v_bom_revision_date, v_routing_revision_date,
3921: v_alternate_bom_designator,v_alternate_routing_designator,
3922: v_completion_subinventory, v_completion_locator_id,
3923: v_demand_class, v_attribute_category, v_kanban_card_id
3924: FROM wip_flow_schedules
3925: WHERE wip_entity_id = v_current_wip
3926: AND organization_id = p_org_id;
3927:
3928: -- MRP_UTIL.MRP_TIMING('BEGIN insert');

Line 3998: UPDATE wip_flow_schedules

3994:
3995:
3996: -- MRP_UTIL.MRP_TIMING('end insert');
3997:
3998: UPDATE wip_flow_schedules
3999: SET planned_quantity = planned_quantity - 1
4000: WHERE wip_entity_id = v_current_wip
4001: AND organization_id = p_org_id;
4002:

Line 4019: -- Insert flow schedules from pl/sql table to wip flow schedules table.

4015: -- to_char(v_current_cap));
4016:
4017: END LOOP;
4018:
4019: -- Insert flow schedules from pl/sql table to wip flow schedules table.
4020:
4021: v_current_schedule := v_flow_schedule_tab.FIRST;
4022:
4023: -- MRP_UTIL.MRP_TIMING('BEGIN INSERTING INTO wip flow schedules table');

Line 4023: -- MRP_UTIL.MRP_TIMING('BEGIN INSERTING INTO wip flow schedules table');

4019: -- Insert flow schedules from pl/sql table to wip flow schedules table.
4020:
4021: v_current_schedule := v_flow_schedule_tab.FIRST;
4022:
4023: -- MRP_UTIL.MRP_TIMING('BEGIN INSERTING INTO wip flow schedules table');
4024:
4025: WHILE v_current_schedule IS NOT NULL LOOP
4026:
4027: -- MRP_UTIL.MRP_TIMING('Begin insert');

Line 4029: INSERT INTO wip_flow_schedules(

4025: WHILE v_current_schedule IS NOT NULL LOOP
4026:
4027: -- MRP_UTIL.MRP_TIMING('Begin insert');
4028:
4029: INSERT INTO wip_flow_schedules(
4030: scheduled_flag,
4031: wip_entity_id,
4032: organization_id,
4033: last_update_date,

Line 4158: -- MRP_UTIL.MRP_TIMING('End of insert into wip flow schedules.');

4154: v_flow_schedule_tab(v_current_schedule).attribute_category,
4155: v_flow_schedule_tab(v_current_schedule).kanban_card_id
4156:
4157: );
4158: -- MRP_UTIL.MRP_TIMING('End of insert into wip flow schedules.');
4159:
4160: v_current_schedule := v_flow_schedule_tab.NEXT(v_current_schedule);
4161:
4162: END LOOP;

Line 4247: FROM wip_flow_schedules

4243: -- Get the minimum wip_entity_id that having request id
4244:
4245: SELECT MIN(wip_entity_id)
4246: INTO G_WIP_ENTITY_ID
4247: FROM wip_flow_schedules
4248: WHERE line_id = p_line_id
4249: and organization_id = p_org_id
4250: and request_id = USERENV('SESSIONID');
4251:

Line 4291: FROM wip_flow_schedules

4287: -- Sales Orders or Planned Orders
4288:
4289: SELECT demand_source_type
4290: INTO v_source_type
4291: FROM wip_flow_schedules
4292: WHERE request_id = USERENV('SESSIONID')
4293: AND organization_id = p_org_id
4294: AND scheduled_flag = C_NO
4295: AND rownum = 1

Line 4453: FROM wip_flow_schedules

4449: -- Delete all flow schedules which have not been scheduled within the
4450: -- scheduling window.
4451:
4452: DELETE
4453: FROM wip_flow_schedules
4454: WHERE scheduled_flag = C_NO
4455: AND request_id = USERENV('SESSIONID')
4456: AND organization_id = p_org_id
4457: AND wip_entity_id >= G_WIP_ENTITY_ID;

Line 4503: UPDATE wip_flow_schedules

4499: itm_rev => v_rout_rev);
4500:
4501: end if;
4502:
4503: UPDATE wip_flow_schedules
4504: SET bom_revision = v_bom_rev,
4505: bom_revision_date = v_bom_rev_date,
4506: routing_revision = v_rout_rev,
4507: routing_revision_date = v_rout_rev_date