World Writer & Calc fields

ssolberg

VIP Member
I'm stumped... I have a real simple WW report for inventory that gets the current qty on hand, the avg cost, and then I calc the extended avg cost from that. The calc field in the WW looks like this:
LIPQOH * F03.COUNCS (qty * avg cost field)

The results I am getting stump me. For example:
QTY Average Extended
O/H Unit Cost Average Cost
----- ---------- ---------------
2 322.18 644.30 (should be 644.36)
1 58.08 58.00 (uh... obvious)

Appears everything is rounded to the nearest 10th of a cent (down). I have done nothing to change the Field Details within the WW at all. The Data Dictionary has PQOH (qty on hand) set to 0 decimals. Cost fields (like UNCS) are set to 2 decimals. So I was thinking the problem was because of the decimal issues. So.... I did this to the calc field:
((LIPQOH * 100) * (F03.COUNCS)) /100

It just made it worse and came out 644.00 and 58.00. Everything was rounded to nearest whole dollar. What am I missing here?
 
SS, take a look at KG doc WST-01-0036. There's a workaround for the situation you've described, even though the doc title describes it at a WW issue after applying CU 13.
 
Sannan,

I have tried the same calcs in WW but have no problems. Everything rounded
correctly (4/5 down up).

59069.600 litres at $0.7781 came out at 45,962.06
7676.000 litres at $0.7829 came out at 6,007.19
98125.000 litres at $0.7847 came out at 76,998.69

I joined F41025 to F4105. I selected only joined records with cost type =
'02'.

I used LIPQOH * COUNCS as the calc with the result field size 15,2.

On the output defined specifications screen, WW had already predefined
LIPQOH as 15.3 (we use std JDE decimal points) and COUNCS as 15.4 (also std
JDE).

Sorry can't help any further




----- Original Message -----
From: "ssolberg" <[email protected]>
To: <[email protected]>
Sent: Thursday, May 22, 2003 7:54 AM
Subject: World Writer & Calc fields


current qty on hand, the avg cost, and then I calc the extended avg cost
from that. The calc field in the WW looks like this:
have done nothing to change the Field Details within the WW at all. The
Data Dictionary has PQOH (qty on hand) set to 0 decimals. Cost fields (like
UNCS) are set to 2 decimals. So I was thinking the problem was because of
the decimal issues. So.... I did this to the calc field:
rounded to nearest whole d!



Colin Hugill
Consultant
(World A7.3 cum12)
 
Is you new field created with the following size/attributes? Did you change
the JDE field size defaults? This is what I have for my output specs and
what the results are.

Seq W P Col Sup Edt Prt Num Output
Opt No. Description Size L W Sp Hdg Cde Dec Scl Field
10 Item Number (Short). . . 8 N A *DF N Z 0 0 LIITM
20 Cost Center. . . . . . . 12 N A *DF N LIMCU
30 Location . . . . . . . . 20 N A *DF N LILOCN
40 Lot. . . . . . . . . . . 30 N A *DF N LILOTN
50 Quantity on Hand . . . . 15 N A *DF N M 3 0 LIPQOH
60 Unit Cost. . . . . . . . 15 N A *DF N J 4 0 COUNCS
70 Extended OH Cost 15 N A *DF N J 2 0 $EO


Quantity Unit Extended
On Hand Cost OH Value
--------------- --------------- --------------
22.000 45.0695 991.53
10.000 45.0695 450.70
15.000 38.5786 578.68
15.000 38.2361 573.54
10.000 54.8865 548.87

Jim
 
You hit it right on the head. THANKS. Can't believe we never noticed this
before. I guess we just assume the $ is correct without much thought! For
those looking for the resolution, you have to wrap some stuff around the
calc field. For example:

Originally the calc field was just LIPQOH*COUNCS, which is 0 decimals and 2
decimals

To make it correctly calc because of the different decimal positions, the
new calc field looks like this: DECIMAL((LIPQOH*COUNCS),15,2)

Apparently this is to be fixed at some point in the future??



Sannan Solberg
Programmer/Developer/Anything-They-Give-Me
World A7.3 c11
 
Back
Top