cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Unable to Calculate the Total Sum value In Decimals, Rounding issue

AadivaramAbbulu
Explorer
0 Kudos
171

Hi, 
In one of the Standard routine added custom include, to achieve the Business requirement.
Some logic written. Requirement is for Fiori App. So, In backend Abap code written.
There is a Transaction document "Manage Solution Quotations" Abap code will trigger.
If document is having 6 lines. 6 times code will trigger and calculate the value and  
The result value will move into the Below Variable.
xkwert LIKE komv-kwert, (Condition Value)

Here(in the table) the logic is  A*B/C = D
In Normally if i calculate the logic in Excel Values are coming like D column 
But if it comes to coding Column E, Values are coming Bcz of Decimal 2 Variable is having.
if You observe both columns sum value D and E.. Rounding is missing At E Column.
Not able to Find the exact solution. Here in the code.. For every line(no of lines in the transaction) code will trigger. Suppose having 5 lines.. more than 5 times code will trigger and logic will execute bcz of standard routine.
Here 9999.98 value Standard code is calculating. Now issue is it should be Roud the value 10k
Some cases like 5k and 9k How can i achieve this one.

ABCDE
100003738098384.953799.3623799.36
10000236.3698384.9524.02424.02
10000253598384.95257.6614257.66
10000796.9598384.9581.0032481
10000796.9598384.9581.0032481
10000253598384.95257.6614257.66
10000253598384.95257.6614257.66
10000236.3698384.9524.02424.02
1000051333.3398384.955217.65217.6
   100009999.98

Accepted Solutions (0)

Answers (0)