‎2007 Oct 24 11:17 AM
hi,
1.I have a doubt.if i do arithmetic operation on two floating point numbers(data type F) and assign it to a packed number(P) how will it affect the final result.
2.Another question how can i convert a negative packed number into positive packed number.
Please answer.
thanks and regards,
Mahesh
‎2007 Oct 24 11:21 AM
‎2007 Oct 24 11:32 AM
hi
good
check this
This link will give detail descrition abt datatypes.
http://help.sap.com/saphelp_webas620/helpdata/en/fc/eb3434358411d1829f0000e829fbfe/content.htm
Data Type Code Length Description
b 1 1-byte integer
C 1 - ? Character string
D 8 Date (yyyymmdd)
F 8 Floating point number
I 4 4-byte integer
N 1 - ? Digits-only character string
P Binary Coded Decimal (packed) number
s 2 2-byte integer
T 6 Time (hhmmss)
X 1 - ? Raw data
INTLEN tells us the number of bytes used by this field; DECIMALS the number of decimals for packed and floating point numbers.
reward point if helpful.
thanks
mrutyun^
‎2007 Oct 24 11:36 AM
HI,
1)we will get round off errors.
2)here num is pack type variable.
num = abs( num ).
<b>example</b>
DATA:num TYPE p value '-1.23' DECIMALS 2.
write:/ num.
num = abs( num ).
write:/ num.
rgds,
bharat.