DBA Data[Home] [Help]

APPS.CSTPAVCP dependencies on CSTPAVCP

Line 1: PACKAGE BODY CSTPAVCP AS

1: PACKAGE BODY CSTPAVCP AS
2: /* $Header: CSTAVCPB.pls 120.36.12010000.5 2008/12/01 01:48:14 ipineda ship $ */
3:
4: G_PKG_NAME CONSTANT VARCHAR2(30) := 'CSTPAVCP';
5: G_DEBUG CONSTANT VARCHAR2(1) := NVL(FND_PROFILE.VALUE('MRP_DEBUG'),'N');

Line 4: G_PKG_NAME CONSTANT VARCHAR2(30) := 'CSTPAVCP';

1: PACKAGE BODY CSTPAVCP AS
2: /* $Header: CSTAVCPB.pls 120.36.12010000.5 2008/12/01 01:48:14 ipineda ship $ */
3:
4: G_PKG_NAME CONSTANT VARCHAR2(30) := 'CSTPAVCP';
5: G_DEBUG CONSTANT VARCHAR2(1) := NVL(FND_PROFILE.VALUE('MRP_DEBUG'),'N');
6: G_CST_APPLICATION_ID CONSTANT NUMBER := 707;
7: G_INV_APPLICATION_ID CONSTANT NUMBER := 401;
8:

Line 86: fnd_file.put_line(fnd_file.log,'>>In CSTPAVCP.cost_processor Cost Processor');

82: l_txn_action_id := 0;
83: l_stmt_num := 0;
84:
85: if (g_debug = 'Y') then
86: fnd_file.put_line(fnd_file.log,'>>In CSTPAVCP.cost_processor Cost Processor');
87: end if;
88:
89: /* INVCONV sschinch Check if this transaction is a process discrete transfer */
90: SELECT MOD(SUM(DECODE(mp.process_enabled_flag, 'Y', 1, 2)), 2)

Line 116: CSTPAVCP.cost_logical_itr_receipt(i_org_id,

112: -- This is a new transaction type introduced for p-d xfers enh. only.
113: -- 2. Physical Intransit Receipt and
114: -- 3. Direct Xfer receipt.
115: --
116: CSTPAVCP.cost_logical_itr_receipt(i_org_id,
117: i_txn_id,
118: i_layer_id,
119: i_cost_type,
120: i_item_id,

Line 161: CSTPAVCP.interorg(i_org_id,

157: fnd_file.put_line(fnd_file.log,'>>Inter Org Transaction');
158: fnd_file.put_line(fnd_file.log,'>>Calling CSTPACVP.interorg');
159: end if;
160:
161: CSTPAVCP.interorg(i_org_id,
162: i_txn_id,
163: i_layer_id,
164: i_cost_type,
165: i_item_id,

Line 218: -- CSTPAVCP.cost_logical_itr_receipt

214: -- OPM INVCONV sschinch/umoogala
215: -- For process-discrete xfers, we need not cost physical receipt since
216: -- we compute the avg cost using logical txn i.e., using
217: -- InterOrg Intransit Receipt (15) using new procedure
218: -- CSTPAVCP.cost_logical_itr_receipt
219: OR
220: (i_txn_action_id = 21 and i_fob_point = 1 and l_pd_txfr_ind = 1 and i_org_id = i_txn_org_id))
221: -- OPM INVCONV sschinch/umoogala
222: -- For process-discrete xfers, this is a shipment line from discrete-to-process.

Line 247: l_new_cost := CSTPAVCP.compute_actual_cost(

243: else
244: l_layer_id := i_layer_id;
245: end if;
246:
247: l_new_cost := CSTPAVCP.compute_actual_cost(
248: i_org_id,
249: i_txn_id,
250: l_layer_id, /* Bug#4259926 changed i_layer_id to l_layer_id */
251: i_cost_type,

Line 275: CSTPAVCP.common_issue_to_wip(

271: end if;
272:
273: l_stmt_num := 30;
274:
275: CSTPAVCP.common_issue_to_wip(
276: i_org_id,
277: i_txn_id,
278: i_layer_id,
279: i_cost_type,

Line 363: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used. Calling CSTPAVCP.validate_actual_cost_hook');

359: l_err_code,
360: l_err_msg);
361: IF (l_hook = 1) THEN
362: IF g_debug = 'Y' THEN
363: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used. Calling CSTPAVCP.validate_actual_cost_hook');
364: END IF;
365:
366: CSTPAVCP.validate_actual_cost_hook(i_txn_id => i_txn_id,
367: i_org_id => i_org_id,

Line 366: CSTPAVCP.validate_actual_cost_hook(i_txn_id => i_txn_id,

362: IF g_debug = 'Y' THEN
363: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used. Calling CSTPAVCP.validate_actual_cost_hook');
364: END IF;
365:
366: CSTPAVCP.validate_actual_cost_hook(i_txn_id => i_txn_id,
367: i_org_id => i_org_id,
368: i_layer_id => i_layer_id,
369: i_req_id => i_req_id,
370: i_prg_appl_id=> i_prg_appl_id,

Line 524: fnd_file.put_line(fnd_file.log, '>>Calling CSTPAVCP.compute_actual_cost');

520: end if;
521:
522: l_stmt_num := 100;
523: IF g_debug = 'Y' THEN
524: fnd_file.put_line(fnd_file.log, '>>Calling CSTPAVCP.compute_actual_cost');
525: END IF;
526: l_new_cost := CSTPAVCP.compute_actual_cost(
527: i_org_id,
528: i_txn_id,

Line 526: l_new_cost := CSTPAVCP.compute_actual_cost(

522: l_stmt_num := 100;
523: IF g_debug = 'Y' THEN
524: fnd_file.put_line(fnd_file.log, '>>Calling CSTPAVCP.compute_actual_cost');
525: END IF;
526: l_new_cost := CSTPAVCP.compute_actual_cost(
527: i_org_id,
528: i_txn_id,
529: l_layer_id,
530: i_cost_type,

Line 554: fnd_file.put_line(fnd_file.log, '<

550: raise process_error;
551: end if;
552:
553: IF g_debug = 'Y' THEN
554: fnd_file.put_line(fnd_file.log, '< 555: END IF;
556:
557: else
558: -- user populated actual cost.

Line 573: fnd_file.put_line(fnd_file.log, '>>Calling from CSTPAVCP.sub_transfer');

569: (i_txn_action_id = 12 and i_org_id = i_txn_org_id and i_fob_point = 1))
570: then
571: l_stmt_num := 110;
572: IF g_debug = 'Y' THEN
573: fnd_file.put_line(fnd_file.log, '>>Calling from CSTPAVCP.sub_transfer');
574: END IF;
575: CSTPAVCP.sub_transfer(
576: i_org_id,
577: i_txn_id,

Line 575: CSTPAVCP.sub_transfer(

571: l_stmt_num := 110;
572: IF g_debug = 'Y' THEN
573: fnd_file.put_line(fnd_file.log, '>>Calling from CSTPAVCP.sub_transfer');
574: END IF;
575: CSTPAVCP.sub_transfer(
576: i_org_id,
577: i_txn_id,
578: i_layer_id,
579: i_cost_type,

Line 601: fnd_file.put_line(fnd_file.log, '<

597: if (l_err_num <> 0) then
598: raise process_error;
599: end if;
600: IF g_debug = 'Y' THEN
601: fnd_file.put_line(fnd_file.log, '< 602: END IF;
603:
604: -- If this transaction is using a new cost and it is not an
605: -- expense item than we need to recalculate

Line 622: fnd_file.put_line(fnd_file.log, '>>Calling CSTPAVCP.calc_average_cost');

618: end if;
619:
620: l_stmt_num := 130;
621: IF g_debug = 'Y' THEN
622: fnd_file.put_line(fnd_file.log, '>>Calling CSTPAVCP.calc_average_cost');
623: END IF;
624: CSTPAVCP.calc_average_cost(
625: i_org_id,
626: i_txn_id,

Line 624: CSTPAVCP.calc_average_cost(

620: l_stmt_num := 130;
621: IF g_debug = 'Y' THEN
622: fnd_file.put_line(fnd_file.log, '>>Calling CSTPAVCP.calc_average_cost');
623: END IF;
624: CSTPAVCP.calc_average_cost(
625: i_org_id,
626: i_txn_id,
627: l_layer_id,
628: i_cost_type,

Line 646: fnd_file.put_line(fnd_file.log, '<

642: -- Error occured
643: raise process_error;
644: end if;
645: IF g_debug = 'Y' THEN
646: fnd_file.put_line(fnd_file.log, '< 647: END IF;
648: else
649: -- when we process transfer org's txn(i.e. intransit txfr),
650: -- we need to use txfr_layer_id instead.

Line 662: fnd_file.put_line(fnd_file.log, '>>Calling CSTPAVCP.current_average_cost');

658: end if;
659:
660: l_stmt_num := 140;
661: IF g_debug = 'Y' THEN
662: fnd_file.put_line(fnd_file.log, '>>Calling CSTPAVCP.current_average_cost');
663: END IF;
664: CSTPAVCP.current_average_cost(
665: l_org_id,
666: i_txn_id,

Line 664: CSTPAVCP.current_average_cost(

660: l_stmt_num := 140;
661: IF g_debug = 'Y' THEN
662: fnd_file.put_line(fnd_file.log, '>>Calling CSTPAVCP.current_average_cost');
663: END IF;
664: CSTPAVCP.current_average_cost(
665: l_org_id,
666: i_txn_id,
667: l_layer_id,
668: i_cost_type,

Line 688: fnd_file.put_line(fnd_file.log, '<

684: -- Error occured
685: raise process_error;
686: end if;
687: IF g_debug = 'Y' THEN
688: fnd_file.put_line(fnd_file.log, '< 689: END IF;
690: -- For Internal Order Issue transactons to Expense destinations,
691: -- call Cost_LogicalSOReceipt API to cost the Receipt transaction.
692: l_stmt_num := 150;

Line 701: CSTPAVCP.Cost_LogicalSOReceipt (

697: where transaction_id = i_txn_id;
698:
699: l_stmt_num := 160;
700: IF ( I_TXN_ACTION_ID = 1 AND L_TXN_TYPE_ID = 34 AND I_TXN_SRC_TYPE = 8) THEN
701: CSTPAVCP.Cost_LogicalSOReceipt (
702: p_parent_txn_id => i_txn_id,
703: p_user_id => i_user_id,
704: p_request_id => i_req_id,
705: p_prog_id => i_prg_id,

Line 729: o_err_msg := 'CSTPAVCP.Cost_Processor (' || to_char(l_stmt_num) || '): '

725: o_err_msg := l_err_msg;
726: when LOGICAL_SORECEIPT_ERROR then
727: rollback;
728: o_err_num := SQLCODE;
729: o_err_msg := 'CSTPAVCP.Cost_Processor (' || to_char(l_stmt_num) || '): '
730: || 'Error in CSTPAVCP.Cost_LogicalReceipt';
731: when OTHERS then
732: rollback;
733: o_err_num := SQLCODE;

Line 730: || 'Error in CSTPAVCP.Cost_LogicalReceipt';

726: when LOGICAL_SORECEIPT_ERROR then
727: rollback;
728: o_err_num := SQLCODE;
729: o_err_msg := 'CSTPAVCP.Cost_Processor (' || to_char(l_stmt_num) || '): '
730: || 'Error in CSTPAVCP.Cost_LogicalReceipt';
731: when OTHERS then
732: rollback;
733: o_err_num := SQLCODE;
734: o_err_msg := 'CSTPAVCP.Cost_Processor (' || to_char(l_stmt_num) || '): '

Line 734: o_err_msg := 'CSTPAVCP.Cost_Processor (' || to_char(l_stmt_num) || '): '

730: || 'Error in CSTPAVCP.Cost_LogicalReceipt';
731: when OTHERS then
732: rollback;
733: o_err_num := SQLCODE;
734: o_err_msg := 'CSTPAVCP.Cost_Processor (' || to_char(l_stmt_num) || '): '
735: || substr(SQLERRM,1,200);
736:
737: END cost_processor;
738:

Line 1094: CSTPAVCP.update_mmt(

1090: l_stmt_num := 60;
1091: /********************************************************************
1092: ** Update Mtl_Material_Transactions **
1093: ********************************************************************/
1094: CSTPAVCP.update_mmt(
1095: i_org_id,
1096: i_txn_id,
1097: -1, -- txfr_txn_id is not applicable
1098: i_layer_id,

Line 1150: CSTPAVCP.update_item_cost(

1146: l_stmt_num := 80;
1147: /********************************************************************
1148: ** Update Item Cost and Item Cost Details **
1149: ********************************************************************/
1150: CSTPAVCP.update_item_cost(
1151: i_org_id,
1152: i_txn_id,
1153: i_layer_id,
1154: i_cost_type,

Line 1187: o_err_msg := 'CSTPAVCP.average_cost_update (' || to_char(l_stmt_num) ||

1183: o_err_msg := l_err_msg;
1184: when others then
1185: rollback;
1186: o_err_num := SQLCODE;
1187: o_err_msg := 'CSTPAVCP.average_cost_update (' || to_char(l_stmt_num) ||
1188: '): '
1189: || substr(SQLERRM, 1,200);
1190: END average_cost_update;
1191:

Line 1495: l_ret_val := CSTPAVCP.compute_actual_cost(

1491: and (l_txn_type_id <> 68 or (l_txn_type_id = 68 and l_layer_chg = 0))then
1492:
1493: l_stmt_num := 90;
1494:
1495: l_ret_val := CSTPAVCP.compute_actual_cost(
1496: i_org_id,
1497: i_txn_id,
1498: i_layer_id,
1499: NULL,

Line 1532: CSTPAVCP.current_average_cost(

1528: --borrow payback, the following stmt make sure it is not borrow payback txn
1529: and (l_txn_type_id <> 68 or (l_txn_type_id = 68 and l_layer_chg = 0))then
1530: l_stmt_num := 100;
1531:
1532: CSTPAVCP.current_average_cost(
1533: i_org_id,
1534: i_txn_id,
1535: l_to_layer,
1536: i_cost_type,

Line 1562: CSTPAVCP.calc_average_cost(

1558: --borrow payback, the following stmt make sure it is not borrow payback txn
1559: and (l_txn_type_id <> 68 or (l_txn_type_id = 68 and l_layer_chg = 0))then
1560: l_stmt_num := 110;
1561:
1562: CSTPAVCP.calc_average_cost(
1563: i_org_id,
1564: i_txn_id,
1565: l_from_layer,
1566: i_cost_type,

Line 1596: CSTPAVCP.current_average_cost(

1592: if (l_txn_type_id = 43 and i_citw_flag = 1 ) then
1593: NULL;
1594: else
1595:
1596: CSTPAVCP.current_average_cost(
1597: i_org_id,
1598: i_txn_id,
1599: l_from_layer,
1600: i_cost_type,

Line 1634: CSTPAVCP.calc_average_cost(

1630: else
1631: l_from_qty := -1 * l_from_qty;
1632: end if;
1633:
1634: CSTPAVCP.calc_average_cost(
1635: i_org_id,
1636: i_txn_id,
1637: l_to_layer,
1638: i_cost_type,

Line 1662: CSTPAVCP.current_average_cost(

1658: and (l_txn_type_id <> 68 or (l_txn_type_id = 68 and l_layer_chg = 0))then
1659: --then
1660: l_stmt_num := 140;
1661:
1662: CSTPAVCP.current_average_cost(
1663: i_org_id,
1664: i_txn_id,
1665: l_to_layer,
1666: i_cost_type,

Line 1754: CSTPAVCP.current_average_cost(

1750: where layer_id = l_from_layer;
1751:
1752: -- bug 925262, need to update the layer quantity of the payback side
1753:
1754: CSTPAVCP.current_average_cost(
1755: i_org_id,
1756: i_txn_id,
1757: l_from_layer,
1758: i_cost_type,

Line 1801: CSTPAVCP.calc_average_cost(

1797: -- reaverage the from sub and then figure out the variance
1798:
1799: -- update new cost and then find variance
1800: -- base on new cost
1801: CSTPAVCP.calc_average_cost(
1802: i_org_id,
1803: i_txn_id,
1804: l_from_layer,
1805: i_cost_type,

Line 1841: CSTPAVCP.calc_average_cost(

1837: raise process_error;
1838: end if;
1839:
1840:
1841: CSTPAVCP.calc_average_cost(
1842: i_org_id,
1843: i_txn_id,
1844: l_to_layer,
1845: i_cost_type,

Line 1959: o_err_msg := 'CSTPAVCP.sub_transfer (' || to_char(l_stmt_num) ||

1955: o_err_msg := l_err_msg;
1956: when others then
1957: rollback;
1958: o_err_num := SQLCODE;
1959: o_err_msg := 'CSTPAVCP.sub_transfer (' || to_char(l_stmt_num) ||
1960: '): '
1961: || substr(SQLERRM, 1,200);
1962: END sub_transfer;
1963:

Line 2064: CSTPAVCP.sub_transfer(

2060:
2061: /* Added Bug#4259926 */
2062: if ( l_txn_action_id = 27 and I_CITW_FLAG = 1 and l_src_type = 5 ) then
2063:
2064: CSTPAVCP.sub_transfer(
2065: i_org_id,
2066: i_txn_id,
2067: i_txfr_layer_id,
2068: i_cost_type,

Line 2143: CSTPAVCP.sub_transfer(

2139: and layer_id = i_txfr_layer_id
2140: and transaction_action_id = i_txn_action_id;
2141: else
2142:
2143: CSTPAVCP.sub_transfer(
2144: i_org_id,
2145: i_txn_id,
2146: i_layer_id,
2147: i_cost_type,

Line 2271: CSTPAVCP.current_average_cost(i_org_id,

2267: if ( l_txn_action_id = 27 and i_citw_flag = 1 and l_src_type = 5) then
2268: NULL;
2269: else
2270:
2271: CSTPAVCP.current_average_cost(i_org_id,
2272: i_txn_id,
2273: i_txfr_layer_id,
2274: i_cost_type,
2275: i_item_id,

Line 2332: o_err_msg := 'CSTPAVCP.common_issue_to_wip (' || to_char(l_stmt_num) ||

2328: o_err_msg := l_err_msg;
2329: when others then
2330: rollback;
2331: o_err_num := SQLCODE;
2332: o_err_msg := 'CSTPAVCP.common_issue_to_wip (' || to_char(l_stmt_num) ||
2333: '): '
2334: || substr(SQLERRM, 1,200);
2335: END common_issue_to_wip;
2336:

Line 2715: o_err_msg := 'CSTPAVCP.compute_actual_cost (' || to_char(l_stmt_num) ||

2711: return l_ret_val;
2712: when OTHERS then
2713: rollback;
2714: o_err_num := SQLCODE;
2715: o_err_msg := 'CSTPAVCP.compute_actual_cost (' || to_char(l_stmt_num) ||
2716: '): '
2717: || substr(SQLERRM,1,200);
2718: return l_ret_val;
2719: END compute_actual_cost;

Line 3282: o_err_msg := 'CSTPAVCP.apply_material_ovhd (' || to_char(l_stmt_num) ||

3278: o_err_msg := FND_MESSAGE.Get;
3279: when others then
3280: rollback;
3281: o_err_num := SQLCODE;
3282: o_err_msg := 'CSTPAVCP.apply_material_ovhd (' || to_char(l_stmt_num) ||
3283: '): '
3284: || substr(SQLERRM, 1,200);
3285:
3286: END apply_material_ovhd;

Line 3552: fnd_file.put_line(fnd_file.log, '>>>Calling CSTPAVCP.update_mmt');

3548: l_txfr_txn_id := -1;
3549: end if;
3550:
3551: IF g_debug = 'Y' THEN
3552: fnd_file.put_line(fnd_file.log, '>>>Calling CSTPAVCP.update_mmt');
3553: END IF;
3554: CSTPAVCP.update_mmt(
3555: i_org_id,
3556: i_txn_id,

Line 3554: CSTPAVCP.update_mmt(

3550:
3551: IF g_debug = 'Y' THEN
3552: fnd_file.put_line(fnd_file.log, '>>>Calling CSTPAVCP.update_mmt');
3553: END IF;
3554: CSTPAVCP.update_mmt(
3555: i_org_id,
3556: i_txn_id,
3557: l_txfr_txn_id,
3558: i_layer_id,

Line 3572: fnd_file.put_line(fnd_file.log, '<<

3568: if (l_err_num <> 0) then
3569: raise process_error;
3570: end if;
3571: IF g_debug = 'Y' THEN
3572: fnd_file.put_line(fnd_file.log, '<< 3573: END IF;
3574: end if;
3575:
3576: /********************************************************************

Line 3653: fnd_file.put_line(fnd_file.log, '>>>Calling CSTPAVCP.update_item_cost');

3649: /********************************************************************
3650: ** Update Item Cost and Item Cost Details **
3651: ********************************************************************/
3652: IF g_debug = 'Y' THEN
3653: fnd_file.put_line(fnd_file.log, '>>>Calling CSTPAVCP.update_item_cost');
3654: END IF;
3655: CSTPAVCP.update_item_cost(
3656: i_org_id,
3657: i_txn_id,

Line 3655: CSTPAVCP.update_item_cost(

3651: ********************************************************************/
3652: IF g_debug = 'Y' THEN
3653: fnd_file.put_line(fnd_file.log, '>>>Calling CSTPAVCP.update_item_cost');
3654: END IF;
3655: CSTPAVCP.update_item_cost(
3656: i_org_id,
3657: i_txn_id,
3658: i_layer_id,
3659: i_cost_type,

Line 3675: fnd_file.put_line(fnd_file.log, '<<

3671: raise process_error;
3672: end if;
3673:
3674: IF g_debug = 'Y' THEN
3675: fnd_file.put_line(fnd_file.log, '<< 3676: END IF;
3677: EXCEPTION
3678: when process_error then
3679: o_err_num := l_err_num;

Line 3685: o_err_msg := 'CSTPAVCP.calc_average_cost (' || to_char(l_stmt_num) ||

3681: o_err_msg := l_err_msg;
3682: when others then
3683: rollback;
3684: o_err_num := SQLCODE;
3685: o_err_msg := 'CSTPAVCP.calc_average_cost (' || to_char(l_stmt_num) ||
3686: '): '
3687: || substr(SQLERRM, 1,200);
3688:
3689: END calc_average_cost;

Line 3736: CSTPAVCP.update_mmt(

3732: ** Update Mtl_Material_Transactions to set actual cost, prior **
3733: ** cost, new cost and prior costed quantity. **
3734: ********************************************************************/
3735: if (i_no_update_mmt = 0) then
3736: CSTPAVCP.update_mmt(
3737: i_org_id,
3738: i_txn_id,
3739: -1, -- txfr_txn_id is not applicable
3740: i_layer_id,

Line 3785: CSTPAVCP.update_item_cost(

3781: end if;
3782:
3783: -- If qty is going to be positive, need to reflect item cost in
3784: -- cst_item_cost table.
3785: CSTPAVCP.update_item_cost(
3786: i_org_id,
3787: i_txn_id,
3788: i_layer_id,
3789: i_cost_type,

Line 3817: o_err_msg := 'CSTPAVCP.current_average_cost (' || to_char(l_stmt_num) ||

3813: o_err_msg := l_err_msg;
3814: when others then
3815: rollback;
3816: o_err_num := SQLCODE;
3817: o_err_msg := 'CSTPAVCP.current_average_cost (' || to_char(l_stmt_num) ||
3818: '): '
3819: || substr(SQLERRM, 1,200);
3820:
3821: END current_average_cost;

Line 4111: o_err_msg := 'CSTPAVCP.update_mmt (' || to_char(l_stmt_num) ||

4107: EXCEPTION
4108: when OTHERS then
4109: rollback;
4110: o_err_num := SQLCODE;
4111: o_err_msg := 'CSTPAVCP.update_mmt (' || to_char(l_stmt_num) ||
4112: '): '
4113: || substr(SQLERRM,1,200);
4114:
4115: END update_mmt;

Line 4342: o_err_msg := 'CSTPAVCP.update_item_cost (' || to_char(l_stmt_num) ||

4338: EXCEPTION
4339: when others then
4340: rollback;
4341: o_err_num := SQLCODE;
4342: o_err_msg := 'CSTPAVCP.update_item_cost (' || to_char(l_stmt_num) ||
4343: '): '
4344: || substr(SQLERRM, 1,200);
4345:
4346: END update_item_cost;

Line 4467: fnd_file.put_line(fnd_file.log, '>>>Inside CSTPAVCP.interorg Interorg');

4463: o_hook_used := 0;
4464: l_ave_to_ave := 0;
4465:
4466: IF g_debug = 'Y' THEN
4467: fnd_file.put_line(fnd_file.log, '>>>Inside CSTPAVCP.interorg Interorg');
4468: END IF;
4469: l_earn_moh := 1;
4470: l_return_status := fnd_api.g_ret_sts_success;
4471: l_msg_count := 0;

Line 5065: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used. Calling CSTPAVCP.validate_actual_cost_hook');

5061: o_err_msg => l_err_msg);
5062:
5063: IF (l_cost_hook_io=1) THEN
5064: IF g_debug = 'Y' THEN
5065: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used. Calling CSTPAVCP.validate_actual_cost_hook');
5066: END IF;
5067:
5068: CSTPAVCP.validate_actual_cost_hook(i_txn_id => i_txn_id,
5069: i_org_id => i_org_id,

Line 5068: CSTPAVCP.validate_actual_cost_hook(i_txn_id => i_txn_id,

5064: IF g_debug = 'Y' THEN
5065: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used. Calling CSTPAVCP.validate_actual_cost_hook');
5066: END IF;
5067:
5068: CSTPAVCP.validate_actual_cost_hook(i_txn_id => i_txn_id,
5069: i_org_id => i_org_id,
5070: i_layer_id => i_layer_id,
5071: i_req_id => i_req_id,
5072: i_prg_appl_id=> i_prg_appl_id,

Line 5083: fnd_file.put_line(fnd_file.log, '<<<

5079: raise process_error;
5080: END IF;
5081:
5082: IF g_debug = 'Y' THEN
5083: fnd_file.put_line(fnd_file.log, '<<< 5084: END IF;
5085:
5086: select sum(actual_cost), layer_id
5087: into l_snd_txn_cost, l_from_layer_id

Line 5620: o_err_msg := 'CSTPAVCP.interorg (' || to_char(l_stmt_num) ||

5616: o_err_msg := FND_MESSAGE.Get;
5617: when others then
5618: rollback;
5619: o_err_num := SQLCODE;
5620: o_err_msg := 'CSTPAVCP.interorg (' || to_char(l_stmt_num) ||
5621: '): '
5622: || substr(SQLERRM, 1,200);
5623:
5624: END interorg;

Line 5760: o_err_msg := 'CSTPAVCP.get_snd_rcv_rate (' || to_char(l_stmt_num) ||

5756:
5757: when others then
5758: rollback;
5759: o_err_num := SQLCODE;
5760: o_err_msg := 'CSTPAVCP.get_snd_rcv_rate (' || to_char(l_stmt_num) ||
5761: '): '
5762: || substr(SQLERRM, 1,200);
5763:
5764: END get_snd_rcv_rate;

Line 5814: o_err_msg := 'CSTPAVCP.get_snd_rcv_uom (' || to_char(l_stmt_num) ||

5810: EXCEPTION
5811: when others then
5812: rollback;
5813: o_err_num := SQLCODE;
5814: o_err_msg := 'CSTPAVCP.get_snd_rcv_uom (' || to_char(l_stmt_num) ||
5815: '): '
5816: || substr(SQLERRM, 1,200);
5817:
5818: END get_snd_rcv_uom;

Line 6062: o_err_msg := 'CSTPAVCP.borrow_cost (' || to_char(l_stmt_num) ||

6058: EXCEPTION
6059: when others then
6060: rollback;
6061: o_err_num := SQLCODE;
6062: o_err_msg := 'CSTPAVCP.borrow_cost (' || to_char(l_stmt_num) ||
6063: '): '
6064: || substr(SQLERRM, 1,200);
6065:
6066:

Line 6143: o_err_msg := 'CSTPAVCP.store_bp_variance (' || to_char(l_stmt_num) ||

6139: EXCEPTION
6140: when others then
6141: rollback;
6142: o_err_num := SQLCODE;
6143: o_err_msg := 'CSTPAVCP.store_bp_variance (' || to_char(l_stmt_num) ||
6144: '): '
6145: || substr(SQLERRM, 1,200);
6146:
6147: END store_bp_variance;

Line 6502: o_err_msg := 'CSTPAVCP.interorg_elemental_detail (' || to_char(l_stmt_num)

6498: o_err_msg := l_err_msg;
6499: when others then
6500: rollback;
6501: o_err_num := SQLCODE;
6502: o_err_msg := 'CSTPAVCP.interorg_elemental_detail (' || to_char(l_stmt_num)
6503: || '): ' || substr(SQLERRM, 1,200);
6504:
6505:
6506: END interorg_elemental_detail;

Line 7006: x_err_msg := 'CSTPAVCP.COST_ACCT_EVENTS:' || '(' || l_stmt_num || '):' ||

7002: EXCEPTION
7003: when fnd_api.g_exc_error then
7004: x_err_num := -1;
7005: x_err_code := l_err_code;
7006: x_err_msg := 'CSTPAVCP.COST_ACCT_EVENTS:' || '(' || l_stmt_num || '):' ||
7007: l_err_msg || ':' || substr(SQLERRM,1,200);
7008:
7009: /* Modified update statement for performance reasons. See bug#3585779*/
7010: if (p_parent_id is null) then

Line 7041: x_err_msg := 'CSTPAVCP.COST_ACCT_EVENTS:' || '(' || l_stmt_num || '):' ||

7037:
7038: when others then
7039: x_err_num := -1;
7040: x_err_code := l_err_code;
7041: x_err_msg := 'CSTPAVCP.COST_ACCT_EVENTS:' || '(' || l_stmt_num || '):' ||
7042: substr(SQLERRM,1,200);
7043:
7044: /* Modified update statement for performance reasons. See bug#3585779*/
7045: if (p_parent_id is null) then

Line 7464: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used. Calling CSTPAVCP.validate_actual_cost_hook');

7460: l_err_code,
7461: l_err_msg);
7462: IF (l_cost_hook = 1) THEN
7463: IF g_debug = 'Y' THEN
7464: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used. Calling CSTPAVCP.validate_actual_cost_hook');
7465: END IF;
7466:
7467: CSTPAVCP.validate_actual_cost_hook(i_txn_id => p_txn_id,
7468: i_org_id => p_org_id,

Line 7467: CSTPAVCP.validate_actual_cost_hook(i_txn_id => p_txn_id,

7463: IF g_debug = 'Y' THEN
7464: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used. Calling CSTPAVCP.validate_actual_cost_hook');
7465: END IF;
7466:
7467: CSTPAVCP.validate_actual_cost_hook(i_txn_id => p_txn_id,
7468: i_org_id => p_org_id,
7469: i_layer_id => l_layer_id,
7470: i_req_id => p_request_id,
7471: i_prg_appl_id=> p_prog_app_id,

Line 7691: x_err_msg := 'CSTPAVCP.COMPUTE_MCACD_COSTS:' || '(' || l_stmt_num || '):' ||

7687:
7688: when fnd_api.g_exc_error then
7689: x_err_num := -1;
7690: x_err_code := l_err_code;
7691: x_err_msg := 'CSTPAVCP.COMPUTE_MCACD_COSTS:' || '(' || l_stmt_num || '):' ||
7692: l_err_msg;
7693:
7694:
7695: when others then

Line 7698: x_err_msg := 'CSTPAVCP.COMPUTE_MCACD_COSTS:' || '(' || l_stmt_num || '):' ||

7694:
7695: when others then
7696: x_err_num := -1;
7697: x_err_code := l_err_code;
7698: x_err_msg := 'CSTPAVCP.COMPUTE_MCACD_COSTS:' || '(' || l_stmt_num || '):' ||
7699: l_err_msg;
7700:
7701: END Compute_MCACD_Costs;
7702:

Line 7858: o_err_msg := 'CSTPAVCP.payback_variance (' || to_char(l_stmt_num) ||

7854: EXCEPTION
7855: when others then
7856: rollback;
7857: o_err_num := SQLCODE;
7858: o_err_msg := 'CSTPAVCP.payback_variance (' || to_char(l_stmt_num) ||
7859: '): '
7860: || substr(SQLERRM, 1,200);
7861:
7862:

Line 7981: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt <<<');

7977: l_msg_data VARCHAR2(8000);
7978:
7979: BEGIN
7980: IF g_debug = 'Y' THEN
7981: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt <<<');
7982: END IF;
7983:
7984: -- Initialize Error Variables
7985: x_err_num := 0;

Line 8039: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');

8035: THEN
8036: IF g_debug = 'Y' THEN
8037: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receiving Org is Process Org. So, no accounting ' ||
8038: ' for receiving transaction.');
8039: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8040: END IF;
8041: RETURN;
8042: ELSIF l_pd_xfer_ind = 'Y'
8043: THEN

Line 8059: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');

8055: IF l_logical_txn_id IS NULL THEN
8056: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Logical Receipt Transaction not seeded');
8057: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Pre-upgrade transaction');
8058: IF g_debug = 'Y' THEN
8059: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8060: END IF;
8061: RETURN;
8062: END IF;
8063:

Line 8108: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');

8104: PROGRAM_ID = p_prog_id
8105: WHERE
8106: TRANSACTION_ID = l_logical_txn_id;
8107: IF g_debug = 'Y' THEN
8108: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8109: END IF;
8110: RETURN;
8111:
8112: END IF;

Line 8681: x_err_msg := 'CSTPAVCP.Cost_LogicalSOReceipt:('||l_stmt_num||'): '||x_err_code || '. Error Msg: ' || l_msg_data;

8677:
8678: IF l_return_status <> 'S' THEN
8679: x_err_num := -1;
8680: x_err_code := 'Error raising SLA Event for transaction: '||to_char(l_trx_info.TRANSACTION_ID);
8681: x_err_msg := 'CSTPAVCP.Cost_LogicalSOReceipt:('||l_stmt_num||'): '||x_err_code || '. Error Msg: ' || l_msg_data;
8682:
8683: IF g_debug = 'Y' THEN
8684: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8685: END IF;

Line 8684: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');

8680: x_err_code := 'Error raising SLA Event for transaction: '||to_char(l_trx_info.TRANSACTION_ID);
8681: x_err_msg := 'CSTPAVCP.Cost_LogicalSOReceipt:('||l_stmt_num||'): '||x_err_code || '. Error Msg: ' || l_msg_data;
8682:
8683: IF g_debug = 'Y' THEN
8684: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8685: END IF;
8686:
8687: RAISE FND_API.g_exc_unexpected_error;
8688: END IF;

Line 8692: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');

8688: END IF;
8689: /* End bug 5349860 */
8690:
8691: IF g_debug = 'Y' THEN
8692: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8693: END IF;
8694:
8695:
8696: EXCEPTION

Line 8703: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt( '||to_char(l_stmt_num)||' ): '||'Error Inserting into MCACD: '||SQLERRM;

8699: x_err_code := 'Currency Conversion Rate not defined';
8700: x_err_msg := x_err_code;
8701: WHEN INSERT_MCACD_ERROR THEN
8702: x_err_num := -1;
8703: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt( '||to_char(l_stmt_num)||' ): '||'Error Inserting into MCACD: '||SQLERRM;
8704: x_err_msg := x_err_code;
8705: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);
8706: WHEN INSERT_ACCT_ERROR THEN
8707: x_err_num := -1;

Line 8708: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt( '||to_char(l_stmt_num)||' ): '||'Error in Insert_Account: ';

8704: x_err_msg := x_err_code;
8705: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);
8706: WHEN INSERT_ACCT_ERROR THEN
8707: x_err_num := -1;
8708: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt( '||to_char(l_stmt_num)||' ): '||'Error in Insert_Account: ';
8709: x_err_msg := x_err_code;
8710: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);
8711:
8712: WHEN COST_HOOK_ACCOUNT_ERROR THEN

Line 8714: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt' || l_err_code || 'Error in cost hook get_account_id' ;

8710: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);
8711:
8712: WHEN COST_HOOK_ACCOUNT_ERROR THEN
8713: x_err_num := l_err_num;
8714: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt' || l_err_code || 'Error in cost hook get_account_id' ;
8715: x_err_msg := l_err_msg;
8716: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);
8717: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_msg);
8718:

Line 8734: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt( '||to_char(l_stmt_num)||' ): ';

8730: commit;
8731:
8732: WHEN OTHERS THEN
8733: x_err_num := -1;
8734: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt( '||to_char(l_stmt_num)||' ): ';
8735: x_err_msg := x_err_code;
8736: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);
8737:
8738: END Cost_LogicalSOReceipt;

Line 9157: o_err_msg := 'CSTPAVCP.Logical_itr_receipt(' || to_char(l_stmt_num) ||

9153: EXCEPTION
9154: when others then
9155: rollback;
9156: o_err_num := SQLCODE;
9157: o_err_msg := 'CSTPAVCP.Logical_itr_receipt(' || to_char(l_stmt_num) ||
9158: '): ' || substr(SQLERRM, 1,200);
9159:
9160: END Cost_Logical_itr_receipt;
9161:

Line 9355: x_return_message := 'Error in CSTPAVCP.CompEncumbrance_IntOrdersExp('||l_stmt_num||')';

9351: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
9352: x_return_status := fnd_api.g_ret_sts_unexp_error;
9353: WHEN process_error THEN
9354: x_return_status := fnd_api.g_ret_sts_unexp_error;
9355: x_return_message := 'Error in CSTPAVCP.CompEncumbrance_IntOrdersExp('||l_stmt_num||')';
9356: WHEN OTHERS THEN
9357: x_return_status := fnd_api.g_ret_sts_unexp_error;
9358: x_return_message := 'Error in CST_UTIL_PUB.CompEncumbrance_IntOrdersExp('||l_stmt_num||')';
9359:

Line 9651: o_err_msg:='CSTPAVCP.validate_actual_cost_hook('||to_char(l_stmt_num)||'):'||substr(SQLERRM,1,200);

9647: WHERE transaction_id = i_txn_id;
9648: WHEN others THEN
9649: rollback;
9650: o_err_num:=SQLCODE;
9651: o_err_msg:='CSTPAVCP.validate_actual_cost_hook('||to_char(l_stmt_num)||'):'||substr(SQLERRM,1,200);
9652: UPDATE mtl_material_transactions
9653: SET costed_flag = 'E',
9654: error_code = substrb(o_err_code,1,240),
9655: error_explanation = substrb(o_err_msg,1,240),

Line 9663: END CSTPAVCP;

9659: program_update_date = sysdate
9660: WHERE transaction_id = i_txn_id;
9661: END validate_actual_cost_hook;
9662:
9663: END CSTPAVCP;