SAP OPERATORS



Get Example source ABAP code based on a different SAP table
  



Operators
ABAP contains the following operators:
Operators that perform special operations in operand positions:
Declaration Operators
The declaration operators DATA and FIELD-SYMBOL declare variables or field symbols in operand positions.
Constructor Operators
The constructor operators NEW, VALUE, CONV, CORRESPONDING, CAST, REF, EXACT, REDUCE, FILTER, COND, and SWITCH construct values for data objects of specific data types in constructor expressions.
Operators that combine multiple operands to a single expression:
Assignment Operators
The assignment operator = combines the source field and target field of an assignment. The special casting operator ?= performs a downcast during the assignment. The addition assignment operator ( +=), subtraction assignment operator ( -=), multiplication assignment operator (*=), division assignment operator ( /=), or concatenation assignment operator (**=) performs a calculation assignment. Furthermore, the operator = binds actual parameters to formal parameters, for example in procedure calls or when working with data clusters.
Arithmetic Operators
The arithmetic operators +, -, *, /, DIV , MOD, and ** combine two or more numeric operands to an arithmetic expression. In addition, the characters + and - act as algebraic signs in arithmetic expressions.
Bit Operators
The bit operators BIT-AND, BIT-OR, and BIT-XOR combine two or more byte-like operands to a bit expression. The bit operator BIT-NOT negates a byte-like operand.
String Operators
The string operator concatenates two character-like operands to a string expression.
Relational Operators
Relational operators occur in relational expressions, which in turn are components of logical expressions. The comparison operators =, <> , < , >, < =,>=, BETWEEN, and so on combine two or more operands of any data type to a comparison expression. There are additional relational operators for specific data types. The predicate operator IS makes a statement about an operand.
Boolean Operators
The Boolean operators AND, OR, and EQUIV combine the results of individual logical expressions to one logical expression. The result of a logical expression is either true or false. The Boolean operator NOT negates the result of a logical expression.
Operator that combine two operands during program compilation:
Literal Operator
The literal operator combines two literals or two string templates to form one literal or string template.