2009 Apr 10 6:43 PM
I have a small equation like this:
p0008-ansal = p0008-ansal * p0027-kpr02 / 100.
Apparently both the internal format seems to be P type but of different lengths. Since am multiplying a currency (ansal) with decimal (kpr02), am really not able to understand why its throwing dump.
Below is the dump:
Error analysis
An arithmetic operation in the current program "ZHRPA_COST_DIST" attempts
to process a field of type P that contains an invalid
BCD format.
Possible reasons:
1. If the field is part of a field string and its current contents are
hex 20: The field string was deleted with MOVE SPACE ... instead of
CLEAR.
2. The VARYING parameter was incorrectly placed within a DO loop,
e.g. because the TIMES parameter was too large.
Similar for WHILE ... VARY.
3. A FIELD-SYMBOL was incorrectly assigned.
Any clues plz...
Thanks
Kiran
2009 Apr 24 3:26 PM
Hi,
Try this.
data v1 type p0008-ansal value '132321.10'.
data v2 type p0027-kpr02 value '3.00'.
data v3(21) type c.
v3 = ( v1 * v2 ) / 100.
v1 = v3.
write v1.