DBA Data[Home] [Help]

APPS.CSTPPINV dependencies on CSTPPINV

Line 1: PACKAGE BODY CSTPPINV AS

1: PACKAGE BODY CSTPPINV AS
2: /* $Header: CSTPINVB.pls 120.35.12020000.3 2013/05/22 06:35:27 yunfchen ship $ */
3:
4: l_debug CONSTANT VARCHAR2(1) := FND_PROFILE.VALUE('MRP_DEBUG');
5:

Line 65: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.cost_inv_txn';

61: l_so_line_id NUMBER := NULL;
62: l_return_status VARCHAR2(1) := FND_API.G_RET_STS_SUCCESS;
63: l_msg_count NUMBER;
64: l_msg_data VARCHAR2(2000);
65: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.cost_inv_txn';
66:
67: begin
68: l_err_num := 0;
69: l_err_code := '';

Line 627: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_err_msg;

623: EXCEPTION
624: when PROCESS_ERROR then
625: o_err_num := l_err_num;
626: o_err_code := l_err_code;
627: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_err_msg;
628: when OTHERS then
629: o_err_num := SQLCODE;
630: o_err_msg := 'CSTPPINV.COST_INV_TXN: (' || to_char(l_stmt_num) || '): '
631: || substr(SQLERRM,1,150);

Line 630: o_err_msg := 'CSTPPINV.COST_INV_TXN: (' || to_char(l_stmt_num) || '): '

626: o_err_code := l_err_code;
627: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_err_msg;
628: when OTHERS then
629: o_err_num := SQLCODE;
630: o_err_msg := 'CSTPPINV.COST_INV_TXN: (' || to_char(l_stmt_num) || '): '
631: || substr(SQLERRM,1,150);
632:
633: end cost_inv_txn;
634:

Line 730: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_interorg_cost';

726:
727: l_pe_flag VARCHAR2(1); -- INVCONV
728: l_pd_txfr_ind NUMBER := 0; -- INVCONV
729:
730: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_interorg_cost';
731:
732: BEGIN
733:
734: IF l_debug = 'Y' THEN

Line 885: l_err_msg := 'CSTPPINV.get_interorg_cost : ' || to_char(l_stmt_num) ||' : '|| ' Transfer Price not available';

881: WHERE transaction_id = l_shipment_txn_id;
882:
883: IF (l_txfr_price is NULL) THEN
884: fnd_file.put_line(fnd_file.log,'Transfer Price not available');
885: l_err_msg := 'CSTPPINV.get_interorg_cost : ' || to_char(l_stmt_num) ||' : '|| ' Transfer Price not available';
886: l_err_num := 9999;
887: raise process_error;
888: END IF;
889:

Line 899: CSTPPINV.insert_elemental_cost(

895: l_stmt_num := 30;
896:
897: /* Insert transfer price into MPTCD with cost element 1 */
898:
899: CSTPPINV.insert_elemental_cost(
900: i_pac_period_id => i_pac_period_id,
901: i_cost_type_id => i_cost_type_id,
902: i_cost_group_id => i_cost_group_id,
903: i_txn_id => i_txn_id,

Line 1023: CSTPPINV.get_pacp_cost(

1019:
1020: /* Use PACP cost if available */
1021: l_stmt_num := 50;
1022:
1023: CSTPPINV.get_pacp_cost(
1024: i_cost_source_cost_group => l_cost_source_cost_group,
1025: i_pac_period_id => i_pac_period_id,
1026: i_cost_type_id => i_cost_type_id,
1027: i_cost_group_id => i_cost_group_id,

Line 1051: CSTPPINV.get_perp_ship_cost(

1047:
1048: /* There is no PACP cost, so no costs were inserted into MPTCD.
1049: Insert perpetual shipment cost instead. */
1050:
1051: CSTPPINV.get_perp_ship_cost(
1052: i_pac_period_id => i_pac_period_id,
1053: i_cost_type_id => i_cost_type_id,
1054: i_cost_group_id => i_cost_group_id,
1055: i_txn_id => i_txn_id,

Line 1088: CSTPPINV.get_prev_period_cost(

1084: END IF;
1085:
1086: /* PACP is not enabled. Use prior period sending CG PWAC Cost */
1087:
1088: CSTPPINV.get_prev_period_cost(
1089: i_legal_entity => i_legal_entity,
1090: i_cost_source_cost_group => l_cost_source_cost_group,
1091: i_pac_period_id => i_pac_period_id,
1092: i_cost_type_id => i_cost_type_id,

Line 1118: CSTPPINV.get_perp_ship_cost(

1114:
1115: /* There is no prior period cost, so no costs were inserted into MPTCD.
1116: Insert perpetual shipment cost instead. */
1117:
1118: CSTPPINV.get_perp_ship_cost(
1119: i_pac_period_id => i_pac_period_id,
1120: i_cost_type_id => i_cost_type_id,
1121: i_cost_group_id => i_cost_group_id,
1122: i_txn_id => i_txn_id,

Line 1157: CSTPPINV.get_perp_ship_cost(

1153:
1154: /* Sending and Receiving Orgs not in the same LE/CT
1155: Use MTA Cost */
1156:
1157: CSTPPINV.get_perp_ship_cost(
1158: i_pac_period_id => i_pac_period_id,
1159: i_cost_type_id => i_cost_type_id,
1160: i_cost_group_id => i_cost_group_id,
1161: i_txn_id => i_txn_id,

Line 1193: CSTPPINV.get_txfr_trp_cost(

1189: IF (l_include_txfr_txp_costs = 1) THEN
1190: /* Add transfer credit and transportation charges on top of the sending CG cost. */
1191: l_stmt_num := 130;
1192:
1193: CSTPPINV.get_txfr_trp_cost(
1194: i_source_txn_id => l_shipment_txn_id,
1195: i_source_cost => (l_sending_cg_cost),
1196: x_txfr_credit => l_txfr_credit,
1197: x_trp_cost => l_trp_cost,

Line 1211: CSTPPINV.add_elemental_cost(

1207: l_ovhd_cost := (l_trp_cost + l_txfr_credit) * l_conv_rate;
1208: fnd_file.put_line(fnd_file.log, l_api_name || ': ' || l_stmt_num || ': l_ovhd_cost = ' || l_ovhd_cost);
1209:
1210: IF (l_ovhd_cost > 0) THEN
1211: CSTPPINV.add_elemental_cost(
1212: i_pac_period_id => i_pac_period_id,
1213: i_cost_type_id => i_cost_type_id,
1214: i_cost_group_id => i_cost_group_id,
1215: i_txn_id => i_txn_id,

Line 1369: o_err_msg := 'CSTPPINV.get_interorg_cost (' || to_char(l_stmt_num) ||

1365: o_err_msg := l_err_msg;
1366:
1367: when OTHERS then
1368: o_err_num := SQLCODE;
1369: o_err_msg := 'CSTPPINV.get_interorg_cost (' || to_char(l_stmt_num) ||
1370: '): ' || substr(SQLERRM,1,200);
1371: fnd_file.put_line(fnd_file.log, o_err_msg);
1372:
1373: END get_interorg_cost;

Line 1411: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_txfr_trp_cost';

1407:
1408: l_txfr_credit NUMBER;
1409: l_shipment_txn_qty NUMBER;
1410:
1411: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_txfr_trp_cost';
1412:
1413: BEGIN
1414:
1415: IF l_debug = 'Y' THEN

Line 1478: o_err_msg := 'CSTPPINV.get_txfr_trp_cost (' || to_char(l_stmt_num) ||

1474: EXCEPTION
1475:
1476: when OTHERS then
1477: o_err_num := SQLCODE;
1478: o_err_msg := 'CSTPPINV.get_txfr_trp_cost (' || to_char(l_stmt_num) ||
1479: '): ' || substr(SQLERRM,1,200);
1480: fnd_file.put_line(fnd_file.log, o_err_msg);
1481:
1482: END get_txfr_trp_cost;

Line 1522: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.add_elemental_cost';

1518: l_err_msg VARCHAR2(240);
1519:
1520: process_error EXCEPTION;
1521: l_elem_cnt NUMBER;
1522: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.add_elemental_cost';
1523:
1524: BEGIN
1525:
1526: IF l_debug = 'Y' THEN

Line 1565: CSTPPINV.insert_elemental_cost(

1561: ELSE
1562:
1563: l_stmt_num := 30;
1564:
1565: CSTPPINV.insert_elemental_cost(
1566: i_pac_period_id => i_pac_period_id,
1567: i_cost_type_id => i_cost_type_id,
1568: i_cost_group_id => i_cost_group_id,
1569: i_txn_id => i_txn_id,

Line 1605: o_err_msg := 'CSTPPINV.add_elemental_cost (' || to_char(l_stmt_num) ||

1601: o_err_msg := l_err_msg;
1602:
1603: when OTHERS then
1604: o_err_num := SQLCODE;
1605: o_err_msg := 'CSTPPINV.add_elemental_cost (' || to_char(l_stmt_num) ||
1606: '): ' || substr(SQLERRM,1,200);
1607: fnd_file.put_line(fnd_file.log, o_err_msg);
1608: END add_elemental_cost;
1609:

Line 1645: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.insert_elemental_cost';

1641: l_err_code VARCHAR2(240);
1642: l_err_msg VARCHAR2(240);
1643:
1644: l_elem_cnt NUMBER;
1645: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.insert_elemental_cost';
1646:
1647: BEGIN
1648:
1649: IF l_debug = 'Y' THEN

Line 1709: o_err_msg := 'CSTPPINV.insert_elemental_cost (' || to_char(l_stmt_num) ||

1705:
1706: EXCEPTION
1707: when OTHERS then
1708: o_err_num := SQLCODE;
1709: o_err_msg := 'CSTPPINV.insert_elemental_cost (' || to_char(l_stmt_num) ||
1710: '): ' || substr(SQLERRM,1,200);
1711: fnd_file.put_line(fnd_file.log, o_err_msg);
1712: END insert_elemental_cost;
1713:

Line 1750: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_pacp_cost';

1746: l_err_code VARCHAR2(240);
1747: l_err_msg VARCHAR2(240);
1748:
1749: l_pacp_pwac_cost NUMBER;
1750: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_pacp_cost';
1751:
1752: BEGIN
1753:
1754: IF l_debug = 'Y' THEN

Line 1847: o_err_msg := 'CSTPPINV.get_pacp_cost (' || to_char(l_stmt_num) ||

1843: EXCEPTION
1844:
1845: when OTHERS then
1846: o_err_num := SQLCODE;
1847: o_err_msg := 'CSTPPINV.get_pacp_cost (' || to_char(l_stmt_num) ||
1848: '): ' || substr(SQLERRM,1,200);
1849: fnd_file.put_line(fnd_file.log, o_err_msg);
1850:
1851: END get_pacp_cost;

Line 1893: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_prev_period_cost';

1889: l_prev_period_pwac_cost NUMBER;
1890: l_prev_period_pwac_cnt NUMBER := 0;
1891:
1892:
1893: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_prev_period_cost';
1894:
1895:
1896: BEGIN
1897:

Line 2015: o_err_msg := 'CSTPPINV.get_prev_period_cost (' || to_char(l_stmt_num) ||

2011: EXCEPTION
2012:
2013: when OTHERS then
2014: o_err_num := SQLCODE;
2015: o_err_msg := 'CSTPPINV.get_prev_period_cost (' || to_char(l_stmt_num) ||
2016: '): ' || substr(SQLERRM,1,200);
2017: fnd_file.put_line(fnd_file.log, o_err_msg);
2018:
2019: END get_prev_period_cost;

Line 2058: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_perp_ship_cost';

2054:
2055: l_perp_ship_cost NUMBER;
2056: l_mta_txn_qty NUMBER;
2057:
2058: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_perp_ship_cost';
2059:
2060: BEGIN
2061:
2062: IF l_debug = 'Y' THEN

Line 2151: CSTPPINV.insert_elemental_cost(

2147: and mta.base_transaction_value < 0;
2148:
2149: ELSE
2150: /* Insert 0 Material Cost into MPTCD only. */
2151: CSTPPINV.insert_elemental_cost(
2152: i_pac_period_id => i_pac_period_id,
2153: i_cost_type_id => i_cost_type_id,
2154: i_cost_group_id => i_cost_group_id,
2155: i_txn_id => i_txn_id,

Line 2182: o_err_msg := 'CSTPPINV.get_perp_ship_cost (' || to_char(l_stmt_num) ||

2178: EXCEPTION
2179:
2180: when OTHERS then
2181: o_err_num := SQLCODE;
2182: o_err_msg := 'CSTPPINV.get_perp_ship_cost (' || to_char(l_stmt_num) ||
2183: '): ' || substr(SQLERRM,1,200);
2184: fnd_file.put_line(fnd_file.log, o_err_msg);
2185:
2186: END get_perp_ship_cost;

Line 2286: o_err_msg := 'CSTPPINV.get_snd_rcv_rate (' || to_char(l_stmt_num) ||

2282: O_err_msg := FND_MESSAGE.Get;
2283:
2284: when others then
2285: o_err_num := SQLCODE;
2286: o_err_msg := 'CSTPPINV.get_snd_rcv_rate (' || to_char(l_stmt_num) ||
2287: '): ' || substr(SQLERRM, 1,200);
2288:
2289: END get_snd_rcv_rate;
2290:

Line 2324: o_err_msg := 'CSTPPINV.get_from_to_uom (' || to_char(l_stmt_num) ||

2320:
2321: EXCEPTION
2322: when others then
2323: o_err_num := SQLCODE;
2324: o_err_msg := 'CSTPPINV.get_from_to_uom (' || to_char(l_stmt_num) ||
2325: '): ' || substr(SQLERRM, 1,200);
2326:
2327: END get_from_to_uom;
2328:

Line 2753: o_err_msg := 'CSTPPINV.COST_ACCT_EVENTS(' || l_stmt_num || ')' || l_err_msg;

2749: when PROCESS_ERROR then
2750: rollback;
2751: o_err_num := l_err_num;
2752: o_err_code := l_err_code;
2753: o_err_msg := 'CSTPPINV.COST_ACCT_EVENTS(' || l_stmt_num || ')' || l_err_msg;
2754: when OTHERS then
2755: rollback;
2756: o_err_num := SQLCODE;
2757: o_err_msg := 'CSTPPINV.COST_ACCT_EVENTS: (' || to_char(l_stmt_num) || '): '

Line 2757: o_err_msg := 'CSTPPINV.COST_ACCT_EVENTS: (' || to_char(l_stmt_num) || '): '

2753: o_err_msg := 'CSTPPINV.COST_ACCT_EVENTS(' || l_stmt_num || ')' || l_err_msg;
2754: when OTHERS then
2755: rollback;
2756: o_err_num := SQLCODE;
2757: o_err_msg := 'CSTPPINV.COST_ACCT_EVENTS: (' || to_char(l_stmt_num) || '): '
2758: || substr(SQLERRM,1,150);
2759:
2760:
2761:

Line 2813: o_err_msg := 'CSTPPINV.get_exp_flag (' || to_char(l_stmt_num) ||

2809:
2810: EXCEPTION
2811: when others then
2812: o_err_num := SQLCODE;
2813: o_err_msg := 'CSTPPINV.get_exp_flag (' || to_char(l_stmt_num) ||
2814: '): ' || substr(SQLERRM, 1,200);
2815:
2816: END get_exp_flag;
2817:

Line 3022: IF (CSTPPINV.l_item_id_tbl.COUNT >= 1000 AND i_cost_method <> 4) THEN

3018: END IF;
3019:
3020: l_stmt_num := 20;
3021:
3022: IF (CSTPPINV.l_item_id_tbl.COUNT >= 1000 AND i_cost_method <> 4) THEN
3023: CSTPPWAC.insert_into_cppb(i_pac_period_id => i_pac_period_id,
3024: i_cost_group_id => i_cost_group_id,
3025: i_txn_category => 3, /* Cost Owned Transactions */
3026: i_user_id => i_user_id,

Line 3048: CSTPPINV.cost_inv_txn(i_pac_period_id => i_pac_period_id,

3044:
3045: l_stmt_num := 30;
3046:
3047: IF l_error_num = 0 THEN
3048: CSTPPINV.cost_inv_txn(i_pac_period_id => i_pac_period_id,
3049: i_legal_entity => i_legal_entity,
3050: i_cost_type_id => i_cost_type_id,
3051: i_cost_group_id => i_cost_group_id,
3052: i_cost_method => i_cost_method,

Line 3104: IF (CSTPPINV.l_item_id_tbl.COUNT > 0 AND i_cost_method <> 4) THEN

3100:
3101:
3102: l_error_num := 0;
3103:
3104: IF (CSTPPINV.l_item_id_tbl.COUNT > 0 AND i_cost_method <> 4) THEN
3105: /* more records left out in the PL/SQL tables, Move them to permanent tables
3106: and clear PL/SQL tables */
3107: CSTPPWAC.insert_into_cppb(i_pac_period_id => i_pac_period_id
3108: ,i_cost_group_id => i_cost_group_id

Line 3162: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;

3158: EXCEPTION
3159: WHEN PROCESS_ERROR THEN
3160: o_err_num := l_error_num;
3161: o_err_code := l_error_code;
3162: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;
3163: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV inter_trx');
3164: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3165:
3166: WHEN CPPB_ERROR THEN

Line 3163: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV inter_trx');

3159: WHEN PROCESS_ERROR THEN
3160: o_err_num := l_error_num;
3161: o_err_code := l_error_code;
3162: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;
3163: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV inter_trx');
3164: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3165:
3166: WHEN CPPB_ERROR THEN
3167: o_err_num := l_error_num;

Line 3169: o_err_msg := 'CSTPPINV:' || l_error_msg;

3165:
3166: WHEN CPPB_ERROR THEN
3167: o_err_num := l_error_num;
3168: o_err_code := l_error_code;
3169: o_err_msg := 'CSTPPINV:' || l_error_msg;
3170: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV while insert or update CPPB');
3171:
3172: WHEN EXP_FLAG_ERROR THEN
3173: o_err_num := l_error_num;

Line 3170: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV while insert or update CPPB');

3166: WHEN CPPB_ERROR THEN
3167: o_err_num := l_error_num;
3168: o_err_code := l_error_code;
3169: o_err_msg := 'CSTPPINV:' || l_error_msg;
3170: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV while insert or update CPPB');
3171:
3172: WHEN EXP_FLAG_ERROR THEN
3173: o_err_num := l_error_num;
3174: o_err_code := l_error_code;

Line 3175: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;

3171:
3172: WHEN EXP_FLAG_ERROR THEN
3173: o_err_num := l_error_num;
3174: o_err_code := l_error_code;
3175: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;
3176: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');
3177: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
3178: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
3179:

Line 3176: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');

3172: WHEN EXP_FLAG_ERROR THEN
3173: o_err_num := l_error_num;
3174: o_err_code := l_error_code;
3175: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;
3176: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');
3177: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
3178: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
3179:
3180: WHEN OTHERS THEN

Line 3182: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '

3178: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
3179:
3180: WHEN OTHERS THEN
3181: o_err_num := SQLCODE;
3182: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '
3183: || substr(SQLERRM,1,150);
3184: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_interorg_txn_grp1');
3185: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3186:

Line 3184: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_interorg_txn_grp1');

3180: WHEN OTHERS THEN
3181: o_err_num := SQLCODE;
3182: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '
3183: || substr(SQLERRM,1,150);
3184: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_interorg_txn_grp1');
3185: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3186:
3187: END cost_interorg_txn_grp1;
3188:

Line 3411: IF (CSTPPINV.l_item_id_tbl.COUNT >= 1000 AND i_cost_method <> 4) THEN

3407: END IF;
3408:
3409: l_stmt_num := 20;
3410:
3411: IF (CSTPPINV.l_item_id_tbl.COUNT >= 1000 AND i_cost_method <> 4) THEN
3412: CSTPPWAC.insert_into_cppb(i_pac_period_id => i_pac_period_id,
3413: i_cost_group_id => i_cost_group_id,
3414: i_txn_category => 9, /* Cost Derived Transactions */
3415: i_user_id => i_user_id,

Line 3437: CSTPPINV.cost_inv_txn(i_pac_period_id => i_pac_period_id,

3433:
3434: l_stmt_num := 30;
3435:
3436: IF l_error_num = 0 THEN
3437: CSTPPINV.cost_inv_txn(i_pac_period_id => i_pac_period_id,
3438: i_legal_entity => i_legal_entity,
3439: i_cost_type_id => i_cost_type_id,
3440: i_cost_group_id => i_cost_group_id,
3441: i_cost_method => i_cost_method,

Line 3491: IF (CSTPPINV.l_item_id_tbl.COUNT > 0 AND i_cost_method <> 4) THEN

3487:
3488:
3489: l_error_num := 0;
3490:
3491: IF (CSTPPINV.l_item_id_tbl.COUNT > 0 AND i_cost_method <> 4) THEN
3492: /* more records left out in the PL/SQL tables, Move them to permanent tables
3493: and clear PL/SQL tables */
3494: CSTPPWAC.insert_into_cppb(i_pac_period_id => i_pac_period_id
3495: ,i_cost_group_id => i_cost_group_id

Line 3549: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;

3545: EXCEPTION
3546: WHEN PROCESS_ERROR THEN
3547: o_err_num := l_error_num;
3548: o_err_code := l_error_code;
3549: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;
3550: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_interorg_trx');
3551: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3552:
3553: WHEN CPPB_ERROR THEN

Line 3550: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_interorg_trx');

3546: WHEN PROCESS_ERROR THEN
3547: o_err_num := l_error_num;
3548: o_err_code := l_error_code;
3549: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;
3550: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_interorg_trx');
3551: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3552:
3553: WHEN CPPB_ERROR THEN
3554: o_err_num := l_error_num;

Line 3556: o_err_msg := 'CSTPPINV:' || l_error_msg;

3552:
3553: WHEN CPPB_ERROR THEN
3554: o_err_num := l_error_num;
3555: o_err_code := l_error_code;
3556: o_err_msg := 'CSTPPINV:' || l_error_msg;
3557: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV while insert or update CPPB');
3558:
3559: WHEN EXP_FLAG_ERROR THEN
3560: o_err_num := l_error_num;

Line 3557: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV while insert or update CPPB');

3553: WHEN CPPB_ERROR THEN
3554: o_err_num := l_error_num;
3555: o_err_code := l_error_code;
3556: o_err_msg := 'CSTPPINV:' || l_error_msg;
3557: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV while insert or update CPPB');
3558:
3559: WHEN EXP_FLAG_ERROR THEN
3560: o_err_num := l_error_num;
3561: o_err_code := l_error_code;

Line 3562: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;

3558:
3559: WHEN EXP_FLAG_ERROR THEN
3560: o_err_num := l_error_num;
3561: o_err_code := l_error_code;
3562: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;
3563: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');
3564: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
3565: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
3566:

Line 3563: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');

3559: WHEN EXP_FLAG_ERROR THEN
3560: o_err_num := l_error_num;
3561: o_err_code := l_error_code;
3562: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;
3563: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');
3564: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
3565: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
3566:
3567: WHEN OTHERS THEN

Line 3569: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '

3565: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
3566:
3567: WHEN OTHERS THEN
3568: o_err_num := SQLCODE;
3569: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '
3570: || substr(SQLERRM,1,150);
3571: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_interorg_txn_grp2');
3572: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3573:

Line 3571: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_interorg_txn_grp2');

3567: WHEN OTHERS THEN
3568: o_err_num := SQLCODE;
3569: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '
3570: || substr(SQLERRM,1,150);
3571: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_interorg_txn_grp2');
3572: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3573:
3574: END cost_interorg_txn_grp2;
3575:

Line 3807: IF (CSTPPINV.l_item_id_tbl.COUNT >= 1000 AND i_cost_method <> 4) THEN

3803: IF ((i_txn_src_type_id = 5) AND (i_txn_action_id <> 2)) THEN
3804:
3805: l_stmt_num := 30;
3806:
3807: IF (CSTPPINV.l_item_id_tbl.COUNT >= 1000 AND i_cost_method <> 4) THEN
3808: l_stmt_num := 40;
3809: CSTPPWAC.insert_into_cppb(i_pac_period_id => i_pac_period_id,
3810: i_cost_group_id => i_cost_group_id,
3811: i_txn_category => 9, /* Cost Derived Transactions */

Line 3874: IF (CSTPPINV.l_item_id_tbl.COUNT >= 1000 AND i_cost_method <> 4) THEN

3870: END IF;
3871:
3872: ELSE
3873: /* other than wip source */
3874: IF (CSTPPINV.l_item_id_tbl.COUNT >= 1000 AND i_cost_method <> 4) THEN
3875: l_stmt_num := 60;
3876: CSTPPWAC.insert_into_cppb(i_pac_period_id => i_pac_period_id,
3877: i_cost_group_id => i_cost_group_id,
3878: i_txn_category => 9, /* Cost Derived Transactions */

Line 3900: CSTPPINV.cost_inv_txn(i_pac_period_id => i_pac_period_id,

3896: END IF;
3897:
3898: IF l_error_num = 0 THEN
3899: l_stmt_num := 60;
3900: CSTPPINV.cost_inv_txn(i_pac_period_id => i_pac_period_id,
3901: i_legal_entity => i_legal_entity,
3902: i_cost_type_id => i_cost_type_id,
3903: i_cost_group_id => i_cost_group_id,
3904: i_cost_method => i_cost_method,

Line 3956: IF (CSTPPINV.l_item_id_tbl.COUNT > 0 AND i_cost_method <> 4) THEN

3952:
3953:
3954: l_error_num := 0;
3955:
3956: IF (CSTPPINV.l_item_id_tbl.COUNT > 0 AND i_cost_method <> 4) THEN
3957: /* more records left out in the PL/SQL tables, Move them to permanent tables
3958: and clear PL/SQL tables */
3959: l_stmt_num := 70;
3960: CSTPPWAC.insert_into_cppb(i_pac_period_id => i_pac_period_id

Line 4015: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;

4011: EXCEPTION
4012: WHEN PROCESS_ERROR THEN
4013: o_err_num := l_error_num;
4014: o_err_code := l_error_code;
4015: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;
4016: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_trx');
4017: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
4018:
4019: WHEN CPPB_ERROR THEN

Line 4016: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_trx');

4012: WHEN PROCESS_ERROR THEN
4013: o_err_num := l_error_num;
4014: o_err_code := l_error_code;
4015: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;
4016: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_trx');
4017: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
4018:
4019: WHEN CPPB_ERROR THEN
4020: o_err_num := l_error_num;

Line 4022: o_err_msg := 'CSTPPINV:' || l_error_msg;

4018:
4019: WHEN CPPB_ERROR THEN
4020: o_err_num := l_error_num;
4021: o_err_code := l_error_code;
4022: o_err_msg := 'CSTPPINV:' || l_error_msg;
4023: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_trx while insert or update CPPB');
4024:
4025: WHEN EXP_FLAG_ERROR THEN
4026: o_err_num := l_error_num;

Line 4023: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_trx while insert or update CPPB');

4019: WHEN CPPB_ERROR THEN
4020: o_err_num := l_error_num;
4021: o_err_code := l_error_code;
4022: o_err_msg := 'CSTPPINV:' || l_error_msg;
4023: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_trx while insert or update CPPB');
4024:
4025: WHEN EXP_FLAG_ERROR THEN
4026: o_err_num := l_error_num;
4027: o_err_code := l_error_code;

Line 4028: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;

4024:
4025: WHEN EXP_FLAG_ERROR THEN
4026: o_err_num := l_error_num;
4027: o_err_code := l_error_code;
4028: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;
4029: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');
4030: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
4031: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
4032:

Line 4029: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');

4025: WHEN EXP_FLAG_ERROR THEN
4026: o_err_num := l_error_num;
4027: o_err_code := l_error_code;
4028: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;
4029: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');
4030: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
4031: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
4032:
4033: WHEN CHARGE_WIP_ERROR THEN

Line 4036: o_err_msg := 'CSTPPINV.charge_wip_material:' || l_error_msg;

4032:
4033: WHEN CHARGE_WIP_ERROR THEN
4034: o_err_num := l_error_num;
4035: o_err_code := l_error_code;
4036: o_err_msg := 'CSTPPINV.charge_wip_material:' || l_error_msg;
4037: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.charge_wip_material');
4038: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
4039: || ' organization id:' || i_txn_org_id || ' Material Relief Algorithm:' || i_mat_relief_algo);
4040: fnd_file.put_line(fnd_file.log,' Expense Item:' || l_exp_item || ' Expense Flag:' || l_exp_flag);

Line 4037: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.charge_wip_material');

4033: WHEN CHARGE_WIP_ERROR THEN
4034: o_err_num := l_error_num;
4035: o_err_code := l_error_code;
4036: o_err_msg := 'CSTPPINV.charge_wip_material:' || l_error_msg;
4037: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.charge_wip_material');
4038: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
4039: || ' organization id:' || i_txn_org_id || ' Material Relief Algorithm:' || i_mat_relief_algo);
4040: fnd_file.put_line(fnd_file.log,' Expense Item:' || l_exp_item || ' Expense Flag:' || l_exp_flag);
4041:

Line 4044: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '

4040: fnd_file.put_line(fnd_file.log,' Expense Item:' || l_exp_item || ' Expense Flag:' || l_exp_flag);
4041:
4042: WHEN OTHERS THEN
4043: o_err_num := SQLCODE;
4044: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '
4045: || substr(SQLERRM,1,150);
4046: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_txn_grp2');
4047: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
4048:

Line 4046: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_txn_grp2');

4042: WHEN OTHERS THEN
4043: o_err_num := SQLCODE;
4044: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '
4045: || substr(SQLERRM,1,150);
4046: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_txn_grp2');
4047: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
4048:
4049: END cost_txn_grp2;
4050:

Line 4052: end CSTPPINV;

4048:
4049: END cost_txn_grp2;
4050:
4051:
4052: end CSTPPINV;