cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong COGS in AR credit memo

Former Member
0 Kudos

Hi All,

My client created an Independent ARCM, but upon checking in the journal entry, there are two COGS. i found out the in the AR CM the G/L Account and COGS is not the account for the warehouse, see screenshot. How can i trace what happens here?

item is BOM, child item has diff COGS account

FMS in Whse

in BOM, the child item have a default Whse in DIY006

https://lh3.googleusercontent.com/-76WZEiSlui0/T5jkTcIkopI/AAAAAAAAAHU/plKAlkdQWpE/s647/error.bmp

Regards,

Lean

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186095
Active Contributor
0 Kudos

Hi,

Can you post this query result here:

SELECT T0.[WhsCode], T0.[BalInvntAc], T0.[SaleCostAc], T0.[RevenuesAc], T0.[VarianceAc], T0.[DecreasAc] FROM OWHS T0 WHERE T0.[WhsCode] = 'DIY006'

If the system do not use the default G/L account code in the warehouse, meanwhile the item's G/L account determination is by warehouse, then the system probably use the parent item.

JimM

Former Member
0 Kudos

Hi,

The results are okay, it shows the correct allotted accounts for it...

Regards,

lean

former_member186095
Active Contributor
0 Kudos

Thx for the info.

I am afraid that your item BOM is sales item and note inventory item.

So, the system will use child item's COGS.

Rgds,

JimM

Former Member
0 Kudos

Hi,

How was that, when i try to recreate it, it shows the correct Accounts

Also the in BOM the child item has a default Whse DIY006.

How can I trace that?... is that a bug?

former_member186095
Active Contributor
0 Kudos

Hi,

you may check this following sap note for comparison:

  959287  - Wrong JE when returning Standard Item to different warehouse    
Version   5   Validity: 01.05.2007 - active
Language   English 
    

Content:      Summary    |    Header Data    |    Validity 

 

Symptom

When returning a 'Standard' item (evaluation method = Standard) to a different warehouse (e.g. A/R Return to whs 02) then the one it was issued from (e.g. A/R Delivery from whs 01), the system does not post the price variance (between the item cost in whs01 to the item cost in whs 02) to a variance account, but only post a debit to the stock account of returned warehouse (e.g. whs 02) and a credit to the COGS account of the returned whs (e.g. whs02) for the amount of the item cost in the returned warehouse (e.g. whs02).

Example:
Delivery WHS01 JE:
Account                  Debit    Credit
Stock Account(WHS01)               100
COGS (WH01)               100

Return to WHS02, based
on Delivery from WHS01 :
Actual:
Sales Return(WHS02)       200
COGS (WH02)                        200

Expected:
Sales Return(WHS02)       200
COGS (WH02)                        100
Variance                          100


 

Cause

Application Error


 

Solution

This issue is a candidate to be fixed in a future version.
In order to avoid wrong postings, please make sure to return 'Standard' items to the same warehouse they were issued from, and then transfer the goods to another warehouse using 'Stock Transfer'.

Run the select query "Select Query 1" In order to detect Reurnes  documents based on Deliveries to differnt warehouse for Standard Inventory Items.
Run the select query "Select Query 2" In order to detect Credit Memos based on A/R Invoices to differnt warehouse for Standard Inventory Items.

Select Query 1:
---Replace *Dest* with database Name---

Use
[*Dest*]
SELECT

T1.DocNum as 'Delivery No.',
T0.ItemCode,
T0.Quantity,
T0.WhsCode,
    T0.stockprice as 'Standard Price Delivery',
    (T0.Quantity*T0.stockprice) as 'StandardPriceRowDelivery',
    T3.DocNum as 'Return No.',
T2.ItemCode,
T2.Quantity,
T2.WhsCode,
    T2.stockprice as 'Standard Price Return',
    (T2.Quantity*T2.stockprice) as 'PricePostedToStockReturn',
    (T2.Quantity*T0.stockprice) as 'COGSShouldBe',
    (T2.Quantity*T2.stockprice)-(T2.Quantity*T0.stockprice) as 'Variance',
    T4.EvalSystem
FROM DLN1 T0
INNER JOIN ODLN T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN RDN1 T2 ON T2.BaseType = 15  and T2.BaseEntry = T0.Docentry and T2.baseLine = T0.LineNum
INNER JOIN ORDN T3 ON T2.DocEntry = T3.DocEntry
INNER JOIN OITM T4 ON T2.ItemCode = T4.ItemCode
WHERE
T0.WhsCode <> T2.WhsCode and
T4.evalsystem='s' and
T4.InvntItem='Y'


Select Query 2:
---Replace *Dest* with database Name---

Use [*Dest*]
SELECT
T1.DocNum as 'Invoice No.',
T0.ItemCode,
Case isnull(T5.Docentry, -1) When -1 then T0.Quantity Else T5.Quantity End,
Case isnull(T5.Docentry, -1) When -1 then T0.WhsCode Else T5.WhsCode End,
Case isnull(T5.Docentry, -1) When -1 then
        T0.stockprice Else T5.stockprice  End as 'Standard Price Invoice',
Case isnull(T5.Docentry, -1) When -1 then
        (T0.Quantity*T0.stockprice) Else (T5.Quantity*T5.stockprice) end  as 'StandardPriceRowInvoice',
        T3.DocNum as 'Credit Memo No.',
T2.ItemCode,
T2.Quantity,
T2.WhsCode,
    T2.stockprice as 'Standard Price CM',
   (T2.Quantity*T2.stockprice) as 'PricePostedToStockCM',
    T2.Quantity* Case isnull(T5.Docentry, -1) When -1 then
T0.stockprice Else T5.stockprice End as 'COGSShouldBe',
(T2.Quantity*T2.stockprice)-(T2.Quantity*
Case isnull(T5.Docentry, -1) When -1 then
T0.stockprice Else T5.stockprice End) as 'Variance',
    T4.EvalSystem
FROM
INV1 T0
INNER JOIN OINV T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN RIN1 T2 ON T2.BaseType = 13  and T2.BaseEntry = T0.Docentry and T2.baseLine = T0.LineNum
INNER JOIN ORIN T3 ON T2.DocEntry = T3.DocEntry
INNER JOIN OITM T4 ON T2.ItemCode = T4.ItemCode
LEFT JOIN DLN1 T5 ON T0.BaseEntry = T5.Docentry and T0.BaseType = 15 and T0.baseLine = T5.LineNum
WHERE
  T2.WhsCode <> Case isnull(T5.Docentry, -1) When -1 then T0.Whscode else T5.Whscode end and
T4.evalsystem='s' and
T4.InvntItem='Y'


If the queries returned results, post the correction Journal Entries manually.


 

Other terms

Standard Price, Credit Memo, Return, Delivery, Variance, Evaluation Method, COGS


   
       

Header Data

  
Released on 03.07.2006 12:27:46   
Release status Released for Customer   
Component SBO-SD-RET Return  
Other Components
SBO-SH-SAL-TRA-A4 Return

SBO-SH-FIN-JE Journal Entries

  
Priority   Correction with medium priority   
Category   Program error   
  
      

Validity

Software Component

Version

SAP BUSINESS ONE

2004 A

2005 A

2005 A SP01

    

probably, the symptom in the note similar with your issue. If yes, you can log a ticket to SAP support.

JimM

Former Member
0 Kudos

Hi,

Thanks for that Jimm but the ARCM is not based on the AR inv, it is an independent ARCM.

Thanks,

Lean

former_member186095
Active Contributor
0 Kudos

Hi,

if the problem is not reproducible, there is probably bugs in your current SAP B1 application.

I suggest create ticket to SAP support

JimM

Former Member
0 Kudos

HI

did you check whether G/L account determination for that particluar item is defined as Item group or warehouse?

and check the COGS and GL account mapped for that Warehouse

Former Member
0 Kudos

Hi ,

The item's G/L account determination is set to Warehouse, and i'll already check the Whse account and for the COGS account and G/L account in that warehouse should be the same as the other items in the AR CM. Since they are in only same warehouse.

thanks,

Lean

Former Member
0 Kudos

HI

Can you post your FMS here?

Former Member
0 Kudos

Hi,

here's the query for FMS in warehouse,

SELECT T1.[Warehouse] FROM OUSR T0  INNER JOIN OUDG T1 ON T0.DfltsGroup = T1.Code WHERE T0.INTERNAL_K = 1

i think there's nothing worng with it.

Regards,

Lean

Former Member
0 Kudos

HI

I am giving a suggestion.

select AcctCode as Cogs_Account from oact where Segment_0 ='511001' and segment_1='004' and Segment_2='001' and Segment_3='001'

select acctcode as GL_Account from oact where Segment_0 ='411004' and segment_1='004' and Segment_2='001' and Segment_3='001'

First get the account code for that two accounts and put the cogs account code to 'salecostAc' and GL Account code  to 'revenuesAc' of the below query.

select * from owhs where salecostac='Cogs accountcode' and revenuesAc='GL account'

If you run the above query,you will get the warehouse for whivh thse account linkeede and you will get an idea.

 

Former Member
0 Kudos

Hi,

I know that accounts belongs to warehouse DIY004, the problem is how does the row line not follow the account for the warehouse DIY006.

Regards,

Lean