594: x_msg_data OUT NOCOPY VARCHAR2)
595: Is
596: Begin
597:
598: IF p_init_msg_list IS NOT NULL AND FND_API.TO_BOOLEAN(p_init_msg_list)
599: THEN
600: FND_MSG_PUB.initialize;
601: END IF;
602: x_return_status := FND_API.G_RET_STS_SUCCESS;
598: IF p_init_msg_list IS NOT NULL AND FND_API.TO_BOOLEAN(p_init_msg_list)
599: THEN
600: FND_MSG_PUB.initialize;
601: END IF;
602: x_return_status := FND_API.G_RET_STS_SUCCESS;
603:
604: update wip_discrete_jobs wdj
605: set wdj.job_note = wdj.job_note || p_msg
606: where wdj.wip_entity_id = p_wip_entity_id;
605: set wdj.job_note = wdj.job_note || p_msg
606: where wdj.wip_entity_id = p_wip_entity_id;
607:
608: exception when others then
609: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
610:
611: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
612: FND_MSG_PUB.Add_Exc_Msg ('wip_ws_util' ,'append_job_note');
613: END IF;
623: Is
624: job_note clob;
625: Begin
626:
627: IF p_init_msg_list IS NOT NULL AND FND_API.TO_BOOLEAN(p_init_msg_list)
628: THEN
629: FND_MSG_PUB.initialize;
630: END IF;
631: x_return_status := FND_API.G_RET_STS_SUCCESS;
627: IF p_init_msg_list IS NOT NULL AND FND_API.TO_BOOLEAN(p_init_msg_list)
628: THEN
629: FND_MSG_PUB.initialize;
630: END IF;
631: x_return_status := FND_API.G_RET_STS_SUCCESS;
632:
633: select wdj.job_note
634: into job_note
635: from wip_discrete_jobs wdj
640:
641: commit;
642:
643: exception when others then
644: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
645:
646: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
647: FND_MSG_PUB.Add_Exc_Msg ('wip_ws_util' ,'append_job_note');
648: END IF;
659: l_note CLOB;
660:
661: Begin
662:
663: IF p_init_msg_list IS NOT NULL AND FND_API.TO_BOOLEAN(p_init_msg_list)
664: THEN
665: FND_MSG_PUB.initialize;
666: END IF;
667: x_return_status := FND_API.G_RET_STS_SUCCESS;
663: IF p_init_msg_list IS NOT NULL AND FND_API.TO_BOOLEAN(p_init_msg_list)
664: THEN
665: FND_MSG_PUB.initialize;
666: END IF;
667: x_return_status := FND_API.G_RET_STS_SUCCESS;
668:
669: select note into l_note from wip_exceptions
670: where exception_id = p_exception_id;
671:
679: set we.note = l_note
680: where we.exception_id = p_exception_id;
681:
682: exception when others then
683: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
684:
685: IF FND_MSG_PUB.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
686: FND_MSG_PUB.Add_Exc_Msg ('wip_ws_util' ,'append_exception_note');
687: END IF;
1271: release_on_commit => TRUE);
1272: trace_log('get_lock: got lock for lock handle with status ='||x_lock_status);
1273: trace_log('get_lock: Returning from lock_for_match');
1274: EXCEPTION
1275: WHEN FND_API.G_EXC_UNEXPECTED_ERROR then
1276: trace_log('get_lock: Exception: Unexpected Error '||sqlerrm);
1277: x_Return_Status := FND_API.G_RET_STS_UNEXP_ERROR;
1278:
1279: WHEN OTHERS then
1273: trace_log('get_lock: Returning from lock_for_match');
1274: EXCEPTION
1275: WHEN FND_API.G_EXC_UNEXPECTED_ERROR then
1276: trace_log('get_lock: Exception: Unexpected Error '||sqlerrm);
1277: x_Return_Status := FND_API.G_RET_STS_UNEXP_ERROR;
1278:
1279: WHEN OTHERS then
1280: trace_log('get_lock: Exception: Others Exception : ' || sqlerrm);
1281: x_Return_Status := FND_API.G_RET_STS_UNEXP_ERROR;
1277: x_Return_Status := FND_API.G_RET_STS_UNEXP_ERROR;
1278:
1279: WHEN OTHERS then
1280: trace_log('get_lock: Exception: Others Exception : ' || sqlerrm);
1281: x_Return_Status := FND_API.G_RET_STS_UNEXP_ERROR;
1282:
1283: END get_lock;
1284:
1285:
1288: x_msg_count OUT NOCOPY NUMBER,
1289: x_msg_data OUT NOCOPY VARCHAR2,
1290: p_org_id IN NUMBER,
1291: p_lock_prefix IN varchar2) IS
1292: l_return_status VARCHAR2(1) := fnd_api.g_ret_sts_success;
1293: l_lock_handle VARCHAR2(128);
1294: l_status INTEGER;
1295: l_returnStatus varchar2(1);
1296: BEGIN
1308: --if parameter error or illegal lock handle (internal error)
1309:
1310: if l_status IN (3,5) THEN
1311: trace_log('release_lock: Error releasing lock');
1312: RAISE fnd_api.g_exc_error;
1313: end if;
1314:
1315: x_return_status := l_return_status;
1316:
1316:
1317:
1318: EXCEPTION
1319:
1320: WHEN fnd_api.g_exc_error THEN
1321: trace_log('release_lock: Exception: expected error');
1322: x_return_status := fnd_api.g_ret_sts_error;
1323:
1324: WHEN fnd_api.g_exc_unexpected_error THEN
1318: EXCEPTION
1319:
1320: WHEN fnd_api.g_exc_error THEN
1321: trace_log('release_lock: Exception: expected error');
1322: x_return_status := fnd_api.g_ret_sts_error;
1323:
1324: WHEN fnd_api.g_exc_unexpected_error THEN
1325: trace_log('release_lock: Exception: Unexpected error');
1326: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1320: WHEN fnd_api.g_exc_error THEN
1321: trace_log('release_lock: Exception: expected error');
1322: x_return_status := fnd_api.g_ret_sts_error;
1323:
1324: WHEN fnd_api.g_exc_unexpected_error THEN
1325: trace_log('release_lock: Exception: Unexpected error');
1326: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1327:
1328: WHEN OTHERS THEN
1322: x_return_status := fnd_api.g_ret_sts_error;
1323:
1324: WHEN fnd_api.g_exc_unexpected_error THEN
1325: trace_log('release_lock: Exception: Unexpected error');
1326: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1327:
1328: WHEN OTHERS THEN
1329: trace_log('release_lock: Exception: Others Exception: '||sqlerrm);
1330: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1326: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1327:
1328: WHEN OTHERS THEN
1329: trace_log('release_lock: Exception: Others Exception: '||sqlerrm);
1330: x_return_status := fnd_api.g_ret_sts_unexp_error ;
1331:
1332: END release_lock;
1333:
1334: PROCEDURE trace_log(p_msg IN VARCHAR2) IS