DBA Data[Home] [Help]

APPS.CSTPACDP dependencies on CSTPACDP

Line 1: PACKAGE BODY CSTPACDP AS

1: PACKAGE BODY CSTPACDP AS
2: /* $Header: CSTACDPB.pls 120.85 2011/12/27 08:38:30 nmogili ship $ */
3:
4: --
5: -- OPM INVCONV umoogala Process-Discrete Xfers Enh.

Line 144: FND_FILE.put_line( FND_FILE.log, 'CSTPACDP.Cost_txn << ' );

140: l_debug := fnd_profile.value('MRP_DEBUG');
141:
142:
143: IF (l_debug = 'Y' ) THEN
144: FND_FILE.put_line( FND_FILE.log, 'CSTPACDP.Cost_txn << ' );
145: END IF;
146:
147:
148: -- Populate local variables

Line 367: CSTPACDP.comm_iss_to_wip(I_TXN_ID => i_txn_id,

363: ** 6) rest of inventory transactions **
364: *******************************************************************/
365: if (i_comm_iss_flag = 1) THEN
366: -- call dedicated function for common issue to wip txn here.
367: CSTPACDP.comm_iss_to_wip(I_TXN_ID => i_txn_id,
368: I_COMM_ISS_FLAG => i_comm_iss_flag,
369: I_FLOW_SCHEDULE => i_flow_schedule,
370: I_ORG_ID => i_org_id,
371: I_ITEM_ID => l_item_id,

Line 402: CSTPACDP.wip_cost_txn(i_org_id, i_txn_id, l_cost_grp_id, l_item_id,

398:
399: elsif (l_src_type_id = 5 and l_txn_act_id <> 2) then
400: -- WIP transaction
401: -- These always occur in base currency.
402: CSTPACDP.wip_cost_txn(i_org_id, i_txn_id, l_cost_grp_id, l_item_id,
403: l_txn_date, l_p_qty, l_subinv, l_txn_act_id,
404: l_txn_src_id, l_src_type_id,
405: l_dist_acct,
406: l_sob_id, l_pri_curr,

Line 419: CSTPACDP.sub_cost_txn(i_org_id, i_txn_id, l_cost_grp_id, l_txfr_cost_grp,

415:
416: /* Changes for VMI. Adding Planning Transfer transaction */
417: elsif (l_txn_act_id in (2,5,28,55)) then
418: -- Subinventory transfer,VMI Planning transfer,staging transfer,cost group transfer for WMS mobile
419: CSTPACDP.sub_cost_txn(i_org_id, i_txn_id, l_cost_grp_id, l_txfr_cost_grp,
420: l_item_id,
421: l_txn_date, l_p_qty, l_subinv, l_txf_subinv,
422: l_txf_txn_id, l_txn_act_id,
423: l_txn_src_id, l_src_type_id,

Line 446: CSTPACDP.interorg_cost_txn(i_org_id, i_txn_id, l_cost_grp_id,

442: l_txf_cost := 0;
443: end if;
444:
445: -- OPM INVCONV umoogala: Added new parameter (l_pd_txfr_price) to send transfer_price
446: CSTPACDP.interorg_cost_txn(i_org_id, i_txn_id, l_cost_grp_id,
447: l_txfr_cost_grp, l_item_id,
448: l_txn_date, l_p_qty, l_subinv,
449: l_txn_org_id, l_txf_org_id,
450: l_txf_txn_id, l_txf_cost, l_trp_cost,

Line 497: CSTPACDP.avcu_cost_txn(i_org_id, i_txn_id, l_cost_grp_id, l_item_id,

493: end if;
494:
495: elsif (l_txn_act_id = 24) then /*Removed i_txn_src_type_id = 15 for bug 6030287*/
496: -- Average Cost Update
497: CSTPACDP.avcu_cost_txn(i_org_id, i_txn_id, l_cost_grp_id, l_item_id,
498: l_txn_date, l_qty_adj, l_txn_act_id,
499: l_txn_src_id, l_src_type_id,
500: l_mat_acct, l_mat_ovhd_acct, l_res_acct,
501: l_osp_acct, l_ovhd_acct,

Line 517: CSTPACDP.logical_cost_txn(i_org_id, i_txn_id, l_cost_grp_id, l_item_id,

513: -- the following 2 elsifs are added for dropshipment project
514: elsif (l_logical_txn = 1) then
515: -- 11i10 - dropshipment project added logical transaction types
516: -- this function handles all new logical transactions
517: CSTPACDP.logical_cost_txn(i_org_id, i_txn_id, l_cost_grp_id, l_item_id,
518: l_txn_date, l_p_qty, l_subinv, l_txn_act_id,
519: l_txn_src_id, l_src_type_id, l_txn_type_id, l_dist_acct,
520: l_sob_id, l_pri_curr, l_alt_curr,
521: l_conv_date, l_conv_rate, l_conv_type,

Line 531: CSTPACDP.consigned_update_cost_txn(i_org_id, i_txn_id, l_cost_grp_id, l_item_id,

527: raise process_error;
528: end if;
529: elsif (l_txn_act_id = 25 and l_src_type_id = 1) then
530: -- 11i10 - Retroactive Price Update for consigned
531: CSTPACDP.consigned_update_cost_txn(i_org_id, i_txn_id, l_cost_grp_id, l_item_id,
532: l_txn_date, l_p_qty, l_subinv, l_txn_act_id,
533: l_txn_src_id, l_src_type_id, l_dist_acct,
534: l_sob_id, l_pri_curr, l_alt_curr,
535: l_conv_date, l_conv_rate, l_conv_type,

Line 544: CSTPACDP.inv_cost_txn(i_org_id, i_txn_id, l_cost_grp_id, l_item_id,

540: raise process_error;
541: end if;
542: else
543: -- Rest of inventory transactions
544: CSTPACDP.inv_cost_txn(i_org_id, i_txn_id, l_cost_grp_id, l_item_id,
545: l_txn_date, l_p_qty, l_subinv, l_txn_act_id,
546: l_txn_src_id, l_src_type_id,l_dist_acct,
547: l_sob_id, l_pri_curr, l_alt_curr,
548: l_conv_date, l_conv_rate, l_conv_type,

Line 712: CSTPACDP.encumbrance_account(l_enc_org_id, i_txn_id, l_item_id,

708:
709:
710: /* Create the encumbrance for this transaction against the receipt
711: organization */
712: CSTPACDP.encumbrance_account(l_enc_org_id, i_txn_id, l_item_id,
713: -1*l_enc_amount, l_p_qty, l_enc_acct,
714: l_sob_id, l_txn_date,
715: l_txn_src_id, l_src_type_id,
716: l_pri_curr, l_alt_curr,

Line 804: CSTPACDP.encumbrance_account(i_org_id, i_txn_id, l_item_id,

800:
801: END IF;
802:
803:
804: CSTPACDP.encumbrance_account(i_org_id, i_txn_id, l_item_id,
805: -1*l_enc_amount, l_p_qty, l_enc_acct,
806: l_sob_id, l_txn_date,
807: l_txn_src_id, l_src_type_id,
808: l_pri_curr, l_alt_curr,

Line 828: FND_FILE.put_line( FND_FILE.log, 'CSTPACDP.Cost_Txn >>');

824: where transaction_id = i_txn_id
825: and transaction_costed_date is NULL;
826:
827: IF (l_debug = 'Y' ) THEN
828: FND_FILE.put_line( FND_FILE.log, 'CSTPACDP.Cost_Txn >>');
829: END IF;
830:
831: EXCEPTION
832:

Line 861: O_error_message := 'CSTPACDP.cost_txn' || to_char(l_stmt_num) ||

857:
858: when others then
859: rollback;
860: O_error_num := SQLCODE;
861: O_error_message := 'CSTPACDP.cost_txn' || to_char(l_stmt_num) ||
862: substr(SQLERRM,1,180);
863:
864: END cost_txn;
865:

Line 1201: O_error_message := 'CSTPACDP.comm_iss_to_wip (' || to_char(l_stmt_num) ||

1197: when others then
1198:
1199: rollback;
1200: O_error_num := SQLCODE;
1201: O_error_message := 'CSTPACDP.comm_iss_to_wip (' || to_char(l_stmt_num) ||
1202: '): ' || substr(SQLERRM,1,180);
1203:
1204: END comm_iss_to_wip;
1205:

Line 1494: O_error_message := 'CSTPACDP.wip_cost_txn (' || to_char(l_stmt_num) ||

1490: when others then
1491: fnd_file.put_line(fnd_file.log,'other exceptions raised');
1492: rollback;
1493: O_error_num := SQLCODE;
1494: O_error_message := 'CSTPACDP.wip_cost_txn (' || to_char(l_stmt_num) ||
1495: '): ' || substr(SQLERRM,1,180);
1496:
1497: END wip_cost_txn;
1498:

Line 1677: O_error_message := 'CSTPACDP.sub_cost_txn' || to_char(l_stmt_num) ||

1673: when others then
1674:
1675: rollback;
1676: O_error_num := SQLCODE;
1677: O_error_message := 'CSTPACDP.sub_cost_txn' || to_char(l_stmt_num) ||
1678: substr(SQLERRM,1,180);
1679:
1680: END sub_cost_txn;
1681:

Line 2346: O_error_message := 'CSTPACDP.inv_cost_txn (' || to_char(l_stmt_num) ||

2342: when others then
2343:
2344: rollback;
2345: O_error_num := SQLCODE;
2346: O_error_message := 'CSTPACDP.inv_cost_txn (' || to_char(l_stmt_num) ||
2347: '): ' || substr(SQLERRM,1,180);
2348:
2349: END inv_cost_txn;
2350:

Line 4378: O_error_message := 'CSTPACDP.interorg_cost_txn(' || to_char(l_stmt_num) || ') '||

4374: when others then
4375:
4376: rollback;
4377: O_error_num := SQLCODE;
4378: O_error_message := 'CSTPACDP.interorg_cost_txn(' || to_char(l_stmt_num) || ') '||
4379: substr(SQLERRM,1,180);
4380:
4381: end interorg_cost_txn;
4382:

Line 4445: fnd_file.put_line(fnd_file.log, 'CSTPACDP.avcu_cost_txn: ' || FND_MESSAGE.Get);

4441:
4442: l_stmt_num := 2;
4443: if (i_qty = 0 and l_debug = 'Y') THEN
4444: FND_MESSAGE.set_name('BOM', 'CST_UPDATE_ZERO_QTY');
4445: fnd_file.put_line(fnd_file.log, 'CSTPACDP.avcu_cost_txn: ' || FND_MESSAGE.Get);
4446: end if;
4447:
4448: l_stmt_num := 5;
4449:

Line 4743: O_error_message := 'CSTPACDP.avcu_cost_txn' || to_char(l_stmt_num) ||

4739:
4740: when others then
4741: rollback;
4742: O_error_num := SQLCODE;
4743: O_error_message := 'CSTPACDP.avcu_cost_txn' || to_char(l_stmt_num) ||
4744: substr(SQLERRM,1,180);
4745:
4746: END avcu_cost_txn;
4747:

Line 5090: O_error_message := 'CSTPACDP.logical_cost_txn (' || to_char(l_stmt_num) ||

5086: when others then
5087:
5088: rollback;
5089: O_error_num := SQLCODE;
5090: O_error_message := 'CSTPACDP.logical_cost_txn (' || to_char(l_stmt_num) ||
5091: '): ' || substr(SQLERRM,1,180);
5092:
5093: END logical_cost_txn;
5094:

Line 5149: l_err_msg := 'CSTPACDP.consigned_update_cost_txn (10): '||

5145: where organization_id = i_org_id;
5146:
5147: if (l_retro_acct_id = -1) then
5148: l_err_num := SQLCODE;
5149: l_err_msg := 'CSTPACDP.consigned_update_cost_txn (10): '||
5150: 'RCV_PARAMETERS.RETROOPRICE_ADJ_ACCOUNT_ID must not be NULL';
5151: raise process_error;
5152: end if;
5153:

Line 5207: O_error_message := 'CSTPACDP.consigned_update_cost_txn (' || to_char(l_stmt_num) ||

5203: when others then
5204:
5205: rollback;
5206: O_error_num := SQLCODE;
5207: O_error_message := 'CSTPACDP.consigned_update_cost_txn (' || to_char(l_stmt_num) ||
5208: '): ' || substr(SQLERRM,1,180);
5209:
5210: END consigned_update_cost_txn;
5211:

Line 5361: l_err_msg := 'CSTPACDP.inventory_accounts_std(80): Unabled to obtain elemental accounts';

5357: AND organization_id = i_org_id;
5358:
5359: if (l_ccga_count = 0) then
5360: l_err_num := 9999;
5361: l_err_msg := 'CSTPACDP.inventory_accounts_std(80): Unabled to obtain elemental accounts';
5362: raise process_error;
5363: end if;
5364:
5365: l_stmt_num := 90;

Line 5456: O_error_message := 'CSTPACDP.inventory_accounts' || to_char(l_stmt_num) ||

5452: when others then
5453:
5454: rollback;
5455: O_error_num := SQLCODE;
5456: O_error_message := 'CSTPACDP.inventory_accounts' || to_char(l_stmt_num) ||
5457: substr(SQLERRM,1,180);
5458:
5459: END inventory_accounts_std;
5460:

Line 5905: O_error_message := 'CSTPACDP.inventory_accounts' || to_char(l_stmt_num) ||

5901: fnd_file.put_line (fnd_file.log, 'Inventory_accounts' || to_char(l_stmt_num)
5902: || substr(SQLERRM,1,180)) ;
5903: end if;
5904: O_error_num := SQLCODE;
5905: O_error_message := 'CSTPACDP.inventory_accounts' || to_char(l_stmt_num) ||
5906: substr(SQLERRM,1,180);
5907:
5908: END inventory_accounts;
5909:

Line 6287: O_error_message := 'CSTPACDP.distribute_accounts' || to_char(l_stmt_num) ||

6283:
6284: when others then
6285: rollback;
6286: O_error_num := SQLCODE;
6287: O_error_message := 'CSTPACDP.distribute_accounts' || to_char(l_stmt_num) ||
6288: substr(SQLERRM,1,180);
6289:
6290: end distribute_accounts;
6291:

Line 6435: O_error_message := 'CSTPACDP.cfm_scrap_dist_accounts' || to_char(l_stmt_num) ||

6431:
6432: when others then
6433: rollback;
6434: O_error_num := SQLCODE;
6435: O_error_message := 'CSTPACDP.cfm_scrap_dist_accounts' || to_char(l_stmt_num) ||
6436: substr(SQLERRM,1,180);
6437: end cfm_scrap_dist_accounts;
6438:
6439: procedure ovhd_accounts(

Line 6542: O_error_message := 'CSTPACDP.ovhd_accounts' || to_char(l_stmt_num) ||

6538: when others then
6539:
6540: rollback;
6541: O_error_num := SQLCODE;
6542: O_error_message := 'CSTPACDP.ovhd_accounts' || to_char(l_stmt_num) ||
6543: substr(SQLERRM,1,180);
6544:
6545: END ovhd_accounts;
6546:

Line 6635: O_error_message := 'CSTPACDP.encumbrance_account' || to_char(l_stmt_num) ||

6631:
6632: when others then
6633: rollback;
6634: O_error_num := SQLCODE;
6635: O_error_message := 'CSTPACDP.encumbrance_account' || to_char(l_stmt_num) ||
6636: substr(SQLERRM,1,180);
6637:
6638: END encumbrance_account;
6639:

Line 6910: O_error_message := 'CSTPACDP.insert_account (' || to_char(l_stmt_num)

6906:
6907: when others then
6908: rollback;
6909: O_error_num := SQLCODE;
6910: O_error_message := 'CSTPACDP.insert_account (' || to_char(l_stmt_num)
6911: || ') ' || substr(SQLERRM,1,180);
6912: FND_FILE.put_line(FND_FILE.log,'DS - others Exception, sqlcode = '||SQLCODE);
6913:
6914: end insert_account;

Line 7048: O_error_message := 'CSTPACDP.balance_account (' || to_char(l_stmt_num) ||

7044: when others then
7045:
7046: rollback;
7047: O_error_num := SQLCODE;
7048: O_error_message := 'CSTPACDP.balance_account (' || to_char(l_stmt_num) ||
7049: ') ' || substr(SQLERRM,1,180);
7050:
7051: END balance_account;
7052:

Line 7961: CSTPACDP.distribute_accounts(

7957: | Cr Inv. Val @ sending org cost
7958: +----------------------------------------------------------------------*/
7959: fnd_file.put_line(fnd_file.log, 'Cr Inv Val @ sending org cost');
7960:
7961: CSTPACDP.distribute_accounts(
7962: org_id, trans_id,
7963: 0, cg_id , txn_act_id,
7964: item_id, p_qty, 1,
7965: 1, 0, NULL, mat_acct, mat_ovhd_acct,

Line 8000: CSTPACDP.distribute_accounts(

7996: -- Shipping from expense destination fails with ORA-1400
7997: -- We were calling distribute_accounts with elemental flag 1.
7998: -- To book to exp account only, now sending elemental flag 0.
7999: --
8000: CSTPACDP.distribute_accounts(
8001: org_id, trans_id, 0, cg_id , txn_act_id,
8002: item_id, p_qty, 2, 0, 0,
8003: exp_acct, NULL, NULL, NULL, NULL, NULL,
8004: sob_id, txn_date, txn_src_id, src_type_id,

Line 8039: CSTPACDP.insert_account

8035: /*----------------------------------------------------------------------+
8036: | Cr Freight Acct
8037: +----------------------------------------------------------------------*/
8038: fnd_file.put_line(fnd_file.log, 'Cr Freight Acct with ' || trp_cost || ' ' || pri_curr);
8039: CSTPACDP.insert_account
8040: (org_id, trans_id, item_id, -1 * trp_cost,
8041: p_qty, trp_acct, sob_id, 12, NULL, NULL,
8042: txn_date, txn_src_id, src_type_id,
8043: pri_curr, NULL, NULL, NULL, NULL,1,

Line 8073: CSTPACDP.insert_account

8069: end if;
8070:
8071:
8072: fnd_file.put_line(fnd_file.log, 'Dr Receivables with ' || (txf_price * p_qty) || ' ' || pri_curr);
8073: CSTPACDP.insert_account
8074: (org_id, trans_id, item_id, -1 * txf_price * p_qty,
8075: -1 * p_qty, io_rec_acct, sob_id, 10, NULL, NULL,
8076: txn_date, txn_src_id, src_type_id,
8077: pri_curr, NULL, NULL, NULL, NULL,1,

Line 8142: CSTPACDP.insert_account

8138: interorg_profit_acct := user_acct_id;
8139: end if;
8140:
8141: fnd_file.put_line(fnd_file.log, 'Cr InterOrg Profit with ' || nvl(interorg_profit,0) || ' ' || pri_curr);
8142: CSTPACDP.insert_account
8143: (org_id, trans_id, item_id, -1 * interorg_profit,
8144: p_qty, interorg_profit_acct, sob_id,
8145: G_INTERORG_PROFIT_ACCT, NULL, NULL,
8146: txn_date, txn_src_id, src_type_id,

Line 8198: CSTPACDP.distribute_accounts(

8194: /*----------------------------------------------------------------------+
8195: | Cr Inv. Val @ sending org cost
8196: +----------------------------------------------------------------------*/
8197: fnd_file.put_line(fnd_file.log, 'Cr Inv Val @ sending org cost');
8198: CSTPACDP.distribute_accounts(
8199: org_id, trans_id,
8200: 0, cg_id , txn_act_id,
8201: item_id, p_qty, 1,
8202: 1, 0, NULL, mat_acct, mat_ovhd_acct,

Line 8220: CSTPACDP.distribute_accounts(

8216: /*----------------------------------------------------------------------+
8217: | Dr Intransit Acct @ org cost
8218: +----------------------------------------------------------------------*/
8219: fnd_file.put_line(fnd_file.log, 'Dr Intransit Acct @ org cost');
8220: CSTPACDP.distribute_accounts(
8221: org_id, trans_id, 0, cg_id , txn_act_id,
8222: item_id, -1 * p_qty, 14, 0, 0,
8223: io_inv_acct, NULL, NULL, NULL, NULL,NULL,
8224: sob_id, txn_date, txn_src_id, src_type_id,

Line 8254: CSTPACDP.insert_account

8250: mat_acct := user_acct_id;
8251: end if;
8252:
8253: fnd_file.put_line(fnd_file.log, 'Cr Inv Val');
8254: CSTPACDP.insert_account
8255: (org_id, trans_id, item_id, 0,
8256: p_qty, mat_acct, sob_id, 1, NULL, NULL,
8257: txn_date, txn_src_id, src_type_id,
8258: pri_curr, NULL, NULL, NULL, NULL,1,

Line 8284: CSTPACDP.insert_account

8280: io_inv_acct := user_acct_id;
8281: end if;
8282:
8283: fnd_file.put_line(fnd_file.log, 'Dr Intransit Acct');
8284: CSTPACDP.insert_account
8285: (org_id, trans_id, item_id, 0,
8286: -1 * p_qty, io_inv_acct, sob_id, 14, NULL, NULL,
8287: txn_date, txn_src_id, src_type_id,
8288: pri_curr, NULL, NULL, NULL, NULL,1,

Line 8314: CSTPACDP.distribute_accounts(

8310: /*----------------------------------------------------------------------+
8311: | Cr Exp Acct
8312: +----------------------------------------------------------------------*/
8313: fnd_file.put_line(fnd_file.log, 'Cr Exp Acct');
8314: CSTPACDP.distribute_accounts(
8315: org_id, trans_id, 0, cg_id , txn_act_id,
8316: item_id, p_qty, 2, 0, 0,
8317: exp_acct, NULL, NULL, NULL, NULL, NULL,
8318: sob_id, txn_date, txn_src_id, src_type_id,

Line 8332: CSTPACDP.distribute_accounts(

8328: /*----------------------------------------------------------------------+
8329: | Dr Intransit Acct @ org cost
8330: +----------------------------------------------------------------------*/
8331: fnd_file.put_line(fnd_file.log, 'Dr Intransit Acct @ org cost');
8332: CSTPACDP.distribute_accounts(
8333: org_id, trans_id,
8334: 0, cg_id , txn_act_id,
8335: item_id, -1 * p_qty, 14,
8336: 0, 0, io_inv_acct, NULL, NULL, NULL, NULL,NULL,

Line 8414: CSTPACDP.insert_account

8410: io_pay_acct := user_acct_id;
8411: end if;
8412:
8413: fnd_file.put_line(fnd_file.log, 'Cr Payables with ' || payamt || ' ' || pri_curr);
8414: CSTPACDP.insert_account
8415: (org_id, trans_id, item_id, -1 * payamt,
8416: -1 * p_qty, io_pay_acct, sob_id, 9, NULL, NULL,
8417: txn_date, txn_src_id, src_type_id,
8418: pri_curr, l_snd_curr, l_conv_date, l_conv_rate, l_curr_type, 1, /* INVCONV ANTHIYAG Bug#5352186 09-Sep-2006 */

Line 8454: CSTPACDP.insert_account

8450: /*----------------------------------------------------------------------+
8451: | Dr Exp Acct
8452: +----------------------------------------------------------------------*/
8453: fnd_file.put_line(fnd_file.log, 'Dr Exp Acct');
8454: CSTPACDP.insert_account
8455: (org_id, trans_id, item_id, interorg_xfr_price * p_qty,
8456: p_qty, exp_acct, sob_id, 2, NULL, NULL,
8457: txn_date, txn_src_id, src_type_id,
8458: pri_curr, l_snd_curr, l_conv_date, l_conv_rate, l_curr_type, 1, /* umoogala Bug#5708387 13-dec-2006 */

Line 8479: CSTPACDP.distribute_accounts(

8475: /*----------------------------------------------------------------------+
8476: | Dr Inv. Val @ org cost
8477: +----------------------------------------------------------------------*/
8478: fnd_file.put_line(fnd_file.log, 'Dr Inv Val @ org cost');
8479: CSTPACDP.distribute_accounts(
8480: org_id, trans_id,
8481: 0, cg_id , txn_act_id,
8482: item_id, p_qty, 1,
8483: 1, 0, NULL, mat_acct, mat_ovhd_acct,

Line 8507: CSTPACDP.ovhd_accounts(org_id, trans_id, item_id,

8503: /*----------------------------------------------------------------------+
8504: | Booking Overhead Acct
8505: +----------------------------------------------------------------------*/
8506: fnd_file.put_line(fnd_file.log, 'Booking Overhead Acct');
8507: CSTPACDP.ovhd_accounts(org_id, trans_id, item_id,
8508: -1 * p_qty, sob_id,
8509: txn_date, txn_src_id, src_type_id, subinv,
8510: snd_rcv, pri_curr,
8511: l_snd_curr, l_conv_date, l_conv_rate, l_curr_type, /* umoogala Bug#5708387 13-dec-2006 */

Line 8554: CSTPACDP.insert_account

8550: io_ppv_acct := user_acct_id;
8551: end if;
8552:
8553: fnd_file.put_line(fnd_file.log, 'Dr PPV with ' || ppv_amt || ' ' || pri_curr);
8554: CSTPACDP.insert_account
8555: (org_id, trans_id, item_id, ppv_amt,
8556: p_qty, io_ppv_acct, sob_id, 6, NULL, NULL,
8557: txn_date, txn_src_id, src_type_id,
8558: pri_curr, l_snd_curr, l_conv_date, l_conv_rate, l_curr_type, 1, /* umoogala Bug#5708387 13-dec-2006 */

Line 8622: CSTPACDP.distribute_accounts(

8618: exp_acct := user_acct_id;
8619: end if;
8620:
8621: fnd_file.put_line(fnd_file.log, 'Dr Exp Acct');
8622: CSTPACDP.distribute_accounts(
8623: org_id, trans_id,
8624: 0, cg_id , txn_act_id,
8625: item_id, p_qty, 2,
8626: 0, 0, exp_acct, NULL, NULL,

Line 8650: CSTPACDP.distribute_accounts(

8646: /*----------------------------------------------------------------------+
8647: | Dr Inv. Val @ org cost
8648: +----------------------------------------------------------------------*/
8649: fnd_file.put_line(fnd_file.log, 'Dr Inv Val @ org cost');
8650: CSTPACDP.distribute_accounts(
8651: org_id, trans_id,
8652: 0, cg_id , txn_act_id,
8653: item_id, p_qty, 1,
8654: 1, 0, NULL, mat_acct, mat_ovhd_acct,

Line 8691: CSTPACDP.distribute_accounts(

8687: /*----------------------------------------------------------------------+
8688: | Cr Intransit Acct @ org cost
8689: +----------------------------------------------------------------------*/
8690: fnd_file.put_line(fnd_file.log, 'Cr Intransit Acct @ org cost');
8691: CSTPACDP.distribute_accounts(
8692: org_id, trans_id,
8693: 0, cg_id , txn_act_id,
8694: item_id, -1 * p_qty, 14,
8695: 0, 0, io_inv_acct, NULL, NULL, NULL, NULL,NULL,

Line 8738: CSTPACDP.insert_account

8734: io_pay_acct := user_acct_id;
8735: end if;
8736:
8737: fnd_file.put_line(fnd_file.log, 'Cr Payables with ' || payamt || ' ' || pri_curr);
8738: CSTPACDP.insert_account
8739: (org_id, trans_id, item_id, payamt,
8740: -1 * p_qty, io_pay_acct, sob_id, 9, NULL, NULL,
8741: txn_date, txn_src_id, src_type_id,
8742: pri_curr, l_snd_curr,l_conv_date, l_conv_rate, l_curr_type, 1, /* INVCONV ANTHIYAG Bug#5352186 09-Sep-2006 End */

Line 8765: CSTPACDP.distribute_accounts(

8761: /*----------------------------------------------------------------------+
8762: | Dr Inv. Val @ org cost
8763: +----------------------------------------------------------------------*/
8764: fnd_file.put_line(fnd_file.log, 'Dr Inv Val @ org cost');
8765: CSTPACDP.distribute_accounts(
8766: org_id, trans_id,
8767: 0, cg_id , txn_act_id,
8768: item_id, p_qty, 1,
8769: 1, 0, NULL, mat_acct, mat_ovhd_acct,

Line 8790: CSTPACDP.ovhd_accounts(org_id, trans_id, item_id,

8786: IF (txn_act_id <> 17) AND -- Bug 5349860
8787: (exp_flg = 0) AND (exp_sub = 0) AND (l_earn_moh <> 0)
8788: THEN
8789: fnd_file.put_line(fnd_file.log, 'Booking Overhead Acct');
8790: CSTPACDP.ovhd_accounts(org_id, trans_id, item_id,
8791: -1 * p_qty, sob_id,
8792: txn_date, txn_src_id, src_type_id, subinv,
8793: snd_rcv, pri_curr,
8794: l_snd_curr, l_conv_date, l_conv_rate, l_curr_type, /* umoogala Bug#5708387 13-dec-2006 */

Line 8836: CSTPACDP.insert_account

8832: io_ppv_acct := user_acct_id;
8833: end if;
8834:
8835: fnd_file.put_line(fnd_file.log, 'Dr PPV with ' || ppv_amt || ' ' || pri_curr);
8836: CSTPACDP.insert_account
8837: (org_id, trans_id, item_id, ppv_amt,
8838: p_qty, io_ppv_acct, sob_id, 6, NULL, NULL,
8839: txn_date, txn_src_id, src_type_id,
8840: pri_curr, l_snd_curr, l_conv_date, l_conv_rate, l_curr_type, 1, /* umoogala Bug#5708387 13-dec-2006 */

Line 8873: CSTPACDP.insert_account

8869: exp_acct := user_acct_id;
8870: end if;
8871:
8872: fnd_file.put_line(fnd_file.log, 'Dr Exp Acct');
8873: CSTPACDP.insert_account
8874: (org_id, trans_id, item_id, -1 * payamt,
8875: p_qty, exp_acct, sob_id, 2, NULL, NULL,
8876: txn_date, txn_src_id, src_type_id,
8877: pri_curr, l_snd_curr, l_conv_date, l_conv_rate, l_curr_type, 1, /* umoogala Bug#5708387 13-dec-2006 */

Line 8965: CSTPACDP.distribute_accounts(

8961: io_inv_acct := user_acct_id;
8962: end if;
8963:
8964: fnd_file.put_line(fnd_file.log, 'Cr Intransit Acct @ org cost');
8965: CSTPACDP.distribute_accounts(
8966: org_id, trans_id,
8967: 0, cg_id , txn_act_id,
8968: item_id, -1 * p_qty, 14,
8969: 0, 0, io_inv_acct, NULL, NULL, NULL, NULL,NULL,

Line 9001: CSTPACDP.insert_account

8997: trp_acct := user_acct_id;
8998: end if;
8999:
9000: fnd_file.put_line(fnd_file.log, 'Cr Freight Acct with ' || trp_cost || ' ' || pri_curr);
9001: CSTPACDP.insert_account
9002: (org_id, trans_id, item_id, -1 * trp_cost,
9003: p_qty, trp_acct, sob_id, 12, NULL, NULL,
9004: txn_date, txn_src_id, src_type_id,
9005: pri_curr, NULL, NULL, NULL, NULL,1,

Line 9035: CSTPACDP.insert_account

9031: end if;
9032:
9033:
9034: fnd_file.put_line(fnd_file.log, 'Dr Receivalbes with ' || (interorg_xfr_price * p_qty) || ' ' || pri_curr);
9035: CSTPACDP.insert_account
9036: (org_id, trans_id, item_id, interorg_xfr_price * p_qty,
9037: p_qty, io_rec_acct, sob_id, 10, NULL, NULL,
9038: txn_date, txn_src_id, src_type_id,
9039: pri_curr, NULL, NULL, NULL, NULL,1,

Line 9091: CSTPACDP.insert_account

9087: interorg_profit_acct := user_acct_id;
9088: end if;
9089:
9090: fnd_file.put_line(fnd_file.log, 'Dr InterOrg Profit with ' || nvl(interorg_profit,0) || ' ' || pri_curr);
9091: CSTPACDP.insert_account
9092: (org_id, trans_id, item_id, -1 * interorg_profit, /* ANTHIYAG Bug#5459157 11-Aug-2006 */
9093: p_qty, interorg_profit_acct, sob_id,
9094: G_INTERORG_PROFIT_ACCT, NULL, NULL,
9095: txn_date, txn_src_id, src_type_id,

Line 9159: CSTPACDP.insert_account

9155: io_pay_acct := user_acct_id;
9156: end if;
9157:
9158: fnd_file.put_line(fnd_file.log, 'Cr Payables with ' || payamt || ' ' || pri_curr);
9159: CSTPACDP.insert_account
9160: (org_id, trans_id, item_id, payamt,
9161: -1 * p_qty, io_pay_acct, sob_id, 9, NULL, NULL,
9162: txn_date, txn_src_id, src_type_id,
9163: pri_curr, l_snd_curr,l_conv_date, l_conv_rate, l_curr_type, 1, /* INVCONV ANTHIYAG Bug#5352186 09-Sep-2006 End */

Line 9193: CSTPACDP.insert_account

9189: trp_acct := user_acct_id;
9190: end if;
9191:
9192: fnd_file.put_line(fnd_file.log, 'Cr Freight Acct with ' || trp_cost || ' ' || pri_curr);
9193: CSTPACDP.insert_account
9194: (org_id, trans_id, item_id, -1 * trp_cost,
9195: p_qty, trp_acct, sob_id, 12, NULL, NULL,
9196: txn_date, txn_src_id, src_type_id,
9197: pri_curr, l_snd_curr,l_conv_date, l_conv_rate, l_curr_type, 1, /* INVCONV ANTHIYAG Bug#5352186 09-Sep-2006 End */

Line 9229: CSTPACDP.insert_account

9225: acv_acct := user_acct_id;
9226: end if;
9227:
9228: fnd_file.put_line(fnd_file.log, 'Cr variance account with ' || var_amt || ' ' || pri_curr);
9229: CSTPACDP.insert_account
9230: (org_id, trans_id, item_id, var_amt,
9231: p_qty, acv_acct, sob_id, 13, NULL, NULL,
9232: txn_date, txn_src_id, src_type_id,
9233: pri_curr, l_snd_curr,l_conv_date, l_conv_rate, l_curr_type, 1, /* umoogala Bug#5708387 13-dec-2006 */

Line 9270: CSTPACDP.insert_account

9266: exp_acct := user_acct_id;
9267: end if;
9268:
9269: fnd_file.put_line(fnd_file.log, 'Dr Exp Acct');
9270: CSTPACDP.insert_account
9271: (org_id, trans_id, item_id, trp_cost,
9272: p_qty, exp_acct, sob_id, 2, NULL, NULL,
9273: txn_date, txn_src_id, src_type_id,
9274: pri_curr, l_snd_curr, l_conv_date, l_conv_rate, l_curr_type, 1, /* umoogala Bug#5708387 13-dec-2006 */

Line 9306: CSTPACDP.distribute_accounts(

9302: io_inv_acct := user_acct_id;
9303: end if;
9304:
9305: fnd_file.put_line(fnd_file.log, 'Dr Intransit Acct @ org cost');
9306: CSTPACDP.distribute_accounts(
9307: org_id, trans_id,
9308: 0, cg_id , txn_act_id,
9309: item_id, p_qty, 14,
9310: 0, 0, io_inv_acct, NULL, NULL, NULL, NULL,NULL,

Line 9338: CSTPACDP.ovhd_accounts(org_id, trans_id, item_id,

9334: /*----------------------------------------------------------------------+
9335: | Booking Overhead Acct
9336: +----------------------------------------------------------------------*/
9337: fnd_file.put_line(fnd_file.log, '-- Booking Overhead Acct');
9338: CSTPACDP.ovhd_accounts(org_id, trans_id, item_id,
9339: -1 * p_qty, sob_id,
9340: txn_date, txn_src_id, src_type_id, subinv,
9341: snd_rcv, pri_curr,
9342: l_snd_curr, l_conv_date, l_conv_rate, l_curr_type, /* umoogala Bug#5708387 13-dec-2006 */

Line 9385: CSTPACDP.insert_account

9381: io_ppv_acct := user_acct_id;
9382: end if;
9383:
9384: fnd_file.put_line(fnd_file.log, 'Dr PPV with ' || ppv_amt || ' ' || pri_curr);
9385: CSTPACDP.insert_account
9386: (org_id, trans_id, item_id, ppv_amt,
9387: p_qty, io_ppv_acct, sob_id, 6, NULL, NULL,
9388: txn_date, txn_src_id, src_type_id,
9389: pri_curr, l_snd_curr, l_conv_date, l_conv_rate, l_curr_type, 1, /* umoogala Bug#5708387 13-dec-2006 */

Line 9428: CSTPACDP.insert_account

9424: enc_acct := user_acct_id;
9425: end if;
9426:
9427: fnd_file.put_line(fnd_file.log, 'Cr Enc Acct with ' || enc_amt || ' ' || pri_curr);
9428: CSTPACDP.insert_account
9429: (org_id, trans_id, item_id, -1*enc_amt,
9430: p_qty, enc_acct, sob_id, 15, NULL, NULL,
9431: txn_date, txn_src_id, src_type_id,
9432: pri_curr, NULL, NULL, NULL, NULL,1,

Line 9486: CSTPACDP.balance_account(org_id, trans_id, O_Error_Num, O_Error_Code, O_Error_Message);

9482:
9483: l_stmt_num := 942;
9484:
9485: fnd_file.put_line(fnd_file.log, 'Balancing Accounts');
9486: CSTPACDP.balance_account(org_id, trans_id, O_Error_Num, O_Error_Code, O_Error_Message);
9487:
9488: if O_Error_Num <> 0
9489: then
9490: raise errexit;

Line 9649: O_Error_Message := 'CSTPACDP.cost_process_discrete_trx:' || '(' || l_stmt_num || '):' ||

9645: fnd_file.put_line(fnd_file.log,'in errexit exception');
9646: ROLLBACK;
9647:
9648: O_Error_Num := NVL(O_Error_Num, -1);
9649: O_Error_Message := 'CSTPACDP.cost_process_discrete_trx:' || '(' || l_stmt_num || '):' ||
9650: substr(O_Error_Message, 1, 180);
9651:
9652:
9653: UPDATE mtl_material_transactions

Line 9687: O_error_message := 'CSTPACDP.cost_process_discrete_trx:' || '(' || to_char(l_stmt_num) || '): '|| substr(SQLERRM,1,180);

9683: rollback;
9684:
9685: O_error_num := SQLCODE;
9686: O_error_code := SQLCODE;
9687: O_error_message := 'CSTPACDP.cost_process_discrete_trx:' || '(' || to_char(l_stmt_num) || '): '|| substr(SQLERRM,1,180);
9688:
9689: UPDATE mtl_material_transactions
9690: SET costed_flag = 'E',
9691: error_code = substrb(O_Error_Code,1,240),

Line 10129: O_error_message := 'CSTPACDP.balance_account_txn_type (' || to_char(l_stmt_num) ||

10125: WHEN OTHERS then
10126:
10127: ROLLBACK;
10128: O_error_num := SQLCODE;
10129: O_error_message := 'CSTPACDP.balance_account_txn_type (' || to_char(l_stmt_num) ||
10130: ') ' || substr(SQLERRM,1,180);
10131:
10132: END balance_account_txn_type;
10133:

Line 10137: END CSTPACDP;

10133:
10134:
10135:
10136:
10137: END CSTPACDP;
10138: