0% found this document useful (0 votes)
7 views

Basic Operators 8

This document discusses assigning values to ABAP variables using the equal sign or MOVE keyword. It also demonstrates basic arithmetic operations using mathematical expressions and keywords like ADD, SUBTRACT, MULTIPLY, and DIVIDE. Finally, it shows how to clear ABAP variables using the CLEAR keyword to set them to default values.

Uploaded by

Vikram Bigamudre
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Basic Operators 8

This document discusses assigning values to ABAP variables using the equal sign or MOVE keyword. It also demonstrates basic arithmetic operations using mathematical expressions and keywords like ADD, SUBTRACT, MULTIPLY, and DIVIDE. Finally, it shows how to clear ABAP variables using the CLEAR keyword to set them to default values.

Uploaded by

Vikram Bigamudre
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Assigning values to ABAP variables Use = or MOVE keyword to assign a value to a variable.

DATA: a b c d TYPE TYPE TYPE TYPE i, i, i, i.

a = 10. b = a. MOVE 20 TO c. MOVE c TO d. WRITE:/ a, b, c, d.

Output

Basic Arithmetic Operations


DATA: a b c d TYPE TYPE TYPE TYPE i, i, i, i.

*Using Mathematical Expressions a = 10 + 20. b = 20 - 10. c = 10 * 2. d = 100 / 2. WRITE:/ 'Using Expressions'. WRITE:/ a, b, c, d. *Using Keywords add 10 to a. subtract 5 from b. multiply c by 2. divide d by 2. WRITE:/ 'Using Keywords'. WRITE:/ a, b, c, d.

Output

Clear ABAP variables Use keyword CLEAR to set the variables to default values.
DATA: a TYPE i, b TYPE i. a = 10 + 20. b = 20 - 10. WRITE:/ 'Before Clear'. WRITE:/ a, b. clear: a, b. WRITE:/ 'After Clear'. WRITE:/ a, b.

Output

You might also like