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 = UPPER(wmti.organization_code))
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 = UPPER(wmti.organization_code))
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 931: SET wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE

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

Line 933: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

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

Line 934: AND wmti.process_status = WIP_CONSTANTS.RUNNING

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

Line 935: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN

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

Line 942: SET wmti.process_status = WIP_CONSTANTS.ERROR

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

Line 944: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

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

Line 945: AND wmti.process_status = WIP_CONSTANTS.RUNNING

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

Line 960: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE)

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

Line 977: SET wmti.process_status = WIP_CONSTANTS.ERROR

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

Line 979: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

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

Line 980: AND wmti.process_status = WIP_CONSTANTS.RUNNING

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

Line 992: AND wsc.status_move_flag = WIP_CONSTANTS.NO

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

Line 1015: SET wmti.process_status = WIP_CONSTANTS.ERROR

1011: enums.delete;
1012: -- Error out if users try to perform easy completion from Tomove of the
1013: -- last operation
1014: UPDATE wip_move_txn_interface wmti
1015: SET wmti.process_status = WIP_CONSTANTS.ERROR
1016: WHERE wmti.group_id = g_group_id
1017: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1018: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1019: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

Line 1017: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1013: -- last operation
1014: UPDATE wip_move_txn_interface wmti
1015: SET wmti.process_status = WIP_CONSTANTS.ERROR
1016: WHERE wmti.group_id = g_group_id
1017: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1018: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1019: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1020: AND wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1021: AND wmti.fm_operation_seq_num =

Line 1018: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1014: UPDATE wip_move_txn_interface wmti
1015: SET wmti.process_status = WIP_CONSTANTS.ERROR
1016: WHERE wmti.group_id = g_group_id
1017: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1018: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1019: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1020: AND wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1021: AND wmti.fm_operation_seq_num =
1022: (SELECT wo.operation_seq_num

Line 1019: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

1015: SET wmti.process_status = WIP_CONSTANTS.ERROR
1016: WHERE wmti.group_id = g_group_id
1017: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1018: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1019: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1020: AND wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1021: AND wmti.fm_operation_seq_num =
1022: (SELECT wo.operation_seq_num
1023: FROM wip_operations wo

Line 1020: AND wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE

1016: WHERE wmti.group_id = g_group_id
1017: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1018: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1019: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1020: AND wmti.fm_intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1021: AND wmti.fm_operation_seq_num =
1022: (SELECT wo.operation_seq_num
1023: FROM wip_operations wo
1024: WHERE wo.wip_entity_id = wmti.wip_entity_id

Line 1041: SET wmti.process_status = WIP_CONSTANTS.ERROR

1037: enums.delete;
1038: -- Error out if TRANSACTION_TYPE is EZ Return and
1039: -- FM_INTRAOPERATION_STEP_TYPE not equal to Tomove
1040: UPDATE wip_move_txn_interface wmti
1041: SET wmti.process_status = WIP_CONSTANTS.ERROR
1042: WHERE wmti.group_id = g_group_id
1043: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1044: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1045: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN

Line 1043: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1039: -- FM_INTRAOPERATION_STEP_TYPE not equal to Tomove
1040: UPDATE wip_move_txn_interface wmti
1041: SET wmti.process_status = WIP_CONSTANTS.ERROR
1042: WHERE wmti.group_id = g_group_id
1043: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1044: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1045: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
1046: AND wmti.fm_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1047: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1044: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1040: UPDATE wip_move_txn_interface wmti
1041: SET wmti.process_status = WIP_CONSTANTS.ERROR
1042: WHERE wmti.group_id = g_group_id
1043: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1044: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1045: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
1046: AND wmti.fm_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1047: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1048:

Line 1045: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN

1041: SET wmti.process_status = WIP_CONSTANTS.ERROR
1042: WHERE wmti.group_id = g_group_id
1043: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1044: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1045: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
1046: AND wmti.fm_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1047: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1048:
1049: fnd_message.set_name('WIP', 'WIP_EZ_FM_LAST_STEP');

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

1042: WHERE wmti.group_id = g_group_id
1043: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1044: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1045: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
1046: AND wmti.fm_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1047: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1048:
1049: fnd_message.set_name('WIP', 'WIP_EZ_FM_LAST_STEP');
1050: add_error(p_txn_ids => enums,

Line 1074: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1070: AND NVL(wo.repetitive_schedule_id, -1) =
1071: NVL(wmti.repetitive_schedule_id, -1)
1072: AND wo.next_operation_seq_num IS NULL)
1073: WHERE wmti.group_id = g_group_id
1074: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1075: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1076: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1077: AND wmti.to_operation_seq_num IS NULL;
1078:

Line 1075: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1071: NVL(wmti.repetitive_schedule_id, -1)
1072: AND wo.next_operation_seq_num IS NULL)
1073: WHERE wmti.group_id = g_group_id
1074: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1075: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1076: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1077: AND wmti.to_operation_seq_num IS NULL;
1078:
1079: /*Bug 4421485->Even for plain moves we will derive to_operation as

Line 1076: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

1072: AND wo.next_operation_seq_num IS NULL)
1073: WHERE wmti.group_id = g_group_id
1074: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1075: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1076: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1077: AND wmti.to_operation_seq_num IS NULL;
1078:
1079: /*Bug 4421485->Even for plain moves we will derive to_operation as
1080: next count point operation */

Line 1092: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1088: NVL(wmti.repetitive_schedule_id, -1)
1089: AND wo.operation_seq_num > wmti.fm_operation_seq_num
1090: AND wo.count_point_type = 1)
1091: WHERE wmti.group_id = g_group_id
1092: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1093: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1094: AND wmti.transaction_type = WIP_CONSTANTS.MOVE_TXN
1095: AND wmti.to_operation_seq_num IS NULL;
1096:

Line 1093: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1089: AND wo.operation_seq_num > wmti.fm_operation_seq_num
1090: AND wo.count_point_type = 1)
1091: WHERE wmti.group_id = g_group_id
1092: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1093: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1094: AND wmti.transaction_type = WIP_CONSTANTS.MOVE_TXN
1095: AND wmti.to_operation_seq_num IS NULL;
1096:
1097: -- reset enums table

Line 1094: AND wmti.transaction_type = WIP_CONSTANTS.MOVE_TXN

1090: AND wo.count_point_type = 1)
1091: WHERE wmti.group_id = g_group_id
1092: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1093: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1094: AND wmti.transaction_type = WIP_CONSTANTS.MOVE_TXN
1095: AND wmti.to_operation_seq_num IS NULL;
1096:
1097: -- reset enums table
1098: enums.delete;

Line 1102: SET wmti.process_status = WIP_CONSTANTS.ERROR

1098: enums.delete;
1099: -- Error out if TO_OPERATION_SEQ_NUM is null or TO_OPERATION_SEQ_NUM
1100: -- is invalid
1101: UPDATE wip_move_txn_interface wmti
1102: SET wmti.process_status = WIP_CONSTANTS.ERROR
1103: WHERE wmti.group_id = g_group_id
1104: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1105: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1106: AND (wmti.to_operation_seq_num IS NULL

Line 1104: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1100: -- is invalid
1101: UPDATE wip_move_txn_interface wmti
1102: SET wmti.process_status = WIP_CONSTANTS.ERROR
1103: WHERE wmti.group_id = g_group_id
1104: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1105: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1106: AND (wmti.to_operation_seq_num IS NULL
1107: OR
1108: (NOT EXISTS

Line 1105: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1101: UPDATE wip_move_txn_interface wmti
1102: SET wmti.process_status = WIP_CONSTANTS.ERROR
1103: WHERE wmti.group_id = g_group_id
1104: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1105: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1106: AND (wmti.to_operation_seq_num IS NULL
1107: OR
1108: (NOT EXISTS
1109: (SELECT 'X'

Line 1128: SET wmti.process_status = WIP_CONSTANTS.ERROR

1124: enums.delete;
1125: -- Error out if TRANSACTION_TYPE is EZ Ccmplete and TO_OPERATION_SEQ_NUM
1126: -- is not equal to the last operation.
1127: UPDATE wip_move_txn_interface wmti
1128: SET wmti.process_status = WIP_CONSTANTS.ERROR
1129: WHERE wmti.group_id = g_group_id
1130: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1131: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1132: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

Line 1130: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1126: -- is not equal to the last operation.
1127: UPDATE wip_move_txn_interface wmti
1128: SET wmti.process_status = WIP_CONSTANTS.ERROR
1129: WHERE wmti.group_id = g_group_id
1130: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1131: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1132: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1133: AND wmti.to_operation_seq_num <>
1134: (SELECT wo.operation_seq_num

Line 1131: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1127: UPDATE wip_move_txn_interface wmti
1128: SET wmti.process_status = WIP_CONSTANTS.ERROR
1129: WHERE wmti.group_id = g_group_id
1130: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1131: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1132: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1133: AND wmti.to_operation_seq_num <>
1134: (SELECT wo.operation_seq_num
1135: FROM wip_operations wo

Line 1132: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

1128: SET wmti.process_status = WIP_CONSTANTS.ERROR
1129: WHERE wmti.group_id = g_group_id
1130: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1131: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1132: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1133: AND wmti.to_operation_seq_num <>
1134: (SELECT wo.operation_seq_num
1135: FROM wip_operations wo
1136: WHERE wo.wip_entity_id = wmti.wip_entity_id

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

1158: UPDATE wip_move_txn_interface wmti
1159: /*Bug Bug 4421485*/
1160: SET wmti.to_intraoperation_step_type =
1161: DECODE(wmti.transaction_type,
1162: WIP_CONSTANTS.COMP_TXN,WIP_CONSTANTS.TOMOVE, WIP_CONSTANTS.QUEUE)
1163: WHERE wmti.group_id = g_group_id
1164: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1165: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1166: /*Bug Bug 4421485*/

Line 1164: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1160: SET wmti.to_intraoperation_step_type =
1161: DECODE(wmti.transaction_type,
1162: WIP_CONSTANTS.COMP_TXN,WIP_CONSTANTS.TOMOVE, WIP_CONSTANTS.QUEUE)
1163: WHERE wmti.group_id = g_group_id
1164: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1165: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1166: /*Bug Bug 4421485*/
1167: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
1168: WIP_CONSTANTS.MOVE_TXN)

Line 1165: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1161: DECODE(wmti.transaction_type,
1162: WIP_CONSTANTS.COMP_TXN,WIP_CONSTANTS.TOMOVE, WIP_CONSTANTS.QUEUE)
1163: WHERE wmti.group_id = g_group_id
1164: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1165: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1166: /*Bug Bug 4421485*/
1167: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
1168: WIP_CONSTANTS.MOVE_TXN)
1169: AND wmti.to_intraoperation_step_type IS NULL;

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

1163: WHERE wmti.group_id = g_group_id
1164: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1165: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1166: /*Bug Bug 4421485*/
1167: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
1168: WIP_CONSTANTS.MOVE_TXN)
1169: AND wmti.to_intraoperation_step_type IS NULL;
1170:
1171: -- reset enums table

Line 1168: WIP_CONSTANTS.MOVE_TXN)

1164: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1165: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1166: /*Bug Bug 4421485*/
1167: AND wmti.transaction_type IN (WIP_CONSTANTS.COMP_TXN,
1168: WIP_CONSTANTS.MOVE_TXN)
1169: AND wmti.to_intraoperation_step_type IS NULL;
1170:
1171: -- reset enums table
1172: enums.delete;

Line 1175: SET wmti.process_status = WIP_CONSTANTS.ERROR

1171: -- reset enums table
1172: enums.delete;
1173: -- Error out if TO_INTRAOPERATION_STEP_TYPE is null or invalid
1174: UPDATE wip_move_txn_interface wmti
1175: SET wmti.process_status = WIP_CONSTANTS.ERROR
1176: WHERE wmti.group_id = g_group_id
1177: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1178: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1179: AND (wmti.to_intraoperation_step_type IS NULL

Line 1177: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1173: -- Error out if TO_INTRAOPERATION_STEP_TYPE is null or invalid
1174: UPDATE wip_move_txn_interface wmti
1175: SET wmti.process_status = WIP_CONSTANTS.ERROR
1176: WHERE wmti.group_id = g_group_id
1177: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1178: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1179: AND (wmti.to_intraoperation_step_type IS NULL
1180: OR
1181: (NOT EXISTS

Line 1178: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1174: UPDATE wip_move_txn_interface wmti
1175: SET wmti.process_status = WIP_CONSTANTS.ERROR
1176: WHERE wmti.group_id = g_group_id
1177: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1178: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1179: AND (wmti.to_intraoperation_step_type IS NULL
1180: OR
1181: (NOT EXISTS
1182: (SELECT 'X'

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

1191: NVL(wmti.repetitive_schedule_id, -1)
1192: -- Fixed bug 5059521. Since OSFM build routing as it goes, we cannot rely on
1193: -- wo.next_operation_seq_num IS NULL to determine that it is the last
1194: -- operation or not.
1195: AND (((wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
1196: WIP_CONSTANTS.REPETITIVE)
1197: OR
1198: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1199: wmti.transaction_type = WIP_CONSTANTS.COMP_TXN))

Line 1196: WIP_CONSTANTS.REPETITIVE)

1192: -- Fixed bug 5059521. Since OSFM build routing as it goes, we cannot rely on
1193: -- wo.next_operation_seq_num IS NULL to determine that it is the last
1194: -- operation or not.
1195: AND (((wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
1196: WIP_CONSTANTS.REPETITIVE)
1197: OR
1198: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1199: wmti.transaction_type = WIP_CONSTANTS.COMP_TXN))
1200: AND

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

1194: -- operation or not.
1195: AND (((wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
1196: WIP_CONSTANTS.REPETITIVE)
1197: OR
1198: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1199: wmti.transaction_type = WIP_CONSTANTS.COMP_TXN))
1200: AND
1201: ((wvis.record_creator = 'USER' OR
1202: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE)

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

1195: AND (((wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
1196: WIP_CONSTANTS.REPETITIVE)
1197: OR
1198: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1199: wmti.transaction_type = WIP_CONSTANTS.COMP_TXN))
1200: AND
1201: ((wvis.record_creator = 'USER' OR
1202: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE)
1203: OR

Line 1202: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE)

1198: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1199: wmti.transaction_type = WIP_CONSTANTS.COMP_TXN))
1200: AND
1201: ((wvis.record_creator = 'USER' OR
1202: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE)
1203: OR
1204: (wvis.record_creator = 'SYSTEM' AND
1205: wo.next_operation_seq_num IS NULL)))
1206: OR

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

1203: OR
1204: (wvis.record_creator = 'SYSTEM' AND
1205: wo.next_operation_seq_num IS NULL)))
1206: OR
1207: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1208: wmti.transaction_type <> WIP_CONSTANTS.COMP_TXN AND
1209: (wvis.record_creator = 'USER' OR
1210: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE))))))
1211:

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

1204: (wvis.record_creator = 'SYSTEM' AND
1205: wo.next_operation_seq_num IS NULL)))
1206: OR
1207: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1208: wmti.transaction_type <> WIP_CONSTANTS.COMP_TXN AND
1209: (wvis.record_creator = 'USER' OR
1210: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE))))))
1211:
1212: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

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

1206: OR
1207: (wmti.entity_type = WIP_CONSTANTS.LOTBASED AND
1208: wmti.transaction_type <> WIP_CONSTANTS.COMP_TXN AND
1209: (wvis.record_creator = 'USER' OR
1210: wvis.step_lookup_type = WIP_CONSTANTS.QUEUE))))))
1211:
1212: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1213:
1214: fnd_message.set_name('WIP', 'WIP_NOT_VALID');

Line 1225: SET wmti.process_status = WIP_CONSTANTS.ERROR

1221: enums.delete;
1222: -- Error out if users try to move to the same operation and step as the
1223: -- FM_OPERATION_SEQ_NUM and FM_INTRAOPERATION_STEP_TYPE
1224: UPDATE wip_move_txn_interface wmti
1225: SET wmti.process_status = WIP_CONSTANTS.ERROR
1226: WHERE wmti.group_id = g_group_id
1227: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1228: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1229: AND wmti.fm_operation_seq_num = wmti.to_operation_seq_num

Line 1227: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1223: -- FM_OPERATION_SEQ_NUM and FM_INTRAOPERATION_STEP_TYPE
1224: UPDATE wip_move_txn_interface wmti
1225: SET wmti.process_status = WIP_CONSTANTS.ERROR
1226: WHERE wmti.group_id = g_group_id
1227: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1228: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1229: AND wmti.fm_operation_seq_num = wmti.to_operation_seq_num
1230: AND wmti.fm_intraoperation_step_type = wmti.to_intraoperation_step_type
1231: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1228: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1224: UPDATE wip_move_txn_interface wmti
1225: SET wmti.process_status = WIP_CONSTANTS.ERROR
1226: WHERE wmti.group_id = g_group_id
1227: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1228: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1229: AND wmti.fm_operation_seq_num = wmti.to_operation_seq_num
1230: AND wmti.fm_intraoperation_step_type = wmti.to_intraoperation_step_type
1231: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1232:

Line 1243: SET wmti.process_status = WIP_CONSTANTS.ERROR

1239: enums.delete;
1240: -- Error out if TRANSACTION_TYPE is EZ Complete and
1241: -- TO_INTRAOPERATION_STEP_TYPE not equal to Tomove
1242: UPDATE wip_move_txn_interface wmti
1243: SET wmti.process_status = WIP_CONSTANTS.ERROR
1244: WHERE wmti.group_id = g_group_id
1245: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1246: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1247: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

Line 1245: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1241: -- TO_INTRAOPERATION_STEP_TYPE not equal to Tomove
1242: UPDATE wip_move_txn_interface wmti
1243: SET wmti.process_status = WIP_CONSTANTS.ERROR
1244: WHERE wmti.group_id = g_group_id
1245: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1246: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1247: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1248: AND wmti.to_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1249: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1246: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1242: UPDATE wip_move_txn_interface wmti
1243: SET wmti.process_status = WIP_CONSTANTS.ERROR
1244: WHERE wmti.group_id = g_group_id
1245: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1246: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1247: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1248: AND wmti.to_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1249: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1250:

Line 1247: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

1243: SET wmti.process_status = WIP_CONSTANTS.ERROR
1244: WHERE wmti.group_id = g_group_id
1245: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1246: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1247: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1248: AND wmti.to_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1249: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1250:
1251: fnd_message.set_name('WIP', 'WIP_EZ_TO_LAST_STEP');

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

1244: WHERE wmti.group_id = g_group_id
1245: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1246: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1247: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1248: AND wmti.to_intraoperation_step_type <> WIP_CONSTANTS.TOMOVE
1249: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1250:
1251: fnd_message.set_name('WIP', 'WIP_EZ_TO_LAST_STEP');
1252: add_error(p_txn_ids => enums,

Line 1261: SET wmti.process_status = WIP_CONSTANTS.ERROR

1257: enums.delete;
1258: -- Error out if user try to easy complete job/schedule that has No Move shop
1259: -- floor status attached to Tomove of the last operation
1260: UPDATE wip_move_txn_interface wmti
1261: SET wmti.process_status = WIP_CONSTANTS.ERROR
1262: WHERE wmti.group_id = g_group_id
1263: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1264: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1265: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

Line 1263: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1259: -- floor status attached to Tomove of the last operation
1260: UPDATE wip_move_txn_interface wmti
1261: SET wmti.process_status = WIP_CONSTANTS.ERROR
1262: WHERE wmti.group_id = g_group_id
1263: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1264: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1265: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1266: AND EXISTS
1267: (SELECT 'X'

Line 1264: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1260: UPDATE wip_move_txn_interface wmti
1261: SET wmti.process_status = WIP_CONSTANTS.ERROR
1262: WHERE wmti.group_id = g_group_id
1263: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1264: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1265: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1266: AND EXISTS
1267: (SELECT 'X'
1268: FROM wip_shop_floor_status_codes wsc,

Line 1265: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

1261: SET wmti.process_status = WIP_CONSTANTS.ERROR
1262: WHERE wmti.group_id = g_group_id
1263: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1264: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1265: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
1266: AND EXISTS
1267: (SELECT 'X'
1268: FROM wip_shop_floor_status_codes wsc,
1269: wip_shop_floor_statuses ws

Line 1275: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE

1271: AND ws.organization_id = wmti.organization_id
1272: AND ws.wip_entity_id = wmti.wip_entity_id
1273: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
1274: AND ws.operation_seq_num = wmti.to_operation_seq_num
1275: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1276: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
1277: AND wsc.status_move_flag = WIP_CONSTANTS.NO
1278: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE)
1279: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1277: AND wsc.status_move_flag = WIP_CONSTANTS.NO

1273: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
1274: AND ws.operation_seq_num = wmti.to_operation_seq_num
1275: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
1276: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
1277: AND wsc.status_move_flag = WIP_CONSTANTS.NO
1278: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE)
1279: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1280:
1281: fnd_message.set_name('WIP', 'WIP_STATUS_NO_TXN2');

Line 1291: SET wmti.process_status = WIP_CONSTANTS.ERROR

1287: enums.delete;
1288: -- Error out if wip_parameter do not allow move over no_move shop floor
1289: -- status, and there are no_move status in between
1290: UPDATE wip_move_txn_interface wmti
1291: SET wmti.process_status = WIP_CONSTANTS.ERROR
1292: WHERE wmti.group_id = g_group_id
1293: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1294: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1295: AND wip_sf_status.count_no_move_statuses(

Line 1293: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1289: -- status, and there are no_move status in between
1290: UPDATE wip_move_txn_interface wmti
1291: SET wmti.process_status = WIP_CONSTANTS.ERROR
1292: WHERE wmti.group_id = g_group_id
1293: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1294: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1295: AND wip_sf_status.count_no_move_statuses(
1296: wmti.organization_id, -- p_org_id
1297: wmti.wip_entity_id, -- p_wip_id

Line 1294: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1290: UPDATE wip_move_txn_interface wmti
1291: SET wmti.process_status = WIP_CONSTANTS.ERROR
1292: WHERE wmti.group_id = g_group_id
1293: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1294: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1295: AND wip_sf_status.count_no_move_statuses(
1296: wmti.organization_id, -- p_org_id
1297: wmti.wip_entity_id, -- p_wip_id
1298: wmti.line_id, -- p_line_id

Line 1322: SET wmti.process_status = WIP_CONSTANTS.ERROR

1318: enums.delete;
1319:
1320: -- Error out if TRANSACTION_QUANTITY is negative or zero
1321: UPDATE wip_move_txn_interface wmti
1322: SET wmti.process_status = WIP_CONSTANTS.ERROR
1323: WHERE wmti.group_id = g_group_id
1324: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1325: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1326: AND wmti.transaction_quantity <= 0

Line 1324: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1320: -- Error out if TRANSACTION_QUANTITY is negative or zero
1321: UPDATE wip_move_txn_interface wmti
1322: SET wmti.process_status = WIP_CONSTANTS.ERROR
1323: WHERE wmti.group_id = g_group_id
1324: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1325: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1326: AND wmti.transaction_quantity <= 0
1327: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1328:

Line 1325: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1321: UPDATE wip_move_txn_interface wmti
1322: SET wmti.process_status = WIP_CONSTANTS.ERROR
1323: WHERE wmti.group_id = g_group_id
1324: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1325: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1326: AND wmti.transaction_quantity <= 0
1327: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1328:
1329: fnd_message.set_name('MFG', 'MFG_GREATER_THAN');

Line 1346: SET wmti.process_status = WIP_CONSTANTS.ERROR

1342: -- reset enums table
1343: enums.delete;
1344: -- Error out if TRANSACTION_UOM is invalid
1345: UPDATE wip_move_txn_interface wmti
1346: SET wmti.process_status = WIP_CONSTANTS.ERROR
1347: WHERE wmti.group_id = g_group_id
1348: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1349: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1350: AND NOT EXISTS

Line 1348: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1344: -- Error out if TRANSACTION_UOM is invalid
1345: UPDATE wip_move_txn_interface wmti
1346: SET wmti.process_status = WIP_CONSTANTS.ERROR
1347: WHERE wmti.group_id = g_group_id
1348: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1349: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1350: AND NOT EXISTS
1351: (SELECT 'X'
1352: FROM mtl_item_uoms_view miuv

Line 1349: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1345: UPDATE wip_move_txn_interface wmti
1346: SET wmti.process_status = WIP_CONSTANTS.ERROR
1347: WHERE wmti.group_id = g_group_id
1348: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1349: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1350: AND NOT EXISTS
1351: (SELECT 'X'
1352: FROM mtl_item_uoms_view miuv
1353: WHERE miuv.organization_id = wmti.organization_id

Line 1378: SET wmti.process_status = WIP_CONSTANTS.ERROR

1374: enums.delete;
1375:
1376: -- Error out if OVERCOMPLETION_TRANSACTION_QTY is negative or zero
1377: UPDATE wip_move_txn_interface wmti
1378: SET wmti.process_status = WIP_CONSTANTS.ERROR
1379: WHERE wmti.group_id = g_group_id
1380: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1381: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1382: AND wmti.overcompletion_transaction_qty IS NOT NULL

Line 1380: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1376: -- Error out if OVERCOMPLETION_TRANSACTION_QTY is negative or zero
1377: UPDATE wip_move_txn_interface wmti
1378: SET wmti.process_status = WIP_CONSTANTS.ERROR
1379: WHERE wmti.group_id = g_group_id
1380: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1381: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1382: AND wmti.overcompletion_transaction_qty IS NOT NULL
1383: AND wmti.overcompletion_transaction_qty <= 0
1384: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1381: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1377: UPDATE wip_move_txn_interface wmti
1378: SET wmti.process_status = WIP_CONSTANTS.ERROR
1379: WHERE wmti.group_id = g_group_id
1380: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1381: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1382: AND wmti.overcompletion_transaction_qty IS NOT NULL
1383: AND wmti.overcompletion_transaction_qty <= 0
1384: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1385:

Line 1398: SET wmti.process_status = WIP_CONSTANTS.ERROR

1394: enums.delete;
1395: -- Error out if OVERCOMPLETION_TRANSACTION_QTY is greater than
1396: -- TRANSACTION_QUANTITY
1397: UPDATE wip_move_txn_interface wmti
1398: SET wmti.process_status = WIP_CONSTANTS.ERROR
1399: WHERE wmti.group_id = g_group_id
1400: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1401: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1402: AND wmti.overcompletion_transaction_qty IS NOT NULL

Line 1400: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1396: -- TRANSACTION_QUANTITY
1397: UPDATE wip_move_txn_interface wmti
1398: SET wmti.process_status = WIP_CONSTANTS.ERROR
1399: WHERE wmti.group_id = g_group_id
1400: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1401: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1402: AND wmti.overcompletion_transaction_qty IS NOT NULL
1403: AND wmti.overcompletion_transaction_qty > wmti.transaction_quantity
1404: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1401: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1397: UPDATE wip_move_txn_interface wmti
1398: SET wmti.process_status = WIP_CONSTANTS.ERROR
1399: WHERE wmti.group_id = g_group_id
1400: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1401: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1402: AND wmti.overcompletion_transaction_qty IS NOT NULL
1403: AND wmti.overcompletion_transaction_qty > wmti.transaction_quantity
1404: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1405:

Line 1417: SET wmti.process_status = WIP_CONSTANTS.ERROR

1413: -- reset enums table
1414: enums.delete;
1415: -- Error out if user try to do over Return
1416: UPDATE wip_move_txn_interface wmti
1417: SET wmti.process_status = WIP_CONSTANTS.ERROR
1418: WHERE wmti.group_id = g_group_id
1419: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1420: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1421: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN

Line 1419: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1415: -- Error out if user try to do over Return
1416: UPDATE wip_move_txn_interface wmti
1417: SET wmti.process_status = WIP_CONSTANTS.ERROR
1418: WHERE wmti.group_id = g_group_id
1419: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1420: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1421: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
1422: AND wmti.overcompletion_transaction_qty IS NOT NULL
1423: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 1420: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1416: UPDATE wip_move_txn_interface wmti
1417: SET wmti.process_status = WIP_CONSTANTS.ERROR
1418: WHERE wmti.group_id = g_group_id
1419: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1420: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1421: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
1422: AND wmti.overcompletion_transaction_qty IS NOT NULL
1423: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1424:

Line 1421: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN

1417: SET wmti.process_status = WIP_CONSTANTS.ERROR
1418: WHERE wmti.group_id = g_group_id
1419: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1420: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1421: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN
1422: AND wmti.overcompletion_transaction_qty IS NOT NULL
1423: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1424:
1425: fnd_message.set_name('WIP', 'WIP_NO_OC_RET');

Line 1434: SET wmti.process_status = WIP_CONSTANTS.ERROR

1430: -- reset enums table
1431: enums.delete;
1432: -- Error out if user try to do over Return from Scrap/Return from Reject
1433: UPDATE wip_move_txn_interface wmti
1434: SET wmti.process_status = WIP_CONSTANTS.ERROR
1435: WHERE wmti.group_id = g_group_id
1436: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1437: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1438: AND wmti.fm_intraoperation_step_type IN (WIP_CONSTANTS.SCRAP,

Line 1436: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1432: -- Error out if user try to do over Return from Scrap/Return from Reject
1433: UPDATE wip_move_txn_interface wmti
1434: SET wmti.process_status = WIP_CONSTANTS.ERROR
1435: WHERE wmti.group_id = g_group_id
1436: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1437: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1438: AND wmti.fm_intraoperation_step_type IN (WIP_CONSTANTS.SCRAP,
1439: WIP_CONSTANTS.REJECT)
1440: AND wmti.overcompletion_transaction_qty IS NOT NULL

Line 1437: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1433: UPDATE wip_move_txn_interface wmti
1434: SET wmti.process_status = WIP_CONSTANTS.ERROR
1435: WHERE wmti.group_id = g_group_id
1436: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1437: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1438: AND wmti.fm_intraoperation_step_type IN (WIP_CONSTANTS.SCRAP,
1439: WIP_CONSTANTS.REJECT)
1440: AND wmti.overcompletion_transaction_qty IS NOT NULL
1441: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

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

1434: SET wmti.process_status = WIP_CONSTANTS.ERROR
1435: WHERE wmti.group_id = g_group_id
1436: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1437: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1438: AND wmti.fm_intraoperation_step_type IN (WIP_CONSTANTS.SCRAP,
1439: WIP_CONSTANTS.REJECT)
1440: AND wmti.overcompletion_transaction_qty IS NOT NULL
1441: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1442:

Line 1439: WIP_CONSTANTS.REJECT)

1435: WHERE wmti.group_id = g_group_id
1436: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1437: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1438: AND wmti.fm_intraoperation_step_type IN (WIP_CONSTANTS.SCRAP,
1439: WIP_CONSTANTS.REJECT)
1440: AND wmti.overcompletion_transaction_qty IS NOT NULL
1441: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
1442:
1443: fnd_message.set_name('WIP', 'WIP_NO_OC_SCR_REJ');

Line 1453: SET wmti.process_status = WIP_CONSTANTS.ERROR

1449: enums.delete;
1450: -- Error out if OVERCOMPLETION_TRANSACTION_QTY is specified for backward
1451: -- move txns
1452: UPDATE wip_move_txn_interface wmti
1453: SET wmti.process_status = WIP_CONSTANTS.ERROR
1454: WHERE wmti.group_id = g_group_id
1455: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1456: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1457: AND (wmti.to_operation_seq_num < wmti.fm_operation_seq_num OR

Line 1455: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1451: -- move txns
1452: UPDATE wip_move_txn_interface wmti
1453: SET wmti.process_status = WIP_CONSTANTS.ERROR
1454: WHERE wmti.group_id = g_group_id
1455: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1456: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1457: AND (wmti.to_operation_seq_num < wmti.fm_operation_seq_num OR
1458: (wmti.to_operation_seq_num = wmti.fm_operation_seq_num AND
1459: wmti.to_intraoperation_step_type <

Line 1456: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1452: UPDATE wip_move_txn_interface wmti
1453: SET wmti.process_status = WIP_CONSTANTS.ERROR
1454: WHERE wmti.group_id = g_group_id
1455: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1456: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1457: AND (wmti.to_operation_seq_num < wmti.fm_operation_seq_num OR
1458: (wmti.to_operation_seq_num = wmti.fm_operation_seq_num AND
1459: wmti.to_intraoperation_step_type <
1460: wmti.fm_intraoperation_step_type))

Line 1480: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1476: -- Generate TRANSACTION_ID if user does not provide this value
1477: UPDATE wip_move_txn_interface wmti
1478: SET wmti.transaction_id = wip_transactions_s.nextval
1479: WHERE wmti.group_id = g_group_id
1480: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1481: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1482: AND wmti.transaction_id IS NULL;
1483:
1484: -- Set Error Message

Line 1481: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1477: UPDATE wip_move_txn_interface wmti
1478: SET wmti.transaction_id = wip_transactions_s.nextval
1479: WHERE wmti.group_id = g_group_id
1480: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1481: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1482: AND wmti.transaction_id IS NULL;
1483:
1484: -- Set Error Message
1485: fnd_message.set_name('WIP', 'WIP_NOT_VALID');

Line 1517: AND wmti1.process_phase = WIP_CONSTANTS.MOVE_VAL

1513: wmti1.program_id,
1514: wmti1.program_update_date
1515: FROM wip_move_txn_interface wmti1
1516: WHERE wmti1.group_id = g_group_id
1517: AND wmti1.process_phase = WIP_CONSTANTS.MOVE_VAL
1518: AND wmti1.process_status = WIP_CONSTANTS.RUNNING
1519: AND (EXISTS
1520: (SELECT 'X'
1521: FROM wip_move_transactions wmt

Line 1518: AND wmti1.process_status = WIP_CONSTANTS.RUNNING

1514: wmti1.program_update_date
1515: FROM wip_move_txn_interface wmti1
1516: WHERE wmti1.group_id = g_group_id
1517: AND wmti1.process_phase = WIP_CONSTANTS.MOVE_VAL
1518: AND wmti1.process_status = WIP_CONSTANTS.RUNNING
1519: AND (EXISTS
1520: (SELECT 'X'
1521: FROM wip_move_transactions wmt
1522: WHERE wmt.transaction_id = wmti1.transaction_id)

Line 1542: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,

1538: wmti.organization_id org_id,
1539: wmti.primary_item_id item_id,
1540: wmti.primary_quantity primary_qty,
1541: DECODE(msik.serial_number_control_code,
1542: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,
1543: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,
1544: fnd_api.g_false) is_ser_ctrl,
1545: DECODE(msik.lot_control_code,
1546: WIP_CONSTANTS.LOT, fnd_api.g_true,

Line 1543: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,

1539: wmti.primary_item_id item_id,
1540: wmti.primary_quantity primary_qty,
1541: DECODE(msik.serial_number_control_code,
1542: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,
1543: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,
1544: fnd_api.g_false) is_ser_ctrl,
1545: DECODE(msik.lot_control_code,
1546: WIP_CONSTANTS.LOT, fnd_api.g_true,
1547: fnd_api.g_false) is_lot_ctrl,

Line 1546: WIP_CONSTANTS.LOT, fnd_api.g_true,

1542: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,
1543: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,
1544: fnd_api.g_false) is_ser_ctrl,
1545: DECODE(msik.lot_control_code,
1546: WIP_CONSTANTS.LOT, fnd_api.g_true,
1547: fnd_api.g_false) is_lot_ctrl,
1548: DECODE(msik.revision_qty_control_code,
1549: WIP_CONSTANTS.REV, fnd_api.g_true,
1550: fnd_api.g_false) is_rev_ctrl,

Line 1549: WIP_CONSTANTS.REV, fnd_api.g_true,

1545: DECODE(msik.lot_control_code,
1546: WIP_CONSTANTS.LOT, fnd_api.g_true,
1547: fnd_api.g_false) is_lot_ctrl,
1548: DECODE(msik.revision_qty_control_code,
1549: WIP_CONSTANTS.REV, fnd_api.g_true,
1550: fnd_api.g_false) is_rev_ctrl,
1551: DECODE(msik.revision_qty_control_code, -- revision
1552: WIP_CONSTANTS.REV, NVL(wdj.bom_revision,
1553: bom_revisions.get_item_revision_fn

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

1548: DECODE(msik.revision_qty_control_code,
1549: WIP_CONSTANTS.REV, fnd_api.g_true,
1550: fnd_api.g_false) is_rev_ctrl,
1551: DECODE(msik.revision_qty_control_code, -- revision
1552: WIP_CONSTANTS.REV, NVL(wdj.bom_revision,
1553: bom_revisions.get_item_revision_fn
1554: ('EXCLUDE_OPEN_HOLD', -- eco_status
1555: 'ALL', -- examine_type
1556: wmti.organization_id, -- org_id

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

1572: AND wdj.organization_id = msik.organization_id
1573: AND wdj.organization_id = mp.organization_id
1574: AND wmti.wip_entity_id = wdj.wip_entity_id
1575: AND wmti.organization_id = wdj.organization_id
1576: AND wmti.entity_type <> WIP_CONSTANTS.REPETITIVE
1577: AND wmti.group_id = g_group_id
1578: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1579: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1580: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;

Line 1578: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1574: AND wmti.wip_entity_id = wdj.wip_entity_id
1575: AND wmti.organization_id = wdj.organization_id
1576: AND wmti.entity_type <> WIP_CONSTANTS.REPETITIVE
1577: AND wmti.group_id = g_group_id
1578: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1579: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1580: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;
1581:
1582:

Line 1579: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1575: AND wmti.organization_id = wdj.organization_id
1576: AND wmti.entity_type <> WIP_CONSTANTS.REPETITIVE
1577: AND wmti.group_id = g_group_id
1578: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1579: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1580: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;
1581:
1582:
1583: CURSOR c_repAvailQty IS

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

1576: AND wmti.entity_type <> WIP_CONSTANTS.REPETITIVE
1577: AND wmti.group_id = g_group_id
1578: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1579: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1580: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;
1581:
1582:
1583: CURSOR c_repAvailQty IS
1584: SELECT wmti.transaction_id txn_id,

Line 1589: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,

1585: wmti.organization_id org_id,
1586: wmti.primary_item_id item_id,
1587: wmti.primary_quantity primary_qty,
1588: DECODE(msik.serial_number_control_code,
1589: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,
1590: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,
1591: fnd_api.g_false) is_ser_ctrl,
1592: DECODE(msik.lot_control_code,
1593: WIP_CONSTANTS.LOT, fnd_api.g_true,

Line 1590: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,

1586: wmti.primary_item_id item_id,
1587: wmti.primary_quantity primary_qty,
1588: DECODE(msik.serial_number_control_code,
1589: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,
1590: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,
1591: fnd_api.g_false) is_ser_ctrl,
1592: DECODE(msik.lot_control_code,
1593: WIP_CONSTANTS.LOT, fnd_api.g_true,
1594: fnd_api.g_false) is_lot_ctrl,

Line 1593: WIP_CONSTANTS.LOT, fnd_api.g_true,

1589: WIP_CONSTANTS.FULL_SN, fnd_api.g_true,
1590: WIP_CONSTANTS.DYN_RCV_SN, fnd_api.g_true,
1591: fnd_api.g_false) is_ser_ctrl,
1592: DECODE(msik.lot_control_code,
1593: WIP_CONSTANTS.LOT, fnd_api.g_true,
1594: fnd_api.g_false) is_lot_ctrl,
1595: DECODE(msik.revision_qty_control_code,
1596: WIP_CONSTANTS.REV, fnd_api.g_true,
1597: fnd_api.g_false) is_rev_ctrl,

Line 1596: WIP_CONSTANTS.REV, fnd_api.g_true,

1592: DECODE(msik.lot_control_code,
1593: WIP_CONSTANTS.LOT, fnd_api.g_true,
1594: fnd_api.g_false) is_lot_ctrl,
1595: DECODE(msik.revision_qty_control_code,
1596: WIP_CONSTANTS.REV, fnd_api.g_true,
1597: fnd_api.g_false) is_rev_ctrl,
1598: DECODE(msik.revision_qty_control_code, -- revision
1599: WIP_CONSTANTS.REV, NVL(wrs.bom_revision,
1600: bom_revisions.get_item_revision_fn

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

1595: DECODE(msik.revision_qty_control_code,
1596: WIP_CONSTANTS.REV, fnd_api.g_true,
1597: fnd_api.g_false) is_rev_ctrl,
1598: DECODE(msik.revision_qty_control_code, -- revision
1599: WIP_CONSTANTS.REV, NVL(wrs.bom_revision,
1600: bom_revisions.get_item_revision_fn
1601: ('EXCLUDE_OPEN_HOLD', -- eco_status
1602: 'ALL', -- examine_type
1603: wmti.organization_id, -- org_id

Line 1629: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE

1625: AND wrs.repetitive_schedule_id = wmti.repetitive_schedule_id
1626: AND wri.organization_id = wmti.organization_id
1627: AND wri.wip_entity_id = wmti.wip_entity_id
1628: AND wri.line_id = wmti.line_id
1629: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
1630: AND wmti.group_id = g_group_id
1631: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1632: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1633: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;

Line 1631: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1627: AND wri.wip_entity_id = wmti.wip_entity_id
1628: AND wri.line_id = wmti.line_id
1629: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
1630: AND wmti.group_id = g_group_id
1631: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1632: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1633: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;
1634:
1635: l_availQty c_availQty%ROWTYPE;

Line 1632: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1628: AND wri.line_id = wmti.line_id
1629: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
1630: AND wmti.group_id = g_group_id
1631: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1632: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1633: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;
1634:
1635: l_availQty c_availQty%ROWTYPE;
1636: l_repAvailQty c_repAvailQty%ROWTYPE;

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

1629: AND wmti.entity_type = WIP_CONSTANTS.REPETITIVE
1630: AND wmti.group_id = g_group_id
1631: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1632: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1633: AND wmti.transaction_type = WIP_CONSTANTS.RET_TXN;
1634:
1635: l_availQty c_availQty%ROWTYPE;
1636: l_repAvailQty c_repAvailQty%ROWTYPE;
1637: l_returnStatus VARCHAR2(1);

Line 1658: WIP_CONSTANTS.INV_MAX_PRECISION)

1654:
1655: UPDATE wip_move_txn_interface wmti
1656: SET wmti.primary_quantity =
1657: (SELECT ROUND(wmti.transaction_quantity * mucv.conversion_rate,
1658: WIP_CONSTANTS.INV_MAX_PRECISION)
1659: FROM mtl_uom_conversions_view mucv
1660: WHERE mucv.organization_id = wmti.organization_id
1661: AND mucv.inventory_item_id = wmti.primary_item_id
1662: AND mucv.uom_code = wmti.transaction_uom)

Line 1664: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1660: WHERE mucv.organization_id = wmti.organization_id
1661: AND mucv.inventory_item_id = wmti.primary_item_id
1662: AND mucv.uom_code = wmti.transaction_uom)
1663: WHERE wmti.group_id = g_group_id
1664: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1665: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
1666: --AND wmti.primary_quantity IS NULL;
1667:
1668: /* End of bug fix 5000113.

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

1661: AND mucv.inventory_item_id = wmti.primary_item_id
1662: AND mucv.uom_code = wmti.transaction_uom)
1663: WHERE wmti.group_id = g_group_id
1664: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1665: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
1666: --AND wmti.primary_quantity IS NULL;
1667:
1668: /* End of bug fix 5000113.
1669:

Line 1708: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1704: wmti.program_id,
1705: wmti.program_update_date
1706: FROM wip_move_txn_interface wmti
1707: WHERE wmti.group_id = g_group_id
1708: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1709: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1710: AND wmti.primary_quantity = 0;
1711:
1712: -- Set Error Message

Line 1709: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1705: wmti.program_update_date
1706: FROM wip_move_txn_interface wmti
1707: WHERE wmti.group_id = g_group_id
1708: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1709: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1710: AND wmti.primary_quantity = 0;
1711:
1712: -- Set Error Message
1713: fnd_message.set_name('WIP', 'WIP_ID_CODE_COMBINATION');

Line 1754: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1750: WHERE mucv.organization_id = wmti.organization_id
1751: AND mucv.inventory_item_id = wmti.primary_item_id
1752: AND mucv.uom_code = wmti.transaction_uom
1753: AND wmti.group_id = g_group_id
1754: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1755: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1756: -- Fixed bug 4900010. Round both transaction_quantity and
1757: -- primary_quantity before making comparison.
1758: AND ROUND(wmti.transaction_quantity * mucv.conversion_rate,

Line 1755: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1751: AND mucv.inventory_item_id = wmti.primary_item_id
1752: AND mucv.uom_code = wmti.transaction_uom
1753: AND wmti.group_id = g_group_id
1754: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1755: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1756: -- Fixed bug 4900010. Round both transaction_quantity and
1757: -- primary_quantity before making comparison.
1758: AND ROUND(wmti.transaction_quantity * mucv.conversion_rate,
1759: WIP_CONSTANTS.INV_MAX_PRECISION) <>

Line 1759: WIP_CONSTANTS.INV_MAX_PRECISION) <>

1755: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1756: -- Fixed bug 4900010. Round both transaction_quantity and
1757: -- primary_quantity before making comparison.
1758: AND ROUND(wmti.transaction_quantity * mucv.conversion_rate,
1759: WIP_CONSTANTS.INV_MAX_PRECISION) <>
1760: ROUND(wmti.primary_quantity, WIP_CONSTANTS.INV_MAX_PRECISION);
1761:
1762: -- Set Error Message
1763: /* Fix for Bug#4192541. Removed following check as this is only warning

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

1756: -- Fixed bug 4900010. Round both transaction_quantity and
1757: -- primary_quantity before making comparison.
1758: AND ROUND(wmti.transaction_quantity * mucv.conversion_rate,
1759: WIP_CONSTANTS.INV_MAX_PRECISION) <>
1760: ROUND(wmti.primary_quantity, WIP_CONSTANTS.INV_MAX_PRECISION);
1761:
1762: -- Set Error Message
1763: /* Fix for Bug#4192541. Removed following check as this is only warning
1764: condition

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

1802: AND wo.wip_entity_id = wmti.wip_entity_id
1803: AND NVL(wo.repetitive_schedule_id, -1) =
1804: NVL(wmti.repetitive_schedule_id, -1)
1805: AND wo.operation_seq_num = wmti.fm_operation_seq_num
1806: AND wmti.fm_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1807: WIP_CONSTANTS.REJECT)
1808: AND wmti.to_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1809: WIP_CONSTANTS.REJECT)
1810: AND wmti.group_id = g_group_id

Line 1807: WIP_CONSTANTS.REJECT)

1803: AND NVL(wo.repetitive_schedule_id, -1) =
1804: NVL(wmti.repetitive_schedule_id, -1)
1805: AND wo.operation_seq_num = wmti.fm_operation_seq_num
1806: AND wmti.fm_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1807: WIP_CONSTANTS.REJECT)
1808: AND wmti.to_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1809: WIP_CONSTANTS.REJECT)
1810: AND wmti.group_id = g_group_id
1811: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

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

1804: NVL(wmti.repetitive_schedule_id, -1)
1805: AND wo.operation_seq_num = wmti.fm_operation_seq_num
1806: AND wmti.fm_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1807: WIP_CONSTANTS.REJECT)
1808: AND wmti.to_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1809: WIP_CONSTANTS.REJECT)
1810: AND wmti.group_id = g_group_id
1811: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1812: AND wmti.process_status = WIP_CONSTANTS.RUNNING

Line 1809: WIP_CONSTANTS.REJECT)

1805: AND wo.operation_seq_num = wmti.fm_operation_seq_num
1806: AND wmti.fm_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1807: WIP_CONSTANTS.REJECT)
1808: AND wmti.to_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1809: WIP_CONSTANTS.REJECT)
1810: AND wmti.group_id = g_group_id
1811: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1812: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1813: AND wo.minimum_transfer_quantity > wmti.primary_quantity;

Line 1811: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1807: WIP_CONSTANTS.REJECT)
1808: AND wmti.to_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1809: WIP_CONSTANTS.REJECT)
1810: AND wmti.group_id = g_group_id
1811: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1812: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1813: AND wo.minimum_transfer_quantity > wmti.primary_quantity;
1814:
1815:

Line 1812: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1808: AND wmti.to_intraoperation_step_type NOT IN (WIP_CONSTANTS.SCRAP,
1809: WIP_CONSTANTS.REJECT)
1810: AND wmti.group_id = g_group_id
1811: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1812: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1813: AND wo.minimum_transfer_quantity > wmti.primary_quantity;
1814:
1815:
1816: */

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

1852: add_error(p_txn_id => l_availQty.txn_id,
1853: p_err_col => 'PRIMARY_QUANTITY',
1854: p_err_msg => l_msg_data);
1855: ELSE
1856: IF(l_availQty.negative_allow = WIP_CONSTANTS.NO AND
1857: l_att < l_availQty.primary_qty) THEN
1858: add_error(p_txn_id => l_availQty.txn_id,
1859: p_err_col => 'PRIMARY_QUANTITY',
1860: p_err_msg => l_availQty.assembly_name||':'||l_errMsg);

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

1896: add_error(p_txn_id => l_repAvailQty.txn_id,
1897: p_err_col => 'PRIMARY_QUANTITY',
1898: p_err_msg => l_msg_data);
1899: ELSE
1900: IF(l_repAvailQty.negative_allow = WIP_CONSTANTS.NO AND
1901: l_att < l_repAvailQty.primary_qty) THEN
1902: add_error(p_txn_id => l_repAvailQty.txn_id,
1903: p_err_col => 'PRIMARY_QUANTITY',
1904: p_err_msg => l_repAvailQty.assembly_name||':'||l_errMsg);

Line 1922: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1918: FROM mtl_system_items msi
1919: WHERE msi.organization_id = wmti.organization_id
1920: AND msi.inventory_item_id = wmti.primary_item_id)
1921: WHERE wmti.group_id = g_group_id
1922: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1923: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1924: AND wmti.primary_uom IS NULL;
1925:
1926: -- Set Error Message

Line 1923: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1919: WHERE msi.organization_id = wmti.organization_id
1920: AND msi.inventory_item_id = wmti.primary_item_id)
1921: WHERE wmti.group_id = g_group_id
1922: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1923: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1924: AND wmti.primary_uom IS NULL;
1925:
1926: -- Set Error Message
1927: fnd_message.set_name('WIP', 'WIP_ID_CODE_COMBINATION');

Line 1965: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1961: mtl_system_items msi
1962: WHERE msi.organization_id = wmti.organization_id
1963: AND msi.inventory_item_id = wmti.primary_item_id
1964: AND wmti.group_id = g_group_id
1965: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1966: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1967: AND msi.primary_uom_code <> wmti.primary_uom;
1968:
1969: END primary_uom;

Line 1966: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1962: WHERE msi.organization_id = wmti.organization_id
1963: AND msi.inventory_item_id = wmti.primary_item_id
1964: AND wmti.group_id = g_group_id
1965: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1966: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1967: AND msi.primary_uom_code <> wmti.primary_uom;
1968:
1969: END primary_uom;
1970:

Line 1986: mucv.conversion_rate, WIP_CONSTANTS.INV_MAX_PRECISION)

1982:
1983: UPDATE wip_move_txn_interface wmti
1984: SET wmti.overcompletion_primary_qty =
1985: (SELECT ROUND(wmti.overcompletion_transaction_qty *
1986: mucv.conversion_rate, WIP_CONSTANTS.INV_MAX_PRECISION)
1987: FROM mtl_uom_conversions_view mucv
1988: WHERE mucv.organization_id = wmti.organization_id
1989: AND mucv.inventory_item_id = wmti.primary_item_id
1990: AND mucv.uom_code = wmti.transaction_uom)

Line 1992: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

1988: WHERE mucv.organization_id = wmti.organization_id
1989: AND mucv.inventory_item_id = wmti.primary_item_id
1990: AND mucv.uom_code = wmti.transaction_uom)
1991: WHERE wmti.group_id = g_group_id
1992: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1993: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1994: AND wmti.overcompletion_transaction_qty IS NOT NULL;
1995: --AND wmti.overcompletion_primary_qty IS NULL;
1996:

Line 1993: AND wmti.process_status = WIP_CONSTANTS.RUNNING

1989: AND mucv.inventory_item_id = wmti.primary_item_id
1990: AND mucv.uom_code = wmti.transaction_uom)
1991: WHERE wmti.group_id = g_group_id
1992: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
1993: AND wmti.process_status = WIP_CONSTANTS.RUNNING
1994: AND wmti.overcompletion_transaction_qty IS NOT NULL;
1995: --AND wmti.overcompletion_primary_qty IS NULL;
1996:
1997: -- End of bug fix 5000113.

Line 2037: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2033: wmti.program_id,
2034: wmti.program_update_date
2035: FROM wip_move_txn_interface wmti
2036: WHERE wmti.group_id = g_group_id
2037: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2038: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2039: AND wmti.overcompletion_primary_qty = 0;
2040:
2041: -- Set Error Message

Line 2038: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2034: wmti.program_update_date
2035: FROM wip_move_txn_interface wmti
2036: WHERE wmti.group_id = g_group_id
2037: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2038: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2039: AND wmti.overcompletion_primary_qty = 0;
2040:
2041: -- Set Error Message
2042: fnd_message.set_name('WIP', 'WIP_ID_CODE_COMBINATION');

Line 2081: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2077: WHERE mucv.organization_id = wmti.organization_id
2078: AND mucv.inventory_item_id = wmti.primary_item_id
2079: AND mucv.uom_code = wmti.transaction_uom
2080: AND wmti.group_id = g_group_id
2081: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2082: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2083: AND wmti.overcompletion_transaction_qty IS NOT NULL
2084: -- Fixed bug 4900010. Round both transaction_quantity and
2085: -- primary_quantity before making comparison.

Line 2082: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2078: AND mucv.inventory_item_id = wmti.primary_item_id
2079: AND mucv.uom_code = wmti.transaction_uom
2080: AND wmti.group_id = g_group_id
2081: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2082: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2083: AND wmti.overcompletion_transaction_qty IS NOT NULL
2084: -- Fixed bug 4900010. Round both transaction_quantity and
2085: -- primary_quantity before making comparison.
2086: AND ROUND(wmti.overcompletion_transaction_qty * mucv.conversion_rate,

Line 2087: WIP_CONSTANTS.INV_MAX_PRECISION) <>

2083: AND wmti.overcompletion_transaction_qty IS NOT NULL
2084: -- Fixed bug 4900010. Round both transaction_quantity and
2085: -- primary_quantity before making comparison.
2086: AND ROUND(wmti.overcompletion_transaction_qty * mucv.conversion_rate,
2087: WIP_CONSTANTS.INV_MAX_PRECISION) <>
2088: ROUND(wmti.overcompletion_primary_qty,
2089: WIP_CONSTANTS.INV_MAX_PRECISION);
2090: END ocpl_primary_qty;
2091:

Line 2089: WIP_CONSTANTS.INV_MAX_PRECISION);

2085: -- primary_quantity before making comparison.
2086: AND ROUND(wmti.overcompletion_transaction_qty * mucv.conversion_rate,
2087: WIP_CONSTANTS.INV_MAX_PRECISION) <>
2088: ROUND(wmti.overcompletion_primary_qty,
2089: WIP_CONSTANTS.INV_MAX_PRECISION);
2090: END ocpl_primary_qty;
2091:
2092: -- This value must be null. The move processor will be the one who insert
2093: -- child record and link it with parent record

Line 2132: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2128: wmti.program_id,
2129: wmti.program_update_date
2130: FROM wip_move_txn_interface wmti
2131: WHERE wmti.group_id = g_group_id
2132: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2133: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2134: AND wmti.overcompletion_transaction_id IS NOT NULL;
2135:
2136: END ocpl_txn_id;

Line 2133: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2129: wmti.program_update_date
2130: FROM wip_move_txn_interface wmti
2131: WHERE wmti.group_id = g_group_id
2132: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2133: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2134: AND wmti.overcompletion_transaction_id IS NOT NULL;
2135:
2136: END ocpl_txn_id;
2137:

Line 2153: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2149: FROM mtl_transaction_reasons mtr
2150: WHERE mtr.reason_name = wmti.reason_name
2151: AND NVL(mtr.disable_date, SYSDATE) >= SYSDATE)
2152: WHERE wmti.group_id = g_group_id
2153: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2154: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2155: AND wmti.reason_id IS NULL
2156: AND wmti.reason_name IS NOT NULL;
2157:

Line 2154: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2150: WHERE mtr.reason_name = wmti.reason_name
2151: AND NVL(mtr.disable_date, SYSDATE) >= SYSDATE)
2152: WHERE wmti.group_id = g_group_id
2153: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2154: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2155: AND wmti.reason_id IS NULL
2156: AND wmti.reason_name IS NOT NULL;
2157:
2158: -- Set Error Message

Line 2194: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2190: wmti.program_id,
2191: wmti.program_update_date
2192: FROM wip_move_txn_interface wmti
2193: WHERE wmti.group_id = g_group_id
2194: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2195: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2196: AND (wmti.reason_id IS NOT NULL OR wmti.reason_name IS NOT NULL)
2197: AND NOT EXISTS
2198: (SELECT 'X'

Line 2195: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2191: wmti.program_update_date
2192: FROM wip_move_txn_interface wmti
2193: WHERE wmti.group_id = g_group_id
2194: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2195: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2196: AND (wmti.reason_id IS NOT NULL OR wmti.reason_name IS NOT NULL)
2197: AND NOT EXISTS
2198: (SELECT 'X'
2199: FROM mtl_transaction_reasons mtr

Line 2249: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2245: FROM wip_move_txn_interface wmti,
2246: wip_parameters wp
2247: WHERE wp.organization_id = wmti.organization_id
2248: AND wmti.group_id = g_group_id
2249: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2250: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2251: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
2252: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
2253: AND ((wmti.scrap_account_id IS NULL

Line 2250: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2246: wip_parameters wp
2247: WHERE wp.organization_id = wmti.organization_id
2248: AND wmti.group_id = g_group_id
2249: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2250: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2251: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
2252: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
2253: AND ((wmti.scrap_account_id IS NULL
2254: AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES

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

2247: WHERE wp.organization_id = wmti.organization_id
2248: AND wmti.group_id = g_group_id
2249: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2250: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2251: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
2252: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
2253: AND ((wmti.scrap_account_id IS NULL
2254: AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES
2255: AND wmti.entity_type NOT IN(WIP_CONSTANTS.LOTBASED,

Line 2252: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)

2248: AND wmti.group_id = g_group_id
2249: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2250: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2251: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
2252: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
2253: AND ((wmti.scrap_account_id IS NULL
2254: AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES
2255: AND wmti.entity_type NOT IN(WIP_CONSTANTS.LOTBASED,
2256: WIP_CONSTANTS.CLOSED_OSFM))

Line 2254: AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES

2250: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2251: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
2252: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
2253: AND ((wmti.scrap_account_id IS NULL
2254: AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES
2255: AND wmti.entity_type NOT IN(WIP_CONSTANTS.LOTBASED,
2256: WIP_CONSTANTS.CLOSED_OSFM))
2257: OR
2258: (wmti.scrap_account_id IS NOT NULL AND

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

2251: AND (wmti.fm_intraoperation_step_type = WIP_CONSTANTS.SCRAP OR
2252: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
2253: AND ((wmti.scrap_account_id IS NULL
2254: AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES
2255: AND wmti.entity_type NOT IN(WIP_CONSTANTS.LOTBASED,
2256: WIP_CONSTANTS.CLOSED_OSFM))
2257: OR
2258: (wmti.scrap_account_id IS NOT NULL AND
2259: NOT EXISTS

Line 2256: WIP_CONSTANTS.CLOSED_OSFM))

2252: wmti.to_intraoperation_step_type = WIP_CONSTANTS.SCRAP)
2253: AND ((wmti.scrap_account_id IS NULL
2254: AND wp.mandatory_scrap_flag = WIP_CONSTANTS.YES
2255: AND wmti.entity_type NOT IN(WIP_CONSTANTS.LOTBASED,
2256: WIP_CONSTANTS.CLOSED_OSFM))
2257: OR
2258: (wmti.scrap_account_id IS NOT NULL AND
2259: NOT EXISTS
2260: (SELECT 'X'

Line 2301: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2297: FROM fnd_user fu
2298: WHERE fu.user_name = wmti.last_updated_by_name
2299: AND SYSDATE BETWEEN fu.start_date AND NVL(fu.end_date, SYSDATE))
2300: WHERE wmti.group_id = g_group_id
2301: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2302: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2303: AND wmti.last_updated_by IS NULL
2304: AND wmti.last_updated_by_name IS NOT NULL;
2305:

Line 2302: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2298: WHERE fu.user_name = wmti.last_updated_by_name
2299: AND SYSDATE BETWEEN fu.start_date AND NVL(fu.end_date, SYSDATE))
2300: WHERE wmti.group_id = g_group_id
2301: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2302: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2303: AND wmti.last_updated_by IS NULL
2304: AND wmti.last_updated_by_name IS NOT NULL;
2305:
2306: -- Set Error Message

Line 2341: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2337: wmti.program_id,
2338: wmti.program_update_date
2339: FROM wip_move_txn_interface wmti
2340: WHERE wmti.group_id = g_group_id
2341: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2342: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2343: AND wmti.last_updated_by IS NULL; -- cannot derive LAST_UPDATED_BY
2344:
2345: END last_updated_by;

Line 2342: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2338: wmti.program_update_date
2339: FROM wip_move_txn_interface wmti
2340: WHERE wmti.group_id = g_group_id
2341: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2342: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2343: AND wmti.last_updated_by IS NULL; -- cannot derive LAST_UPDATED_BY
2344:
2345: END last_updated_by;
2346:

Line 2363: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2359: FROM fnd_user fu
2360: WHERE fu.user_name = wmti.created_by_name
2361: AND SYSDATE BETWEEN fu.start_date AND NVL(fu.end_date, SYSDATE))
2362: WHERE wmti.group_id = g_group_id
2363: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2364: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2365: AND wmti.created_by IS NULL
2366: AND wmti.created_by_name IS NOT NULL;
2367:

Line 2364: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2360: WHERE fu.user_name = wmti.created_by_name
2361: AND SYSDATE BETWEEN fu.start_date AND NVL(fu.end_date, SYSDATE))
2362: WHERE wmti.group_id = g_group_id
2363: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2364: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2365: AND wmti.created_by IS NULL
2366: AND wmti.created_by_name IS NOT NULL;
2367:
2368: -- Set Error Message

Line 2403: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2399: wmti.program_id,
2400: wmti.program_update_date
2401: FROM wip_move_txn_interface wmti
2402: WHERE wmti.group_id = g_group_id
2403: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2404: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2405: AND ((wmti.created_by IS NULL) -- cannot derive LAST_UPDATED_BY
2406: OR
2407: (NOT EXISTS

Line 2404: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2400: wmti.program_update_date
2401: FROM wip_move_txn_interface wmti
2402: WHERE wmti.group_id = g_group_id
2403: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2404: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2405: AND ((wmti.created_by IS NULL) -- cannot derive LAST_UPDATED_BY
2406: OR
2407: (NOT EXISTS
2408: (SELECT 'X'

Line 2463: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2459: wmti.program_id,
2460: wmti.program_update_date
2461: FROM wip_move_txn_interface wmti
2462: WHERE wmti.group_id = g_group_id
2463: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2464: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2465: AND EXISTS
2466: (SELECT 'X'
2467: FROM bom_departments bd,

Line 2464: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2460: wmti.program_update_date
2461: FROM wip_move_txn_interface wmti
2462: WHERE wmti.group_id = g_group_id
2463: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2464: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2465: AND EXISTS
2466: (SELECT 'X'
2467: FROM bom_departments bd,
2468: wip_operation_resources wor,

Line 2475: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE

2471: WHERE wor.organization_id = wmti.organization_id
2472: AND wor.wip_entity_id = wmti.wip_entity_id
2473: AND wor.operation_seq_num = wmti.to_operation_seq_num
2474: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
2475: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2476: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2477: WIP_CONSTANTS.LOTBASED)
2478: OR
2479: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND

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

2472: AND wor.wip_entity_id = wmti.wip_entity_id
2473: AND wor.operation_seq_num = wmti.to_operation_seq_num
2474: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
2475: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2476: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2477: WIP_CONSTANTS.LOTBASED)
2478: OR
2479: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2480: wor.repetitive_schedule_id IN

Line 2477: WIP_CONSTANTS.LOTBASED)

2473: AND wor.operation_seq_num = wmti.to_operation_seq_num
2474: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
2475: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2476: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2477: WIP_CONSTANTS.LOTBASED)
2478: OR
2479: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2480: wor.repetitive_schedule_id IN
2481: (SELECT wrs.repetitive_schedule_id

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

2475: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2476: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2477: WIP_CONSTANTS.LOTBASED)
2478: OR
2479: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2480: wor.repetitive_schedule_id IN
2481: (SELECT wrs.repetitive_schedule_id
2482: FROM wip_repetitive_schedules wrs
2483: WHERE wrs.wip_entity_id = wmti.wip_entity_id

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

2482: FROM wip_repetitive_schedules wrs
2483: WHERE wrs.wip_entity_id = wmti.wip_entity_id
2484: AND wrs.organization_id = wmti.organization_id
2485: AND wrs.line_id = wmti.line_id
2486: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,
2487: WIP_CONSTANTS.COMP_CHRG))))
2488: AND wo1.organization_id = wor.organization_id
2489: AND wo1.wip_entity_id = wor.wip_entity_id
2490: AND NVL(wo1.repetitive_schedule_id,-1) =

Line 2487: WIP_CONSTANTS.COMP_CHRG))))

2483: WHERE wrs.wip_entity_id = wmti.wip_entity_id
2484: AND wrs.organization_id = wmti.organization_id
2485: AND wrs.line_id = wmti.line_id
2486: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,
2487: WIP_CONSTANTS.COMP_CHRG))))
2488: AND wo1.organization_id = wor.organization_id
2489: AND wo1.wip_entity_id = wor.wip_entity_id
2490: AND NVL(wo1.repetitive_schedule_id,-1) =
2491: NVL(wor.repetitive_schedule_id,-1)

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

2493: AND wo2.organization_id = wo1.organization_id
2494: AND wo2.wip_entity_id = wo1.wip_entity_id
2495: AND NVL(wo2.repetitive_schedule_id,-1) =
2496: NVL(wo1.repetitive_schedule_id,-1)
2497: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
2498: wo2.operation_seq_num = wor.operation_seq_num)
2499: OR
2500: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
2501: ((wo1.next_operation_seq_num IS NOT NULL AND

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

2496: NVL(wo1.repetitive_schedule_id,-1)
2497: AND ((wor.autocharge_type = WIP_CONSTANTS.PO_RECEIPT AND
2498: wo2.operation_seq_num = wor.operation_seq_num)
2499: OR
2500: (wor.autocharge_type = WIP_CONSTANTS.PO_MOVE AND
2501: ((wo1.next_operation_seq_num IS NOT NULL AND
2502: wo1.next_operation_seq_num = wo2.operation_seq_num)
2503: OR
2504: (wo1.next_operation_seq_num IS NULL AND

Line 2543: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2539: wmti.program_id,
2540: wmti.program_update_date
2541: FROM wip_move_txn_interface wmti
2542: WHERE wmti.group_id = g_group_id
2543: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2544: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2545: AND EXISTS
2546: (SELECT 'Outside processing resources exist'
2547: FROM wip_operation_resources wor

Line 2544: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2540: wmti.program_update_date
2541: FROM wip_move_txn_interface wmti
2542: WHERE wmti.group_id = g_group_id
2543: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2544: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2545: AND EXISTS
2546: (SELECT 'Outside processing resources exist'
2547: FROM wip_operation_resources wor
2548: WHERE wor.organization_id = wmti.organization_id

Line 2552: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE

2548: WHERE wor.organization_id = wmti.organization_id
2549: AND wor.wip_entity_id = wmti.wip_entity_id
2550: AND wor.operation_seq_num = wmti.to_operation_seq_num
2551: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
2552: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2553: AND wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
2554: WIP_CONSTANTS.PO_MOVE)
2555: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2556: WIP_CONSTANTS.LOTBASED)

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

2549: AND wor.wip_entity_id = wmti.wip_entity_id
2550: AND wor.operation_seq_num = wmti.to_operation_seq_num
2551: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
2552: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2553: AND wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
2554: WIP_CONSTANTS.PO_MOVE)
2555: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2556: WIP_CONSTANTS.LOTBASED)
2557: OR

Line 2554: WIP_CONSTANTS.PO_MOVE)

2550: AND wor.operation_seq_num = wmti.to_operation_seq_num
2551: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
2552: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2553: AND wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
2554: WIP_CONSTANTS.PO_MOVE)
2555: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2556: WIP_CONSTANTS.LOTBASED)
2557: OR
2558: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND

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

2551: AND wmti.fm_operation_seq_num < wmti.to_operation_seq_num
2552: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2553: AND wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
2554: WIP_CONSTANTS.PO_MOVE)
2555: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2556: WIP_CONSTANTS.LOTBASED)
2557: OR
2558: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2559: wor.repetitive_schedule_id IN

Line 2556: WIP_CONSTANTS.LOTBASED)

2552: AND wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE
2553: AND wor.autocharge_type IN (WIP_CONSTANTS.PO_RECEIPT,
2554: WIP_CONSTANTS.PO_MOVE)
2555: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2556: WIP_CONSTANTS.LOTBASED)
2557: OR
2558: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2559: wor.repetitive_schedule_id IN
2560: (SELECT wrs.repetitive_schedule_id

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

2554: WIP_CONSTANTS.PO_MOVE)
2555: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2556: WIP_CONSTANTS.LOTBASED)
2557: OR
2558: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2559: wor.repetitive_schedule_id IN
2560: (SELECT wrs.repetitive_schedule_id
2561: FROM wip_repetitive_schedules wrs
2562: WHERE wrs.organization_id = wmti.organization_id

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

2561: FROM wip_repetitive_schedules wrs
2562: WHERE wrs.organization_id = wmti.organization_id
2563: AND wrs.wip_entity_id = wmti.wip_entity_id
2564: AND wrs.line_id = wmti.line_id
2565: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,
2566: WIP_CONSTANTS.COMP_CHRG)))))
2567: AND NOT EXISTS
2568: (SELECT 'Current user is an employee'
2569: FROM fnd_user fu,

Line 2566: WIP_CONSTANTS.COMP_CHRG)))))

2562: WHERE wrs.organization_id = wmti.organization_id
2563: AND wrs.wip_entity_id = wmti.wip_entity_id
2564: AND wrs.line_id = wmti.line_id
2565: AND wrs.status_type IN (WIP_CONSTANTS.RELEASED,
2566: WIP_CONSTANTS.COMP_CHRG)))))
2567: AND NOT EXISTS
2568: (SELECT 'Current user is an employee'
2569: FROM fnd_user fu,
2570: per_people_f ppf

Line 2586: SET wmti.process_status = WIP_CONSTANTS.ERROR

2582: -- Users cannot move cross 'Queue' of serialization start op. User need to
2583: -- move 2 step. The first time move to Queue of serialization start op, then
2584: -- serial move. For backward move, do serial move first.
2585: UPDATE wip_move_txn_interface wmti
2586: SET wmti.process_status = WIP_CONSTANTS.ERROR
2587: WHERE wmti.group_id = g_group_id
2588: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2589: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2590: AND EXISTS -- serialized job

Line 2588: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2584: -- serial move. For backward move, do serial move first.
2585: UPDATE wip_move_txn_interface wmti
2586: SET wmti.process_status = WIP_CONSTANTS.ERROR
2587: WHERE wmti.group_id = g_group_id
2588: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2589: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2590: AND EXISTS -- serialized job
2591: (SELECT 'X'
2592: FROM wip_discrete_jobs wdj

Line 2589: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2585: UPDATE wip_move_txn_interface wmti
2586: SET wmti.process_status = WIP_CONSTANTS.ERROR
2587: WHERE wmti.group_id = g_group_id
2588: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2589: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2590: AND EXISTS -- serialized job
2591: (SELECT 'X'
2592: FROM wip_discrete_jobs wdj
2593: WHERE wdj.wip_entity_id = wmti.wip_entity_id

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

2596: (wmti.fm_operation_seq_num < wdj.serialization_start_op AND
2597: (wmti.to_operation_seq_num > wdj.serialization_start_op
2598: OR
2599: (wmti.to_operation_seq_num = wdj.serialization_start_op AND
2600: wmti.to_intraoperation_step_type <> WIP_CONSTANTS.QUEUE)))
2601: OR
2602: -- Backward move
2603: (wmti.to_operation_seq_num < wdj.serialization_start_op AND
2604: (wmti.fm_operation_seq_num > wdj.serialization_start_op

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

2603: (wmti.to_operation_seq_num < wdj.serialization_start_op AND
2604: (wmti.fm_operation_seq_num > wdj.serialization_start_op
2605: OR
2606: (wmti.fm_operation_seq_num = wdj.serialization_start_op AND
2607: wmti.fm_intraoperation_step_type <> WIP_CONSTANTS.QUEUE)))))
2608: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
2609:
2610: fnd_message.set_name('WIP', 'WIP_MOVE_CROSS_START_OP');
2611: add_error(p_txn_ids => enums,

Line 2625: SET wmti.process_status = WIP_CONSTANTS.ERROR

2621: -- If user try to do serialized transaction, primary_quantity must be 1.
2622: -- This validation is only for serialized discrete job. For serialized
2623: -- OSFM job, primary_quantity can be more than 1.
2624: UPDATE wip_move_txn_interface wmti
2625: SET wmti.process_status = WIP_CONSTANTS.ERROR
2626: WHERE wmti.group_id = g_group_id
2627: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2628: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2629: AND EXISTS -- serialized discrete job and serialized transaction

Line 2627: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2623: -- OSFM job, primary_quantity can be more than 1.
2624: UPDATE wip_move_txn_interface wmti
2625: SET wmti.process_status = WIP_CONSTANTS.ERROR
2626: WHERE wmti.group_id = g_group_id
2627: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2628: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2629: AND EXISTS -- serialized discrete job and serialized transaction
2630: (SELECT 'X'
2631: FROM wip_discrete_jobs wdj,

Line 2628: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2624: UPDATE wip_move_txn_interface wmti
2625: SET wmti.process_status = WIP_CONSTANTS.ERROR
2626: WHERE wmti.group_id = g_group_id
2627: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2628: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2629: AND EXISTS -- serialized discrete job and serialized transaction
2630: (SELECT 'X'
2631: FROM wip_discrete_jobs wdj,
2632: wip_entities we

Line 2635: AND we.entity_type = WIP_CONSTANTS.DISCRETE

2631: FROM wip_discrete_jobs wdj,
2632: wip_entities we
2633: WHERE wdj.wip_entity_id = wmti.wip_entity_id
2634: AND wdj.wip_entity_id = we.wip_entity_id
2635: AND we.entity_type = WIP_CONSTANTS.DISCRETE
2636: AND wdj.serialization_start_op IS NOT NULL
2637: AND wmti.fm_operation_seq_num >= wdj.serialization_start_op
2638: AND wmti.to_operation_seq_num >= wdj.serialization_start_op
2639: AND wmti.primary_quantity <> 1)

Line 2653: SET wmti.process_status = WIP_CONSTANTS.ERROR

2649: enums.delete;
2650: -- if user provide serial number information for non-serialized job, or
2651: -- serialized job with non-serialized move, error out.
2652: UPDATE wip_move_txn_interface wmti
2653: SET wmti.process_status = WIP_CONSTANTS.ERROR
2654: WHERE wmti.group_id = g_group_id
2655: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2656: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2657: AND EXISTS -- regular job

Line 2655: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2651: -- serialized job with non-serialized move, error out.
2652: UPDATE wip_move_txn_interface wmti
2653: SET wmti.process_status = WIP_CONSTANTS.ERROR
2654: WHERE wmti.group_id = g_group_id
2655: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2656: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2657: AND EXISTS -- regular job
2658: (SELECT 'X'
2659: FROM wip_discrete_jobs wdj

Line 2656: AND wmti.process_status = WIP_CONSTANTS.RUNNING

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

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

2663: (wdj.serialization_start_op IS NOT NULL
2664: AND
2665: (wmti.fm_operation_seq_num < wdj.serialization_start_op OR
2666: (wmti.fm_operation_seq_num = wdj.serialization_start_op AND
2667: wmti.fm_intraoperation_step_type = WIP_CONSTANTS.QUEUE))
2668: AND
2669: (wmti.to_operation_seq_num < wdj.serialization_start_op OR
2670: (wmti.to_operation_seq_num = wdj.serialization_start_op AND
2671: wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE))))

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

2667: wmti.fm_intraoperation_step_type = WIP_CONSTANTS.QUEUE))
2668: AND
2669: (wmti.to_operation_seq_num < wdj.serialization_start_op OR
2670: (wmti.to_operation_seq_num = wdj.serialization_start_op AND
2671: wmti.to_intraoperation_step_type = WIP_CONSTANTS.QUEUE))))
2672: )
2673: AND EXISTS
2674: (SELECT 'X'
2675: FROM wip_serial_move_interface wsmi

Line 2690: SET wmti.process_status = WIP_CONSTANTS.ERROR

2686: enums.delete;
2687: -- if user try to do serialized transaction, number of serial records must be
2688: -- equal to wmti.primary_quantity
2689: UPDATE wip_move_txn_interface wmti
2690: SET wmti.process_status = WIP_CONSTANTS.ERROR
2691: WHERE wmti.group_id = g_group_id
2692: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2693: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2694: AND EXISTS -- serialized job and serialized transaction

Line 2692: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2688: -- equal to wmti.primary_quantity
2689: UPDATE wip_move_txn_interface wmti
2690: SET wmti.process_status = WIP_CONSTANTS.ERROR
2691: WHERE wmti.group_id = g_group_id
2692: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2693: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2694: AND EXISTS -- serialized job and serialized transaction
2695: (SELECT 'X'
2696: FROM wip_discrete_jobs wdj

Line 2693: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2689: UPDATE wip_move_txn_interface wmti
2690: SET wmti.process_status = WIP_CONSTANTS.ERROR
2691: WHERE wmti.group_id = g_group_id
2692: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2693: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2694: AND EXISTS -- serialized job and serialized transaction
2695: (SELECT 'X'
2696: FROM wip_discrete_jobs wdj
2697: WHERE wdj.wip_entity_id = wmti.wip_entity_id

Line 2721: AND msn.current_status = WIP_CONSTANTS.IN_STORES

2717: WHERE wsmi.transaction_id = wmti.transaction_id
2718: AND wsmi.assembly_serial_number = msn.serial_number
2719: AND wmti.organization_id = msn.current_organization_id
2720: AND wmti.primary_item_id = msn.inventory_item_id
2721: AND msn.current_status = WIP_CONSTANTS.IN_STORES
2722: AND wmti.wip_entity_id = we.wip_entity_id
2723: AND ((mog.genealogy_origin = 1 AND
2724: mog.parent_object_id = we.gen_object_id AND
2725: mog.object_id = msn.gen_object_id)

Line 2743: SET wmti.process_status = WIP_CONSTANTS.ERROR

2739: enums.delete;
2740: -- if user try to do serialized transaction, the status of the serial
2741: -- must correspond to the transaction type.
2742: UPDATE wip_move_txn_interface wmti
2743: SET wmti.process_status = WIP_CONSTANTS.ERROR
2744: WHERE wmti.group_id = g_group_id
2745: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2746: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2747: AND EXISTS -- serialized job and serialized transaction

Line 2745: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2741: -- must correspond to the transaction type.
2742: UPDATE wip_move_txn_interface wmti
2743: SET wmti.process_status = WIP_CONSTANTS.ERROR
2744: WHERE wmti.group_id = g_group_id
2745: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2746: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2747: AND EXISTS -- serialized job and serialized transaction
2748: (SELECT 'X'
2749: FROM wip_discrete_jobs wdj

Line 2746: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2742: UPDATE wip_move_txn_interface wmti
2743: SET wmti.process_status = WIP_CONSTANTS.ERROR
2744: WHERE wmti.group_id = g_group_id
2745: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2746: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2747: AND EXISTS -- serialized job and serialized transaction
2748: (SELECT 'X'
2749: FROM wip_discrete_jobs wdj
2750: WHERE wdj.wip_entity_id = wmti.wip_entity_id

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

2759: AND wsmi.assembly_serial_number = msn.serial_number
2760: AND wmti.organization_id = msn.current_organization_id
2761: AND wmti.primary_item_id = msn.inventory_item_id
2762: AND msn.line_mark_id IS NULL
2763: AND ((wmti.transaction_type = WIP_CONSTANTS.RET_TXN AND
2764: msn.group_mark_id IS NULL AND
2765: msn.wip_entity_id IS NULL AND
2766: msn.current_status = WIP_CONSTANTS.IN_STORES)
2767: OR

Line 2766: msn.current_status = WIP_CONSTANTS.IN_STORES)

2762: AND msn.line_mark_id IS NULL
2763: AND ((wmti.transaction_type = WIP_CONSTANTS.RET_TXN AND
2764: msn.group_mark_id IS NULL AND
2765: msn.wip_entity_id IS NULL AND
2766: msn.current_status = WIP_CONSTANTS.IN_STORES)
2767: OR
2768: (wmti.transaction_type IN (WIP_CONSTANTS.MOVE_TXN,
2769: WIP_CONSTANTS.COMP_TXN) AND
2770: msn.group_mark_id IS NOT NULL AND

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

2764: msn.group_mark_id IS NULL AND
2765: msn.wip_entity_id IS NULL AND
2766: msn.current_status = WIP_CONSTANTS.IN_STORES)
2767: OR
2768: (wmti.transaction_type IN (WIP_CONSTANTS.MOVE_TXN,
2769: WIP_CONSTANTS.COMP_TXN) AND
2770: msn.group_mark_id IS NOT NULL AND
2771: msn.wip_entity_id IS NOT NULL AND
2772: wmti.wip_entity_id = msn.wip_entity_id AND

Line 2769: WIP_CONSTANTS.COMP_TXN) AND

2765: msn.wip_entity_id IS NULL AND
2766: msn.current_status = WIP_CONSTANTS.IN_STORES)
2767: OR
2768: (wmti.transaction_type IN (WIP_CONSTANTS.MOVE_TXN,
2769: WIP_CONSTANTS.COMP_TXN) AND
2770: msn.group_mark_id IS NOT NULL AND
2771: msn.wip_entity_id IS NOT NULL AND
2772: wmti.wip_entity_id = msn.wip_entity_id AND
2773: -- Define but not use or Issue out of store.

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

2770: msn.group_mark_id IS NOT NULL AND
2771: msn.wip_entity_id IS NOT NULL AND
2772: wmti.wip_entity_id = msn.wip_entity_id AND
2773: -- Define but not use or Issue out of store.
2774: msn.current_status IN (WIP_CONSTANTS.DEF_NOT_USED,
2775: WIP_CONSTANTS.OUT_OF_STORES))))
2776: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
2777:
2778: fnd_message.set_name('WIP', 'WIP_INVALID_SERIAL_STATUS');

Line 2775: WIP_CONSTANTS.OUT_OF_STORES))))

2771: msn.wip_entity_id IS NOT NULL AND
2772: wmti.wip_entity_id = msn.wip_entity_id AND
2773: -- Define but not use or Issue out of store.
2774: msn.current_status IN (WIP_CONSTANTS.DEF_NOT_USED,
2775: WIP_CONSTANTS.OUT_OF_STORES))))
2776: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
2777:
2778: fnd_message.set_name('WIP', 'WIP_INVALID_SERIAL_STATUS');
2779: add_error(p_txn_ids => enums,

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

2782:
2783: END serial_validation;
2784:
2785: -- If there are some errors occur, this routine will set
2786: -- PROCESS_STATUS to WIP_CONSTANTS.ERROR. Then it will insert all the errors
2787: -- into WIP_TXN_INTERFACE_ERRORS
2788: PROCEDURE update_interface_tbl IS
2789: BEGIN
2790: -- there are some errors occur, so set the process_status to error so that

Line 2793: SET wmti.process_status = WIP_CONSTANTS.ERROR

2789: BEGIN
2790: -- there are some errors occur, so set the process_status to error so that
2791: -- move processor will not pick up this record
2792: UPDATE wip_move_txn_interface wmti
2793: SET wmti.process_status = WIP_CONSTANTS.ERROR
2794: WHERE wmti.group_id = g_group_id
2795: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2796: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2797: AND EXISTS

Line 2795: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2791: -- move processor will not pick up this record
2792: UPDATE wip_move_txn_interface wmti
2793: SET wmti.process_status = WIP_CONSTANTS.ERROR
2794: WHERE wmti.group_id = g_group_id
2795: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2796: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2797: AND EXISTS
2798: (SELECT 'X'
2799: FROM wip_txn_interface_errors wtie

Line 2796: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2792: UPDATE wip_move_txn_interface wmti
2793: SET wmti.process_status = WIP_CONSTANTS.ERROR
2794: WHERE wmti.group_id = g_group_id
2795: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2796: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2797: AND EXISTS
2798: (SELECT 'X'
2799: FROM wip_txn_interface_errors wtie
2800: WHERE wtie.transaction_id = wmti.transaction_id);

Line 2820: SET wmti.process_status = WIP_CONSTANTS.ERROR

2816: enums.delete;
2817: -- Users cannot do EZ Completion/EZ Return if an assembly is not transactable
2818: -- or an assembly is not an inventory item.
2819: UPDATE wip_move_txn_interface wmti
2820: SET wmti.process_status = WIP_CONSTANTS.ERROR
2821: WHERE wmti.group_id = g_group_id
2822: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2823: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2824: AND wmti.transaction_type IN (WIP_CONSTANTS.RET_TXN,

Line 2822: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2818: -- or an assembly is not an inventory item.
2819: UPDATE wip_move_txn_interface wmti
2820: SET wmti.process_status = WIP_CONSTANTS.ERROR
2821: WHERE wmti.group_id = g_group_id
2822: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2823: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2824: AND wmti.transaction_type IN (WIP_CONSTANTS.RET_TXN,
2825: WIP_CONSTANTS.COMP_TXN)
2826: AND EXISTS -- Item flag was not set properly.

Line 2823: AND wmti.process_status = WIP_CONSTANTS.RUNNING

2819: UPDATE wip_move_txn_interface wmti
2820: SET wmti.process_status = WIP_CONSTANTS.ERROR
2821: WHERE wmti.group_id = g_group_id
2822: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2823: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2824: AND wmti.transaction_type IN (WIP_CONSTANTS.RET_TXN,
2825: WIP_CONSTANTS.COMP_TXN)
2826: AND EXISTS -- Item flag was not set properly.
2827: (SELECT 'X'

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

2820: SET wmti.process_status = WIP_CONSTANTS.ERROR
2821: WHERE wmti.group_id = g_group_id
2822: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2823: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2824: AND wmti.transaction_type IN (WIP_CONSTANTS.RET_TXN,
2825: WIP_CONSTANTS.COMP_TXN)
2826: AND EXISTS -- Item flag was not set properly.
2827: (SELECT 'X'
2828: FROM mtl_system_items msi

Line 2825: WIP_CONSTANTS.COMP_TXN)

2821: WHERE wmti.group_id = g_group_id
2822: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2823: AND wmti.process_status = WIP_CONSTANTS.RUNNING
2824: AND wmti.transaction_type IN (WIP_CONSTANTS.RET_TXN,
2825: WIP_CONSTANTS.COMP_TXN)
2826: AND EXISTS -- Item flag was not set properly.
2827: (SELECT 'X'
2828: FROM mtl_system_items msi
2829: WHERE msi.inventory_item_id = wmti.primary_item_id

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

2842:
2843: -- If pass all the validation, and there is no error, this routine will
2844: -- derive all the rest info (fm_operation_code, fm_department_id,
2845: -- fm_department_code, to_operation_code, to_department_id, to_department_code)
2846: -- , then update PROCESS_PHASE to WIP_CONSTANTS.MOVE_PROC. This routine
2847: -- should be called after we called all the validation code and
2848: -- update_interface_tbl
2849: PROCEDURE derive IS
2850: l_PrevOpSeq NUMBER;

Line 2869: WIP_CONSTANTS.MOVE_PROC

2865: bd1.department_code,
2866: bso2.operation_code,
2867: wo2.department_id,
2868: bd2.department_code,
2869: WIP_CONSTANTS.MOVE_PROC
2870: FROM bom_standard_operations bso1,
2871: bom_standard_operations bso2,
2872: bom_departments bd1,
2873: bom_departments bd2,

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

2883: AND bso1.standard_operation_id(+) = wo1.standard_operation_id
2884: AND bso2.standard_operation_id(+) = wo2.standard_operation_id
2885: AND wo1.department_id = bd1.department_id
2886: AND wo2.department_id = bd2.department_id
2887: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2888: WIP_CONSTANTS.LOTBASED)
2889: OR
2890: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2891: wo1.repetitive_schedule_id = wmti.repetitive_schedule_id AND

Line 2888: WIP_CONSTANTS.LOTBASED)

2884: AND bso2.standard_operation_id(+) = wo2.standard_operation_id
2885: AND wo1.department_id = bd1.department_id
2886: AND wo2.department_id = bd2.department_id
2887: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2888: WIP_CONSTANTS.LOTBASED)
2889: OR
2890: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2891: wo1.repetitive_schedule_id = wmti.repetitive_schedule_id AND
2892: wo2.repetitive_schedule_id = wmti.repetitive_schedule_id)))

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

2886: AND wo2.department_id = bd2.department_id
2887: AND (wmti.entity_type IN (WIP_CONSTANTS.DISCRETE,
2888: WIP_CONSTANTS.LOTBASED)
2889: OR
2890: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2891: wo1.repetitive_schedule_id = wmti.repetitive_schedule_id AND
2892: wo2.repetitive_schedule_id = wmti.repetitive_schedule_id)))
2893: WHERE wmti.group_id = g_group_id
2894: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

Line 2894: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

2890: (wmti.entity_type = WIP_CONSTANTS.REPETITIVE AND
2891: wo1.repetitive_schedule_id = wmti.repetitive_schedule_id AND
2892: wo2.repetitive_schedule_id = wmti.repetitive_schedule_id)))
2893: WHERE wmti.group_id = g_group_id
2894: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2895: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2896:
2897: END derive;
2898:

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

2891: wo1.repetitive_schedule_id = wmti.repetitive_schedule_id AND
2892: wo2.repetitive_schedule_id = wmti.repetitive_schedule_id)))
2893: WHERE wmti.group_id = g_group_id
2894: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
2895: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
2896:
2897: END derive;
2898:
2899: PROCEDURE validate(p_group_id IN NUMBER,

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

2908: fnd_msg_pub.initialize;
2909: END IF;
2910:
2911: -- write parameter value to log file
2912: if (l_logLevel <= wip_constants.trace_logging) then
2913: l_params(1).paramName := 'p_group_id';
2914: l_params(1).paramValue := p_group_id;
2915: wip_logger.entryPoint(p_procName => 'wip_move_validator.validate',
2916: p_params => l_params,

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

2979: update_interface_tbl;
2980: -- derive the rest nessary info
2981: derive;
2982: -- write to the log file
2983: if (l_logLevel <= wip_constants.trace_logging) then
2984: wip_logger.exitPoint(p_procName => 'wip_move_validator.validate',
2985: p_procReturnStatus => fnd_api.g_ret_sts_success,
2986: p_msg => 'procedure complete',
2987: x_returnStatus => l_returnStatus);

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

2987: x_returnStatus => l_returnStatus);
2988: end if;
2989: EXCEPTION
2990: WHEN others THEN
2991: if (l_logLevel <= wip_constants.trace_logging) then
2992: wip_logger.exitPoint(p_procName => 'wip_move_validator.validate',
2993: p_procReturnStatus => fnd_api.g_ret_sts_unexp_error,
2994: p_msg => 'Unexpected Errors: ' || SQLERRM,
2995: x_returnStatus => l_returnStatus);

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

3052: where mmt.move_transaction_id = p_move_id
3053: and mmt.organization_id = l_org_id
3054: and mmt.transaction_source_id = l_wip_entity_id
3055: and mmt.inventory_item_id = l_assm_item_id
3056: and mmt.transaction_type_id in (wip_constants.CPLASSY_TYPE, wip_constants.RETASSY_TYPE)
3057: and lu.lookup_type = 'WIP_MOVE_TRANSACTION_TYPE'
3058: 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);
3059: exception
3060: -- no inv txn involved; just a plain move txn

Line 3058: 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);

3054: and mmt.transaction_source_id = l_wip_entity_id
3055: and mmt.inventory_item_id = l_assm_item_id
3056: and mmt.transaction_type_id in (wip_constants.CPLASSY_TYPE, wip_constants.RETASSY_TYPE)
3057: and lu.lookup_type = 'WIP_MOVE_TRANSACTION_TYPE'
3058: 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);
3059: exception
3060: -- no inv txn involved; just a plain move txn
3061: when no_data_found then
3062: select meaning

Line 3066: and lookup_code = wip_constants.move_txn;

3062: select meaning
3063: into p_txn_type
3064: from mfg_lookups
3065: where lookup_type = 'WIP_MOVE_TRANSACTION_TYPE'
3066: and lookup_code = wip_constants.move_txn;
3067: when others then
3068: p_txn_type := -1;
3069: end;
3070:

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

3079: BEGIN
3080: l_logLevel := fnd_log.g_current_runtime_level;
3081:
3082: -- write parameter value to log file
3083: if (l_logLevel <= wip_constants.trace_logging) then
3084: l_params(1).paramName := 'p_group_id';
3085: l_params(1).paramValue := p_group_id;
3086: wip_logger.entryPoint(p_procName => 'wip_move_validator.validateOATxn',
3087: p_params => l_params,

Line 3108: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

3104: wmti.organization_id -- p_inv_org_id
3105: )) BETWEEN
3106: oap.period_start_date AND oap.schedule_close_date)
3107: WHERE wmti.group_id = g_group_id
3108: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3109: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
3110:
3111: -- reset enums table
3112: enums.delete;

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

3105: )) BETWEEN
3106: oap.period_start_date AND oap.schedule_close_date)
3107: WHERE wmti.group_id = g_group_id
3108: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3109: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
3110:
3111: -- reset enums table
3112: enums.delete;
3113: -- Error out if there is no open accout period for the TRANSACTION_DATE

Line 3116: SET wmti.process_status = WIP_CONSTANTS.ERROR

3112: enums.delete;
3113: -- Error out if there is no open accout period for the TRANSACTION_DATE
3114: -- specified or there is no WIP_PERIOD_BALANCES
3115: UPDATE wip_move_txn_interface wmti
3116: SET wmti.process_status = WIP_CONSTANTS.ERROR
3117: WHERE wmti.group_id = g_group_id
3118: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3119: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3120: AND (wmti.acct_period_id IS NULL

Line 3118: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

3114: -- specified or there is no WIP_PERIOD_BALANCES
3115: UPDATE wip_move_txn_interface wmti
3116: SET wmti.process_status = WIP_CONSTANTS.ERROR
3117: WHERE wmti.group_id = g_group_id
3118: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3119: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3120: AND (wmti.acct_period_id IS NULL
3121: OR
3122: NOT EXISTS

Line 3119: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3115: UPDATE wip_move_txn_interface wmti
3116: SET wmti.process_status = WIP_CONSTANTS.ERROR
3117: WHERE wmti.group_id = g_group_id
3118: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3119: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3120: AND (wmti.acct_period_id IS NULL
3121: OR
3122: NOT EXISTS
3123: (SELECT 'X'

Line 3141: SET wmti.process_status = WIP_CONSTANTS.ERROR

3137: enums.delete;
3138: -- Error out if FM_OPERATION_SEQ_NUM/FM_INTRAOPERATION_STEP_TYPE has
3139: -- no move shop floor status attached
3140: UPDATE wip_move_txn_interface wmti
3141: SET wmti.process_status = WIP_CONSTANTS.ERROR
3142: WHERE wmti.group_id = g_group_id
3143: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3144: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3145: AND EXISTS

Line 3143: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

3139: -- no move shop floor status attached
3140: UPDATE wip_move_txn_interface wmti
3141: SET wmti.process_status = WIP_CONSTANTS.ERROR
3142: WHERE wmti.group_id = g_group_id
3143: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3144: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3145: AND EXISTS
3146: (SELECT 'X'
3147: FROM wip_shop_floor_status_codes wsc,

Line 3144: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3140: UPDATE wip_move_txn_interface wmti
3141: SET wmti.process_status = WIP_CONSTANTS.ERROR
3142: WHERE wmti.group_id = g_group_id
3143: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3144: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3145: AND EXISTS
3146: (SELECT 'X'
3147: FROM wip_shop_floor_status_codes wsc,
3148: wip_shop_floor_statuses ws

Line 3156: AND wsc.status_move_flag = WIP_CONSTANTS.NO

3152: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
3153: AND ws.operation_seq_num = wmti.fm_operation_seq_num
3154: AND ws.intraoperation_step_type = wmti.fm_intraoperation_step_type
3155: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
3156: AND wsc.status_move_flag = WIP_CONSTANTS.NO
3157: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE
3158: AND (wmti.source_code IS NULL OR
3159: wmti.source_code <> 'RCV' OR
3160: (wmti.source_code = 'RCV' AND

Line 3179: SET wmti.process_status = WIP_CONSTANTS.ERROR

3175: enums.delete;
3176: -- Error out if user try to easy complete job/schedule that has No Move shop
3177: -- floor status attached to Tomove of the last operation
3178: UPDATE wip_move_txn_interface wmti
3179: SET wmti.process_status = WIP_CONSTANTS.ERROR
3180: WHERE wmti.group_id = g_group_id
3181: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3182: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3183: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

Line 3181: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

3177: -- floor status attached to Tomove of the last operation
3178: UPDATE wip_move_txn_interface wmti
3179: SET wmti.process_status = WIP_CONSTANTS.ERROR
3180: WHERE wmti.group_id = g_group_id
3181: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3182: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3183: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
3184: AND EXISTS
3185: (SELECT 'X'

Line 3182: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3178: UPDATE wip_move_txn_interface wmti
3179: SET wmti.process_status = WIP_CONSTANTS.ERROR
3180: WHERE wmti.group_id = g_group_id
3181: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3182: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3183: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
3184: AND EXISTS
3185: (SELECT 'X'
3186: FROM wip_shop_floor_status_codes wsc,

Line 3183: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN

3179: SET wmti.process_status = WIP_CONSTANTS.ERROR
3180: WHERE wmti.group_id = g_group_id
3181: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3182: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3183: AND wmti.transaction_type = WIP_CONSTANTS.COMP_TXN
3184: AND EXISTS
3185: (SELECT 'X'
3186: FROM wip_shop_floor_status_codes wsc,
3187: wip_shop_floor_statuses ws

Line 3193: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE

3189: AND ws.organization_id = wmti.organization_id
3190: AND ws.wip_entity_id = wmti.wip_entity_id
3191: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
3192: AND ws.operation_seq_num = wmti.to_operation_seq_num
3193: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
3194: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
3195: AND wsc.status_move_flag = WIP_CONSTANTS.NO
3196: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE)
3197: RETURNING wmti.transaction_id BULK COLLECT INTO enums;

Line 3195: AND wsc.status_move_flag = WIP_CONSTANTS.NO

3191: AND (wmti.line_id IS NULL OR ws.line_id = wmti.line_id)
3192: AND ws.operation_seq_num = wmti.to_operation_seq_num
3193: AND ws.intraoperation_step_type = WIP_CONSTANTS.TOMOVE
3194: AND ws.shop_floor_status_code = wsc.shop_floor_status_code
3195: AND wsc.status_move_flag = WIP_CONSTANTS.NO
3196: AND NVL(wsc.disable_date, SYSDATE + 1) > SYSDATE)
3197: RETURNING wmti.transaction_id BULK COLLECT INTO enums;
3198:
3199: fnd_message.set_name('WIP', 'WIP_STATUS_NO_TXN2');

Line 3211: SET wmti.process_status = WIP_CONSTANTS.ERROR

3207: enums.delete;
3208: -- Error out if wip_parameter do not allow move over no_move shop floor
3209: -- status, and there are no_move status in between
3210: UPDATE wip_move_txn_interface wmti
3211: SET wmti.process_status = WIP_CONSTANTS.ERROR
3212: WHERE wmti.group_id = g_group_id
3213: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3214: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3215: AND wip_sf_status.count_no_move_statuses(

Line 3213: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

3209: -- status, and there are no_move status in between
3210: UPDATE wip_move_txn_interface wmti
3211: SET wmti.process_status = WIP_CONSTANTS.ERROR
3212: WHERE wmti.group_id = g_group_id
3213: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3214: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3215: AND wip_sf_status.count_no_move_statuses(
3216: wmti.organization_id, -- p_org_id
3217: wmti.wip_entity_id, -- p_wip_id

Line 3214: AND wmti.process_status = WIP_CONSTANTS.RUNNING

3210: UPDATE wip_move_txn_interface wmti
3211: SET wmti.process_status = WIP_CONSTANTS.ERROR
3212: WHERE wmti.group_id = g_group_id
3213: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3214: AND wmti.process_status = WIP_CONSTANTS.RUNNING
3215: AND wip_sf_status.count_no_move_statuses(
3216: wmti.organization_id, -- p_org_id
3217: wmti.wip_entity_id, -- p_wip_id
3218: wmti.line_id, -- p_line_id

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

3236: -- Set WMTI.PROCESS_STATUS to error if there is an error from any
3237: -- validation and insert error message into WIP_TXN_INTERFACE_ERRORS
3238: update_interface_tbl;
3239:
3240: -- Set WMTI.PROCESS_PHASE to WIP_CONSTANTS.MOVE_PROC so that move processing
3241: -- code can process these records.
3242: UPDATE wip_move_txn_interface wmti
3243: SET process_phase = WIP_CONSTANTS.MOVE_PROC
3244: WHERE wmti.group_id = g_group_id

Line 3243: SET process_phase = WIP_CONSTANTS.MOVE_PROC

3239:
3240: -- Set WMTI.PROCESS_PHASE to WIP_CONSTANTS.MOVE_PROC so that move processing
3241: -- code can process these records.
3242: UPDATE wip_move_txn_interface wmti
3243: SET process_phase = WIP_CONSTANTS.MOVE_PROC
3244: WHERE wmti.group_id = g_group_id
3245: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3246: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
3247:

Line 3245: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL

3241: -- code can process these records.
3242: UPDATE wip_move_txn_interface wmti
3243: SET process_phase = WIP_CONSTANTS.MOVE_PROC
3244: WHERE wmti.group_id = g_group_id
3245: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3246: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
3247:
3248: -- write to the log file
3249: if (l_logLevel <= wip_constants.trace_logging) then

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

3242: UPDATE wip_move_txn_interface wmti
3243: SET process_phase = WIP_CONSTANTS.MOVE_PROC
3244: WHERE wmti.group_id = g_group_id
3245: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3246: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
3247:
3248: -- write to the log file
3249: if (l_logLevel <= wip_constants.trace_logging) then
3250: wip_logger.exitPoint(p_procName => 'wip_move_validator.validateOATxn',

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

3245: AND wmti.process_phase = WIP_CONSTANTS.MOVE_VAL
3246: AND wmti.process_status = WIP_CONSTANTS.RUNNING;
3247:
3248: -- write to the log file
3249: if (l_logLevel <= wip_constants.trace_logging) then
3250: wip_logger.exitPoint(p_procName => 'wip_move_validator.validateOATxn',
3251: p_procReturnStatus => fnd_api.g_ret_sts_success,
3252: p_msg => 'procedure complete',
3253: x_returnStatus => l_returnStatus);

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

3253: x_returnStatus => l_returnStatus);
3254: end if;
3255: EXCEPTION
3256: WHEN others THEN
3257: if (l_logLevel <= wip_constants.trace_logging) then
3258: wip_logger.exitPoint(p_procName => 'wip_move_validator.validateOATxn',
3259: p_procReturnStatus => fnd_api.g_ret_sts_unexp_error,
3260: p_msg => 'Unexpected Errors: ' || SQLERRM,
3261: x_returnStatus => l_returnStatus);