56:
57: wip_logger.entryPoint(p_procName => 'WIP_WS_SHORTAGE.get_org_comp_calc_param',
58: p_params => l_params,
59: x_returnStatus => l_return_Status);
60: if(l_return_Status <> fnd_api.g_ret_sts_success) then
61: raise fnd_api.g_exc_unexpected_error;
62: end if;
63: wip_logger.log(' Start Time : = '||to_char(sysdate),l_return_status);
64:
57: wip_logger.entryPoint(p_procName => 'WIP_WS_SHORTAGE.get_org_comp_calc_param',
58: p_params => l_params,
59: x_returnStatus => l_return_Status);
60: if(l_return_Status <> fnd_api.g_ret_sts_success) then
61: raise fnd_api.g_exc_unexpected_error;
62: end if;
63: wip_logger.log(' Start Time : = '||to_char(sysdate),l_return_status);
64:
65: end if;
90:
91: If l_pref_exists = 'N' then
92: wip_ws_util.trace_log(' No Preference exists for this organization');
93: fnd_message.set_name('WIP','NO_PTPKPI_PREF_EXISTS');
94: raise FND_API.G_EXC_ERROR;
95: End if;
96:
97:
98:
102: x_return_status => l_return_status,
103: x_msg_count => l_msg_count,
104: x_msg_data => l_msg_data);
105:
106: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
107: wip_ws_util.trace_log('Unexpected error occured in populate_plan_data API');
108: raise FND_API.G_EXC_UNEXPECTED_ERROR;
109: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
110: wip_ws_util.trace_log('Expected error occurred in populate_plan_data API');
104: x_msg_data => l_msg_data);
105:
106: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
107: wip_ws_util.trace_log('Unexpected error occured in populate_plan_data API');
108: raise FND_API.G_EXC_UNEXPECTED_ERROR;
109: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
110: wip_ws_util.trace_log('Expected error occurred in populate_plan_data API');
111: raise FND_API.G_EXC_ERROR;
112: ELSE
105:
106: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
107: wip_ws_util.trace_log('Unexpected error occured in populate_plan_data API');
108: raise FND_API.G_EXC_UNEXPECTED_ERROR;
109: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
110: wip_ws_util.trace_log('Expected error occurred in populate_plan_data API');
111: raise FND_API.G_EXC_ERROR;
112: ELSE
113: wip_ws_util.trace_log('populate_plan_data_API is successfull');
107: wip_ws_util.trace_log('Unexpected error occured in populate_plan_data API');
108: raise FND_API.G_EXC_UNEXPECTED_ERROR;
109: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
110: wip_ws_util.trace_log('Expected error occurred in populate_plan_data API');
111: raise FND_API.G_EXC_ERROR;
112: ELSE
113: wip_ws_util.trace_log('populate_plan_data_API is successfull');
114: END IF;
115:
121: x_return_status => l_return_status,
122: x_msg_count => l_msg_count,
123: x_msg_data => l_msg_data);
124:
125: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
126: wip_ws_util.trace_log('Unexpected error occured in populate_actual_data API');
127: raise FND_API.G_EXC_UNEXPECTED_ERROR;
128: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
129: wip_ws_util.trace_log('Expected error occurred in populate_actual_data API');
123: x_msg_data => l_msg_data);
124:
125: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
126: wip_ws_util.trace_log('Unexpected error occured in populate_actual_data API');
127: raise FND_API.G_EXC_UNEXPECTED_ERROR;
128: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
129: wip_ws_util.trace_log('Expected error occurred in populate_actual_data API');
130: raise FND_API.G_EXC_ERROR;
131: ELSE
124:
125: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
126: wip_ws_util.trace_log('Unexpected error occured in populate_actual_data API');
127: raise FND_API.G_EXC_UNEXPECTED_ERROR;
128: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
129: wip_ws_util.trace_log('Expected error occurred in populate_actual_data API');
130: raise FND_API.G_EXC_ERROR;
131: ELSE
132: wip_ws_util.trace_log('populate_actual_data is successfull');
126: wip_ws_util.trace_log('Unexpected error occured in populate_actual_data API');
127: raise FND_API.G_EXC_UNEXPECTED_ERROR;
128: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
129: wip_ws_util.trace_log('Expected error occurred in populate_actual_data API');
130: raise FND_API.G_EXC_ERROR;
131: ELSE
132: wip_ws_util.trace_log('populate_actual_data is successfull');
133: END IF;
134:
133: END IF;
134:
135:
136: EXCEPTION
137: when FND_API.G_EXC_UNEXPECTED_ERROR then
138: wip_ws_util.trace_log('Came to unexpected error in wip_ws_PTPKPI_CONC_PROG');
139: rollback to wip_ws_ptpkpi_calc;
140: retcode := 2; -- End with error
141: when FND_API.G_EXC_ERROR then
137: when FND_API.G_EXC_UNEXPECTED_ERROR then
138: wip_ws_util.trace_log('Came to unexpected error in wip_ws_PTPKPI_CONC_PROG');
139: rollback to wip_ws_ptpkpi_calc;
140: retcode := 2; -- End with error
141: when FND_API.G_EXC_ERROR then
142: retcode := 1;
143: wip_ws_util.trace_log('Came to expected error in wip_ws_PTPKPI_CONC_PROG');
144: rollback to wip_ws_ptpkpi_calc;
145: when others then
175: l_dummy integer;
176:
177:
178: Begin
179: x_return_status := FND_API.G_RET_STS_SUCCESS;
180:
181:
182: -- Delete the rows that are populated by last concurrent run
183: -- for the parameter org
254: wip_ws_util.trace_log(' Number of rows inserted = '||sql%rowcount);
255: dbms_sql.close_cursor(l_cursor);
256:
257: EXCEPTION
258: when FND_API.G_EXC_UNEXPECTED_ERROR then
259: wip_ws_util.trace_log('Error message = '||sqlerrm);
260: wip_ws_util.trace_log('Came to unexpected error in populate_plan_data');
261: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
262: when FND_API.G_EXC_ERROR then
257: EXCEPTION
258: when FND_API.G_EXC_UNEXPECTED_ERROR then
259: wip_ws_util.trace_log('Error message = '||sqlerrm);
260: wip_ws_util.trace_log('Came to unexpected error in populate_plan_data');
261: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
262: when FND_API.G_EXC_ERROR then
263: wip_ws_util.trace_log('Came to expected error in populate_plan_data');
264: x_return_status := FND_API.G_RET_STS_ERROR;
265: when others then
258: when FND_API.G_EXC_UNEXPECTED_ERROR then
259: wip_ws_util.trace_log('Error message = '||sqlerrm);
260: wip_ws_util.trace_log('Came to unexpected error in populate_plan_data');
261: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
262: when FND_API.G_EXC_ERROR then
263: wip_ws_util.trace_log('Came to expected error in populate_plan_data');
264: x_return_status := FND_API.G_RET_STS_ERROR;
265: when others then
266: wip_ws_util.trace_log('Error message = '||sqlerrm);
260: wip_ws_util.trace_log('Came to unexpected error in populate_plan_data');
261: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
262: when FND_API.G_EXC_ERROR then
263: wip_ws_util.trace_log('Came to expected error in populate_plan_data');
264: x_return_status := FND_API.G_RET_STS_ERROR;
265: when others then
266: wip_ws_util.trace_log('Error message = '||sqlerrm);
267: wip_ws_util.trace_log('Came to others error in populate_plan_data');
268: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
264: x_return_status := FND_API.G_RET_STS_ERROR;
265: when others then
266: wip_ws_util.trace_log('Error message = '||sqlerrm);
267: wip_ws_util.trace_log('Came to others error in populate_plan_data');
268: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
269: End populate_plan_data;
270:
271:
272: FUNCTION get_pref_job_statuses(
916: organization_id,department_id,wip_entity_id,operation_seq_num,shift_id,primary_uom_code,
917: op_lead_time;
918:
919: EXCEPTION
920: when FND_API.G_EXC_UNEXPECTED_ERROR then
921: wip_ws_util.trace_log('Error message = '||sqlerrm);
922: wip_ws_util.trace_log(' Statement no '||l_stmt_no);
923: wip_ws_util.trace_log('Came to unexpected error in populate_actual_data');
924: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
920: when FND_API.G_EXC_UNEXPECTED_ERROR then
921: wip_ws_util.trace_log('Error message = '||sqlerrm);
922: wip_ws_util.trace_log(' Statement no '||l_stmt_no);
923: wip_ws_util.trace_log('Came to unexpected error in populate_actual_data');
924: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
925: when FND_API.G_EXC_ERROR then
926: wip_ws_util.trace_log('Came to expected error in populate_actual_data');
927: wip_ws_util.trace_log(' Statement no '||l_stmt_no);
928: x_return_status := FND_API.G_RET_STS_ERROR;
921: wip_ws_util.trace_log('Error message = '||sqlerrm);
922: wip_ws_util.trace_log(' Statement no '||l_stmt_no);
923: wip_ws_util.trace_log('Came to unexpected error in populate_actual_data');
924: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
925: when FND_API.G_EXC_ERROR then
926: wip_ws_util.trace_log('Came to expected error in populate_actual_data');
927: wip_ws_util.trace_log(' Statement no '||l_stmt_no);
928: x_return_status := FND_API.G_RET_STS_ERROR;
929: when others then
924: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
925: when FND_API.G_EXC_ERROR then
926: wip_ws_util.trace_log('Came to expected error in populate_actual_data');
927: wip_ws_util.trace_log(' Statement no '||l_stmt_no);
928: x_return_status := FND_API.G_RET_STS_ERROR;
929: when others then
930: wip_ws_util.trace_log('Error message = '||sqlerrm);
931: wip_ws_util.trace_log('Came to others error in populate_actual_data');
932: wip_ws_util.trace_log(' Statement no '||l_stmt_no);
929: when others then
930: wip_ws_util.trace_log('Error message = '||sqlerrm);
931: wip_ws_util.trace_log('Came to others error in populate_actual_data');
932: wip_ws_util.trace_log(' Statement no '||l_stmt_no);
933: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
934: End populate_actual_data;
935:
936:
937: