<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>oo abap &#8211; SAP EWM Help</title>
	<atom:link href="https://www.sapewmhelp.com/question-tag/oo-abap/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sapewmhelp.com</link>
	<description>SAP EWM questions answered by experts — ABAP, S/4HANA, warehouse management</description>
	<lastBuildDate>Sun, 03 Aug 2025 06:37:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>
	<item>
		<title>What is an Abstract Class in SAP ABAP?</title>
		<link>https://www.sapewmhelp.com/question/what-is-an-abstract-class-in-sap-abap/</link>
					<comments>https://www.sapewmhelp.com/question/what-is-an-abstract-class-in-sap-abap/#respond</comments>
		
		<dc:creator><![CDATA[DPM125]]></dc:creator>
		<pubDate>Sun, 03 Aug 2025 06:37:17 +0000</pubDate>
				<guid isPermaLink="false">https://www.sapewmhelp.com/?question=what-is-an-abstract-class-in-sap-abap</guid>

					<description><![CDATA[An abstract class is a class that cannot be instantiated directly. It serves as a blueprint for other classes. Abstract classes typically include: Abstract methods, which are declared but not implemented. Concrete methods, which can be implemented and inherited. Feature Description Not instantiable Cannot use CREATE OBJECT on abstract classes. Used for inheritance Serve as [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>An abstract class is a class that cannot be instantiated directly. It serves as a blueprint for other classes. Abstract classes typically include:</p>
<ul>
<li>Abstract methods, which are declared but not implemented.</li>
<li>Concrete methods, which can be implemented and inherited.</li>
</ul>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Not instantiable</td>
<td>Cannot use <code>CREATE OBJECT</code> on abstract classes.</td>
</tr>
<tr>
<td>Used for inheritance</td>
<td>Serve as base classes for child classes.</td>
</tr>
<tr>
<td>Can contain abstract methods</td>
<td>These must be implemented in subclasses.</td>
</tr>
<tr>
<td>Can contain concrete methods</td>
<td>These can be used directly by child classes.</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<div class="hcb_wrap">
<pre class="prism line-numbers lang-python" data-lang="Python"><code><!--StartFragment --><span><span>REPORT </span>zrep_lclclass<span>.</span>

<span>CLASS </span>lcl_animal <span>DEFINITION </span>ABSTRACT<span>.</span>
  <span>PUBLIC </span><span>SECTION</span><span>.</span>
    <span>METHODS</span><span>:</span>
      speak ABSTRACT<span>,</span>
      <span>move</span><span>.         </span><span>" This can be implemented if needed</span>
<span>ENDCLASS</span><span>.</span>

<span>CLASS </span>lcl_animal <span>IMPLEMENTATION</span><span>.</span>
  <span>METHOD </span><span>move</span><span>.</span>
    <span>WRITE</span><span>: </span>'Animal <span>is </span>moving'<span>.</span>
  <span>ENDMETHOD</span><span>.</span>
<span>ENDCLASS</span><span>.</span>

<span>" Concrete subclass</span>
<span>CLASS </span>lcl_dog <span>DEFINITION </span><span>INHERITING </span><span>FROM </span>lcl_animal<span>.</span>
  <span>PUBLIC </span><span>SECTION</span><span>.</span>
    <span>METHODS</span><span>:</span>
      speak <span>REDEFINITION</span><span>.</span>
<span>ENDCLASS</span><span>.</span>

<span>CLASS </span>lcl_dog <span>IMPLEMENTATION</span><span>.</span>
  <span>METHOD </span>speak<span>.</span>
    <span>WRITE</span><span>: </span>'Woof!'<span>.</span>
  <span>ENDMETHOD</span><span>.</span>
<span>ENDCLASS</span><span>.</span>

<span>START-OF-SELECTION</span><span>.</span>
  <span>" Parent Class</span>
  <span>DATA</span><span>(</span>lo_animal<span>) </span><span>= </span><span>NEW </span>lcl_animal<span>( </span><span>)</span><span>.</span>
  lo_animal<span>-&gt;</span>speak<span>( </span><span>)</span><span>.</span>
  <span>WRITE</span><span>: </span>'Animal can speak'<span>.</span>
  <span>SKIP</span><span>.</span>
  <span>" child class</span>
  <span>DATA</span><span>(</span>lo_dog<span>) </span><span>= </span><span>NEW </span>lcl_dog<span>( </span><span>)</span><span>.</span>
  lo_dog<span>-&gt;</span>speak<span>( </span><span>)</span><span>.</span>
  lo_dog<span>-&gt;</span><span>move</span><span>( </span><span>)</span><span>.</span></span> </code></pre>
<p>Output:<br />
Check the Program ( CTRL + F2 ).<br />
<img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/08/abstract-class.png" /></p>
<p>if not initated the Parent class then the output will be.<br />
<img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/08/abstract-class-2.png" /></p>
<p>Output:<br />
<img decoding="async" class="content-img" src="https://www.sapewmhelp.com/wp-content/uploads/2025/08/abstract-class-3.png" /></p>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sapewmhelp.com/question/what-is-an-abstract-class-in-sap-abap/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
