1: package body cstpacit as
2: /* $Header: CSTACITB.pls 120.3.12000000.2 2007/09/17 11:12:04 rgangara ship $ */
3:
4: procedure cost_det_validate (
5: i_txn_interface_id in number,
290: EXCEPTION
291: when cost_det_validate_error then
292: o_err_num := l_err_num;
293: o_err_code := l_err_code;
294: o_err_msg := 'CSTPACIT.COST_DET_VALIDATE:' || l_err_msg;
295: when OTHERS then
296: o_err_num := SQLCODE;
297: o_err_msg := 'CSTPACIT.COST_DET_VALIDATE: (' || to_char(l_stmt_num) || '): '
298: || substr(SQLERRM,1,150);
293: o_err_code := l_err_code;
294: o_err_msg := 'CSTPACIT.COST_DET_VALIDATE:' || l_err_msg;
295: when OTHERS then
296: o_err_num := SQLCODE;
297: o_err_msg := 'CSTPACIT.COST_DET_VALIDATE: (' || to_char(l_stmt_num) || '): '
298: || substr(SQLERRM,1,150);
299:
300: end cost_det_validate;
301:
354: WHERE TRANSACTION_INTERFACE_ID = i_txn_interface_id;
355:
356: /* l_num_detail = 0 : No corresponding rows in MTL_TXN_COST_DET_INTERFACE
357: * OR i_txn_interface_id is null.
358: * In this case, call cstpacit.cost_det_new_insert.
359: */
360:
361: if (l_num_detail = 0) then
362: cstpacit.cost_det_new_insert(i_txn_id, i_txn_action_id, i_org_id,
358: * In this case, call cstpacit.cost_det_new_insert.
359: */
360:
361: if (l_num_detail = 0) then
362: cstpacit.cost_det_new_insert(i_txn_id, i_txn_action_id, i_org_id,
363: i_item_id, i_cost_group_id, i_txn_cost,
364: i_new_avg_cost, i_per_change, i_val_change,
365: i_mat_accnt, i_mat_ovhd_accnt, i_res_accnt,
366: i_osp_accnt, i_ovhd_accnt,
593: EXCEPTION
594: when cost_det_move_error then
595: o_err_num := l_err_num;
596: o_err_code := l_err_code;
597: o_err_msg := 'CSTPACIT.COST_DET_MOVE:' || l_err_msg;
598: when cost_no_layer_error then
599: o_err_num := l_err_num;
600: o_err_code := l_err_code;
601: o_err_msg := 'CSTPACIT.COST_DET_MOVE: No layer exists' || l_err_msg;
597: o_err_msg := 'CSTPACIT.COST_DET_MOVE:' || l_err_msg;
598: when cost_no_layer_error then
599: o_err_num := l_err_num;
600: o_err_code := l_err_code;
601: o_err_msg := 'CSTPACIT.COST_DET_MOVE: No layer exists' || l_err_msg;
602: when OTHERS then
603: o_err_num := SQLCODE;
604: o_err_msg := 'CSTPACIT.COST_DET_MOVE:' || substr(SQLERRM,1,150);
605:
600: o_err_code := l_err_code;
601: o_err_msg := 'CSTPACIT.COST_DET_MOVE: No layer exists' || l_err_msg;
602: when OTHERS then
603: o_err_num := SQLCODE;
604: o_err_msg := 'CSTPACIT.COST_DET_MOVE:' || substr(SQLERRM,1,150);
605:
606: end cost_det_move;
607:
608:
823: EXCEPTION
824: when cost_det_new_insert_error then
825: o_err_num := l_err_num;
826: o_err_code := l_err_code;
827: o_err_msg := 'CSTPACIT.COST_DET_NEW_INSERT:' || l_err_msg;
828: when OTHERS then
829: o_err_num := SQLCODE;
830: o_err_msg := 'CSTPACIT.COST_DET_NEW_INSERT:' || substr(SQLERRM,1,150);
831:
826: o_err_code := l_err_code;
827: o_err_msg := 'CSTPACIT.COST_DET_NEW_INSERT:' || l_err_msg;
828: when OTHERS then
829: o_err_num := SQLCODE;
830: o_err_msg := 'CSTPACIT.COST_DET_NEW_INSERT:' || substr(SQLERRM,1,150);
831:
832: end cost_det_new_insert;
833:
834: end cstpacit;
830: o_err_msg := 'CSTPACIT.COST_DET_NEW_INSERT:' || substr(SQLERRM,1,150);
831:
832: end cost_det_new_insert;
833:
834: end cstpacit;