DBA Data[Home] [Help]

APPS.WIP_MASSLOAD_PUB dependencies on WIP_CONSTANTS

Line 39: and process_status = wip_constants.pending

35: cursor c_allrows is
36: select 1
37: from wip_job_schedule_interface
38: where group_id = p_groupID
39: and process_status = wip_constants.pending
40: and process_phase = wip_constants.ml_validation
41: and load_type <> wip_constants.create_sched
42: for update nowait;
43:

Line 40: and process_phase = wip_constants.ml_validation

36: select 1
37: from wip_job_schedule_interface
38: where group_id = p_groupID
39: and process_status = wip_constants.pending
40: and process_phase = wip_constants.ml_validation
41: and load_type <> wip_constants.create_sched
42: for update nowait;
43:
44: cursor c_wjsi is

Line 41: and load_type <> wip_constants.create_sched

37: from wip_job_schedule_interface
38: where group_id = p_groupID
39: and process_status = wip_constants.pending
40: and process_phase = wip_constants.ml_validation
41: and load_type <> wip_constants.create_sched
42: for update nowait;
43:
44: cursor c_wjsi is
45: select rowid,

Line 58: and process_phase = wip_constants.ml_validation

54: class_code, --8296679
55: date_released --8296679
56: from wip_job_schedule_interface
57: where group_id = p_groupID
58: and process_phase = wip_constants.ml_validation
59: and process_status in (wip_constants.running, wip_constants.warning)
60: and load_type <> wip_constants.create_sched;
61:
62: cursor cur_wdj is

Line 59: and process_status in (wip_constants.running, wip_constants.warning)

55: date_released --8296679
56: from wip_job_schedule_interface
57: where group_id = p_groupID
58: and process_phase = wip_constants.ml_validation
59: and process_status in (wip_constants.running, wip_constants.warning)
60: and load_type <> wip_constants.create_sched;
61:
62: cursor cur_wdj is
63: select wdj.wip_entity_id,

Line 60: and load_type <> wip_constants.create_sched;

56: from wip_job_schedule_interface
57: where group_id = p_groupID
58: and process_phase = wip_constants.ml_validation
59: and process_status in (wip_constants.running, wip_constants.warning)
60: and load_type <> wip_constants.create_sched;
61:
62: cursor cur_wdj is
63: select wdj.wip_entity_id,
64: wdj.organization_id,

Line 70: and process_status in (wip_constants.running, wip_constants.warning)

66: wdj.class_code,
67: wdj.date_released
68: from wip_discrete_jobs wdj, wip_job_schedule_interface wjsi
69: where wjsi.group_id = p_groupID
70: and process_status in (wip_constants.running, wip_constants.warning)
71: and wjsi.wip_entity_id = wdj.wip_entity_id
72: and wdj.status_type in (wip_constants.released, wip_constants.hold);
73:
74: begin

Line 72: and wdj.status_type in (wip_constants.released, wip_constants.hold);

68: from wip_discrete_jobs wdj, wip_job_schedule_interface wjsi
69: where wjsi.group_id = p_groupID
70: and process_status in (wip_constants.running, wip_constants.warning)
71: and wjsi.wip_entity_id = wdj.wip_entity_id
72: and wdj.status_type in (wip_constants.released, wip_constants.hold);
73:
74: begin
75: x_returnStatus := fnd_api.g_ret_sts_success;
76: if (l_logLevel <= wip_constants.trace_logging) then

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

72: and wdj.status_type in (wip_constants.released, wip_constants.hold);
73:
74: begin
75: x_returnStatus := fnd_api.g_ret_sts_success;
76: if (l_logLevel <= wip_constants.trace_logging) then
77: l_params(1).paramName := 'p_groupID';
78: l_params(1).paramValue := p_groupID;
79: l_params(2).paramName := 'p_validationLevel';
80: l_params(2).paramValue := p_validationLevel;

Line 94: and process_status = wip_constants.pending

90:
91: select count(*) into l_requestCount
92: from wip_job_schedule_interface
93: where group_id = p_groupID
94: and process_status = wip_constants.pending
95: and process_phase = wip_constants.ml_validation
96: and load_type <> wip_constants.create_sched;
97:
98: if (l_logLevel <= wip_constants.trace_logging) then

Line 95: and process_phase = wip_constants.ml_validation

91: select count(*) into l_requestCount
92: from wip_job_schedule_interface
93: where group_id = p_groupID
94: and process_status = wip_constants.pending
95: and process_phase = wip_constants.ml_validation
96: and load_type <> wip_constants.create_sched;
97:
98: if (l_logLevel <= wip_constants.trace_logging) then
99: wip_logger.log(l_requestCount || ' pending request(s) found for group_id' || p_groupID || ' for discrete processing', l_retStatus);

Line 96: and load_type <> wip_constants.create_sched;

92: from wip_job_schedule_interface
93: where group_id = p_groupID
94: and process_status = wip_constants.pending
95: and process_phase = wip_constants.ml_validation
96: and load_type <> wip_constants.create_sched;
97:
98: if (l_logLevel <= wip_constants.trace_logging) then
99: wip_logger.log(l_requestCount || ' pending request(s) found for group_id' || p_groupID || ' for discrete processing', l_retStatus);
100: end if;

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

94: and process_status = wip_constants.pending
95: and process_phase = wip_constants.ml_validation
96: and load_type <> wip_constants.create_sched;
97:
98: if (l_logLevel <= wip_constants.trace_logging) then
99: wip_logger.log(l_requestCount || ' pending request(s) found for group_id' || p_groupID || ' for discrete processing', l_retStatus);
100: end if;
101:
102: -- lock all the records

Line 111: process_status = wip_constants.running

107:
108: -- assign interface_id and set process_status to running
109: update wip_job_schedule_interface
110: set interface_id = wip_interface_s.nextval,
111: process_status = wip_constants.running
112: where group_id = p_groupID
113: and process_status = wip_constants.pending
114: and process_phase = wip_constants.ml_validation
115: and load_type <> wip_constants.create_sched;

Line 113: and process_status = wip_constants.pending

109: update wip_job_schedule_interface
110: set interface_id = wip_interface_s.nextval,
111: process_status = wip_constants.running
112: where group_id = p_groupID
113: and process_status = wip_constants.pending
114: and process_phase = wip_constants.ml_validation
115: and load_type <> wip_constants.create_sched;
116:
117: if (p_commitFlag <> 0) then

Line 114: and process_phase = wip_constants.ml_validation

110: set interface_id = wip_interface_s.nextval,
111: process_status = wip_constants.running
112: where group_id = p_groupID
113: and process_status = wip_constants.pending
114: and process_phase = wip_constants.ml_validation
115: and load_type <> wip_constants.create_sched;
116:
117: if (p_commitFlag <> 0) then
118: commit;

Line 115: and load_type <> wip_constants.create_sched;

111: process_status = wip_constants.running
112: where group_id = p_groupID
113: and process_status = wip_constants.pending
114: and process_phase = wip_constants.ml_validation
115: and load_type <> wip_constants.create_sched;
116:
117: if (p_commitFlag <> 0) then
118: commit;
119: end if;

Line 140: if(wjsi_rec.load_type in (WIP_CONSTANTS.RESCHED_JOB,

136: begin
137: savepoint wip_massload_start;
138:
139: /*Bug 8494582: Adding the following IF and SQL to fetch old job status in case of updating a job*/
140: if(wjsi_rec.load_type in (WIP_CONSTANTS.RESCHED_JOB,
141: WIP_CONSTANTS.RESCHED_EAM_JOB)) then
142: select wdj.status_type
143: into l_wdj_old_status_type
144: from wip_discrete_jobs wdj

Line 141: WIP_CONSTANTS.RESCHED_EAM_JOB)) then

137: savepoint wip_massload_start;
138:
139: /*Bug 8494582: Adding the following IF and SQL to fetch old job status in case of updating a job*/
140: if(wjsi_rec.load_type in (WIP_CONSTANTS.RESCHED_JOB,
141: WIP_CONSTANTS.RESCHED_EAM_JOB)) then
142: select wdj.status_type
143: into l_wdj_old_status_type
144: from wip_discrete_jobs wdj
145: where wdj.organization_id=wjsi_rec.organization_id

Line 161: and wjdi.process_phase = wip_constants.ml_validation

157: from wip_job_schedule_interface wjsi,
158: wip_job_dtls_interface wjdi
159: where wjdi.parent_header_id = wjsi.header_id
160: and wjdi.group_id = wjsi.group_id
161: and wjdi.process_phase = wip_constants.ml_validation
162: and wjdi.process_status = wip_constants.pending
163: and wjsi.rowid = wjsi_rec.rowid
164: and wjsi.load_type in (wip_constants.create_job,
165: wip_constants.create_ns_job,

Line 162: and wjdi.process_status = wip_constants.pending

158: wip_job_dtls_interface wjdi
159: where wjdi.parent_header_id = wjsi.header_id
160: and wjdi.group_id = wjsi.group_id
161: and wjdi.process_phase = wip_constants.ml_validation
162: and wjdi.process_status = wip_constants.pending
163: and wjsi.rowid = wjsi_rec.rowid
164: and wjsi.load_type in (wip_constants.create_job,
165: wip_constants.create_ns_job,
166: wip_constants.resched_job);

Line 164: and wjsi.load_type in (wip_constants.create_job,

160: and wjdi.group_id = wjsi.group_id
161: and wjdi.process_phase = wip_constants.ml_validation
162: and wjdi.process_status = wip_constants.pending
163: and wjsi.rowid = wjsi_rec.rowid
164: and wjsi.load_type in (wip_constants.create_job,
165: wip_constants.create_ns_job,
166: wip_constants.resched_job);
167:
168: if (l_logLevel <= wip_constants.trace_logging) then

Line 165: wip_constants.create_ns_job,

161: and wjdi.process_phase = wip_constants.ml_validation
162: and wjdi.process_status = wip_constants.pending
163: and wjsi.rowid = wjsi_rec.rowid
164: and wjsi.load_type in (wip_constants.create_job,
165: wip_constants.create_ns_job,
166: wip_constants.resched_job);
167:
168: if (l_logLevel <= wip_constants.trace_logging) then
169: wip_logger.log('There are ' || l_totalNum || ' detail records....', l_retStatus);

Line 166: wip_constants.resched_job);

162: and wjdi.process_status = wip_constants.pending
163: and wjsi.rowid = wjsi_rec.rowid
164: and wjsi.load_type in (wip_constants.create_job,
165: wip_constants.create_ns_job,
166: wip_constants.resched_job);
167:
168: if (l_logLevel <= wip_constants.trace_logging) then
169: wip_logger.log('There are ' || l_totalNum || ' detail records....', l_retStatus);
170: end if;

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

164: and wjsi.load_type in (wip_constants.create_job,
165: wip_constants.create_ns_job,
166: wip_constants.resched_job);
167:
168: if (l_logLevel <= wip_constants.trace_logging) then
169: wip_logger.log('There are ' || l_totalNum || ' detail records....', l_retStatus);
170: end if;
171:
172: if ( l_totalNum > 0 ) then

Line 199: if (wjsi_rec.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and

195: after loading operation from WJDI to populate quantity in queue of the first operation
196: added in WJDI
197: */
198: -- release job if necessary
199: if (wjsi_rec.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and
200: wjsi_rec.status_type in (wip_constants.released, wip_constants.hold) ) then
201: wip_mass_load_processor.ml_release(wjsi_rec.wip_entity_id,
202: wjsi_rec.organization_id,
203: wjsi_rec.class_code,

Line 200: wjsi_rec.status_type in (wip_constants.released, wip_constants.hold) ) then

196: added in WJDI
197: */
198: -- release job if necessary
199: if (wjsi_rec.load_type in (wip_constants.create_job, wip_constants.create_ns_job) and
200: wjsi_rec.status_type in (wip_constants.released, wip_constants.hold) ) then
201: wip_mass_load_processor.ml_release(wjsi_rec.wip_entity_id,
202: wjsi_rec.organization_id,
203: wjsi_rec.class_code,
204: wjsi_rec.status_type,

Line 227: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,

223: wip_job_schedule_interface wjsi
224: where wjsi.rowid = wjsi_rec.rowid
225: and wdj.wip_entity_id = wjsi.wip_entity_id
226: and wdj.organization_id = wjsi.organization_id
227: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
228: WIP_CONSTANTS.CREATE_NS_JOB,
229: WIP_CONSTANTS.CREATE_EAM_JOB,
230: WIP_CONSTANTS.RESCHED_EAM_JOB,
231: WIP_CONSTANTS.RESCHED_JOB) ;

Line 228: WIP_CONSTANTS.CREATE_NS_JOB,

224: where wjsi.rowid = wjsi_rec.rowid
225: and wdj.wip_entity_id = wjsi.wip_entity_id
226: and wdj.organization_id = wjsi.organization_id
227: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
228: WIP_CONSTANTS.CREATE_NS_JOB,
229: WIP_CONSTANTS.CREATE_EAM_JOB,
230: WIP_CONSTANTS.RESCHED_EAM_JOB,
231: WIP_CONSTANTS.RESCHED_JOB) ;
232:

Line 229: WIP_CONSTANTS.CREATE_EAM_JOB,

225: and wdj.wip_entity_id = wjsi.wip_entity_id
226: and wdj.organization_id = wjsi.organization_id
227: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
228: WIP_CONSTANTS.CREATE_NS_JOB,
229: WIP_CONSTANTS.CREATE_EAM_JOB,
230: WIP_CONSTANTS.RESCHED_EAM_JOB,
231: WIP_CONSTANTS.RESCHED_JOB) ;
232:
233: if (l_wjsi_new_status_type IN (WIP_CONSTANTS.RELEASED,WIP_CONSTANTS.HOLD)) then

Line 230: WIP_CONSTANTS.RESCHED_EAM_JOB,

226: and wdj.organization_id = wjsi.organization_id
227: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
228: WIP_CONSTANTS.CREATE_NS_JOB,
229: WIP_CONSTANTS.CREATE_EAM_JOB,
230: WIP_CONSTANTS.RESCHED_EAM_JOB,
231: WIP_CONSTANTS.RESCHED_JOB) ;
232:
233: if (l_wjsi_new_status_type IN (WIP_CONSTANTS.RELEASED,WIP_CONSTANTS.HOLD)) then
234: if((wip_osp.po_req_created( l_wdj_wip_entity_id,

Line 231: WIP_CONSTANTS.RESCHED_JOB) ;

227: and wjsi.load_type in (WIP_CONSTANTS.CREATE_JOB,
228: WIP_CONSTANTS.CREATE_NS_JOB,
229: WIP_CONSTANTS.CREATE_EAM_JOB,
230: WIP_CONSTANTS.RESCHED_EAM_JOB,
231: WIP_CONSTANTS.RESCHED_JOB) ;
232:
233: if (l_wjsi_new_status_type IN (WIP_CONSTANTS.RELEASED,WIP_CONSTANTS.HOLD)) then
234: if((wip_osp.po_req_created( l_wdj_wip_entity_id,
235: null,

Line 233: if (l_wjsi_new_status_type IN (WIP_CONSTANTS.RELEASED,WIP_CONSTANTS.HOLD)) then

229: WIP_CONSTANTS.CREATE_EAM_JOB,
230: WIP_CONSTANTS.RESCHED_EAM_JOB,
231: WIP_CONSTANTS.RESCHED_JOB) ;
232:
233: if (l_wjsi_new_status_type IN (WIP_CONSTANTS.RELEASED,WIP_CONSTANTS.HOLD)) then
234: if((wip_osp.po_req_created( l_wdj_wip_entity_id,
235: null,
236: l_wdj_organization_id,
237: null,

Line 238: WIP_CONSTANTS.DISCRETE

234: if((wip_osp.po_req_created( l_wdj_wip_entity_id,
235: null,
236: l_wdj_organization_id,
237: null,
238: WIP_CONSTANTS.DISCRETE
239: ) = FALSE) or l_wdj_old_status_type in (WIP_CONSTANTS.UNRELEASED)) then
240: /*Bug 16529960: wip_osp.release_validation and its subsequencial call CREATE_REQUISITION does not have any exception handling and also it is not returning any error messages .
241: And CREATE_REQUISITION will throw exception by callingAPP_EXCEPTION.RAISE_EXCEPTION when validation failed, which is not handled here. So add the exception handing block */
242: begin

Line 239: ) = FALSE) or l_wdj_old_status_type in (WIP_CONSTANTS.UNRELEASED)) then

235: null,
236: l_wdj_organization_id,
237: null,
238: WIP_CONSTANTS.DISCRETE
239: ) = FALSE) or l_wdj_old_status_type in (WIP_CONSTANTS.UNRELEASED)) then
240: /*Bug 16529960: wip_osp.release_validation and its subsequencial call CREATE_REQUISITION does not have any exception handling and also it is not returning any error messages .
241: And CREATE_REQUISITION will throw exception by callingAPP_EXCEPTION.RAISE_EXCEPTION when validation failed, which is not handled here. So add the exception handing block */
242: begin
243: wip_osp.release_validation(l_wdj_wip_entity_id,

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

245: NULL) ;
246: exception
247: when others then
248: x_errorMsg := fnd_message.get;
249: if (l_logLevel <= wip_constants.trace_logging) then
250: wip_logger.log('calling wip_osp.release_validation failed in wip_massload_pub.massLoadJobs', l_retStatus);
251: end if;
252: raise fnd_api.g_exc_unexpected_error;
253: end;

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

269: wip_validateMLHeader_pvt.setInterfaceError(wjsi_rec.rowid,
270: wjsi_rec.interface_id,
271: x_errorMsg,
272: g_wipMLError);
273: if (l_logLevel <= wip_constants.trace_logging) then
274: wip_logger.log('interface ' || wjsi_rec.interface_id || ' failed: ' || x_errorMsg, l_retStatus);
275: end if;
276: /*Bug 16529960 Add exception handler to avoid massload terminated because of unexpected exception*/
277: when others then

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

279: wip_validateMLHeader_pvt.setInterfaceError(wjsi_rec.rowid,
280: wjsi_rec.interface_id,
281: 'unexp error: ' || SQLERRM,
282: g_wipMLError);
283: if (l_logLevel <= wip_constants.trace_logging) then
284: wip_logger.log('unexp error: ' || SQLERRM||' for interface id: '||wjsi_rec.interface_id, l_retStatus);
285: end if;
286: end;
287: end loop;

Line 333: set process_status = wip_constants.completed,

329:
330:
331:
332: update wip_job_schedule_interface
333: set process_status = wip_constants.completed,
334: process_phase = wip_constants.ml_complete
335: where group_id = p_groupID
336: and process_status in (wip_constants.running, wip_constants.warning)
337: and process_phase = wip_constants.ml_validation

Line 334: process_phase = wip_constants.ml_complete

330:
331:
332: update wip_job_schedule_interface
333: set process_status = wip_constants.completed,
334: process_phase = wip_constants.ml_complete
335: where group_id = p_groupID
336: and process_status in (wip_constants.running, wip_constants.warning)
337: and process_phase = wip_constants.ml_validation
338: and load_type <> wip_constants.create_sched;

Line 336: and process_status in (wip_constants.running, wip_constants.warning)

332: update wip_job_schedule_interface
333: set process_status = wip_constants.completed,
334: process_phase = wip_constants.ml_complete
335: where group_id = p_groupID
336: and process_status in (wip_constants.running, wip_constants.warning)
337: and process_phase = wip_constants.ml_validation
338: and load_type <> wip_constants.create_sched;
339:
340: if (p_commitFlag <> 0) then

Line 337: and process_phase = wip_constants.ml_validation

333: set process_status = wip_constants.completed,
334: process_phase = wip_constants.ml_complete
335: where group_id = p_groupID
336: and process_status in (wip_constants.running, wip_constants.warning)
337: and process_phase = wip_constants.ml_validation
338: and load_type <> wip_constants.create_sched;
339:
340: if (p_commitFlag <> 0) then
341: commit;

Line 338: and load_type <> wip_constants.create_sched;

334: process_phase = wip_constants.ml_complete
335: where group_id = p_groupID
336: and process_status in (wip_constants.running, wip_constants.warning)
337: and process_phase = wip_constants.ml_validation
338: and load_type <> wip_constants.create_sched;
339:
340: if (p_commitFlag <> 0) then
341: commit;
342: end if;

Line 347: and process_status = wip_constants.error;

343:
344: select count(*) into l_errRecCount
345: from wip_job_schedule_interface
346: where group_id = p_groupID
347: and process_status = wip_constants.error;
348:
349: if(l_errRecCount > 0) then
350: x_returnStatus := fnd_api.g_ret_sts_error;
351: else

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

351: else
352: x_returnStatus := fnd_api.g_ret_sts_success;
353: end if;
354:
355: if (l_logLevel <= wip_constants.trace_logging) then
356: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
357: p_procReturnStatus => x_returnStatus,
358: p_msg => 'success',
359: x_returnStatus => l_retStatus);

Line 362: when wip_constants.records_locked then

358: p_msg => 'success',
359: x_returnStatus => l_retStatus);
360: end if;
361: exception
362: when wip_constants.records_locked then
363: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
364: if (l_logLevel <= wip_constants.trace_logging) then
365: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
366: p_procReturnStatus => x_returnStatus,

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

360: end if;
361: exception
362: when wip_constants.records_locked then
363: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
364: if (l_logLevel <= wip_constants.trace_logging) then
365: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
366: p_procReturnStatus => x_returnStatus,
367: p_msg => 'records locked',
368: x_returnStatus => l_retStatus);

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

370: fnd_message.set_name('WIP', 'WIP_LOCKED_ROW_ALREADY_LOCKED');
371: x_errorMsg := fnd_message.get;
372: when fnd_api.g_exc_unexpected_error then
373: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
374: if (l_logLevel <= wip_constants.trace_logging) then
375: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
376: p_procReturnStatus => x_returnStatus,
377: p_msg => x_errorMsg,
378: x_returnStatus => l_retStatus);

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

379: end if;
380: /*Bug 16529960: Add exception handler to log any unexpected exception*/
381: when others then
382: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
383: if (l_logLevel <= wip_constants.trace_logging) then
384: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
385: p_procReturnStatus => x_returnStatus,
386: p_msg => 'unexp error: ' || SQLERRM,
387: x_returnStatus => l_retStatus);

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

420: where interface_id = p_interfaceID
421: for update nowait;
422: begin
423: x_returnStatus := fnd_api.g_ret_sts_success;
424: if (l_logLevel <= wip_constants.trace_logging) then
425: l_params(1).paramName := 'p_interfaceID';
426: l_params(1).paramValue := p_interfaceID;
427: l_params(2).paramName := 'p_validationLevel';
428: l_params(2).paramValue := p_validationLevel;

Line 446: and process_status = wip_constants.pending

442: select count(*)
443: into l_totalNum
444: from wip_job_schedule_interface
445: where interface_id = p_interfaceID
446: and process_status = wip_constants.pending
447: and process_phase = wip_constants.ml_validation
448: and load_type in (wip_constants.create_job, wip_constants.create_ns_job);
449:
450: if ( l_totalNum <> 1 ) then

Line 447: and process_phase = wip_constants.ml_validation

443: into l_totalNum
444: from wip_job_schedule_interface
445: where interface_id = p_interfaceID
446: and process_status = wip_constants.pending
447: and process_phase = wip_constants.ml_validation
448: and load_type in (wip_constants.create_job, wip_constants.create_ns_job);
449:
450: if ( l_totalNum <> 1 ) then
451: fnd_message.set_name('WIP', 'WIP_WJSI_ONE_ROW');

Line 448: and load_type in (wip_constants.create_job, wip_constants.create_ns_job);

444: from wip_job_schedule_interface
445: where interface_id = p_interfaceID
446: and process_status = wip_constants.pending
447: and process_phase = wip_constants.ml_validation
448: and load_type in (wip_constants.create_job, wip_constants.create_ns_job);
449:
450: if ( l_totalNum <> 1 ) then
451: fnd_message.set_name('WIP', 'WIP_WJSI_ONE_ROW');
452: x_errorMsg := fnd_message.get;

Line 474: set process_status = wip_constants.running

470: close c_allrows;
471: end if;
472:
473: update wip_job_schedule_interface
474: set process_status = wip_constants.running
475: where interface_id = p_interfaceID;
476:
477: -- do the validation for those records
478: wip_validateMLHeader_pvt.validateMLHeader(p_groupID => l_groupID,

Line 490: and process_status in (wip_constants.running, wip_constants.warning);

486: select count(*)
487: into l_totalNum
488: from wip_job_schedule_interface
489: where interface_id = p_interfaceID
490: and process_status in (wip_constants.running, wip_constants.warning);
491:
492: if ( l_totalNum <> 1 ) then
493: fnd_message.set_name('WIP', 'WIP_WJSI_VAL_FAILED');
494: x_errorMsg := fnd_message.get;

Line 509: and wjdi.process_phase = wip_constants.ml_validation

505: from wip_job_schedule_interface wjsi,
506: wip_job_dtls_interface wjdi
507: where wjdi.parent_header_id = wjsi.header_id
508: and wjdi.group_id = wjsi.group_id
509: and wjdi.process_phase = wip_constants.ml_validation
510: and wjdi.process_status = wip_constants.pending
511: and wjsi.rowid = l_rowid;
512:
513: if (l_logLevel <= wip_constants.trace_logging) then

Line 510: and wjdi.process_status = wip_constants.pending

506: wip_job_dtls_interface wjdi
507: where wjdi.parent_header_id = wjsi.header_id
508: and wjdi.group_id = wjsi.group_id
509: and wjdi.process_phase = wip_constants.ml_validation
510: and wjdi.process_status = wip_constants.pending
511: and wjsi.rowid = l_rowid;
512:
513: if (l_logLevel <= wip_constants.trace_logging) then
514: wip_logger.log('There are ' || l_totalNum || ' detail records....', l_retStatus);

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

509: and wjdi.process_phase = wip_constants.ml_validation
510: and wjdi.process_status = wip_constants.pending
511: and wjsi.rowid = l_rowid;
512:
513: if (l_logLevel <= wip_constants.trace_logging) then
514: wip_logger.log('There are ' || l_totalNum || ' detail records....', l_retStatus);
515: end if;
516:
517: if ( l_totalNum > 0 ) then

Line 552: if (l_load_type in (wip_constants.create_job, wip_constants.create_ns_job) and

548: in queue of the first operation added in WJDI
549: */
550: -- release job if necessary
551:
552: if (l_load_type in (wip_constants.create_job, wip_constants.create_ns_job) and
553: l_status_type in (wip_constants.released, wip_constants.hold) ) then
554: wip_mass_load_processor.ml_release(x_wipEntityID,
555: l_organization_id,
556: l_class_code,

Line 553: l_status_type in (wip_constants.released, wip_constants.hold) ) then

549: */
550: -- release job if necessary
551:
552: if (l_load_type in (wip_constants.create_job, wip_constants.create_ns_job) and
553: l_status_type in (wip_constants.released, wip_constants.hold) ) then
554: wip_mass_load_processor.ml_release(x_wipEntityID,
555: l_organization_id,
556: l_class_code,
557: l_status_type,

Line 570: set process_status = wip_constants.completed

566:
567: /* End Fix 8936011 */
568:
569: update wip_job_schedule_interface
570: set process_status = wip_constants.completed
571: where rowid = l_rowid;
572:
573: if (l_logLevel <= wip_constants.trace_logging) then
574: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,

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

569: update wip_job_schedule_interface
570: set process_status = wip_constants.completed
571: where rowid = l_rowid;
572:
573: if (l_logLevel <= wip_constants.trace_logging) then
574: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
575: p_procReturnStatus => x_returnStatus,
576: p_msg => 'success',
577: x_returnStatus => l_retStatus);

Line 580: when wip_constants.records_locked then

576: p_msg => 'success',
577: x_returnStatus => l_retStatus);
578: end if;
579: exception
580: when wip_constants.records_locked then
581: x_returnStatus := fnd_api.g_ret_sts_unexp_error;
582: fnd_message.set_name('WIP', 'WIP_LOCKED_ROW_ALREADY_LOCKED');
583: x_errorMsg := fnd_message.get;
584: wip_validateMLHeader_pvt.setInterfaceError(l_rowid,

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

584: wip_validateMLHeader_pvt.setInterfaceError(l_rowid,
585: p_interfaceID,
586: x_errorMsg,
587: g_wipMLError);
588: if (l_logLevel <= wip_constants.trace_logging) then
589: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
590: p_procReturnStatus => x_returnStatus,
591: p_msg => 'records locked',
592: x_returnStatus => l_retStatus);

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

596: wip_validateMLHeader_pvt.setInterfaceError(l_rowid,
597: p_interfaceID,
598: x_errorMsg,
599: g_wipMLError);
600: if (l_logLevel <= wip_constants.trace_logging) then
601: wip_logger.exitPoint(p_procName => g_pkgName || '.' || l_procName,
602: p_procReturnStatus => x_returnStatus,
603: p_msg => x_errorMsg,
604: x_returnStatus => l_retStatus);

Line 648: if ( l_wjsiSerOp is null and l_loadType = wip_constants.resched_job ) then

644: l_orgID
645: from wip_job_schedule_interface
646: where rowid = p_rowid;
647:
648: if ( l_wjsiSerOp is null and l_loadType = wip_constants.resched_job ) then
649: -- due to re-exploding, we may need to clear out the serialization start op
650: update wip_discrete_jobs wdj
651: set serialization_start_op = null
652: where wip_entity_id = l_wipEntityID

Line 701: and msi.serial_number_control_code = wip_constants.full_sn;

697: mtl_system_items msi
698: where wdj.primary_item_id = msi.inventory_item_id
699: and wdj.organization_id = msi.organization_id
700: and wdj.wip_entity_id = l_wipEntityID
701: and msi.serial_number_control_code = wip_constants.full_sn;
702:
703: open c_ops(l_wipEntityID);
704: loop
705: fetch c_ops into l_curOpSeq;

Line 726: if ( l_loadType = wip_constants.resched_job and l_wjsiSerOp is not null ) then

722: raise fnd_api.g_exc_unexpected_error;
723: end if;
724:
725: --job must be unreleased to change the serialization op on a reschedule request.
726: if ( l_loadType = wip_constants.resched_job and l_wjsiSerOp is not null ) then
727: select 1
728: into l_dummy
729: from wip_discrete_jobs
730: where wip_entity_id = l_wipEntityID

Line 731: and status_type = wip_constants.unreleased;

727: select 1
728: into l_dummy
729: from wip_discrete_jobs
730: where wip_entity_id = l_wipEntityID
731: and status_type = wip_constants.unreleased;
732: end if;
733:
734: l_msg := 'WIP_ML_SER_DEF_FAILURE';
735: wip_job_dtls_substitutions.default_serial_associations(p_rowid => p_rowid,