

{"id":85723,"date":"2021-02-16T13:02:15","date_gmt":"2021-02-16T07:32:15","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=85723"},"modified":"2021-02-16T13:03:34","modified_gmt":"2021-02-16T07:33:34","slug":"sap-abap-operators-with-examples","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/","title":{"rendered":"SAP ABAP Operators with Examples"},"content":{"rendered":"<p>Welcome to the SAP ABAP Tutorial. In this tutorial, we are going to learn about SAP ABAP Operators &#8211; what they are, why they are used and how to use them. Let\u2019s have you cosied up in using operators in ABAP.<\/p>\n<h3>What are Operators?<\/h3>\n<ul>\n<li>Operators are symbols used to perform various types of functions.<\/li>\n<li>They manipulate variables and other values to produce a result.<\/li>\n<li>Operators are combined with variables, constants, and literals to produce a meaningful expression that may produce a result.<\/li>\n<li>Without operators, there is no meaning to an expression.<\/li>\n<\/ul>\n<h3>What are Operators in SAP ABAP?<\/h3>\n<p>ABAP provides a myriad of operators to be used to perform several activities. They can be categorized in the following types:<\/p>\n<ol>\n<li>Arithmetic Operators<\/li>\n<li>Logical\/ Comparison Operators<\/li>\n<li>Bitwise Operators<\/li>\n<\/ol>\n<p>Let us see each type of operator in detail.<\/p>\n<h4>1. Arithmetic Operators in ABAP<\/h4>\n<p>As the name goes, arithmetic operators are used to carrying out mathematical operations. They are used similarly to how we use them in algebra.<\/p>\n<p>Let us see a few arithmetic operators.<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>OPERATOR<\/b><\/td>\n<td><b>SYMBOL<\/b><\/td>\n<td><b>DESCRIPTION<\/b><\/td>\n<td><b>EXAMPLE<\/b><\/td>\n<\/tr>\n<tr>\n<td>Addition<\/td>\n<td>+<\/td>\n<td>Used to add two numerical values<\/td>\n<td>25 + 3 = 28<\/td>\n<\/tr>\n<tr>\n<td>Subtraction<\/td>\n<td>&#8211;<\/td>\n<td>Used to subtract two numerical values<\/td>\n<td>25 &#8211; 3 = 22<\/td>\n<\/tr>\n<tr>\n<td>Multiplication<\/td>\n<td>*<\/td>\n<td>Used to multiply two numerical values<\/td>\n<td>25 * 3 = 75<\/td>\n<\/tr>\n<tr>\n<td>Division<\/td>\n<td>\/<\/td>\n<td>Used to find quotient when one numerical value is divided by another numerical value<\/td>\n<td>25 \/ 3 = 8<\/td>\n<\/tr>\n<tr>\n<td>Modulus<\/td>\n<td>MOD<\/td>\n<td>Used to find remainder when one numerical value is divided by another numerical value<\/td>\n<td>25 MOD 3 = 1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Let\u2019s see examples on how to use Arithmetic Operators in ABAP &#8211;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">REPORT ZR_SS_DATAFLAIR_SAMPLE_001.\r\n\r\nDATA:\r\n      A TYPE I VALUE 23,\r\n      B TYPE I VALUE 5,\r\n      Sum TYPE I,\r\n      Difference TYPE I,\r\n      Product TYPE I,\r\n      Quotient TYPE I,\r\n      Remainder TYPE I.\r\n\r\nSum =  A + B.\r\nWRITE \/ Sum.\r\n\r\nDifference =  A - B.\r\nWRITE \/ Difference.\r\n\r\nProduct =  A * B.\r\nWRITE \/ Product.\r\n\r\nQuotient =  A \/ B.\r\nWRITE \/ Quotient.\r\n\r\nRemainder =  A MOD B.\r\nWRITE \/ Remainder.\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">28<br \/>\n18<br \/>\n115<br \/>\n5<br \/>\n3<\/div>\n<h4><span style=\"font-weight: 400;\">2. Logical\/Comparison Operators in ABAP<br \/>\n<\/span><\/h4>\n<p><span style=\"font-weight: 400;\">Logical operators are used for comparison between two values. They are usually used as tests between two variables, and return a true\/false value based on the result.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let us see a few logical operators.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Consider a = 2, b = 4, c = 0<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>OPERATOR<\/b><\/td>\n<td><b>SYMBOL<\/b><\/td>\n<td><b>DESCRIPTION<\/b><\/td>\n<td><b>EXAMPLE<\/b><\/td>\n<\/tr>\n<tr>\n<td>Equality<\/td>\n<td>=<\/td>\n<td>To check whether two quantities are equal<\/td>\n<td>a = b would return false (as 2 is not equal to 4)<\/td>\n<\/tr>\n<tr>\n<td>Inequality<\/td>\n<td>&lt;&gt;<\/td>\n<td>To check whether two quantities are unequal<\/td>\n<td>a &lt;&gt; b would return true (as 2 is not equal to 4)<\/td>\n<\/tr>\n<tr>\n<td>Less than<\/td>\n<td>&lt;<\/td>\n<td>To check whether the first quantity is lesser in value than the second quantity<\/td>\n<td>a &lt; b would return true (as 2 is less than 4)<\/td>\n<\/tr>\n<tr>\n<td>Greater than<\/td>\n<td>&gt;<\/td>\n<td>To check whether the first quantity is greater in value than the second quantity<\/td>\n<td>a &gt; b would return false (as 2 is less than 4)<\/td>\n<\/tr>\n<tr>\n<td>Less than or equal to<\/td>\n<td>&lt;=<\/td>\n<td>To check whether the first quantity is lesser or equal in value than the second quantity<\/td>\n<td>a &lt;= b would return true (as 2 is less than 4)<\/td>\n<\/tr>\n<tr>\n<td>Greater than or equal to<\/td>\n<td>&gt;=<\/td>\n<td>To check whether the first quantity is greater or equal in value than the second quantity<\/td>\n<td>a &gt;= b would return false (as 2 is less than 4)<\/td>\n<\/tr>\n<tr>\n<td>Interval test<\/td>\n<td>a BETWEEN b AND c<\/td>\n<td>To check whether quantity \u2018a\u2019 lies in value in between quantities \u2018b\u2019 and \u2018c\u2019<\/td>\n<td>a BETWEEN b AND c would return true (as 2 is between 0 &amp; 4)<\/td>\n<\/tr>\n<tr>\n<td>Is initial<\/td>\n<td>IS INITIAL<\/td>\n<td>To check if value of variable is the same as during assignment<\/td>\n<td>a IS INITIAL would be true<\/td>\n<\/tr>\n<tr>\n<td>Is not initial<\/td>\n<td>IS NOT INITIAL<\/td>\n<td>To check if value of variable has been changed since assignment<\/td>\n<td>a IS NOT INITIAL would be false<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">if either one of length or data type does not match for the two variables being operated upon, ABAP will automatically convert either one or both variables. The rules of conversion are as follows &#8211;\u00a0<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>VARIABLE 1 (a) TYPE<\/b><\/td>\n<td><b>VARIABLE 2 (b) TYPE<\/b><\/td>\n<td><b>AUTOMATIC CONVERSION<\/b><\/td>\n<\/tr>\n<tr>\n<td>I<\/td>\n<td>any<\/td>\n<td>b converted to type I<\/td>\n<\/tr>\n<tr>\n<td>P<\/td>\n<td>any<\/td>\n<td>b converted to type P<\/td>\n<\/tr>\n<tr>\n<td>D<\/td>\n<td>any<\/td>\n<td>b converted to type D<\/td>\n<\/tr>\n<tr>\n<td>N<\/td>\n<td>C\/X<\/td>\n<td>Both converted to type P<\/td>\n<\/tr>\n<tr>\n<td>C<\/td>\n<td>X<\/td>\n<td>b converted to type C<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Let\u2019s see examples on how to use Logical Operators in ABAP &#8211; <\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">REPORT ZR_SS_DATAFLAIR_SAMPLE_001.\r\nDATA:\r\n      A TYPE I VALUE 2,\r\n      B TYPE I VALUE 4,\r\n      C TYPE I VALUE 0.\r\n\r\n\r\nIF A = B.\r\n  WRITE: \/ 'A is equal to B'.\r\nENDIF.\r\n\r\nIF A &lt;&gt; B.\r\n  WRITE: \/ 'A is not equal to B'.\r\nENDIF.\r\n\r\nIF A &lt; B.\r\n  WRITE: \/ 'A is lesser than B'.\r\nENDIF.\r\n\r\nIF A &gt; B.\r\n  WRITE: \/ 'A is greater than B'.\r\nENDIF.\r\n\r\nIF A &lt;= B.\r\n  WRITE: \/ 'A is lesser than or equal to B'.\r\nENDIF.\r\n\r\nIF A &gt;= B.\r\n  WRITE: \/ 'A is greater than or equal to B'.\r\nENDIF.\r\n\r\nIF A BETWEEN C AND B.\r\n  WRITE: \/ 'A lies between B and C'.\r\nENDIF.\r\n<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">A is not equal to B<br \/>\nA is lesser than B<br \/>\nA is lesser than or equal to B<br \/>\nA lies between B and C<\/div>\n<h4>3. Bitwise Operators in ABAP<\/h4>\n<p>We also have bitwise operators in ABAP for boolean-level operations.<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>OPERATOR<\/b><\/td>\n<td><b>MEANING<\/b><\/td>\n<\/tr>\n<tr>\n<td>BIT-NOT<\/td>\n<td>It changes all \u20180\u2019s to \u20181\u2019s and vice versa<\/td>\n<\/tr>\n<tr>\n<td>BIT-AND<\/td>\n<td>It uses AND operator on each bit, i.e. returns \u20181\u2019 only if both bits are \u20181\u2019, else returns \u20180\u2019.<\/td>\n<\/tr>\n<tr>\n<td>BIT-OR<\/td>\n<td>It uses OR operator on each bit, i.e. returns \u20180\u2019 if both bits are \u20180\u2019, else returns \u20181\u2019<\/td>\n<\/tr>\n<tr>\n<td>BIT-XOR<\/td>\n<td>It uses an XOR operator on each bit, i.e. returns \u20180\u2019 if both bits are equal, and returns \u20181\u2019 if they are unequal.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Here is an example of how the above operators work:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>BIT1<\/b><\/td>\n<td><b>NOT(BIT1)<\/b><\/td>\n<td><b>BIT 2<\/b><\/td>\n<td><b>NOT (BIT 2)<\/b><\/td>\n<td><b>AND<\/b><\/td>\n<td><b>OR<\/b><\/td>\n<td><b>XOR<\/b><\/td>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>0<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Let\u2019s see examples of how to use Bitwise Operators in ABAP &#8211;\u00a0<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">REPORT ZR_SS_DATAFLAIR_SAMPLE_001.\r\nDATA:\r\n      A TYPE X VALUE '24',\r\n      B TYPE X VALUE '12',\r\n      RES_AND TYPE X,\r\n      RES_OR TYPE X,\r\n      RES_NOT TYPE X,\r\n      RES_XOR TYPE X.\r\n\r\nRES_AND = A BIT-AND B.\r\nWRITE: \/ 'A BIT-AND B = ', RES_AND.\r\n\r\nRES_OR = A BIT-OR B.\r\nWRITE: \/ 'A BIT-OR B = ', RES_OR.\r\n\r\nRES_XOR = A BIT-XOR B.\r\nWRITE: \/ 'A BIT-XOR B = ', RES_XOR.\r\n\r\nRES_NOT = BIT-NOT A.\r\nWRITE: \/ 'BIT-NOT A = ', RES_NOT.<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">A BIT-AND B = 00<br \/>\nA BIT-OR B = 36<br \/>\nA BIT-XOR B = 36<br \/>\nBIT-NOT A = DB<\/div>\n<h4>4. Character String Operators in ABAP<\/h4>\n<p>As the name suggests, Character String Operators in ABAP compare characters (single character text) with strings (multiple character text) and evaluate results according to its presence or absence in the string.<\/p>\n<p>To simplify, let\u2019s see types and examples:<\/p>\n<p>For the description, assume we have two strings: A &amp; B, we perform operations on them as follows (operator is in bold) &#8211;<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>OPERATOR<\/b><\/td>\n<td><b>SYMBOL<\/b><\/td>\n<td><b>DESCRIPTION<\/b><\/td>\n<\/tr>\n<tr>\n<td>Contains only<\/td>\n<td>A <b>CO <\/b>B<\/td>\n<td>Evaluates to true if A contains only characters from B<\/td>\n<\/tr>\n<tr>\n<td>Does not contain only<\/td>\n<td>A <b>CN <\/b>B<\/td>\n<td>Evaluates to true if A contains at least one character not present in B<\/td>\n<\/tr>\n<tr>\n<td>Contains any<\/td>\n<td>A <b>CA <\/b>B<\/td>\n<td>Evaluates to true if A contains at least one character present in B<\/td>\n<\/tr>\n<tr>\n<td>Does not contain any<\/td>\n<td>A <b>NA <\/b>B<\/td>\n<td>Evaluates to true if A does not contain any character present in B<\/td>\n<\/tr>\n<tr>\n<td>Contains string<\/td>\n<td>A <b>CS <\/b>B<\/td>\n<td>Evaluates to true if A contains the entire string B<\/td>\n<\/tr>\n<tr>\n<td>Does not contain string<\/td>\n<td>A <b>NS <\/b>B<\/td>\n<td>Evaluates to true if A does not contain the entire string B<\/td>\n<\/tr>\n<tr>\n<td>Contains pattern<\/td>\n<td>A <b>CP <\/b>B<\/td>\n<td>Evaluates to true if A contains the pattern in B<\/td>\n<\/tr>\n<tr>\n<td>Does not contain pattern<\/td>\n<td>A <b>NP <\/b>B<\/td>\n<td>Evaluates to true if A does not contain the pattern in B<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Let\u2019s see examples on how to use Character String Operators in ABAP &#8211;<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">REPORT ZR_SS_DATAFLAIR_SAMPLE_001.\r\nDATA:\r\n      P(10) TYPE C VALUE 'APPLE',\r\n      Q(10) TYPE C VALUE 'PINEAPPLE'.\r\n\r\nIF P CA Q.\r\n  WRITE: \/ 'P contains at least one character of Q'.\r\nENDIF.\r\n\r\nIF P NA Q.\r\n  WRITE: \/ 'P does not contain any character of Q'.\r\nENDIF.\r\n\r\nIF P CO Q.\r\n  WRITE: \/ 'P is solely composed of the characters in Q'.\r\nENDIF.\r\n\r\nIF P CN Q.\r\n  WRITE: \/ 'P contains characters that are not in Q'.\r\nENDIF.\r\n\r\nIF P CS Q.\r\n  WRITE: \/ 'P contains the character string Q'.\r\nENDIF.\r\n\r\nIF P NS Q.\r\n  WRITE: \/ 'P does not contain the character string Q'.\r\nENDIF.\r\n\r\nIF P CP Q.\r\n  WRITE: \/ 'P contains the pattern in Q'.\r\nENDIF.\r\n\r\nIF P NP Q.\r\n  WRITE: \/ 'P does not contain the pattern in Q'.\r\nENDIF.<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">P contains at least one character of Q<br \/>\nP is solely composed of the character sin Q<br \/>\nP does not contain the character string Q<br \/>\nP does not contain the pattern in Q<\/div>\n<h3>Summary<\/h3>\n<p>Today, we learnt about the various operators available in SAP ABAP. We learnt the meaning of operators, why and how they are used. We also learnt through examples &#8211; both with code and without, on how to use these operators.<\/p>\n<p>Thus, these are the various types of operators present in ABAP. They are used to manipulate, compare and operate on variables and constants.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to the SAP ABAP Tutorial. In this tutorial, we are going to learn about SAP ABAP Operators &#8211; what they are, why they are used and how to use them. Let\u2019s have you&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":85725,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23786],"tags":[23780,23785,23784,23783,23781,23782,23779],"class_list":["post-85723","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sap-abap","tag-abap-operators","tag-arithmetic-operator-in-abap","tag-bitwise-operators-in-abap","tag-character-string-operators-in-abap","tag-comparison-operator-in-abap","tag-logical-operator-in-abap","tag-sap-abap-operators"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SAP ABAP Operators with Examples - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn various types of SAP Operators with Examples. It includes Arithmetic Operators, Logical\/Comparison operators, Bitwise Operators etc.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SAP ABAP Operators with Examples - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn various types of SAP Operators with Examples. It includes Arithmetic Operators, Logical\/Comparison operators, Bitwise Operators etc.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-16T07:32:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-16T07:33:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/02\/sap-abap-operators.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SAP ABAP Operators with Examples - DataFlair","description":"Learn various types of SAP Operators with Examples. It includes Arithmetic Operators, Logical\/Comparison operators, Bitwise Operators etc.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/","og_locale":"en_US","og_type":"article","og_title":"SAP ABAP Operators with Examples - DataFlair","og_description":"Learn various types of SAP Operators with Examples. It includes Arithmetic Operators, Logical\/Comparison operators, Bitwise Operators etc.","og_url":"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2021-02-16T07:32:15+00:00","article_modified_time":"2021-02-16T07:33:34+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/02\/sap-abap-operators.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9"},"headline":"SAP ABAP Operators with Examples","datePublished":"2021-02-16T07:32:15+00:00","dateModified":"2021-02-16T07:33:34+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/"},"wordCount":1104,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/02\/sap-abap-operators.jpg","keywords":["ABAP Operators","Arithmetic Operator in ABAP","Bitwise Operators in ABAP","Character String Operators in ABAP","Comparison Operator in ABAP","Logical operator in ABAP","SAP ABAP Operators"],"articleSection":["SAP ABAP Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/","url":"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/","name":"SAP ABAP Operators with Examples - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/02\/sap-abap-operators.jpg","datePublished":"2021-02-16T07:32:15+00:00","dateModified":"2021-02-16T07:33:34+00:00","description":"Learn various types of SAP Operators with Examples. It includes Arithmetic Operators, Logical\/Comparison operators, Bitwise Operators etc.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/02\/sap-abap-operators.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/02\/sap-abap-operators.jpg","width":1200,"height":628,"caption":"sap abap operators"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/sap-abap-operators-with-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"SAP ABAP Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/sap-abap\/"},{"@type":"ListItem","position":3,"name":"SAP ABAP Operators with Examples"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team is a group of passionate educators and industry experts dedicated to providing high-quality online learning resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With years of experience in the field, the team aims to simplify complex topics and help learners advance their careers. At DataFlair, we believe in empowering students and professionals with the knowledge and skills needed to thrive in today\u2019s fast-paced tech industry. Follow us for Free courses, expert insights, tutorials, and practical tips to boost your learning journey.","url":"https:\/\/data-flair.training\/blogs\/author\/datafbdad\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/85723","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=85723"}],"version-history":[{"count":3,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/85723\/revisions"}],"predecessor-version":[{"id":85731,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/85723\/revisions\/85731"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/85725"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=85723"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=85723"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=85723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}