Hi Dhinesh,
Here in the string Negative sign comes inbetween the value looks like the below.
15-.00
- First replace the sign to the front as shown below.
Ex:
data Str_value type string value "15-.00".
data dec_value type p decimals 2.
"Check whether negative sign in the variable
if str_value CA '-'.
"Replace Negative sign
REPLACE ALL OCCURRENCES OF '-' IN str_value WITH ``.
"Add the sign value into the first place
concatenate '-' str_value into str_value.
endif.
Output
-15.00
- And then convert the string to Decimal value
"Remove Empty space
condense str_value.
"Convert the value
dec_value = str_value.
Regards
Rajkumar.