Sei sulla pagina 1di 21

Closing EAM and WIP

Work Orders

An Oracle White Paper


July 2015
Table of Contents

1. OVERVIEW OF CLOSING WORK ORDERS .......................................................................................................................................................................... 1

2. WHAT HAPPENS WHEN A WORK ORDER IS CLOSED? .................................................................................................................................................... 7

3. TROUBLESHOOTING THE CLOSING OF WORK ORDERS ...............................................................................................................................................10

4. UNCLOSING OF WORK ORDERS .........................................................................................................................................................................................18


1. OVERVIEW OF CLOSING WORK ORDERS

Closing a work order changes the status to closed and means that no more
transactions are allowed to be posted to the work order.

Final costs and variances are calculated for the work order and posted to the
relevant GL accounts.

Work Orders can be closed in the following ways :

- Close EAM Work Order Form (EAM)


- Close Rebuild Work Orders Form. (EAM)
- Close Discrete Jobs Form (WIP)
- Close Discrete Jobs Concurrent Request (WIP)
- Close EAM Work Orders Concurrent Request (EAM)
- Mass Close of EAM Work Orders. (EAM)

It should be noted that there is NO API for closing work orders. I will now look at
the above options in more detail :

Close EAM Work Order Form :

This calls the EAMCDCL concurrent program. This is the same as the WIP program
but includes some prior validation relevant to EAM work orders.

The 3 screenshots below show the form :

2
3
a. Close Rebuild Work Orders Form :

Used for EAM rebuild work orders. The screenshot below shows this form :

b. Close Discrete Job Form (WIP)

Run from the WIP Responsibility and calls the WICDCL concurrent program.

4
c. Close Discrete Job Concurrent Request (WIP - WICDCL concurrent
program)

A key point to note is that the Actual Close Date is one of the parameters. This is
the date that will be specified as the date the job was closed. There must be NO
transaction dated on the job after this date or the close will fail.

5
d. Close EAM Job Concurrent Request (calls EAMCDCL concurrent program)

Navigation : (from EAM responsibility) View > Requests > Submit New Request >
Close EAM Work Orders

A key point to note is that the Actual Close Date is one of the parameters. This is
the date that will be specified as the date the job was closed. There must be NO
transaction dated on the job after this date or the close will fail.

e. Mass Close of EAM Work Orders

Navigation : Maintenance Workbench. Allows mass close of EAM work orders.

6
2. WHAT HAPPENS WHEN A WORK ORDER IS CLOSED?

The following things happen when a work order (WO) is closed:

The WO status is set to closed and NO more transactions can be posted to the
WO :

- Wip_discrete_job table : wip_job_status field is set to 12 (closed).

- For EAM WOs : eam_work_order_details,

user_defined_status is set to 12.

- For EAM - BOTH the above tables are updated.

Closing a WO calculates final costs and variances and ensures any open
requirements are not considered as demand.

The WO close date specifies the accounting period that will be used to
recognise the variances.

The close process writes off the balances remaining in the WIP elemental
valuation accounts to the elemental variance accounts that you defined by wip
accounting class, leaving a zero balance remaining in the closed job.

If there is a positive balance in the job at the end of the close, here are the
accounting entries for a job close:

- WIP accounting class variance accounts - DEBIT

- WIP accounting class valuation accounts CREDIT

7
VARIANCES IN WIP:

When a WO is closed, a job close variance may be posted for the job if appropriate.

The following scenarios can lead to Job Close Variance

Component cost changes

Components issued for dummy Operation

WIP Assembly Scrap transaction

Components issued after completion is performed with the Final


completion flag checked

Under issue/ Over issue of components

The Job Close Variance is calculated as follows:

The definition of costs incurred versus costs relieved are as follows:

Costs Incurred = actual issues to the job


Costs Relieved = standard costs relieved against the job at job completion (based
on standard)

Work In Process Value Summary will have a variance if there is material that has
not yet been issued to the job prior to close. To resolve this, re-open the job and
issue the material. Material overhead associated to the material may also show a
variance until all materials are properly applied to the job.

For Resources and Overhead, the costs need to be associated for the item to a
Resource or Department which is part of the routing for item ...in other words, the
overhead cost needs to be part of the "Rolled Up Costs" in the item cost screen.

8
VARIANCES IN EAM:

IMPORTANT : Variance accounts play no role in eAM.

The proper set up is to load the appropriate maintenance expense account into
both the valuation and variance account fields for the WIP Accounting Class.

This will result in maintenance work order expenses booking to the expense
account when incurred.

So, when setting up WIP Accounting Classes, use the same maintenance expense
account code in both the valuation and variance columns.

This will cause maintenance expenses to book to the proper GL account and
period.

In fact, EAM Work Orders copy the behavior of WIP Non-standard Expense jobs.

You can close such jobs and recognize variances for these jobs at any time. In
addition, the period close process automatically recognizes variances on all
charges incurred during the period. Therefore, open jobs have zero WIP
accounting balances at the start of a new period.

If there is a positive balance in the job at the end of the period, then here are the
accounting entries for non-standard expense jobs at period close:

Debit WIP accounting class variance accounts

Credit WIP accounting class valuation accounts

In EAM, the balance is always equal with the actual cost (similar to cost incurred
from WIP perspective) as there is no cost to be relieved so the cost relieved is
always 0. This means that the entire cost of WO is a variance. This is why EAM
recommends the Valuation Accounts to be the same with Variance Accounts.

9
3. TROUBLESHOOTING THE CLOSING OF WORK ORDERS :

REASONS THAT WORK ORDERS DO NOT CLOSE:

There are several reasons WHY work orders do not close. They are :

Pending Resource Transactions

Pending Move Transactions (WIP only).

Pending Material Transactions.

Uncosted/Errored Material Transactions.

OSP related work order has open Purchase order or requisition.

Open reservations exist for sales order.

Unwanted records in wip_dj_close_temp table due to various errors.

Invalid Status of job

WHAT HAPPENS WHEN THE WORK ORDER DOES NOT CLOSE?

If the work order does not close, it will show one of the following statuses :

- PENDING CLOSE

- FAILED CLOSE

You can use the queries below to find such orders :

Pending Close :

select * from wip_entities where wip_entity_id in

(select wip_entity_id from wip_discrete_jobs where status_type = 14);

Failed Close :

select * from wip_entities where wip_entity_id in

(select wip_entity_id from wip_discrete_jobs where status_type = 15);


10
HOW TO RESUBMIT PENDING/FAILED CLOSE JOBS IF NO PENDING
TRANSACTIONS EXIST.

If there are no pending transactions, you can resubmit the failed


close/pending close jobs for closure as follows:

Responsibility: Work In Process

Navigation: Discrete -> Close Discrete Jobs (Form)

Query a discrete job with status Pending Close

Go to Tools -> Check Requests 1

You can use the Check Requests option from the Tools menu to
manually resubmit jobs that have failed to close and have a Pending
Close status. Resubmitting a job with Check Request sets the job's
status back to its original status. Resubmitting jobs that have Pending
Close statuses because the process has not yet concluded does not
interrupt the close process.

3.1 RESOLVING PENDING RESOURCE TRANSACTIONS.

The navigation to use for viewing pending resource transactions is :

N: Work In Process -> Resource Transactions -> Pending Resource Transons.

If resource transactions have any errors , these need to be corrected and then
the resource transactions have to be resubmitted.

The errors can be seen under the errors tab from the View Pending
Transactions form.

Here are the table level queries to check which transactions are pending or in
error:

select * from WIP_COST_TXN_INTERFACE where process_status in (1,3); (1


= pending, 3 = error)

11
The query to look at the actual error is shown below:

select * from WIP_TXN_INTERFACE_ERRORS where TRANSACTION_ID in


(select TRANSACTION_ID from WIP_COST_TXN_INTERFACE where
process_status= 3);

Please note that there are many different types of error that need to be
corrected and the correction of these errors is not covered in this document.
Please refer to the note below:

Whitepaper : Troubleshooting Enterprise Asset Management Transactions


(Doc ID 1672312.1)

REASONS FOR PENDING RESOURCE TRANSACTIONS.

The following causes can result in pending resource transactions (as stated
earlier, the solutions for resolving these issues is not covered in this
document and you need to follow Doc 1672312.1):

Cost Manager is inactive. Activate the Cost Manager to resolve the


issue.

Any one transaction in error in either wip_cost_txn_interface or


mtl_material_transactions table. (Only for Average Costing). An error
in one transaction prevents processing of other transactions.

Error : No charges allowed for this job/schedule (status of job does


not allow the transaction to be processed the job must be released
or complete-allow charges).

Error : Transaction date precedes release date for the job/schedule


(reason is invalid transaction date that needs to be corrected and
then resubmit the transaction)

Error : No balance exists for the appropriate period for the


job/schedule (records are missing in WIP_PERIOD_BALANCES table
and this requires the appropriate datafixto insert these missing
records).

12
3.2 PENDING MOVE TRANSACTIONS

The navigation to view pending move transactions is as follows:

Work In Process -> Move Transactions -> Pending Move Transactions

You can check any errors in the errors section in the form above. These
errors need to be corrected and then you can resubmit the transactions.

The following query can be used to check for pending or errored move
transactions:

select * from WIP_MOVE_TXN_INTERFACE where process_status


in (1,3); (1 = pending, 3 = error)

The following query can be used to view the errors for these transactions:

select * from WIP_TXN_INTERFACE_ERRORS where


TRANSACTION_ID in (select TRANSACTION_ID from
WIP_MOVE_TXN_INTERFACE where process_status= 3);

REASONS FOR PENDING MOVE TRANSACTIONS

The causes for pending move transactions include the following:

Move Transaction Manager is inactive. Activate the Move Manager

Transaction quantity must be less than or equal to available to


move. This simply means that the affected operation does not
have any quantity available to move in the step for which the
error is specified. This is the most common error. Simply ensure
there is quantity available at the operation step and then
resubmit.

Error in Validation phase or Move Processing phase.

Error in backflush setup stage because :

a) Backflush is trying to drive inventory negative, but negative


balances not allowed

13
b) There are lot-controlled components, but lot selection
method is manual.

c) Lot selection method is not manual, but lot couldn't be


derived because of insufficient lot quantity

d) There are serial controlled components to be backflushed and


serial numbers cannot be assigned.

3.3 PENDING MATERIAL TRANSACTIONS

The navigation to view pending material transactions is :

N: Work In Process -> Material Transactions -> View Material Transactions

Any errors have to be corrected and then you can resubmit the errored
transactions.

Pending material transactions will remain in the


mtl_material_transactions_temp table. When a material transaction is
processed successfully, a record is inserted in the
mtl_material_transactions table and the corresponding record from the
mtl_material_transactions_temp is then deleted.

The following query can be used to look at the pending material


transactions:

select * from mtl_material_transactions_temp where


transaction_source_type_id = 5;

If the resubmission does not work, then an SR will be required with INV
Team

14
3.4 UNCOSTED/ERRORED MATERIAL TRANSACTIONS

The following query is used to check for uncosted material transactions


the costed flag is N in this situation :

SELECT * FROM MTL_MATERIAL_TRANSACTIONS WHERE COSTED_FLAG =


N

It should be noted that there is usually a very simple reason for the
transactions to be uncosted it is simply that the Cost Manager has not
yet run. The Cost Manager is scheduled to run however many times a day
a client requires. So , usually, these type of transactions will be processed
when the Cost Manager next runs.

Sometimes, there is an error that has resulted in the transaction being


uncosted. These transactions can be checked using the query below
because the costed_flag will be set to E for error :

SELECT ERROR_CODE, ERROR_EXPLANATION FROM


MTL_MATERIAL_TRANSACTIONS WHERE COSTED_FLAG = 'E'

These type of transactions often just need to resubmitted after running a


script such as :

UPDATE MTL_MATERIAL_TRANSACTIONS
SET COSTED_FLAG = 'N',
TRANSACTION_GROUP_ID = null,
ERROR_CODE = null,
ERROR_EXPLANATION = null
WHERE COSTED_FLAG = 'E';

However, in most cases, the underlying error has to be corrected and then
the above script will work. If the underlying error is not corrected, the
transaction will error out again.

The most common error is CST_INVALID_WIP - missing records in


WIP_PERIOD_BALANCES. (use the standard datafix to insert the missing
records and then run the above script to initialize the record so that it will
be picked up by the Cost Manager the next time it runs).

There are other types of error which will require an SR to be raised.

15
3.5 OPEN PO OR PR AGAINST THE OSP WO

If there is an open Purchase order or purchase requisition against the


outside processing work order, the work order will not close. The
following error will be seen when trying to close such work orders:

ERROR : APP-WIP-25309: There is an open Requisition or Purchase Order


attached to this job/schedule.

The causes of this error are:

PO/Requisition Incorrect Status - The associated PO/Requisition


must be in status Finally Closed to enable jobs to close.

Undelivered PO Quantity - POs must be FULLY delivered to the


shopfloor. Users need to perform transactions of type 'Deliver'
from the Receiving Transactions form and ensure that the
WHOLE of the receipted quantity is delivered.

Code Issue - If jobs cannot be closed even though the associated


Purchase Order is closed, this could be a bug in the pertinent file
(e.g. wicdcl.opp).

Data Corruption Example: If cancel_flag = NULL in


PO_REQUISITION_LINES_ALL. The Purchase requisition status
(cancel_flag) shows as NULL where this should be cancelled
instead. Please log an SR to obtain a data fix for such issues.

3.6 OPEN RESERVATIONS EXIST FOR SALES ORDER :

If there is an open reservation against a sales order that is linked to the


work order that you are trying to close, then the work order will not close.
The following points should be noted:

Changing a job status to completed, closed, or canceled is


prevented if open reservations exist (assemblies reserved on job
for a specific sales order).

If you attempt one of these transactions for a job linked to a sales


order, an error message displays. You have two options in order
to continue:

a. Unlink the sales order reserved to this job

b. Reduce the job quantity of the job to equal the completed quantity.
16
3.7 UNWANTED RECORDS IN WIP_DJ_CLOSE_TEMP :

If there are unwanted records in the WIP_DJ_CLOSE_TEMP table, the job


will not close.

The following 6 error messages are commonly seen in situations where


the cause is unwanted records in the WIP_DJ_CLOSE_TEMP table :

a. ERROR: APP-WIP-25191: x of x records failed.


You cannot change status of jobs. Either concurrent program exists to
close these jobs or jobs did not have status of Pending Close

b. ERROR: APP-WIP-25190 x of x records failed closing discrete jobs

c. ERROR: APP-WIP-25190: You are not allowed to close jobs with these
statuses

d. Log of concurrent request WICDCL - Close Discrete Jobs may show the
following message:

delete Existing reservations


Exception has occurred

e. Status has not changed. Another situation is when the WOs get closed
successfully but the status hasn't changed.

f. APP-FND-01206 This record already exists. You entered a duplicate


value or sequence of values that must be unique for every record.

So why do records get stranded in the WIP_DJ_CLOSE_TEMP table ?

The concurrent process can get interrupted or terminated.

This causes records to get stranded in WIP_DJ_CLOSE_TEMP.

If records in this table have status of 'Pending Close', no close routines


have been called and committed.

17
The solution for this type of issue is as follows:

Create backup tables for wip_dj_close_temp and


wip_discrete_jobs tables.

delete wip_dj_close_temp where 1=1;

Run script below:

update wip_discrete_jobs
set status_type = 4
where status_type in (14, 15) and date_closed is null;

commit;

Resubmit the jobs for closure.

3.8 INVALID JOB STATUS :

You cannot close jobs that have the following statuses:

a. Closed (for obvious reasons the job is already closed)

b. Pending Close

c. Pending Bill Load

d. Pending Routing Load

4. UNCLOSE WORK ORDERS :

The following points should be noted about unclosing work orders:

You cannot unclose a job that does not have a status of Closed.

You cannot unclose a job that is linked to a sales order.

You also cannot unclose a job that was closed in a now closed
accounting period.

The form function parameter WIP_WIPDJMDF_CLOSE enables the


Unclose option in the Tools menu.

18
If you do not want Unclose to display in the menu, set the
parameter to No. The default for this option is Yes.

If you wish to re-open the Inventory period to allow you re-open


the jobs, refer to the following note no datafix can be provided.

Re-Open a Closed Inventory Accounting Period (Doc ID 472631.1)

19
ClosinG Work Orders
July 2015-05-14
Author: Zar Ahmed

Oracle Corporation
World Headquarters
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.

Worldwide Inquiries:
Phone: +1.650.506.7000
Fax: +1.650.506.7200
www.oracle.com

Oracle is a registered trademark of Oracle Corporation. Various


product and service names referenced herein may be trademarks
of Oracle Corporation. All other product and service names
mentioned may be trademarks of their respective owners.

Copyright 2003 Oracle Corporation


All rights reserved.

20

Potrebbero piacerti anche