149: l_request_id := FND_GLOBAL.CONC_REQUEST_ID;
150: l_program_id := FND_GLOBAL.CONC_PROGRAM_ID;
151:
152: -- set the return status.
153: x_return_status := FND_API.G_RET_STS_SUCCESS ;
154:
155: -- Set the return code to success
156:
157: RETCODE := 0;
472: x_orig_resp_appl_id => xrespapplid,
473: x_return_status => x_return_status,
474: x_msg_count => x_msg_count,
475: x_msg_data => x_msg_data);
476: If x_return_status = FND_API.G_RET_STS_ERROR then
477: if PG_DEBUG <> 0 then
478: oe_debug_pub.add('Set_created_by_context API ended with expected error',1);
479: end if;
480: raise FND_API.G_EXC_ERROR;
476: If x_return_status = FND_API.G_RET_STS_ERROR then
477: if PG_DEBUG <> 0 then
478: oe_debug_pub.add('Set_created_by_context API ended with expected error',1);
479: end if;
480: raise FND_API.G_EXC_ERROR;
481: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
482: if PG_DEBUG <> 0 then
483: oe_debug_pub.add('Set_created_by_context API ended with unexpected error',1);
484: end if;
477: if PG_DEBUG <> 0 then
478: oe_debug_pub.add('Set_created_by_context API ended with expected error',1);
479: end if;
480: raise FND_API.G_EXC_ERROR;
481: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
482: if PG_DEBUG <> 0 then
483: oe_debug_pub.add('Set_created_by_context API ended with unexpected error',1);
484: end if;
485: raise FND_API.G_EXC_UNEXPECTED_ERROR;
481: elsif x_return_status = FND_API.G_RET_STS_UNEXP_ERROR then
482: if PG_DEBUG <> 0 then
483: oe_debug_pub.add('Set_created_by_context API ended with unexpected error',1);
484: end if;
485: raise FND_API.G_EXC_UNEXPECTED_ERROR;
486: end if; /*x_return_staus = FND_API.G_EXC_ERROR */
487: l_current_org_id := org_id_arr(i);
488: End if; /* l_current_org_id <> so_lines.org_id */
489:
482: if PG_DEBUG <> 0 then
483: oe_debug_pub.add('Set_created_by_context API ended with unexpected error',1);
484: end if;
485: raise FND_API.G_EXC_UNEXPECTED_ERROR;
486: end if; /*x_return_staus = FND_API.G_EXC_ERROR */
487: l_current_org_id := org_id_arr(i);
488: End if; /* l_current_org_id <> so_lines.org_id */
489:
490: -- We just need to push the workflow further. Workflow will take care of rest.
507: p_activity_name=>'CREATE_SUPPLY_ORDER_ELIGIBLE',
508: p_result_code=>'COMPLETE');
509: IF NOT l_res THEN
510: oe_debug_pub.add('auto_create_dropship: ' || 'Error occurred in updating the workflow status - Stmt_num'||to_char(l_stmt_num),1);
511: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
512: END IF;
513:
514: ELSE
515:
532: p_result_code=>'COMPLETE');
533:
534: IF NOT l_res THEN
535: oe_debug_pub.add('auto_create_dropship: ' || 'Error occurred in updating the workflow status - Stmt_num'||to_char(l_stmt_num),1);
536: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
537: END IF;
538: END IF;
539: END IF;
540:
570: COMMIT ;
571:
572:
573: EXCEPTION
574: WHEN FND_API.G_EXC_ERROR THEN
575: oe_debug_pub.add('auto_create_dropship: ' || ':exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
576: x_return_status := FND_API.G_RET_STS_ERROR;
577: RETCODE := 2;
578: conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',Current_Error_Code);
572:
573: EXCEPTION
574: WHEN FND_API.G_EXC_ERROR THEN
575: oe_debug_pub.add('auto_create_dropship: ' || ':exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
576: x_return_status := FND_API.G_RET_STS_ERROR;
577: RETCODE := 2;
578: conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',Current_Error_Code);
579:
580: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
576: x_return_status := FND_API.G_RET_STS_ERROR;
577: RETCODE := 2;
578: conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',Current_Error_Code);
579:
580: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
581: oe_debug_pub.add('auto_create_dropship: ' || ':exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
582: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
583: RETCODE := 2;
584: conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',Current_Error_Code);
578: conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',Current_Error_Code);
579:
580: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
581: oe_debug_pub.add('auto_create_dropship: ' || ':exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
582: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
583: RETCODE := 2;
584: conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',Current_Error_Code);
585:
586: WHEN OTHERS THEN
584: conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',Current_Error_Code);
585:
586: WHEN OTHERS THEN
587: oe_debug_pub.add('auto_create_dropship: ' || ':exp error::'||to_char(l_stmt_num)||'::'||sqlerrm,1);
588: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
589: RETCODE := 2;
590: conc_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',Current_Error_Code);
591:
592: END auto_create_dropship;