Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

modulus

abdulazeez12
Active Contributor
0 Likes
471

how can we achieve modulus in ABAP. I mean if we have a -ve number then modulus of -ve is +ve..What is the op for this in ABAP?

for example.

| -2 | = 2

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
424

Hi

use

ABS command

b = ABS ( a )

Reward points for useful Answers

Regards

Anji

2 REPLIES 2
Read only

Former Member
0 Likes
425

Hi

use

ABS command

b = ABS ( a )

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
424

Hi,

Use <b>ABS</b> Command.This will give the Absolute value of the argument.

<b>Example :</b>

DATA: T1(10),

T2(10) VALUE '-100'.

T1 = ABS( T2 ).

WRITE T1.

This produces the following output:

100

Regards,

Padmam.