‎2008 Feb 18 1:32 PM
Hi
I'm getting a dump BCD_BADDATA. I am using a curr type field which is also used for adding another curr field.
ex A = A+B (both are curr fields)
But the values getting added is like
A = 3021.60- + 20202.02
Here it throws a dump "Packed field contains incorrect BCD format".
I'm not using packed numbers anywhere in the program though.
the field refers to a data element which is of curr type.
A LIKE BSIK-DMBTR,
B LIKE BSIK-DMBTR.
A = A + B
<REMOVED BY MODERATOR>
Varun mathur
Edited by: Varun Mathur on Feb 18, 2008 2:38 PM
Edited by: Alvaro Tejada Galindo on Feb 18, 2008 12:43 PM
‎2008 Feb 18 5:50 PM
At some point you are probably saying something like:
B = space.
Change this to :
Clear B.
If B is in a structure, make sure you are not saying:
structure = space.
Rob
‎2008 Feb 18 1:34 PM
‎2008 Feb 18 1:34 PM
hi
good
check your declaration type is to F rather than I and see the difference, other wise try to change it to hexa decimal and see the changes.
thanks
mrutyun^
‎2008 Feb 18 5:50 PM
At some point you are probably saying something like:
B = space.
Change this to :
Clear B.
If B is in a structure, make sure you are not saying:
structure = space.
Rob
‎2008 Feb 19 7:01 AM
well you did'nt get me . what i was saying was something like this.
V_AMOUNT LIKE BSIK-DMBTR
V_TOTAL LIKE BSIK-DMBTR.
Both are currency fields.
Now i am adding like
V_TOTAL = V_TOTAL + V_AMOUNT.
iteration 1 : V_TOTAL contains 1000-
iteration 2: V_TOTAL = 1000- + 20202.06
Can this result in a dump ,( negative + positive value ). Only thats my question.
‎2008 Feb 19 7:15 AM
V_AMOUNT type p decimasl 2,
V_TOTAL type p decimasl 2.
V_TOTAL = ( V_TOTAL ) + ( V_AMOUNT ).
Try this....
‎2008 Feb 19 3:05 PM
Well, you picked a type without a sign. Try:
DATA: v_amount TYPE kwert VALUE '-1000.00',
v_total TYPE kwert VALUE '2020.20'.
v_total = v_total + v_amount.
WRITE : /001 v_total.Rob
‎2008 Feb 20 1:39 PM
the problem is solved. it was not a calculation problem after all.
‎2010 May 03 11:26 AM
Same problem (old post) and again no answer given by the sender that solved himself...
Can someone post the answer pease?