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 714: FROM wip_flow_schedules fs

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

Line 726: FROM wip_flow_schedules fs

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

Line 859: FROM wip_flow_schedules

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

Line 952: FROM wip_flow_schedules fs

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

Line 1000: FROM wip_flow_schedules fs

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

Line 1345: UPDATE wip_flow_schedules

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

Line 1379: INSERT INTO wip_flow_schedules(

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

Line 1504: FROM wip_flow_schedules fs

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

Line 1548: INSERT INTO wip_flow_schedules(

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

Line 1675: FROM wip_flow_schedules fs

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

Line 1686: FROM wip_flow_schedules

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

Line 1771: UPDATE wip_flow_schedules fs

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

Line 1812: UPDATE wip_flow_schedules fs

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

Line 1828: FROM wip_flow_schedules

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

Line 1938: FROM wip_flow_schedules fs

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

Line 2020: from wip_flow_schedules

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

Line 2127: UPDATE wip_flow_schedules

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

Line 2137: from wip_flow_schedules

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

Line 2166: FROM wip_flow_schedules

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

Line 2231: UPDATE wip_flow_schedules

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

Line 2242: from wip_flow_schedules

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

Line 2262: INSERT INTO wip_flow_schedules(

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

Line 2388: FROM wip_flow_schedules fs

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

Line 2996: UPDATE wip_flow_schedules

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

Line 3053: UPDATE wip_flow_schedules

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

Line 3078: INSERT INTO wip_flow_schedules(

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

Line 3204: FROM wip_flow_schedules fs

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

Line 3276: FROM wip_flow_schedules fs

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

Line 3310: UPDATE wip_flow_schedules

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

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

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

Line 3527: UPDATE wip_flow_schedules

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

Line 3567: FROM wip_flow_schedules fs

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

Line 3608: FROM wip_flow_schedules

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

Line 3730: FROM wip_flow_schedules

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

Line 3807: FROM wip_flow_schedules

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

Line 3923: FROM wip_flow_schedules

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

Line 3997: UPDATE wip_flow_schedules

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

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

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

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

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

Line 4028: INSERT INTO wip_flow_schedules(

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

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

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

Line 4246: FROM wip_flow_schedules

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

Line 4290: FROM wip_flow_schedules

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

Line 4452: FROM wip_flow_schedules

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

Line 4502: UPDATE wip_flow_schedules

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