

{"id":92393,"date":"2021-05-17T09:00:02","date_gmt":"2021-05-17T03:30:02","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=92393"},"modified":"2021-04-30T18:33:08","modified_gmt":"2021-04-30T13:03:08","slug":"sap-abap-oops-inheritance-encapsulation-polymorphism","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/","title":{"rendered":"SAP ABAP OOPS &#8211; Inheritance, Encapsulation, Polymorphism"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">In this tutorial, we\u2019ll be getting deeper into the world of SAP ABAP object-oriented programming. In part 1 of the tutorial, we learnt the basic concepts of SAP ABAP objects and classes in detail. Here, we will learn about the accompanying features of object orientation in ABAP.<\/span><\/p>\n<h3>Inheritance in SAP ABAP<\/h3>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Inheritance means to derive code functionality from one class to another<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">It means defining a class in terms of another (parent) class<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">This feature of object orientation promotes reusability of classes<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">We can use inheritance while writing a class with which to derive a parent class, by mentioning the name of parent class in the definition of derived class<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Hence, the class that is inherited is called parent or base class or super class, and the class inheriting the base class is the child class or derived class or subclass<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Through inheritance, an object from derived class can obtain characteristics of objects from base class<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">The keyword to use for inheritance is \u2018INHERITING FROM\u2019, just beside the class definition<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\"><strong>SYNTAX FOR DEFINING CLASS<\/strong>:<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">CLASS &lt;subclass_name&gt; DEFINITION INHERITING FROM &lt;superclass_name&gt;\r\n<\/pre>\n<p><strong>EXAMPLE<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">CLASS Z_Dog DEFINITION INHERITING FROM Z_Animal\r\n<\/pre>\n<p><strong>ABAP PROGRAM EXAMPLE<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Report ZDATAFLAIR_INHERITANCE. \r\nCLASS DataflairParent Definition. \r\nPUBLIC Section. \r\nData: df_public(25) Value 'This is from parent class\u2019. \r\nMethods: DataflairParentM. \r\nENDCLASS. \r\n\r\nCLASS DataflairChild Definition Inheriting From DataflairParent. \r\nPUBLIC Section. \r\nMethods: DataflairChildM. \r\nENDCLASS. \r\n\r\nCLASS DataflairParent Implementation. \r\nMethod DataflairParentM. \r\nWrite \/: df_public. \r\nEndMethod. ENDCLASS. \r\n\r\nCLASS DataflairChild Implementation. \r\nMethod DataflairChildM. \r\nSkip. \r\nWrite \/: 'This is from child class', df_public.\r\nEndMethod. \r\nENDCLASS. \r\n\r\nStart-of-selection. \r\nData: DataflairParent Type Ref To DataflairParent, \r\nDataflairChild Type Ref To DataflairChild. \r\nCreate Object: DataflairParent, DataflairChild. \r\nCall Method: DataflairParent\u2192DataflairParentM, \r\nchild\u2192DataflairChildM.\r\n<\/pre>\n<p><span style=\"font-weight: 400;\"><strong>OUTPUT:<\/strong><\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">This is from parent class\r\nThis is from child class\r\nThis is from parent class\r\n<\/pre>\n<h3>ABAP Access Control and Inheritance<\/h3>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">We know that a class can be defined as public, private, protected<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">So when a subclass inherits a superclass, there are certain rules that govern how the class can access objects and data of superclass<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">The following table shows whether a derived class has access to base class, based on whether the base class is defined as public\/protected\/private:<\/span><\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td><b>ACCESS<\/b><\/td>\n<td><b>SAME CLASS<\/b><\/td>\n<td><b>DERIVED CLASS<\/b><\/td>\n<td><b>OUTSIDE (NON-DERIVED CLASS)<\/b><\/td>\n<\/tr>\n<tr>\n<td><b>PUBLIC<\/b><\/td>\n<td><span style=\"font-weight: 400;\">Yes<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Yes<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Available<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>PRIVATE<\/b><\/td>\n<td><span style=\"font-weight: 400;\">Yes<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Yes<\/span><\/td>\n<td><span style=\"font-weight: 400;\">No<\/span><\/td>\n<\/tr>\n<tr>\n<td><b>PROTECTED<\/b><\/td>\n<td><span style=\"font-weight: 400;\">Yes<\/span><\/td>\n<td><span style=\"font-weight: 400;\">No<\/span><\/td>\n<td><span style=\"font-weight: 400;\">No<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">The above table is explained as follows &#8211;\u00a0<\/span><\/p>\n<p><strong>1. Public Inheritance:<\/strong><\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Public data and members of superclass become public data and members of subclass<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Protected members of superclass become protected members of subclass<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Private members of superclass cannot be accessed by subclass<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>2. Private Inheritance:<\/strong><\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Public members of superclass become private members of subclass<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Protected members of superclass become private members of subclass<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Private members of superclass cannot be accessed by subclass<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>3. Protected Inheritance:<\/strong><\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Public members of superclass become protected members of subclass<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Protected members of superclass become protected members of subclass<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Private members of superclass cannot be accessed by subclass<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Redefining Methods in Sub Class in SAP ABAP<\/h3>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">We can redefine methods of superclass in subclass<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">We usually do this so that we can have subclass-specific methods<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">However, we must keep the section of redefinition of the method the same as the parent method<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">We only need to use the name of the inherited method and can access its components using \u2018super\u2019 reference<\/span><\/li>\n<\/ul>\n<h3>Encapsulation in ABAP<\/h3>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Encapsulation in object orientation means wrapping data and functions together<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">This hides the data and function from the outside world, thus promoting data hiding<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Data hiding means obstructing the view of private data and functions from unwanted third parties, and data abstraction means showing users only what they need to see<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">In ABAP, we can do encapsulation via access methods &#8211; public, private, protected.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">We can also perform encapsulation via interfaces (which are similar to classes, the only difference is that we do not implement anything in an interface, it has to be done via class inheriting the interface, as shown in example below)<\/span><\/li>\n<\/ul>\n<p><strong>EXAMPLE OF ABAP ENCAPSULATION VIA INTERFACE<\/strong><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Report ZDATAFLAIR_ENCAPSULATION. \r\nInterface df_interface.\r\n   Data text1 Type char35.\r\n   Methods Dataflairmethod1.\r\nEndInterface.\r\n\r\nCLASS DataflairClass1 Definition.\r\n   PUBLIC Section.\r\n      Interfaces df_interface.\r\nENDCLASS. \r\n\r\nCLASS DataflairClass2 Definition.\r\n   PUBLIC Section.\r\n      Interfaces df_interface. \r\nENDCLASS.\r\n\r\nCLASS DataflairClass1 Implementation.\r\n   Method df_interface~Dataflairmethod1.\r\n      df_interface~text1 = 'DataflairClass 1 Interface method'.\r\n      Write \/ df_interface~text1.\r\n   EndMethod. \r\nENDCLASS.\r\n \r\nCLASS DataflairClass2 Implementation.\r\n   Method df_interface~Dataflairmethod1.\r\n      df_interface~text1 = 'DataflairClass 2 Interface method'.\r\n      Write \/ df_interface~text1.\r\n   EndMethod. \r\nENDCLASS.\r\n \r\nStart-Of-Selection.\r\n   Data: DataflairObject1 Type Ref To DataflairClass1,\r\n      DataflairObject2 Type Ref To DataflairClass2.\r\n        \r\n   Create Object: DataflairObject1, DataflairObject2.\r\n   CALL Method: DataflairObject1\u2192df_interface~Dataflairmethod1,\r\n                DataflairObject2\u2192df_interface~Dataflairmethod1. \r\n<\/pre>\n<p><span style=\"font-weight: 400;\"><strong>OUTPUT<\/strong>:<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">DataflairClass 1 Interface method\r\nDataflairClass 2 Interface method\r\n<\/pre>\n<h3>Polymorphism in SAP ABAP<\/h3>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">It means using one thing for different operations<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">It occurs usually in inheritance &#8211; for e.g. redefining methods which we saw under the concept of inheritance<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Polymorphism means redefining methods to either overload them or override them<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Overloading methods means when we use the same method name but use different parameters<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Overriding methods means when we use the same method name and parameters, but the two methods are related via inheritance relationship<\/span><\/li>\n<\/ul>\n<p><strong>ABAP Polymorphism Example(Redefining methods)<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Report ZDATAFLAIR_POLYMORPHISM. \r\nCLASS df_class_02 Definition Abstract. \r\nPUBLIC Section. \r\nMethods: prgm_type Abstract, \r\ndfapproach1 Abstract. \r\nENDCLASS. \r\n\r\nCLASS df_class_02 Definition \r\nInheriting From df_class_01. \r\nPUBLIC Section. \r\nMethods: prgm_type Redefinition, \r\napproach1 Redefinition. \r\nENDCLASS. \r\n\r\nCLASS class_procedural Implementation. \r\nMethod prgm_type. \r\nWrite: 'An apple'. \r\n\r\nEndMethod. Method approach1. \r\nWrite: 'a fruit'. \r\n\r\nEndMethod. ENDCLASS. \r\nCLASS class_OO Definition \r\nInheriting From class_prgm. \r\nPUBLIC Section. \r\nMethods: prgm_type Redefinition, \r\napproach1 Redefinition. \r\nENDCLASS. \r\n\r\nCLASS class_OO Implementation. \r\nMethod prgm_type. \r\nWrite: 'An onion'. \r\nEndMethod. \r\n\r\nMethod dfapproach1 . \r\nWrite: 'a vegetable'.\r\nEndMethod. \r\nENDCLASS. \r\n\r\nCLASS class_type_approach Definition. \r\nPUBLIC Section. \r\nCLASS-METHODS: \r\nstart Importing df_class_01_prgm \r\nType Ref To class_prgm. \r\nENDCLASS. \r\n\r\nCLASS class_type_approach IMPLEMENTATION. \r\nMethod start. \r\nCALL Method df_class_01\u2192prgm_type. \r\nWrite: is. \r\n\r\nCALL Method df_class_01\u2192approach1. \r\nEndMethod. \r\nENDCLASS. \r\n\r\nStart-Of-Selection. \r\nData: df_class_01 Type Ref To class_procedural, \r\ndf_class_02 Type Ref To class_OO. \r\n\r\nCreate Object df_class_01. \r\nCreate Object df_class_02. \r\nCALL Method class_type_approach\u21d2start \r\nExporting \r\n\r\nclass1_prgm = df_class_01. \r\nNew-Line. \r\nCALL Method class_type_approach\u21d2start \r\nExporting \r\nclass1_prgm = df_class_02.  \r\n<\/pre>\n<p><span style=\"font-weight: 400;\"><strong>OUTPUT<\/strong>:<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">An apple is a fruit\r\nAn onion is a vegetable\r\n<\/pre>\n<h3>Summary<\/h3>\n<p><span style=\"font-weight: 400;\">Thus, in this tutorial we learnt more about the concepts of object orientation &#8211; inheritance, polymorphism, encapsulation &#8211; which form the core of reusability, data hiding and data abstraction properties of object-oriented programming, especially in ABAP.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we\u2019ll be getting deeper into the world of SAP ABAP object-oriented programming. In part 1 of the tutorial, we learnt the basic concepts of SAP ABAP objects and classes in detail.&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":93001,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23786],"tags":[24092,24093,24094,24095],"class_list":["post-92393","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sap-abap","tag-encapsulation-in-sap-abap","tag-inheritance-in-sap-abap","tag-polymorphism-in-sap-abap","tag-sap-abap-oops"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SAP ABAP OOPS - Inheritance, Encapsulation, Polymorphism - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn OOPS concepts in SAP ABAP with Examples. It covers Inheritance, Encapsulation and polymorphism in SAP ABAP.\" \/>\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-oops-inheritance-encapsulation-polymorphism\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SAP ABAP OOPS - Inheritance, Encapsulation, Polymorphism - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn OOPS concepts in SAP ABAP with Examples. It covers Inheritance, Encapsulation and polymorphism in SAP ABAP.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/\" \/>\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-05-17T03:30:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/04\/SAP-ABAP-OOPS-Part2.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=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SAP ABAP OOPS - Inheritance, Encapsulation, Polymorphism - DataFlair","description":"Learn OOPS concepts in SAP ABAP with Examples. It covers Inheritance, Encapsulation and polymorphism in SAP ABAP.","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-oops-inheritance-encapsulation-polymorphism\/","og_locale":"en_US","og_type":"article","og_title":"SAP ABAP OOPS - Inheritance, Encapsulation, Polymorphism - DataFlair","og_description":"Learn OOPS concepts in SAP ABAP with Examples. It covers Inheritance, Encapsulation and polymorphism in SAP ABAP.","og_url":"https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2021-05-17T03:30:02+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/04\/SAP-ABAP-OOPS-Part2.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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"SAP ABAP OOPS &#8211; Inheritance, Encapsulation, Polymorphism","datePublished":"2021-05-17T03:30:02+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/"},"wordCount":667,"commentCount":2,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/04\/SAP-ABAP-OOPS-Part2.jpg","keywords":["Encapsulation in SAP ABAP","Inheritance in SAP ABAP","Polymorphism in SAP ABAP","SAP ABAP OOPS"],"articleSection":["SAP ABAP Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/","url":"https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/","name":"SAP ABAP OOPS - Inheritance, Encapsulation, Polymorphism - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/04\/SAP-ABAP-OOPS-Part2.jpg","datePublished":"2021-05-17T03:30:02+00:00","description":"Learn OOPS concepts in SAP ABAP with Examples. It covers Inheritance, Encapsulation and polymorphism in SAP ABAP.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/04\/SAP-ABAP-OOPS-Part2.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/04\/SAP-ABAP-OOPS-Part2.jpg","width":1200,"height":628,"caption":"SAP ABAP OOPS"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/sap-abap-oops-inheritance-encapsulation-polymorphism\/#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 OOPS &#8211; Inheritance, Encapsulation, Polymorphism"}]},{"@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\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/92393","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=92393"}],"version-history":[{"count":2,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/92393\/revisions"}],"predecessor-version":[{"id":93002,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/92393\/revisions\/93002"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/93001"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=92393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=92393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=92393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}