0 votes
in Technology by (1.1m points)
Explain about the SAP ABAP - Operators?

1 Answer

0 votes
by (1.1m points)

ABAP provides a rich set of operators to manipulate variables. All ABAP operators are classified into four categories −

  • Arithmetic Operators
  • Comparison Operators
  • Bitwise Operators
  • Character String Operators

Arithmetic Operators

Arithmetic operators are used in mathematical expressions in the same way that they are used in algebra. The following list describes arithmetic operators. Assume integer variable A holds 20 and variable B holds 40.

S.No. Arithmetic Operator & Description
1

+ (Addition)

Adds values on either side of the operator. Example: A + B will give 60.

2

− (Subtraction)

Subtracts right hand operand from left hand operand. Example: A − B will give -20.

3

* (Multiplication)

Multiplies values on either side of the operator. Example: A * B will give 800.

4

/ (Division)

Divides left hand operand by right hand operand. Example: B / A will give 2.

5

MOD (Modulus)

Divides left hand operand by right hand operand and returns the remainder. Example: B MOD A will give 0.

Example

REPORT YS_SEP_08. 
DATA: A TYPE I VALUE 150, 
B TYPE I VALUE 50, 
Result TYPE I. 
Result =  A / B. 
WRITE / Result.

The above code produces the following output −

3

Comparison Operators

Let’s discuss the various types of comparison operators for different operands.

S.No. Comparison Operator & Description
1

= (equality test). Alternate form is EQ.

Checks if the values of two operands are equal or not, if yes then condition becomes true. Example (A = B) is not true.

2

<> (Inequality test). Alternate form is NE.

Checks if the values of two operands are equal or not. If the values are not equal then the condition becomes true. Example (A <> B) is true.

3

> (Greater than test). Alternate form is GT.

Checks if the value of left operand is greater than the value of right operand. If yes then condition becomes true. Example (A > B) is not true.

4

< (Less than test). Alternate form is LT.

Checks if the value of left operand is less than the value of right operand. If yes, then condition becomes true. Example (A < B) is true.

5

>= (Greater than or equals) Alternate form is GE.

Checks if the value of left operand is greater than or equal to the valu

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Learn More with Blogmepost

blogmepost Online Test

NCERT Questions & Answers

  • NCERT Class 12 Maths Solutions
  • NCERT Class 12 Physics Solutions
  • NCERT Class 12 Chemistry Solutions
  • NCERT Class 12 Biology Solutions
  • NCERT Class 10 Science Solutions
  • NCERT Class 10 Maths Solutions
blogmepost Q&A

CBSE Questions & Answers Portal

  • CBSE Class 12 Maths Questions Answers
  • CBSE Class 12 Physics Questions Answers
  • CBSE Class 12 Chemistry Questions Answers
  • CBSE Class 12 Biology Questions Answers
  • CBSE Class 10 Science Questions Answers
  • CBSE Class 10 Maths Questions Answers
Blogmepost

Learn Math Formula, Revise Notes

  • JEE Crash Course Questions & Answers
  • NCERT Course Questions and Answers
  • CBSE Board Questions Bank
  • ICSE Board Questions Bank
  • Free Study Materials
  • Question & Answers Bank for All Classes
  • Text Book Solutions
  • Previous Year Question Paper
  • NCERT Book Solutions

  • NCERT
  • NCERT Solutions
  • NCERT Solutions for Class 12 Maths
  • NCERT Solutions for Class 12 Physics
  • NCERT Solutions for Class 12 Chemistry
  • NCERT Solutions for Class 12 Biology
  • NCERT Solutions for Class 11 Maths
  • NCERT Solutions for Class 11 Physics
  • NCERT Solutions for Class 11 Chemistry
  • NCERT Solutions for Class 11 Biology
  • NCERT Solutions for Class 10 Maths
  • NCERT Solutions for Class 10 Science
  • NCERT Solutions for Class 9 Maths
  • NCERT Solutions for Class 9 Science
  • CBSE Classes

  • CBSE Class 5 Questions
  • CBSE Class 6 Questions
  • CBSE Class 7 Questions
  • CBSE Class 8 Questions
  • CBSE Class 9 Questions
  • CBSE Class 10 Questions
  • CBSE Class 10 Maths Questions
  • CBSE Class 11 Commerce Questions
  • CBSE Class 11 Engineering Questions
  • CBSE Class 11 Medical Questions
  • CBSE Class 12 Commerce Questions
  • CBSE Class 12 Maths Questions
  • CBSE Class 12 Engineering Questions
  • CBSE Class 12 Medical Questions
  • BOARDS

  • CBSE
  • ICSE
  • NCERT
  • IGCSE
  • Andhra Pradesh
  • Bihar
  • Gujarat
  • Jharkhand
  • Karnataka
  • Kerala
  • Madhya Pradesh
  • Maharashtra
  • Punjab
  • Rajasthan
...