Hi,
Use ABS function.
Ex.
DATA: T1(10),
T2(10) VALUE '-100'.
T1 = ABS( T2 ).
WRITE T1.
This produces the following output:
100
Two conversions are performed. First, the contents of field T2 (type C) are converted
to type P. Then the system processes the ABS function using the results of the
conversion. Then, during the assignment to the type C field T1, the result of the
function is converted back to type C.
Regards,
Bhaskar
Hi vamsi,
simply:
reverse the sign using
value = - value.
remove the sign:
value = abs( value ).
Regards,
Clemens
Add a comment