1 1 1 1 1 Rating 0% (0 Votes)

Round can be used for decimal fields that have no assigned QFIELDNAME or CFIELDNAME fields. Its purpose is to move decimal places left or right. If you want to move decimal places left, then you have to put there positive numbers, if you want to move decimal places right, then use negative numbers.

Example when you use 0 as round, you’ll get the normal full numbers, the display of the field hasn’t changed.

 

  

Figure 29 ZDEMO_AIN_CL12 Results using 0 as P_ROUND value

Now the same program is run with 3 that is inserted into ROUND. You can notice that instead of 2 571,25 you can see 2,5723, so the comma sign was moved left by 3 positions.

 

Figure 30 ZDEMO_AIN_CL12 Results with 3 as P_ROUND value

Also changed output is visible when you use negative values. This time -5 was used. You can see on image below that instead of 2 571,25 you can see 275 225 000.

 

Figure 31 ZDEMO_AIN_CL12 Results with -5 as P_ROUND value

In each case the value in the internal table was the same 2 571,25.


ABAP Favorites Eclipse plugin

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client