DBA Data[Home] [Help]

APPS.WIP_MOVE_VALIDATOR dependencies on WIP_CONSTANTS

Line 113: WHERE wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

109: SET wmti.organization_id =
110: (SELECT mp.organization_id
111: FROM mtl_parameters mp
112: WHERE mp.organization_code = wmti.organization_code) --Fix by bug 9220479
113: WHERE wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
114: AND wmti.process_status = WIP_CONSTANTS.PENDING
115: AND wmti.organization_id IS NULL
116: AND wmti.organization_code IS NOT NULL;
117:

Line 114: AND wmti.process_status = WIP_CONSTANTS.PENDING

110: (SELECT mp.organization_id
111: FROM mtl_parameters mp
112: WHERE mp.organization_code = wmti.organization_code) --Fix by bug 9220479
113: WHERE wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
114: AND wmti.process_status = WIP_CONSTANTS.PENDING
115: AND wmti.organization_id IS NULL
116: AND wmti.organization_code IS NOT NULL;
117:
118: -- reset enums table

Line 124: SET wmti.process_status = WIP_CONSTANTS.ERROR

120:
121: -- If cannot derive ORGANIZATION_ID or ORGANIZATION_ID not corresponding to
122: -- ORGANIZATION_CODE provided, error out.
123: UPDATE wip_move_txn_interface wmti
124: SET wmti.process_status = WIP_CONSTANTS.ERROR
125: WHERE wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
126: AND wmti.process_status = WIP_CONSTANTS.PENDING
127: AND ((wmti.organization_id IS NULL) -- cannot derive ORGANIZATION_ID
128: OR

Line 125: WHERE wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

121: -- If cannot derive ORGANIZATION_ID or ORGANIZATION_ID not corresponding to
122: -- ORGANIZATION_CODE provided, error out.
123: UPDATE wip_move_txn_interface wmti
124: SET wmti.process_status = WIP_CONSTANTS.ERROR
125: WHERE wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
126: AND wmti.process_status = WIP_CONSTANTS.PENDING
127: AND ((wmti.organization_id IS NULL) -- cannot derive ORGANIZATION_ID
128: OR
129: (NOT EXISTS

Line 126: AND wmti.process_status = WIP_CONSTANTS.PENDING

122: -- ORGANIZATION_CODE provided, error out.
123: UPDATE wip_move_txn_interface wmti
124: SET wmti.process_status = WIP_CONSTANTS.ERROR
125: WHERE wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
126: AND wmti.process_status = WIP_CONSTANTS.PENDING
127: AND ((wmti.organization_id IS NULL) -- cannot derive ORGANIZATION_ID
128: OR
129: (NOT EXISTS
130: (SELECT 'X'

Line 181: AND entity_type IN (WIP_CONSTANTS.DISCRETE,

177: (SELECT we.wip_entity_id
178: FROM wip_entities we
179: WHERE we.wip_entity_name = wmti.wip_entity_name
180: AND we.organization_id = wmti.organization_id
181: AND entity_type IN (WIP_CONSTANTS.DISCRETE,
182: WIP_CONSTANTS.REPETITIVE,
183: WIP_CONSTANTS.LOTBASED))
184: WHERE wmti.group_id = g_group_id
185: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

Line 182: WIP_CONSTANTS.REPETITIVE,

178: FROM wip_entities we
179: WHERE we.wip_entity_name = wmti.wip_entity_name
180: AND we.organization_id = wmti.organization_id
181: AND entity_type IN (WIP_CONSTANTS.DISCRETE,
182: WIP_CONSTANTS.REPETITIVE,
183: WIP_CONSTANTS.LOTBASED))
184: WHERE wmti.group_id = g_group_id
185: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
186: AND wmti.process_status = WIP_CONSTANTS.RUNNING

Line 183: WIP_CONSTANTS.LOTBASED))

179: WHERE we.wip_entity_name = wmti.wip_entity_name
180: AND we.organization_id = wmti.organization_id
181: AND entity_type IN (WIP_CONSTANTS.DISCRETE,
182: WIP_CONSTANTS.REPETITIVE,
183: WIP_CONSTANTS.LOTBASED))
184: WHERE wmti.group_id = g_group_id
185: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
186: AND wmti.process_status = WIP_CONSTANTS.RUNNING
187: AND wmti.wip_entity_id IS NULL

Line 185: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

181: AND entity_type IN (WIP_CONSTANTS.DISCRETE,
182: WIP_CONSTANTS.REPETITIVE,
183: WIP_CONSTANTS.LOTBASED))
184: WHERE wmti.group_id = g_group_id
185: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
186: AND wmti.process_status = WIP_CONSTANTS.RUNNING
187: AND wmti.wip_entity_id IS NULL
188: AND wmti.wip_entity_name IS NOT NULL;
189:

Line 186: AND wmti.process_status = WIP_CONSTANTS.RUNNING

182: WIP_CONSTANTS.REPETITIVE,
183: WIP_CONSTANTS.LOTBASED))
184: WHERE wmti.group_id = g_group_id
185: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
186: AND wmti.process_status = WIP_CONSTANTS.RUNNING
187: AND wmti.wip_entity_id IS NULL
188: AND wmti.wip_entity_name IS NOT NULL;
189:
190: -- reset enums table

Line 195: SET wmti.process_status = WIP_CONSTANTS.ERROR

191: enums.delete;
192: -- If unable to derive WIP_ENTITY_ID or WIP_ENTITY_ID not conresponding
193: -- to WIP_ENTITY_NAME specified, error out.
194: UPDATE wip_move_txn_interface wmti
195: SET wmti.process_status = WIP_CONSTANTS.ERROR
196: WHERE wmti.group_id = g_group_id
197: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
198: AND wmti.process_status = WIP_CONSTANTS.RUNNING
199: AND ((wmti.wip_entity_id IS NULL) -- cannot derive WIP_ENTITY_ID

Line 197: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

193: -- to WIP_ENTITY_NAME specified, error out.
194: UPDATE wip_move_txn_interface wmti
195: SET wmti.process_status = WIP_CONSTANTS.ERROR
196: WHERE wmti.group_id = g_group_id
197: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
198: AND wmti.process_status = WIP_CONSTANTS.RUNNING
199: AND ((wmti.wip_entity_id IS NULL) -- cannot derive WIP_ENTITY_ID
200: OR
201: (NOT EXISTS

Line 198: AND wmti.process_status = WIP_CONSTANTS.RUNNING

194: UPDATE wip_move_txn_interface wmti
195: SET wmti.process_status = WIP_CONSTANTS.ERROR
196: WHERE wmti.group_id = g_group_id
197: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
198: AND wmti.process_status = WIP_CONSTANTS.RUNNING
199: AND ((wmti.wip_entity_id IS NULL) -- cannot derive WIP_ENTITY_ID
200: OR
201: (NOT EXISTS
202: (SELECT 'X'

Line 208: AND entity_type IN (WIP_CONSTANTS.DISCRETE,

204: WHERE we.wip_entity_name = NVL(wmti.wip_entity_name,
205: we.wip_entity_name)
206: AND we.wip_entity_id = wmti.wip_entity_id
207: AND we.organization_id = wmti.organization_id
208: AND entity_type IN (WIP_CONSTANTS.DISCRETE,
209: WIP_CONSTANTS.REPETITIVE,
210: WIP_CONSTANTS.LOTBASED)
211: )
212: ))

Line 209: WIP_CONSTANTS.REPETITIVE,

205: we.wip_entity_name)
206: AND we.wip_entity_id = wmti.wip_entity_id
207: AND we.organization_id = wmti.organization_id
208: AND entity_type IN (WIP_CONSTANTS.DISCRETE,
209: WIP_CONSTANTS.REPETITIVE,
210: WIP_CONSTANTS.LOTBASED)
211: )
212: ))
213: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 210: WIP_CONSTANTS.LOTBASED)

206: AND we.wip_entity_id = wmti.wip_entity_id
207: AND we.organization_id = wmti.organization_id
208: AND entity_type IN (WIP_CONSTANTS.DISCRETE,
209: WIP_CONSTANTS.REPETITIVE,
210: WIP_CONSTANTS.LOTBASED)
211: )
212: ))
213: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
214:

Line 229: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

225: we.primary_item_id
226: FROM wip_entities we
227: WHERE we.wip_entity_id = wmti.wip_entity_id)
228: WHERE wmti.group_id = g_group_id
229: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
230: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
231:
232: -- reset enums table
233: enums.delete;

Line 230: AND wmti.process_status = WIP_CONSTANTS.RUNNING;

226: FROM wip_entities we
227: WHERE we.wip_entity_id = wmti.wip_entity_id)
228: WHERE wmti.group_id = g_group_id
229: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
230: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
231:
232: -- reset enums table
233: enums.delete;
234: -- If non-standard job and no assembly defined, error out

Line 236: SET wmti.process_status = WIP_CONSTANTS.ERROR

232: -- reset enums table
233: enums.delete;
234: -- If non-standard job and no assembly defined, error out
235: UPDATE wip_move_txn_interface wmti
236: SET wmti.process_status = WIP_CONSTANTS.ERROR
237: WHERE wmti.group_id = g_group_id
238: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
239: AND wmti.process_status = WIP_CONSTANTS.RUNNING
240: AND wmti.primary_item_id IS NULL

Line 238: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

234: -- If non-standard job and no assembly defined, error out
235: UPDATE wip_move_txn_interface wmti
236: SET wmti.process_status = WIP_CONSTANTS.ERROR
237: WHERE wmti.group_id = g_group_id
238: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
239: AND wmti.process_status = WIP_CONSTANTS.RUNNING
240: AND wmti.primary_item_id IS NULL
241: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
242:

Line 239: AND wmti.process_status = WIP_CONSTANTS.RUNNING

235: UPDATE wip_move_txn_interface wmti
236: SET wmti.process_status = WIP_CONSTANTS.ERROR
237: WHERE wmti.group_id = g_group_id
238: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
239: AND wmti.process_status = WIP_CONSTANTS.RUNNING
240: AND wmti.primary_item_id IS NULL
241: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
242:
243: fnd_message.set_name('WIP', 'WIP_NO_ASSY_NO_TXN');

Line 260: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

256: WHERE wl.line_code = wmti.line_code
257: AND wl.organization_id = wmti.organization_id
258: AND NVL(wl.disable_date, SYSDATE) >= SYSDATE)
259: WHERE wmti.group_id = g_group_id
260: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
261: AND wmti.process_status = WIP_CONSTANTS.RUNNING
262: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
263: AND wmti.line_id IS NULL
264: AND wmti.line_code IS NOT NULL;

Line 261: AND wmti.process_status = WIP_CONSTANTS.RUNNING

257: AND wl.organization_id = wmti.organization_id
258: AND NVL(wl.disable_date, SYSDATE) >= SYSDATE)
259: WHERE wmti.group_id = g_group_id
260: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
261: AND wmti.process_status = WIP_CONSTANTS.RUNNING
262: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
263: AND wmti.line_id IS NULL
264: AND wmti.line_code IS NOT NULL;
265:

Line 262: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

258: AND NVL(wl.disable_date, SYSDATE) >= SYSDATE)
259: WHERE wmti.group_id = g_group_id
260: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
261: AND wmti.process_status = WIP_CONSTANTS.RUNNING
262: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
263: AND wmti.line_id IS NULL
264: AND wmti.line_code IS NOT NULL;
265:
266: -- reset enums table

Line 271: SET wmti.process_status = WIP_CONSTANTS.ERROR

267: enums.delete;
268: -- If unable to derive LINE_ID or LINE_ID not conresponding to LINE_CODE
269: -- specified, error out.
270: UPDATE wip_move_txn_interface wmti
271: SET wmti.process_status = WIP_CONSTANTS.ERROR
272: WHERE wmti.group_id = g_group_id
273: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
274: AND wmti.process_status = WIP_CONSTANTS.RUNNING
275: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

Line 273: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

269: -- specified, error out.
270: UPDATE wip_move_txn_interface wmti
271: SET wmti.process_status = WIP_CONSTANTS.ERROR
272: WHERE wmti.group_id = g_group_id
273: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
274: AND wmti.process_status = WIP_CONSTANTS.RUNNING
275: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
276: AND ((wmti.line_id IS NULL)
277: OR

Line 274: AND wmti.process_status = WIP_CONSTANTS.RUNNING

270: UPDATE wip_move_txn_interface wmti
271: SET wmti.process_status = WIP_CONSTANTS.ERROR
272: WHERE wmti.group_id = g_group_id
273: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
274: AND wmti.process_status = WIP_CONSTANTS.RUNNING
275: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
276: AND ((wmti.line_id IS NULL)
277: OR
278: (NOT EXISTS

Line 275: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

271: SET wmti.process_status = WIP_CONSTANTS.ERROR
272: WHERE wmti.group_id = g_group_id
273: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
274: AND wmti.process_status = WIP_CONSTANTS.RUNNING
275: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
276: AND ((wmti.line_id IS NULL)
277: OR
278: (NOT EXISTS
279: (SELECT 'X'

Line 302: AND wrs1.status_type IN (WIP_CONSTANTS.RELEASED,

298: FROM wip_repetitive_schedules wrs1
299: WHERE wrs1.wip_entity_id = wmti.wip_entity_id
300: AND wrs1.organization_id = wmti.organization_id
301: AND wrs1.line_id = wmti.line_id
302: AND wrs1.status_type IN (WIP_CONSTANTS.RELEASED,
303: WIP_CONSTANTS.COMP_CHRG)
304: AND wrs1.first_unit_start_date =
305: (SELECT MIN(wrs2.first_unit_start_date)
306: FROM wip_repetitive_schedules wrs2

Line 303: WIP_CONSTANTS.COMP_CHRG)

299: WHERE wrs1.wip_entity_id = wmti.wip_entity_id
300: AND wrs1.organization_id = wmti.organization_id
301: AND wrs1.line_id = wmti.line_id
302: AND wrs1.status_type IN (WIP_CONSTANTS.RELEASED,
303: WIP_CONSTANTS.COMP_CHRG)
304: AND wrs1.first_unit_start_date =
305: (SELECT MIN(wrs2.first_unit_start_date)
306: FROM wip_repetitive_schedules wrs2
307: WHERE wrs2.wip_entity_id = wmti.wip_entity_id

Line 310: AND wrs2.status_type IN (WIP_CONSTANTS.RELEASED,

306: FROM wip_repetitive_schedules wrs2
307: WHERE wrs2.wip_entity_id = wmti.wip_entity_id
308: AND wrs2.organization_id = wmti.organization_id
309: AND wrs2.line_id = wmti.line_id
310: AND wrs2.status_type IN (WIP_CONSTANTS.RELEASED,
311: WIP_CONSTANTS.COMP_CHRG)))
312: WHERE wmti.group_id = g_group_id
313: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
314: AND wmti.process_status = WIP_CONSTANTS.RUNNING

Line 311: WIP_CONSTANTS.COMP_CHRG)))

307: WHERE wrs2.wip_entity_id = wmti.wip_entity_id
308: AND wrs2.organization_id = wmti.organization_id
309: AND wrs2.line_id = wmti.line_id
310: AND wrs2.status_type IN (WIP_CONSTANTS.RELEASED,
311: WIP_CONSTANTS.COMP_CHRG)))
312: WHERE wmti.group_id = g_group_id
313: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
314: AND wmti.process_status = WIP_CONSTANTS.RUNNING
315: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

Line 313: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

309: AND wrs2.line_id = wmti.line_id
310: AND wrs2.status_type IN (WIP_CONSTANTS.RELEASED,
311: WIP_CONSTANTS.COMP_CHRG)))
312: WHERE wmti.group_id = g_group_id
313: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
314: AND wmti.process_status = WIP_CONSTANTS.RUNNING
315: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
316: AND wmti.repetitive_schedule_id IS NULL;
317:

Line 314: AND wmti.process_status = WIP_CONSTANTS.RUNNING

310: AND wrs2.status_type IN (WIP_CONSTANTS.RELEASED,
311: WIP_CONSTANTS.COMP_CHRG)))
312: WHERE wmti.group_id = g_group_id
313: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
314: AND wmti.process_status = WIP_CONSTANTS.RUNNING
315: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
316: AND wmti.repetitive_schedule_id IS NULL;
317:
318: -- reset enums table

Line 315: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

311: WIP_CONSTANTS.COMP_CHRG)))
312: WHERE wmti.group_id = g_group_id
313: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
314: AND wmti.process_status = WIP_CONSTANTS.RUNNING
315: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
316: AND wmti.repetitive_schedule_id IS NULL;
317:
318: -- reset enums table
319: enums.delete;

Line 323: SET wmti.process_status = WIP_CONSTANTS.ERROR

319: enums.delete;
320: -- By this time, all repetive transaction should have REPETITIVE_SCHEDULE_ID
321: -- Otherwise, error out
322: UPDATE wip_move_txn_interface wmti
323: SET wmti.process_status = WIP_CONSTANTS.ERROR
324: WHERE wmti.group_id = g_group_id
325: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
326: AND wmti.process_status = WIP_CONSTANTS.RUNNING
327: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

Line 325: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

321: -- Otherwise, error out
322: UPDATE wip_move_txn_interface wmti
323: SET wmti.process_status = WIP_CONSTANTS.ERROR
324: WHERE wmti.group_id = g_group_id
325: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
326: AND wmti.process_status = WIP_CONSTANTS.RUNNING
327: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
328: AND wmti.repetitive_schedule_id IS NULL
329: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 326: AND wmti.process_status = WIP_CONSTANTS.RUNNING

322: UPDATE wip_move_txn_interface wmti
323: SET wmti.process_status = WIP_CONSTANTS.ERROR
324: WHERE wmti.group_id = g_group_id
325: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
326: AND wmti.process_status = WIP_CONSTANTS.RUNNING
327: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
328: AND wmti.repetitive_schedule_id IS NULL
329: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
330:

Line 327: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

323: SET wmti.process_status = WIP_CONSTANTS.ERROR
324: WHERE wmti.group_id = g_group_id
325: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
326: AND wmti.process_status = WIP_CONSTANTS.RUNNING
327: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
328: AND wmti.repetitive_schedule_id IS NULL
329: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
330:
331: fnd_message.set_name('WIP', 'WIP_INVALID_LINE');

Line 347: SET wmti.process_status = WIP_CONSTANTS.ERROR

343: -- reset enums table
344: enums.delete;
345: -- For Discrete and Lotbased, user should not provide these 3 values
346: UPDATE wip_move_txn_interface wmti
347: SET wmti.process_status = WIP_CONSTANTS.ERROR
348: WHERE wmti.group_id = g_group_id
349: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
350: AND wmti.process_status = WIP_CONSTANTS.RUNNING
351: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

Line 349: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

345: -- For Discrete and Lotbased, user should not provide these 3 values
346: UPDATE wip_move_txn_interface wmti
347: SET wmti.process_status = WIP_CONSTANTS.ERROR
348: WHERE wmti.group_id = g_group_id
349: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
350: AND wmti.process_status = WIP_CONSTANTS.RUNNING
351: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
352: WIP_CONSTANTS.LOTBASED)
353: AND (wmti.line_id IS NOT NULL OR

Line 350: AND wmti.process_status = WIP_CONSTANTS.RUNNING

346: UPDATE wip_move_txn_interface wmti
347: SET wmti.process_status = WIP_CONSTANTS.ERROR
348: WHERE wmti.group_id = g_group_id
349: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
350: AND wmti.process_status = WIP_CONSTANTS.RUNNING
351: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
352: WIP_CONSTANTS.LOTBASED)
353: AND (wmti.line_id IS NOT NULL OR
354: wmti.line_code IS NOT NULL OR

Line 351: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

347: SET wmti.process_status = WIP_CONSTANTS.ERROR
348: WHERE wmti.group_id = g_group_id
349: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
350: AND wmti.process_status = WIP_CONSTANTS.RUNNING
351: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
352: WIP_CONSTANTS.LOTBASED)
353: AND (wmti.line_id IS NOT NULL OR
354: wmti.line_code IS NOT NULL OR
355: wmti.repetitive_schedule_id IS NOT NULL)

Line 352: WIP_CONSTANTS.LOTBASED)

348: WHERE wmti.group_id = g_group_id
349: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
350: AND wmti.process_status = WIP_CONSTANTS.RUNNING
351: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
352: WIP_CONSTANTS.LOTBASED)
353: AND (wmti.line_id IS NOT NULL OR
354: wmti.line_code IS NOT NULL OR
355: wmti.repetitive_schedule_id IS NOT NULL)
356: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 370: SET wmti.process_status = WIP_CONSTANTS.ERROR

366: -- reset enums table
367: enums.delete;
368: -- Check job status not either Complete or Release, error out.
369: UPDATE wip_move_txn_interface wmti
370: SET wmti.process_status = WIP_CONSTANTS.ERROR
371: WHERE wmti.group_id = g_group_id
372: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
373: AND wmti.process_status = WIP_CONSTANTS.RUNNING
374: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE

Line 372: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

368: -- Check job status not either Complete or Release, error out.
369: UPDATE wip_move_txn_interface wmti
370: SET wmti.process_status = WIP_CONSTANTS.ERROR
371: WHERE wmti.group_id = g_group_id
372: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
373: AND wmti.process_status = WIP_CONSTANTS.RUNNING
374: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE
375: AND NOT EXISTS
376: (SELECT 'X'

Line 373: AND wmti.process_status = WIP_CONSTANTS.RUNNING

369: UPDATE wip_move_txn_interface wmti
370: SET wmti.process_status = WIP_CONSTANTS.ERROR
371: WHERE wmti.group_id = g_group_id
372: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
373: AND wmti.process_status = WIP_CONSTANTS.RUNNING
374: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE
375: AND NOT EXISTS
376: (SELECT 'X'
377: FROM wip_repetitive_schedules wrs

Line 374: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE

370: SET wmti.process_status = WIP_CONSTANTS.ERROR
371: WHERE wmti.group_id = g_group_id
372: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
373: AND wmti.process_status = WIP_CONSTANTS.RUNNING
374: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE
375: AND NOT EXISTS
376: (SELECT 'X'
377: FROM wip_repetitive_schedules wrs
378: WHERE wrs.wip_entity_id = wmti.wip_entity_id

Line 381: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,

377: FROM wip_repetitive_schedules wrs
378: WHERE wrs.wip_entity_id = wmti.wip_entity_id
379: AND wrs.organization_id = wmti.organization_id
380: AND wrs.line_id = wmti.line_id
381: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,
382: WIP_CONSTANTS.COMP_CHRG)))
383: OR
384: (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
385: WIP_CONSTANTS.LOTBASED)

Line 382: WIP_CONSTANTS.COMP_CHRG)))

378: WHERE wrs.wip_entity_id = wmti.wip_entity_id
379: AND wrs.organization_id = wmti.organization_id
380: AND wrs.line_id = wmti.line_id
381: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,
382: WIP_CONSTANTS.COMP_CHRG)))
383: OR
384: (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
385: WIP_CONSTANTS.LOTBASED)
386: AND NOT EXISTS

Line 384: (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

380: AND wrs.line_id = wmti.line_id
381: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,
382: WIP_CONSTANTS.COMP_CHRG)))
383: OR
384: (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
385: WIP_CONSTANTS.LOTBASED)
386: AND NOT EXISTS
387: (SELECT 'X'
388: FROM wip_discrete_jobs wdj

Line 385: WIP_CONSTANTS.LOTBASED)

381: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,
382: WIP_CONSTANTS.COMP_CHRG)))
383: OR
384: (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
385: WIP_CONSTANTS.LOTBASED)
386: AND NOT EXISTS
387: (SELECT 'X'
388: FROM wip_discrete_jobs wdj
389: WHERE wdj.wip_entity_id = wmti.wip_entity_id

Line 391: AND wdj.status_type IN (WIP_CONSTANTS.RELEASED,

387: (SELECT 'X'
388: FROM wip_discrete_jobs wdj
389: WHERE wdj.wip_entity_id = wmti.wip_entity_id
390: AND wdj.organization_id = wmti.organization_id
391: AND wdj.status_type IN (WIP_CONSTANTS.RELEASED,
392: WIP_CONSTANTS.COMP_CHRG))))
393: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
394:
395: fnd_message.set_name('WIP', 'WIP_NO_CHARGES_ALLOWED');

Line 392: WIP_CONSTANTS.COMP_CHRG))))

388: FROM wip_discrete_jobs wdj
389: WHERE wdj.wip_entity_id = wmti.wip_entity_id
390: AND wdj.organization_id = wmti.organization_id
391: AND wdj.status_type IN (WIP_CONSTANTS.RELEASED,
392: WIP_CONSTANTS.COMP_CHRG))))
393: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
394:
395: fnd_message.set_name('WIP', 'WIP_NO_CHARGES_ALLOWED');
396: add_error(p_txn_ids => enums,

Line 404: SET wmti.process_status = WIP_CONSTANTS.ERROR

400: -- reset enums table
401: enums.delete;
402: -- If job/schedule specified has no routing, error out
403: UPDATE wip_move_txn_interface wmti
404: SET wmti.process_status = WIP_CONSTANTS.ERROR
405: WHERE wmti.group_id = g_group_id
406: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
407: AND wmti.process_status = WIP_CONSTANTS.RUNNING
408: AND NOT EXISTS

Line 406: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

402: -- If job/schedule specified has no routing, error out
403: UPDATE wip_move_txn_interface wmti
404: SET wmti.process_status = WIP_CONSTANTS.ERROR
405: WHERE wmti.group_id = g_group_id
406: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
407: AND wmti.process_status = WIP_CONSTANTS.RUNNING
408: AND NOT EXISTS
409: (SELECT 'X'
410: FROM wip_operations wo

Line 407: AND wmti.process_status = WIP_CONSTANTS.RUNNING

403: UPDATE wip_move_txn_interface wmti
404: SET wmti.process_status = WIP_CONSTANTS.ERROR
405: WHERE wmti.group_id = g_group_id
406: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
407: AND wmti.process_status = WIP_CONSTANTS.RUNNING
408: AND NOT EXISTS
409: (SELECT 'X'
410: FROM wip_operations wo
411: WHERE wo.wip_entity_id = wmti.wip_entity_id

Line 436: SET wmti.transaction_type = WIP_CONSTANTS.MOVE_TXN

432: PROCEDURE transaction_type IS
433: BEGIN
434: -- Default TRANSACTION_TYPE to Move if users do not provide one
435: UPDATE wip_move_txn_interface wmti
436: SET wmti.transaction_type = WIP_CONSTANTS.MOVE_TXN
437: WHERE wmti.group_id = g_group_id
438: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
439: AND wmti.process_status = WIP_CONSTANTS.RUNNING
440: AND wmti.transaction_type IS NULL;

Line 438: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

434: -- Default TRANSACTION_TYPE to Move if users do not provide one
435: UPDATE wip_move_txn_interface wmti
436: SET wmti.transaction_type = WIP_CONSTANTS.MOVE_TXN
437: WHERE wmti.group_id = g_group_id
438: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
439: AND wmti.process_status = WIP_CONSTANTS.RUNNING
440: AND wmti.transaction_type IS NULL;
441:
442: -- reset enums table

Line 439: AND wmti.process_status = WIP_CONSTANTS.RUNNING

435: UPDATE wip_move_txn_interface wmti
436: SET wmti.transaction_type = WIP_CONSTANTS.MOVE_TXN
437: WHERE wmti.group_id = g_group_id
438: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
439: AND wmti.process_status = WIP_CONSTANTS.RUNNING
440: AND wmti.transaction_type IS NULL;
441:
442: -- reset enums table
443: enums.delete;

Line 447: SET wmti.process_status = WIP_CONSTANTS.ERROR

443: enums.delete;
444: -- Errot out, if transaction type not either Move or EZ Complete or
445: -- EZ Return
446: UPDATE wip_move_txn_interface wmti
447: SET wmti.process_status = WIP_CONSTANTS.ERROR
448: WHERE wmti.group_id = g_group_id
449: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
450: AND wmti.process_status = WIP_CONSTANTS.RUNNING
451: AND wmti.transaction_type NOT IN (WIP_CONSTANTS.MOVE_TXN,

Line 449: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

445: -- EZ Return
446: UPDATE wip_move_txn_interface wmti
447: SET wmti.process_status = WIP_CONSTANTS.ERROR
448: WHERE wmti.group_id = g_group_id
449: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
450: AND wmti.process_status = WIP_CONSTANTS.RUNNING
451: AND wmti.transaction_type NOT IN (WIP_CONSTANTS.MOVE_TXN,
452: WIP_CONSTANTS.COMP_TXN,
453: WIP_CONSTANTS.RET_TXN)

Line 450: AND wmti.process_status = WIP_CONSTANTS.RUNNING

446: UPDATE wip_move_txn_interface wmti
447: SET wmti.process_status = WIP_CONSTANTS.ERROR
448: WHERE wmti.group_id = g_group_id
449: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
450: AND wmti.process_status = WIP_CONSTANTS.RUNNING
451: AND wmti.transaction_type NOT IN (WIP_CONSTANTS.MOVE_TXN,
452: WIP_CONSTANTS.COMP_TXN,
453: WIP_CONSTANTS.RET_TXN)
454: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 451: AND wmti.transaction_type NOT IN (WIP_CONSTANTS.MOVE_TXN,

447: SET wmti.process_status = WIP_CONSTANTS.ERROR
448: WHERE wmti.group_id = g_group_id
449: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
450: AND wmti.process_status = WIP_CONSTANTS.RUNNING
451: AND wmti.transaction_type NOT IN (WIP_CONSTANTS.MOVE_TXN,
452: WIP_CONSTANTS.COMP_TXN,
453: WIP_CONSTANTS.RET_TXN)
454: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
455:

Line 452: WIP_CONSTANTS.COMP_TXN,

448: WHERE wmti.group_id = g_group_id
449: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
450: AND wmti.process_status = WIP_CONSTANTS.RUNNING
451: AND wmti.transaction_type NOT IN (WIP_CONSTANTS.MOVE_TXN,
452: WIP_CONSTANTS.COMP_TXN,
453: WIP_CONSTANTS.RET_TXN)
454: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
455:
456: fnd_message.set_name('WIP', 'WIP_NOT_VALID');

Line 453: WIP_CONSTANTS.RET_TXN)

449: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
450: AND wmti.process_status = WIP_CONSTANTS.RUNNING
451: AND wmti.transaction_type NOT IN (WIP_CONSTANTS.MOVE_TXN,
452: WIP_CONSTANTS.COMP_TXN,
453: WIP_CONSTANTS.RET_TXN)
454: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
455:
456: fnd_message.set_name('WIP', 'WIP_NOT_VALID');
457: fnd_message.set_token('ENTITY', 'TRANSACTION_TYPE');

Line 468: SET wmti.process_status = WIP_CONSTANTS.ERROR

464: -- Error out if easy completion/return and the assembly is under serial
465: -- control because we cannot gather or derive serial number for background
466: -- txns
467: UPDATE wip_move_txn_interface wmti
468: SET wmti.process_status = WIP_CONSTANTS.ERROR
469: WHERE wmti.group_id = g_group_id
470: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
471: AND wmti.process_status = WIP_CONSTANTS.RUNNING
472: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

Line 470: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

466: -- txns
467: UPDATE wip_move_txn_interface wmti
468: SET wmti.process_status = WIP_CONSTANTS.ERROR
469: WHERE wmti.group_id = g_group_id
470: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
471: AND wmti.process_status = WIP_CONSTANTS.RUNNING
472: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
473: WIP_CONSTANTS.RET_TXN)
474: AND EXISTS

Line 471: AND wmti.process_status = WIP_CONSTANTS.RUNNING

467: UPDATE wip_move_txn_interface wmti
468: SET wmti.process_status = WIP_CONSTANTS.ERROR
469: WHERE wmti.group_id = g_group_id
470: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
471: AND wmti.process_status = WIP_CONSTANTS.RUNNING
472: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
473: WIP_CONSTANTS.RET_TXN)
474: AND EXISTS
475: (SELECT 'X'

Line 472: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

468: SET wmti.process_status = WIP_CONSTANTS.ERROR
469: WHERE wmti.group_id = g_group_id
470: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
471: AND wmti.process_status = WIP_CONSTANTS.RUNNING
472: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
473: WIP_CONSTANTS.RET_TXN)
474: AND EXISTS
475: (SELECT 'X'
476: FROM mtl_system_items msi,

Line 473: WIP_CONSTANTS.RET_TXN)

469: WHERE wmti.group_id = g_group_id
470: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
471: AND wmti.process_status = WIP_CONSTANTS.RUNNING
472: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
473: WIP_CONSTANTS.RET_TXN)
474: AND EXISTS
475: (SELECT 'X'
476: FROM mtl_system_items msi,
477: wip_discrete_jobs wdj

Line 482: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,

478: WHERE wdj.wip_entity_id = wmti.wip_entity_id
479: AND msi.inventory_item_id = wmti.primary_item_id
480: AND msi.organization_id = wmti.organization_id
481: AND wdj.serialization_start_op IS NULL
482: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
483: WIP_CONSTANTS.DYN_RCV_SN))
484: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
485:
486: fnd_message.set_name('WIP', 'WIP_EZ_NO_SERIAL_CONTROL2');

Line 483: WIP_CONSTANTS.DYN_RCV_SN))

479: AND msi.inventory_item_id = wmti.primary_item_id
480: AND msi.organization_id = wmti.organization_id
481: AND wdj.serialization_start_op IS NULL
482: AND msi.serial_number_control_code IN (WIP_CONSTANTS.FULL_SN,
483: WIP_CONSTANTS.DYN_RCV_SN))
484: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
485:
486: fnd_message.set_name('WIP', 'WIP_EZ_NO_SERIAL_CONTROL2');
487: add_error(p_txn_ids => enums,

Line 496: SET wmti.process_status = WIP_CONSTANTS.ERROR

492: enums.delete;
493: -- Error out if easy completion/return and no default completion subinventory
494: -- locator defined for both Discrete and Repetitive Schedule
495: UPDATE wip_move_txn_interface wmti
496: SET wmti.process_status = WIP_CONSTANTS.ERROR
497: WHERE wmti.group_id = g_group_id
498: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
499: AND wmti.process_status = WIP_CONSTANTS.RUNNING
500: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

Line 498: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

494: -- locator defined for both Discrete and Repetitive Schedule
495: UPDATE wip_move_txn_interface wmti
496: SET wmti.process_status = WIP_CONSTANTS.ERROR
497: WHERE wmti.group_id = g_group_id
498: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
499: AND wmti.process_status = WIP_CONSTANTS.RUNNING
500: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
501: WIP_CONSTANTS.RET_TXN)
502: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE

Line 499: AND wmti.process_status = WIP_CONSTANTS.RUNNING

495: UPDATE wip_move_txn_interface wmti
496: SET wmti.process_status = WIP_CONSTANTS.ERROR
497: WHERE wmti.group_id = g_group_id
498: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
499: AND wmti.process_status = WIP_CONSTANTS.RUNNING
500: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
501: WIP_CONSTANTS.RET_TXN)
502: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE
503: AND EXISTS

Line 500: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

496: SET wmti.process_status = WIP_CONSTANTS.ERROR
497: WHERE wmti.group_id = g_group_id
498: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
499: AND wmti.process_status = WIP_CONSTANTS.RUNNING
500: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
501: WIP_CONSTANTS.RET_TXN)
502: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE
503: AND EXISTS
504: (SELECT 'X'

Line 501: WIP_CONSTANTS.RET_TXN)

497: WHERE wmti.group_id = g_group_id
498: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
499: AND wmti.process_status = WIP_CONSTANTS.RUNNING
500: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
501: WIP_CONSTANTS.RET_TXN)
502: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE
503: AND EXISTS
504: (SELECT 'X'
505: FROM wip_repetitive_items wri

Line 502: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE

498: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
499: AND wmti.process_status = WIP_CONSTANTS.RUNNING
500: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
501: WIP_CONSTANTS.RET_TXN)
502: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE
503: AND EXISTS
504: (SELECT 'X'
505: FROM wip_repetitive_items wri
506: WHERE wri.wip_entity_id = wmti.wip_entity_id

Line 511: (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

507: AND wri.organization_id = wmti.organization_id
508: AND wri.line_id = wmti.line_id
509: AND wri.completion_subinventory IS NULL))
510: OR
511: (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
512: WIP_CONSTANTS.LOTBASED)
513: AND EXISTS
514: (SELECT 'X'
515: FROM wip_discrete_jobs wdj

Line 512: WIP_CONSTANTS.LOTBASED)

508: AND wri.line_id = wmti.line_id
509: AND wri.completion_subinventory IS NULL))
510: OR
511: (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
512: WIP_CONSTANTS.LOTBASED)
513: AND EXISTS
514: (SELECT 'X'
515: FROM wip_discrete_jobs wdj
516: WHERE wdj.wip_entity_id = wmti.wip_entity_id

Line 530: SET wmti.process_status = WIP_CONSTANTS.ERROR

526: -- reset enums table
527: enums.delete;
528: -- Error out if item revision does not exist as a BOM revision
529: UPDATE wip_move_txn_interface wmti
530: SET wmti.process_status = WIP_CONSTANTS.ERROR
531: WHERE wmti.group_id = g_group_id
532: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
533: AND wmti.process_status = WIP_CONSTANTS.RUNNING
534: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

Line 532: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

528: -- Error out if item revision does not exist as a BOM revision
529: UPDATE wip_move_txn_interface wmti
530: SET wmti.process_status = WIP_CONSTANTS.ERROR
531: WHERE wmti.group_id = g_group_id
532: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
533: AND wmti.process_status = WIP_CONSTANTS.RUNNING
534: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
535: WIP_CONSTANTS.RET_TXN)
536: AND EXISTS

Line 533: AND wmti.process_status = WIP_CONSTANTS.RUNNING

529: UPDATE wip_move_txn_interface wmti
530: SET wmti.process_status = WIP_CONSTANTS.ERROR
531: WHERE wmti.group_id = g_group_id
532: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
533: AND wmti.process_status = WIP_CONSTANTS.RUNNING
534: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
535: WIP_CONSTANTS.RET_TXN)
536: AND EXISTS
537: (SELECT 'X'

Line 534: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

530: SET wmti.process_status = WIP_CONSTANTS.ERROR
531: WHERE wmti.group_id = g_group_id
532: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
533: AND wmti.process_status = WIP_CONSTANTS.RUNNING
534: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
535: WIP_CONSTANTS.RET_TXN)
536: AND EXISTS
537: (SELECT 'X'
538: FROM mtl_system_items msi

Line 535: WIP_CONSTANTS.RET_TXN)

531: WHERE wmti.group_id = g_group_id
532: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
533: AND wmti.process_status = WIP_CONSTANTS.RUNNING
534: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
535: WIP_CONSTANTS.RET_TXN)
536: AND EXISTS
537: (SELECT 'X'
538: FROM mtl_system_items msi
539: WHERE msi.inventory_item_id = wmti.primary_item_id

Line 542: WIP_CONSTANTS.REVISION_CONTROLLED)

538: FROM mtl_system_items msi
539: WHERE msi.inventory_item_id = wmti.primary_item_id
540: AND msi.organization_id = wmti.organization_id
541: AND msi.revision_qty_control_code =
542: WIP_CONSTANTS.REVISION_CONTROLLED)
543: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE
544: AND NOT EXISTS
545: (SELECT 'X'
546: FROM wip_repetitive_schedules wrs,

Line 543: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE

539: WHERE msi.inventory_item_id = wmti.primary_item_id
540: AND msi.organization_id = wmti.organization_id
541: AND msi.revision_qty_control_code =
542: WIP_CONSTANTS.REVISION_CONTROLLED)
543: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE
544: AND NOT EXISTS
545: (SELECT 'X'
546: FROM wip_repetitive_schedules wrs,
547: mtl_item_revisions mir

Line 556: (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

552: -- Fixed bug 2387630
553: AND (wrs.bom_revision IS NULL OR
554: mir.revision = wrs.bom_revision)))
555: OR
556: (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
557: WIP_CONSTANTS.LOTBASED)
558: AND NOT EXISTS
559: (SELECT 'X'
560: FROM wip_discrete_jobs wdj,

Line 557: WIP_CONSTANTS.LOTBASED)

553: AND (wrs.bom_revision IS NULL OR
554: mir.revision = wrs.bom_revision)))
555: OR
556: (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
557: WIP_CONSTANTS.LOTBASED)
558: AND NOT EXISTS
559: (SELECT 'X'
560: FROM wip_discrete_jobs wdj,
561: mtl_item_revisions mir

Line 581: SET wmti.process_status = WIP_CONSTANTS.ERROR

577: enums.delete;
578: -- Error out if easy completion /return for repetitive schedule
579: -- and the assembly is under lot control
580: UPDATE wip_move_txn_interface wmti
581: SET wmti.process_status = WIP_CONSTANTS.ERROR
582: WHERE wmti.group_id = g_group_id
583: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
584: AND wmti.process_status = WIP_CONSTANTS.RUNNING
585: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

Line 583: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

579: -- and the assembly is under lot control
580: UPDATE wip_move_txn_interface wmti
581: SET wmti.process_status = WIP_CONSTANTS.ERROR
582: WHERE wmti.group_id = g_group_id
583: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
584: AND wmti.process_status = WIP_CONSTANTS.RUNNING
585: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
586: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
587: WIP_CONSTANTS.RET_TXN)

Line 584: AND wmti.process_status = WIP_CONSTANTS.RUNNING

580: UPDATE wip_move_txn_interface wmti
581: SET wmti.process_status = WIP_CONSTANTS.ERROR
582: WHERE wmti.group_id = g_group_id
583: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
584: AND wmti.process_status = WIP_CONSTANTS.RUNNING
585: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
586: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
587: WIP_CONSTANTS.RET_TXN)
588: AND EXISTS

Line 585: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

581: SET wmti.process_status = WIP_CONSTANTS.ERROR
582: WHERE wmti.group_id = g_group_id
583: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
584: AND wmti.process_status = WIP_CONSTANTS.RUNNING
585: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
586: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
587: WIP_CONSTANTS.RET_TXN)
588: AND EXISTS
589: (SELECT 'X'

Line 586: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

582: WHERE wmti.group_id = g_group_id
583: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
584: AND wmti.process_status = WIP_CONSTANTS.RUNNING
585: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
586: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
587: WIP_CONSTANTS.RET_TXN)
588: AND EXISTS
589: (SELECT 'X'
590: FROM mtl_system_items msi

Line 587: WIP_CONSTANTS.RET_TXN)

583: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
584: AND wmti.process_status = WIP_CONSTANTS.RUNNING
585: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
586: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
587: WIP_CONSTANTS.RET_TXN)
588: AND EXISTS
589: (SELECT 'X'
590: FROM mtl_system_items msi
591: WHERE msi.inventory_item_id = wmti.primary_item_id

Line 593: AND msi.lot_control_code = WIP_CONSTANTS.LOT)

589: (SELECT 'X'
590: FROM mtl_system_items msi
591: WHERE msi.inventory_item_id = wmti.primary_item_id
592: AND msi.organization_id = wmti.organization_id
593: AND msi.lot_control_code = WIP_CONSTANTS.LOT)
594: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
595:
596: fnd_message.set_name('WIP', 'WIP_EZ_NO_REP_LOT_CONTROL2');
597: add_error(p_txn_ids => enums,

Line 606: SET wmti.process_status = WIP_CONSTANTS.ERROR

602: enums.delete;
603: -- Error out if easy completion /return for Discrete job and the assembly
604: -- is under lot control and there is no default completion lot defined
605: UPDATE wip_move_txn_interface wmti
606: SET wmti.process_status = WIP_CONSTANTS.ERROR
607: WHERE wmti.group_id = g_group_id
608: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
609: AND wmti.process_status = WIP_CONSTANTS.RUNNING
610: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

Line 608: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

604: -- is under lot control and there is no default completion lot defined
605: UPDATE wip_move_txn_interface wmti
606: SET wmti.process_status = WIP_CONSTANTS.ERROR
607: WHERE wmti.group_id = g_group_id
608: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
609: AND wmti.process_status = WIP_CONSTANTS.RUNNING
610: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
611: WIP_CONSTANTS.LOTBASED)
612: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

Line 609: AND wmti.process_status = WIP_CONSTANTS.RUNNING

605: UPDATE wip_move_txn_interface wmti
606: SET wmti.process_status = WIP_CONSTANTS.ERROR
607: WHERE wmti.group_id = g_group_id
608: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
609: AND wmti.process_status = WIP_CONSTANTS.RUNNING
610: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
611: WIP_CONSTANTS.LOTBASED)
612: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
613: WIP_CONSTANTS.RET_TXN)

Line 610: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

606: SET wmti.process_status = WIP_CONSTANTS.ERROR
607: WHERE wmti.group_id = g_group_id
608: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
609: AND wmti.process_status = WIP_CONSTANTS.RUNNING
610: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
611: WIP_CONSTANTS.LOTBASED)
612: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
613: WIP_CONSTANTS.RET_TXN)
614: AND EXISTS

Line 611: WIP_CONSTANTS.LOTBASED)

607: WHERE wmti.group_id = g_group_id
608: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
609: AND wmti.process_status = WIP_CONSTANTS.RUNNING
610: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
611: WIP_CONSTANTS.LOTBASED)
612: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
613: WIP_CONSTANTS.RET_TXN)
614: AND EXISTS
615: (SELECT 'X'

Line 612: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

608: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
609: AND wmti.process_status = WIP_CONSTANTS.RUNNING
610: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
611: WIP_CONSTANTS.LOTBASED)
612: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
613: WIP_CONSTANTS.RET_TXN)
614: AND EXISTS
615: (SELECT 'X'
616: FROM mtl_system_items msi

Line 613: WIP_CONSTANTS.RET_TXN)

609: AND wmti.process_status = WIP_CONSTANTS.RUNNING
610: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
611: WIP_CONSTANTS.LOTBASED)
612: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
613: WIP_CONSTANTS.RET_TXN)
614: AND EXISTS
615: (SELECT 'X'
616: FROM mtl_system_items msi
617: WHERE msi.inventory_item_id = wmti.primary_item_id

Line 619: AND msi.lot_control_code = WIP_CONSTANTS.LOT)

615: (SELECT 'X'
616: FROM mtl_system_items msi
617: WHERE msi.inventory_item_id = wmti.primary_item_id
618: AND msi.organization_id = wmti.organization_id
619: AND msi.lot_control_code = WIP_CONSTANTS.LOT)
620: AND EXISTS
621: (SELECT 'X'
622: FROM wip_discrete_jobs wdj
623: WHERE wdj.organization_id = wmti.organization_id

Line 638: SET wmti.process_status = WIP_CONSTANTS.ERROR

634: enums.delete;
635: -- Error out if easy completion to the new lot number and and either this
636: -- item or this item category requires "Lot Attributes".
637: UPDATE wip_move_txn_interface wmti
638: SET wmti.process_status = WIP_CONSTANTS.ERROR
639: WHERE wmti.group_id = g_group_id
640: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
641: AND wmti.process_status = WIP_CONSTANTS.RUNNING
642: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

Line 640: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

636: -- item or this item category requires "Lot Attributes".
637: UPDATE wip_move_txn_interface wmti
638: SET wmti.process_status = WIP_CONSTANTS.ERROR
639: WHERE wmti.group_id = g_group_id
640: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
641: AND wmti.process_status = WIP_CONSTANTS.RUNNING
642: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
643: WIP_CONSTANTS.LOTBASED)
644: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

Line 641: AND wmti.process_status = WIP_CONSTANTS.RUNNING

637: UPDATE wip_move_txn_interface wmti
638: SET wmti.process_status = WIP_CONSTANTS.ERROR
639: WHERE wmti.group_id = g_group_id
640: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
641: AND wmti.process_status = WIP_CONSTANTS.RUNNING
642: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
643: WIP_CONSTANTS.LOTBASED)
644: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
645: AND EXISTS -- lot control

Line 642: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

638: SET wmti.process_status = WIP_CONSTANTS.ERROR
639: WHERE wmti.group_id = g_group_id
640: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
641: AND wmti.process_status = WIP_CONSTANTS.RUNNING
642: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
643: WIP_CONSTANTS.LOTBASED)
644: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
645: AND EXISTS -- lot control
646: (SELECT 'X'

Line 643: WIP_CONSTANTS.LOTBASED)

639: WHERE wmti.group_id = g_group_id
640: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
641: AND wmti.process_status = WIP_CONSTANTS.RUNNING
642: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
643: WIP_CONSTANTS.LOTBASED)
644: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
645: AND EXISTS -- lot control
646: (SELECT 'X'
647: FROM mtl_system_items msi

Line 644: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

640: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
641: AND wmti.process_status = WIP_CONSTANTS.RUNNING
642: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
643: WIP_CONSTANTS.LOTBASED)
644: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
645: AND EXISTS -- lot control
646: (SELECT 'X'
647: FROM mtl_system_items msi
648: WHERE msi.inventory_item_id = wmti.primary_item_id

Line 650: AND msi.lot_control_code = WIP_CONSTANTS.LOT)

646: (SELECT 'X'
647: FROM mtl_system_items msi
648: WHERE msi.inventory_item_id = wmti.primary_item_id
649: AND msi.organization_id = wmti.organization_id
650: AND msi.lot_control_code = WIP_CONSTANTS.LOT)
651: -- This is the first time to complete this assembly to this lot number
652: AND NOT EXISTS
653: (SELECT 'X'
654: FROM mtl_lot_numbers mln,

Line 678: SET wmti.process_status = WIP_CONSTANTS.ERROR

674: enums.delete;
675: -- Error out if easy completion to the new lot number and lot expiration date
676: -- was set to user-defined
677: UPDATE wip_move_txn_interface wmti
678: SET wmti.process_status = WIP_CONSTANTS.ERROR
679: WHERE wmti.group_id = g_group_id
680: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
681: AND wmti.process_status = WIP_CONSTANTS.RUNNING
682: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

Line 680: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

676: -- was set to user-defined
677: UPDATE wip_move_txn_interface wmti
678: SET wmti.process_status = WIP_CONSTANTS.ERROR
679: WHERE wmti.group_id = g_group_id
680: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
681: AND wmti.process_status = WIP_CONSTANTS.RUNNING
682: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
683: WIP_CONSTANTS.LOTBASED)
684: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

Line 681: AND wmti.process_status = WIP_CONSTANTS.RUNNING

677: UPDATE wip_move_txn_interface wmti
678: SET wmti.process_status = WIP_CONSTANTS.ERROR
679: WHERE wmti.group_id = g_group_id
680: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
681: AND wmti.process_status = WIP_CONSTANTS.RUNNING
682: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
683: WIP_CONSTANTS.LOTBASED)
684: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
685: AND EXISTS -- lot control and expiration date is user-defined

Line 682: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

678: SET wmti.process_status = WIP_CONSTANTS.ERROR
679: WHERE wmti.group_id = g_group_id
680: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
681: AND wmti.process_status = WIP_CONSTANTS.RUNNING
682: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
683: WIP_CONSTANTS.LOTBASED)
684: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
685: AND EXISTS -- lot control and expiration date is user-defined
686: (SELECT 'X'

Line 683: WIP_CONSTANTS.LOTBASED)

679: WHERE wmti.group_id = g_group_id
680: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
681: AND wmti.process_status = WIP_CONSTANTS.RUNNING
682: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
683: WIP_CONSTANTS.LOTBASED)
684: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
685: AND EXISTS -- lot control and expiration date is user-defined
686: (SELECT 'X'
687: FROM mtl_system_items msi

Line 684: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

680: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
681: AND wmti.process_status = WIP_CONSTANTS.RUNNING
682: AND wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
683: WIP_CONSTANTS.LOTBASED)
684: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
685: AND EXISTS -- lot control and expiration date is user-defined
686: (SELECT 'X'
687: FROM mtl_system_items msi
688: WHERE msi.inventory_item_id = wmti.primary_item_id

Line 690: AND msi.lot_control_code = WIP_CONSTANTS.LOT

686: (SELECT 'X'
687: FROM mtl_system_items msi
688: WHERE msi.inventory_item_id = wmti.primary_item_id
689: AND msi.organization_id = wmti.organization_id
690: AND msi.lot_control_code = WIP_CONSTANTS.LOT
691: AND msi.shelf_life_code = WIP_CONSTANTS.USER_DEFINED_EXP)
692: -- This is the first time to complete this assembly to this lot number
693: AND NOT EXISTS
694: (SELECT 'X'

Line 691: AND msi.shelf_life_code = WIP_CONSTANTS.USER_DEFINED_EXP)

687: FROM mtl_system_items msi
688: WHERE msi.inventory_item_id = wmti.primary_item_id
689: AND msi.organization_id = wmti.organization_id
690: AND msi.lot_control_code = WIP_CONSTANTS.LOT
691: AND msi.shelf_life_code = WIP_CONSTANTS.USER_DEFINED_EXP)
692: -- This is the first time to complete this assembly to this lot number
693: AND NOT EXISTS
694: (SELECT 'X'
695: FROM mtl_lot_numbers mln,

Line 719: SET wmti.process_status = WIP_CONSTANTS.ERROR

715: -- reset enums table
716: enums.delete;
717: -- Error out if TRANSACTION_DATE is the future date
718: UPDATE wip_move_txn_interface wmti
719: SET wmti.process_status = WIP_CONSTANTS.ERROR
720: WHERE wmti.group_id = g_group_id
721: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
722: AND wmti.process_status = WIP_CONSTANTS.RUNNING
723: AND wmti.transaction_date > SYSDATE

Line 721: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

717: -- Error out if TRANSACTION_DATE is the future date
718: UPDATE wip_move_txn_interface wmti
719: SET wmti.process_status = WIP_CONSTANTS.ERROR
720: WHERE wmti.group_id = g_group_id
721: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
722: AND wmti.process_status = WIP_CONSTANTS.RUNNING
723: AND wmti.transaction_date > SYSDATE
724: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
725:

Line 722: AND wmti.process_status = WIP_CONSTANTS.RUNNING

718: UPDATE wip_move_txn_interface wmti
719: SET wmti.process_status = WIP_CONSTANTS.ERROR
720: WHERE wmti.group_id = g_group_id
721: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
722: AND wmti.process_status = WIP_CONSTANTS.RUNNING
723: AND wmti.transaction_date > SYSDATE
724: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
725:
726: fnd_message.set_name('WIP', 'WIP_NO_FORWARD_DATING');

Line 736: SET wmti.process_status = WIP_CONSTANTS.ERROR

732: -- reset enums table
733: enums.delete;
734: -- Error out if TRANSACTION_DATE does not fall in open period
735: UPDATE wip_move_txn_interface wmti
736: SET wmti.process_status = WIP_CONSTANTS.ERROR
737: WHERE wmti.group_id = g_group_id
738: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
739: AND wmti.process_status = WIP_CONSTANTS.RUNNING
740: AND NOT EXISTS

Line 738: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

734: -- Error out if TRANSACTION_DATE does not fall in open period
735: UPDATE wip_move_txn_interface wmti
736: SET wmti.process_status = WIP_CONSTANTS.ERROR
737: WHERE wmti.group_id = g_group_id
738: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
739: AND wmti.process_status = WIP_CONSTANTS.RUNNING
740: AND NOT EXISTS
741: (SELECT 'X'
742: FROM ORG_ACCT_PERIODS OAP

Line 739: AND wmti.process_status = WIP_CONSTANTS.RUNNING

735: UPDATE wip_move_txn_interface wmti
736: SET wmti.process_status = WIP_CONSTANTS.ERROR
737: WHERE wmti.group_id = g_group_id
738: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
739: AND wmti.process_status = WIP_CONSTANTS.RUNNING
740: AND NOT EXISTS
741: (SELECT 'X'
742: FROM ORG_ACCT_PERIODS OAP
743: WHERE OAP.ORGANIZATION_ID = WMTI.ORGANIZATION_ID

Line 764: SET wmti.process_status = WIP_CONSTANTS.ERROR

760: -- reset enums table
761: enums.delete;
762: -- Error out if TRANSACTION_DATE is before released date
763: UPDATE wip_move_txn_interface wmti
764: SET wmti.process_status = WIP_CONSTANTS.ERROR
765: WHERE wmti.group_id = g_group_id
766: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
767: AND wmti.process_status = WIP_CONSTANTS.RUNNING
768: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE

Line 766: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

762: -- Error out if TRANSACTION_DATE is before released date
763: UPDATE wip_move_txn_interface wmti
764: SET wmti.process_status = WIP_CONSTANTS.ERROR
765: WHERE wmti.group_id = g_group_id
766: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
767: AND wmti.process_status = WIP_CONSTANTS.RUNNING
768: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE
769: AND EXISTS
770: (SELECT 'X'

Line 767: AND wmti.process_status = WIP_CONSTANTS.RUNNING

763: UPDATE wip_move_txn_interface wmti
764: SET wmti.process_status = WIP_CONSTANTS.ERROR
765: WHERE wmti.group_id = g_group_id
766: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
767: AND wmti.process_status = WIP_CONSTANTS.RUNNING
768: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE
769: AND EXISTS
770: (SELECT 'X'
771: FROM wip_repetitive_schedules wrs

Line 768: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE

764: SET wmti.process_status = WIP_CONSTANTS.ERROR
765: WHERE wmti.group_id = g_group_id
766: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
767: AND wmti.process_status = WIP_CONSTANTS.RUNNING
768: AND ((wmti.entity_type = WIP_CONSTANTS.REPETITIVE
769: AND EXISTS
770: (SELECT 'X'
771: FROM wip_repetitive_schedules wrs
772: WHERE wrs.repetitive_schedule_id = wmti.repetitive_schedule_id

Line 776: (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

772: WHERE wrs.repetitive_schedule_id = wmti.repetitive_schedule_id
773: AND wrs.organization_id = wmti.organization_id
774: AND wrs.date_released > wmti.transaction_date))
775: OR
776: (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
777: WIP_CONSTANTS.LOTBASED)
778: AND EXISTS
779: (SELECT 'X'
780: FROM wip_discrete_jobs wdj

Line 777: WIP_CONSTANTS.LOTBASED)

773: AND wrs.organization_id = wmti.organization_id
774: AND wrs.date_released > wmti.transaction_date))
775: OR
776: (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
777: WIP_CONSTANTS.LOTBASED)
778: AND EXISTS
779: (SELECT 'X'
780: FROM wip_discrete_jobs wdj
781: WHERE wdj.wip_entity_id = wmti.wip_entity_id

Line 804: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

800: wmti.organization_id -- p_inv_org_id
801: )) BETWEEN
802: oap.period_start_date AND oap.schedule_close_date)
803: WHERE wmti.group_id = g_group_id
804: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
805: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
806:
807: -- reset enums table
808: enums.delete;

Line 805: AND wmti.process_status = WIP_CONSTANTS.RUNNING;

801: )) BETWEEN
802: oap.period_start_date AND oap.schedule_close_date)
803: WHERE wmti.group_id = g_group_id
804: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
805: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
806:
807: -- reset enums table
808: enums.delete;
809: -- Error out if there is no open accout period for the TRANSACTION_DATE

Line 812: SET wmti.process_status = WIP_CONSTANTS.ERROR

808: enums.delete;
809: -- Error out if there is no open accout period for the TRANSACTION_DATE
810: -- specified or there is no WIP_PERIOD_BALANCES
811: UPDATE wip_move_txn_interface wmti
812: SET wmti.process_status = WIP_CONSTANTS.ERROR
813: WHERE wmti.group_id = g_group_id
814: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
815: AND wmti.process_status = WIP_CONSTANTS.RUNNING
816: AND (wmti.acct_period_id IS NULL

Line 814: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

810: -- specified or there is no WIP_PERIOD_BALANCES
811: UPDATE wip_move_txn_interface wmti
812: SET wmti.process_status = WIP_CONSTANTS.ERROR
813: WHERE wmti.group_id = g_group_id
814: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
815: AND wmti.process_status = WIP_CONSTANTS.RUNNING
816: AND (wmti.acct_period_id IS NULL
817: OR
818: NOT EXISTS

Line 815: AND wmti.process_status = WIP_CONSTANTS.RUNNING

811: UPDATE wip_move_txn_interface wmti
812: SET wmti.process_status = WIP_CONSTANTS.ERROR
813: WHERE wmti.group_id = g_group_id
814: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
815: AND wmti.process_status = WIP_CONSTANTS.RUNNING
816: AND (wmti.acct_period_id IS NULL
817: OR
818: NOT EXISTS
819: (SELECT 'X'

Line 824: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

820: FROM wip_period_balances wpb
821: WHERE wpb.acct_period_id = wmti.acct_period_id
822: AND wpb.wip_entity_id = wmti.wip_entity_id
823: AND wpb.organization_id = wmti.organization_id
824: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
825: WIP_CONSTANTS.LOTBASED)
826: OR (wmti.entity_type = WIP_CONSTANTS.REPETITIVE
827: AND repetitive_schedule_id IN
828: (SELECT wrs.repetitive_schedule_id

Line 825: WIP_CONSTANTS.LOTBASED)

821: WHERE wpb.acct_period_id = wmti.acct_period_id
822: AND wpb.wip_entity_id = wmti.wip_entity_id
823: AND wpb.organization_id = wmti.organization_id
824: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
825: WIP_CONSTANTS.LOTBASED)
826: OR (wmti.entity_type = WIP_CONSTANTS.REPETITIVE
827: AND repetitive_schedule_id IN
828: (SELECT wrs.repetitive_schedule_id
829: FROM wip_repetitive_schedules wrs

Line 826: OR (wmti.entity_type = WIP_CONSTANTS.REPETITIVE

822: AND wpb.wip_entity_id = wmti.wip_entity_id
823: AND wpb.organization_id = wmti.organization_id
824: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
825: WIP_CONSTANTS.LOTBASED)
826: OR (wmti.entity_type = WIP_CONSTANTS.REPETITIVE
827: AND repetitive_schedule_id IN
828: (SELECT wrs.repetitive_schedule_id
829: FROM wip_repetitive_schedules wrs
830: WHERE wrs.wip_entity_id = wmti.wip_entity_id

Line 832: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,

828: (SELECT wrs.repetitive_schedule_id
829: FROM wip_repetitive_schedules wrs
830: WHERE wrs.wip_entity_id = wmti.wip_entity_id
831: AND wrs.organization_id = wmti.organization_id
832: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,
833: WIP_CONSTANTS.COMP_CHRG))))))
834: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
835:
836: fnd_message.set_name('WIP', 'WIP_NO_BALANCE');

Line 833: WIP_CONSTANTS.COMP_CHRG))))))

829: FROM wip_repetitive_schedules wrs
830: WHERE wrs.wip_entity_id = wmti.wip_entity_id
831: AND wrs.organization_id = wmti.organization_id
832: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,
833: WIP_CONSTANTS.COMP_CHRG))))))
834: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
835:
836: fnd_message.set_name('WIP', 'WIP_NO_BALANCE');
837: add_error(p_txn_ids => enums,

Line 863: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

859: AND NVL(wo.repetitive_schedule_id, -1) =
860: NVL(wmti.repetitive_schedule_id, -1)
861: AND wo.next_operation_seq_num IS NULL)
862: WHERE wmti.group_id = g_group_id
863: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
864: AND wmti.process_status = WIP_CONSTANTS.RUNNING
865: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
866: AND wmti.fm_operation_seq_num IS NULL;
867:

Line 864: AND wmti.process_status = WIP_CONSTANTS.RUNNING

860: NVL(wmti.repetitive_schedule_id, -1)
861: AND wo.next_operation_seq_num IS NULL)
862: WHERE wmti.group_id = g_group_id
863: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
864: AND wmti.process_status = WIP_CONSTANTS.RUNNING
865: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
866: AND wmti.fm_operation_seq_num IS NULL;
867:
868: -- reset enums table

Line 865: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN

861: AND wo.next_operation_seq_num IS NULL)
862: WHERE wmti.group_id = g_group_id
863: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
864: AND wmti.process_status = WIP_CONSTANTS.RUNNING
865: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
866: AND wmti.fm_operation_seq_num IS NULL;
867:
868: -- reset enums table
869: enums.delete;

Line 873: SET wmti.process_status = WIP_CONSTANTS.ERROR

869: enums.delete;
870: -- Error out if FM_OPERATION_SEQ_NUM is null or FM_OPERATION_SEQ_NUM
871: -- is invalid
872: UPDATE wip_move_txn_interface wmti
873: SET wmti.process_status = WIP_CONSTANTS.ERROR
874: WHERE wmti.group_id = g_group_id
875: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
876: AND wmti.process_status = WIP_CONSTANTS.RUNNING
877: AND (wmti.fm_operation_seq_num IS NULL

Line 875: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

871: -- is invalid
872: UPDATE wip_move_txn_interface wmti
873: SET wmti.process_status = WIP_CONSTANTS.ERROR
874: WHERE wmti.group_id = g_group_id
875: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
876: AND wmti.process_status = WIP_CONSTANTS.RUNNING
877: AND (wmti.fm_operation_seq_num IS NULL
878: OR
879: (NOT EXISTS

Line 876: AND wmti.process_status = WIP_CONSTANTS.RUNNING

872: UPDATE wip_move_txn_interface wmti
873: SET wmti.process_status = WIP_CONSTANTS.ERROR
874: WHERE wmti.group_id = g_group_id
875: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
876: AND wmti.process_status = WIP_CONSTANTS.RUNNING
877: AND (wmti.fm_operation_seq_num IS NULL
878: OR
879: (NOT EXISTS
880: (SELECT 'X'

Line 899: SET wmti.process_status = WIP_CONSTANTS.ERROR

895: enums.delete;
896: -- Error out if TRANSACTION_TYPE is EZ Return and FM_OPERATION_SEQ_NUM
897: -- is not equal to the last operation.
898: UPDATE wip_move_txn_interface wmti
899: SET wmti.process_status = WIP_CONSTANTS.ERROR
900: WHERE wmti.group_id = g_group_id
901: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
902: AND wmti.process_status = WIP_CONSTANTS.RUNNING
903: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN

Line 901: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

897: -- is not equal to the last operation.
898: UPDATE wip_move_txn_interface wmti
899: SET wmti.process_status = WIP_CONSTANTS.ERROR
900: WHERE wmti.group_id = g_group_id
901: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
902: AND wmti.process_status = WIP_CONSTANTS.RUNNING
903: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
904: AND wmti.fm_operation_seq_num <>
905: (SELECT wo.operation_seq_num

Line 902: AND wmti.process_status = WIP_CONSTANTS.RUNNING

898: UPDATE wip_move_txn_interface wmti
899: SET wmti.process_status = WIP_CONSTANTS.ERROR
900: WHERE wmti.group_id = g_group_id
901: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
902: AND wmti.process_status = WIP_CONSTANTS.RUNNING
903: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
904: AND wmti.fm_operation_seq_num <>
905: (SELECT wo.operation_seq_num
906: FROM wip_operations wo

Line 903: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN

899: SET wmti.process_status = WIP_CONSTANTS.ERROR
900: WHERE wmti.group_id = g_group_id
901: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
902: AND wmti.process_status = WIP_CONSTANTS.RUNNING
903: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
904: AND wmti.fm_operation_seq_num <>
905: (SELECT wo.operation_seq_num
906: FROM wip_operations wo
907: WHERE wo.wip_entity_id = wmti.wip_entity_id

Line 932: SET wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE

928: BEGIN
929: -- Set FM_INTRAOPERATION_STEP_TYPE to Tomove if TRANSACTION_TYPE is
930: -- EZ Return and FM_INTRAOPERATION_STEP_TYPE is null
931: UPDATE wip_move_txn_interface wmti
932: SET wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE
933: WHERE wmti.group_id = g_group_id
934: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
935: AND wmti.process_status = WIP_CONSTANTS.RUNNING
936: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN

Line 934: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

930: -- EZ Return and FM_INTRAOPERATION_STEP_TYPE is null
931: UPDATE wip_move_txn_interface wmti
932: SET wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE
933: WHERE wmti.group_id = g_group_id
934: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
935: AND wmti.process_status = WIP_CONSTANTS.RUNNING
936: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
937: AND wmti.fm_intraoperation_step_type IS NULL;
938:

Line 935: AND wmti.process_status = WIP_CONSTANTS.RUNNING

931: UPDATE wip_move_txn_interface wmti
932: SET wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE
933: WHERE wmti.group_id = g_group_id
934: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
935: AND wmti.process_status = WIP_CONSTANTS.RUNNING
936: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
937: AND wmti.fm_intraoperation_step_type IS NULL;
938:
939: -- reset enums table

Line 936: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN

932: SET wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE
933: WHERE wmti.group_id = g_group_id
934: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
935: AND wmti.process_status = WIP_CONSTANTS.RUNNING
936: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
937: AND wmti.fm_intraoperation_step_type IS NULL;
938:
939: -- reset enums table
940: enums.delete;

Line 943: SET wmti.process_status = WIP_CONSTANTS.ERROR

939: -- reset enums table
940: enums.delete;
941: -- Error out if FM_INTRAOPERATION_STEP_TYPE is null or invalid
942: UPDATE wip_move_txn_interface wmti
943: SET wmti.process_status = WIP_CONSTANTS.ERROR
944: WHERE wmti.group_id = g_group_id
945: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
946: AND wmti.process_status = WIP_CONSTANTS.RUNNING
947: AND (wmti.fm_intraoperation_step_type IS NULL

Line 945: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

941: -- Error out if FM_INTRAOPERATION_STEP_TYPE is null or invalid
942: UPDATE wip_move_txn_interface wmti
943: SET wmti.process_status = WIP_CONSTANTS.ERROR
944: WHERE wmti.group_id = g_group_id
945: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
946: AND wmti.process_status = WIP_CONSTANTS.RUNNING
947: AND (wmti.fm_intraoperation_step_type IS NULL
948: OR
949: (NOT EXISTS

Line 946: AND wmti.process_status = WIP_CONSTANTS.RUNNING

942: UPDATE wip_move_txn_interface wmti
943: SET wmti.process_status = WIP_CONSTANTS.ERROR
944: WHERE wmti.group_id = g_group_id
945: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
946: AND wmti.process_status = WIP_CONSTANTS.RUNNING
947: AND (wmti.fm_intraoperation_step_type IS NULL
948: OR
949: (NOT EXISTS
950: (SELECT 'X'

Line 961: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE)

957: AND wo.operation_seq_num = wmti.fm_operation_seq_num
958: AND NVL(wo.repetitive_schedule_id, -1) =
959: NVL(wmti.repetitive_schedule_id, -1)
960: AND ((wvis.record_creator = 'USER' OR
961: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE)
962: OR
963: (wvis.record_creator = 'SYSTEM' AND
964: wo.next_operation_seq_num IS NULL)))))
965: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 978: SET wmti.process_status = WIP_CONSTANTS.ERROR

974: enums.delete;
975: -- Error out if FM_OPERATION_SEQ_NUM/FM_INTRAOPERATION_STEP_TYPE has
976: -- no move shop floor status attached
977: UPDATE wip_move_txn_interface wmti
978: SET wmti.process_status = WIP_CONSTANTS.ERROR
979: WHERE wmti.group_id = g_group_id
980: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
981: AND wmti.process_status = WIP_CONSTANTS.RUNNING
982: AND EXISTS

Line 980: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

976: -- no move shop floor status attached
977: UPDATE wip_move_txn_interface wmti
978: SET wmti.process_status = WIP_CONSTANTS.ERROR
979: WHERE wmti.group_id = g_group_id
980: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
981: AND wmti.process_status = WIP_CONSTANTS.RUNNING
982: AND EXISTS
983: (SELECT 'X'
984: FROM wip_shop_floor_status_codes wsc,

Line 981: AND wmti.process_status = WIP_CONSTANTS.RUNNING

977: UPDATE wip_move_txn_interface wmti
978: SET wmti.process_status = WIP_CONSTANTS.ERROR
979: WHERE wmti.group_id = g_group_id
980: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
981: AND wmti.process_status = WIP_CONSTANTS.RUNNING
982: AND EXISTS
983: (SELECT 'X'
984: FROM wip_shop_floor_status_codes wsc,
985: wip_shop_floor_statuses ws

Line 993: AND wsc.status_move_flag = WIP_CONSTANTS.NO

989: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
990: AND ws.operation_seq_num = wmti.fm_operation_seq_num
991: AND ws.intraoperation_step_type = wmti.fm_intraoperation_step_type
992: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
993: AND wsc.status_move_flag = WIP_CONSTANTS.NO
994: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE
995: AND (wmti.source_code IS NULL OR
996: wmti.source_code <> 'RCV' OR
997: (wmti.source_code = 'RCV' AND

Line 1022: AND wsc.status_move_flag = WIP_CONSTANTS.NO

1018: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
1019: AND ws.operation_seq_num = wmti.fm_operation_seq_num
1020: AND ws.intraoperation_step_type = wmti.fm_intraoperation_step_type
1021: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
1022: AND wsc.status_move_flag = WIP_CONSTANTS.NO
1023: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE
1024: AND rownum = 1;
1025:
1026: fnd_message.set_name('WIP', 'WIP_SF_STATUS_NO_TXN1');

Line 1039: SET wmti.process_status = WIP_CONSTANTS.ERROR

1035: enums.delete;
1036: -- Error out if users try to perform easy completion from Tomove of the
1037: -- last operation
1038: UPDATE wip_move_txn_interface wmti
1039: SET wmti.process_status = WIP_CONSTANTS.ERROR
1040: WHERE wmti.group_id = g_group_id
1041: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1042: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1043: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

Line 1041: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1037: -- last operation
1038: UPDATE wip_move_txn_interface wmti
1039: SET wmti.process_status = WIP_CONSTANTS.ERROR
1040: WHERE wmti.group_id = g_group_id
1041: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1042: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1043: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1044: AND wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1045: AND wmti.fm_operation_seq_num =

Line 1042: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1038: UPDATE wip_move_txn_interface wmti
1039: SET wmti.process_status = WIP_CONSTANTS.ERROR
1040: WHERE wmti.group_id = g_group_id
1041: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1042: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1043: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1044: AND wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1045: AND wmti.fm_operation_seq_num =
1046: (SELECT wo.operation_seq_num

Line 1043: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

1039: SET wmti.process_status = WIP_CONSTANTS.ERROR
1040: WHERE wmti.group_id = g_group_id
1041: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1042: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1043: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1044: AND wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1045: AND wmti.fm_operation_seq_num =
1046: (SELECT wo.operation_seq_num
1047: FROM wip_operations wo

Line 1044: AND wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE

1040: WHERE wmti.group_id = g_group_id
1041: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1042: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1043: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1044: AND wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1045: AND wmti.fm_operation_seq_num =
1046: (SELECT wo.operation_seq_num
1047: FROM wip_operations wo
1048: WHERE wo.wip_entity_id = wmti.wip_entity_id

Line 1065: SET wmti.process_status = WIP_CONSTANTS.ERROR

1061: enums.delete;
1062: -- Error out if TRANSACTION_TYPE is EZ Return and
1063: -- FM_INTRAOPERATION_STEP_TYPE not equal to Tomove
1064: UPDATE wip_move_txn_interface wmti
1065: SET wmti.process_status = WIP_CONSTANTS.ERROR
1066: WHERE wmti.group_id = g_group_id
1067: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1068: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1069: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN

Line 1067: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1063: -- FM_INTRAOPERATION_STEP_TYPE not equal to Tomove
1064: UPDATE wip_move_txn_interface wmti
1065: SET wmti.process_status = WIP_CONSTANTS.ERROR
1066: WHERE wmti.group_id = g_group_id
1067: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1068: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1069: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
1070: AND wmti.fm_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1071: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1068: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1064: UPDATE wip_move_txn_interface wmti
1065: SET wmti.process_status = WIP_CONSTANTS.ERROR
1066: WHERE wmti.group_id = g_group_id
1067: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1068: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1069: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
1070: AND wmti.fm_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1071: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1072:

Line 1069: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN

1065: SET wmti.process_status = WIP_CONSTANTS.ERROR
1066: WHERE wmti.group_id = g_group_id
1067: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1068: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1069: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
1070: AND wmti.fm_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1071: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1072:
1073: fnd_message.set_name('WIP', 'WIP_EZ_FM_LAST_STEP');

Line 1070: AND wmti.fm_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE

1066: WHERE wmti.group_id = g_group_id
1067: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1068: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1069: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
1070: AND wmti.fm_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1071: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1072:
1073: fnd_message.set_name('WIP', 'WIP_EZ_FM_LAST_STEP');
1074: add_error(p_txn_ids => enums,

Line 1098: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1094: AND NVL(wo.repetitive_schedule_id, -1) =
1095: NVL(wmti.repetitive_schedule_id, -1)
1096: AND wo.next_operation_seq_num IS NULL)
1097: WHERE wmti.group_id = g_group_id
1098: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1099: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1100: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1101: AND wmti.to_operation_seq_num IS NULL;
1102:

Line 1099: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1095: NVL(wmti.repetitive_schedule_id, -1)
1096: AND wo.next_operation_seq_num IS NULL)
1097: WHERE wmti.group_id = g_group_id
1098: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1099: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1100: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1101: AND wmti.to_operation_seq_num IS NULL;
1102:
1103: /*Bug 4421485->Even for plain moves we will derive to_operation as

Line 1100: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

1096: AND wo.next_operation_seq_num IS NULL)
1097: WHERE wmti.group_id = g_group_id
1098: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1099: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1100: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1101: AND wmti.to_operation_seq_num IS NULL;
1102:
1103: /*Bug 4421485->Even for plain moves we will derive to_operation as
1104: next count point operation */

Line 1116: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1112: NVL(wmti.repetitive_schedule_id, -1)
1113: AND wo.operation_seq_num > wmti.fm_operation_seq_num
1114: AND wo.count_point_type = 1)
1115: WHERE wmti.group_id = g_group_id
1116: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1117: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1118: AND wmti.transaction_type = WIP_CONSTANTS.MOVE_TXN
1119: AND wmti.to_operation_seq_num IS NULL;
1120:

Line 1117: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1113: AND wo.operation_seq_num > wmti.fm_operation_seq_num
1114: AND wo.count_point_type = 1)
1115: WHERE wmti.group_id = g_group_id
1116: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1117: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1118: AND wmti.transaction_type = WIP_CONSTANTS.MOVE_TXN
1119: AND wmti.to_operation_seq_num IS NULL;
1120:
1121: -- reset enums table

Line 1118: AND wmti.transaction_type = WIP_CONSTANTS.MOVE_TXN

1114: AND wo.count_point_type = 1)
1115: WHERE wmti.group_id = g_group_id
1116: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1117: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1118: AND wmti.transaction_type = WIP_CONSTANTS.MOVE_TXN
1119: AND wmti.to_operation_seq_num IS NULL;
1120:
1121: -- reset enums table
1122: enums.delete;

Line 1126: SET wmti.process_status = WIP_CONSTANTS.ERROR

1122: enums.delete;
1123: -- Error out if TO_OPERATION_SEQ_NUM is null or TO_OPERATION_SEQ_NUM
1124: -- is invalid
1125: UPDATE wip_move_txn_interface wmti
1126: SET wmti.process_status = WIP_CONSTANTS.ERROR
1127: WHERE wmti.group_id = g_group_id
1128: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1129: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1130: AND (wmti.to_operation_seq_num IS NULL

Line 1128: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1124: -- is invalid
1125: UPDATE wip_move_txn_interface wmti
1126: SET wmti.process_status = WIP_CONSTANTS.ERROR
1127: WHERE wmti.group_id = g_group_id
1128: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1129: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1130: AND (wmti.to_operation_seq_num IS NULL
1131: OR
1132: (NOT EXISTS

Line 1129: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1125: UPDATE wip_move_txn_interface wmti
1126: SET wmti.process_status = WIP_CONSTANTS.ERROR
1127: WHERE wmti.group_id = g_group_id
1128: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1129: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1130: AND (wmti.to_operation_seq_num IS NULL
1131: OR
1132: (NOT EXISTS
1133: (SELECT 'X'

Line 1152: SET wmti.process_status = WIP_CONSTANTS.ERROR

1148: enums.delete;
1149: -- Error out if TRANSACTION_TYPE is EZ Ccmplete and TO_OPERATION_SEQ_NUM
1150: -- is not equal to the last operation.
1151: UPDATE wip_move_txn_interface wmti
1152: SET wmti.process_status = WIP_CONSTANTS.ERROR
1153: WHERE wmti.group_id = g_group_id
1154: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1155: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1156: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

Line 1154: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1150: -- is not equal to the last operation.
1151: UPDATE wip_move_txn_interface wmti
1152: SET wmti.process_status = WIP_CONSTANTS.ERROR
1153: WHERE wmti.group_id = g_group_id
1154: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1155: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1156: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1157: AND wmti.to_operation_seq_num <>
1158: (SELECT wo.operation_seq_num

Line 1155: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1151: UPDATE wip_move_txn_interface wmti
1152: SET wmti.process_status = WIP_CONSTANTS.ERROR
1153: WHERE wmti.group_id = g_group_id
1154: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1155: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1156: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1157: AND wmti.to_operation_seq_num <>
1158: (SELECT wo.operation_seq_num
1159: FROM wip_operations wo

Line 1156: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

1152: SET wmti.process_status = WIP_CONSTANTS.ERROR
1153: WHERE wmti.group_id = g_group_id
1154: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1155: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1156: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1157: AND wmti.to_operation_seq_num <>
1158: (SELECT wo.operation_seq_num
1159: FROM wip_operations wo
1160: WHERE wo.wip_entity_id = wmti.wip_entity_id

Line 1187: WIP_CONSTANTS.COMP_TXN,WIP_CONSTANTS.TOMOVE, WIP_CONSTANTS.QUEUE)

1183: UPDATE wip_move_txn_interface wmti
1184: /*Bug Bug 4421485*/
1185: SET wmti.to_intraoperation_step_type =
1186: DECODE(wmti.transaction_type,
1187: WIP_CONSTANTS.COMP_TXN,WIP_CONSTANTS.TOMOVE, WIP_CONSTANTS.QUEUE)
1188: WHERE wmti.group_id = g_group_id
1189: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1190: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1191: /*Bug Bug 4421485*/

Line 1189: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1185: SET wmti.to_intraoperation_step_type =
1186: DECODE(wmti.transaction_type,
1187: WIP_CONSTANTS.COMP_TXN,WIP_CONSTANTS.TOMOVE, WIP_CONSTANTS.QUEUE)
1188: WHERE wmti.group_id = g_group_id
1189: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1190: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1191: /*Bug Bug 4421485*/
1192: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
1193: WIP_CONSTANTS.MOVE_TXN)

Line 1190: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1186: DECODE(wmti.transaction_type,
1187: WIP_CONSTANTS.COMP_TXN,WIP_CONSTANTS.TOMOVE, WIP_CONSTANTS.QUEUE)
1188: WHERE wmti.group_id = g_group_id
1189: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1190: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1191: /*Bug Bug 4421485*/
1192: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
1193: WIP_CONSTANTS.MOVE_TXN)
1194: AND wmti.to_intraoperation_step_type IS NULL;

Line 1192: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,

1188: WHERE wmti.group_id = g_group_id
1189: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1190: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1191: /*Bug Bug 4421485*/
1192: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
1193: WIP_CONSTANTS.MOVE_TXN)
1194: AND wmti.to_intraoperation_step_type IS NULL;
1195:
1196: -- reset enums table

Line 1193: WIP_CONSTANTS.MOVE_TXN)

1189: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1190: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1191: /*Bug Bug 4421485*/
1192: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
1193: WIP_CONSTANTS.MOVE_TXN)
1194: AND wmti.to_intraoperation_step_type IS NULL;
1195:
1196: -- reset enums table
1197: enums.delete;

Line 1200: SET wmti.process_status = WIP_CONSTANTS.ERROR

1196: -- reset enums table
1197: enums.delete;
1198: -- Error out if TO_INTRAOPERATION_STEP_TYPE is null or invalid
1199: UPDATE wip_move_txn_interface wmti
1200: SET wmti.process_status = WIP_CONSTANTS.ERROR
1201: WHERE wmti.group_id = g_group_id
1202: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1203: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1204: AND (wmti.to_intraoperation_step_type IS NULL

Line 1202: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1198: -- Error out if TO_INTRAOPERATION_STEP_TYPE is null or invalid
1199: UPDATE wip_move_txn_interface wmti
1200: SET wmti.process_status = WIP_CONSTANTS.ERROR
1201: WHERE wmti.group_id = g_group_id
1202: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1203: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1204: AND (wmti.to_intraoperation_step_type IS NULL
1205: OR
1206: (NOT EXISTS

Line 1203: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1199: UPDATE wip_move_txn_interface wmti
1200: SET wmti.process_status = WIP_CONSTANTS.ERROR
1201: WHERE wmti.group_id = g_group_id
1202: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1203: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1204: AND (wmti.to_intraoperation_step_type IS NULL
1205: OR
1206: (NOT EXISTS
1207: (SELECT 'X'

Line 1220: AND (((wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

1216: NVL(wmti.repetitive_schedule_id, -1)
1217: -- Fixed bug 5059521. Since OSFM build routing as it goes, we cannot rely on
1218: -- wo.next_operation_seq_num IS NULL to determine that it is the last
1219: -- operation or not.
1220: AND (((wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
1221: WIP_CONSTANTS.REPETITIVE)
1222: OR
1223: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1224: wmti.transaction_type = WIP_CONSTANTS.COMP_TXN))

Line 1221: WIP_CONSTANTS.REPETITIVE)

1217: -- Fixed bug 5059521. Since OSFM build routing as it goes, we cannot rely on
1218: -- wo.next_operation_seq_num IS NULL to determine that it is the last
1219: -- operation or not.
1220: AND (((wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
1221: WIP_CONSTANTS.REPETITIVE)
1222: OR
1223: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1224: wmti.transaction_type = WIP_CONSTANTS.COMP_TXN))
1225: AND

Line 1223: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND

1219: -- operation or not.
1220: AND (((wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
1221: WIP_CONSTANTS.REPETITIVE)
1222: OR
1223: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1224: wmti.transaction_type = WIP_CONSTANTS.COMP_TXN))
1225: AND
1226: ((wvis.record_creator = 'USER' OR
1227: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE)

Line 1224: wmti.transaction_type = WIP_CONSTANTS.COMP_TXN))

1220: AND (((wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
1221: WIP_CONSTANTS.REPETITIVE)
1222: OR
1223: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1224: wmti.transaction_type = WIP_CONSTANTS.COMP_TXN))
1225: AND
1226: ((wvis.record_creator = 'USER' OR
1227: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE)
1228: OR

Line 1227: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE)

1223: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1224: wmti.transaction_type = WIP_CONSTANTS.COMP_TXN))
1225: AND
1226: ((wvis.record_creator = 'USER' OR
1227: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE)
1228: OR
1229: (wvis.record_creator = 'SYSTEM' AND
1230: wo.next_operation_seq_num IS NULL)))
1231: OR

Line 1232: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND

1228: OR
1229: (wvis.record_creator = 'SYSTEM' AND
1230: wo.next_operation_seq_num IS NULL)))
1231: OR
1232: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1233: wmti.transaction_type <> WIP_CONSTANTS.COMP_TXN AND
1234: (wvis.record_creator = 'USER' OR
1235: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE))))))
1236:

Line 1233: wmti.transaction_type <> WIP_CONSTANTS.COMP_TXN AND

1229: (wvis.record_creator = 'SYSTEM' AND
1230: wo.next_operation_seq_num IS NULL)))
1231: OR
1232: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1233: wmti.transaction_type <> WIP_CONSTANTS.COMP_TXN AND
1234: (wvis.record_creator = 'USER' OR
1235: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE))))))
1236:
1237: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1235: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE))))))

1231: OR
1232: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1233: wmti.transaction_type <> WIP_CONSTANTS.COMP_TXN AND
1234: (wvis.record_creator = 'USER' OR
1235: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE))))))
1236:
1237: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1238:
1239: fnd_message.set_name('WIP', 'WIP_NOT_VALID');

Line 1250: SET wmti.process_status = WIP_CONSTANTS.ERROR

1246: enums.delete;
1247: -- Error out if users try to move to the same operation and step as the
1248: -- FM_OPERATION_SEQ_NUM and FM_INTRAOPERATION_STEP_TYPE
1249: UPDATE wip_move_txn_interface wmti
1250: SET wmti.process_status = WIP_CONSTANTS.ERROR
1251: WHERE wmti.group_id = g_group_id
1252: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1253: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1254: AND wmti.fm_operation_seq_num = wmti.to_operation_seq_num

Line 1252: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1248: -- FM_OPERATION_SEQ_NUM and FM_INTRAOPERATION_STEP_TYPE
1249: UPDATE wip_move_txn_interface wmti
1250: SET wmti.process_status = WIP_CONSTANTS.ERROR
1251: WHERE wmti.group_id = g_group_id
1252: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1253: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1254: AND wmti.fm_operation_seq_num = wmti.to_operation_seq_num
1255: AND wmti.fm_intraoperation_step_type = wmti.to_intraoperation_step_type
1256: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1253: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1249: UPDATE wip_move_txn_interface wmti
1250: SET wmti.process_status = WIP_CONSTANTS.ERROR
1251: WHERE wmti.group_id = g_group_id
1252: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1253: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1254: AND wmti.fm_operation_seq_num = wmti.to_operation_seq_num
1255: AND wmti.fm_intraoperation_step_type = wmti.to_intraoperation_step_type
1256: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1257:

Line 1268: SET wmti.process_status = WIP_CONSTANTS.ERROR

1264: enums.delete;
1265: -- Error out if TRANSACTION_TYPE is EZ Complete and
1266: -- TO_INTRAOPERATION_STEP_TYPE not equal to Tomove
1267: UPDATE wip_move_txn_interface wmti
1268: SET wmti.process_status = WIP_CONSTANTS.ERROR
1269: WHERE wmti.group_id = g_group_id
1270: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1271: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1272: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

Line 1270: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1266: -- TO_INTRAOPERATION_STEP_TYPE not equal to Tomove
1267: UPDATE wip_move_txn_interface wmti
1268: SET wmti.process_status = WIP_CONSTANTS.ERROR
1269: WHERE wmti.group_id = g_group_id
1270: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1271: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1272: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1273: AND wmti.to_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1274: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1271: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1267: UPDATE wip_move_txn_interface wmti
1268: SET wmti.process_status = WIP_CONSTANTS.ERROR
1269: WHERE wmti.group_id = g_group_id
1270: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1271: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1272: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1273: AND wmti.to_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1274: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1275:

Line 1272: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

1268: SET wmti.process_status = WIP_CONSTANTS.ERROR
1269: WHERE wmti.group_id = g_group_id
1270: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1271: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1272: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1273: AND wmti.to_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1274: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1275:
1276: fnd_message.set_name('WIP', 'WIP_EZ_TO_LAST_STEP');

Line 1273: AND wmti.to_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE

1269: WHERE wmti.group_id = g_group_id
1270: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1271: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1272: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1273: AND wmti.to_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1274: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1275:
1276: fnd_message.set_name('WIP', 'WIP_EZ_TO_LAST_STEP');
1277: add_error(p_txn_ids => enums,

Line 1286: SET wmti.process_status = WIP_CONSTANTS.ERROR

1282: enums.delete;
1283: -- Error out if user try to easy complete job/schedule that has No Move shop
1284: -- floor status attached to Tomove of the last operation
1285: UPDATE wip_move_txn_interface wmti
1286: SET wmti.process_status = WIP_CONSTANTS.ERROR
1287: WHERE wmti.group_id = g_group_id
1288: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1289: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1290: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

Line 1288: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1284: -- floor status attached to Tomove of the last operation
1285: UPDATE wip_move_txn_interface wmti
1286: SET wmti.process_status = WIP_CONSTANTS.ERROR
1287: WHERE wmti.group_id = g_group_id
1288: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1289: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1290: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1291: AND EXISTS
1292: (SELECT 'X'

Line 1289: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1285: UPDATE wip_move_txn_interface wmti
1286: SET wmti.process_status = WIP_CONSTANTS.ERROR
1287: WHERE wmti.group_id = g_group_id
1288: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1289: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1290: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1291: AND EXISTS
1292: (SELECT 'X'
1293: FROM wip_shop_floor_status_codes wsc,

Line 1290: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

1286: SET wmti.process_status = WIP_CONSTANTS.ERROR
1287: WHERE wmti.group_id = g_group_id
1288: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1289: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1290: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1291: AND EXISTS
1292: (SELECT 'X'
1293: FROM wip_shop_floor_status_codes wsc,
1294: wip_shop_floor_statuses ws

Line 1300: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE

1296: AND ws.organization_id = wmti.organization_id
1297: AND ws.wip_entity_id = wmti.wip_entity_id
1298: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
1299: AND ws.operation_seq_num = wmti.to_operation_seq_num
1300: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1301: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
1302: AND wsc.status_move_flag = WIP_CONSTANTS.NO
1303: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE)
1304: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1302: AND wsc.status_move_flag = WIP_CONSTANTS.NO

1298: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
1299: AND ws.operation_seq_num = wmti.to_operation_seq_num
1300: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1301: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
1302: AND wsc.status_move_flag = WIP_CONSTANTS.NO
1303: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE)
1304: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1305:
1306: /* Added the following for SUN enhancement in Bug 9758848*/

Line 1320: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE

1316: AND ws.wip_entity_id = wmti.wip_entity_id
1317: AND wmti.transaction_id = enums(i)
1318: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
1319: AND ws.operation_seq_num = wmti.to_operation_seq_num
1320: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1321: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
1322: AND wsc.status_move_flag = WIP_CONSTANTS.NO
1323: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE
1324: and rownum = 1;

Line 1322: AND wsc.status_move_flag = WIP_CONSTANTS.NO

1318: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
1319: AND ws.operation_seq_num = wmti.to_operation_seq_num
1320: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1321: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
1322: AND wsc.status_move_flag = WIP_CONSTANTS.NO
1323: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE
1324: and rownum = 1;
1325:
1326: fnd_message.set_name('WIP', 'WIP_SF_STATUS_NO_TXN2');

Line 1339: SET wmti.process_status = WIP_CONSTANTS.ERROR

1335: enums.delete;
1336: -- Error out if wip_parameter do not allow move over no_move shop floor
1337: -- status, and there are no_move status in between
1338: UPDATE wip_move_txn_interface wmti
1339: SET wmti.process_status = WIP_CONSTANTS.ERROR
1340: WHERE wmti.group_id = g_group_id
1341: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1342: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1343: AND wip_sf_status.count_no_move_statuses(

Line 1341: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1337: -- status, and there are no_move status in between
1338: UPDATE wip_move_txn_interface wmti
1339: SET wmti.process_status = WIP_CONSTANTS.ERROR
1340: WHERE wmti.group_id = g_group_id
1341: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1342: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1343: AND wip_sf_status.count_no_move_statuses(
1344: wmti.organization_id, -- p_org_id
1345: wmti.wip_entity_id, -- p_wip_id

Line 1342: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1338: UPDATE wip_move_txn_interface wmti
1339: SET wmti.process_status = WIP_CONSTANTS.ERROR
1340: WHERE wmti.group_id = g_group_id
1341: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1342: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1343: AND wip_sf_status.count_no_move_statuses(
1344: wmti.organization_id, -- p_org_id
1345: wmti.wip_entity_id, -- p_wip_id
1346: wmti.line_id, -- p_line_id

Line 1372: and wmti.process_status = WIP_CONSTANTS.ERROR;

1368: wmti.source_code)
1369: into l_sf_status
1370: from wip_move_txn_interface wmti
1371: where wmti.transaction_id = enums(i)
1372: and wmti.process_status = WIP_CONSTANTS.ERROR;
1373: fnd_message.set_name ('WIP', 'WIP_NO_MOVE_STATUS_BETWEEN');
1374: fnd_message.set_token('SF_STATUS', to_char(l_sf_status));
1375: add_error(p_txn_id => enums(i),
1376: p_err_col => 'TO_INTRAOPERATION_STEP_TYPE',

Line 1390: SET wmti.process_status = WIP_CONSTANTS.ERROR

1386: enums.delete;
1387:
1388: -- Error out if TRANSACTION_QUANTITY is negative or zero
1389: UPDATE wip_move_txn_interface wmti
1390: SET wmti.process_status = WIP_CONSTANTS.ERROR
1391: WHERE wmti.group_id = g_group_id
1392: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1393: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1394: AND wmti.transaction_quantity <= 0

Line 1392: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1388: -- Error out if TRANSACTION_QUANTITY is negative or zero
1389: UPDATE wip_move_txn_interface wmti
1390: SET wmti.process_status = WIP_CONSTANTS.ERROR
1391: WHERE wmti.group_id = g_group_id
1392: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1393: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1394: AND wmti.transaction_quantity <= 0
1395: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1396:

Line 1393: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1389: UPDATE wip_move_txn_interface wmti
1390: SET wmti.process_status = WIP_CONSTANTS.ERROR
1391: WHERE wmti.group_id = g_group_id
1392: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1393: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1394: AND wmti.transaction_quantity <= 0
1395: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1396:
1397: fnd_message.set_name('MFG', 'MFG_GREATER_THAN');

Line 1414: SET wmti.process_status = WIP_CONSTANTS.ERROR

1410: -- reset enums table
1411: enums.delete;
1412: -- Error out if TRANSACTION_UOM is invalid
1413: UPDATE wip_move_txn_interface wmti
1414: SET wmti.process_status = WIP_CONSTANTS.ERROR
1415: WHERE wmti.group_id = g_group_id
1416: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1417: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1418: AND NOT EXISTS

Line 1416: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1412: -- Error out if TRANSACTION_UOM is invalid
1413: UPDATE wip_move_txn_interface wmti
1414: SET wmti.process_status = WIP_CONSTANTS.ERROR
1415: WHERE wmti.group_id = g_group_id
1416: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1417: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1418: AND NOT EXISTS
1419: (SELECT 'X'
1420: FROM mtl_item_uoms_view miuv

Line 1417: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1413: UPDATE wip_move_txn_interface wmti
1414: SET wmti.process_status = WIP_CONSTANTS.ERROR
1415: WHERE wmti.group_id = g_group_id
1416: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1417: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1418: AND NOT EXISTS
1419: (SELECT 'X'
1420: FROM mtl_item_uoms_view miuv
1421: WHERE miuv.organization_id = wmti.organization_id

Line 1446: SET wmti.process_status = WIP_CONSTANTS.ERROR

1442: enums.delete;
1443:
1444: -- Error out if OVERCOMPLETION_TRANSACTION_QTY is negative or zero
1445: UPDATE wip_move_txn_interface wmti
1446: SET wmti.process_status = WIP_CONSTANTS.ERROR
1447: WHERE wmti.group_id = g_group_id
1448: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1449: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1450: AND wmti.overcompletion_transaction_qty IS NOT NULL

Line 1448: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1444: -- Error out if OVERCOMPLETION_TRANSACTION_QTY is negative or zero
1445: UPDATE wip_move_txn_interface wmti
1446: SET wmti.process_status = WIP_CONSTANTS.ERROR
1447: WHERE wmti.group_id = g_group_id
1448: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1449: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1450: AND wmti.overcompletion_transaction_qty IS NOT NULL
1451: AND wmti.overcompletion_transaction_qty <= 0
1452: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1449: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1445: UPDATE wip_move_txn_interface wmti
1446: SET wmti.process_status = WIP_CONSTANTS.ERROR
1447: WHERE wmti.group_id = g_group_id
1448: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1449: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1450: AND wmti.overcompletion_transaction_qty IS NOT NULL
1451: AND wmti.overcompletion_transaction_qty <= 0
1452: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1453:

Line 1466: SET wmti.process_status = WIP_CONSTANTS.ERROR

1462: enums.delete;
1463: -- Error out if OVERCOMPLETION_TRANSACTION_QTY is greater than
1464: -- TRANSACTION_QUANTITY
1465: UPDATE wip_move_txn_interface wmti
1466: SET wmti.process_status = WIP_CONSTANTS.ERROR
1467: WHERE wmti.group_id = g_group_id
1468: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1469: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1470: AND wmti.overcompletion_transaction_qty IS NOT NULL

Line 1468: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1464: -- TRANSACTION_QUANTITY
1465: UPDATE wip_move_txn_interface wmti
1466: SET wmti.process_status = WIP_CONSTANTS.ERROR
1467: WHERE wmti.group_id = g_group_id
1468: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1469: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1470: AND wmti.overcompletion_transaction_qty IS NOT NULL
1471: AND wmti.overcompletion_transaction_qty > wmti.transaction_quantity
1472: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1469: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1465: UPDATE wip_move_txn_interface wmti
1466: SET wmti.process_status = WIP_CONSTANTS.ERROR
1467: WHERE wmti.group_id = g_group_id
1468: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1469: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1470: AND wmti.overcompletion_transaction_qty IS NOT NULL
1471: AND wmti.overcompletion_transaction_qty > wmti.transaction_quantity
1472: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1473:

Line 1485: SET wmti.process_status = WIP_CONSTANTS.ERROR

1481: -- reset enums table
1482: enums.delete;
1483: -- Error out if user try to do over Return
1484: UPDATE wip_move_txn_interface wmti
1485: SET wmti.process_status = WIP_CONSTANTS.ERROR
1486: WHERE wmti.group_id = g_group_id
1487: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1488: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1489: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN

Line 1487: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1483: -- Error out if user try to do over Return
1484: UPDATE wip_move_txn_interface wmti
1485: SET wmti.process_status = WIP_CONSTANTS.ERROR
1486: WHERE wmti.group_id = g_group_id
1487: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1488: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1489: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
1490: AND wmti.overcompletion_transaction_qty IS NOT NULL
1491: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1488: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1484: UPDATE wip_move_txn_interface wmti
1485: SET wmti.process_status = WIP_CONSTANTS.ERROR
1486: WHERE wmti.group_id = g_group_id
1487: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1488: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1489: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
1490: AND wmti.overcompletion_transaction_qty IS NOT NULL
1491: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1492:

Line 1489: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN

1485: SET wmti.process_status = WIP_CONSTANTS.ERROR
1486: WHERE wmti.group_id = g_group_id
1487: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1488: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1489: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
1490: AND wmti.overcompletion_transaction_qty IS NOT NULL
1491: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1492:
1493: fnd_message.set_name('WIP', 'WIP_NO_OC_RET');

Line 1502: SET wmti.process_status = WIP_CONSTANTS.ERROR

1498: -- reset enums table
1499: enums.delete;
1500: -- Error out if user try to do over Return from Scrap/Return from Reject
1501: UPDATE wip_move_txn_interface wmti
1502: SET wmti.process_status = WIP_CONSTANTS.ERROR
1503: WHERE wmti.group_id = g_group_id
1504: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1505: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1506: AND wmti.fm_intraoperation_step_type IN (WIP_CONSTANTS.SCRAP,

Line 1504: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1500: -- Error out if user try to do over Return from Scrap/Return from Reject
1501: UPDATE wip_move_txn_interface wmti
1502: SET wmti.process_status = WIP_CONSTANTS.ERROR
1503: WHERE wmti.group_id = g_group_id
1504: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1505: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1506: AND wmti.fm_intraoperation_step_type IN (WIP_CONSTANTS.SCRAP,
1507: WIP_CONSTANTS.REJECT)
1508: AND wmti.overcompletion_transaction_qty IS NOT NULL

Line 1505: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1501: UPDATE wip_move_txn_interface wmti
1502: SET wmti.process_status = WIP_CONSTANTS.ERROR
1503: WHERE wmti.group_id = g_group_id
1504: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1505: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1506: AND wmti.fm_intraoperation_step_type IN (WIP_CONSTANTS.SCRAP,
1507: WIP_CONSTANTS.REJECT)
1508: AND wmti.overcompletion_transaction_qty IS NOT NULL
1509: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1506: AND wmti.fm_intraoperation_step_type IN (WIP_CONSTANTS.SCRAP,

1502: SET wmti.process_status = WIP_CONSTANTS.ERROR
1503: WHERE wmti.group_id = g_group_id
1504: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1505: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1506: AND wmti.fm_intraoperation_step_type IN (WIP_CONSTANTS.SCRAP,
1507: WIP_CONSTANTS.REJECT)
1508: AND wmti.overcompletion_transaction_qty IS NOT NULL
1509: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1510:

Line 1507: WIP_CONSTANTS.REJECT)

1503: WHERE wmti.group_id = g_group_id
1504: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1505: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1506: AND wmti.fm_intraoperation_step_type IN (WIP_CONSTANTS.SCRAP,
1507: WIP_CONSTANTS.REJECT)
1508: AND wmti.overcompletion_transaction_qty IS NOT NULL
1509: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1510:
1511: fnd_message.set_name('WIP', 'WIP_NO_OC_SCR_REJ');

Line 1521: SET wmti.process_status = WIP_CONSTANTS.ERROR

1517: enums.delete;
1518: -- Error out if OVERCOMPLETION_TRANSACTION_QTY is specified for backward
1519: -- move txns
1520: UPDATE wip_move_txn_interface wmti
1521: SET wmti.process_status = WIP_CONSTANTS.ERROR
1522: WHERE wmti.group_id = g_group_id
1523: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1524: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1525: AND (wmti.to_operation_seq_num < wmti.fm_operation_seq_num OR

Line 1523: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1519: -- move txns
1520: UPDATE wip_move_txn_interface wmti
1521: SET wmti.process_status = WIP_CONSTANTS.ERROR
1522: WHERE wmti.group_id = g_group_id
1523: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1524: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1525: AND (wmti.to_operation_seq_num < wmti.fm_operation_seq_num OR
1526: (wmti.to_operation_seq_num = wmti.fm_operation_seq_num AND
1527: wmti.to_intraoperation_step_type <

Line 1524: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1520: UPDATE wip_move_txn_interface wmti
1521: SET wmti.process_status = WIP_CONSTANTS.ERROR
1522: WHERE wmti.group_id = g_group_id
1523: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1524: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1525: AND (wmti.to_operation_seq_num < wmti.fm_operation_seq_num OR
1526: (wmti.to_operation_seq_num = wmti.fm_operation_seq_num AND
1527: wmti.to_intraoperation_step_type <
1528: wmti.fm_intraoperation_step_type))

Line 1548: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1544: -- Generate TRANSACTION_ID if user does not provide this value
1545: UPDATE wip_move_txn_interface wmti
1546: SET wmti.transaction_id = wip_transactions_s.nextval
1547: WHERE wmti.group_id = g_group_id
1548: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1549: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1550: AND wmti.transaction_id IS NULL;
1551:
1552: -- Set Error Message

Line 1549: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1545: UPDATE wip_move_txn_interface wmti
1546: SET wmti.transaction_id = wip_transactions_s.nextval
1547: WHERE wmti.group_id = g_group_id
1548: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1549: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1550: AND wmti.transaction_id IS NULL;
1551:
1552: -- Set Error Message
1553: fnd_message.set_name('WIP', 'WIP_NOT_VALID');

Line 1585: AND wmti1.process_phase = WIP_CONSTANTS.MOVE_VAL

1581: wmti1.program_id,
1582: wmti1.program_update_date
1583: FROM wip_move_txn_interface wmti1
1584: WHERE wmti1.group_id = g_group_id
1585: AND wmti1.process_phase = WIP_CONSTANTS.MOVE_VAL
1586: AND wmti1.process_status = WIP_CONSTANTS.RUNNING
1587: AND (EXISTS
1588: (SELECT 'X'
1589: FROM wip_move_transactions wmt

Line 1586: AND wmti1.process_status = WIP_CONSTANTS.RUNNING

1582: wmti1.program_update_date
1583: FROM wip_move_txn_interface wmti1
1584: WHERE wmti1.group_id = g_group_id
1585: AND wmti1.process_phase = WIP_CONSTANTS.MOVE_VAL
1586: AND wmti1.process_status = WIP_CONSTANTS.RUNNING
1587: AND (EXISTS
1588: (SELECT 'X'
1589: FROM wip_move_transactions wmt
1590: WHERE wmt.transaction_id = wmti1.transaction_id)

Line 1610: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,

1606: wmti.organization_id org_id,
1607: wmti.primary_item_id item_id,
1608: wmti.primary_quantity primary_qty,
1609: DECODE(msik.serial_number_control_code,
1610: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,
1611: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,
1612: fnd_api.g_false) is_ser_ctrl,
1613: DECODE(msik.lot_control_code,
1614: WIP_CONSTANTS.LOT, fnd_api.g_true,

Line 1611: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,

1607: wmti.primary_item_id item_id,
1608: wmti.primary_quantity primary_qty,
1609: DECODE(msik.serial_number_control_code,
1610: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,
1611: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,
1612: fnd_api.g_false) is_ser_ctrl,
1613: DECODE(msik.lot_control_code,
1614: WIP_CONSTANTS.LOT, fnd_api.g_true,
1615: fnd_api.g_false) is_lot_ctrl,

Line 1614: WIP_CONSTANTS.LOT, fnd_api.g_true,

1610: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,
1611: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,
1612: fnd_api.g_false) is_ser_ctrl,
1613: DECODE(msik.lot_control_code,
1614: WIP_CONSTANTS.LOT, fnd_api.g_true,
1615: fnd_api.g_false) is_lot_ctrl,
1616: DECODE(msik.revision_qty_control_code,
1617: WIP_CONSTANTS.REV, fnd_api.g_true,
1618: fnd_api.g_false) is_rev_ctrl,

Line 1617: WIP_CONSTANTS.REV, fnd_api.g_true,

1613: DECODE(msik.lot_control_code,
1614: WIP_CONSTANTS.LOT, fnd_api.g_true,
1615: fnd_api.g_false) is_lot_ctrl,
1616: DECODE(msik.revision_qty_control_code,
1617: WIP_CONSTANTS.REV, fnd_api.g_true,
1618: fnd_api.g_false) is_rev_ctrl,
1619: DECODE(msik.revision_qty_control_code, -- revision
1620: WIP_CONSTANTS.REV, NVL(wdj.bom_revision,
1621: bom_revisions.get_item_revision_fn

Line 1620: WIP_CONSTANTS.REV, NVL(wdj.bom_revision,

1616: DECODE(msik.revision_qty_control_code,
1617: WIP_CONSTANTS.REV, fnd_api.g_true,
1618: fnd_api.g_false) is_rev_ctrl,
1619: DECODE(msik.revision_qty_control_code, -- revision
1620: WIP_CONSTANTS.REV, NVL(wdj.bom_revision,
1621: bom_revisions.get_item_revision_fn
1622: ('EXCLUDE_OPEN_HOLD', -- eco_status
1623: 'ALL', -- examine_type
1624: wmti.organization_id, -- org_id

Line 1644: AND wmti.entity_type <> WIP_CONSTANTS.REPETITIVE

1640: AND wdj.organization_id = msik.organization_id
1641: AND wdj.organization_id = mp.organization_id
1642: AND wmti.wip_entity_id = wdj.wip_entity_id
1643: AND wmti.organization_id = wdj.organization_id
1644: AND wmti.entity_type <> WIP_CONSTANTS.REPETITIVE
1645: AND wmti.group_id = g_group_id
1646: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1647: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1648: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;

Line 1646: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1642: AND wmti.wip_entity_id = wdj.wip_entity_id
1643: AND wmti.organization_id = wdj.organization_id
1644: AND wmti.entity_type <> WIP_CONSTANTS.REPETITIVE
1645: AND wmti.group_id = g_group_id
1646: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1647: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1648: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;
1649:
1650:

Line 1647: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1643: AND wmti.organization_id = wdj.organization_id
1644: AND wmti.entity_type <> WIP_CONSTANTS.REPETITIVE
1645: AND wmti.group_id = g_group_id
1646: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1647: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1648: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;
1649:
1650:
1651: CURSOR c_repAvailQty IS

Line 1648: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;

1644: AND wmti.entity_type <> WIP_CONSTANTS.REPETITIVE
1645: AND wmti.group_id = g_group_id
1646: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1647: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1648: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;
1649:
1650:
1651: CURSOR c_repAvailQty IS
1652: SELECT wmti.transaction_id txn_id,

Line 1657: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,

1653: wmti.organization_id org_id,
1654: wmti.primary_item_id item_id,
1655: wmti.primary_quantity primary_qty,
1656: DECODE(msik.serial_number_control_code,
1657: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,
1658: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,
1659: fnd_api.g_false) is_ser_ctrl,
1660: DECODE(msik.lot_control_code,
1661: WIP_CONSTANTS.LOT, fnd_api.g_true,

Line 1658: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,

1654: wmti.primary_item_id item_id,
1655: wmti.primary_quantity primary_qty,
1656: DECODE(msik.serial_number_control_code,
1657: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,
1658: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,
1659: fnd_api.g_false) is_ser_ctrl,
1660: DECODE(msik.lot_control_code,
1661: WIP_CONSTANTS.LOT, fnd_api.g_true,
1662: fnd_api.g_false) is_lot_ctrl,

Line 1661: WIP_CONSTANTS.LOT, fnd_api.g_true,

1657: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,
1658: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,
1659: fnd_api.g_false) is_ser_ctrl,
1660: DECODE(msik.lot_control_code,
1661: WIP_CONSTANTS.LOT, fnd_api.g_true,
1662: fnd_api.g_false) is_lot_ctrl,
1663: DECODE(msik.revision_qty_control_code,
1664: WIP_CONSTANTS.REV, fnd_api.g_true,
1665: fnd_api.g_false) is_rev_ctrl,

Line 1664: WIP_CONSTANTS.REV, fnd_api.g_true,

1660: DECODE(msik.lot_control_code,
1661: WIP_CONSTANTS.LOT, fnd_api.g_true,
1662: fnd_api.g_false) is_lot_ctrl,
1663: DECODE(msik.revision_qty_control_code,
1664: WIP_CONSTANTS.REV, fnd_api.g_true,
1665: fnd_api.g_false) is_rev_ctrl,
1666: DECODE(msik.revision_qty_control_code, -- revision
1667: WIP_CONSTANTS.REV, NVL(wrs.bom_revision,
1668: bom_revisions.get_item_revision_fn

Line 1667: WIP_CONSTANTS.REV, NVL(wrs.bom_revision,

1663: DECODE(msik.revision_qty_control_code,
1664: WIP_CONSTANTS.REV, fnd_api.g_true,
1665: fnd_api.g_false) is_rev_ctrl,
1666: DECODE(msik.revision_qty_control_code, -- revision
1667: WIP_CONSTANTS.REV, NVL(wrs.bom_revision,
1668: bom_revisions.get_item_revision_fn
1669: ('EXCLUDE_OPEN_HOLD', -- eco_status
1670: 'ALL', -- examine_type
1671: wmti.organization_id, -- org_id

Line 1697: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

1693: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id
1694: AND wri.organization_id = wmti.organization_id
1695: AND wri.wip_entity_id = wmti.wip_entity_id
1696: AND wri.line_id = wmti.line_id
1697: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
1698: AND wmti.group_id = g_group_id
1699: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1700: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1701: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;

Line 1699: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1695: AND wri.wip_entity_id = wmti.wip_entity_id
1696: AND wri.line_id = wmti.line_id
1697: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
1698: AND wmti.group_id = g_group_id
1699: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1700: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1701: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;
1702:
1703: l_availQty c_availQty%ROWTYPE;

Line 1700: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1696: AND wri.line_id = wmti.line_id
1697: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
1698: AND wmti.group_id = g_group_id
1699: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1700: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1701: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;
1702:
1703: l_availQty c_availQty%ROWTYPE;
1704: l_repAvailQty c_repAvailQty%ROWTYPE;

Line 1701: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;

1697: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
1698: AND wmti.group_id = g_group_id
1699: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1700: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1701: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;
1702:
1703: l_availQty c_availQty%ROWTYPE;
1704: l_repAvailQty c_repAvailQty%ROWTYPE;
1705: l_returnStatus VARCHAR2(1);

Line 1726: WIP_CONSTANTS.INV_MAX_PRECISION)

1722:
1723: UPDATE wip_move_txn_interface wmti
1724: SET wmti.primary_quantity =
1725: (SELECT ROUND(wmti.transaction_quantity * mucv.conversion_rate,
1726: WIP_CONSTANTS.INV_MAX_PRECISION)
1727: FROM mtl_uom_conversions_view mucv
1728: WHERE mucv.organization_id = wmti.organization_id
1729: AND mucv.inventory_item_id = wmti.primary_item_id
1730: AND mucv.uom_code = wmti.transaction_uom)

Line 1732: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1728: WHERE mucv.organization_id = wmti.organization_id
1729: AND mucv.inventory_item_id = wmti.primary_item_id
1730: AND mucv.uom_code = wmti.transaction_uom)
1731: WHERE wmti.group_id = g_group_id
1732: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1733: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
1734: --AND wmti.primary_quantity IS NULL;
1735:
1736: /* End of bug fix 5000113.

Line 1733: AND wmti.process_status = WIP_CONSTANTS.RUNNING;

1729: AND mucv.inventory_item_id = wmti.primary_item_id
1730: AND mucv.uom_code = wmti.transaction_uom)
1731: WHERE wmti.group_id = g_group_id
1732: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1733: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
1734: --AND wmti.primary_quantity IS NULL;
1735:
1736: /* End of bug fix 5000113.
1737:

Line 1776: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1772: wmti.program_id,
1773: wmti.program_update_date
1774: FROM wip_move_txn_interface wmti
1775: WHERE wmti.group_id = g_group_id
1776: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1777: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1778: AND wmti.primary_quantity = 0;
1779:
1780: -- Set Error Message

Line 1777: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1773: wmti.program_update_date
1774: FROM wip_move_txn_interface wmti
1775: WHERE wmti.group_id = g_group_id
1776: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1777: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1778: AND wmti.primary_quantity = 0;
1779:
1780: -- Set Error Message
1781: fnd_message.set_name('WIP', 'WIP_ID_CODE_COMBINATION');

Line 1822: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1818: WHERE mucv.organization_id = wmti.organization_id
1819: AND mucv.inventory_item_id = wmti.primary_item_id
1820: AND mucv.uom_code = wmti.transaction_uom
1821: AND wmti.group_id = g_group_id
1822: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1823: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1824: -- Fixed bug 4900010. Round both transaction_quantity and
1825: -- primary_quantity before making comparison.
1826: AND ROUND(wmti.transaction_quantity * mucv.conversion_rate,

Line 1823: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1819: AND mucv.inventory_item_id = wmti.primary_item_id
1820: AND mucv.uom_code = wmti.transaction_uom
1821: AND wmti.group_id = g_group_id
1822: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1823: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1824: -- Fixed bug 4900010. Round both transaction_quantity and
1825: -- primary_quantity before making comparison.
1826: AND ROUND(wmti.transaction_quantity * mucv.conversion_rate,
1827: WIP_CONSTANTS.INV_MAX_PRECISION) <>

Line 1827: WIP_CONSTANTS.INV_MAX_PRECISION) <>

1823: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1824: -- Fixed bug 4900010. Round both transaction_quantity and
1825: -- primary_quantity before making comparison.
1826: AND ROUND(wmti.transaction_quantity * mucv.conversion_rate,
1827: WIP_CONSTANTS.INV_MAX_PRECISION) <>
1828: ROUND(wmti.primary_quantity, WIP_CONSTANTS.INV_MAX_PRECISION);
1829:
1830: -- Set Error Message
1831: /* Fix for Bug#4192541. Removed following check as this is only warning

Line 1828: ROUND(wmti.primary_quantity, WIP_CONSTANTS.INV_MAX_PRECISION);

1824: -- Fixed bug 4900010. Round both transaction_quantity and
1825: -- primary_quantity before making comparison.
1826: AND ROUND(wmti.transaction_quantity * mucv.conversion_rate,
1827: WIP_CONSTANTS.INV_MAX_PRECISION) <>
1828: ROUND(wmti.primary_quantity, WIP_CONSTANTS.INV_MAX_PRECISION);
1829:
1830: -- Set Error Message
1831: /* Fix for Bug#4192541. Removed following check as this is only warning
1832: condition

Line 1874: AND wmti.fm_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,

1870: AND wo.wip_entity_id = wmti.wip_entity_id
1871: AND NVL(wo.repetitive_schedule_id, -1) =
1872: NVL(wmti.repetitive_schedule_id, -1)
1873: AND wo.operation_seq_num = wmti.fm_operation_seq_num
1874: AND wmti.fm_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1875: WIP_CONSTANTS.REJECT)
1876: AND wmti.to_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1877: WIP_CONSTANTS.REJECT)
1878: AND wmti.group_id = g_group_id

Line 1875: WIP_CONSTANTS.REJECT)

1871: AND NVL(wo.repetitive_schedule_id, -1) =
1872: NVL(wmti.repetitive_schedule_id, -1)
1873: AND wo.operation_seq_num = wmti.fm_operation_seq_num
1874: AND wmti.fm_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1875: WIP_CONSTANTS.REJECT)
1876: AND wmti.to_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1877: WIP_CONSTANTS.REJECT)
1878: AND wmti.group_id = g_group_id
1879: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

Line 1876: AND wmti.to_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,

1872: NVL(wmti.repetitive_schedule_id, -1)
1873: AND wo.operation_seq_num = wmti.fm_operation_seq_num
1874: AND wmti.fm_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1875: WIP_CONSTANTS.REJECT)
1876: AND wmti.to_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1877: WIP_CONSTANTS.REJECT)
1878: AND wmti.group_id = g_group_id
1879: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1880: AND wmti.process_status = WIP_CONSTANTS.RUNNING

Line 1877: WIP_CONSTANTS.REJECT)

1873: AND wo.operation_seq_num = wmti.fm_operation_seq_num
1874: AND wmti.fm_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1875: WIP_CONSTANTS.REJECT)
1876: AND wmti.to_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1877: WIP_CONSTANTS.REJECT)
1878: AND wmti.group_id = g_group_id
1879: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1880: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1881: AND wo.minimum_transfer_quantity > wmti.primary_quantity;

Line 1879: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1875: WIP_CONSTANTS.REJECT)
1876: AND wmti.to_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1877: WIP_CONSTANTS.REJECT)
1878: AND wmti.group_id = g_group_id
1879: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1880: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1881: AND wo.minimum_transfer_quantity > wmti.primary_quantity;
1882:
1883:

Line 1880: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1876: AND wmti.to_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1877: WIP_CONSTANTS.REJECT)
1878: AND wmti.group_id = g_group_id
1879: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1880: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1881: AND wo.minimum_transfer_quantity > wmti.primary_quantity;
1882:
1883:
1884: */

Line 1924: IF(l_availQty.negative_allow = WIP_CONSTANTS.NO AND

1920: add_error(p_txn_id => l_availQty.txn_id,
1921: p_err_col => 'PRIMARY_QUANTITY',
1922: p_err_msg => l_msg_data);
1923: ELSE
1924: IF(l_availQty.negative_allow = WIP_CONSTANTS.NO AND
1925: l_att < l_availQty.primary_qty) THEN
1926: add_error(p_txn_id => l_availQty.txn_id,
1927: p_err_col => 'PRIMARY_QUANTITY',
1928: p_err_msg => l_availQty.assembly_name||':'||l_errMsg);

Line 1968: IF(l_repAvailQty.negative_allow = WIP_CONSTANTS.NO AND

1964: add_error(p_txn_id => l_repAvailQty.txn_id,
1965: p_err_col => 'PRIMARY_QUANTITY',
1966: p_err_msg => l_msg_data);
1967: ELSE
1968: IF(l_repAvailQty.negative_allow = WIP_CONSTANTS.NO AND
1969: l_att < l_repAvailQty.primary_qty) THEN
1970: add_error(p_txn_id => l_repAvailQty.txn_id,
1971: p_err_col => 'PRIMARY_QUANTITY',
1972: p_err_msg => l_repAvailQty.assembly_name||':'||l_errMsg);

Line 1990: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1986: FROM mtl_system_items msi
1987: WHERE msi.organization_id = wmti.organization_id
1988: AND msi.inventory_item_id = wmti.primary_item_id)
1989: WHERE wmti.group_id = g_group_id
1990: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1991: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1992: AND wmti.primary_uom IS NULL;
1993:
1994: -- Set Error Message

Line 1991: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1987: WHERE msi.organization_id = wmti.organization_id
1988: AND msi.inventory_item_id = wmti.primary_item_id)
1989: WHERE wmti.group_id = g_group_id
1990: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1991: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1992: AND wmti.primary_uom IS NULL;
1993:
1994: -- Set Error Message
1995: fnd_message.set_name('WIP', 'WIP_ID_CODE_COMBINATION');

Line 2033: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2029: mtl_system_items msi
2030: WHERE msi.organization_id = wmti.organization_id
2031: AND msi.inventory_item_id = wmti.primary_item_id
2032: AND wmti.group_id = g_group_id
2033: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2034: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2035: AND msi.primary_uom_code <> wmti.primary_uom;
2036:
2037: END primary_uom;

Line 2034: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2030: WHERE msi.organization_id = wmti.organization_id
2031: AND msi.inventory_item_id = wmti.primary_item_id
2032: AND wmti.group_id = g_group_id
2033: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2034: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2035: AND msi.primary_uom_code <> wmti.primary_uom;
2036:
2037: END primary_uom;
2038:

Line 2054: mucv.conversion_rate, WIP_CONSTANTS.INV_MAX_PRECISION)

2050:
2051: UPDATE wip_move_txn_interface wmti
2052: SET wmti.overcompletion_primary_qty =
2053: (SELECT ROUND(wmti.overcompletion_transaction_qty *
2054: mucv.conversion_rate, WIP_CONSTANTS.INV_MAX_PRECISION)
2055: FROM mtl_uom_conversions_view mucv
2056: WHERE mucv.organization_id = wmti.organization_id
2057: AND mucv.inventory_item_id = wmti.primary_item_id
2058: AND mucv.uom_code = wmti.transaction_uom)

Line 2060: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2056: WHERE mucv.organization_id = wmti.organization_id
2057: AND mucv.inventory_item_id = wmti.primary_item_id
2058: AND mucv.uom_code = wmti.transaction_uom)
2059: WHERE wmti.group_id = g_group_id
2060: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2061: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2062: AND wmti.overcompletion_transaction_qty IS NOT NULL;
2063: --AND wmti.overcompletion_primary_qty IS NULL;
2064:

Line 2061: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2057: AND mucv.inventory_item_id = wmti.primary_item_id
2058: AND mucv.uom_code = wmti.transaction_uom)
2059: WHERE wmti.group_id = g_group_id
2060: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2061: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2062: AND wmti.overcompletion_transaction_qty IS NOT NULL;
2063: --AND wmti.overcompletion_primary_qty IS NULL;
2064:
2065: -- End of bug fix 5000113.

Line 2105: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2101: wmti.program_id,
2102: wmti.program_update_date
2103: FROM wip_move_txn_interface wmti
2104: WHERE wmti.group_id = g_group_id
2105: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2106: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2107: AND wmti.overcompletion_primary_qty = 0;
2108:
2109: -- Set Error Message

Line 2106: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2102: wmti.program_update_date
2103: FROM wip_move_txn_interface wmti
2104: WHERE wmti.group_id = g_group_id
2105: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2106: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2107: AND wmti.overcompletion_primary_qty = 0;
2108:
2109: -- Set Error Message
2110: fnd_message.set_name('WIP', 'WIP_ID_CODE_COMBINATION');

Line 2149: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2145: WHERE mucv.organization_id = wmti.organization_id
2146: AND mucv.inventory_item_id = wmti.primary_item_id
2147: AND mucv.uom_code = wmti.transaction_uom
2148: AND wmti.group_id = g_group_id
2149: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2150: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2151: AND wmti.overcompletion_transaction_qty IS NOT NULL
2152: -- Fixed bug 4900010. Round both transaction_quantity and
2153: -- primary_quantity before making comparison.

Line 2150: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2146: AND mucv.inventory_item_id = wmti.primary_item_id
2147: AND mucv.uom_code = wmti.transaction_uom
2148: AND wmti.group_id = g_group_id
2149: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2150: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2151: AND wmti.overcompletion_transaction_qty IS NOT NULL
2152: -- Fixed bug 4900010. Round both transaction_quantity and
2153: -- primary_quantity before making comparison.
2154: AND ROUND(wmti.overcompletion_transaction_qty * mucv.conversion_rate,

Line 2155: WIP_CONSTANTS.INV_MAX_PRECISION) <>

2151: AND wmti.overcompletion_transaction_qty IS NOT NULL
2152: -- Fixed bug 4900010. Round both transaction_quantity and
2153: -- primary_quantity before making comparison.
2154: AND ROUND(wmti.overcompletion_transaction_qty * mucv.conversion_rate,
2155: WIP_CONSTANTS.INV_MAX_PRECISION) <>
2156: ROUND(wmti.overcompletion_primary_qty,
2157: WIP_CONSTANTS.INV_MAX_PRECISION);
2158: END ocpl_primary_qty;
2159:

Line 2157: WIP_CONSTANTS.INV_MAX_PRECISION);

2153: -- primary_quantity before making comparison.
2154: AND ROUND(wmti.overcompletion_transaction_qty * mucv.conversion_rate,
2155: WIP_CONSTANTS.INV_MAX_PRECISION) <>
2156: ROUND(wmti.overcompletion_primary_qty,
2157: WIP_CONSTANTS.INV_MAX_PRECISION);
2158: END ocpl_primary_qty;
2159:
2160: -- This value must be null. The move processor will be the one who insert
2161: -- child record and link it with parent record

Line 2200: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2196: wmti.program_id,
2197: wmti.program_update_date
2198: FROM wip_move_txn_interface wmti
2199: WHERE wmti.group_id = g_group_id
2200: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2201: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2202: AND wmti.overcompletion_transaction_id IS NOT NULL;
2203:
2204: END ocpl_txn_id;

Line 2201: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2197: wmti.program_update_date
2198: FROM wip_move_txn_interface wmti
2199: WHERE wmti.group_id = g_group_id
2200: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2201: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2202: AND wmti.overcompletion_transaction_id IS NOT NULL;
2203:
2204: END ocpl_txn_id;
2205:

Line 2221: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2217: FROM mtl_transaction_reasons mtr
2218: WHERE mtr.reason_name = wmti.reason_name
2219: AND NVL(mtr.disable_date, SYSDATE) >= SYSDATE)
2220: WHERE wmti.group_id = g_group_id
2221: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2222: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2223: AND wmti.reason_id IS NULL
2224: AND wmti.reason_name IS NOT NULL;
2225:

Line 2222: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2218: WHERE mtr.reason_name = wmti.reason_name
2219: AND NVL(mtr.disable_date, SYSDATE) >= SYSDATE)
2220: WHERE wmti.group_id = g_group_id
2221: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2222: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2223: AND wmti.reason_id IS NULL
2224: AND wmti.reason_name IS NOT NULL;
2225:
2226: -- Set Error Message

Line 2262: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2258: wmti.program_id,
2259: wmti.program_update_date
2260: FROM wip_move_txn_interface wmti
2261: WHERE wmti.group_id = g_group_id
2262: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2263: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2264: AND (wmti.reason_id IS NOT NULL OR wmti.reason_name IS NOT NULL)
2265: AND NOT EXISTS
2266: (SELECT 'X'

Line 2263: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2259: wmti.program_update_date
2260: FROM wip_move_txn_interface wmti
2261: WHERE wmti.group_id = g_group_id
2262: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2263: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2264: AND (wmti.reason_id IS NOT NULL OR wmti.reason_name IS NOT NULL)
2265: AND NOT EXISTS
2266: (SELECT 'X'
2267: FROM mtl_transaction_reasons mtr

Line 2317: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2313: FROM wip_move_txn_interface wmti,
2314: wip_parameters wp
2315: WHERE wp.organization_id = wmti.organization_id
2316: AND wmti.group_id = g_group_id
2317: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2318: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2319: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
2320: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
2321: AND ((wmti.scrap_account_id IS NULL

Line 2318: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2314: wip_parameters wp
2315: WHERE wp.organization_id = wmti.organization_id
2316: AND wmti.group_id = g_group_id
2317: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2318: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2319: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
2320: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
2321: AND ((wmti.scrap_account_id IS NULL
2322: AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES

Line 2319: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR

2315: WHERE wp.organization_id = wmti.organization_id
2316: AND wmti.group_id = g_group_id
2317: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2318: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2319: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
2320: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
2321: AND ((wmti.scrap_account_id IS NULL
2322: AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES
2323: AND wmti.entity_type NOT IN(WIP_CONSTANTS.LOTBASED,

Line 2320: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

2316: AND wmti.group_id = g_group_id
2317: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2318: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2319: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
2320: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
2321: AND ((wmti.scrap_account_id IS NULL
2322: AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES
2323: AND wmti.entity_type NOT IN(WIP_CONSTANTS.LOTBASED,
2324: WIP_CONSTANTS.CLOSED_OSFM))

Line 2322: AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES

2318: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2319: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
2320: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
2321: AND ((wmti.scrap_account_id IS NULL
2322: AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES
2323: AND wmti.entity_type NOT IN(WIP_CONSTANTS.LOTBASED,
2324: WIP_CONSTANTS.CLOSED_OSFM))
2325: OR
2326: (wmti.scrap_account_id IS NOT NULL AND

Line 2323: AND wmti.entity_type NOT IN(WIP_CONSTANTS.LOTBASED,

2319: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
2320: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
2321: AND ((wmti.scrap_account_id IS NULL
2322: AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES
2323: AND wmti.entity_type NOT IN(WIP_CONSTANTS.LOTBASED,
2324: WIP_CONSTANTS.CLOSED_OSFM))
2325: OR
2326: (wmti.scrap_account_id IS NOT NULL AND
2327: NOT EXISTS

Line 2324: WIP_CONSTANTS.CLOSED_OSFM))

2320: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
2321: AND ((wmti.scrap_account_id IS NULL
2322: AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES
2323: AND wmti.entity_type NOT IN(WIP_CONSTANTS.LOTBASED,
2324: WIP_CONSTANTS.CLOSED_OSFM))
2325: OR
2326: (wmti.scrap_account_id IS NOT NULL AND
2327: NOT EXISTS
2328: (SELECT 'X'

Line 2369: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2365: FROM fnd_user fu
2366: WHERE fu.user_name = wmti.last_updated_by_name
2367: AND SYSDATE BETWEEN fu.start_date AND NVL(fu.end_date, SYSDATE))
2368: WHERE wmti.group_id = g_group_id
2369: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2370: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2371: AND wmti.last_updated_by IS NULL
2372: AND wmti.last_updated_by_name IS NOT NULL;
2373:

Line 2370: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2366: WHERE fu.user_name = wmti.last_updated_by_name
2367: AND SYSDATE BETWEEN fu.start_date AND NVL(fu.end_date, SYSDATE))
2368: WHERE wmti.group_id = g_group_id
2369: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2370: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2371: AND wmti.last_updated_by IS NULL
2372: AND wmti.last_updated_by_name IS NOT NULL;
2373:
2374: -- Set Error Message

Line 2409: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2405: wmti.program_id,
2406: wmti.program_update_date
2407: FROM wip_move_txn_interface wmti
2408: WHERE wmti.group_id = g_group_id
2409: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2410: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2411: AND wmti.last_updated_by IS NULL; -- cannot derive LAST_UPDATED_BY
2412:
2413: END last_updated_by;

Line 2410: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2406: wmti.program_update_date
2407: FROM wip_move_txn_interface wmti
2408: WHERE wmti.group_id = g_group_id
2409: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2410: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2411: AND wmti.last_updated_by IS NULL; -- cannot derive LAST_UPDATED_BY
2412:
2413: END last_updated_by;
2414:

Line 2431: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2427: FROM fnd_user fu
2428: WHERE fu.user_name = wmti.created_by_name
2429: AND SYSDATE BETWEEN fu.start_date AND NVL(fu.end_date, SYSDATE))
2430: WHERE wmti.group_id = g_group_id
2431: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2432: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2433: AND wmti.created_by IS NULL
2434: AND wmti.created_by_name IS NOT NULL;
2435:

Line 2432: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2428: WHERE fu.user_name = wmti.created_by_name
2429: AND SYSDATE BETWEEN fu.start_date AND NVL(fu.end_date, SYSDATE))
2430: WHERE wmti.group_id = g_group_id
2431: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2432: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2433: AND wmti.created_by IS NULL
2434: AND wmti.created_by_name IS NOT NULL;
2435:
2436: -- Set Error Message

Line 2471: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2467: wmti.program_id,
2468: wmti.program_update_date
2469: FROM wip_move_txn_interface wmti
2470: WHERE wmti.group_id = g_group_id
2471: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2472: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2473: AND ((wmti.created_by IS NULL) -- cannot derive LAST_UPDATED_BY
2474: OR
2475: (NOT EXISTS

Line 2472: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2468: wmti.program_update_date
2469: FROM wip_move_txn_interface wmti
2470: WHERE wmti.group_id = g_group_id
2471: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2472: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2473: AND ((wmti.created_by IS NULL) -- cannot derive LAST_UPDATED_BY
2474: OR
2475: (NOT EXISTS
2476: (SELECT 'X'

Line 2531: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2527: wmti.program_id,
2528: wmti.program_update_date
2529: FROM wip_move_txn_interface wmti
2530: WHERE wmti.group_id = g_group_id
2531: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2532: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2533: AND EXISTS
2534: (SELECT 'X'
2535: FROM bom_departments bd,

Line 2532: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2528: wmti.program_update_date
2529: FROM wip_move_txn_interface wmti
2530: WHERE wmti.group_id = g_group_id
2531: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2532: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2533: AND EXISTS
2534: (SELECT 'X'
2535: FROM bom_departments bd,
2536: wip_operation_resources wor,

Line 2543: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE

2539: WHERE wor.organization_id = wmti.organization_id
2540: AND wor.wip_entity_id = wmti.wip_entity_id
2541: AND wor.operation_seq_num = wmti.to_operation_seq_num
2542: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
2543: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2544: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2545: WIP_CONSTANTS.LOTBASED)
2546: OR
2547: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND

Line 2544: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

2540: AND wor.wip_entity_id = wmti.wip_entity_id
2541: AND wor.operation_seq_num = wmti.to_operation_seq_num
2542: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
2543: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2544: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2545: WIP_CONSTANTS.LOTBASED)
2546: OR
2547: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2548: wor.repetitive_schedule_id IN

Line 2545: WIP_CONSTANTS.LOTBASED)

2541: AND wor.operation_seq_num = wmti.to_operation_seq_num
2542: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
2543: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2544: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2545: WIP_CONSTANTS.LOTBASED)
2546: OR
2547: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2548: wor.repetitive_schedule_id IN
2549: (SELECT wrs.repetitive_schedule_id

Line 2547: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND

2543: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2544: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2545: WIP_CONSTANTS.LOTBASED)
2546: OR
2547: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2548: wor.repetitive_schedule_id IN
2549: (SELECT wrs.repetitive_schedule_id
2550: FROM wip_repetitive_schedules wrs
2551: WHERE wrs.wip_entity_id = wmti.wip_entity_id

Line 2554: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,

2550: FROM wip_repetitive_schedules wrs
2551: WHERE wrs.wip_entity_id = wmti.wip_entity_id
2552: AND wrs.organization_id = wmti.organization_id
2553: AND wrs.line_id = wmti.line_id
2554: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,
2555: WIP_CONSTANTS.COMP_CHRG))))
2556: AND wo1.organization_id = wor.organization_id
2557: AND wo1.wip_entity_id = wor.wip_entity_id
2558: AND NVL(wo1.repetitive_schedule_id,-1) =

Line 2555: WIP_CONSTANTS.COMP_CHRG))))

2551: WHERE wrs.wip_entity_id = wmti.wip_entity_id
2552: AND wrs.organization_id = wmti.organization_id
2553: AND wrs.line_id = wmti.line_id
2554: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,
2555: WIP_CONSTANTS.COMP_CHRG))))
2556: AND wo1.organization_id = wor.organization_id
2557: AND wo1.wip_entity_id = wor.wip_entity_id
2558: AND NVL(wo1.repetitive_schedule_id,-1) =
2559: NVL(wor.repetitive_schedule_id,-1)

Line 2565: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND

2561: AND wo2.organization_id = wo1.organization_id
2562: AND wo2.wip_entity_id = wo1.wip_entity_id
2563: AND NVL(wo2.repetitive_schedule_id,-1) =
2564: NVL(wo1.repetitive_schedule_id,-1)
2565: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
2566: wo2.operation_seq_num = wor.operation_seq_num)
2567: OR
2568: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
2569: ((wo1.next_operation_seq_num IS NOT NULL AND

Line 2568: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND

2564: NVL(wo1.repetitive_schedule_id,-1)
2565: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
2566: wo2.operation_seq_num = wor.operation_seq_num)
2567: OR
2568: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
2569: ((wo1.next_operation_seq_num IS NOT NULL AND
2570: wo1.next_operation_seq_num = wo2.operation_seq_num)
2571: OR
2572: (wo1.next_operation_seq_num IS NULL AND

Line 2611: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2607: wmti.program_id,
2608: wmti.program_update_date
2609: FROM wip_move_txn_interface wmti
2610: WHERE wmti.group_id = g_group_id
2611: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2612: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2613: AND EXISTS
2614: (SELECT 'Outside processing resources exist'
2615: FROM wip_operation_resources wor

Line 2612: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2608: wmti.program_update_date
2609: FROM wip_move_txn_interface wmti
2610: WHERE wmti.group_id = g_group_id
2611: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2612: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2613: AND EXISTS
2614: (SELECT 'Outside processing resources exist'
2615: FROM wip_operation_resources wor
2616: WHERE wor.organization_id = wmti.organization_id

Line 2620: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE

2616: WHERE wor.organization_id = wmti.organization_id
2617: AND wor.wip_entity_id = wmti.wip_entity_id
2618: AND wor.operation_seq_num = wmti.to_operation_seq_num
2619: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
2620: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2621: AND wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
2622: WIP_CONSTANTS.PO_MOVE)
2623: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2624: WIP_CONSTANTS.LOTBASED)

Line 2621: AND wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,

2617: AND wor.wip_entity_id = wmti.wip_entity_id
2618: AND wor.operation_seq_num = wmti.to_operation_seq_num
2619: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
2620: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2621: AND wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
2622: WIP_CONSTANTS.PO_MOVE)
2623: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2624: WIP_CONSTANTS.LOTBASED)
2625: OR

Line 2622: WIP_CONSTANTS.PO_MOVE)

2618: AND wor.operation_seq_num = wmti.to_operation_seq_num
2619: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
2620: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2621: AND wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
2622: WIP_CONSTANTS.PO_MOVE)
2623: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2624: WIP_CONSTANTS.LOTBASED)
2625: OR
2626: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND

Line 2623: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

2619: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
2620: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2621: AND wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
2622: WIP_CONSTANTS.PO_MOVE)
2623: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2624: WIP_CONSTANTS.LOTBASED)
2625: OR
2626: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2627: wor.repetitive_schedule_id IN

Line 2624: WIP_CONSTANTS.LOTBASED)

2620: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2621: AND wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
2622: WIP_CONSTANTS.PO_MOVE)
2623: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2624: WIP_CONSTANTS.LOTBASED)
2625: OR
2626: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2627: wor.repetitive_schedule_id IN
2628: (SELECT wrs.repetitive_schedule_id

Line 2626: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND

2622: WIP_CONSTANTS.PO_MOVE)
2623: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2624: WIP_CONSTANTS.LOTBASED)
2625: OR
2626: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2627: wor.repetitive_schedule_id IN
2628: (SELECT wrs.repetitive_schedule_id
2629: FROM wip_repetitive_schedules wrs
2630: WHERE wrs.organization_id = wmti.organization_id

Line 2633: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,

2629: FROM wip_repetitive_schedules wrs
2630: WHERE wrs.organization_id = wmti.organization_id
2631: AND wrs.wip_entity_id = wmti.wip_entity_id
2632: AND wrs.line_id = wmti.line_id
2633: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,
2634: WIP_CONSTANTS.COMP_CHRG)))))
2635: AND NOT EXISTS
2636: (SELECT 'Current user is an employee'
2637: FROM fnd_user fu,

Line 2634: WIP_CONSTANTS.COMP_CHRG)))))

2630: WHERE wrs.organization_id = wmti.organization_id
2631: AND wrs.wip_entity_id = wmti.wip_entity_id
2632: AND wrs.line_id = wmti.line_id
2633: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,
2634: WIP_CONSTANTS.COMP_CHRG)))))
2635: AND NOT EXISTS
2636: (SELECT 'Current user is an employee'
2637: FROM fnd_user fu,
2638: per_people_f ppf

Line 2654: SET wmti.process_status = WIP_CONSTANTS.ERROR

2650: -- Users cannot move cross 'Queue' of serialization start op. User need to
2651: -- move 2 step. The first time move to Queue of serialization start op, then
2652: -- serial move. For backward move, do serial move first.
2653: UPDATE wip_move_txn_interface wmti
2654: SET wmti.process_status = WIP_CONSTANTS.ERROR
2655: WHERE wmti.group_id = g_group_id
2656: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2657: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2658: AND EXISTS -- serialized job

Line 2656: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2652: -- serial move. For backward move, do serial move first.
2653: UPDATE wip_move_txn_interface wmti
2654: SET wmti.process_status = WIP_CONSTANTS.ERROR
2655: WHERE wmti.group_id = g_group_id
2656: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2657: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2658: AND EXISTS -- serialized job
2659: (SELECT 'X'
2660: FROM wip_discrete_jobs wdj

Line 2657: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2653: UPDATE wip_move_txn_interface wmti
2654: SET wmti.process_status = WIP_CONSTANTS.ERROR
2655: WHERE wmti.group_id = g_group_id
2656: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2657: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2658: AND EXISTS -- serialized job
2659: (SELECT 'X'
2660: FROM wip_discrete_jobs wdj
2661: WHERE wdj.wip_entity_id = wmti.wip_entity_id

Line 2668: wmti.to_intraoperation_step_type <> WIP_CONSTANTS.QUEUE)))

2664: (wmti.fm_operation_seq_num < wdj.serialization_start_op AND
2665: (wmti.to_operation_seq_num > wdj.serialization_start_op
2666: OR
2667: (wmti.to_operation_seq_num = wdj.serialization_start_op AND
2668: wmti.to_intraoperation_step_type <> WIP_CONSTANTS.QUEUE)))
2669: OR
2670: -- Backward move
2671: (wmti.to_operation_seq_num < wdj.serialization_start_op AND
2672: (wmti.fm_operation_seq_num > wdj.serialization_start_op

Line 2675: wmti.fm_intraoperation_step_type <> WIP_CONSTANTS.QUEUE)))))

2671: (wmti.to_operation_seq_num < wdj.serialization_start_op AND
2672: (wmti.fm_operation_seq_num > wdj.serialization_start_op
2673: OR
2674: (wmti.fm_operation_seq_num = wdj.serialization_start_op AND
2675: wmti.fm_intraoperation_step_type <> WIP_CONSTANTS.QUEUE)))))
2676: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
2677:
2678: fnd_message.set_name('WIP', 'WIP_MOVE_CROSS_START_OP');
2679: add_error(p_txn_ids => enums,

Line 2693: SET wmti.process_status = WIP_CONSTANTS.ERROR

2689: -- If user try to do serialized transaction, primary_quantity must be 1.
2690: -- This validation is only for serialized discrete job. For serialized
2691: -- OSFM job, primary_quantity can be more than 1.
2692: UPDATE wip_move_txn_interface wmti
2693: SET wmti.process_status = WIP_CONSTANTS.ERROR
2694: WHERE wmti.group_id = g_group_id
2695: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2696: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2697: AND EXISTS -- serialized discrete job and serialized transaction

Line 2695: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2691: -- OSFM job, primary_quantity can be more than 1.
2692: UPDATE wip_move_txn_interface wmti
2693: SET wmti.process_status = WIP_CONSTANTS.ERROR
2694: WHERE wmti.group_id = g_group_id
2695: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2696: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2697: AND EXISTS -- serialized discrete job and serialized transaction
2698: (SELECT 'X'
2699: FROM wip_discrete_jobs wdj,

Line 2696: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2692: UPDATE wip_move_txn_interface wmti
2693: SET wmti.process_status = WIP_CONSTANTS.ERROR
2694: WHERE wmti.group_id = g_group_id
2695: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2696: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2697: AND EXISTS -- serialized discrete job and serialized transaction
2698: (SELECT 'X'
2699: FROM wip_discrete_jobs wdj,
2700: wip_entities we

Line 2703: AND we.entity_type = WIP_CONSTANTS.DISCRETE

2699: FROM wip_discrete_jobs wdj,
2700: wip_entities we
2701: WHERE wdj.wip_entity_id = wmti.wip_entity_id
2702: AND wdj.wip_entity_id = we.wip_entity_id
2703: AND we.entity_type = WIP_CONSTANTS.DISCRETE
2704: AND wdj.serialization_start_op IS NOT NULL
2705: AND wmti.fm_operation_seq_num >= wdj.serialization_start_op
2706: AND wmti.to_operation_seq_num >= wdj.serialization_start_op
2707: AND wmti.primary_quantity <> 1)

Line 2721: SET wmti.process_status = WIP_CONSTANTS.ERROR

2717: enums.delete;
2718: -- if user provide serial number information for non-serialized job, or
2719: -- serialized job with non-serialized move, error out.
2720: UPDATE wip_move_txn_interface wmti
2721: SET wmti.process_status = WIP_CONSTANTS.ERROR
2722: WHERE wmti.group_id = g_group_id
2723: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2724: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2725: AND EXISTS -- regular job

Line 2723: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2719: -- serialized job with non-serialized move, error out.
2720: UPDATE wip_move_txn_interface wmti
2721: SET wmti.process_status = WIP_CONSTANTS.ERROR
2722: WHERE wmti.group_id = g_group_id
2723: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2724: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2725: AND EXISTS -- regular job
2726: (SELECT 'X'
2727: FROM wip_discrete_jobs wdj

Line 2724: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2720: UPDATE wip_move_txn_interface wmti
2721: SET wmti.process_status = WIP_CONSTANTS.ERROR
2722: WHERE wmti.group_id = g_group_id
2723: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2724: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2725: AND EXISTS -- regular job
2726: (SELECT 'X'
2727: FROM wip_discrete_jobs wdj
2728: WHERE wdj.wip_entity_id = wmti.wip_entity_id

Line 2735: wmti.fm_intraoperation_step_type = WIP_CONSTANTS.QUEUE))

2731: (wdj.serialization_start_op IS NOT NULL
2732: AND
2733: (wmti.fm_operation_seq_num < wdj.serialization_start_op OR
2734: (wmti.fm_operation_seq_num = wdj.serialization_start_op AND
2735: wmti.fm_intraoperation_step_type = WIP_CONSTANTS.QUEUE))
2736: AND
2737: (wmti.to_operation_seq_num < wdj.serialization_start_op OR
2738: (wmti.to_operation_seq_num = wdj.serialization_start_op AND
2739: wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE))))

Line 2739: wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE))))

2735: wmti.fm_intraoperation_step_type = WIP_CONSTANTS.QUEUE))
2736: AND
2737: (wmti.to_operation_seq_num < wdj.serialization_start_op OR
2738: (wmti.to_operation_seq_num = wdj.serialization_start_op AND
2739: wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE))))
2740: )
2741: AND EXISTS
2742: (SELECT 'X'
2743: FROM wip_serial_move_interface wsmi

Line 2758: SET wmti.process_status = WIP_CONSTANTS.ERROR

2754: enums.delete;
2755: -- if user try to do serialized transaction, number of serial records must be
2756: -- equal to wmti.primary_quantity
2757: UPDATE wip_move_txn_interface wmti
2758: SET wmti.process_status = WIP_CONSTANTS.ERROR
2759: WHERE wmti.group_id = g_group_id
2760: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2761: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2762: AND EXISTS -- serialized job and serialized transaction

Line 2760: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2756: -- equal to wmti.primary_quantity
2757: UPDATE wip_move_txn_interface wmti
2758: SET wmti.process_status = WIP_CONSTANTS.ERROR
2759: WHERE wmti.group_id = g_group_id
2760: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2761: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2762: AND EXISTS -- serialized job and serialized transaction
2763: (SELECT 'X'
2764: FROM wip_discrete_jobs wdj

Line 2761: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2757: UPDATE wip_move_txn_interface wmti
2758: SET wmti.process_status = WIP_CONSTANTS.ERROR
2759: WHERE wmti.group_id = g_group_id
2760: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2761: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2762: AND EXISTS -- serialized job and serialized transaction
2763: (SELECT 'X'
2764: FROM wip_discrete_jobs wdj
2765: WHERE wdj.wip_entity_id = wmti.wip_entity_id

Line 2789: AND msn.current_status = WIP_CONSTANTS.IN_STORES

2785: WHERE wsmi.transaction_id = wmti.transaction_id
2786: AND wsmi.assembly_serial_number = msn.serial_number
2787: AND wmti.organization_id = msn.current_organization_id
2788: AND wmti.primary_item_id = msn.inventory_item_id
2789: AND msn.current_status = WIP_CONSTANTS.IN_STORES
2790: AND wmti.wip_entity_id = we.wip_entity_id
2791: AND ((mog.genealogy_origin = 1 AND
2792: mog.parent_object_id = we.gen_object_id AND
2793: mog.object_id = msn.gen_object_id)

Line 2811: SET wmti.process_status = WIP_CONSTANTS.ERROR

2807: enums.delete;
2808: -- if user try to do serialized transaction, the status of the serial
2809: -- must correspond to the transaction type.
2810: UPDATE wip_move_txn_interface wmti
2811: SET wmti.process_status = WIP_CONSTANTS.ERROR
2812: WHERE wmti.group_id = g_group_id
2813: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2814: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2815: AND EXISTS -- serialized job and serialized transaction

Line 2813: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2809: -- must correspond to the transaction type.
2810: UPDATE wip_move_txn_interface wmti
2811: SET wmti.process_status = WIP_CONSTANTS.ERROR
2812: WHERE wmti.group_id = g_group_id
2813: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2814: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2815: AND EXISTS -- serialized job and serialized transaction
2816: (SELECT 'X'
2817: FROM wip_discrete_jobs wdj

Line 2814: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2810: UPDATE wip_move_txn_interface wmti
2811: SET wmti.process_status = WIP_CONSTANTS.ERROR
2812: WHERE wmti.group_id = g_group_id
2813: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2814: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2815: AND EXISTS -- serialized job and serialized transaction
2816: (SELECT 'X'
2817: FROM wip_discrete_jobs wdj
2818: WHERE wdj.wip_entity_id = wmti.wip_entity_id

Line 2831: AND ((wmti.transaction_type = WIP_CONSTANTS.RET_TXN AND

2827: AND wsmi.assembly_serial_number = msn.serial_number
2828: AND wmti.organization_id = msn.current_organization_id
2829: AND wmti.primary_item_id = msn.inventory_item_id
2830: AND msn.line_mark_id IS NULL
2831: AND ((wmti.transaction_type = WIP_CONSTANTS.RET_TXN AND
2832: msn.group_mark_id IS NULL AND
2833: msn.wip_entity_id IS NULL AND
2834: msn.current_status = WIP_CONSTANTS.IN_STORES)
2835: OR

Line 2834: msn.current_status = WIP_CONSTANTS.IN_STORES)

2830: AND msn.line_mark_id IS NULL
2831: AND ((wmti.transaction_type = WIP_CONSTANTS.RET_TXN AND
2832: msn.group_mark_id IS NULL AND
2833: msn.wip_entity_id IS NULL AND
2834: msn.current_status = WIP_CONSTANTS.IN_STORES)
2835: OR
2836: (wmti.transaction_type IN (WIP_CONSTANTS.MOVE_TXN,
2837: WIP_CONSTANTS.COMP_TXN) AND
2838: msn.group_mark_id IS NOT NULL AND

Line 2836: (wmti.transaction_type IN (WIP_CONSTANTS.MOVE_TXN,

2832: msn.group_mark_id IS NULL AND
2833: msn.wip_entity_id IS NULL AND
2834: msn.current_status = WIP_CONSTANTS.IN_STORES)
2835: OR
2836: (wmti.transaction_type IN (WIP_CONSTANTS.MOVE_TXN,
2837: WIP_CONSTANTS.COMP_TXN) AND
2838: msn.group_mark_id IS NOT NULL AND
2839: msn.wip_entity_id IS NOT NULL AND
2840: wmti.wip_entity_id = msn.wip_entity_id AND

Line 2837: WIP_CONSTANTS.COMP_TXN) AND

2833: msn.wip_entity_id IS NULL AND
2834: msn.current_status = WIP_CONSTANTS.IN_STORES)
2835: OR
2836: (wmti.transaction_type IN (WIP_CONSTANTS.MOVE_TXN,
2837: WIP_CONSTANTS.COMP_TXN) AND
2838: msn.group_mark_id IS NOT NULL AND
2839: msn.wip_entity_id IS NOT NULL AND
2840: wmti.wip_entity_id = msn.wip_entity_id AND
2841: -- Define but not use or Issue out of store.

Line 2842: msn.current_status IN (WIP_CONSTANTS.DEF_NOT_USED,

2838: msn.group_mark_id IS NOT NULL AND
2839: msn.wip_entity_id IS NOT NULL AND
2840: wmti.wip_entity_id = msn.wip_entity_id AND
2841: -- Define but not use or Issue out of store.
2842: msn.current_status IN (WIP_CONSTANTS.DEF_NOT_USED,
2843: WIP_CONSTANTS.OUT_OF_STORES))))
2844: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
2845:
2846: fnd_message.set_name('WIP', 'WIP_INVALID_SERIAL_STATUS');

Line 2843: WIP_CONSTANTS.OUT_OF_STORES))))

2839: msn.wip_entity_id IS NOT NULL AND
2840: wmti.wip_entity_id = msn.wip_entity_id AND
2841: -- Define but not use or Issue out of store.
2842: msn.current_status IN (WIP_CONSTANTS.DEF_NOT_USED,
2843: WIP_CONSTANTS.OUT_OF_STORES))))
2844: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
2845:
2846: fnd_message.set_name('WIP', 'WIP_INVALID_SERIAL_STATUS');
2847: add_error(p_txn_ids => enums,

Line 2854: -- PROCESS_STATUS to WIP_CONSTANTS.ERROR. Then it will insert all the errors

2850:
2851: END serial_validation;
2852:
2853: -- If there are some errors occur, this routine will set
2854: -- PROCESS_STATUS to WIP_CONSTANTS.ERROR. Then it will insert all the errors
2855: -- into WIP_TXN_INTERFACE_ERRORS
2856: PROCEDURE update_interface_tbl IS
2857: BEGIN
2858: -- there are some errors occur, so set the process_status to error so that

Line 2861: SET wmti.process_status = WIP_CONSTANTS.ERROR

2857: BEGIN
2858: -- there are some errors occur, so set the process_status to error so that
2859: -- move processor will not pick up this record
2860: UPDATE wip_move_txn_interface wmti
2861: SET wmti.process_status = WIP_CONSTANTS.ERROR
2862: WHERE wmti.group_id = g_group_id
2863: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2864: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2865: AND EXISTS

Line 2863: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2859: -- move processor will not pick up this record
2860: UPDATE wip_move_txn_interface wmti
2861: SET wmti.process_status = WIP_CONSTANTS.ERROR
2862: WHERE wmti.group_id = g_group_id
2863: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2864: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2865: AND EXISTS
2866: (SELECT 'X'
2867: FROM wip_txn_interface_errors wtie

Line 2864: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2860: UPDATE wip_move_txn_interface wmti
2861: SET wmti.process_status = WIP_CONSTANTS.ERROR
2862: WHERE wmti.group_id = g_group_id
2863: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2864: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2865: AND EXISTS
2866: (SELECT 'X'
2867: FROM wip_txn_interface_errors wtie
2868: WHERE wtie.transaction_id = wmti.transaction_id);

Line 2888: SET wmti.process_status = WIP_CONSTANTS.ERROR

2884: enums.delete;
2885: -- Users cannot do EZ Completion/EZ Return if an assembly is not transactable
2886: -- or an assembly is not an inventory item.
2887: UPDATE wip_move_txn_interface wmti
2888: SET wmti.process_status = WIP_CONSTANTS.ERROR
2889: WHERE wmti.group_id = g_group_id
2890: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2891: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2892: AND wmti.transaction_type IN (WIP_CONSTANTS.RET_TXN,

Line 2890: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2886: -- or an assembly is not an inventory item.
2887: UPDATE wip_move_txn_interface wmti
2888: SET wmti.process_status = WIP_CONSTANTS.ERROR
2889: WHERE wmti.group_id = g_group_id
2890: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2891: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2892: AND wmti.transaction_type IN (WIP_CONSTANTS.RET_TXN,
2893: WIP_CONSTANTS.COMP_TXN)
2894: AND EXISTS -- Item flag was not set properly.

Line 2891: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2887: UPDATE wip_move_txn_interface wmti
2888: SET wmti.process_status = WIP_CONSTANTS.ERROR
2889: WHERE wmti.group_id = g_group_id
2890: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2891: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2892: AND wmti.transaction_type IN (WIP_CONSTANTS.RET_TXN,
2893: WIP_CONSTANTS.COMP_TXN)
2894: AND EXISTS -- Item flag was not set properly.
2895: (SELECT 'X'

Line 2892: AND wmti.transaction_type IN (WIP_CONSTANTS.RET_TXN,

2888: SET wmti.process_status = WIP_CONSTANTS.ERROR
2889: WHERE wmti.group_id = g_group_id
2890: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2891: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2892: AND wmti.transaction_type IN (WIP_CONSTANTS.RET_TXN,
2893: WIP_CONSTANTS.COMP_TXN)
2894: AND EXISTS -- Item flag was not set properly.
2895: (SELECT 'X'
2896: FROM mtl_system_items msi

Line 2893: WIP_CONSTANTS.COMP_TXN)

2889: WHERE wmti.group_id = g_group_id
2890: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2891: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2892: AND wmti.transaction_type IN (WIP_CONSTANTS.RET_TXN,
2893: WIP_CONSTANTS.COMP_TXN)
2894: AND EXISTS -- Item flag was not set properly.
2895: (SELECT 'X'
2896: FROM mtl_system_items msi
2897: WHERE msi.inventory_item_id = wmti.primary_item_id

Line 2914: -- , then update PROCESS_PHASE to WIP_CONSTANTS.MOVE_PROC. This routine

2910:
2911: -- If pass all the validation, and there is no error, this routine will
2912: -- derive all the rest info (fm_operation_code, fm_department_id,
2913: -- fm_department_code, to_operation_code, to_department_id, to_department_code)
2914: -- , then update PROCESS_PHASE to WIP_CONSTANTS.MOVE_PROC. This routine
2915: -- should be called after we called all the validation code and
2916: -- update_interface_tbl
2917: PROCEDURE derive IS
2918: l_PrevOpSeq NUMBER;

Line 2937: WIP_CONSTANTS.MOVE_PROC

2933: bd1.department_code,
2934: bso2.operation_code,
2935: wo2.department_id,
2936: bd2.department_code,
2937: WIP_CONSTANTS.MOVE_PROC
2938: FROM bom_standard_operations bso1,
2939: bom_standard_operations bso2,
2940: bom_departments bd1,
2941: bom_departments bd2,

Line 2955: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,

2951: AND bso1.standard_operation_id(+) = wo1.standard_operation_id
2952: AND bso2.standard_operation_id(+) = wo2.standard_operation_id
2953: AND wo1.department_id = bd1.department_id
2954: AND wo2.department_id = bd2.department_id
2955: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2956: WIP_CONSTANTS.LOTBASED)
2957: OR
2958: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2959: wo1.repetitive_schedule_id = wmti.repetitive_schedule_id AND

Line 2956: WIP_CONSTANTS.LOTBASED)

2952: AND bso2.standard_operation_id(+) = wo2.standard_operation_id
2953: AND wo1.department_id = bd1.department_id
2954: AND wo2.department_id = bd2.department_id
2955: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2956: WIP_CONSTANTS.LOTBASED)
2957: OR
2958: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2959: wo1.repetitive_schedule_id = wmti.repetitive_schedule_id AND
2960: wo2.repetitive_schedule_id = wmti.repetitive_schedule_id)))

Line 2958: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND

2954: AND wo2.department_id = bd2.department_id
2955: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2956: WIP_CONSTANTS.LOTBASED)
2957: OR
2958: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2959: wo1.repetitive_schedule_id = wmti.repetitive_schedule_id AND
2960: wo2.repetitive_schedule_id = wmti.repetitive_schedule_id)))
2961: WHERE wmti.group_id = g_group_id
2962: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

Line 2962: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2958: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2959: wo1.repetitive_schedule_id = wmti.repetitive_schedule_id AND
2960: wo2.repetitive_schedule_id = wmti.repetitive_schedule_id)))
2961: WHERE wmti.group_id = g_group_id
2962: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2963: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2964:
2965: END derive;
2966:

Line 2963: AND wmti.process_status = WIP_CONSTANTS.RUNNING;

2959: wo1.repetitive_schedule_id = wmti.repetitive_schedule_id AND
2960: wo2.repetitive_schedule_id = wmti.repetitive_schedule_id)))
2961: WHERE wmti.group_id = g_group_id
2962: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2963: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2964:
2965: END derive;
2966:
2967: PROCEDURE validate(p_group_id IN NUMBER,

Line 2980: if (l_logLevel <= wip_constants.trace_logging) then

2976: fnd_msg_pub.initialize;
2977: END IF;
2978:
2979: -- write parameter value to log file
2980: if (l_logLevel <= wip_constants.trace_logging) then
2981: l_params(1).paramName := 'p_group_id';
2982: l_params(1).paramValue := p_group_id;
2983: wip_logger.entryPoint(p_procName => 'wip_move_validator.validate',
2984: p_params => l_params,

Line 3051: if (l_logLevel <= wip_constants.trace_logging) then

3047: update_interface_tbl;
3048: -- derive the rest nessary info
3049: derive;
3050: -- write to the log file
3051: if (l_logLevel <= wip_constants.trace_logging) then
3052: wip_logger.exitPoint(p_procName => 'wip_move_validator.validate',
3053: p_procReturnStatus => fnd_api.g_ret_sts_success,
3054: p_msg => 'procedure complete',
3055: x_returnStatus => l_returnStatus);

Line 3059: if (l_logLevel <= wip_constants.trace_logging) then

3055: x_returnStatus => l_returnStatus);
3056: end if;
3057: EXCEPTION
3058: WHEN others THEN
3059: if (l_logLevel <= wip_constants.trace_logging) then
3060: wip_logger.exitPoint(p_procName => 'wip_move_validator.validate',
3061: p_procReturnStatus => fnd_api.g_ret_sts_unexp_error,
3062: p_msg => 'Unexpected Errors: ' || SQLERRM,
3063: x_returnStatus => l_returnStatus);

Line 3124: and mmt.transaction_type_id in (wip_constants.CPLASSY_TYPE, wip_constants.RETASSY_TYPE)

3120: where mmt.move_transaction_id = p_move_id
3121: and mmt.organization_id = l_org_id
3122: and mmt.transaction_source_id = l_wip_entity_id
3123: and mmt.inventory_item_id = l_assm_item_id
3124: and mmt.transaction_type_id in (wip_constants.CPLASSY_TYPE, wip_constants.RETASSY_TYPE)
3125: and lu.lookup_type = 'WIP_MOVE_TRANSACTION_TYPE'
3126: and lu.lookup_code = decode(mmt.transaction_type_id, wip_constants.CPLASSY_TYPE, wip_constants.comp_txn, wip_constants.RETASSY_TYPE, wip_constants.ret_txn);
3127: exception
3128: -- no inv txn involved; just a plain move txn

Line 3126: and lu.lookup_code = decode(mmt.transaction_type_id, wip_constants.CPLASSY_TYPE, wip_constants.comp_txn, wip_constants.RETASSY_TYPE, wip_constants.ret_txn);

3122: and mmt.transaction_source_id = l_wip_entity_id
3123: and mmt.inventory_item_id = l_assm_item_id
3124: and mmt.transaction_type_id in (wip_constants.CPLASSY_TYPE, wip_constants.RETASSY_TYPE)
3125: and lu.lookup_type = 'WIP_MOVE_TRANSACTION_TYPE'
3126: and lu.lookup_code = decode(mmt.transaction_type_id, wip_constants.CPLASSY_TYPE, wip_constants.comp_txn, wip_constants.RETASSY_TYPE, wip_constants.ret_txn);
3127: exception
3128: -- no inv txn involved; just a plain move txn
3129: when no_data_found then
3130: select meaning

Line 3134: and lookup_code = wip_constants.move_txn;

3130: select meaning
3131: into p_txn_type
3132: from mfg_lookups
3133: where lookup_type = 'WIP_MOVE_TRANSACTION_TYPE'
3134: and lookup_code = wip_constants.move_txn;
3135: when others then
3136: p_txn_type := -1;
3137: end;
3138:

Line 3152: if (l_logLevel <= wip_constants.trace_logging) then

3148: BEGIN
3149: l_logLevel := fnd_log.g_current_runtime_level;
3150:
3151: -- write parameter value to log file
3152: if (l_logLevel <= wip_constants.trace_logging) then
3153: l_params(1).paramName := 'p_group_id';
3154: l_params(1).paramValue := p_group_id;
3155: wip_logger.entryPoint(p_procName => 'wip_move_validator.validateOATxn',
3156: p_params => l_params,

Line 3177: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

3173: wmti.organization_id -- p_inv_org_id
3174: )) BETWEEN
3175: oap.period_start_date AND oap.schedule_close_date)
3176: WHERE wmti.group_id = g_group_id
3177: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3178: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
3179:
3180: -- reset enums table
3181: enums.delete;

Line 3178: AND wmti.process_status = WIP_CONSTANTS.RUNNING;

3174: )) BETWEEN
3175: oap.period_start_date AND oap.schedule_close_date)
3176: WHERE wmti.group_id = g_group_id
3177: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3178: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
3179:
3180: -- reset enums table
3181: enums.delete;
3182: -- Error out if there is no open accout period for the TRANSACTION_DATE

Line 3185: SET wmti.process_status = WIP_CONSTANTS.ERROR

3181: enums.delete;
3182: -- Error out if there is no open accout period for the TRANSACTION_DATE
3183: -- specified or there is no WIP_PERIOD_BALANCES
3184: UPDATE wip_move_txn_interface wmti
3185: SET wmti.process_status = WIP_CONSTANTS.ERROR
3186: WHERE wmti.group_id = g_group_id
3187: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3188: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3189: AND (wmti.acct_period_id IS NULL

Line 3187: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

3183: -- specified or there is no WIP_PERIOD_BALANCES
3184: UPDATE wip_move_txn_interface wmti
3185: SET wmti.process_status = WIP_CONSTANTS.ERROR
3186: WHERE wmti.group_id = g_group_id
3187: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3188: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3189: AND (wmti.acct_period_id IS NULL
3190: OR
3191: NOT EXISTS

Line 3188: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3184: UPDATE wip_move_txn_interface wmti
3185: SET wmti.process_status = WIP_CONSTANTS.ERROR
3186: WHERE wmti.group_id = g_group_id
3187: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3188: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3189: AND (wmti.acct_period_id IS NULL
3190: OR
3191: NOT EXISTS
3192: (SELECT 'X'

Line 3210: SET wmti.process_status = WIP_CONSTANTS.ERROR

3206: enums.delete;
3207: -- Error out if FM_OPERATION_SEQ_NUM/FM_INTRAOPERATION_STEP_TYPE has
3208: -- no move shop floor status attached
3209: UPDATE wip_move_txn_interface wmti
3210: SET wmti.process_status = WIP_CONSTANTS.ERROR
3211: WHERE wmti.group_id = g_group_id
3212: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3213: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3214: AND EXISTS

Line 3212: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

3208: -- no move shop floor status attached
3209: UPDATE wip_move_txn_interface wmti
3210: SET wmti.process_status = WIP_CONSTANTS.ERROR
3211: WHERE wmti.group_id = g_group_id
3212: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3213: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3214: AND EXISTS
3215: (SELECT 'X'
3216: FROM wip_shop_floor_status_codes wsc,

Line 3213: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3209: UPDATE wip_move_txn_interface wmti
3210: SET wmti.process_status = WIP_CONSTANTS.ERROR
3211: WHERE wmti.group_id = g_group_id
3212: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3213: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3214: AND EXISTS
3215: (SELECT 'X'
3216: FROM wip_shop_floor_status_codes wsc,
3217: wip_shop_floor_statuses ws

Line 3225: AND wsc.status_move_flag = WIP_CONSTANTS.NO

3221: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
3222: AND ws.operation_seq_num = wmti.fm_operation_seq_num
3223: AND ws.intraoperation_step_type = wmti.fm_intraoperation_step_type
3224: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
3225: AND wsc.status_move_flag = WIP_CONSTANTS.NO
3226: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE
3227: AND (wmti.source_code IS NULL OR
3228: wmti.source_code <> 'RCV' OR
3229: (wmti.source_code = 'RCV' AND

Line 3254: AND wsc.status_move_flag = WIP_CONSTANTS.NO

3250: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
3251: AND ws.operation_seq_num = wmti.fm_operation_seq_num
3252: AND ws.intraoperation_step_type = wmti.fm_intraoperation_step_type
3253: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
3254: AND wsc.status_move_flag = WIP_CONSTANTS.NO
3255: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE
3256: AND rownum = 1;
3257:
3258: fnd_message.set_name('WIP', 'WIP_SF_STATUS_NO_TXN1');

Line 3270: SET wmti.process_status = WIP_CONSTANTS.ERROR

3266: enums.delete;
3267: -- Error out if user try to easy complete job/schedule that has No Move shop
3268: -- floor status attached to Tomove of the last operation
3269: UPDATE wip_move_txn_interface wmti
3270: SET wmti.process_status = WIP_CONSTANTS.ERROR
3271: WHERE wmti.group_id = g_group_id
3272: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3273: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3274: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

Line 3272: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

3268: -- floor status attached to Tomove of the last operation
3269: UPDATE wip_move_txn_interface wmti
3270: SET wmti.process_status = WIP_CONSTANTS.ERROR
3271: WHERE wmti.group_id = g_group_id
3272: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3273: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3274: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
3275: AND EXISTS
3276: (SELECT 'X'

Line 3273: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3269: UPDATE wip_move_txn_interface wmti
3270: SET wmti.process_status = WIP_CONSTANTS.ERROR
3271: WHERE wmti.group_id = g_group_id
3272: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3273: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3274: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
3275: AND EXISTS
3276: (SELECT 'X'
3277: FROM wip_shop_floor_status_codes wsc,

Line 3274: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

3270: SET wmti.process_status = WIP_CONSTANTS.ERROR
3271: WHERE wmti.group_id = g_group_id
3272: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3273: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3274: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
3275: AND EXISTS
3276: (SELECT 'X'
3277: FROM wip_shop_floor_status_codes wsc,
3278: wip_shop_floor_statuses ws

Line 3284: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE

3280: AND ws.organization_id = wmti.organization_id
3281: AND ws.wip_entity_id = wmti.wip_entity_id
3282: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
3283: AND ws.operation_seq_num = wmti.to_operation_seq_num
3284: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
3285: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
3286: AND wsc.status_move_flag = WIP_CONSTANTS.NO
3287: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE)
3288: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 3286: AND wsc.status_move_flag = WIP_CONSTANTS.NO

3282: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
3283: AND ws.operation_seq_num = wmti.to_operation_seq_num
3284: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
3285: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
3286: AND wsc.status_move_flag = WIP_CONSTANTS.NO
3287: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE)
3288: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
3289:
3290: /* Added the following for SUN enhancement in Bug 9758848*/

Line 3304: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE

3300: AND ws.wip_entity_id = wmti.wip_entity_id
3301: AND wmti.transaction_id = enums(i)
3302: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
3303: AND ws.operation_seq_num = wmti.to_operation_seq_num
3304: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
3305: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
3306: AND wsc.status_move_flag = WIP_CONSTANTS.NO
3307: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE
3308: and rownum = 1;

Line 3306: AND wsc.status_move_flag = WIP_CONSTANTS.NO

3302: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
3303: AND ws.operation_seq_num = wmti.to_operation_seq_num
3304: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
3305: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
3306: AND wsc.status_move_flag = WIP_CONSTANTS.NO
3307: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE
3308: and rownum = 1;
3309:
3310: fnd_message.set_name('WIP', 'WIP_SF_STATUS_NO_TXN2');

Line 3325: SET wmti.process_status = WIP_CONSTANTS.ERROR

3321: enums.delete;
3322: -- Error out if wip_parameter do not allow move over no_move shop floor
3323: -- status, and there are no_move status in between
3324: UPDATE wip_move_txn_interface wmti
3325: SET wmti.process_status = WIP_CONSTANTS.ERROR
3326: WHERE wmti.group_id = g_group_id
3327: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3328: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3329: AND wip_sf_status.count_no_move_statuses(

Line 3327: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

3323: -- status, and there are no_move status in between
3324: UPDATE wip_move_txn_interface wmti
3325: SET wmti.process_status = WIP_CONSTANTS.ERROR
3326: WHERE wmti.group_id = g_group_id
3327: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3328: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3329: AND wip_sf_status.count_no_move_statuses(
3330: wmti.organization_id, -- p_org_id
3331: wmti.wip_entity_id, -- p_wip_id

Line 3328: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3324: UPDATE wip_move_txn_interface wmti
3325: SET wmti.process_status = WIP_CONSTANTS.ERROR
3326: WHERE wmti.group_id = g_group_id
3327: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3328: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3329: AND wip_sf_status.count_no_move_statuses(
3330: wmti.organization_id, -- p_org_id
3331: wmti.wip_entity_id, -- p_wip_id
3332: wmti.line_id, -- p_line_id

Line 3358: and wmti.process_status = WIP_CONSTANTS.ERROR;

3354: wmti.source_code)
3355: into l_sf_status
3356: from wip_move_txn_interface wmti
3357: where wmti.transaction_id = enums(i)
3358: and wmti.process_status = WIP_CONSTANTS.ERROR;
3359: fnd_message.set_name ('WIP', 'WIP_NO_MOVE_STATUS_BETWEEN');
3360: fnd_message.set_token('SF_STATUS', to_char(l_sf_status));
3361: add_error(p_txn_id => enums(i),
3362: p_err_col => 'TO_INTRAOPERATION_STEP_TYPE',

Line 3374: -- Set WMTI.PROCESS_PHASE to WIP_CONSTANTS.MOVE_PROC so that move processing

3370: -- Set WMTI.PROCESS_STATUS to error if there is an error from any
3371: -- validation and insert error message into WIP_TXN_INTERFACE_ERRORS
3372: update_interface_tbl;
3373:
3374: -- Set WMTI.PROCESS_PHASE to WIP_CONSTANTS.MOVE_PROC so that move processing
3375: -- code can process these records.
3376: UPDATE wip_move_txn_interface wmti
3377: SET process_phase = WIP_CONSTANTS.MOVE_PROC
3378: WHERE wmti.group_id = g_group_id

Line 3377: SET process_phase = WIP_CONSTANTS.MOVE_PROC

3373:
3374: -- Set WMTI.PROCESS_PHASE to WIP_CONSTANTS.MOVE_PROC so that move processing
3375: -- code can process these records.
3376: UPDATE wip_move_txn_interface wmti
3377: SET process_phase = WIP_CONSTANTS.MOVE_PROC
3378: WHERE wmti.group_id = g_group_id
3379: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3380: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
3381:

Line 3379: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

3375: -- code can process these records.
3376: UPDATE wip_move_txn_interface wmti
3377: SET process_phase = WIP_CONSTANTS.MOVE_PROC
3378: WHERE wmti.group_id = g_group_id
3379: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3380: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
3381:
3382: -- write to the log file
3383: if (l_logLevel <= wip_constants.trace_logging) then

Line 3380: AND wmti.process_status = WIP_CONSTANTS.RUNNING;

3376: UPDATE wip_move_txn_interface wmti
3377: SET process_phase = WIP_CONSTANTS.MOVE_PROC
3378: WHERE wmti.group_id = g_group_id
3379: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3380: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
3381:
3382: -- write to the log file
3383: if (l_logLevel <= wip_constants.trace_logging) then
3384: wip_logger.exitPoint(p_procName => 'wip_move_validator.validateOATxn',

Line 3383: if (l_logLevel <= wip_constants.trace_logging) then

3379: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3380: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
3381:
3382: -- write to the log file
3383: if (l_logLevel <= wip_constants.trace_logging) then
3384: wip_logger.exitPoint(p_procName => 'wip_move_validator.validateOATxn',
3385: p_procReturnStatus => fnd_api.g_ret_sts_success,
3386: p_msg => 'procedure complete',
3387: x_returnStatus => l_returnStatus);

Line 3391: if (l_logLevel <= wip_constants.trace_logging) then

3387: x_returnStatus => l_returnStatus);
3388: end if;
3389: EXCEPTION
3390: WHEN others THEN
3391: if (l_logLevel <= wip_constants.trace_logging) then
3392: wip_logger.exitPoint(p_procName => 'wip_move_validator.validateOATxn',
3393: p_procReturnStatus => fnd_api.g_ret_sts_unexp_error,
3394: p_msg => 'Unexpected Errors: ' || SQLERRM,
3395: x_returnStatus => l_returnStatus);