Sunday, March 3, 2013

How To cancel/ Restart the Cost Manager :


Behavior of Cost Manager:

Cost manager is not a typical concurrent manager that it finishes after is costing some transactions.
Cost manager it is rescheduling itself based on the the process interval specified in interface managers form.

Cost Manager should stay in this status : “Pending Scheduled” and will restart itself based on the process interval specified in interface managers form. It calculates the re-launch time as start time + process interval.
But there is no change in status when this happen


è To cancel/ Restart the Cost Manager : use one of the following method: ß

Note  : If you want to launch a new manager, cancel earlier manager first.
  
a) use 'System Administrator' responsibility
       Navigate to Concurrent/Request/view
       Set : specific Request=on
       Name=Cost Manager.

In the lower part of the Find requests window there is a field "Select the Number of Days to view" set by default to 7 days.
-> Set "Select the Number of Days to view"=9999
In fact this field is a filter which limits how far back it will query requests.

From here Cancel the Cost Manager which is Pending Scheduled.
or
2 . Stop the Cost Manager.

a) If the above query did not retrieve any records then there is nothing to do, the Cost Manager is already stopped.

b) Otherwise, if the first record is showing Phase=Completed and Status=Warning, then review the request log.
If the request log is showing the following, it suggests there is an older concurrent request in Running or Pending phase:
"A Cost Manager is already launched.

Action: If you want to launch a new manager, cancel earlier manager first. (MODULE=CMCTCM) : "
In this case, scroll down until encountering the relevant concurrent request.

c) If the record is showing Phase=Completed, then there is nothing to do, the Cost Manager is already stopped.

d) If the record is showing Phase=Running then wait and query again and again using the Refresh Data button, until Phase becomes Completed or Pending.

e) When the record is showing Phase=Pending and Status=Scheduled, then perform the following quickly:
i) cancel the concurrent request using the Cancel button at the bottom
ii) press button Yes to acknowledge the Decision message.

f) If the Cost Manager was running, you may have to wait for the completion of the cost workers. There are different program names here, depending on the costing methods used at your site.
As soon as the Cost Manager is stopped, you can monitor the costing process by repeatedly running the following SQL:

i)             cost workers:

SQL> select organization_id,costed_flag,count(*) from mtl_material_transactions where costed_flag is not null group by organization_id,costed_flag;
 
or

   ii) COSTMANAGER  SQL script:

SQL> SELECT request_id RequestId,
request_date RequestDt, concurrent_program_name,
phase_code Phase,
status_code Status FROM
fnd_concurrent_requests fcr,
fnd_concurrent_programs fcp
WHERE fcp.application_id = 702 AND
fcp.concurrent_program_name in ('CMCTCM', 'CMCMCW', 'CMCACW') AND
fcr.concurrent_program_id = fcp.concurrent_program_id AND
fcr.program_application_id = 702 AND fcr.phase_code <> 'C'

Cancel all the requests from the above output by navigating to,
System Administrator à Concurrent à Request
Query for the Request Id returned from the select above.

In the lower part of the Find requests window there is a field "Select the Number of Days to view" set by default to 7 days
-> Set "Select the Number of Days to view"=9999
In fact this field is a filter which limits how far back it will query requests.

Cancel the request id other than running. Let the running request get over.

2 - Run the cmclean.sql script available from MOS Note 134007.1 //< not required >

3 - Restart the Cost Manager

     Inventory à  Setup : Transactions à  Interface Managers

4.       The Interface Manager screen pops up . The Cost Manager should be the “first” one and its status should be “Active”.

5.     A list of organizations pops up :     
Select  'Cost Manager' - choose Tools à Launch Manager

Note: Check bellow images & change Cost Manager minutes '2' to '5' 



If it is not, select it then click on tools on the menu bar and select launch.  It will start and run according to its schedule.

Tools Menu à select Launch Manager

Check to see whether actual cost worker completes successfully. Also verify using the below that there are no error records:

SQL> select * from mtl_material_transactions where costed_flag = 'E';

Note : few important points :  
To verify the version :
SQL> SELECT name, text FROM dba_source
WHERE name LIKE 'CMCTCM'
AND UPPER(text) LIKE '%$HEADER%'
AND line < 7;

PROCESS INTERVAL :
select PROCESSING_TIMEOUT, WORKER_ROWS, PROCESS_INTERVAL
from mtl_interface_proc_controls
where PROCESS_NAME='CMCTCM';
process_interval is in seconds and not in minutes.  To schedule the cost manager every, say, five minutes,


a). Relink the CMCTCM executable: adrelink.sh force=y ranlib=y "bom CMCTCM"
b). Create Accounting - Cost Management Cannot Print Report out of memory [ID 1062578.1]
c). Data Collection Scripts for Cost Management [ID 378348.1]
d). EBS LCM - How to do Setup for Landed Cost Management LCM [ID 837161.1]
e). How to resolve Pending or Erred Cost Manager or Cost Workers [ID 748704.1]
f). Cost Manager (CMCTCM) - is Scheduled More Than Once [ID 255947.1]
g). Cost Manager not processing records [ID 217068.1]
++++++++++++Manjunatha+++++++++++++++++++++
141493.1, 373207.1, 304313.1, 1360701.1, 740039.1 ,218204.1 & 304313.1
++++++++++++Manjunatha+++++++++++++++++++++

3 comments:

  1. If cost manager status is showing inactive .How to make it in active status.

    Launch Manager will help or not to change its state permanent active?

    ReplyDelete
  2. showing error while checking status of cost manager as follows
    ORA-01427: single-row subquery returns more than one row
    on production instance but the same query gives output on UAT instance. Please guide me through this.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete