I am getting the below dump
Unable to interpret "11750.00 " as a number.
Error in the ABAP Application Program
The current ABAP program "ZSUB_RFKORD10" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_CONVERSION_NO_NUMBER', was n
procedure "CUMMIL" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The program attempted to interpret the value "11750.00 " as a number, but
since the value contravenes the rules for correct number formats,
this was not possible.
86 READ TABLE input WITH KEY name = 'VAR1'.
87 CONDENSE inval1.
88 CONDENSE input-value.
91 IF input-value CS ','.
92 pos1 = sy-fdpos .
93 pos2 = sy-fdpos + 1.
94 CONCATENATE input-value0(pos1) input-valuepos2 INTO input-value.
99 CLEAR: pos1, pos2.
101 IF ouput-value CS ','.
102 pos1 = sy-fdpos .
103 pos2 = sy-fdpos + 1.
104 CONCATENATE ouput-value0(pos1) ouput-valuepos2 INTO ouput-value.
110 ouval = ouput-value.
111 CONDENSE ouval.
112 inval = input-value.
113 CONDENSE inval.
114 inval1 = v_amt.
115 CONDENSE inval.
>>>>> ouval = ouval + input-value + v_amt.
all the commas have been removed before performing the addition , so why this error is appearing
Because you are taking two char variables and summing them. If you take a currency, put it into a char variable and then try and sum it, you will get the error.
Try putting the amount into your variables as follows:
WRITE lv_amount to lv_char NO-GROUPING.
This will remove the thousands separaters.
which type has your field OUVAL.
ouval(18) TYPE c.
What are the values of the three fields that are added together in field OUVAL? The field values should be available in your short dump!
ouval = ouval + input-value + v_amt.
ouval = blank
input-value = 11750.00
v_amt = blank
I checked with Your test program in unicode and non-unicode systems of SAP Rel. 4.6C and ECC 6.0, but I can't find any error.
My last idea is, that there may be an error when input-value contains any other sign than trailing spaces, e.g. X'00' or something other that can't be shown.