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 524: fnd_file.put_line(fnd_file.log, '>>Calling CSTPAVCP.compute_actual_cost');

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

714: END IF;
715: END IF;
716: end if;
717: if (g_debug = 'Y') then
718: fnd_file.put_line(fnd_file.log,'>>Exiting Cost Processor');
719: end if;
720:
721: EXCEPTION
722: when process_error then

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

777: l_err_code := '';
778: l_err_msg := '';
779:
780: if (g_debug = 'Y') then
781: fnd_file.put_line(fnd_file.log,'Average Cost Update <<<');
782: end if;
783:
784: l_stmt_num := 10;
785: -- First insert records into mtl_cst_actual_cost_details.

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

1166: -- Error occured
1167: raise process_error;
1168: end if;
1169: if (g_debug = 'Y') then
1170: fnd_file.put_line(fnd_file.log,'Average Cost Update >>>');
1171: end if;
1172:
1173: EXCEPTION
1174: when neg_cost_error then

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

1245: l_new_cost := i_new_cost;
1246: l_stmt_num := 0;
1247:
1248: IF g_debug = 'Y' THEN
1249: fnd_file.put_line(fnd_file.log, 'Sub_Transfer <<<');
1250: END IF;
1251:
1252: /********************************************************************
1253: ** Figure out layer_change flag **

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

1269: l_layer_chg := 0;
1270: end if;
1271:
1272: if (g_debug = 'Y') then
1273: fnd_file.put_line(fnd_file.log,'Layer change: ' || to_char(l_layer_chg));
1274: end if;
1275:
1276: l_stmt_num := 20;
1277: select decode(inventory_asset_flag, 'Y',0,1)

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

1280: where inventory_item_id = i_item_id
1281: and organization_id = i_org_id;
1282:
1283: if (g_debug = 'Y') then
1284: fnd_file.put_line(fnd_file.log,'Expense Item: ' || to_char(l_exp_item));
1285: end if;
1286:
1287: l_stmt_num := 30;
1288:

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

1315:
1316: if (i_citw_flag = 1) then
1317: l_stmt_num := 42;
1318: if (g_debug = 'Y') then
1319: fnd_file.put_line(fnd_file.log,'Common Issue to WIP');
1320: end if;
1321:
1322: if(i_flow_schedule = 1) then
1323: -- cfm then use wip_flow_schedules

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

1323: -- cfm then use wip_flow_schedules
1324: -- class_type 1 and 3 : asset job, 4 : exp job
1325: l_stmt_num := 44;
1326: if (g_debug = 'Y') then
1327: fnd_file.put_line(fnd_file.log,'Flow Schedule');
1328: end if;
1329:
1330: select decode(wac.class_type, 1, 0,
1331: 3, 0,

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

1362: /* Changes for VMI. Adding Planning Transfer Transaction */
1363: elsif (i_txn_action_id IN (2,5,28)) then
1364: l_stmt_num := 46;
1365: if (g_debug = 'Y') then
1366: fnd_file.put_line(fnd_file.log,'Transfer Subinventory asset flag : ' || to_char(l_exp2));
1367: end if;
1368:
1369: select decode(asset_inventory,1,0,1)
1370: into l_exp2

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

1377: elsif(i_txn_action_id = 55 ) then
1378: l_stmt_num := 47;
1379: l_exp2 := l_exp1; /* Txfr sub asset flag is equal to from sub asset flag in cost grp txfrs */
1380: if (g_debug = 'Y') then
1381: fnd_file.put_line(fnd_file.log,'Transfer Subinventory asset flag : '||to_char(l_exp2));
1382: end if;
1383: else
1384: l_stmt_num := 48;
1385: l_exp2 := 0;

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

1402: l_from_qty :=-1 * i_txn_qty;
1403: end if;
1404:
1405: if (g_debug = 'Y') then
1406: fnd_file.put_line(fnd_file.log,'From layer ID :' || to_char(l_from_layer));
1407: fnd_file.put_line(fnd_file.log,'To Layer ID : ' || to_char(l_to_layer));
1408: fnd_file.put_line(fnd_file.log,'From subinv Asset flag : ' || to_char(l_exp1));
1409: fnd_file.put_line(fnd_file.log,'To subinv Asset flag : ' || to_char(l_exp2));
1410: end if;

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

1403: end if;
1404:
1405: if (g_debug = 'Y') then
1406: fnd_file.put_line(fnd_file.log,'From layer ID :' || to_char(l_from_layer));
1407: fnd_file.put_line(fnd_file.log,'To Layer ID : ' || to_char(l_to_layer));
1408: fnd_file.put_line(fnd_file.log,'From subinv Asset flag : ' || to_char(l_exp1));
1409: fnd_file.put_line(fnd_file.log,'To subinv Asset flag : ' || to_char(l_exp2));
1410: end if;
1411: -- Just in case i_txfr_layer_id is NULL, always set from and to layer

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

1404:
1405: if (g_debug = 'Y') then
1406: fnd_file.put_line(fnd_file.log,'From layer ID :' || to_char(l_from_layer));
1407: fnd_file.put_line(fnd_file.log,'To Layer ID : ' || to_char(l_to_layer));
1408: fnd_file.put_line(fnd_file.log,'From subinv Asset flag : ' || to_char(l_exp1));
1409: fnd_file.put_line(fnd_file.log,'To subinv Asset flag : ' || to_char(l_exp2));
1410: end if;
1411: -- Just in case i_txfr_layer_id is NULL, always set from and to layer
1412: -- to layer_id for same layer transfers.

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

1405: if (g_debug = 'Y') then
1406: fnd_file.put_line(fnd_file.log,'From layer ID :' || to_char(l_from_layer));
1407: fnd_file.put_line(fnd_file.log,'To Layer ID : ' || to_char(l_to_layer));
1408: fnd_file.put_line(fnd_file.log,'From subinv Asset flag : ' || to_char(l_exp1));
1409: fnd_file.put_line(fnd_file.log,'To subinv Asset flag : ' || to_char(l_exp2));
1410: end if;
1411: -- Just in case i_txfr_layer_id is NULL, always set from and to layer
1412: -- to layer_id for same layer transfers.
1413: l_stmt_num := 70;

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

1414: if (l_layer_chg = 0) then
1415: l_from_layer := i_layer_id;
1416: l_to_layer := i_layer_id;
1417: if (g_debug = 'Y') then
1418: fnd_file.put_line(fnd_file.log,'No Layer change');
1419: fnd_file.put_line(fnd_file.log,'From Layer : ' || to_char(l_from_layer));
1420: fnd_file.put_line(fnd_file.log,'To Layer : ' || to_char(l_to_layer));
1421: end if;
1422: end if;

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

1415: l_from_layer := i_layer_id;
1416: l_to_layer := i_layer_id;
1417: if (g_debug = 'Y') then
1418: fnd_file.put_line(fnd_file.log,'No Layer change');
1419: fnd_file.put_line(fnd_file.log,'From Layer : ' || to_char(l_from_layer));
1420: fnd_file.put_line(fnd_file.log,'To Layer : ' || to_char(l_to_layer));
1421: end if;
1422: end if;
1423:

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

1416: l_to_layer := i_layer_id;
1417: if (g_debug = 'Y') then
1418: fnd_file.put_line(fnd_file.log,'No Layer change');
1419: fnd_file.put_line(fnd_file.log,'From Layer : ' || to_char(l_from_layer));
1420: fnd_file.put_line(fnd_file.log,'To Layer : ' || to_char(l_to_layer));
1421: end if;
1422: end if;
1423:
1424: -- If we are changing layers, then need to create another layer information

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

1426: l_stmt_num := 80;
1427:
1428: if (l_layer_chg = 1) then
1429: if (g_debug = 'Y') then
1430: fnd_file.put_line(fnd_file.log,'Layer change');
1431: end if;
1432:
1433: insert into mtl_cst_actual_cost_details(
1434: transaction_id,

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

1900: IF i_txn_action_id IN (2,5,28,55)
1901: THEN
1902: IF g_debug = 'Y'
1903: THEN
1904: fnd_file.put_line(fnd_file.log,'Update mmt for receiving side');
1905: END IF;
1906:
1907: l_stmt_num := 190;
1908: SELECT transfer_transaction_id

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

1944: WHERE MMT.transaction_id = l_txf_txn_id
1945: AND MMT.primary_quantity > 0;
1946: END IF;
1947: IF g_debug = 'Y' THEN
1948: fnd_file.put_line(fnd_file.log, 'Sub_Transfer >>>');
1949: END IF;
1950:
1951: EXCEPTION
1952: when process_error then

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

2013:
2014: l_txn_qty := i_txn_qty;
2015:
2016: IF g_debug = 'Y' THEN
2017: fnd_file.put_line(fnd_file.log, 'Common_Issue_To_WIP <<<');
2018: END IF;
2019:
2020: -- No user entered new cost is allowed for common issue to wip
2021: l_new_cost := 0;

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

2317: if (l_err_num <> 0) then
2318: raise process_error;
2319: end if;
2320: IF g_debug = 'Y' THEN
2321: fnd_file.put_line(fnd_file.log, 'Common_Issue_To_WIP >>>');
2322: END IF;
2323:
2324: EXCEPTION
2325: when process_error then

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

2406:
2407: l_zero_cost_flag := -1;
2408:
2409: IF g_debug = 'Y' THEN
2410: fnd_file.put_line(fnd_file.log, '>>>Inside Compute_Actual_Cost');
2411: END IF;
2412: l_stmt_num := 10;
2413:
2414: --

Line 2426: 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));

2422: and organization_id = i_org_id
2423: /* and transaction_cost >= 0 */; -- modified for bug#3835412
2424:
2425: if (g_debug = 'Y') then
2426: 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));
2427: end if;
2428:
2429: if (l_txn_cost_exist > 0) then
2430:

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

2430:
2431: l_ret_val := 1;
2432: l_stmt_num := 20;
2433: if (g_debug = 'Y') then
2434: fnd_file.put_line(fnd_file.log,'>>>Insert into MCACD using MCTCD values');
2435: end if;
2436:
2437: --
2438: -- Make sure the mcacd should not have any -ve cost

Line 2497: 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));

2493: select count(*) into l_count
2494: from mtl_cst_actual_cost_details
2495: where transaction_id = i_txn_id
2496: and organization_id = i_org_id;
2497: 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));
2498: end if;
2499:
2500: else
2501: /* no transaction cost details. copy actual cost from current avg. *

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

2509: ** same. If detail rows do not exist in CST_LAYER_COST_DETAILS, **
2510: ** we will insert a TL material 0 cost layer. **
2511: ********************************************************************/
2512: if (g_debug = 'Y') then
2513: fnd_file.put_line(fnd_file.log,'>>>No Txn details in MCTCD');
2514: end if;
2515:
2516: l_stmt_num := 30;
2517:

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

2533: x_zero_cost_flag => l_zero_cost_flag
2534: );
2535:
2536: if (l_return_status <> fnd_api.g_ret_sts_success) then
2537: FND_FILE.put_line(FND_FILE.log, l_msg_data);
2538: l_api_message := 'get_zeroCostIssue_flag returned unexpected error';
2539: FND_MESSAGE.set_name('BOM','CST_API_MESSAGE');
2540: FND_MESSAGE.set_token('TEXT', l_api_message);
2541: FND_MSG_pub.add;

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

2542: raise fnd_api.g_exc_unexpected_error;
2543: end if;
2544:
2545: if (g_debug = 'Y') then
2546: FND_FILE.PUT_LINE(FND_FILE.LOG,'>>>Zero Cost Issue Flag:'|| to_char(l_zero_cost_flag));
2547: end if;
2548:
2549: l_stmt_num := 40;
2550: insert into mtl_cst_actual_cost_details(

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

2597: where layer_id = i_layer_id;
2598: else
2599: l_stmt_num := 50;
2600: if (g_debug = 'Y') then
2601: fnd_file.put_line(fnd_file.log,'>>>No cost values, Inserting zero cost in MCACD');
2602: end if;
2603:
2604: insert into mtl_cst_actual_cost_details(
2605: transaction_id,

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

2698: l_ret_val := 1;
2699: end if;
2700:
2701: /* IF g_debug = 'Y' THEN
2702: fnd_file.put_line(fnd_file.log, 'Compute_Actual_Cost >>>');
2703: END IF;*/
2704: return l_ret_val;
2705:
2706: EXCEPTION

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

2783: from mtl_parameters
2784: where organization_id= I_ORG_ID;
2785:
2786: IF g_debug = 'Y' THEN
2787: fnd_file.put_line(fnd_file.log, 'Apply_Material_Overhead <<<');
2788: END IF;
2789: l_earn_moh := 1;
2790: l_return_status := fnd_api.g_ret_sts_success;
2791: l_msg_count := 0;

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

2824:
2825: IF(l_earn_moh = 0) THEN
2826:
2827: IF g_debug = 'Y' THEN
2828: fnd_file.put_line(fnd_file.log, '---Material Overhead Absorption Overridden--');
2829: END IF;
2830:
2831: ELSE
2832:

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

3253: end if;
3254: END IF;
3255:
3256: IF g_debug = 'Y' THEN
3257: fnd_file.put_line(fnd_file.log, 'Apply_Material_Overhead >>>');
3258: END IF;
3259:
3260: EXCEPTION
3261: when avg_rates_no_ovhd then

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

3323: l_err_msg := '';
3324:
3325:
3326: IF g_debug = 'Y' THEN
3327: fnd_file.put_line(fnd_file.log, '>>>Inside Calc_Average_Cost');
3328: END IF;
3329: /********************************************************************
3330: ** Update mtl_cst_actual_cost_details and update the prior cost **
3331: ** to the current average for the elements that exists and insert **

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

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

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

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

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

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

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

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

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

3725: l_err_msg := '';
3726:
3727:
3728: IF g_debug = 'Y' THEN
3729: fnd_file.put_line(fnd_file.log, 'Current_Average_Cost <<<');
3730: END IF;
3731: /********************************************************************
3732: ** Update Mtl_Material_Transactions to set actual cost, prior **
3733: ** cost, new cost and prior costed quantity. **

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

3802: raise process_error;
3803: end if;
3804:
3805: IF g_debug = 'Y' THEN
3806: fnd_file.put_line(fnd_file.log, 'Current_Average_Cost >>>');
3807: END IF;
3808:
3809: EXCEPTION
3810: when process_error then

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

3862: l_err_code := '';
3863: l_err_msg := '';
3864:
3865: IF g_debug = 'Y' THEN
3866: fnd_file.put_line(fnd_file.log, '>>>>Inside Update_MMT');
3867: END IF;
3868: -- for item cost history
3869:
3870: l_stmt_num := 5;

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

4101: -- item cost history stuff for sub transfer
4102:
4103:
4104: /* IF g_debug = 'Y' THEN
4105: fnd_file.put_line(fnd_file.log, 'Update_MMT >>>');
4106: END IF;*/
4107: EXCEPTION
4108: when OTHERS then
4109: rollback;

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

4170: from mtl_parameters
4171: where organization_id= I_ORG_ID;
4172:
4173: IF g_debug = 'Y' THEN
4174: fnd_file.put_line(fnd_file.log, '>>>>Inside Update_Item_Cost');
4175: END IF;
4176: l_stmt_num := 10;
4177:
4178: -- Bug 4905189, added the calculation for total_value

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

4331: and cicd.organization_id = i_org_id
4332: and cicd.cost_type_id = i_cost_type);
4333:
4334: /* IF g_debug = 'Y' THEN
4335: fnd_file.put_line(fnd_file.log, 'Update_Item_Cost >>>');
4336: END IF;
4337: */
4338: EXCEPTION
4339: when others then

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

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

Line 4523: 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));

4519: from mtl_parameters
4520: where organization_id = l_to_org;
4521:
4522: IF g_debug = 'Y' THEN
4523: 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));
4524: fnd_file.put_line(fnd_file.log, '>>>Elemental Visibility: '||to_char(l_elemental_visible));
4525: END IF;
4526:
4527: l_stmt_num := 10;

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

4520: where organization_id = l_to_org;
4521:
4522: IF g_debug = 'Y' THEN
4523: 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));
4524: fnd_file.put_line(fnd_file.log, '>>>Elemental Visibility: '||to_char(l_elemental_visible));
4525: END IF;
4526:
4527: l_stmt_num := 10;
4528:

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

4561: and msi.secondary_inventory_name = mmt.subinventory_code;
4562: end if;
4563:
4564: IF g_debug = 'Y' THEN
4565: fnd_file.put_line(fnd_file.log, '>>>Calling Get_Snd_Rcv_UOM');
4566: END IF;
4567:
4568: get_snd_rcv_uom(i_item_id, l_from_org, l_to_org, l_snd_uom, l_rcv_uom,
4569: l_err_num, l_err_code, l_err_msg);

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

4571: raise process_error;
4572: end if;
4573:
4574: IF g_debug = 'Y' THEN
4575: fnd_file.put_line(fnd_file.log, '<< 4576: END IF;
4577:
4578: -- If the transaction organization id is not the organization id of this
4579: -- cost worker then we have to make sure this transaction record in mmt

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

4616: o_interorg_rec :=0;
4617: end if;
4618:
4619: IF g_debug = 'Y' THEN
4620: fnd_file.put_line(fnd_file.log, '>>>o_interorg_rec:'||to_char(o_interorg_rec));
4621: END IF;
4622:
4623: -- item cost history stuff
4624:

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

4722: and organization_id = l_std_org;
4723: end if;
4724: if (l_to_std_exp = 1) then
4725: if g_debug = 'Y' THEN
4726: fnd_file.put_line(fnd_file.log, 'Item is Expense in Receiving Std. Org');
4727: end if;
4728: elsif
4729: /* end for bug 3671538 */
4730: ((l_std_exp <> 1) or (l_std_from_org = 1) or

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

4874:
4875: if (l_earn_moh = 0 ) then
4876:
4877: if g_debug = 'Y' THEN
4878: fnd_file.put_line(fnd_file.log, '--Material Overhead Absorption overridden--');
4879: end if;
4880: else
4881: if g_debug = 'Y' then
4882: FND_FILE.PUT_LINE(fnd_file.log, to_char(l_stmt_num) || 'Insert into MACS from CICD');

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

4878: fnd_file.put_line(fnd_file.log, '--Material Overhead Absorption overridden--');
4879: end if;
4880: else
4881: if g_debug = 'Y' then
4882: FND_FILE.PUT_LINE(fnd_file.log, to_char(l_stmt_num) || 'Insert into MACS from CICD');
4883: end if;
4884: Insert into mtl_actual_cost_subelement(
4885: layer_id,
4886: transaction_id,

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

4973: l_txn_update_id := i_txn_id;
4974: end if;
4975:
4976: IF g_debug = 'Y' THEN
4977: fnd_file.put_line(fnd_file.log, '>>>Transaction update id'||to_char(l_txn_update_id));
4978: END IF;
4979:
4980:
4981: -- If we are shipping from a standard cost org to an average cost org, the

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

5042: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
5043:
5044: 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
5045: IF g_debug = 'Y' THEN
5046: fnd_file.put_line(fnd_file.log, '>>>Conditions met to call the actual cost hook');
5047: fnd_file.put_line(fnd_file.log, '>>>Calling the actual cost hook');
5048: END IF;
5049: l_cost_hook_io := CSTPACHK.actual_cost_hook(i_org_id => i_org_id,
5050: i_txn_id => i_txn_id,

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

5043:
5044: 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
5045: IF g_debug = 'Y' THEN
5046: fnd_file.put_line(fnd_file.log, '>>>Conditions met to call the actual cost hook');
5047: fnd_file.put_line(fnd_file.log, '>>>Calling the actual cost hook');
5048: END IF;
5049: l_cost_hook_io := CSTPACHK.actual_cost_hook(i_org_id => i_org_id,
5050: i_txn_id => i_txn_id,
5051: i_layer_id => i_layer_id,

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

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

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

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

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

5092: group by layer_id;
5093:
5094: ELSE
5095: IF g_debug = 'Y' THEN
5096: fnd_file.put_line(fnd_file.log, '>>>Hook not used');
5097: END IF;
5098: select item_cost, layer_id
5099: into l_snd_txn_cost, l_from_layer_id
5100: from cst_quantity_layers

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

5103: and cost_group_id = l_from_cost_grp;
5104: END IF;
5105: ELSE
5106: IF g_debug = 'Y' THEN
5107: fnd_file.put_line(fnd_file.log, '>>>Hook not used');
5108: END IF;
5109:
5110: select item_cost, layer_id
5111: into l_snd_txn_cost, l_from_layer_id

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

5115: and cost_group_id = l_from_cost_grp;
5116: END IF;
5117: end if;
5118: IF g_debug = 'Y' THEN
5119: fnd_file.put_line(fnd_file.log, '>>>l_snd_txn_cost: '||l_snd_txn_cost||' layer_id: '||l_from_layer_id);
5120: END IF;
5121:
5122: o_hook_used:=l_cost_hook_io;
5123:

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

5125: -- receiving_currency = sending_currency * conversion_rate
5126: l_stmt_num := 140;
5127:
5128: IF g_debug = 'Y' THEN
5129: fnd_file.put_line(fnd_file.log, '>>>Calling Get_Snd_Rcv_Rate');
5130: END IF;
5131:
5132: get_snd_rcv_rate(i_txn_id, l_from_org, l_to_org,
5133: l_snd_sob_id, l_snd_curr, l_rcv_sob_id, l_rcv_curr,

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

5139: raise process_error;
5140: end if;
5141:
5142: IF g_debug = 'Y' THEN
5143: fnd_file.put_line(fnd_file.log, '<< 5144: END IF;
5145:
5146:
5147: -- Need to get UOM conversion

Line 5185: 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));

5181: from mtl_material_transactions
5182: where transaction_id = i_txn_id;
5183:
5184: IF g_debug = 'Y' THEN
5185: 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));
5186: END IF;
5187:
5188: /* TPRICE: If the transfer pricing option is yes, set transfer credit to be zero */
5189: if (i_tprice_option <> 0) then

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

5188: /* TPRICE: If the transfer pricing option is yes, set transfer credit to be zero */
5189: if (i_tprice_option <> 0) then
5190: l_txfr_cost := 0;
5191: IF g_debug = 'Y' THEN
5192: fnd_file.put_line(fnd_file.log, '>>>Transfer price active setting transfer credit to zero');
5193: END IF;
5194: end if;
5195:
5196: -- change for bug 2827548

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

5212: l_txfr_cost := l_txfr_cost * l_conv_rate;
5213: end if;
5214:
5215: IF g_debug = 'Y' THEN
5216: fnd_file.put_line(fnd_file.log, '>>>Receiving cost: '||to_char(l_rcv_txn_cost));
5217: END IF;
5218:
5219: /* TPRICE: If the transfter pricing option is to treat the price as the incoming cost,
5220: insert price into MCTCD */

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

5221: if (i_tprice_option = 2) then
5222: l_rcv_txn_cost := i_txf_price;
5223: l_elemental_visible := 'N';
5224: IF g_debug = 'Y' THEN
5225: fnd_file.put_line(fnd_file.log, '>>>Transfer price as incomming cost, hook will not be used');
5226: END IF;
5227: end if;
5228:
5229: if (l_elemental_visible = 'Y') then

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

5227: end if;
5228:
5229: if (l_elemental_visible = 'Y') then
5230: IF g_debug = 'Y' THEN
5231: fnd_file.put_line(fnd_file.log, '>>>Calling interorg_elemental_detail');
5232: END IF;
5233: interorg_elemental_detail(i_txn_id, l_compute_txn_cost,l_cost_type_id, l_from_layer_id, i_item_id,
5234: l_txn_update_id,l_from_org, l_to_org,
5235: l_snd_qty,l_txfr_cost,l_trans_cost,l_conv_rate,l_um_rate,

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

5238: if (l_err_num <> 0) then
5239: raise process_error;
5240: end if;
5241: IF g_debug = 'Y' THEN
5242: fnd_file.put_line(fnd_file.log, '<< 5243: END IF;
5244: else
5245: insert into mtl_cst_txn_cost_details (
5246: transaction_id,

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

5599: end if;
5600: end if;
5601: /* end bug 3761538 */
5602: /* IF g_debug = 'Y' THEN
5603: fnd_file.put_line(fnd_file.log, 'Interorg >>>');
5604: END IF;
5605: */
5606:
5607: EXCEPTION

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

5657: l_err_code := '';
5658: l_err_msg := '';
5659:
5660: IF g_debug = 'Y' THEN
5661: fnd_file.put_line(fnd_file.log, '>>>>Inside Get_Snd_Rcv_Rate');
5662: END IF;
5663: l_stmt_num := 10;
5664:
5665: /* The following FROM clause in the select statement has been commented out

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

5742: o_conv_rate := l_conv_rate;
5743: o_conv_date := l_conv_date;
5744:
5745: /* IF g_debug = 'Y' THEN
5746: fnd_file.put_line(fnd_file.log, 'Get_Snd_Rcv_Rate >>>');
5747: END IF; */
5748: EXCEPTION
5749:
5750: when gl_currency_api.NO_RATE then

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

5783: l_err_num := 0;
5784: l_err_code := '';
5785: l_err_msg := '';
5786: IF g_debug = 'Y' THEN
5787: fnd_file.put_line(fnd_file.log, '>>>>Inside Get_Snd_Rcv_UOM');
5788: END IF;
5789:
5790: l_stmt_num := 10;
5791:

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

5803: where organization_id = i_to_org
5804: and inventory_item_id = i_item_id;
5805:
5806: /* IF g_debug = 'Y' THEN
5807: fnd_file.put_line(fnd_file.log, 'Get_Snd_Rcv_UOM >>>');
5808: END IF; */
5809:
5810: EXCEPTION
5811: when others then

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

5894: l_err_code := '';
5895: l_err_msg := '';
5896:
5897: IF g_debug = 'Y' THEN
5898: fnd_file.put_line(fnd_file.log, 'Borrow_Cost <<<');
5899: END IF;
5900: l_stmt_num := 10;
5901:
5902: -- initialize array with 0

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

6052:
6053: end if; -- end checking hook
6054: end loop; -- end for looping 10 elements
6055: IF g_debug = 'Y' THEN
6056: fnd_file.put_line(fnd_file.log, 'Borrow_Cost >>>');
6057: END IF;
6058: EXCEPTION
6059: when others then
6060: rollback;

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

6095: l_err_code := '';
6096: l_err_msg := '';
6097:
6098: IF g_debug = 'Y' THEN
6099: fnd_file.put_line(fnd_file.log, 'Store_BP_Variance <<<');
6100: END IF;
6101:
6102:
6103:

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

6133:
6134: end loop; -- end cost element
6135: end loop; -- end level_type loop
6136: IF g_debug = 'Y' THEN
6137: fnd_file.put_line(fnd_file.log, 'Store_BP_Variance >>>');
6138: END IF;
6139: EXCEPTION
6140: when others then
6141: rollback;

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

6183: l_from_cost_org NUMBER; /* bugfix 3048258 */
6184: BEGIN
6185:
6186: IF g_debug = 'Y' THEN
6187: fnd_file.put_line(fnd_file.log, '>>>>Inside Interorg_Elemental_Detail');
6188: END IF;
6189: -- Insert detail elemental cost into mctcd.
6190: -- Based on the from_org :
6191: -- * If from_org is a standard org (l_compute_txn_cost=1),

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

6203: if (i_compute_txn_cost = 1) then
6204: l_stmt_num := 10;
6205:
6206: IF g_debug = 'Y' THEN
6207: fnd_file.put_line(fnd_file.log, '>>>>From organization is a standard org');
6208: END IF;
6209:
6210: /* Added for bugfix 3048258 */
6211: select cost_organization_id

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

6303: from cst_layer_cost_details clcd
6304: where clcd.layer_id = i_from_layer_id;
6305: ELSE
6306: IF g_debug = 'Y' THEN
6307: fnd_file.put_line(fnd_file.log, '>>>>Hook has been used, inserting in MCTCD from MCACD');
6308: END IF;
6309: insert into mtl_cst_txn_cost_details (
6310: transaction_id,
6311: organization_id,

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

6488: 0);
6489: end if;
6490:
6491: IF g_debug = 'Y' THEN
6492: fnd_file.put_line(fnd_file.log, 'Interorg_Elemental_Detail >>>');
6493: END IF;
6494: EXCEPTION
6495: when process_error then
6496: o_err_num := l_err_num;

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

6615: ORDER BY mmt.transaction_id;
6616:
6617: BEGIN
6618: IF g_debug = 'Y' THEN
6619: fnd_file.put_line(fnd_file.log, 'Cost_Acct_Events <<<');
6620: END IF;
6621:
6622: -------------------------------------------------------------------------
6623: -- Establish savepoint

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

6734: l_log_in_phy := 0;
6735: end if;
6736:
6737: if (g_debug = 'Y') then
6738: fnd_file.put_line (fnd_file.log, 'Parent transaction Type (1-physical, 2-logical):' || l_parent_transaction_type);
6739: fnd_file.put_line (fnd_file.log, 'Logical transaction in physical org (0-no 1=yes):' || l_log_in_phy );
6740: end if;
6741:
6742: l_stmt_num := 35;

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

6735: end if;
6736:
6737: if (g_debug = 'Y') then
6738: fnd_file.put_line (fnd_file.log, 'Parent transaction Type (1-physical, 2-logical):' || l_parent_transaction_type);
6739: fnd_file.put_line (fnd_file.log, 'Logical transaction in physical org (0-no 1=yes):' || l_log_in_phy );
6740: end if;
6741:
6742: l_stmt_num := 35;
6743:

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

6826: end if;
6827: end if;
6828:
6829: if (g_debug = 'Y') then
6830: fnd_file.put_line (fnd_file.log, 'Layer id: ' || l_layer_id);
6831: fnd_file.put_line (fnd_file.log, 'Transaction id: ' || c_mmt_txn_rec.transaction_id);
6832: end if;
6833: l_stmt_num := 41;
6834:

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

6827: end if;
6828:
6829: if (g_debug = 'Y') then
6830: fnd_file.put_line (fnd_file.log, 'Layer id: ' || l_layer_id);
6831: fnd_file.put_line (fnd_file.log, 'Transaction id: ' || c_mmt_txn_rec.transaction_id);
6832: end if;
6833: l_stmt_num := 41;
6834:
6835:

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

6882: FROM mtl_cst_txn_cost_details ctcd
6883: WHERE transaction_id = c_mmt_txn_rec.transaction_id;
6884:
6885: if (g_debug = 'Y') then
6886: fnd_file.put_line (fnd_file.log, 'Inserted in mcacd:' || sql%rowcount);
6887: end if;
6888:
6889: /* Update MMT */
6890:

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

6940:
6941:
6942: if (l_error_num <> 0 ) then
6943: if (g_debug = 'Y') then
6944: fnd_file.put_line (fnd_file.log, 'Error Calling cost_txn');
6945: end if;
6946: raise fnd_api.g_exc_error;
6947: end if;
6948:

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

6995: end if;
6996:
6997:
6998: IF g_debug = 'Y' THEN
6999: fnd_file.put_line(fnd_file.log, 'Cost_Acct_Events >>>');
7000: END IF;
7001:
7002: EXCEPTION
7003: when fnd_api.g_exc_error then

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

7154:
7155: BEGIN
7156:
7157: IF g_debug = 'Y' THEN
7158: fnd_file.put_line(fnd_file.log, 'Compute_MCACD_Costs <<<');
7159: END IF;
7160:
7161: l_err_code := '';
7162: l_err_msg := '';

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

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

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

7679: x_layer_id := l_layer_id ;
7680:
7681:
7682: IF g_debug = 'Y' THEN
7683: fnd_file.put_line(fnd_file.log, 'Compute_MCACD_Costs >>>');
7684: END IF;
7685:
7686: EXCEPTION
7687:

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

7776: l_err_msg := '';
7777:
7778: l_stmt_num := 10;
7779: IF g_debug = 'Y' THEN
7780: fnd_file.put_line(fnd_file.log, 'Payback_Variance <<<');
7781: END IF;
7782:
7783: -- initialize array with 0
7784:

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

7848: and mcacd.layer_id = i_from_layer;
7849: end loop;
7850:
7851: IF g_debug = 'Y' THEN
7852: fnd_file.put_line(fnd_file.log, 'Payback_Variance >>>');
7853: END IF;
7854: EXCEPTION
7855: when others then
7856: rollback;

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

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

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

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

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

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

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

8041: RETURN;
8042: ELSIF l_pd_xfer_ind = 'Y'
8043: THEN
8044: IF g_debug = 'Y' THEN
8045: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Process/Discrete xfer: Receiving Org is Discrete Org.');
8046: END IF;
8047: END IF;
8048: -- End bug 5349860
8049:

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

8052: -- For these transactions, exit out the procedure. These will
8053: -- be costed in a manner similar to before the upgrade.
8054:
8055: IF l_logical_txn_id IS NULL THEN
8056: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Logical Receipt Transaction not seeded');
8057: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Pre-upgrade transaction');
8058: IF g_debug = 'Y' THEN
8059: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8060: END IF;

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

8053: -- be costed in a manner similar to before the upgrade.
8054:
8055: IF l_logical_txn_id IS NULL THEN
8056: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Logical Receipt Transaction not seeded');
8057: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Pre-upgrade transaction');
8058: IF g_debug = 'Y' THEN
8059: FND_FILE.PUT_LINE(FND_FILE.LOG, 'CSTPAVCP.Cost_LogicalSOReceipt >>>');
8060: END IF;
8061: RETURN;

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

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

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

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

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

8147: WHERE
8148: TRANSACTION_ID = l_logical_txn_id;
8149:
8150: IF ( g_debug = 'Y' ) THEN
8151: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Logical Receipt Txn: '||to_char(l_logical_txn_id));
8152: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receipt Org: '||to_char(l_logical_org_id));
8153: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receipt Cost Group: '||to_char(l_logical_cost_group_id));
8154: END IF;
8155:

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

8148: TRANSACTION_ID = l_logical_txn_id;
8149:
8150: IF ( g_debug = 'Y' ) THEN
8151: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Logical Receipt Txn: '||to_char(l_logical_txn_id));
8152: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receipt Org: '||to_char(l_logical_org_id));
8153: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receipt Cost Group: '||to_char(l_logical_cost_group_id));
8154: END IF;
8155:
8156: -- Get Expense subinventory information

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

8149:
8150: IF ( g_debug = 'Y' ) THEN
8151: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Logical Receipt Txn: '||to_char(l_logical_txn_id));
8152: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receipt Org: '||to_char(l_logical_org_id));
8153: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Receipt Cost Group: '||to_char(l_logical_cost_group_id));
8154: END IF;
8155:
8156: -- Get Expense subinventory information
8157: -- 1 for expense; 0 for not expense

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

8164:
8165: CLOSE c_exp_sub;
8166:
8167: IF ( g_debug = 'Y' ) THEN
8168: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Expense Subinventory: '||to_char(l_exp_sub));
8169: END IF;
8170:
8171:
8172: -- ===================================================================

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

8206: l_debit_account := l_db_account;
8207: END IF;
8208:
8209: IF ( g_debug = 'Y' ) THEN
8210: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Debit Account: '||to_char(l_debit_account));
8211: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Account Line Type: '||to_char(l_dr_acct_line_type));
8212: END IF;
8213:
8214:

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

8207: END IF;
8208:
8209: IF ( g_debug = 'Y' ) THEN
8210: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Debit Account: '||to_char(l_debit_account));
8211: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Account Line Type: '||to_char(l_dr_acct_line_type));
8212: END IF;
8213:
8214:
8215: l_stmt_num := 30;

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

8262: l_layer_id := -1;
8263: END IF;
8264:
8265: IF g_debug = 'Y' THEN
8266: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Layer_ID: '||to_char(l_layer_id));
8267: END IF;
8268:
8269: -- Get Cost from parent transaction's MCACD.
8270: -- This is in parent org's primary currency

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

8333: -- Get the Conversion Type from the profile
8334: FND_PROFILE.get('CURRENCY_CONVERSION_TYPE', l_conversion_type);
8335:
8336: IF g_debug = 'Y' THEN
8337: fnd_file.put_line(fnd_file.log, 'Currency Conversion Type: '|| l_conversion_type);
8338: END IF;
8339:
8340: l_conversion_rate := GL_Currency_Api.Get_Rate(l_set_of_books_id,
8341: l_sending_curr,

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

8342: l_txn_date,
8343: l_conversion_type);
8344:
8345: IF l_conversion_rate IS NULL THEN
8346: FND_FILE.put_line(FND_FILE.log, 'Currency Conversion Rate not defined: ');
8347: FND_FILE.put_line(FND_FILE.log, 'Currency From: '||l_sending_curr);
8348: FND_FILE.put_line(FND_FILE.log, 'Date: '||to_char(l_txn_date, 'DD-MON-YYYY'));
8349: FND_FILE.put_line(FND_FILE.log, 'Conversion Type: '||l_conversion_type);
8350: FND_FILE.put_line(FND_FILE.log, 'Please define the rate and resubmit transaction');

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

8343: l_conversion_type);
8344:
8345: IF l_conversion_rate IS NULL THEN
8346: FND_FILE.put_line(FND_FILE.log, 'Currency Conversion Rate not defined: ');
8347: FND_FILE.put_line(FND_FILE.log, 'Currency From: '||l_sending_curr);
8348: FND_FILE.put_line(FND_FILE.log, 'Date: '||to_char(l_txn_date, 'DD-MON-YYYY'));
8349: FND_FILE.put_line(FND_FILE.log, 'Conversion Type: '||l_conversion_type);
8350: FND_FILE.put_line(FND_FILE.log, 'Please define the rate and resubmit transaction');
8351: RAISE NO_CURR_CONV_RATE_FOUND;

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

8344:
8345: IF l_conversion_rate IS NULL THEN
8346: FND_FILE.put_line(FND_FILE.log, 'Currency Conversion Rate not defined: ');
8347: FND_FILE.put_line(FND_FILE.log, 'Currency From: '||l_sending_curr);
8348: FND_FILE.put_line(FND_FILE.log, 'Date: '||to_char(l_txn_date, 'DD-MON-YYYY'));
8349: FND_FILE.put_line(FND_FILE.log, 'Conversion Type: '||l_conversion_type);
8350: FND_FILE.put_line(FND_FILE.log, 'Please define the rate and resubmit transaction');
8351: RAISE NO_CURR_CONV_RATE_FOUND;
8352: END IF;

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

8345: IF l_conversion_rate IS NULL THEN
8346: FND_FILE.put_line(FND_FILE.log, 'Currency Conversion Rate not defined: ');
8347: FND_FILE.put_line(FND_FILE.log, 'Currency From: '||l_sending_curr);
8348: FND_FILE.put_line(FND_FILE.log, 'Date: '||to_char(l_txn_date, 'DD-MON-YYYY'));
8349: FND_FILE.put_line(FND_FILE.log, 'Conversion Type: '||l_conversion_type);
8350: FND_FILE.put_line(FND_FILE.log, 'Please define the rate and resubmit transaction');
8351: RAISE NO_CURR_CONV_RATE_FOUND;
8352: END IF;
8353:

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

8346: FND_FILE.put_line(FND_FILE.log, 'Currency Conversion Rate not defined: ');
8347: FND_FILE.put_line(FND_FILE.log, 'Currency From: '||l_sending_curr);
8348: FND_FILE.put_line(FND_FILE.log, 'Date: '||to_char(l_txn_date, 'DD-MON-YYYY'));
8349: FND_FILE.put_line(FND_FILE.log, 'Conversion Type: '||l_conversion_type);
8350: FND_FILE.put_line(FND_FILE.log, 'Please define the rate and resubmit transaction');
8351: RAISE NO_CURR_CONV_RATE_FOUND;
8352: END IF;
8353:
8354: l_actual_cost := l_actual_cost * l_conversion_rate;

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

8384: RAISE COST_HOOK_ACCOUNT_ERROR;
8385: END IF;
8386:
8387: IF g_debug = 'Y' THEN
8388: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Credit Account: '||to_char(l_credit_account));
8389: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Account Line Type: '||to_char(l_cr_acct_line_type));
8390: END IF;
8391:
8392: IF l_credit_account = -1 THEN

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

8385: END IF;
8386:
8387: IF g_debug = 'Y' THEN
8388: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Credit Account: '||to_char(l_credit_account));
8389: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Account Line Type: '||to_char(l_cr_acct_line_type));
8390: END IF;
8391:
8392: IF l_credit_account = -1 THEN
8393: -- default account behavior

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

8414:
8415: END IF;
8416:
8417: IF g_debug = 'Y' THEN
8418: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Actual_Cost or transfer price for process/discrete xfer: '||to_char(l_actual_cost));
8419: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Credit_account: '||to_char(l_credit_account));
8420: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Debit_account: '||to_char(l_debit_account));
8421: END IF;
8422:

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

8415: END IF;
8416:
8417: IF g_debug = 'Y' THEN
8418: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Actual_Cost or transfer price for process/discrete xfer: '||to_char(l_actual_cost));
8419: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Credit_account: '||to_char(l_credit_account));
8420: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Debit_account: '||to_char(l_debit_account));
8421: END IF;
8422:
8423: -- Insert Logical Transaction details into MCACD

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

8416:
8417: IF g_debug = 'Y' THEN
8418: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Actual_Cost or transfer price for process/discrete xfer: '||to_char(l_actual_cost));
8419: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Credit_account: '||to_char(l_credit_account));
8420: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Debit_account: '||to_char(l_debit_account));
8421: END IF;
8422:
8423: -- Insert Logical Transaction details into MCACD
8424:

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

8475: -- Insert Debit Entry
8476: l_stmt_num := 110;
8477:
8478: IF g_debug = 'Y' THEN
8479: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Dr Exp Account with ' || l_actual_cost * l_primary_quantity || ' ' || l_pri_curr);
8480: END IF;
8481:
8482: CSTPACDP.INSERT_ACCOUNT(
8483: l_logical_org_id,

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

8515: -- Insert Credit Entry
8516: l_stmt_num := 120;
8517:
8518: IF g_debug = 'Y' THEN
8519: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Cr Payables Account with ' || -1 * l_actual_cost * l_primary_quantity || ' ' || l_pri_curr);
8520: END IF;
8521:
8522: CSTPACDP.INSERT_ACCOUNT(
8523: l_logical_org_id,

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

8630: TRANSACTION_ID = l_logical_txn_id;
8631:
8632:
8633: IF g_debug = 'Y' THEN
8634: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Creating XLA Event');
8635: END IF;
8636:
8637: --
8638: -- Bug 5349860: Process/Discrete Xfer

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

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

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

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

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

8701: WHEN INSERT_MCACD_ERROR THEN
8702: x_err_num := -1;
8703: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt( '||to_char(l_stmt_num)||' ): '||'Error Inserting into MCACD: '||SQLERRM;
8704: x_err_msg := x_err_code;
8705: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);
8706: WHEN INSERT_ACCT_ERROR THEN
8707: x_err_num := -1;
8708: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt( '||to_char(l_stmt_num)||' ): '||'Error in Insert_Account: ';
8709: x_err_msg := x_err_code;

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

8706: WHEN INSERT_ACCT_ERROR THEN
8707: x_err_num := -1;
8708: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt( '||to_char(l_stmt_num)||' ): '||'Error in Insert_Account: ';
8709: x_err_msg := x_err_code;
8710: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);
8711:
8712: WHEN COST_HOOK_ACCOUNT_ERROR THEN
8713: x_err_num := l_err_num;
8714: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt' || l_err_code || 'Error in cost hook get_account_id' ;

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

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

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

8713: x_err_num := l_err_num;
8714: x_err_code := 'CSTPAVCP.Cost_LogicalSOReceipt' || l_err_code || 'Error in cost hook get_account_id' ;
8715: x_err_msg := l_err_msg;
8716: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_code);
8717: FND_FILE.PUT_LINE(FND_FILE.LOG, x_err_msg);
8718:
8719: WHEN FND_API.g_exc_unexpected_error THEN
8720: rollback;
8721: UPDATE mtl_material_transactions

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

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

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

8838: l_snd_qty := o_txn_qty;
8839: l_std_exp := 0;
8840:
8841: IF g_debug = 'Y' THEN
8842: fnd_file.put_line(fnd_file.log, 'Cost_Logical_itr_receipt <<<');
8843: fnd_file.put_line(fnd_file.log, '- Process/Discrete Transfer -');
8844: END IF;
8845:
8846: l_earn_moh := 1;

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

8839: l_std_exp := 0;
8840:
8841: IF g_debug = 'Y' THEN
8842: fnd_file.put_line(fnd_file.log, 'Cost_Logical_itr_receipt <<<');
8843: fnd_file.put_line(fnd_file.log, '- Process/Discrete Transfer -');
8844: END IF;
8845:
8846: l_earn_moh := 1;
8847: l_return_status := fnd_api.g_ret_sts_success;

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

8969: -- while creating MMT row for this logical transactions.
8970: -- For details refer to: INV_LOGICAL_TRANSACTIONS_PUB.create_opm_disc_logical_trx
8971: --
8972: IF g_debug = 'Y' THEN
8973: fnd_file.put_line(fnd_file.log, 'TxnOrg: ' || i_txn_org_id || ' Item: ' || i_item_id);
8974: fnd_file.put_line(fnd_file.log, 'fromOrg: ' || l_from_org || ' toOrg: ' || l_to_org);
8975: fnd_file.put_line(fnd_file.log, 'fromCG: ' || l_from_cost_grp || ' toCG: ' || l_to_cost_grp);
8976: fnd_file.put_line(fnd_file.log, 'Transaction Action: ' || i_txn_action_id);
8977: fnd_file.put_line(fnd_file.log, 'Transfer price options: ' || i_tprice_option ||

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

8970: -- For details refer to: INV_LOGICAL_TRANSACTIONS_PUB.create_opm_disc_logical_trx
8971: --
8972: IF g_debug = 'Y' THEN
8973: fnd_file.put_line(fnd_file.log, 'TxnOrg: ' || i_txn_org_id || ' Item: ' || i_item_id);
8974: fnd_file.put_line(fnd_file.log, 'fromOrg: ' || l_from_org || ' toOrg: ' || l_to_org);
8975: fnd_file.put_line(fnd_file.log, 'fromCG: ' || l_from_cost_grp || ' toCG: ' || l_to_cost_grp);
8976: fnd_file.put_line(fnd_file.log, 'Transaction Action: ' || i_txn_action_id);
8977: fnd_file.put_line(fnd_file.log, 'Transfer price options: ' || i_tprice_option ||
8978: ' Transfer Price: ' || i_txf_price ||

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

8971: --
8972: IF g_debug = 'Y' THEN
8973: fnd_file.put_line(fnd_file.log, 'TxnOrg: ' || i_txn_org_id || ' Item: ' || i_item_id);
8974: fnd_file.put_line(fnd_file.log, 'fromOrg: ' || l_from_org || ' toOrg: ' || l_to_org);
8975: fnd_file.put_line(fnd_file.log, 'fromCG: ' || l_from_cost_grp || ' toCG: ' || l_to_cost_grp);
8976: fnd_file.put_line(fnd_file.log, 'Transaction Action: ' || i_txn_action_id);
8977: fnd_file.put_line(fnd_file.log, 'Transfer price options: ' || i_tprice_option ||
8978: ' Transfer Price: ' || i_txf_price ||
8979: ' Trp Cost: ' || l_trans_cost || ' Qty: ' || l_snd_qty);

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

8972: IF g_debug = 'Y' THEN
8973: fnd_file.put_line(fnd_file.log, 'TxnOrg: ' || i_txn_org_id || ' Item: ' || i_item_id);
8974: fnd_file.put_line(fnd_file.log, 'fromOrg: ' || l_from_org || ' toOrg: ' || l_to_org);
8975: fnd_file.put_line(fnd_file.log, 'fromCG: ' || l_from_cost_grp || ' toCG: ' || l_to_cost_grp);
8976: fnd_file.put_line(fnd_file.log, 'Transaction Action: ' || i_txn_action_id);
8977: fnd_file.put_line(fnd_file.log, 'Transfer price options: ' || i_tprice_option ||
8978: ' Transfer Price: ' || i_txf_price ||
8979: ' Trp Cost: ' || l_trans_cost || ' Qty: ' || l_snd_qty);
8980: END IF;

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

8973: fnd_file.put_line(fnd_file.log, 'TxnOrg: ' || i_txn_org_id || ' Item: ' || i_item_id);
8974: fnd_file.put_line(fnd_file.log, 'fromOrg: ' || l_from_org || ' toOrg: ' || l_to_org);
8975: fnd_file.put_line(fnd_file.log, 'fromCG: ' || l_from_cost_grp || ' toCG: ' || l_to_cost_grp);
8976: fnd_file.put_line(fnd_file.log, 'Transaction Action: ' || i_txn_action_id);
8977: fnd_file.put_line(fnd_file.log, 'Transfer price options: ' || i_tprice_option ||
8978: ' Transfer Price: ' || i_txf_price ||
8979: ' Trp Cost: ' || l_trans_cost || ' Qty: ' || l_snd_qty);
8980: END IF;
8981:

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

9006:
9007: l_new_txn_cost := (l_snd_txn_cost * abs(l_snd_qty) + l_trans_cost) / abs(l_snd_qty);
9008:
9009: IF g_debug = 'Y' THEN
9010: fnd_file.put_line(fnd_file.log, 'Updating trx: ' || i_txn_id || ' with trxCost: ' || l_new_txn_cost);
9011: END IF;
9012:
9013: l_stmt_num := 50;
9014: Update mtl_material_transactions

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

9018: elsif (i_txn_action_id = 12 AND i_fob_point = 1)
9019: then
9020:
9021: IF g_debug = 'Y' THEN
9022: fnd_file.put_line(fnd_file.log, 'Updating trx: ' || i_txn_id || ' with trxCost: ' || l_rcv_txn_cost);
9023: END IF;
9024:
9025: l_stmt_num := 70;
9026: Update mtl_material_transactions

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

9032: (i_txn_action_id = 12 AND i_fob_point = 2))
9033: then
9034:
9035: IF g_debug = 'Y' THEN
9036: fnd_file.put_line(fnd_file.log, 'inserting to MCTCD for txn: ' || i_txn_id || '. trxCost: ' || l_rcv_txn_cost);
9037: END IF;
9038:
9039: l_stmt_num := 80;
9040: insert into mtl_cst_txn_cost_details (

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

9090: * Bug 5631478: unique constraint violation because of this insert.
9091: * Same insert is being done in compute_actual_cost procedure
9092: *
9093: IF g_debug = 'Y' THEN
9094: fnd_file.put_line(fnd_file.log, 'inserting to MCACD for IO Issue to exp txn');
9095: END IF;
9096:
9097: insert into mtl_cst_actual_cost_details(
9098: transaction_id,

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

9146:
9147: END IF;
9148:
9149: IF g_debug = 'Y' THEN
9150: fnd_file.put_line(fnd_file.log, 'Cost Logical Intransit Receipt >>>');
9151: END IF;
9152:
9153: EXCEPTION
9154: when others then

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

9200:
9201: x_return_status := FND_API.G_RET_STS_SUCCESS;
9202:
9203: if g_debug = 'Y' then
9204: fnd_file.put_line(fnd_file.log, 'CompEncumbrance_IntOrdersExp << ');
9205: end if;
9206:
9207: l_stmt_num := 5;
9208:

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

9236: and rd.requisition_line_id = rl.requisition_line_id
9237: and rl.UNIT_MEAS_LOOKUP_CODE = um.unit_of_measure;
9238:
9239: if g_debug = 'Y' then
9240: fnd_file.put_line(fnd_file.log, 'Unit Price: '||l_unit_price||'Encumbrance Account: '||x_encumbrance_account);
9241: end if;
9242:
9243: /* Get UOM for this item/org from MSI */
9244: l_stmt_num := 30;

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

9248: WHERE organization_id = p_organization_id
9249: AND inventory_item_id = p_item_id;
9250:
9251: if g_debug = 'Y' then
9252: fnd_file.put_line(fnd_file.log, 'Primary UOM: '||l_primary_uom_code);
9253: end if;
9254: /* Convert the total_primary_quantity into source_doc_quantity */
9255: l_stmt_num := 40;
9256: INV_Convert.INV_UM_Conversion(

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

9266:
9267: l_doc_rcv_qty := p_total_primary_qty * l_uom_rate;
9268: l_doc_primary_qty := p_primary_qty * l_uom_rate;
9269: if g_debug = 'Y' then
9270: fnd_file.put_line(fnd_file.log, 'Document Received Quantity: '||l_doc_rcv_qty||' Document Primary Quantity: '||l_doc_primary_qty);
9271: fnd_file.put_line(fnd_file.log, 'Calling CST_Common_hooks.Get_NRtax_amount for MMT-REQ Req_line_id '||p_req_line_id);
9272: end if;
9273:
9274: /* Bug 6405593 :Added hook call to override the recoverable and Non-Recoverable

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

9267: l_doc_rcv_qty := p_total_primary_qty * l_uom_rate;
9268: l_doc_primary_qty := p_primary_qty * l_uom_rate;
9269: if g_debug = 'Y' then
9270: fnd_file.put_line(fnd_file.log, 'Document Received Quantity: '||l_doc_rcv_qty||' Document Primary Quantity: '||l_doc_primary_qty);
9271: fnd_file.put_line(fnd_file.log, 'Calling CST_Common_hooks.Get_NRtax_amount for MMT-REQ Req_line_id '||p_req_line_id);
9272: end if;
9273:
9274: /* Bug 6405593 :Added hook call to override the recoverable and Non-Recoverable
9275: taxes for ENCUMBRANCE REVERSAL*/

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

9294:
9295: IF (l_err_num <> 0) THEN
9296: -- Error occured
9297: IF G_DEBUG = 'Y' THEN
9298: fnd_file.put_line(fnd_file.log, 'Error getting Enc Tax in CST_Common_hooks.Get_NRtax_amount at statement :'||l_stmt_num);
9299: fnd_file.put_line(fnd_file.log, 'Error Code : '||l_err_code||' Error Message : '||x_return_message);
9300: END IF;
9301: RAISE process_error;
9302: END IF;

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

9295: IF (l_err_num <> 0) THEN
9296: -- Error occured
9297: IF G_DEBUG = 'Y' THEN
9298: fnd_file.put_line(fnd_file.log, 'Error getting Enc Tax in CST_Common_hooks.Get_NRtax_amount at statement :'||l_stmt_num);
9299: fnd_file.put_line(fnd_file.log, 'Error Code : '||l_err_code||' Error Message : '||x_return_message);
9300: END IF;
9301: RAISE process_error;
9302: END IF;
9303:

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

9302: END IF;
9303:
9304:
9305: IF G_DEBUG = 'Y' THEN
9306: fnd_file.put_line(fnd_file.log,'Hook Used CST_Common_hooks.Get_NRtax_amount :'|| l_hook_used ||
9307: ' l_loc_recoverable_tax : '||l_loc_recoverable_tax||
9308: ' l_loc_non_recoverable_tax : '||l_loc_non_recoverable_tax);
9309: END IF;
9310:

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

9340: END IF;
9341: /* Added for Bug 6405593 */
9342:
9343: if g_debug = 'Y' then
9344: fnd_file.put_line(fnd_file.log, 'Encumbrance Amount: '||x_encumbrance_amount);
9345: fnd_file.put_line(fnd_file.log, 'CompEncumbrance_IntOrdersExp >>');
9346: end if;
9347:
9348: EXCEPTION

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

9341: /* Added for Bug 6405593 */
9342:
9343: if g_debug = 'Y' then
9344: fnd_file.put_line(fnd_file.log, 'Encumbrance Amount: '||x_encumbrance_amount);
9345: fnd_file.put_line(fnd_file.log, 'CompEncumbrance_IntOrdersExp >>');
9346: end if;
9347:
9348: EXCEPTION
9349: WHEN FND_API.G_EXC_ERROR THEN

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

9389:
9390: x_return_status := FND_API.G_RET_STS_SUCCESS;
9391:
9392: if g_debug = 'Y' then
9393: fnd_file.put_line(fnd_file.log, 'CompEncumbrance_IntOrdersExp (T) <<');
9394: end if;
9395: l_stmt_num := 5;
9396:
9397: IF NOT FND_API.Compatible_API_Call (

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

9439: and trx_source_line_id = l_trx_source_line_id
9440: and costed_flag IS NULL ;
9441:
9442: if g_debug = 'Y' then
9443: fnd_file.put_line(fnd_file.log, 'Total Received Primary Qty: '||l_total_primary_qty);
9444: end if;
9445:
9446: /* Get Requisition Line ID */
9447: /* For Internal Order Requisition Receipt, this is the MMT.TRX_SOURCE_LINE_ID

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

9496: RETURN;
9497: END IF;
9498: END IF;
9499: if g_debug = 'Y' then
9500: fnd_file.put_line(fnd_file.log, 'Requisition Line ID: '||l_req_line_id);
9501: end if;
9502:
9503: l_primary_qty := abs(l_primary_qty);
9504: l_total_primary_qty := abs(l_total_primary_qty);

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

9503: l_primary_qty := abs(l_primary_qty);
9504: l_total_primary_qty := abs(l_total_primary_qty);
9505:
9506: if g_debug = 'Y' then
9507: fnd_file.put_line(fnd_file.log, 'Total Received Primary Qty: '||l_total_primary_qty);
9508: end if;
9509: l_stmt_num := 30;
9510: CompEncumbrance_IntOrdersExp (
9511: p_api_version => 1.0,

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

9521: x_return_status => x_return_status,
9522: x_return_message => x_return_message
9523: );
9524: if g_debug = 'Y' then
9525: fnd_file.put_line(fnd_file.log, 'CompEncumbrance_IntOrdersExp (T) >>');
9526: end if;
9527:
9528: EXCEPTION
9529: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 9606: 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));

9602: AND MCACD.level_type = CLCD.level_type)
9603: GROUP BY MCACD.layer_id;
9604:
9605: IF g_debug = 'Y' THEN
9606: 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));
9607: END IF;
9608:
9609:
9610: IF (l_test_clcd <> 0) THEN

Line 9611: 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');

9607: END IF;
9608:
9609:
9610: IF (l_test_clcd <> 0) THEN
9611: 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');
9612: raise insertion_flag_in_mcacd;
9613: END IF;
9614:
9615: EXCEPTION