Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Short Dump while multiplying curr & decimal

Former Member
0 Likes
5,214

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

1 ACCEPTED SOLUTION
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
4,721

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.

39 REPLIES 39