DBA Data[Home] [Help]

APPS.MRP_FLOW_SCHEDULE_UTIL dependencies on WIP_FLOW_SCHEDULES

Line 1602: UPDATE WIP_FLOW_SCHEDULES

1598: --in the UPDATE statement below
1599: l_flow_schedule_rec MRP_Flow_Schedule_PVT.Flow_Schedule_PVT_Rec_Type := Convert_Miss_To_Null (p_flow_schedule_rec);
1600: BEGIN
1601:
1602: UPDATE WIP_FLOW_SCHEDULES
1603: SET ALTERNATE_BOM_DESIGNATOR = l_flow_schedule_rec.alternate_bom_designator
1604: , ALTERNATE_ROUTING_DESIGNATOR = l_flow_schedule_rec.alternate_routing_desig
1605: , ATTRIBUTE1 = l_flow_schedule_rec.attribute1
1606: , ATTRIBUTE10 = l_flow_schedule_rec.attribute10

Line 1704: INSERT INTO WIP_FLOW_SCHEDULES

1700: --in the INSERT statement below
1701: l_flow_schedule_rec MRP_Flow_Schedule_PVT.Flow_Schedule_PVT_Rec_Type := Convert_Miss_To_Null (p_flow_schedule_rec);
1702: BEGIN
1703:
1704: INSERT INTO WIP_FLOW_SCHEDULES
1705: ( ALTERNATE_BOM_DESIGNATOR
1706: , ALTERNATE_ROUTING_DESIGNATOR
1707: , ATTRIBUTE1
1708: , ATTRIBUTE10

Line 1881: DELETE FROM WIP_FLOW_SCHEDULES

1877: )
1878: IS
1879: BEGIN
1880:
1881: DELETE FROM WIP_FLOW_SCHEDULES
1882: WHERE WIP_ENTITY_ID = p_wip_entity_id
1883: ;
1884:
1885: EXCEPTION

Line 2048: FROM WIP_FLOW_SCHEDULES

2044: , l_flow_schedule_rec.task_id
2045: , l_flow_schedule_rec.wip_entity_id
2046: , l_flow_schedule_rec.end_item_unit_number
2047: , l_flow_schedule_rec.quantity_scrapped
2048: FROM WIP_FLOW_SCHEDULES
2049: WHERE WIP_ENTITY_ID = p_wip_entity_id
2050: ;
2051:
2052: RETURN l_flow_schedule_rec;

Line 2221: FROM WIP_FLOW_SCHEDULES

2217: , l_flow_schedule_rec.task_id
2218: , l_flow_schedule_rec.wip_entity_id
2219: , l_flow_schedule_rec.end_item_unit_number
2220: , l_flow_schedule_rec.quantity_scrapped
2221: FROM WIP_FLOW_SCHEDULES
2222: WHERE WIP_ENTITY_ID = p_flow_schedule_rec.wip_entity_id
2223: FOR UPDATE NOWAIT;
2224:
2225: -- Row locked. Compare IN attributes to DB attributes.

Line 3299: UPDATE wip_flow_schedules

3295: BEGIN
3296:
3297: FND_MSG_PUB.Initialize;
3298:
3299: UPDATE wip_flow_schedules
3300: SET planned_quantity = planned_quantity + p_quantity
3301: WHERE wip_entity_id = p_wip_entity_id;
3302:
3303: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 3345: UPDATE wip_flow_schedules

3341: p_quantity IN NUMBER ) IS
3342:
3343: BEGIN
3344:
3345: UPDATE wip_flow_schedules
3346: SET planned_quantity = planned_quantity + p_quantity
3347: WHERE wip_entity_id = p_wip_entity_id;
3348:
3349: EXCEPTION

Line 3376: DELETE FROM WIP_FLOW_SCHEDULES

3372: BEGIN
3373:
3374: FND_MSG_PUB.Initialize;
3375:
3376: DELETE FROM WIP_FLOW_SCHEDULES
3377: WHERE WIP_ENTITY_ID = p_wip_entity_id
3378: AND status = 1
3379: AND nvl(transacted_flag, 'N') = 'N'
3380: AND quantity_completed = 0

Line 3647: ' FROM wip_flow_schedules wfs, mtl_system_items msi ' ||

3643: --fix bug#3170105
3644: /* Bug 3267578: Added not exists from MTL_TRANSACTIONS_INTERFACE */
3645: l_sql_stmt :=
3646: 'SELECT wfs.wip_entity_id, wfs.demand_source_line, msi.replenish_to_order_flag, msi.build_in_wip_flag ' ||
3647: ' FROM wip_flow_schedules wfs, mtl_system_items msi ' ||
3648: ' WHERE wfs.primary_item_id = msi.inventory_item_id '||
3649: ' AND wfs.organization_id = msi.organization_id ' ||
3650: ' AND wfs.organization_id = to_char(:organization_id) ' ||
3651: l_where_clause ||

Line 3694: DELETE FROM wip_flow_schedules

3690: wip_picking_pvt.cancel_allocations(l_wip_entity_id, 4, null, l_return_status, l_msg_data);
3691: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
3692: MRP_UTIL.MRP_LOG(l_msg_data);
3693: ELSE
3694: DELETE FROM wip_flow_schedules
3695: WHERE wip_entity_id = l_wip_entity_id AND organization_id = p_organization_id;
3696:
3697: l_rows_processed := l_rows_processed + 1;
3698:

Line 3902: FROM wip_flow_schedules

3898: CURSOR C1(p_line_id NUMBER, p_item_id NUMBER, p_schedule_group_id NUMBER,
3899: p_to_start_date DATE, p_to_end_date DATE) --fix bug#3170105
3900: IS
3901: SELECT nvl(sum(planned_quantity),0)
3902: FROM wip_flow_schedules
3903: WHERE organization_id = p_organization_id
3904: AND line_id = p_line_id
3905: AND primary_item_id = p_item_id
3906: AND nvl(schedule_group_id,-1) = nvl(p_schedule_group_id,-1)

Line 3917: FROM wip_flow_schedules

3913: p_to_start_date DATE, p_to_end_date DATE) --fix bug#3170105
3914: IS
3915: SELECT wip_entity_id,
3916: planned_quantity
3917: FROM wip_flow_schedules
3918: WHERE organization_id = p_organization_id
3919: AND line_id = p_line_id
3920: AND primary_item_id = p_item_id
3921: AND nvl(schedule_group_id,-1) = nvl(p_schedule_group_id,-1)

Line 3934: FROM wip_flow_schedules

3930: SELECT wip_entity_id,
3931: scheduled_completion_date,
3932: planned_quantity,
3933: quantity_completed
3934: FROM wip_flow_schedules
3935: WHERE organization_id = p_organization_id
3936: AND line_id = p_line_id
3937: AND primary_item_id = p_item_id
3938: AND demand_source_header_id IS NULL

Line 3956: FROM wip_flow_schedules

3952: AND bom.seq_num IS NOT NULL
3953: AND bom.calendar_date between flm_timezone.server_to_calendar(p_to_start_date) --fix bug#3170105
3954: AND flm_timezone.server_to_calendar(p_to_end_date)
3955: AND bom.calendar_date NOT IN (select flm_timezone.server_to_calendar(scheduled_completion_date)
3956: FROM wip_flow_schedules
3957: WHERE organization_id = p_organization_id
3958: AND line_id = p_line_id
3959: AND primary_item_id = p_item_id
3960: AND demand_source_header_id IS NULL

Line 3978: FROM wip_flow_schedules

3974: AND bom.calendar_date BETWEEN flm_timezone.server_to_calendar(p_to_start_date) --fix bug#3170105
3975: AND flm_timezone.server_to_calendar(p_to_end_date)
3976: AND ((bom.seq_num IS NOT NULL) OR
3977: (bom.calendar_date IN (SELECT flm_timezone.server_to_calendar(scheduled_completion_date)
3978: FROM wip_flow_schedules
3979: WHERE organization_id = p_organization_id
3980: AND line_id = p_line_id
3981: AND primary_item_id = p_item_id
3982: AND scheduled_completion_date BETWEEN

Line 3993: FROM wip_flow_schedules

3989: IS
3990: SELECT wip_entity_id,
3991: scheduled_completion_date, --fix bug#3170105
3992: planned_quantity
3993: FROM wip_flow_schedules
3994: WHERE organization_id = p_organization_id
3995: AND line_id = p_line_id
3996: AND primary_item_id = p_item_id
3997: AND build_sequence IS NULL

Line 4012: FROM wip_flow_schedules

4008: IS
4009: SELECT wip_entity_id,
4010: scheduled_completion_date, --fix bug#3170105
4011: planned_quantity
4012: FROM wip_flow_schedules
4013: WHERE organization_id = p_organization_id
4014: AND line_id = p_line_id
4015: AND primary_item_id = p_item_id
4016: AND planned_quantity > 0

Line 4078: FROM wip_flow_schedules

4074: RETURN NUMBER IS
4075: CURSOR Get_Target_Max_Build_Seq(p_line_id NUMBER, p_target_date DATE)
4076: IS
4077: SELECT nvl(max(build_sequence),0)
4078: FROM wip_flow_schedules
4079: WHERE organization_id = p_organization_id
4080: AND line_id = p_line_id
4081: AND build_sequence is NOT NULL
4082: AND (ROLL_FORWARDED_FLAG <> G_INTERMEDIATE_ROLL_FORWARDED OR

Line 4092: FROM wip_flow_schedules

4088: CURSOR Count_Orig_Schedules (p_line_id NUMBER,
4089: p_from_start_date DATE, p_from_end_date DATE) --fix bug#3170105)
4090: IS
4091: SELECT count(*)
4092: FROM wip_flow_schedules
4093: WHERE organization_id = p_organization_id
4094: AND line_id = p_line_id
4095: AND nvl(planned_quantity,0) > nvl(quantity_completed,0)
4096: /** Forward ported bug 3055939 */

Line 4123: FROM wip_flow_schedules

4119: CURSOR Check_Schedule_Roll_Types
4120: (p_line_id NUMBER ,p_scheduled_completion_date DATE)
4121: IS
4122: SELECT count(distinct(nvl(roll_forwarded_flag,-1)))
4123: FROM wip_flow_schedules
4124: WHERE organization_id = p_organization_id
4125: AND line_id = p_line_id
4126: /** Forward ported bug 3055939 */
4127: AND scheduled_completion_date >= flm_timezone.client00_in_server(p_scheduled_completion_date) --fix bug#3170105

Line 4134: FROM wip_flow_schedules

4130: CURSOR Check_Schedule_Distinct_Type
4131: (p_line_id NUMBER ,p_scheduled_completion_date DATE)
4132: IS
4133: SELECT distinct(nvl(roll_forwarded_flag,-1))
4134: FROM wip_flow_schedules
4135: WHERE organization_id = p_organization_id
4136: AND line_id = p_line_id
4137: /** Forward ported bug 3055939 */
4138: AND scheduled_completion_date >= flm_timezone.client00_in_server(p_scheduled_completion_date) --fix bug#3170105

Line 4150: FROM wip_flow_schedules

4146: CURSOR Check_Last_Schedule
4147: (p_line_id NUMBER ,p_scheduled_completion_date DATE)
4148: IS
4149: SELECT MAX(scheduled_completion_date)
4150: FROM wip_flow_schedules
4151: WHERE organization_id = p_organization_id
4152: AND line_id = p_line_id
4153: /** Forward ported bug 3055939 */
4154: AND scheduled_completion_date >= flm_timezone.client00_in_server(p_scheduled_completion_date) --fix bug#3170105

Line 4343: ' wip_flow_schedules fs ' ||

4339: 'SELECT fs.wip_entity_id ' ||
4340: ' FROM wip_lines line, '||
4341: l_cat_table_sql ||
4342: ' mtl_system_items_kfv msi, '||
4343: ' wip_flow_schedules fs ' ||
4344: ' WHERE fs.organization_id = to_char( :organization_id) ' ||
4345: l_where_clause ||
4346: ' AND fs.scheduled_completion_date < flm_timezone.sysdate00_in_server' ||
4347: ' and line.line_id = fs.line_id ' ||

Line 4500: ' wip_flow_schedules fs ' ||

4496: ' sum(nvl(fs.quantity_completed,0)) ' ||
4497: ' FROM wip_lines line, '||
4498: l_cat_table_sql ||
4499: ' mtl_system_items_kfv msi, '||
4500: ' wip_flow_schedules fs ' ||
4501: ' WHERE fs.organization_id = to_char( :organization_id ) ' ||
4502: l_where_clause ||
4503: ' AND (nvl(fs.planned_quantity,0) - nvl(fs.quantity_completed,0)) <> 0 ' ||
4504: ' AND fs.scheduled_completion_date between ' ||

Line 4704: ' wip_flow_schedules fs ' ||

4700: ' fs.WIP_ENTITY_ID '||
4701: ' FROM wip_lines line, '||
4702: l_cat_table_sql ||
4703: ' mtl_system_items_kfv msi, '||
4704: ' wip_flow_schedules fs ' ||
4705: ' WHERE fs.organization_id = to_char(:organization_id) '||
4706: l_where_clause ||
4707: ' AND (nvl(fs.planned_quantity,0) - nvl(fs.quantity_completed,0)) > 0 ' ||
4708: ' AND fs.scheduled_completion_date between ' ||

Line 4854: UPDATE WIP_FLOW_SCHEDULES SET

4850:
4851: l_log_message VARCHAR2(2000);
4852: BEGIN
4853:
4854: UPDATE WIP_FLOW_SCHEDULES SET
4855: status = 2 , date_closed = flm_timezone.sysdate00_in_server --fix bug#3170105
4856: WHERE wip_entity_id = p_wip_entity_id
4857: AND organization_id = p_organization_id;
4858:

Line 4898: UPDATE WIP_FLOW_SCHEDULES SET

4894: fs_report_rec REPORT_REC_TYPE;
4895: l_select VARCHAR2(100);
4896: BEGIN
4897:
4898: UPDATE WIP_FLOW_SCHEDULES SET
4899: status = 2 , date_closed = flm_timezone.sysdate00_in_server --fix bug#3170105
4900: WHERE schedule_number = p_schedule_number
4901: AND organization_id = p_organization_id;
4902:

Line 5038: ' wip_flow_schedules fs ' ||

5034: ' SELECT fs.wip_entity_id ' ||
5035: ' FROM wip_lines line, '||
5036: l_cat_table_sql ||
5037: ' mtl_system_items_kfv msi, '||
5038: ' wip_flow_schedules fs ' ||
5039: ' WHERE fs.organization_id = to_char(:organization_id) ' ||
5040: l_where_clause ||
5041: l_select ||
5042: ' AND fs.scheduled_completion_date between ' ||

Line 5156: wip_flow_schedules fs1

5152: FROM wip_lines wl,
5153: mtl_system_items_kfv kfv,
5154: mtl_categories_kfv cat,
5155: mtl_item_categories mic,
5156: wip_flow_schedules fs1
5157: WHERE wl.line_id = fs1.line_id
5158: AND fs1.demand_source_header_id IS NULL
5159: -- AND nvl(fs1.closed,0) = 0
5160: AND wl.organization_id = fs1.organization_id

Line 5230: wip_flow_schedules fs1

5226: fs1.organization_id
5227: FROM wip_lines wl,
5228: mtl_system_items_kfv kfv,
5229: mtl_item_categories mic,
5230: wip_flow_schedules fs1
5231: WHERE wl.line_id = fs1.line_id
5232: AND fs1.demand_source_header_id IS NULL
5233: -- AND nvl(fs1.closed,0) = 0
5234: AND wl.organization_id = fs1.organization_id

Line 5297: wip_flow_schedules fs1

5293: 0,
5294: fs1.organization_id
5295: FROM wip_lines wl,
5296: mtl_system_items_kfv kfv,
5297: wip_flow_schedules fs1
5298: WHERE wl.line_id = fs1.line_id
5299: AND fs1.demand_source_header_id IS NULL
5300: -- AND nvl(fs1.closed,0) = 0
5301: AND wl.organization_id = fs1.organization_id

Line 5396: wip_flow_schedules fs1

5392: FROM wip_lines wl,
5393: mtl_system_items_kfv kfv,
5394: mtl_categories_kfv cat,
5395: mtl_item_categories mic,
5396: wip_flow_schedules fs1
5397: WHERE wl.line_id = fs1.line_id
5398: AND wl.organization_id = fs1.organization_id
5399: AND wl.line_code
5400: BETWEEN NVL(p_from_line,wl.line_code) AND NVL(p_to_line,wl.line_code)

Line 5464: wip_flow_schedules fs1

5460: NVL(fs1.build_sequence,0)
5461: FROM wip_lines wl,
5462: mtl_system_items_kfv kfv,
5463: mtl_item_categories mic,
5464: wip_flow_schedules fs1
5465: WHERE wl.line_id = fs1.line_id
5466: AND wl.organization_id = fs1.organization_id
5467: AND wl.line_code
5468: BETWEEN NVL(p_from_line,wl.line_code) AND NVL(p_to_line,wl.line_code)

Line 5527: wip_flow_schedules fs1

5523: fs1.organization_id,
5524: NVL(fs1.build_sequence,0)
5525: FROM wip_lines wl,
5526: mtl_system_items_kfv kfv,
5527: wip_flow_schedules fs1
5528: WHERE wl.line_id = fs1.line_id
5529: AND wl.organization_id = fs1.organization_id
5530: AND wl.line_code
5531: BETWEEN NVL(p_from_line,wl.line_code) AND NVL(p_to_line,wl.line_code)

Line 5597: FROM wip_flow_schedules

5593: --mrp form query dates are in client timezone
5594:
5595: CURSOR C2 IS
5596: SELECT planned_quantity
5597: FROM wip_flow_schedules
5598: WHERE line_id = p_line_id
5599: AND primary_item_id = p_item_id
5600: AND organization_id = p_organization_id
5601: AND nvl(schedule_group_id,-1) = nvl(p_schedule_group_id,-1)

Line 5649: FROM wip_flow_schedules fs

5645: 0,
5646: p_quantity,
5647: p_organization_id,
5648: NVL(p_build_sequence,0)
5649: FROM wip_flow_schedules fs
5650: WHERE fs.line_id = p_line_id
5651: AND fs.primary_item_id = p_item_id
5652: AND fs.organization_id = p_organization_id
5653: AND nvl(fs.schedule_group_id,-1) = nvl(p_schedule_group_id,-1)

Line 5720: FROM wip_flow_schedules

5716: AND trunc(date2) = trunc(flm_timezone.server_to_client(p_completion_date)); --fix bug#3170105
5717:
5718: CURSOR C2 IS
5719: SELECT sum(planned_quantity)
5720: FROM wip_flow_schedules
5721: WHERE line_id = p_line_id
5722: AND primary_item_id = p_item_id
5723: AND organization_id = p_organization_id
5724: --3 AND nvl(schedule_group_id,-1) = nvl(p_schedule_group_id,-1)

Line 5770: FROM wip_flow_schedules fs

5766: flm_timezone.server_to_client(p_completion_date), --fix bug#3170105
5767: nvl(sum(planned_quantity),0),
5768: nvl(sum(planned_quantity),0) + p_quantity,
5769: p_organization_id
5770: FROM wip_flow_schedules fs
5771: WHERE fs.line_id = p_line_id
5772: AND fs.primary_item_id = p_item_id
5773: AND fs.organization_id = p_organization_id
5774: --4 AND nvl(fs.schedule_group_id,-1) = nvl(p_schedule_group_id,-1)

Line 5899: FROM wip_flow_schedules

5895: project_id,
5896: project_id,
5897: task_id,
5898: task_id
5899: FROM wip_flow_schedules
5900: WHERE wip_entity_id = p_wip_entity_id
5901: AND planned_quantity > quantity_completed;
5902:
5903: END relieve_rolled_schedules;

Line 6590: UPDATE wip_flow_schedules set roll_forwarded_flag =

6586: END IF;
6587: END IF;
6588:
6589: END LOOP;
6590: UPDATE wip_flow_schedules set roll_forwarded_flag =
6591: G_ROLL_FORWARDED
6592: where roll_forwarded_flag =
6593: G_INTERMEDIATE_ROLL_FORWARDED;
6594: ELSIF p_spread_qty = 2 THEN

Line 6907: FROM wip_flow_schedules

6903: SELECT auto_replenish,
6904: wip_entity_id
6905: INTO l_auto_replenish,
6906: l_wip_entity_id
6907: FROM wip_flow_schedules
6908: WHERE schedule_number = fs_report_rec.schedule_number
6909: AND organization_id = p_organization_id;
6910:
6911: /* Update the auto_replenish flag of new schedules with the old value,

Line 6914: UPDATE wip_flow_schedules

6910:
6911: /* Update the auto_replenish flag of new schedules with the old value,
6912: if auto_replenish is not null for old flow schedule */
6913: IF l_auto_replenish IS NOT NULL THEN
6914: UPDATE wip_flow_schedules
6915: SET auto_replenish = l_auto_replenish
6916: WHERE schedule_number = l_x_flow_schedule_rec.schedule_number
6917: AND organization_id = p_organization_id;
6918:

Line 6983: UPDATE wip_flow_schedules set roll_forwarded_flag =

6979: | forwarded to avoid bumping; |
6980: +-----------------------------------------------------------------*/
6981:
6982: /******************* Commented ********************
6983: UPDATE wip_flow_schedules set roll_forwarded_flag =
6984: G_ROLL_FORWARDED
6985: where roll_forwarded_flag =
6986: G_INTERMEDIATE_ROLL_FORWARDED;
6987: **************************************************/

Line 7000: UPDATE wip_flow_schedules

6996: l_base_number := nvl(l_build_seq_counter(l_index).base_number,0);
6997: l_total_count := nvl(l_build_seq_counter(l_index).current_build_seq,0) - l_base_number;
6998: MRP_UTIL.MRP_LOG('Shift each BUILD_SEQ of existing eligible schedules by '||l_total_count);
6999:
7000: UPDATE wip_flow_schedules
7001: set BUILD_SEQUENCE = BUILD_SEQUENCE + l_total_count
7002: WHERE organization_id = p_organization_id
7003: AND line_id = l_index
7004: AND nvl(planned_quantity,0) > nvl(quantity_completed,0)

Line 7015: UPDATE wip_flow_schedules set

7011: | Update the newly forwarded schedules as ROLL FORWARDED; |
7012: | Deduct the base number from the build_sequence |
7013: +-----------------------------------------------------------------*/
7014:
7015: UPDATE wip_flow_schedules set
7016: roll_forwarded_flag = G_ROLL_FORWARDED,
7017: build_sequence = build_sequence - l_base_number
7018: where roll_forwarded_flag = G_INTERMEDIATE_ROLL_FORWARDED
7019: and line_id = l_index

Line 7037: --on Schedule Number and Org ID and this is done for WIP_FLOW_SCHEDULES

7033: /* Added for project 'Roll Flow Schedules: Maintain Schedule Number'
7034: Logic to swap the new schedule number with old schedule number. */
7035: --First step is to change the schedule number of the rolled FS
7036: --to a temporaryones to avoid violating the unique contraints
7037: --on Schedule Number and Org ID and this is done for WIP_FLOW_SCHEDULES
7038: FORALL i IN 1..l_loop_count
7039: UPDATE wip_flow_schedules
7040: SET schedule_number=('?*?'||oldFSSchNum(i))
7041: WHERE wip_entity_id=oldFSWipId(i)

Line 7039: UPDATE wip_flow_schedules

7035: --First step is to change the schedule number of the rolled FS
7036: --to a temporaryones to avoid violating the unique contraints
7037: --on Schedule Number and Org ID and this is done for WIP_FLOW_SCHEDULES
7038: FORALL i IN 1..l_loop_count
7039: UPDATE wip_flow_schedules
7040: SET schedule_number=('?*?'||oldFSSchNum(i))
7041: WHERE wip_entity_id=oldFSWipId(i)
7042: AND organization_id=p_organization_id;
7043:

Line 7045: --Schedule Number. This is need to be done for WIP_FLOW_SCHEDULES

7041: WHERE wip_entity_id=oldFSWipId(i)
7042: AND organization_id=p_organization_id;
7043:
7044: --Second Step is to Update the New FS created to use the old rolled FS
7045: --Schedule Number. This is need to be done for WIP_FLOW_SCHEDULES
7046: FORALL i IN 1..l_loop_count
7047: UPDATE wip_flow_schedules
7048: SET schedule_number=oldFSSchNum(i)
7049: WHERE wip_entity_id=newFSWipId(i)

Line 7047: UPDATE wip_flow_schedules

7043:
7044: --Second Step is to Update the New FS created to use the old rolled FS
7045: --Schedule Number. This is need to be done for WIP_FLOW_SCHEDULES
7046: FORALL i IN 1..l_loop_count
7047: UPDATE wip_flow_schedules
7048: SET schedule_number=oldFSSchNum(i)
7049: WHERE wip_entity_id=newFSWipId(i)
7050: AND organization_id=p_organization_id;
7051:

Line 7053: --Schedule Number. This is need to be done for WIP_FLOW_SCHEDULES

7049: WHERE wip_entity_id=newFSWipId(i)
7050: AND organization_id=p_organization_id;
7051:
7052: --Third Step is to Update the Old rolled FS to use the Newly created FS
7053: --Schedule Number. This is need to be done for WIP_FLOW_SCHEDULES
7054: FORALL i IN 1..l_loop_count
7055: UPDATE wip_flow_schedules
7056: SET schedule_number=newFSSchNum(i)
7057: WHERE wip_entity_id=oldFSWipId(i)

Line 7055: UPDATE wip_flow_schedules

7051:
7052: --Third Step is to Update the Old rolled FS to use the Newly created FS
7053: --Schedule Number. This is need to be done for WIP_FLOW_SCHEDULES
7054: FORALL i IN 1..l_loop_count
7055: UPDATE wip_flow_schedules
7056: SET schedule_number=newFSSchNum(i)
7057: WHERE wip_entity_id=oldFSWipId(i)
7058: AND organization_id=p_organization_id;
7059:

Line 7119: UPDATE wip_flow_schedules SET status = 2,

7115: IF l_rows > 0 THEN
7116: dbms_sql.column_value(l_cursor, 1, l_flow_schedule_rec.wip_entity_id);
7117: END IF;
7118: EXIT WHEN l_rows = 0;
7119: UPDATE wip_flow_schedules SET status = 2,
7120: date_closed = flm_timezone.sysdate00_in_server --fix bug#3170105
7121: WHERE wip_entity_id = l_flow_schedule_rec.wip_entity_id;
7122: MRP_UTIL.MRP_LOG('Closed Schedule with wip_entity_id:'||to_char(
7123: l_flow_schedule_rec.wip_entity_id));

Line 7497: FROM wip_flow_schedules

7493: IS
7494:
7495: CURSOR C1 IS
7496: SELECT wip_entity_id, schedule_number
7497: FROM wip_flow_schedules
7498: WHERE request_id = USERENV( 'SESSIONID' );
7499:
7500: CURSOR C2 IS
7501: SELECT sum(planned_quantity), demand_source_line

Line 7502: FROM wip_flow_schedules

7498: WHERE request_id = USERENV( 'SESSIONID' );
7499:
7500: CURSOR C2 IS
7501: SELECT sum(planned_quantity), demand_source_line
7502: FROM wip_flow_schedules
7503: WHERE organization_id = p_org_id
7504: AND demand_source_header_id IS NULL
7505: AND request_id = USERENV('SESSIONID')
7506: GROUP BY demand_source_line;

Line 7532: UPDATE wip_flow_schedules

7528: THEN
7529: l_schedule_number_out := NULL;
7530: l_error := WIP_FLOW_DERIVE.schedule_number(l_schedule_number_out);
7531: IF l_error = 1 THEN
7532: UPDATE wip_flow_schedules
7533: SET schedule_number = l_schedule_number_out
7534: WHERE wip_entity_id = l_wip_entity_id;
7535:
7536: UPDATE wip_entities

Line 7559: UPDATE wip_flow_schedules

7555: WHERE transaction_id = l_trans_id;
7556: END LOOP;
7557: CLOSE C2;
7558:
7559: UPDATE wip_flow_schedules
7560: SET request_id = NULL,
7561: scheduled_flag = 1
7562: WHERE request_id = USERENV('SESSIONID');
7563:

Line 7570: FROM wip_flow_schedules

7566: PROCEDURE Explode_New_Items
7567: IS
7568: CURSOR C1 IS
7569: SELECT distinct primary_item_id, organization_id, alternate_bom_designator
7570: FROM wip_flow_schedules
7571: WHERE request_id = USERENV('SESSIONID');
7572:
7573: l_item_id NUMBER;
7574: l_org_id NUMBER;

Line 7888: FROM wip_flow_schedules

7884: (planned_quantity-quantity_completed)),
7885: decode(status,2,quantity_completed,
7886: planned_quantity))),0)
7887: INTO l_lines(l_index).fs_quantity
7888: FROM wip_flow_schedules
7889: WHERE primary_item_id = l_item_id
7890: AND demand_source_line = to_char(l_lines(l_index).line_id)
7891: AND demand_source_type = p_demand_source_type
7892: AND ((demand_source_delivery IS NULL) or

Line 7931: FROM wip_flow_schedules

7927: SELECT nvl(sum(decode(nvl(p_use_open_quantity,'N'),'Y',decode(status,2,0,
7928: (planned_quantity-quantity_completed)),
7929: decode(status,2,quantity_completed,
7930: planned_quantity))),0)
7931: FROM wip_flow_schedules
7932: WHERE ((demand_source_line = p_demand_source_line
7933: AND demand_source_type = p_demand_source_type
7934: AND ((demand_source_delivery IS NULL)or(demand_source_delivery = p_demand_source_delivery))) or (so_consumed_plan_id = p_demand_source_line)/*Added for bugfix:8200872 */);
7935:

Line 8067: from wip_flow_schedules

8063: AND demand_source_line_id = p_line_id
8064: AND ( nvl(p_use_open_quantity,'N') = 'N'
8065: and (supply_source_header_id is NULL
8066: or not exists (select wip_entity_id
8067: from wip_flow_schedules
8068: where wip_entity_id = supply_source_header_id
8069: and demand_source_line = nvl(p_line_id,-1))
8070: )
8071: or nvl(p_use_open_quantity,'N') = 'Y') ; /*Bug 3042045 - do not check supply source for ATO items*/