72:
73: stmt_num := 10;
74:
75: if (l_debug = 'Y') then
76: FND_FILE.PUT_LINE(FND_FILE.log, 'CSTPACPB.cost_wip_trx <<<');
77: end if;
78:
79: select
80: inventory_item_id,
215: err_buf => l_err_msg);
216:
217: If (l_return <> 0) THEN
218: if (l_debug = 'Y') then
219: fnd_file.put_line(fnd_file.log, 'proc_fail-cstpcfms'||SQLERRM);
220: end if;
221: raise proc_fail;
222: END IF;
223:
640: END IF;
641: END IF;
642:
643: IF l_debug = 'Y' THEN
644: fnd_file.put_line(fnd_file.log,'l_exp_job_cnt'||l_exp_job_cnt);
645: END IF;
646:
647: IF (l_mcacd_count <> 0 AND l_mta_count <> 0) THEN
648: IF (l_action_id = 1 OR l_action_id = 27 OR
647: IF (l_mcacd_count <> 0 AND l_mta_count <> 0) THEN
648: IF (l_action_id = 1 OR l_action_id = 27 OR
649: l_action_id = 33 OR l_action_id = 34) THEN
650: IF l_debug = 'Y' then
651: fnd_file.put_line(fnd_file.log,'Calling CSTPACWB.cost_in');
652: END IF;
653:
654: stmt_num := 115;
655: CSTPACWB.cost_in(i_trx_id => l_trx_id,
666: err_code => l_err_code,
667: err_msg => l_err_msg);
668:
669: IF l_debug = 'Y' THEN
670: fnd_file.put_line(fnd_file.log,'l_err_num: '|| to_char(l_err_num));
671: END IF;
672: /* Bug 3062249 - Call EAM API only if transaction is not CITW
673: This is because, distributions have not yet been created for
674: CITW txns. For these, EAM API will be called in CSTPACIN */
684:
685: /* Update Asset cost for eam jobs */
686: IF (l_entity_type in (6,7)) THEN
687: IF l_debug = 'Y' THEN
688: FND_FILE.PUT_LINE(FND_FILE.log, 'calling eamCost_pub.process_matCost ');
689: END IF;
690:
691: stmt_num := 125;
692:
734:
735: -- Raise exception if there is an error in updating WPB.
736: IF (l_err_num<>0) THEN
737: if (l_debug = 'Y') then
738: fnd_file.put_line(fnd_file.log, 'raising proc_fail after call to cost_in/cost_out');
739: end if;
740: raise proc_fail;
741: END IF;
742: END IF;
746:
747: EXCEPTION
748:
749: WHEN proc_fail THEN
750: FND_FILE.PUT_LINE(FND_FILE.log, 'in exception loop proc_fail raised');
751: err_num := l_err_num;
752: err_code := l_err_code;
753: err_msg := l_err_msg;
754: ROLLBACK;