Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2756

Unwanted rounding using inline declaration

$
0
0

Hi,

 

What will be the result of value_2 and value_3 ?

 

 

Using debug this what I get:

 

 

IMHO it needs to be like value4 .

 

Am I missing something here....

  

Regards.

 

The code:

 

DATA(value_2)  = ( '5.555' + '1.77777' ) .

 

  data c_1 TYPE p DECIMALS 3 VALUE '5.555' . " 1 of type Packed Number

  data c_2 TYPE p DECIMALS 5 VALUE '1.77777' . " 2 of type Packed Number

 

  DATA(value_3) = ( c_1 + c_2 ) .

 

  DATA: value4 TYPE p DECIMALS 5 . " Data: value4 of type Packed Number

 

  value4 = ( c_1 + c_2 ) .


Viewing all articles
Browse latest Browse all 2756

Trending Articles