Cogs Dcogs PDF
Cogs Dcogs PDF
Cogs Dcogs PDF
Purpose
Troubleshooting Steps
1] No Accounting for COGS Recognition Transaction
2] Subledger Period close Exception report
3] COGS Recognition Transaction with 0 quantity
4] RMA Accounting
5] Duplicate accounting
6] DCOGS account is not zero
7] COGS Revenue Matching Report
References
Applies to:
Purpose
The following explains the problems encountered in Cost of Goods Sold (COGS) and
Deferred Cost of Goods Sold ( DCOGS)
Troubleshooting Steps
Symptom:-
COGS Recognition Transaction does not have accounting in MTA table. (costed_flag is
NULL)
Explanation:-
If quantity or cost of the item is zero, then COGS Recognition transaction does not have
any accounting.
1.
Select *
from cst_revenue_cogs_match_lines
Where cogs_om_line_id=&om_line_id;
check: Column = Unit_cost
2.
Select *
from cst_cogs_events
Where cogs_om_line_id=&om_line_id;
Symptom:-
Subledger Period close exception report shows unprocessed COGS recognition events.
Explanation:-
If COGS Recognition transaction has zero quantity or zero cost, MTA does not exists but
XLA_events data exists.
This issue is fixed in COGs code, but if ct. has older version then ct. has to apply
datafix.
Review Note 738529.1 for more detail
For root cause fix, apply latest patch on CSTRCMVB.pls file.
Symptom:-
Sales Order Line has non-zero quantity but COGS is showing zero quantity.
Explanation:-
If RMA exists before COGS Recognition then
COGS Recognition transaction quantity = Sales Order issue quantity - RMA quantity.
Select *
from cst_cogs_events
Where cogs_om_line_id= &om_line_id;
Note:-
Event_type = 1 (Sales Order Issue)
= 3 (COGs Recognition)
= 2 & 6 (RMA)
4] RMA Accounting
Symptom:-
RMA accounting hits COGS some times and hits DCOGS sometimes.
Explanation:-
This depends on when RMA is created i.e., before COGS Recognition or
after COGS Recognition.
If RMA is created before COGS Recognition then RMA hits DCOGS account.
If RMA is created after complete COGS Recognition then RMA hits COGS account.
Partial COGS Recognition then RMA hits both COGS & DCOGs accounts based on COGs
recognition percentage.
Refer to
Oracle Cost Manager User Guide - Revenue and COGS Matching chapter - Supported
Business Scenarios
Scenarios of DCOGS account:
Case 1:
Transaction Type Debit Credit
================= =====
Sales Order Issue DCOGS INV
COGS Recognition COGS DCOGS
DCOGS balance will be cleared after COGS Recognition.
Case 2:
Transaction Type Debit Credit
================= =====
Sales Order Issue DCOGS INV
RMA(Before COGS Rec.) INV DCOGS
DCOGS balance will be cleared after RMA.
Case 3:
Transaction Type Debit Credit
================= =====
Sales Order Issue DCOGS INV
COGS Recognition COGS DCOGS
RMA(After COGS Rec.) INV COGS
DCOGS balance will be cleared after COGS Recognition.
Queries
5] Duplicate accounting
Symptom:-
Duplicate accounting for COGS Recognition transactions.
Explanation:-
This happens when Cost manager and Generate COGS Recognition events programs
run in parallel.
Issue has been fixed and latest patch is recommended for root cause fix.
For old data, ct. has to do manual GL adjustments.
Queries-
SELECT 3/4*SUM(NVL(ln.accounted_dr,0)-NVL(ln.accounted_cr,0)) ,
ln.accounting_class_code ,
ln.code_Combination_id
FROM
(SELECT mmt.transaction_id ,
COUNT(mta.inv_sub_ledger_id) ,
SUM(mta.base_transaction_value)
FROM apps.mtl_material_transactions mmt ,
apps.mtl_transaction_accounts mta
WHERE mmt.organization_id = &org_id
AND mmt.transaction_type_id = 10008
AND mmt.transaction_date BETWEEN to_date('&from_date','DD-MM-YYYY') AND
to_date('&to_date','DD-MM-YYYY') + .99999
AND mmt.transaction_id = mta.transaction_id
AND mta.accounting_line_type = 36
AND mta.cost_element_id =1
GROUP BY mmt.transaction_id
HAVING COUNT(mta.inv_sub_ledger_id) > 1
) list ,
xla_transaction_entities_upg xte ,
xla_events xe ,
xla_ae_headers hr ,
xla_ae_lines ln
WHERE xte.ledger_id = &ledger_id
AND xte.application_id = 707
AND xte.entity_code = 'MTL_ACCOUNTING_EVENTS'
AND NVL(xte.source_id_int_1, -9999) = list.transaction_id
AND xe.application_id = 707
AND xte.entity_id = xe.entity_id
AND hr.application_id = 707
AND ln.application_id = 707
AND hr.event_id = xe.event_id
AND hr.ledger_id = xte.ledger_id
AND hr.ae_header_id = ln.ae_header_id
GROUP BY ln.accounting_class_code ,
ln.code_Combination_id;
Note:-
Accounting is ducplicated 2 times in MTA and 4 times in XLA tables.
Symptom:-
Amount exists in DCOGS.
Explanation:-
Get the output of COGS queries and also output of COGS Revenue Matching Report.
Symptom:-
a. COGS Revenue Matching Report Performance issue.
b. Displaying rows even though cogs & revenue are matching.
c. Not displaying quantity correctly.
d. RMA accounting does not have credit lines.
Explanation:-
----------------------
A) Once Invoice is created,
Recognize the revenue in AR >
Navigate to : Accounts Receivables>Control>Run Revenue Recognition request
C) Run a set of concurrent processes to record sales order and revenue recognition
transactions and to create and cost COGS recognition transactions.
These COGS recognition transactions adjust deferred and earned COGS in an amount
that synchronizes the % of earned COGS to earned revenue on sales
order shipment lines.
3. Generate COGS Recognition Events: creates and costs COGS recognition events for
new sales order shipments/returns and changes in revenue
recognition and credits for invoiced sales order shipment lines.
-- Please ensure all the steps are performed and check to see whether COGS
Recognition transactions are generated. If you forgot to run COGS Recognition
processes and INV and GL periods are closed, the COGS Recognition would go to the
next open period .
References
Attachments
In this Document
Purpose
In this Document:
Troubleshooting Steps
Goal
Solution
2. DIAGNOSTICS
References
Applies to:
Purpose
In this Document:
Goal
Solution
1. COGS Data Flow
2. Diagnostics
3. Video Recording for the COGS Workflow
References
Troubleshooting Steps
Goal
Solution
Note:
1. In the above and below flow, We have assumed that the Cost Manager has picked
up all uncosted Sales order issues and costed them (costed_flag in
mtl_material_transactions should be NULL).
2. If the Sales order issue transactions/ RMA Return transactions remain uncosted, then
The Record Order Management Transactions concurrent program can be executed,
which picks up these transactions and inserts rows in Cogs events and Cogs Revenue
Matching Tables to enable remaining programs (Collect Revenue Recognition
Information and Generate COGS Recognition) to complete.
This process is not mandatory if the transactions are already costed.
1.Cst_cogs_events.COGS_Percentage = '0'.
2. (i) Cst_cogs_events.Mmt_Transaction_id will be the Transaction Id in
Mtl_Material_Transactions Table for Sales Order Issue Transaction.
(ii) Cst_cogs_events.costed = Mtl_Material_Transactions.costed_flag will be NULL
when the sales order transaction is costed
3.Cst_cogs_events.Event Type = '1'[Event Type '1' signifies Sales Order Issue].
4. In cst_revenue_cogs_match_lines Table, Deferred_COGS_Acct_id and COGS_Acct_id,
Unit_cost and Original_shipped_Qty gets populated.
Note: Oe_order_lines_all.Invoice_Interface_Status_Code =
'Yes'.[Invoice_Interface_Status_Code 'Yes' signifies Standard Sales Order and
Invoice_Interface_Status_Code 'Not_Eligible' signifies Ship Only Lines].
1.Cst_revenue_recognition_lines.Potentially_unmatched_flag = 'Y'
2.Cst_revenue_recognition_lines.Revenue_recognition_percent = '1' [Revenue
Recognition percentage of 1 signifies 100%]
Accounting Impact:
Accounting Entries:-
Staging transactions:-
Inventory Account (Destination) is debited and Inventory Account (Source) is credited.
Accounting Entries:-
COGS Recognition:
COGS Account is Debited and DCOGS Account is Credited.
2. DIAGNOSTICS
COGSDIAG.sql
1. Execute COGSDIAG.sql for any Sales Order you wish to troubleshoot using 'Run Script'
command (or) run individual queries as per requirement.
2. The SQL returns rows for all tables related to COGS Recognition from OM, AR, Inventory
and Costing.
3. View a Sample Output here - Sample Output
3. Video Recording for the COGS Workflow
Video -
COGS Recognition
You can also download the below Zip files if you are not able to view the videos/ video
controls properly
- Sales_Order.zip
- Revenue_Recognition.zip
- COGS.zip
References
Attachments
Sample output for COGSDIAG.sql for the SO (66488) in Video (530.95 KB)