DBA Data[Home] [Help]

APPS.CSTPAVCP dependencies on FND_FILE

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 157: fnd_file.put_line(fnd_file.log,'>>Inter Org Transaction');

153:
154: l_stmt_num := 10;
155:
156: if (g_debug = 'Y') then
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,

Line 158: fnd_file.put_line(fnd_file.log,'>>Calling CSTPACVP.interorg');

154: l_stmt_num := 10;
155:
156: if (g_debug = 'Y') then
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,

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

190: raise process_error;
191: end if;
192:
193: if (g_debug = 'Y') then
194: fnd_file.put_line(fnd_file.log,'< 195: end if;
196:
197: -- Some transactions do not need to be cost processed and only need cost
198: -- distribution!

Line 237: fnd_file.put_line(fnd_file.log,'>>Common Issue to WIP');

233: l_txn_action_id := 2;
234: l_stmt_num := 20;
235:
236: if (g_debug = 'Y') then
237: fnd_file.put_line(fnd_file.log,'>>Common Issue to WIP');
238: end if;
239:
240: /* Added Bug#4259926 modified the code to change the layer id. */
241: if (i_txn_action_id = 27 and i_txn_src_type = 5 and i_citw_flag = 1 ) then

Line 315: fnd_file.put_line(fnd_file.log,'>>Average Cost update');

311: -- is no hook available for this transaction.
312: l_stmt_num := 40;
313:
314: if (g_debug = 'Y') then
315: fnd_file.put_line(fnd_file.log,'>>Average Cost update');
316: end if;
317:
318: average_cost_update(i_org_id,
319: i_txn_id,

Line 346: fnd_file.put_line(fnd_file.log,'Actual Cost Hook invoked: CSTPACHK.actual_cost_hook');

342: elsif (i_exp_item = 0) then
343: -- Call the Actual Cost Hook for asset items
344: l_stmt_num := 50;
345: if (g_debug = 'Y') then
346: fnd_file.put_line(fnd_file.log,'Actual Cost Hook invoked: CSTPACHK.actual_cost_hook');
347: end if;
348: l_hook := CSTPACHK.actual_cost_hook(i_org_id,
349: i_txn_id,
350: i_layer_id,

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 382: fnd_file.put_line(fnd_file.log,'l_hook: '||to_char(l_hook));

378: raise process_error;
379: end if;
380: end if;
381: if (g_debug = 'Y') then
382: fnd_file.put_line(fnd_file.log,'l_hook: '||to_char(l_hook));
383: end if;
384: if (l_hook = 0) then
385: -- borrow /payback
386: -- if hook is not used and it is a payback transaction, we need to populate MCTCD

Line 390: fnd_file.put_line(fnd_file.log,'Actual Cost Hook not used');

386: -- if hook is not used and it is a payback transaction, we need to populate MCTCD
387: -- with the borrowed cost.
388: l_stmt_num := 60;
389: if (g_debug = 'Y') then
390: fnd_file.put_line(fnd_file.log,'Actual Cost Hook not used');
391: end if;
392:
393: /* Changes for VMI. Adding Planning Transfer Transaction */
394: if i_txn_action_id IN (2,5,28,55) then

Line 406: fnd_file.put_line(fnd_file.log,'Borrow Payback');

402: -- if payback txn and txn involved different projects then populate MCTCD
403: -- with the borrowed cost
404: l_stmt_num := 80;
405: if (g_debug = 'Y') then
406: fnd_file.put_line(fnd_file.log,'Borrow Payback');
407: end if;
408: borrow_cost(i_org_id,
409: i_txn_id,
410: i_user_id,

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

589: end if;
590:
591: l_stmt_num := 100;
592: IF g_debug = 'Y' THEN
593: fnd_file.put_line(fnd_file.log, '>>Calling CSTPAVCP.compute_actual_cost');
594: END IF;
595: l_new_cost := CSTPAVCP.compute_actual_cost(
596: i_org_id,
597: i_txn_id,

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

619: raise process_error;
620: end if;
621:
622: IF g_debug = 'Y' THEN
623: fnd_file.put_line(fnd_file.log, '< 624: END IF;
625:
626: else
627: -- user populated actual cost.

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

638: (i_txn_action_id = 12 and i_org_id = i_txn_org_id and i_fob_point = 1))
639: then
640: l_stmt_num := 110;
641: IF g_debug = 'Y' THEN
642: fnd_file.put_line(fnd_file.log, '>>Calling from CSTPAVCP.sub_transfer');
643: END IF;
644: CSTPAVCP.sub_transfer(
645: i_org_id,
646: i_txn_id,

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

666: if (l_err_num <> 0) then
667: raise process_error;
668: end if;
669: IF g_debug = 'Y' THEN
670: fnd_file.put_line(fnd_file.log, '< 671: END IF;
672:
673: -- If this transaction is using a new cost and it is not an
674: -- expense item than we need to recalculate

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

687: end if;
688:
689: l_stmt_num := 130;
690: IF g_debug = 'Y' THEN
691: fnd_file.put_line(fnd_file.log, '>>Calling CSTPAVCP.calc_average_cost');
692: END IF;
693: CSTPAVCP.calc_average_cost(
694: i_org_id,
695: i_txn_id,

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

711: -- Error occured
712: raise process_error;
713: end if;
714: IF g_debug = 'Y' THEN
715: fnd_file.put_line(fnd_file.log, '< 716: END IF;
717: else
718: -- when we process transfer org's txn(i.e. intransit txfr),
719: -- we need to use txfr_layer_id instead.

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

727: end if;
728:
729: l_stmt_num := 140;
730: IF g_debug = 'Y' THEN
731: fnd_file.put_line(fnd_file.log, '>>Calling CSTPAVCP.current_average_cost');
732: END IF;
733: CSTPAVCP.current_average_cost(
734: l_org_id,
735: i_txn_id,

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

753: -- Error occured
754: raise process_error;
755: end if;
756: IF g_debug = 'Y' THEN
757: fnd_file.put_line(fnd_file.log, '< 758: END IF;
759: -- For Internal Order Issue transactons to Expense destinations,
760: -- call Cost_LogicalSOReceipt API to cost the Receipt transaction.
761: l_stmt_num := 150;

Line 787: fnd_file.put_line(fnd_file.log,'>>Exiting Cost Processor');

783: END IF;
784: END IF;
785: end if;
786: if (g_debug = 'Y') then
787: fnd_file.put_line(fnd_file.log,'>>Exiting Cost Processor');
788: end if;
789:
790: EXCEPTION
791: when process_error then

Line 850: fnd_file.put_line(fnd_file.log,'Average Cost Update <<<');

846: l_err_code := '';
847: l_err_msg := '';
848:
849: if (g_debug = 'Y') then
850: fnd_file.put_line(fnd_file.log,'Average Cost Update <<<');
851: end if;
852:
853: l_stmt_num := 10;
854: -- First insert records into mtl_cst_actual_cost_details.

Line 1318: fnd_file.put_line(fnd_file.log,'Average Cost Update >>>');

1314: -- Error occured
1315: raise process_error;
1316: end if;
1317: if (g_debug = 'Y') then
1318: fnd_file.put_line(fnd_file.log,'Average Cost Update >>>');
1319: end if;
1320:
1321: EXCEPTION
1322: when neg_cost_error then

Line 1400: fnd_file.put_line(fnd_file.log, 'Sub_Transfer <<<');

1396: l_new_cost := i_new_cost;
1397: l_stmt_num := 0;
1398:
1399: IF g_debug = 'Y' THEN
1400: fnd_file.put_line(fnd_file.log, 'Sub_Transfer <<<');
1401: END IF;
1402:
1403: /********************************************************************
1404: ** Figure out layer_change flag **

Line 1425: fnd_file.put_line(fnd_file.log,'Layer change: ' || to_char(l_layer_chg));

1421: l_layer_chg := 0;
1422: end if;
1423:
1424: if (g_debug = 'Y') then
1425: fnd_file.put_line(fnd_file.log,'Layer change: ' || to_char(l_layer_chg));
1426: end if;
1427:
1428: l_stmt_num := 20;
1429: select decode(inventory_asset_flag, 'Y',0,1)

Line 1436: fnd_file.put_line(fnd_file.log,'Expense Item: ' || to_char(l_exp_item));

1432: where inventory_item_id = i_item_id
1433: and organization_id = i_org_id;
1434:
1435: if (g_debug = 'Y') then
1436: fnd_file.put_line(fnd_file.log,'Expense Item: ' || to_char(l_exp_item));
1437: end if;
1438:
1439: l_stmt_num := 30;
1440:

Line 1471: fnd_file.put_line(fnd_file.log,'Common Issue to WIP');

1467:
1468: if (i_citw_flag = 1) then
1469: l_stmt_num := 42;
1470: if (g_debug = 'Y') then
1471: fnd_file.put_line(fnd_file.log,'Common Issue to WIP');
1472: end if;
1473:
1474: if(i_flow_schedule = 1) then
1475: -- cfm then use wip_flow_schedules

Line 1479: fnd_file.put_line(fnd_file.log,'Flow Schedule');

1475: -- cfm then use wip_flow_schedules
1476: -- class_type 1 and 3 : asset job, 4 : exp job
1477: l_stmt_num := 44;
1478: if (g_debug = 'Y') then
1479: fnd_file.put_line(fnd_file.log,'Flow Schedule');
1480: end if;
1481:
1482: select decode(wac.class_type, 1, 0,
1483: 3, 0,

Line 1518: fnd_file.put_line(fnd_file.log,'Transfer Subinventory asset flag : ' || to_char(l_exp2));

1514: /* Changes for VMI. Adding Planning Transfer Transaction */
1515: elsif (i_txn_action_id IN (2,5,28)) then
1516: l_stmt_num := 46;
1517: if (g_debug = 'Y') then
1518: fnd_file.put_line(fnd_file.log,'Transfer Subinventory asset flag : ' || to_char(l_exp2));
1519: end if;
1520:
1521: select decode(asset_inventory,1,0,1)
1522: into l_exp2

Line 1533: fnd_file.put_line(fnd_file.log,'Transfer Subinventory asset flag : '||to_char(l_exp2));

1529: elsif(i_txn_action_id = 55 ) then
1530: l_stmt_num := 47;
1531: l_exp2 := l_exp1; /* Txfr sub asset flag is equal to from sub asset flag in cost grp txfrs */
1532: if (g_debug = 'Y') then
1533: fnd_file.put_line(fnd_file.log,'Transfer Subinventory asset flag : '||to_char(l_exp2));
1534: end if;
1535: else
1536: l_stmt_num := 48;
1537: l_exp2 := 0;

Line 1558: fnd_file.put_line(fnd_file.log,'From layer ID :' || to_char(l_from_layer));

1554: l_from_qty :=-1 * i_txn_qty;
1555: end if;
1556:
1557: if (g_debug = 'Y') then
1558: fnd_file.put_line(fnd_file.log,'From layer ID :' || to_char(l_from_layer));
1559: fnd_file.put_line(fnd_file.log,'To Layer ID : ' || to_char(l_to_layer));
1560: fnd_file.put_line(fnd_file.log,'From subinv Asset flag : ' || to_char(l_exp1));
1561: fnd_file.put_line(fnd_file.log,'To subinv Asset flag : ' || to_char(l_exp2));
1562: end if;

Line 1559: fnd_file.put_line(fnd_file.log,'To Layer ID : ' || to_char(l_to_layer));

1555: end if;
1556:
1557: if (g_debug = 'Y') then
1558: fnd_file.put_line(fnd_file.log,'From layer ID :' || to_char(l_from_layer));
1559: fnd_file.put_line(fnd_file.log,'To Layer ID : ' || to_char(l_to_layer));
1560: fnd_file.put_line(fnd_file.log,'From subinv Asset flag : ' || to_char(l_exp1));
1561: fnd_file.put_line(fnd_file.log,'To subinv Asset flag : ' || to_char(l_exp2));
1562: end if;
1563: -- Just in case i_txfr_layer_id is NULL, always set from and to layer

Line 1560: fnd_file.put_line(fnd_file.log,'From subinv Asset flag : ' || to_char(l_exp1));

1556:
1557: if (g_debug = 'Y') then
1558: fnd_file.put_line(fnd_file.log,'From layer ID :' || to_char(l_from_layer));
1559: fnd_file.put_line(fnd_file.log,'To Layer ID : ' || to_char(l_to_layer));
1560: fnd_file.put_line(fnd_file.log,'From subinv Asset flag : ' || to_char(l_exp1));
1561: fnd_file.put_line(fnd_file.log,'To subinv Asset flag : ' || to_char(l_exp2));
1562: end if;
1563: -- Just in case i_txfr_layer_id is NULL, always set from and to layer
1564: -- to layer_id for same layer transfers.

Line 1561: fnd_file.put_line(fnd_file.log,'To subinv Asset flag : ' || to_char(l_exp2));

1557: if (g_debug = 'Y') then
1558: fnd_file.put_line(fnd_file.log,'From layer ID :' || to_char(l_from_layer));
1559: fnd_file.put_line(fnd_file.log,'To Layer ID : ' || to_char(l_to_layer));
1560: fnd_file.put_line(fnd_file.log,'From subinv Asset flag : ' || to_char(l_exp1));
1561: fnd_file.put_line(fnd_file.log,'To subinv Asset flag : ' || to_char(l_exp2));
1562: end if;
1563: -- Just in case i_txfr_layer_id is NULL, always set from and to layer
1564: -- to layer_id for same layer transfers.
1565: l_stmt_num := 70;

Line 1570: fnd_file.put_line(fnd_file.log,'No Layer change');

1566: if (l_layer_chg = 0) then
1567: l_from_layer := i_layer_id;
1568: l_to_layer := i_layer_id;
1569: if (g_debug = 'Y') then
1570: fnd_file.put_line(fnd_file.log,'No Layer change');
1571: fnd_file.put_line(fnd_file.log,'From Layer : ' || to_char(l_from_layer));
1572: fnd_file.put_line(fnd_file.log,'To Layer : ' || to_char(l_to_layer));
1573: end if;
1574: end if;

Line 1571: fnd_file.put_line(fnd_file.log,'From Layer : ' || to_char(l_from_layer));

1567: l_from_layer := i_layer_id;
1568: l_to_layer := i_layer_id;
1569: if (g_debug = 'Y') then
1570: fnd_file.put_line(fnd_file.log,'No Layer change');
1571: fnd_file.put_line(fnd_file.log,'From Layer : ' || to_char(l_from_layer));
1572: fnd_file.put_line(fnd_file.log,'To Layer : ' || to_char(l_to_layer));
1573: end if;
1574: end if;
1575:

Line 1572: fnd_file.put_line(fnd_file.log,'To Layer : ' || to_char(l_to_layer));

1568: l_to_layer := i_layer_id;
1569: if (g_debug = 'Y') then
1570: fnd_file.put_line(fnd_file.log,'No Layer change');
1571: fnd_file.put_line(fnd_file.log,'From Layer : ' || to_char(l_from_layer));
1572: fnd_file.put_line(fnd_file.log,'To Layer : ' || to_char(l_to_layer));
1573: end if;
1574: end if;
1575:
1576: -- If we are changing layers, then need to create another layer information

Line 1582: fnd_file.put_line(fnd_file.log,'Layer change');

1578: l_stmt_num := 80;
1579:
1580: if (l_layer_chg = 1) then
1581: if (g_debug = 'Y') then
1582: fnd_file.put_line(fnd_file.log,'Layer change');
1583: end if;
1584:
1585: insert into mtl_cst_actual_cost_details(
1586: transaction_id,

Line 2061: fnd_file.put_line(fnd_file.log,'Update mmt for receiving side');

2057: IF i_txn_action_id IN (2,5,28,55)
2058: THEN
2059: IF g_debug = 'Y'
2060: THEN
2061: fnd_file.put_line(fnd_file.log,'Update mmt for receiving side');
2062: END IF;
2063:
2064: l_stmt_num := 190;
2065: SELECT transfer_transaction_id

Line 2105: fnd_file.put_line(fnd_file.log, 'Sub_Transfer >>>');

2101: WHERE MMT.transaction_id = l_txf_txn_id
2102: AND MMT.primary_quantity > 0;
2103: END IF;
2104: IF g_debug = 'Y' THEN
2105: fnd_file.put_line(fnd_file.log, 'Sub_Transfer >>>');
2106: END IF;
2107:
2108: EXCEPTION
2109: when process_error then

Line 2174: fnd_file.put_line(fnd_file.log, 'Common_Issue_To_WIP <<<');

2170:
2171: l_txn_qty := i_txn_qty;
2172:
2173: IF g_debug = 'Y' THEN
2174: fnd_file.put_line(fnd_file.log, 'Common_Issue_To_WIP <<<');
2175: END IF;
2176:
2177: -- No user entered new cost is allowed for common issue to wip
2178: l_new_cost := 0;

Line 2488: fnd_file.put_line(fnd_file.log, 'Common_Issue_To_WIP >>>');

2484: if (l_err_num <> 0) then
2485: raise process_error;
2486: end if;
2487: IF g_debug = 'Y' THEN
2488: fnd_file.put_line(fnd_file.log, 'Common_Issue_To_WIP >>>');
2489: END IF;
2490:
2491: EXCEPTION
2492: when process_error then

Line 2577: fnd_file.put_line(fnd_file.log, '>>>Inside Compute_Actual_Cost');

2573:
2574: l_zero_cost_flag := -1;
2575:
2576: IF g_debug = 'Y' THEN
2577: fnd_file.put_line(fnd_file.log, '>>>Inside Compute_Actual_Cost');
2578: END IF;
2579: l_stmt_num := 10;
2580:
2581: --

Line 2593: fnd_file.put_line(fnd_file.log,'>>>MCTCD: '||to_char(l_txn_cost_exist)||' i_txn_id: '||to_char(i_txn_id)||' i_org_id:'||to_char(i_org_id));

2589: and organization_id = i_org_id
2590: /* and transaction_cost >= 0 */; -- modified for bug#3835412
2591:
2592: if (g_debug = 'Y') then
2593: fnd_file.put_line(fnd_file.log,'>>>MCTCD: '||to_char(l_txn_cost_exist)||' i_txn_id: '||to_char(i_txn_id)||' i_org_id:'||to_char(i_org_id));
2594: end if;
2595:
2596: if (l_txn_cost_exist > 0) then
2597:

Line 2601: fnd_file.put_line(fnd_file.log,'>>>Insert into MCACD using MCTCD values');

2597:
2598: l_ret_val := 1;
2599: l_stmt_num := 20;
2600: if (g_debug = 'Y') then
2601: fnd_file.put_line(fnd_file.log,'>>>Insert into MCACD using MCTCD values');
2602: end if;
2603:
2604: --
2605: -- Make sure the mcacd should not have any -ve cost

Line 2664: fnd_file.put_line(fnd_file.log,'>>>MCACD: '||to_char(l_count)||' i_txn_id: '||to_char(i_txn_id)||' i_org_id:'||to_char(i_org_id));

2660: select count(*) into l_count
2661: from mtl_cst_actual_cost_details
2662: where transaction_id = i_txn_id
2663: and organization_id = i_org_id;
2664: fnd_file.put_line(fnd_file.log,'>>>MCACD: '||to_char(l_count)||' i_txn_id: '||to_char(i_txn_id)||' i_org_id:'||to_char(i_org_id));
2665: end if;
2666:
2667: else
2668: /* no transaction cost details. copy actual cost from current avg. *

Line 2680: fnd_file.put_line(fnd_file.log,'>>>No Txn details in MCTCD');

2676: ** same. If detail rows do not exist in CST_LAYER_COST_DETAILS, **
2677: ** we will insert a TL material 0 cost layer. **
2678: ********************************************************************/
2679: if (g_debug = 'Y') then
2680: fnd_file.put_line(fnd_file.log,'>>>No Txn details in MCTCD');
2681: end if;
2682:
2683: l_stmt_num := 30;
2684:

Line 2704: FND_FILE.put_line(FND_FILE.log, l_msg_data);

2700: x_zero_cost_flag => l_zero_cost_flag
2701: );
2702:
2703: if (l_return_status <> fnd_api.g_ret_sts_success) then
2704: FND_FILE.put_line(FND_FILE.log, l_msg_data);
2705: l_api_message := 'get_zeroCostIssue_flag returned unexpected error';
2706: FND_MESSAGE.set_name('BOM','CST_API_MESSAGE');
2707: FND_MESSAGE.set_token('TEXT', l_api_message);
2708: FND_MSG_pub.add;

Line 2713: FND_FILE.PUT_LINE(FND_FILE.LOG,'>>>Zero Cost Issue Flag:'|| to_char(l_zero_cost_flag));

2709: raise fnd_api.g_exc_unexpected_error;
2710: end if;
2711:
2712: if (g_debug = 'Y') then
2713: FND_FILE.PUT_LINE(FND_FILE.LOG,'>>>Zero Cost Issue Flag:'|| to_char(l_zero_cost_flag));
2714: end if;
2715:
2716: l_stmt_num := 40;
2717: insert into mtl_cst_actual_cost_details(

Line 2768: fnd_file.put_line(fnd_file.log,'>>>No cost values, Inserting zero cost in MCACD');

2764: where layer_id = i_layer_id;
2765: else
2766: l_stmt_num := 50;
2767: if (g_debug = 'Y') then
2768: fnd_file.put_line(fnd_file.log,'>>>No cost values, Inserting zero cost in MCACD');
2769: end if;
2770:
2771: insert into mtl_cst_actual_cost_details(
2772: transaction_id,

Line 2869: fnd_file.put_line(fnd_file.log, 'Compute_Actual_Cost >>>');

2865: l_ret_val := 1;
2866: end if;
2867:
2868: /* IF g_debug = 'Y' THEN
2869: fnd_file.put_line(fnd_file.log, 'Compute_Actual_Cost >>>');
2870: END IF;*/
2871: return l_ret_val;
2872:
2873: EXCEPTION

Line 2954: fnd_file.put_line(fnd_file.log, 'Apply_Material_Overhead <<<');

2950: from mtl_parameters
2951: where organization_id= I_ORG_ID;
2952:
2953: IF g_debug = 'Y' THEN
2954: fnd_file.put_line(fnd_file.log, 'Apply_Material_Overhead <<<');
2955: END IF;
2956: l_earn_moh := 1;
2957: l_return_status := fnd_api.g_ret_sts_success;
2958: l_msg_count := 0;

Line 2995: fnd_file.put_line(fnd_file.log, '---Material Overhead Absorption Overridden--');

2991:
2992: IF(l_earn_moh = 0) THEN
2993:
2994: IF g_debug = 'Y' THEN
2995: fnd_file.put_line(fnd_file.log, '---Material Overhead Absorption Overridden--');
2996: END IF;
2997:
2998: ELSE
2999:

Line 3428: fnd_file.put_line(fnd_file.log, 'Apply_Material_Overhead >>>');

3424: end if;
3425: END IF;
3426:
3427: IF g_debug = 'Y' THEN
3428: fnd_file.put_line(fnd_file.log, 'Apply_Material_Overhead >>>');
3429: END IF;
3430:
3431: EXCEPTION
3432: when avg_rates_no_ovhd then

Line 3498: fnd_file.put_line(fnd_file.log, '>>>Inside Calc_Average_Cost');

3494: l_err_msg := '';
3495:
3496:
3497: IF g_debug = 'Y' THEN
3498: fnd_file.put_line(fnd_file.log, '>>>Inside Calc_Average_Cost');
3499: END IF;
3500: /********************************************************************
3501: ** Update mtl_cst_actual_cost_details and update the prior cost **
3502: ** to the current average for the elements that exists and insert **

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

3719: l_txfr_txn_id := -1;
3720: end if;
3721:
3722: IF g_debug = 'Y' THEN
3723: fnd_file.put_line(fnd_file.log, '>>>Calling CSTPAVCP.update_mmt');
3724: END IF;
3725: CSTPAVCP.update_mmt(
3726: i_org_id,
3727: i_txn_id,

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

3739: if (l_err_num <> 0) then
3740: raise process_error;
3741: end if;
3742: IF g_debug = 'Y' THEN
3743: fnd_file.put_line(fnd_file.log, '<< 3744: END IF;
3745: end if;
3746:
3747: /********************************************************************

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

3820: /********************************************************************
3821: ** Update Item Cost and Item Cost Details **
3822: ********************************************************************/
3823: IF g_debug = 'Y' THEN
3824: fnd_file.put_line(fnd_file.log, '>>>Calling CSTPAVCP.update_item_cost');
3825: END IF;
3826: CSTPAVCP.update_item_cost(
3827: i_org_id,
3828: i_txn_id,

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

3842: raise process_error;
3843: end if;
3844:
3845: IF g_debug = 'Y' THEN
3846: fnd_file.put_line(fnd_file.log, '<< 3847: END IF;
3848: EXCEPTION
3849: when process_error then
3850: o_err_num := l_err_num;

Line 3900: fnd_file.put_line(fnd_file.log, 'Current_Average_Cost <<<');

3896: l_err_msg := '';
3897:
3898:
3899: IF g_debug = 'Y' THEN
3900: fnd_file.put_line(fnd_file.log, 'Current_Average_Cost <<<');
3901: END IF;
3902: /********************************************************************
3903: ** Update Mtl_Material_Transactions to set actual cost, prior **
3904: ** cost, new cost and prior costed quantity. **

Line 3977: fnd_file.put_line(fnd_file.log, 'Current_Average_Cost >>>');

3973: raise process_error;
3974: end if;
3975:
3976: IF g_debug = 'Y' THEN
3977: fnd_file.put_line(fnd_file.log, 'Current_Average_Cost >>>');
3978: END IF;
3979:
3980: EXCEPTION
3981: when process_error then

Line 4037: fnd_file.put_line(fnd_file.log, '>>>>Inside Update_MMT');

4033: l_err_code := '';
4034: l_err_msg := '';
4035:
4036: IF g_debug = 'Y' THEN
4037: fnd_file.put_line(fnd_file.log, '>>>>Inside Update_MMT');
4038: END IF;
4039: -- for item cost history
4040:
4041: l_stmt_num := 5;

Line 4277: fnd_file.put_line(fnd_file.log, 'Update_MMT >>>');

4273: -- item cost history stuff for sub transfer
4274:
4275:
4276: /* IF g_debug = 'Y' THEN
4277: fnd_file.put_line(fnd_file.log, 'Update_MMT >>>');
4278: END IF;*/
4279: EXCEPTION
4280: when OTHERS then
4281: rollback;

Line 4347: fnd_file.put_line(fnd_file.log, '>>>>Inside Update_Item_Cost');

4343: from mtl_parameters
4344: where organization_id= I_ORG_ID;
4345:
4346: IF g_debug = 'Y' THEN
4347: fnd_file.put_line(fnd_file.log, '>>>>Inside Update_Item_Cost');
4348: END IF;
4349: l_stmt_num := 10;
4350:
4351: -- Bug 4905189, added the calculation for total_value

Line 4510: fnd_file.put_line(fnd_file.log, 'Update_Item_Cost >>>');

4506: and cicd.organization_id = i_org_id
4507: and cicd.cost_type_id = i_cost_type);
4508:
4509: /* IF g_debug = 'Y' THEN
4510: fnd_file.put_line(fnd_file.log, 'Update_Item_Cost >>>');
4511: END IF;
4512: */
4513: EXCEPTION
4514: when others then

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

4638: o_hook_used := 0;
4639: l_ave_to_ave := 0;
4640:
4641: IF g_debug = 'Y' THEN
4642: fnd_file.put_line(fnd_file.log, '>>>Inside CSTPAVCP.interorg Interorg');
4643: END IF;
4644: l_earn_moh := 1;
4645: l_return_status := fnd_api.g_ret_sts_success;
4646: l_msg_count := 0;

Line 4698: fnd_file.put_line(fnd_file.log, '>>>Transaction action:'||to_char(i_txn_action_id)||' From Org:'||to_char(l_from_org)||' To Org:'||to_char(l_to_org));

4694: from mtl_parameters
4695: where organization_id = l_to_org;
4696:
4697: IF g_debug = 'Y' THEN
4698: fnd_file.put_line(fnd_file.log, '>>>Transaction action:'||to_char(i_txn_action_id)||' From Org:'||to_char(l_from_org)||' To Org:'||to_char(l_to_org));
4699: fnd_file.put_line(fnd_file.log, '>>>Elemental Visibility: '||to_char(l_elemental_visible));
4700: END IF;
4701:
4702: l_stmt_num := 10;

Line 4699: fnd_file.put_line(fnd_file.log, '>>>Elemental Visibility: '||to_char(l_elemental_visible));

4695: where organization_id = l_to_org;
4696:
4697: IF g_debug = 'Y' THEN
4698: fnd_file.put_line(fnd_file.log, '>>>Transaction action:'||to_char(i_txn_action_id)||' From Org:'||to_char(l_from_org)||' To Org:'||to_char(l_to_org));
4699: fnd_file.put_line(fnd_file.log, '>>>Elemental Visibility: '||to_char(l_elemental_visible));
4700: END IF;
4701:
4702: l_stmt_num := 10;
4703:

Line 4740: fnd_file.put_line(fnd_file.log, '>>>Calling Get_Snd_Rcv_UOM');

4736: and msi.secondary_inventory_name = mmt.subinventory_code;
4737: end if;
4738:
4739: IF g_debug = 'Y' THEN
4740: fnd_file.put_line(fnd_file.log, '>>>Calling Get_Snd_Rcv_UOM');
4741: END IF;
4742:
4743: get_snd_rcv_uom(i_item_id, l_from_org, l_to_org, l_snd_uom, l_rcv_uom,
4744: l_err_num, l_err_code, l_err_msg);

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

4746: raise process_error;
4747: end if;
4748:
4749: IF g_debug = 'Y' THEN
4750: fnd_file.put_line(fnd_file.log, '<< 4751: END IF;
4752:
4753: -- If the transaction organization id is not the organization id of this
4754: -- cost worker then we have to make sure this transaction record in mmt

Line 4795: fnd_file.put_line(fnd_file.log, '>>>o_interorg_rec:'||to_char(o_interorg_rec));

4791: o_interorg_rec :=0;
4792: end if;
4793:
4794: IF g_debug = 'Y' THEN
4795: fnd_file.put_line(fnd_file.log, '>>>o_interorg_rec:'||to_char(o_interorg_rec));
4796: END IF;
4797:
4798: -- item cost history stuff
4799:

Line 4901: fnd_file.put_line(fnd_file.log, 'Item is Expense in Receiving Std. Org');

4897: and organization_id = l_std_org;
4898: end if;
4899: if (l_to_std_exp = 1) then
4900: if g_debug = 'Y' THEN
4901: fnd_file.put_line(fnd_file.log, 'Item is Expense in Receiving Std. Org');
4902: end if;
4903: elsif
4904: /* end for bug 3671538 */
4905: ((l_std_exp <> 1) or (l_std_from_org = 1) or

Line 5053: fnd_file.put_line(fnd_file.log, '--Material Overhead Absorption overridden--');

5049:
5050: if (l_earn_moh = 0 ) then
5051:
5052: if g_debug = 'Y' THEN
5053: fnd_file.put_line(fnd_file.log, '--Material Overhead Absorption overridden--');
5054: end if;
5055: else
5056: if g_debug = 'Y' then
5057: FND_FILE.PUT_LINE(fnd_file.log, to_char(l_stmt_num) || 'Insert into MACS from CICD');

Line 5057: FND_FILE.PUT_LINE(fnd_file.log, to_char(l_stmt_num) || 'Insert into MACS from CICD');

5053: fnd_file.put_line(fnd_file.log, '--Material Overhead Absorption overridden--');
5054: end if;
5055: else
5056: if g_debug = 'Y' then
5057: FND_FILE.PUT_LINE(fnd_file.log, to_char(l_stmt_num) || 'Insert into MACS from CICD');
5058: end if;
5059: Insert into mtl_actual_cost_subelement(
5060: layer_id,
5061: transaction_id,

Line 5152: fnd_file.put_line(fnd_file.log, '>>>Transaction update id'||to_char(l_txn_update_id));

5148: l_txn_update_id := i_txn_id;
5149: end if;
5150:
5151: IF g_debug = 'Y' THEN
5152: fnd_file.put_line(fnd_file.log, '>>>Transaction update id'||to_char(l_txn_update_id));
5153: END IF;
5154:
5155:
5156: -- If we are shipping from a standard cost org to an average cost org, the

Line 5221: fnd_file.put_line(fnd_file.log, '>>>Conditions met to call the actual cost hook');

5217: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
5218:
5219: IF ((l_ave_to_ave = 1) and (o_interorg_rec=0) and (l_std_org = -1) and (i_txn_action_id IN (3,21,12)) and (i_exp_item = 0)) THEN
5220: IF g_debug = 'Y' THEN
5221: fnd_file.put_line(fnd_file.log, '>>>Conditions met to call the actual cost hook');
5222: fnd_file.put_line(fnd_file.log, '>>>Calling the actual cost hook');
5223: END IF;
5224: l_cost_hook_io := CSTPACHK.actual_cost_hook(i_org_id => i_org_id,
5225: i_txn_id => i_txn_id,

Line 5222: fnd_file.put_line(fnd_file.log, '>>>Calling the actual cost hook');

5218:
5219: IF ((l_ave_to_ave = 1) and (o_interorg_rec=0) and (l_std_org = -1) and (i_txn_action_id IN (3,21,12)) and (i_exp_item = 0)) THEN
5220: IF g_debug = 'Y' THEN
5221: fnd_file.put_line(fnd_file.log, '>>>Conditions met to call the actual cost hook');
5222: fnd_file.put_line(fnd_file.log, '>>>Calling the actual cost hook');
5223: END IF;
5224: l_cost_hook_io := CSTPACHK.actual_cost_hook(i_org_id => i_org_id,
5225: i_txn_id => i_txn_id,
5226: i_layer_id => i_layer_id,

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

5236: o_err_msg => l_err_msg);
5237:
5238: IF (l_cost_hook_io=1) THEN
5239: IF g_debug = 'Y' THEN
5240: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used. Calling CSTPAVCP.validate_actual_cost_hook');
5241: END IF;
5242:
5243: CSTPAVCP.validate_actual_cost_hook(i_txn_id => i_txn_id,
5244: i_org_id => i_org_id,

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

5254: raise process_error;
5255: END IF;
5256:
5257: IF g_debug = 'Y' THEN
5258: fnd_file.put_line(fnd_file.log, '<<< 5259: END IF;
5260:
5261: select sum(actual_cost), layer_id
5262: into l_snd_txn_cost, l_from_layer_id

Line 5271: fnd_file.put_line(fnd_file.log, '>>>Hook not used');

5267: group by layer_id;
5268:
5269: ELSE
5270: IF g_debug = 'Y' THEN
5271: fnd_file.put_line(fnd_file.log, '>>>Hook not used');
5272: END IF;
5273: select item_cost, layer_id
5274: into l_snd_txn_cost, l_from_layer_id
5275: from cst_quantity_layers

Line 5282: fnd_file.put_line(fnd_file.log, '>>>Hook not used');

5278: and cost_group_id = l_from_cost_grp;
5279: END IF;
5280: ELSE
5281: IF g_debug = 'Y' THEN
5282: fnd_file.put_line(fnd_file.log, '>>>Hook not used');
5283: END IF;
5284:
5285: select item_cost, layer_id
5286: into l_snd_txn_cost, l_from_layer_id

Line 5294: fnd_file.put_line(fnd_file.log, '>>>l_snd_txn_cost: '||l_snd_txn_cost||' layer_id: '||l_from_layer_id);

5290: and cost_group_id = l_from_cost_grp;
5291: END IF;
5292: end if;
5293: IF g_debug = 'Y' THEN
5294: fnd_file.put_line(fnd_file.log, '>>>l_snd_txn_cost: '||l_snd_txn_cost||' layer_id: '||l_from_layer_id);
5295: END IF;
5296:
5297: o_hook_used:=l_cost_hook_io;
5298:

Line 5304: fnd_file.put_line(fnd_file.log, '>>>Calling Get_Snd_Rcv_Rate');

5300: -- receiving_currency = sending_currency * conversion_rate
5301: l_stmt_num := 140;
5302:
5303: IF g_debug = 'Y' THEN
5304: fnd_file.put_line(fnd_file.log, '>>>Calling Get_Snd_Rcv_Rate');
5305: END IF;
5306:
5307: get_snd_rcv_rate(i_txn_id, l_from_org, l_to_org,
5308: l_snd_sob_id, l_snd_curr, l_rcv_sob_id, l_rcv_curr,

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

5314: raise process_error;
5315: end if;
5316:
5317: IF g_debug = 'Y' THEN
5318: fnd_file.put_line(fnd_file.log, '<< 5319: END IF;
5320:
5321:
5322: -- Need to get UOM conversion

Line 5360: fnd_file.put_line(fnd_file.log, '>>>Transfer cost: '||to_char(l_txfr_cost)||' Transportation cost: '||to_char(l_trans_cost)||' Sending quantity: '||to_char(l_snd_qty));

5356: from mtl_material_transactions
5357: where transaction_id = i_txn_id;
5358:
5359: IF g_debug = 'Y' THEN
5360: fnd_file.put_line(fnd_file.log, '>>>Transfer cost: '||to_char(l_txfr_cost)||' Transportation cost: '||to_char(l_trans_cost)||' Sending quantity: '||to_char(l_snd_qty));
5361: END IF;
5362:
5363: /* TPRICE: If the transfer pricing option is yes, set transfer credit to be zero */
5364: if (i_tprice_option <> 0) then

Line 5367: fnd_file.put_line(fnd_file.log, '>>>Transfer price active setting transfer credit to zero');

5363: /* TPRICE: If the transfer pricing option is yes, set transfer credit to be zero */
5364: if (i_tprice_option <> 0) then
5365: l_txfr_cost := 0;
5366: IF g_debug = 'Y' THEN
5367: fnd_file.put_line(fnd_file.log, '>>>Transfer price active setting transfer credit to zero');
5368: END IF;
5369: end if;
5370:
5371: -- change for bug 2827548

Line 5391: fnd_file.put_line(fnd_file.log, '>>>Receiving cost: '||to_char(l_rcv_txn_cost));

5387: l_txfr_cost := l_txfr_cost * l_conv_rate;
5388: end if;
5389:
5390: IF g_debug = 'Y' THEN
5391: fnd_file.put_line(fnd_file.log, '>>>Receiving cost: '||to_char(l_rcv_txn_cost));
5392: END IF;
5393:
5394: /* TPRICE: If the transfter pricing option is to treat the price as the incoming cost,
5395: insert price into MCTCD */

Line 5400: fnd_file.put_line(fnd_file.log, '>>>Transfer price as incomming cost, hook will not be used');

5396: if (i_tprice_option = 2) then
5397: l_rcv_txn_cost := i_txf_price;
5398: l_elemental_visible := 'N';
5399: IF g_debug = 'Y' THEN
5400: fnd_file.put_line(fnd_file.log, '>>>Transfer price as incomming cost, hook will not be used');
5401: END IF;
5402: end if;
5403:
5404: if (l_elemental_visible = 'Y') then

Line 5406: fnd_file.put_line(fnd_file.log, '>>>Calling interorg_elemental_detail');

5402: end if;
5403:
5404: if (l_elemental_visible = 'Y') then
5405: IF g_debug = 'Y' THEN
5406: fnd_file.put_line(fnd_file.log, '>>>Calling interorg_elemental_detail');
5407: END IF; /*BUG 9311174 Modified the way we call inteorg_elemental_detail*/
5408: /* to rectify we call the signature correctly */
5409: interorg_elemental_detail( i_txn_id => i_txn_id,
5410: i_compute_txn_cost => l_compute_txn_cost,

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

5431: if (l_err_num <> 0) then
5432: raise process_error;
5433: end if;
5434: IF g_debug = 'Y' THEN
5435: fnd_file.put_line(fnd_file.log, '<< 5436: END IF;
5437: else
5438: insert into mtl_cst_txn_cost_details (
5439: transaction_id,

Line 5796: fnd_file.put_line(fnd_file.log, 'Interorg >>>');

5792: end if;
5793: end if;
5794: /* end bug 3761538 */
5795: /* IF g_debug = 'Y' THEN
5796: fnd_file.put_line(fnd_file.log, 'Interorg >>>');
5797: END IF;
5798: */
5799:
5800: EXCEPTION

Line 5854: fnd_file.put_line(fnd_file.log, '>>>>Inside Get_Snd_Rcv_Rate');

5850: l_err_code := '';
5851: l_err_msg := '';
5852:
5853: IF g_debug = 'Y' THEN
5854: fnd_file.put_line(fnd_file.log, '>>>>Inside Get_Snd_Rcv_Rate');
5855: END IF;
5856: l_stmt_num := 10;
5857:
5858: /* The following FROM clause in the select statement has been commented out

Line 5939: fnd_file.put_line(fnd_file.log, 'Get_Snd_Rcv_Rate >>>');

5935: o_conv_rate := l_conv_rate;
5936: o_conv_date := l_conv_date;
5937:
5938: /* IF g_debug = 'Y' THEN
5939: fnd_file.put_line(fnd_file.log, 'Get_Snd_Rcv_Rate >>>');
5940: END IF; */
5941: EXCEPTION
5942:
5943: when gl_currency_api.NO_RATE then

Line 5980: fnd_file.put_line(fnd_file.log, '>>>>Inside Get_Snd_Rcv_UOM');

5976: l_err_num := 0;
5977: l_err_code := '';
5978: l_err_msg := '';
5979: IF g_debug = 'Y' THEN
5980: fnd_file.put_line(fnd_file.log, '>>>>Inside Get_Snd_Rcv_UOM');
5981: END IF;
5982:
5983: l_stmt_num := 10;
5984:

Line 6000: fnd_file.put_line(fnd_file.log, 'Get_Snd_Rcv_UOM >>>');

5996: where organization_id = i_to_org
5997: and inventory_item_id = i_item_id;
5998:
5999: /* IF g_debug = 'Y' THEN
6000: fnd_file.put_line(fnd_file.log, 'Get_Snd_Rcv_UOM >>>');
6001: END IF; */
6002:
6003: EXCEPTION
6004: when others then

Line 6091: fnd_file.put_line(fnd_file.log, 'Borrow_Cost <<<');

6087: l_err_code := '';
6088: l_err_msg := '';
6089:
6090: IF g_debug = 'Y' THEN
6091: fnd_file.put_line(fnd_file.log, 'Borrow_Cost <<<');
6092: END IF;
6093: l_stmt_num := 10;
6094:
6095: -- initialize array with 0

Line 6249: fnd_file.put_line(fnd_file.log, 'Borrow_Cost >>>');

6245:
6246: end if; -- end checking hook
6247: end loop; -- end for looping 10 elements
6248: IF g_debug = 'Y' THEN
6249: fnd_file.put_line(fnd_file.log, 'Borrow_Cost >>>');
6250: END IF;
6251: EXCEPTION
6252: when others then
6253: rollback;

Line 6292: fnd_file.put_line(fnd_file.log, 'Store_BP_Variance <<<');

6288: l_err_code := '';
6289: l_err_msg := '';
6290:
6291: IF g_debug = 'Y' THEN
6292: fnd_file.put_line(fnd_file.log, 'Store_BP_Variance <<<');
6293: END IF;
6294:
6295:
6296:

Line 6330: fnd_file.put_line(fnd_file.log, 'Store_BP_Variance >>>');

6326:
6327: end loop; -- end cost element
6328: end loop; -- end level_type loop
6329: IF g_debug = 'Y' THEN
6330: fnd_file.put_line(fnd_file.log, 'Store_BP_Variance >>>');
6331: END IF;
6332: EXCEPTION
6333: when others then
6334: rollback;

Line 6380: fnd_file.put_line(fnd_file.log, '>>>>Inside Interorg_Elemental_Detail');

6376: l_from_cost_org NUMBER; /* bugfix 3048258 */
6377: BEGIN
6378:
6379: IF g_debug = 'Y' THEN
6380: fnd_file.put_line(fnd_file.log, '>>>>Inside Interorg_Elemental_Detail');
6381: END IF;
6382: -- Insert detail elemental cost into mctcd.
6383: -- Based on the from_org :
6384: -- * If from_org is a standard org (l_compute_txn_cost=1),

Line 6400: fnd_file.put_line(fnd_file.log, '>>>>From organization is a standard org');

6396: if (i_compute_txn_cost = 1) then
6397: l_stmt_num := 10;
6398:
6399: IF g_debug = 'Y' THEN
6400: fnd_file.put_line(fnd_file.log, '>>>>From organization is a standard org');
6401: END IF;
6402:
6403: /* Added for bugfix 3048258 */
6404: select cost_organization_id

Line 6500: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used, inserting in MCTCD from MCACD');

6496: from cst_layer_cost_details clcd
6497: where clcd.layer_id = i_from_layer_id;
6498: ELSE
6499: IF g_debug = 'Y' THEN
6500: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used, inserting in MCTCD from MCACD');
6501: END IF;
6502: insert into mtl_cst_txn_cost_details (
6503: transaction_id,
6504: organization_id,

Line 6685: fnd_file.put_line(fnd_file.log, 'Interorg_Elemental_Detail >>>');

6681: 0);
6682: end if;
6683:
6684: IF g_debug = 'Y' THEN
6685: fnd_file.put_line(fnd_file.log, 'Interorg_Elemental_Detail >>>');
6686: END IF;
6687: EXCEPTION
6688: when process_error then
6689: o_err_num := l_err_num;

Line 6812: fnd_file.put_line(fnd_file.log, 'Cost_Acct_Events <<<');

6808: ORDER BY mmt.transaction_id;
6809:
6810: BEGIN
6811: IF g_debug = 'Y' THEN
6812: fnd_file.put_line(fnd_file.log, 'Cost_Acct_Events <<<');
6813: END IF;
6814:
6815: -------------------------------------------------------------------------
6816: -- Establish savepoint

Line 6931: fnd_file.put_line (fnd_file.log, 'Parent transaction Type (1-physical, 2-logical):' || l_parent_transaction_type);

6927: l_log_in_phy := 0;
6928: end if;
6929:
6930: if (g_debug = 'Y') then
6931: fnd_file.put_line (fnd_file.log, 'Parent transaction Type (1-physical, 2-logical):' || l_parent_transaction_type);
6932: fnd_file.put_line (fnd_file.log, 'Logical transaction in physical org (0-no 1=yes):' || l_log_in_phy );
6933: end if;
6934:
6935: l_stmt_num := 35;

Line 6932: fnd_file.put_line (fnd_file.log, 'Logical transaction in physical org (0-no 1=yes):' || l_log_in_phy );

6928: end if;
6929:
6930: if (g_debug = 'Y') then
6931: fnd_file.put_line (fnd_file.log, 'Parent transaction Type (1-physical, 2-logical):' || l_parent_transaction_type);
6932: fnd_file.put_line (fnd_file.log, 'Logical transaction in physical org (0-no 1=yes):' || l_log_in_phy );
6933: end if;
6934:
6935: l_stmt_num := 35;
6936:

Line 7023: fnd_file.put_line (fnd_file.log, 'Layer id: ' || l_layer_id);

7019: end if;
7020: end if;
7021:
7022: if (g_debug = 'Y') then
7023: fnd_file.put_line (fnd_file.log, 'Layer id: ' || l_layer_id);
7024: fnd_file.put_line (fnd_file.log, 'Transaction id: ' || c_mmt_txn_rec.transaction_id);
7025: end if;
7026: l_stmt_num := 41;
7027:

Line 7024: fnd_file.put_line (fnd_file.log, 'Transaction id: ' || c_mmt_txn_rec.transaction_id);

7020: end if;
7021:
7022: if (g_debug = 'Y') then
7023: fnd_file.put_line (fnd_file.log, 'Layer id: ' || l_layer_id);
7024: fnd_file.put_line (fnd_file.log, 'Transaction id: ' || c_mmt_txn_rec.transaction_id);
7025: end if;
7026: l_stmt_num := 41;
7027:
7028:

Line 7079: fnd_file.put_line (fnd_file.log, 'Inserted in mcacd:' || sql%rowcount);

7075: FROM mtl_cst_txn_cost_details ctcd
7076: WHERE transaction_id = c_mmt_txn_rec.transaction_id;
7077:
7078: if (g_debug = 'Y') then
7079: fnd_file.put_line (fnd_file.log, 'Inserted in mcacd:' || sql%rowcount);
7080: end if;
7081:
7082: /* Update MMT */
7083:

Line 7137: fnd_file.put_line (fnd_file.log, 'Error Calling cost_txn');

7133:
7134:
7135: if (l_error_num <> 0 ) then
7136: if (g_debug = 'Y') then
7137: fnd_file.put_line (fnd_file.log, 'Error Calling cost_txn');
7138: end if;
7139: raise fnd_api.g_exc_error;
7140: end if;
7141:

Line 7192: fnd_file.put_line(fnd_file.log, 'Cost_Acct_Events >>>');

7188: end if;
7189:
7190:
7191: IF g_debug = 'Y' THEN
7192: fnd_file.put_line(fnd_file.log, 'Cost_Acct_Events >>>');
7193: END IF;
7194:
7195: EXCEPTION
7196: when fnd_api.g_exc_error then

Line 7353: fnd_file.put_line(fnd_file.log, 'Compute_MCACD_Costs <<<');

7349:
7350: BEGIN
7351:
7352: IF g_debug = 'Y' THEN
7353: fnd_file.put_line(fnd_file.log, 'Compute_MCACD_Costs <<<');
7354: END IF;
7355:
7356: l_err_code := '';
7357: l_err_msg := '';

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

7655: l_err_code,
7656: l_err_msg);
7657: IF (l_cost_hook = 1) THEN
7658: IF g_debug = 'Y' THEN
7659: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used. Calling CSTPAVCP.validate_actual_cost_hook');
7660: END IF;
7661:
7662: CSTPAVCP.validate_actual_cost_hook(i_txn_id => p_txn_id,
7663: i_org_id => p_org_id,

Line 7878: fnd_file.put_line(fnd_file.log, 'Compute_MCACD_Costs >>>');

7874: x_layer_id := l_layer_id ;
7875:
7876:
7877: IF g_debug = 'Y' THEN
7878: fnd_file.put_line(fnd_file.log, 'Compute_MCACD_Costs >>>');
7879: END IF;
7880:
7881: EXCEPTION
7882:

Line 7975: fnd_file.put_line(fnd_file.log, 'Payback_Variance <<<');

7971: l_err_msg := '';
7972:
7973: l_stmt_num := 10;
7974: IF g_debug = 'Y' THEN
7975: fnd_file.put_line(fnd_file.log, 'Payback_Variance <<<');
7976: END IF;
7977:
7978: -- initialize array with 0
7979:

Line 8047: fnd_file.put_line(fnd_file.log, 'Payback_Variance >>>');

8043: and mcacd.layer_id = i_from_layer;
8044: end loop;
8045:
8046: IF g_debug = 'Y' THEN
8047: fnd_file.put_line(fnd_file.log, 'Payback_Variance >>>');
8048: END IF;
8049: EXCEPTION
8050: when others then
8051: rollback;

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

8172: l_msg_data VARCHAR2(8000);
8173:
8174: BEGIN
8175: IF g_debug = 'Y' THEN
8176: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt <<<');
8177: END IF;
8178:
8179: -- Initialize Error Variables
8180: x_err_num := 0;

Line 8232: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receiving Org is Process Org. So, no accounting ' ||

8228:
8229: IF l_logical_org_process_flag = 'Y'
8230: THEN
8231: IF g_debug = 'Y' THEN
8232: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receiving Org is Process Org. So, no accounting ' ||
8233: ' for receiving transaction.');
8234: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8235: END IF;
8236: RETURN;

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

8230: THEN
8231: IF g_debug = 'Y' THEN
8232: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receiving Org is Process Org. So, no accounting ' ||
8233: ' for receiving transaction.');
8234: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8235: END IF;
8236: RETURN;
8237: ELSIF l_pd_xfer_ind = 'Y'
8238: THEN

Line 8240: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Process/Discrete xfer: Receiving Org is Discrete Org.');

8236: RETURN;
8237: ELSIF l_pd_xfer_ind = 'Y'
8238: THEN
8239: IF g_debug = 'Y' THEN
8240: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Process/Discrete xfer: Receiving Org is Discrete Org.');
8241: END IF;
8242: END IF;
8243: -- End bug 5349860
8244:

Line 8251: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Logical Receipt Transaction not seeded');

8247: -- For these transactions, exit out the procedure. These will
8248: -- be costed in a manner similar to before the upgrade.
8249:
8250: IF l_logical_txn_id IS NULL THEN
8251: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Logical Receipt Transaction not seeded');
8252: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Pre-upgrade transaction');
8253: IF g_debug = 'Y' THEN
8254: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8255: END IF;

Line 8252: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Pre-upgrade transaction');

8248: -- be costed in a manner similar to before the upgrade.
8249:
8250: IF l_logical_txn_id IS NULL THEN
8251: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Logical Receipt Transaction not seeded');
8252: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Pre-upgrade transaction');
8253: IF g_debug = 'Y' THEN
8254: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8255: END IF;
8256: RETURN;

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

8250: IF l_logical_txn_id IS NULL THEN
8251: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Logical Receipt Transaction not seeded');
8252: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Pre-upgrade transaction');
8253: IF g_debug = 'Y' THEN
8254: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8255: END IF;
8256: RETURN;
8257: END IF;
8258:

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

8299: PROGRAM_ID = p_prog_id
8300: WHERE
8301: TRANSACTION_ID = l_logical_txn_id;
8302: IF g_debug = 'Y' THEN
8303: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8304: END IF;
8305: RETURN;
8306:
8307: END IF;

Line 8346: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Logical Receipt Txn: '||to_char(l_logical_txn_id));

8342: WHERE
8343: TRANSACTION_ID = l_logical_txn_id;
8344:
8345: IF ( g_debug = 'Y' ) THEN
8346: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Logical Receipt Txn: '||to_char(l_logical_txn_id));
8347: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receipt Org: '||to_char(l_logical_org_id));
8348: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receipt Cost Group: '||to_char(l_logical_cost_group_id));
8349: END IF;
8350:

Line 8347: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receipt Org: '||to_char(l_logical_org_id));

8343: TRANSACTION_ID = l_logical_txn_id;
8344:
8345: IF ( g_debug = 'Y' ) THEN
8346: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Logical Receipt Txn: '||to_char(l_logical_txn_id));
8347: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receipt Org: '||to_char(l_logical_org_id));
8348: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receipt Cost Group: '||to_char(l_logical_cost_group_id));
8349: END IF;
8350:
8351: -- Get Expense subinventory information

Line 8348: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receipt Cost Group: '||to_char(l_logical_cost_group_id));

8344:
8345: IF ( g_debug = 'Y' ) THEN
8346: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Logical Receipt Txn: '||to_char(l_logical_txn_id));
8347: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receipt Org: '||to_char(l_logical_org_id));
8348: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receipt Cost Group: '||to_char(l_logical_cost_group_id));
8349: END IF;
8350:
8351: -- Get Expense subinventory information
8352: -- 1 for expense; 0 for not expense

Line 8363: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Expense Subinventory: '||to_char(l_exp_sub));

8359:
8360: CLOSE c_exp_sub;
8361:
8362: IF ( g_debug = 'Y' ) THEN
8363: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Expense Subinventory: '||to_char(l_exp_sub));
8364: END IF;
8365:
8366:
8367: -- ===================================================================

Line 8407: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Debit Account: '||to_char(l_debit_account));

8403: l_debit_account := l_db_account;
8404: END IF;
8405:
8406: IF ( g_debug = 'Y' ) THEN
8407: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Debit Account: '||to_char(l_debit_account));
8408: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Account Line Type: '||to_char(l_dr_acct_line_type));
8409: END IF;
8410:
8411:

Line 8408: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Account Line Type: '||to_char(l_dr_acct_line_type));

8404: END IF;
8405:
8406: IF ( g_debug = 'Y' ) THEN
8407: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Debit Account: '||to_char(l_debit_account));
8408: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Account Line Type: '||to_char(l_dr_acct_line_type));
8409: END IF;
8410:
8411:
8412: l_stmt_num := 30;

Line 8463: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Layer_ID: '||to_char(l_layer_id));

8459: l_layer_id := -1;
8460: END IF;
8461:
8462: IF g_debug = 'Y' THEN
8463: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Layer_ID: '||to_char(l_layer_id));
8464: END IF;
8465:
8466: -- Get Cost from parent transaction's MCACD.
8467: -- This is in parent org's primary currency

Line 8534: fnd_file.put_line(fnd_file.log, 'Currency Conversion Type: '|| l_conversion_type);

8530: -- Get the Conversion Type from the profile
8531: FND_PROFILE.get('CURRENCY_CONVERSION_TYPE', l_conversion_type);
8532:
8533: IF g_debug = 'Y' THEN
8534: fnd_file.put_line(fnd_file.log, 'Currency Conversion Type: '|| l_conversion_type);
8535: END IF;
8536:
8537: l_conversion_rate := GL_Currency_Api.Get_Rate(l_set_of_books_id,
8538: l_sending_curr,

Line 8543: FND_FILE.put_line(FND_FILE.log, 'Currency Conversion Rate not defined: ');

8539: l_txn_date,
8540: l_conversion_type);
8541:
8542: IF l_conversion_rate IS NULL THEN
8543: FND_FILE.put_line(FND_FILE.log, 'Currency Conversion Rate not defined: ');
8544: FND_FILE.put_line(FND_FILE.log, 'Currency From: '||l_sending_curr);
8545: FND_FILE.put_line(FND_FILE.log, 'Date: '||to_char(l_txn_date, 'DD-MON-YYYY'));
8546: FND_FILE.put_line(FND_FILE.log, 'Conversion Type: '||l_conversion_type);
8547: FND_FILE.put_line(FND_FILE.log, 'Please define the rate and resubmit transaction');

Line 8544: FND_FILE.put_line(FND_FILE.log, 'Currency From: '||l_sending_curr);

8540: l_conversion_type);
8541:
8542: IF l_conversion_rate IS NULL THEN
8543: FND_FILE.put_line(FND_FILE.log, 'Currency Conversion Rate not defined: ');
8544: FND_FILE.put_line(FND_FILE.log, 'Currency From: '||l_sending_curr);
8545: FND_FILE.put_line(FND_FILE.log, 'Date: '||to_char(l_txn_date, 'DD-MON-YYYY'));
8546: FND_FILE.put_line(FND_FILE.log, 'Conversion Type: '||l_conversion_type);
8547: FND_FILE.put_line(FND_FILE.log, 'Please define the rate and resubmit transaction');
8548: RAISE NO_CURR_CONV_RATE_FOUND;

Line 8545: FND_FILE.put_line(FND_FILE.log, 'Date: '||to_char(l_txn_date, 'DD-MON-YYYY'));

8541:
8542: IF l_conversion_rate IS NULL THEN
8543: FND_FILE.put_line(FND_FILE.log, 'Currency Conversion Rate not defined: ');
8544: FND_FILE.put_line(FND_FILE.log, 'Currency From: '||l_sending_curr);
8545: FND_FILE.put_line(FND_FILE.log, 'Date: '||to_char(l_txn_date, 'DD-MON-YYYY'));
8546: FND_FILE.put_line(FND_FILE.log, 'Conversion Type: '||l_conversion_type);
8547: FND_FILE.put_line(FND_FILE.log, 'Please define the rate and resubmit transaction');
8548: RAISE NO_CURR_CONV_RATE_FOUND;
8549: END IF;

Line 8546: FND_FILE.put_line(FND_FILE.log, 'Conversion Type: '||l_conversion_type);

8542: IF l_conversion_rate IS NULL THEN
8543: FND_FILE.put_line(FND_FILE.log, 'Currency Conversion Rate not defined: ');
8544: FND_FILE.put_line(FND_FILE.log, 'Currency From: '||l_sending_curr);
8545: FND_FILE.put_line(FND_FILE.log, 'Date: '||to_char(l_txn_date, 'DD-MON-YYYY'));
8546: FND_FILE.put_line(FND_FILE.log, 'Conversion Type: '||l_conversion_type);
8547: FND_FILE.put_line(FND_FILE.log, 'Please define the rate and resubmit transaction');
8548: RAISE NO_CURR_CONV_RATE_FOUND;
8549: END IF;
8550:

Line 8547: FND_FILE.put_line(FND_FILE.log, 'Please define the rate and resubmit transaction');

8543: FND_FILE.put_line(FND_FILE.log, 'Currency Conversion Rate not defined: ');
8544: FND_FILE.put_line(FND_FILE.log, 'Currency From: '||l_sending_curr);
8545: FND_FILE.put_line(FND_FILE.log, 'Date: '||to_char(l_txn_date, 'DD-MON-YYYY'));
8546: FND_FILE.put_line(FND_FILE.log, 'Conversion Type: '||l_conversion_type);
8547: FND_FILE.put_line(FND_FILE.log, 'Please define the rate and resubmit transaction');
8548: RAISE NO_CURR_CONV_RATE_FOUND;
8549: END IF;
8550:
8551: l_actual_cost := l_actual_cost * l_conversion_rate;

Line 8585: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Credit Account: '||to_char(l_credit_account));

8581: RAISE COST_HOOK_ACCOUNT_ERROR;
8582: END IF;
8583:
8584: IF g_debug = 'Y' THEN
8585: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Credit Account: '||to_char(l_credit_account));
8586: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Account Line Type: '||to_char(l_cr_acct_line_type));
8587: END IF;
8588:
8589: IF l_credit_account = -1 THEN

Line 8586: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Account Line Type: '||to_char(l_cr_acct_line_type));

8582: END IF;
8583:
8584: IF g_debug = 'Y' THEN
8585: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Credit Account: '||to_char(l_credit_account));
8586: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Account Line Type: '||to_char(l_cr_acct_line_type));
8587: END IF;
8588:
8589: IF l_credit_account = -1 THEN
8590: -- default account behavior

Line 8615: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Actual_Cost or transfer price for process/discrete xfer: '||to_char(l_actual_cost));

8611:
8612: END IF;
8613:
8614: IF g_debug = 'Y' THEN
8615: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Actual_Cost or transfer price for process/discrete xfer: '||to_char(l_actual_cost));
8616: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Credit_account: '||to_char(l_credit_account));
8617: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Debit_account: '||to_char(l_debit_account));
8618: END IF;
8619:

Line 8616: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Credit_account: '||to_char(l_credit_account));

8612: END IF;
8613:
8614: IF g_debug = 'Y' THEN
8615: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Actual_Cost or transfer price for process/discrete xfer: '||to_char(l_actual_cost));
8616: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Credit_account: '||to_char(l_credit_account));
8617: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Debit_account: '||to_char(l_debit_account));
8618: END IF;
8619:
8620: -- Insert Logical Transaction details into MCACD

Line 8617: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Debit_account: '||to_char(l_debit_account));

8613:
8614: IF g_debug = 'Y' THEN
8615: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Actual_Cost or transfer price for process/discrete xfer: '||to_char(l_actual_cost));
8616: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Credit_account: '||to_char(l_credit_account));
8617: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Debit_account: '||to_char(l_debit_account));
8618: END IF;
8619:
8620: -- Insert Logical Transaction details into MCACD
8621:

Line 8676: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Dr Exp Account with ' || l_actual_cost * l_primary_quantity || ' ' || l_pri_curr);

8672: -- Insert Debit Entry
8673: l_stmt_num := 110;
8674:
8675: IF g_debug = 'Y' THEN
8676: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Dr Exp Account with ' || l_actual_cost * l_primary_quantity || ' ' || l_pri_curr);
8677: END IF;
8678:
8679: CSTPACDP.INSERT_ACCOUNT(
8680: l_logical_org_id,

Line 8716: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Cr Payables Account with ' || -1 * l_actual_cost * l_primary_quantity || ' ' || l_pri_curr);

8712: -- Insert Credit Entry
8713: l_stmt_num := 120;
8714:
8715: IF g_debug = 'Y' THEN
8716: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Cr Payables Account with ' || -1 * l_actual_cost * l_primary_quantity || ' ' || l_pri_curr);
8717: END IF;
8718:
8719: CSTPACDP.INSERT_ACCOUNT(
8720: l_logical_org_id,

Line 8831: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Creating XLA Event');

8827: TRANSACTION_ID = l_logical_txn_id;
8828:
8829:
8830: IF g_debug = 'Y' THEN
8831: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Creating XLA Event');
8832: END IF;
8833:
8834: --
8835: -- Bug 5349860: Process/Discrete Xfer

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

8877: x_err_code := 'Error raising SLA Event for transaction: '||to_char(l_trx_info.TRANSACTION_ID);
8878: x_err_msg := 'CSTPAVCP.Cost_LogicalSOReceipt:('||l_stmt_num||'): '||x_err_code || '. Error Msg: ' || l_msg_data;
8879:
8880: IF g_debug = 'Y' THEN
8881: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8882: END IF;
8883:
8884: RAISE FND_API.g_exc_unexpected_error;
8885: END IF;

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

8885: END IF;
8886: /* End bug 5349860 */
8887:
8888: IF g_debug = 'Y' THEN
8889: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8890: END IF;
8891:
8892:
8893: EXCEPTION

Line 8902: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);

8898: WHEN INSERT_MCACD_ERROR THEN
8899: x_err_num := -1;
8900: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt( '||to_char(l_stmt_num)||' ): '||'Error Inserting into MCACD: '||SQLERRM;
8901: x_err_msg := x_err_code;
8902: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);
8903: WHEN INSERT_ACCT_ERROR THEN
8904: x_err_num := -1;
8905: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt( '||to_char(l_stmt_num)||' ): '||'Error in Insert_Account: ';
8906: x_err_msg := x_err_code;

Line 8907: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);

8903: WHEN INSERT_ACCT_ERROR THEN
8904: x_err_num := -1;
8905: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt( '||to_char(l_stmt_num)||' ): '||'Error in Insert_Account: ';
8906: x_err_msg := x_err_code;
8907: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);
8908:
8909: WHEN COST_HOOK_ACCOUNT_ERROR THEN
8910: x_err_num := l_err_num;
8911: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt' || l_err_code || 'Error in cost hook get_account_id' ;

Line 8913: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);

8909: WHEN COST_HOOK_ACCOUNT_ERROR THEN
8910: x_err_num := l_err_num;
8911: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt' || l_err_code || 'Error in cost hook get_account_id' ;
8912: x_err_msg := l_err_msg;
8913: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);
8914: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_msg);
8915:
8916: WHEN FND_API.g_exc_unexpected_error THEN
8917: rollback;

Line 8914: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_msg);

8910: x_err_num := l_err_num;
8911: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt' || l_err_code || 'Error in cost hook get_account_id' ;
8912: x_err_msg := l_err_msg;
8913: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);
8914: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_msg);
8915:
8916: WHEN FND_API.g_exc_unexpected_error THEN
8917: rollback;
8918: UPDATE mtl_material_transactions

Line 8933: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);

8929: WHEN OTHERS THEN
8930: x_err_num := -1;
8931: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt( '||to_char(l_stmt_num)||' ): ';
8932: x_err_msg := x_err_code;
8933: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);
8934:
8935: END Cost_LogicalSOReceipt;
8936:
8937: /* ===========================================================

Line 9039: fnd_file.put_line(fnd_file.log, 'Cost_Logical_itr_receipt <<<');

9035: l_snd_qty := o_txn_qty;
9036: l_std_exp := 0;
9037:
9038: IF g_debug = 'Y' THEN
9039: fnd_file.put_line(fnd_file.log, 'Cost_Logical_itr_receipt <<<');
9040: fnd_file.put_line(fnd_file.log, '- Process/Discrete Transfer -');
9041: END IF;
9042:
9043: l_earn_moh := 1;

Line 9040: fnd_file.put_line(fnd_file.log, '- Process/Discrete Transfer -');

9036: l_std_exp := 0;
9037:
9038: IF g_debug = 'Y' THEN
9039: fnd_file.put_line(fnd_file.log, 'Cost_Logical_itr_receipt <<<');
9040: fnd_file.put_line(fnd_file.log, '- Process/Discrete Transfer -');
9041: END IF;
9042:
9043: l_earn_moh := 1;
9044: l_return_status := fnd_api.g_ret_sts_success;

Line 9170: fnd_file.put_line(fnd_file.log, 'TxnOrg: ' || i_txn_org_id || ' Item: ' || i_item_id);

9166: -- while creating MMT row for this logical transactions.
9167: -- For details refer to: INV_LOGICAL_TRANSACTIONS_PUB.create_opm_disc_logical_trx
9168: --
9169: IF g_debug = 'Y' THEN
9170: fnd_file.put_line(fnd_file.log, 'TxnOrg: ' || i_txn_org_id || ' Item: ' || i_item_id);
9171: fnd_file.put_line(fnd_file.log, 'fromOrg: ' || l_from_org || ' toOrg: ' || l_to_org);
9172: fnd_file.put_line(fnd_file.log, 'fromCG: ' || l_from_cost_grp || ' toCG: ' || l_to_cost_grp);
9173: fnd_file.put_line(fnd_file.log, 'Transaction Action: ' || i_txn_action_id);
9174: fnd_file.put_line(fnd_file.log, 'Transfer price options: ' || i_tprice_option ||

Line 9171: fnd_file.put_line(fnd_file.log, 'fromOrg: ' || l_from_org || ' toOrg: ' || l_to_org);

9167: -- For details refer to: INV_LOGICAL_TRANSACTIONS_PUB.create_opm_disc_logical_trx
9168: --
9169: IF g_debug = 'Y' THEN
9170: fnd_file.put_line(fnd_file.log, 'TxnOrg: ' || i_txn_org_id || ' Item: ' || i_item_id);
9171: fnd_file.put_line(fnd_file.log, 'fromOrg: ' || l_from_org || ' toOrg: ' || l_to_org);
9172: fnd_file.put_line(fnd_file.log, 'fromCG: ' || l_from_cost_grp || ' toCG: ' || l_to_cost_grp);
9173: fnd_file.put_line(fnd_file.log, 'Transaction Action: ' || i_txn_action_id);
9174: fnd_file.put_line(fnd_file.log, 'Transfer price options: ' || i_tprice_option ||
9175: ' Transfer Price: ' || i_txf_price ||

Line 9172: fnd_file.put_line(fnd_file.log, 'fromCG: ' || l_from_cost_grp || ' toCG: ' || l_to_cost_grp);

9168: --
9169: IF g_debug = 'Y' THEN
9170: fnd_file.put_line(fnd_file.log, 'TxnOrg: ' || i_txn_org_id || ' Item: ' || i_item_id);
9171: fnd_file.put_line(fnd_file.log, 'fromOrg: ' || l_from_org || ' toOrg: ' || l_to_org);
9172: fnd_file.put_line(fnd_file.log, 'fromCG: ' || l_from_cost_grp || ' toCG: ' || l_to_cost_grp);
9173: fnd_file.put_line(fnd_file.log, 'Transaction Action: ' || i_txn_action_id);
9174: fnd_file.put_line(fnd_file.log, 'Transfer price options: ' || i_tprice_option ||
9175: ' Transfer Price: ' || i_txf_price ||
9176: ' Trp Cost: ' || l_trans_cost || ' Qty: ' || l_snd_qty);

Line 9173: fnd_file.put_line(fnd_file.log, 'Transaction Action: ' || i_txn_action_id);

9169: IF g_debug = 'Y' THEN
9170: fnd_file.put_line(fnd_file.log, 'TxnOrg: ' || i_txn_org_id || ' Item: ' || i_item_id);
9171: fnd_file.put_line(fnd_file.log, 'fromOrg: ' || l_from_org || ' toOrg: ' || l_to_org);
9172: fnd_file.put_line(fnd_file.log, 'fromCG: ' || l_from_cost_grp || ' toCG: ' || l_to_cost_grp);
9173: fnd_file.put_line(fnd_file.log, 'Transaction Action: ' || i_txn_action_id);
9174: fnd_file.put_line(fnd_file.log, 'Transfer price options: ' || i_tprice_option ||
9175: ' Transfer Price: ' || i_txf_price ||
9176: ' Trp Cost: ' || l_trans_cost || ' Qty: ' || l_snd_qty);
9177: END IF;

Line 9174: fnd_file.put_line(fnd_file.log, 'Transfer price options: ' || i_tprice_option ||

9170: fnd_file.put_line(fnd_file.log, 'TxnOrg: ' || i_txn_org_id || ' Item: ' || i_item_id);
9171: fnd_file.put_line(fnd_file.log, 'fromOrg: ' || l_from_org || ' toOrg: ' || l_to_org);
9172: fnd_file.put_line(fnd_file.log, 'fromCG: ' || l_from_cost_grp || ' toCG: ' || l_to_cost_grp);
9173: fnd_file.put_line(fnd_file.log, 'Transaction Action: ' || i_txn_action_id);
9174: fnd_file.put_line(fnd_file.log, 'Transfer price options: ' || i_tprice_option ||
9175: ' Transfer Price: ' || i_txf_price ||
9176: ' Trp Cost: ' || l_trans_cost || ' Qty: ' || l_snd_qty);
9177: END IF;
9178:

Line 9207: fnd_file.put_line(fnd_file.log, 'Updating trx: ' || i_txn_id || ' with trxCost: ' || l_new_txn_cost);

9203:
9204: l_new_txn_cost := (l_snd_txn_cost * abs(l_snd_qty) + l_trans_cost) / abs(l_snd_qty);
9205:
9206: IF g_debug = 'Y' THEN
9207: fnd_file.put_line(fnd_file.log, 'Updating trx: ' || i_txn_id || ' with trxCost: ' || l_new_txn_cost);
9208: END IF;
9209:
9210: l_stmt_num := 50;
9211: Update mtl_material_transactions

Line 9219: fnd_file.put_line(fnd_file.log, 'Updating trx: ' || i_txn_id || ' with trxCost: ' || l_rcv_txn_cost);

9215: elsif (i_txn_action_id = 12 AND i_fob_point = 1)
9216: then
9217:
9218: IF g_debug = 'Y' THEN
9219: fnd_file.put_line(fnd_file.log, 'Updating trx: ' || i_txn_id || ' with trxCost: ' || l_rcv_txn_cost);
9220: END IF;
9221:
9222: l_stmt_num := 70;
9223: Update mtl_material_transactions

Line 9233: fnd_file.put_line(fnd_file.log, 'inserting to MCTCD for txn: ' || i_txn_id || '. trxCost: ' || l_rcv_txn_cost);

9229: (i_txn_action_id = 12 AND i_fob_point = 2))
9230: then
9231:
9232: IF g_debug = 'Y' THEN
9233: fnd_file.put_line(fnd_file.log, 'inserting to MCTCD for txn: ' || i_txn_id || '. trxCost: ' || l_rcv_txn_cost);
9234: END IF;
9235:
9236: l_stmt_num := 80;
9237: insert into mtl_cst_txn_cost_details (

Line 9291: fnd_file.put_line(fnd_file.log, 'inserting to MCACD for IO Issue to exp txn');

9287: * Bug 5631478: unique constraint violation because of this insert.
9288: * Same insert is being done in compute_actual_cost procedure
9289: *
9290: IF g_debug = 'Y' THEN
9291: fnd_file.put_line(fnd_file.log, 'inserting to MCACD for IO Issue to exp txn');
9292: END IF;
9293:
9294: insert into mtl_cst_actual_cost_details(
9295: transaction_id,

Line 9347: fnd_file.put_line(fnd_file.log, 'Cost Logical Intransit Receipt >>>');

9343:
9344: END IF;
9345:
9346: IF g_debug = 'Y' THEN
9347: fnd_file.put_line(fnd_file.log, 'Cost Logical Intransit Receipt >>>');
9348: END IF;
9349:
9350: EXCEPTION
9351: when others then

Line 9401: fnd_file.put_line(fnd_file.log, 'CompEncumbrance_IntOrdersExp << ');

9397:
9398: x_return_status := FND_API.G_RET_STS_SUCCESS;
9399:
9400: if g_debug = 'Y' then
9401: fnd_file.put_line(fnd_file.log, 'CompEncumbrance_IntOrdersExp << ');
9402: end if;
9403:
9404: l_stmt_num := 5;
9405:

Line 9437: fnd_file.put_line(fnd_file.log, 'Unit Price: '||l_unit_price||'Encumbrance Account: '||x_encumbrance_account);

9433: and rd.requisition_line_id = rl.requisition_line_id
9434: and rl.UNIT_MEAS_LOOKUP_CODE = um.unit_of_measure;
9435:
9436: if g_debug = 'Y' then
9437: fnd_file.put_line(fnd_file.log, 'Unit Price: '||l_unit_price||'Encumbrance Account: '||x_encumbrance_account);
9438: end if;
9439:
9440: /* Get UOM for this item/org from MSI */
9441: l_stmt_num := 30;

Line 9449: fnd_file.put_line(fnd_file.log, 'Primary UOM: '||l_primary_uom_code);

9445: WHERE organization_id = p_organization_id
9446: AND inventory_item_id = p_item_id;
9447:
9448: if g_debug = 'Y' then
9449: fnd_file.put_line(fnd_file.log, 'Primary UOM: '||l_primary_uom_code);
9450: end if;
9451: /* Convert the total_primary_quantity into source_doc_quantity */
9452: l_stmt_num := 40;
9453: INV_Convert.INV_UM_Conversion(

Line 9467: fnd_file.put_line(fnd_file.log, 'Document Received Quantity: '||l_doc_rcv_qty||' Document Primary Quantity: '||l_doc_primary_qty);

9463:
9464: l_doc_rcv_qty := p_total_primary_qty * l_uom_rate;
9465: l_doc_primary_qty := p_primary_qty * l_uom_rate;
9466: if g_debug = 'Y' then
9467: fnd_file.put_line(fnd_file.log, 'Document Received Quantity: '||l_doc_rcv_qty||' Document Primary Quantity: '||l_doc_primary_qty);
9468: fnd_file.put_line(fnd_file.log, 'Calling CST_Common_hooks.Get_NRtax_amount for MMT-REQ Req_line_id '||p_req_line_id);
9469: end if;
9470:
9471: /* Bug 6405593 :Added hook call to override the recoverable and Non-Recoverable

Line 9468: fnd_file.put_line(fnd_file.log, 'Calling CST_Common_hooks.Get_NRtax_amount for MMT-REQ Req_line_id '||p_req_line_id);

9464: l_doc_rcv_qty := p_total_primary_qty * l_uom_rate;
9465: l_doc_primary_qty := p_primary_qty * l_uom_rate;
9466: if g_debug = 'Y' then
9467: fnd_file.put_line(fnd_file.log, 'Document Received Quantity: '||l_doc_rcv_qty||' Document Primary Quantity: '||l_doc_primary_qty);
9468: fnd_file.put_line(fnd_file.log, 'Calling CST_Common_hooks.Get_NRtax_amount for MMT-REQ Req_line_id '||p_req_line_id);
9469: end if;
9470:
9471: /* Bug 6405593 :Added hook call to override the recoverable and Non-Recoverable
9472: taxes for ENCUMBRANCE REVERSAL*/

Line 9495: fnd_file.put_line(fnd_file.log, 'Error getting Enc Tax in CST_Common_hooks.Get_NRtax_amount at statement :'||l_stmt_num);

9491:
9492: IF (l_err_num <> 0) THEN
9493: -- Error occured
9494: IF G_DEBUG = 'Y' THEN
9495: fnd_file.put_line(fnd_file.log, 'Error getting Enc Tax in CST_Common_hooks.Get_NRtax_amount at statement :'||l_stmt_num);
9496: fnd_file.put_line(fnd_file.log, 'Error Code : '||l_err_code||' Error Message : '||x_return_message);
9497: END IF;
9498: RAISE process_error;
9499: END IF;

Line 9496: fnd_file.put_line(fnd_file.log, 'Error Code : '||l_err_code||' Error Message : '||x_return_message);

9492: IF (l_err_num <> 0) THEN
9493: -- Error occured
9494: IF G_DEBUG = 'Y' THEN
9495: fnd_file.put_line(fnd_file.log, 'Error getting Enc Tax in CST_Common_hooks.Get_NRtax_amount at statement :'||l_stmt_num);
9496: fnd_file.put_line(fnd_file.log, 'Error Code : '||l_err_code||' Error Message : '||x_return_message);
9497: END IF;
9498: RAISE process_error;
9499: END IF;
9500:

Line 9503: fnd_file.put_line(fnd_file.log,'Hook Used CST_Common_hooks.Get_NRtax_amount :'|| l_hook_used ||

9499: END IF;
9500:
9501:
9502: IF G_DEBUG = 'Y' THEN
9503: fnd_file.put_line(fnd_file.log,'Hook Used CST_Common_hooks.Get_NRtax_amount :'|| l_hook_used ||
9504: ' l_loc_recoverable_tax : '||l_loc_recoverable_tax||
9505: ' l_loc_non_recoverable_tax : '||l_loc_non_recoverable_tax);
9506: END IF;
9507:

Line 9541: fnd_file.put_line(fnd_file.log, 'Encumbrance Amount: '||x_encumbrance_amount);

9537: END IF;
9538: /* Added for Bug 6405593 */
9539:
9540: if g_debug = 'Y' then
9541: fnd_file.put_line(fnd_file.log, 'Encumbrance Amount: '||x_encumbrance_amount);
9542: fnd_file.put_line(fnd_file.log, 'CompEncumbrance_IntOrdersExp >>');
9543: end if;
9544:
9545: EXCEPTION

Line 9542: fnd_file.put_line(fnd_file.log, 'CompEncumbrance_IntOrdersExp >>');

9538: /* Added for Bug 6405593 */
9539:
9540: if g_debug = 'Y' then
9541: fnd_file.put_line(fnd_file.log, 'Encumbrance Amount: '||x_encumbrance_amount);
9542: fnd_file.put_line(fnd_file.log, 'CompEncumbrance_IntOrdersExp >>');
9543: end if;
9544:
9545: EXCEPTION
9546: WHEN FND_API.G_EXC_ERROR THEN

Line 9590: fnd_file.put_line(fnd_file.log, 'CompEncumbrance_IntOrdersExp (T) <<');

9586:
9587: x_return_status := FND_API.G_RET_STS_SUCCESS;
9588:
9589: if g_debug = 'Y' then
9590: fnd_file.put_line(fnd_file.log, 'CompEncumbrance_IntOrdersExp (T) <<');
9591: end if;
9592: l_stmt_num := 5;
9593:
9594: IF NOT FND_API.Compatible_API_Call (

Line 9640: fnd_file.put_line(fnd_file.log, 'Total Received Primary Qty: '||l_total_primary_qty);

9636: and trx_source_line_id = l_trx_source_line_id
9637: and costed_flag IS NULL ;
9638:
9639: if g_debug = 'Y' then
9640: fnd_file.put_line(fnd_file.log, 'Total Received Primary Qty: '||l_total_primary_qty);
9641: end if;
9642:
9643: /* Get Requisition Line ID */
9644: /* For Internal Order Requisition Receipt, this is the MMT.TRX_SOURCE_LINE_ID

Line 9697: fnd_file.put_line(fnd_file.log, 'Requisition Line ID: '||l_req_line_id);

9693: RETURN;
9694: END IF;
9695: END IF;
9696: if g_debug = 'Y' then
9697: fnd_file.put_line(fnd_file.log, 'Requisition Line ID: '||l_req_line_id);
9698: end if;
9699:
9700: l_primary_qty := abs(l_primary_qty);
9701: l_total_primary_qty := abs(l_total_primary_qty);

Line 9704: fnd_file.put_line(fnd_file.log, 'Total Received Primary Qty: '||l_total_primary_qty);

9700: l_primary_qty := abs(l_primary_qty);
9701: l_total_primary_qty := abs(l_total_primary_qty);
9702:
9703: if g_debug = 'Y' then
9704: fnd_file.put_line(fnd_file.log, 'Total Received Primary Qty: '||l_total_primary_qty);
9705: end if;
9706: l_stmt_num := 30;
9707: CompEncumbrance_IntOrdersExp (
9708: p_api_version => 1.0,

Line 9722: fnd_file.put_line(fnd_file.log, 'CompEncumbrance_IntOrdersExp (T) >>');

9718: x_return_status => x_return_status,
9719: x_return_message => x_return_message
9720: );
9721: if g_debug = 'Y' then
9722: fnd_file.put_line(fnd_file.log, 'CompEncumbrance_IntOrdersExp (T) >>');
9723: end if;
9724:
9725: EXCEPTION
9726: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 9804: fnd_file.put_line(fnd_file.log, '>>>i_txn_id: '||to_char(i_txn_id)||' MCACD: '||to_char(l_test_mcacd)||' Layer_id: '||to_char(i_layer_id));

9800: AND MCACD.level_type = CLCD.level_type);
9801:
9802:
9803: IF g_debug = 'Y' THEN
9804: fnd_file.put_line(fnd_file.log, '>>>i_txn_id: '||to_char(i_txn_id)||' MCACD: '||to_char(l_test_mcacd)||' Layer_id: '||to_char(i_layer_id));
9805: END IF;
9806:
9807:
9808: IF (l_test_clcd <> 0) THEN

Line 9809: fnd_file.put_line(fnd_file.log, 'There should not be details in CLCD if the insertion flag in MCACD is set to Y in the hook');

9805: END IF;
9806:
9807:
9808: IF (l_test_clcd <> 0) THEN
9809: fnd_file.put_line(fnd_file.log, 'There should not be details in CLCD if the insertion flag in MCACD is set to Y in the hook');
9810: raise insertion_flag_in_mcacd;
9811: END IF;
9812:
9813: EXCEPTION