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.27.12010000.3 2008/10/29 13:00:19 lchevala 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 585: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_err_msg;

581: EXCEPTION
582: when PROCESS_ERROR then
583: o_err_num := l_err_num;
584: o_err_code := l_err_code;
585: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_err_msg;
586: when OTHERS then
587: o_err_num := SQLCODE;
588: o_err_msg := 'CSTPPINV.COST_INV_TXN: (' || to_char(l_stmt_num) || '): '
589: || substr(SQLERRM,1,150);

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

584: o_err_code := l_err_code;
585: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_err_msg;
586: when OTHERS then
587: o_err_num := SQLCODE;
588: o_err_msg := 'CSTPPINV.COST_INV_TXN: (' || to_char(l_stmt_num) || '): '
589: || substr(SQLERRM,1,150);
590:
591: end cost_inv_txn;
592:

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

684:
685: l_pe_flag VARCHAR2(1); -- INVCONV
686: l_pd_txfr_ind NUMBER := 0; -- INVCONV
687:
688: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_interorg_cost';
689:
690: BEGIN
691:
692: IF l_debug = 'Y' THEN

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

839: WHERE transaction_id = l_shipment_txn_id;
840:
841: IF (l_txfr_price is NULL) THEN
842: fnd_file.put_line(fnd_file.log,'Transfer Price not available');
843: l_err_msg := 'CSTPPINV.get_interorg_cost : ' || to_char(l_stmt_num) ||' : '|| ' Transfer Price not available';
844: l_err_num := 9999;
845: raise process_error;
846: END IF;
847:

Line 857: CSTPPINV.insert_elemental_cost(

853: l_stmt_num := 30;
854:
855: /* Insert transfer price into MPTCD with cost element 1 */
856:
857: CSTPPINV.insert_elemental_cost(
858: i_pac_period_id => i_pac_period_id,
859: i_cost_type_id => i_cost_type_id,
860: i_cost_group_id => i_cost_group_id,
861: i_txn_id => i_txn_id,

Line 981: CSTPPINV.get_pacp_cost(

977:
978: /* Use PACP cost if available */
979: l_stmt_num := 50;
980:
981: CSTPPINV.get_pacp_cost(
982: i_cost_source_cost_group => l_cost_source_cost_group,
983: i_pac_period_id => i_pac_period_id,
984: i_cost_type_id => i_cost_type_id,
985: i_cost_group_id => i_cost_group_id,

Line 1009: CSTPPINV.get_perp_ship_cost(

1005:
1006: /* There is no PACP cost, so no costs were inserted into MPTCD.
1007: Insert perpetual shipment cost instead. */
1008:
1009: CSTPPINV.get_perp_ship_cost(
1010: i_pac_period_id => i_pac_period_id,
1011: i_cost_type_id => i_cost_type_id,
1012: i_cost_group_id => i_cost_group_id,
1013: i_txn_id => i_txn_id,

Line 1046: CSTPPINV.get_prev_period_cost(

1042: END IF;
1043:
1044: /* PACP is not enabled. Use prior period sending CG PWAC Cost */
1045:
1046: CSTPPINV.get_prev_period_cost(
1047: i_legal_entity => i_legal_entity,
1048: i_cost_source_cost_group => l_cost_source_cost_group,
1049: i_pac_period_id => i_pac_period_id,
1050: i_cost_type_id => i_cost_type_id,

Line 1076: CSTPPINV.get_perp_ship_cost(

1072:
1073: /* There is no prior period cost, so no costs were inserted into MPTCD.
1074: Insert perpetual shipment cost instead. */
1075:
1076: CSTPPINV.get_perp_ship_cost(
1077: i_pac_period_id => i_pac_period_id,
1078: i_cost_type_id => i_cost_type_id,
1079: i_cost_group_id => i_cost_group_id,
1080: i_txn_id => i_txn_id,

Line 1115: CSTPPINV.get_perp_ship_cost(

1111:
1112: /* Sending and Receiving Orgs not in the same LE/CT
1113: Use MTA Cost */
1114:
1115: CSTPPINV.get_perp_ship_cost(
1116: i_pac_period_id => i_pac_period_id,
1117: i_cost_type_id => i_cost_type_id,
1118: i_cost_group_id => i_cost_group_id,
1119: i_txn_id => i_txn_id,

Line 1151: CSTPPINV.get_txfr_trp_cost(

1147: IF (l_include_txfr_txp_costs = 1) THEN
1148: /* Add transfer credit and transportation charges on top of the sending CG cost. */
1149: l_stmt_num := 130;
1150:
1151: CSTPPINV.get_txfr_trp_cost(
1152: i_source_txn_id => l_shipment_txn_id,
1153: i_source_cost => (l_sending_cg_cost),
1154: x_txfr_credit => l_txfr_credit,
1155: x_trp_cost => l_trp_cost,

Line 1169: CSTPPINV.add_elemental_cost(

1165: l_ovhd_cost := (l_trp_cost + l_txfr_credit) * l_conv_rate;
1166: fnd_file.put_line(fnd_file.log, l_api_name || ': ' || l_stmt_num || ': l_ovhd_cost = ' || l_ovhd_cost);
1167:
1168: IF (l_ovhd_cost > 0) THEN
1169: CSTPPINV.add_elemental_cost(
1170: i_pac_period_id => i_pac_period_id,
1171: i_cost_type_id => i_cost_type_id,
1172: i_cost_group_id => i_cost_group_id,
1173: i_txn_id => i_txn_id,

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

1323: o_err_msg := l_err_msg;
1324:
1325: when OTHERS then
1326: o_err_num := SQLCODE;
1327: o_err_msg := 'CSTPPINV.get_interorg_cost (' || to_char(l_stmt_num) ||
1328: '): ' || substr(SQLERRM,1,200);
1329: fnd_file.put_line(fnd_file.log, o_err_msg);
1330:
1331: END get_interorg_cost;

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

1365:
1366: l_txfr_credit NUMBER;
1367: l_shipment_txn_qty NUMBER;
1368:
1369: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_txfr_trp_cost';
1370:
1371: BEGIN
1372:
1373: IF l_debug = 'Y' THEN

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

1432: EXCEPTION
1433:
1434: when OTHERS then
1435: o_err_num := SQLCODE;
1436: o_err_msg := 'CSTPPINV.get_txfr_trp_cost (' || to_char(l_stmt_num) ||
1437: '): ' || substr(SQLERRM,1,200);
1438: fnd_file.put_line(fnd_file.log, o_err_msg);
1439:
1440: END get_txfr_trp_cost;

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

1476: l_err_msg VARCHAR2(240);
1477:
1478: process_error EXCEPTION;
1479: l_elem_cnt NUMBER;
1480: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.add_elemental_cost';
1481:
1482: BEGIN
1483:
1484: IF l_debug = 'Y' THEN

Line 1523: CSTPPINV.insert_elemental_cost(

1519: ELSE
1520:
1521: l_stmt_num := 30;
1522:
1523: CSTPPINV.insert_elemental_cost(
1524: i_pac_period_id => i_pac_period_id,
1525: i_cost_type_id => i_cost_type_id,
1526: i_cost_group_id => i_cost_group_id,
1527: i_txn_id => i_txn_id,

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

1559: o_err_msg := l_err_msg;
1560:
1561: when OTHERS then
1562: o_err_num := SQLCODE;
1563: o_err_msg := 'CSTPPINV.add_elemental_cost (' || to_char(l_stmt_num) ||
1564: '): ' || substr(SQLERRM,1,200);
1565: fnd_file.put_line(fnd_file.log, o_err_msg);
1566: END add_elemental_cost;
1567:

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

1599: l_err_code VARCHAR2(240);
1600: l_err_msg VARCHAR2(240);
1601:
1602: l_elem_cnt NUMBER;
1603: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.insert_elemental_cost';
1604:
1605: BEGIN
1606:
1607: IF l_debug = 'Y' THEN

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

1663:
1664: EXCEPTION
1665: when OTHERS then
1666: o_err_num := SQLCODE;
1667: o_err_msg := 'CSTPPINV.insert_elemental_cost (' || to_char(l_stmt_num) ||
1668: '): ' || substr(SQLERRM,1,200);
1669: fnd_file.put_line(fnd_file.log, o_err_msg);
1670: END insert_elemental_cost;
1671:

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

1704: l_err_code VARCHAR2(240);
1705: l_err_msg VARCHAR2(240);
1706:
1707: l_pacp_pwac_cost NUMBER;
1708: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_pacp_cost';
1709:
1710: BEGIN
1711:
1712: IF l_debug = 'Y' THEN

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

1801: EXCEPTION
1802:
1803: when OTHERS then
1804: o_err_num := SQLCODE;
1805: o_err_msg := 'CSTPPINV.get_pacp_cost (' || to_char(l_stmt_num) ||
1806: '): ' || substr(SQLERRM,1,200);
1807: fnd_file.put_line(fnd_file.log, o_err_msg);
1808:
1809: END get_pacp_cost;

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

1847: l_prev_period_pwac_cost NUMBER;
1848: l_prev_period_pwac_cnt NUMBER := 0;
1849:
1850:
1851: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_prev_period_cost';
1852:
1853:
1854: BEGIN
1855:

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

1969: EXCEPTION
1970:
1971: when OTHERS then
1972: o_err_num := SQLCODE;
1973: o_err_msg := 'CSTPPINV.get_prev_period_cost (' || to_char(l_stmt_num) ||
1974: '): ' || substr(SQLERRM,1,200);
1975: fnd_file.put_line(fnd_file.log, o_err_msg);
1976:
1977: END get_prev_period_cost;

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

2012:
2013: l_perp_ship_cost NUMBER;
2014: l_mta_txn_qty NUMBER;
2015:
2016: l_api_name CONSTANT VARCHAR2(30) := 'CSTPPINV.get_perp_ship_cost';
2017:
2018: BEGIN
2019:
2020: IF l_debug = 'Y' THEN

Line 2109: CSTPPINV.insert_elemental_cost(

2105: and mta.base_transaction_value < 0;
2106:
2107: ELSE
2108: /* Insert 0 Material Cost into MPTCD only. */
2109: CSTPPINV.insert_elemental_cost(
2110: i_pac_period_id => i_pac_period_id,
2111: i_cost_type_id => i_cost_type_id,
2112: i_cost_group_id => i_cost_group_id,
2113: i_txn_id => i_txn_id,

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

2136: EXCEPTION
2137:
2138: when OTHERS then
2139: o_err_num := SQLCODE;
2140: o_err_msg := 'CSTPPINV.get_perp_ship_cost (' || to_char(l_stmt_num) ||
2141: '): ' || substr(SQLERRM,1,200);
2142: fnd_file.put_line(fnd_file.log, o_err_msg);
2143:
2144: END get_perp_ship_cost;

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

2240: O_err_msg := FND_MESSAGE.Get;
2241:
2242: when others then
2243: o_err_num := SQLCODE;
2244: o_err_msg := 'CSTPPINV.get_snd_rcv_rate (' || to_char(l_stmt_num) ||
2245: '): ' || substr(SQLERRM, 1,200);
2246:
2247: END get_snd_rcv_rate;
2248:

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

2278:
2279: EXCEPTION
2280: when others then
2281: o_err_num := SQLCODE;
2282: o_err_msg := 'CSTPPINV.get_from_to_uom (' || to_char(l_stmt_num) ||
2283: '): ' || substr(SQLERRM, 1,200);
2284:
2285: END get_from_to_uom;
2286:

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

2707: when PROCESS_ERROR then
2708: rollback;
2709: o_err_num := l_err_num;
2710: o_err_code := l_err_code;
2711: o_err_msg := 'CSTPPINV.COST_ACCT_EVENTS(' || l_stmt_num || ')' || l_err_msg;
2712: when OTHERS then
2713: rollback;
2714: o_err_num := SQLCODE;
2715: o_err_msg := 'CSTPPINV.COST_ACCT_EVENTS: (' || to_char(l_stmt_num) || '): '

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

2711: o_err_msg := 'CSTPPINV.COST_ACCT_EVENTS(' || l_stmt_num || ')' || l_err_msg;
2712: when OTHERS then
2713: rollback;
2714: o_err_num := SQLCODE;
2715: o_err_msg := 'CSTPPINV.COST_ACCT_EVENTS: (' || to_char(l_stmt_num) || '): '
2716: || substr(SQLERRM,1,150);
2717:
2718:
2719:

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

2760:
2761: EXCEPTION
2762: when others then
2763: o_err_num := SQLCODE;
2764: o_err_msg := 'CSTPPINV.get_exp_flag (' || to_char(l_stmt_num) ||
2765: '): ' || substr(SQLERRM, 1,200);
2766:
2767: END get_exp_flag;
2768:

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

2968: END IF;
2969:
2970: l_stmt_num := 20;
2971:
2972: IF (CSTPPINV.l_item_id_tbl.COUNT >= 1000 AND i_cost_method <> 4) THEN
2973: CSTPPWAC.insert_into_cppb(i_pac_period_id => i_pac_period_id,
2974: i_cost_group_id => i_cost_group_id,
2975: i_txn_category => 3, /* Cost Owned Transactions */
2976: i_user_id => i_user_id,

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

2994:
2995: l_stmt_num := 30;
2996:
2997: IF l_error_num = 0 THEN
2998: CSTPPINV.cost_inv_txn(i_pac_period_id => i_pac_period_id,
2999: i_legal_entity => i_legal_entity,
3000: i_cost_type_id => i_cost_type_id,
3001: i_cost_group_id => i_cost_group_id,
3002: i_cost_method => i_cost_method,

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

3048:
3049:
3050: l_error_num := 0;
3051:
3052: IF (CSTPPINV.l_item_id_tbl.COUNT > 0 AND i_cost_method <> 4) THEN
3053: /* more records left out in the PL/SQL tables, Move them to permanent tables
3054: and clear PL/SQL tables */
3055: CSTPPWAC.insert_into_cppb(i_pac_period_id => i_pac_period_id
3056: ,i_cost_group_id => i_cost_group_id

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

3106: EXCEPTION
3107: WHEN PROCESS_ERROR THEN
3108: o_err_num := l_error_num;
3109: o_err_code := l_error_code;
3110: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;
3111: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV inter_trx');
3112: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3113:
3114: WHEN CPPB_ERROR THEN

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

3107: WHEN PROCESS_ERROR THEN
3108: o_err_num := l_error_num;
3109: o_err_code := l_error_code;
3110: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;
3111: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV inter_trx');
3112: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3113:
3114: WHEN CPPB_ERROR THEN
3115: o_err_num := l_error_num;

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

3113:
3114: WHEN CPPB_ERROR THEN
3115: o_err_num := l_error_num;
3116: o_err_code := l_error_code;
3117: o_err_msg := 'CSTPPINV:' || l_error_msg;
3118: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV while insert or update CPPB');
3119:
3120: WHEN EXP_FLAG_ERROR THEN
3121: o_err_num := l_error_num;

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

3114: WHEN CPPB_ERROR THEN
3115: o_err_num := l_error_num;
3116: o_err_code := l_error_code;
3117: o_err_msg := 'CSTPPINV:' || l_error_msg;
3118: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV while insert or update CPPB');
3119:
3120: WHEN EXP_FLAG_ERROR THEN
3121: o_err_num := l_error_num;
3122: o_err_code := l_error_code;

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

3119:
3120: WHEN EXP_FLAG_ERROR THEN
3121: o_err_num := l_error_num;
3122: o_err_code := l_error_code;
3123: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;
3124: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');
3125: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
3126: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
3127:

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

3120: WHEN EXP_FLAG_ERROR THEN
3121: o_err_num := l_error_num;
3122: o_err_code := l_error_code;
3123: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;
3124: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');
3125: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
3126: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
3127:
3128: WHEN OTHERS THEN

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

3126: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
3127:
3128: WHEN OTHERS THEN
3129: o_err_num := SQLCODE;
3130: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '
3131: || substr(SQLERRM,1,150);
3132: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_interorg_txn_grp1');
3133: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3134:

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

3128: WHEN OTHERS THEN
3129: o_err_num := SQLCODE;
3130: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '
3131: || substr(SQLERRM,1,150);
3132: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_interorg_txn_grp1');
3133: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3134:
3135: END cost_interorg_txn_grp1;
3136:

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

3355: END IF;
3356:
3357: l_stmt_num := 20;
3358:
3359: IF (CSTPPINV.l_item_id_tbl.COUNT >= 1000 AND i_cost_method <> 4) THEN
3360: CSTPPWAC.insert_into_cppb(i_pac_period_id => i_pac_period_id,
3361: i_cost_group_id => i_cost_group_id,
3362: i_txn_category => 9, /* Cost Derived Transactions */
3363: i_user_id => i_user_id,

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

3381:
3382: l_stmt_num := 30;
3383:
3384: IF l_error_num = 0 THEN
3385: CSTPPINV.cost_inv_txn(i_pac_period_id => i_pac_period_id,
3386: i_legal_entity => i_legal_entity,
3387: i_cost_type_id => i_cost_type_id,
3388: i_cost_group_id => i_cost_group_id,
3389: i_cost_method => i_cost_method,

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

3435:
3436:
3437: l_error_num := 0;
3438:
3439: IF (CSTPPINV.l_item_id_tbl.COUNT > 0 AND i_cost_method <> 4) THEN
3440: /* more records left out in the PL/SQL tables, Move them to permanent tables
3441: and clear PL/SQL tables */
3442: CSTPPWAC.insert_into_cppb(i_pac_period_id => i_pac_period_id
3443: ,i_cost_group_id => i_cost_group_id

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

3493: EXCEPTION
3494: WHEN PROCESS_ERROR THEN
3495: o_err_num := l_error_num;
3496: o_err_code := l_error_code;
3497: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;
3498: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_interorg_trx');
3499: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3500:
3501: WHEN CPPB_ERROR THEN

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

3494: WHEN PROCESS_ERROR THEN
3495: o_err_num := l_error_num;
3496: o_err_code := l_error_code;
3497: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;
3498: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_interorg_trx');
3499: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3500:
3501: WHEN CPPB_ERROR THEN
3502: o_err_num := l_error_num;

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

3500:
3501: WHEN CPPB_ERROR THEN
3502: o_err_num := l_error_num;
3503: o_err_code := l_error_code;
3504: o_err_msg := 'CSTPPINV:' || l_error_msg;
3505: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV while insert or update CPPB');
3506:
3507: WHEN EXP_FLAG_ERROR THEN
3508: o_err_num := l_error_num;

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

3501: WHEN CPPB_ERROR THEN
3502: o_err_num := l_error_num;
3503: o_err_code := l_error_code;
3504: o_err_msg := 'CSTPPINV:' || l_error_msg;
3505: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV while insert or update CPPB');
3506:
3507: WHEN EXP_FLAG_ERROR THEN
3508: o_err_num := l_error_num;
3509: o_err_code := l_error_code;

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

3506:
3507: WHEN EXP_FLAG_ERROR THEN
3508: o_err_num := l_error_num;
3509: o_err_code := l_error_code;
3510: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;
3511: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');
3512: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
3513: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
3514:

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

3507: WHEN EXP_FLAG_ERROR THEN
3508: o_err_num := l_error_num;
3509: o_err_code := l_error_code;
3510: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;
3511: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');
3512: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
3513: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
3514:
3515: WHEN OTHERS THEN

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

3513: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
3514:
3515: WHEN OTHERS THEN
3516: o_err_num := SQLCODE;
3517: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '
3518: || substr(SQLERRM,1,150);
3519: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_interorg_txn_grp2');
3520: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3521:

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

3515: WHEN OTHERS THEN
3516: o_err_num := SQLCODE;
3517: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '
3518: || substr(SQLERRM,1,150);
3519: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_interorg_txn_grp2');
3520: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3521:
3522: END cost_interorg_txn_grp2;
3523:

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

3755: IF ((i_txn_src_type_id = 5) AND (i_txn_action_id <> 2)) THEN
3756:
3757: l_stmt_num := 30;
3758:
3759: IF (CSTPPINV.l_item_id_tbl.COUNT >= 1000 AND i_cost_method <> 4) THEN
3760: l_stmt_num := 40;
3761: CSTPPWAC.insert_into_cppb(i_pac_period_id => i_pac_period_id,
3762: i_cost_group_id => i_cost_group_id,
3763: i_txn_category => 9, /* Cost Derived Transactions */

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

3822: END IF;
3823:
3824: ELSE
3825: /* other than wip source */
3826: IF (CSTPPINV.l_item_id_tbl.COUNT >= 1000 AND i_cost_method <> 4) THEN
3827: l_stmt_num := 60;
3828: CSTPPWAC.insert_into_cppb(i_pac_period_id => i_pac_period_id,
3829: i_cost_group_id => i_cost_group_id,
3830: i_txn_category => 9, /* Cost Derived Transactions */

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

3848: END IF;
3849:
3850: IF l_error_num = 0 THEN
3851: l_stmt_num := 60;
3852: CSTPPINV.cost_inv_txn(i_pac_period_id => i_pac_period_id,
3853: i_legal_entity => i_legal_entity,
3854: i_cost_type_id => i_cost_type_id,
3855: i_cost_group_id => i_cost_group_id,
3856: i_cost_method => i_cost_method,

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

3904:
3905:
3906: l_error_num := 0;
3907:
3908: IF (CSTPPINV.l_item_id_tbl.COUNT > 0 AND i_cost_method <> 4) THEN
3909: /* more records left out in the PL/SQL tables, Move them to permanent tables
3910: and clear PL/SQL tables */
3911: l_stmt_num := 70;
3912: CSTPPWAC.insert_into_cppb(i_pac_period_id => i_pac_period_id

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

3963: EXCEPTION
3964: WHEN PROCESS_ERROR THEN
3965: o_err_num := l_error_num;
3966: o_err_code := l_error_code;
3967: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;
3968: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_trx');
3969: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3970:
3971: WHEN CPPB_ERROR THEN

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

3964: WHEN PROCESS_ERROR THEN
3965: o_err_num := l_error_num;
3966: o_err_code := l_error_code;
3967: o_err_msg := 'CSTPPINV.COST_INV_TXN:' || l_error_msg;
3968: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_trx');
3969: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
3970:
3971: WHEN CPPB_ERROR THEN
3972: o_err_num := l_error_num;

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

3970:
3971: WHEN CPPB_ERROR THEN
3972: o_err_num := l_error_num;
3973: o_err_code := l_error_code;
3974: o_err_msg := 'CSTPPINV:' || l_error_msg;
3975: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_trx while insert or update CPPB');
3976:
3977: WHEN EXP_FLAG_ERROR THEN
3978: o_err_num := l_error_num;

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

3971: WHEN CPPB_ERROR THEN
3972: o_err_num := l_error_num;
3973: o_err_code := l_error_code;
3974: o_err_msg := 'CSTPPINV:' || l_error_msg;
3975: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV group2_trx while insert or update CPPB');
3976:
3977: WHEN EXP_FLAG_ERROR THEN
3978: o_err_num := l_error_num;
3979: o_err_code := l_error_code;

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

3976:
3977: WHEN EXP_FLAG_ERROR THEN
3978: o_err_num := l_error_num;
3979: o_err_code := l_error_code;
3980: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;
3981: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');
3982: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
3983: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
3984:

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

3977: WHEN EXP_FLAG_ERROR THEN
3978: o_err_num := l_error_num;
3979: o_err_code := l_error_code;
3980: o_err_msg := 'CSTPPINV.get_exp_flag:' || l_error_msg;
3981: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.get_exp_flag');
3982: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
3983: || ' organization id:' || i_txn_org_id || ' transfer org id:' || i_txfr_org_id);
3984:
3985: WHEN CHARGE_WIP_ERROR THEN

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

3984:
3985: WHEN CHARGE_WIP_ERROR THEN
3986: o_err_num := l_error_num;
3987: o_err_code := l_error_code;
3988: o_err_msg := 'CSTPPINV.charge_wip_material:' || l_error_msg;
3989: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.charge_wip_material');
3990: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
3991: || ' organization id:' || i_txn_org_id || ' Material Relief Algorithm:' || i_mat_relief_algo);
3992: fnd_file.put_line(fnd_file.log,' Expense Item:' || l_exp_item || ' Expense Flag:' || l_exp_flag);

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

3985: WHEN CHARGE_WIP_ERROR THEN
3986: o_err_num := l_error_num;
3987: o_err_code := l_error_code;
3988: o_err_msg := 'CSTPPINV.charge_wip_material:' || l_error_msg;
3989: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.charge_wip_material');
3990: fnd_file.put_line(fnd_file.log,'item id:'||i_item_id || ' txn action id:' || i_txn_action_id
3991: || ' organization id:' || i_txn_org_id || ' Material Relief Algorithm:' || i_mat_relief_algo);
3992: fnd_file.put_line(fnd_file.log,' Expense Item:' || l_exp_item || ' Expense Flag:' || l_exp_flag);
3993:

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

3992: fnd_file.put_line(fnd_file.log,' Expense Item:' || l_exp_item || ' Expense Flag:' || l_exp_flag);
3993:
3994: WHEN OTHERS THEN
3995: o_err_num := SQLCODE;
3996: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '
3997: || substr(SQLERRM,1,150);
3998: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_txn_grp2');
3999: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
4000:

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

3994: WHEN OTHERS THEN
3995: o_err_num := SQLCODE;
3996: o_err_msg := 'CSTPPINV (' || to_char(l_stmt_num) || '): '
3997: || substr(SQLERRM,1,150);
3998: fnd_file.put_line(fnd_file.log,'Errored out txns in CSTPPINV.cost_txn_grp2');
3999: fnd_file.put_line(fnd_file.log,'txn_id'||i_txn_id);
4000:
4001: END cost_txn_grp2;
4002:

Line 4004: end CSTPPINV;

4000:
4001: END cost_txn_grp2;
4002:
4003:
4004: end CSTPPINV;