223: wjdi.resource_id_new
224: from
225: wip_interface_errors_v wie,
226: wip_job_schedule_interface wjsi,
227: wip_entities we,
228: wip_job_dtls_interface wjdi
229: where wie.interface_id = wjsi.interface_id
230: and we.wip_entity_id = wjsi.wip_entity_id
231: and wjsi.group_id = wjdi.group_id
274: END add_wip_interface_errors;
275:
276: -- This procedure checks if the specified Job name exists in the
277: -- specified organization. It checks if it exists in
278: -- wip_entities or wip_job_schedule_interface table.
279: -- If it exists, then an Error status is returned.
280: -- If it does not exist in either of the tables, then
281: -- a Sucess status is returned.
282: -- This procedure is used whenever a job_name is generated, to confirm that
297:
298: BEGIN
299:
300:
301: Select count(*) into l_job_count from wip_entities where wip_entity_name = p_job_name and
302: organization_id = p_organization_id ;
303:
304: If l_job_count = 0 Then
305:
302: organization_id = p_organization_id ;
303:
304: If l_job_count = 0 Then
305:
306: -- Job does not exist in WIP_entities, check if it is already inserted in the interface table by another
307: -- process and so may be in the process of getting into WIP.
308: -- If it exists, do not want to use this job name, so return Error
309:
310: Select count(*) into l_job_count from wip_job_schedule_interface where job_name = p_job_name and
311: organization_id = p_organization_id ;
312:
313: IF l_job_count = 0 THEN
314:
315: -- Generated job name does exist either in the interface or wip_entities table,
316: -- Success is returned
317:
318: x_return_status := FND_API.G_RET_STS_SUCCESS;
319: RETURN;
330:
331:
332: ELSE
333:
334: -- Job exists in wip_entities table, hence return Error status
335:
336: x_return_status := FND_API.G_RET_STS_ERROR;
337: RETURN;
338:
380: x_return_status => l_return_status ) ;
381:
382: IF l_return_status = FND_API.G_RET_STS_SUCCESS THEN
383:
384: -- Generated job name does not exist both in the interface and wip_entities table, so exit the loop
385:
386: exit;
387:
388: END IF;
2509:
2510:
2511: Cursor check_mv_interface_errors ( c_group_id NUMBER ) IS
2512: select wip.wip_entity_name, mv.fm_operation_seq_num
2513: from wip_move_txn_interface mv, wip_entities wip
2514: where mv.group_id = c_group_id
2515: and mv.process_status = lc_error_process_status
2516: and mv.wip_entity_id = wip.wip_entity_id;
2517:
6644: -- crj.wip_entity_id may be null (until wip_update is done).
6645: select count(*)
6646: into l_num_other_jobs
6647: from csd_repair_job_xref crj,
6648: wip_entities we
6649: where crj.job_name = we.wip_entity_name
6650: and crj.organization_id = we.organization_id
6651: and crj.repair_line_id = p_repair_line_id
6652: and we.wip_entity_id <> l_wip_entity_id;
7527: -- crj.wip_entity_id may be null (until wip_update is done).
7528: select count(*)
7529: into l_num_other_jobs
7530: from csd_repair_job_xref crj,
7531: wip_entities we
7532: where crj.job_name = we.wip_entity_name
7533: and crj.organization_id = we.organization_id
7534: and crj.repair_line_id = p_repair_line_id
7535: and we.wip_entity_id <> l_wip_entity_id;
8056: FROM
8057: CSD_REPAIR_JOB_XREF CRJX,
8058: WIP_REQUIREMENT_OPERATIONS WRO,
8059: MTL_SYSTEM_ITEMS_KFV MSIK,
8060: WIP_ENTITIES WE,
8061: CSD_WIP_TRANSACTION_DETAILS CWTD,
8062: WIP_DISCRETE_JOBS WDJ,
8063: WIP_OPERATIONS WO,
8064: MTL_SERIAL_NUMBERS MSN,
8275: , WTD.attribute14
8276: , WTD.attribute15
8277: FROM CSD_REPAIR_JOB_XREF CRJX,
8278: WIP_OPERATION_RESOURCES WOR,
8279: WIP_ENTITIES WE,
8280: CSD_WIP_TRANSACTION_DETAILS WTD,
8281: BOM_RESOURCES BR,
8282: wip_operations wo,
8283: WIP_DISCRETE_JOBS wdj,
8454: FROM CSD_REPAIR_JOB_XREF CRJX,
8455: WIP_OPERATIONS WO,
8456: BOM_DEPARTMENTS BD,
8457: wip_discrete_jobs wdj,
8458: wip_entities we,
8459: mfg_lookups ml,
8460: mtl_system_items_kfv msik,
8461: csd_service_codes_vl cscv,
8462: csd_wip_transaction_details WTD,
8711: wtd.object_version_number,
8712: 'N' new_row
8713: FROM CSD_REPAIR_JOB_XREF CRJX,
8714: WIP_OPERATION_RESOURCES WOR,
8715: WIP_ENTITIES WE,
8716: CSD_WIP_TRANSACTION_DETAILS WTD,
8717: BOM_RESOURCES BR,
8718: wip_operations wo,
8719: WIP_DISCRETE_JOBS wdj,