<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Object Creation in abap in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/object-creation-in-abap/m-p/11903871#M1962514</link>
    <description>&lt;P&gt;Even I don't understand whether you are asking how "create object type" syntax is working or how it is creating object for an interface. &lt;/P&gt;&lt;P&gt;If it is an second doubt, then we can't create an object for an interface unless it is implemented in the class. If you check your &lt;EM&gt;lcl_myclass&lt;/EM&gt;, it must implemented the interface &lt;EM&gt;lif_test.&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2019 04:12:15 GMT</pubDate>
    <dc:creator>Muthu_raja</dc:creator>
    <dc:date>2019-03-29T04:12:15Z</dc:date>
    <item>
      <title>Object Creation in abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/object-creation-in-abap/m-p/11903869#M1962512</link>
      <description>&lt;P&gt;hi all greetings.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;i came a across a line of code in ABAP.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;code&amp;gt;DATA:    lr_intf TYPE REF TO lif_test,
         lr_mine TYPE REF TO lcl_myclass.&lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;code&amp;gt;CREATE OBJECT lr_intf TYPE lcl_myclass.&amp;lt;br&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;here lif_test is an i nterface.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;My question is that how exactly object is getting created by TYPE keyword in here using the lcl_myclass.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2019 16:38:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/object-creation-in-abap/m-p/11903869#M1962512</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-03-28T16:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Object Creation in abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/object-creation-in-abap/m-p/11903870#M1962513</link>
      <description>&lt;P&gt;i dont really understand what do you want to know with this question but you could press F1 on the CREATE OBJECT to read how it work.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 02:34:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/object-creation-in-abap/m-p/11903870#M1962513</guid>
      <dc:creator>DoanManhQuynh</dc:creator>
      <dc:date>2019-03-29T02:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Object Creation in abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/object-creation-in-abap/m-p/11903871#M1962514</link>
      <description>&lt;P&gt;Even I don't understand whether you are asking how "create object type" syntax is working or how it is creating object for an interface. &lt;/P&gt;&lt;P&gt;If it is an second doubt, then we can't create an object for an interface unless it is implemented in the class. If you check your &lt;EM&gt;lcl_myclass&lt;/EM&gt;, it must implemented the interface &lt;EM&gt;lif_test.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 04:12:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/object-creation-in-abap/m-p/11903871#M1962514</guid>
      <dc:creator>Muthu_raja</dc:creator>
      <dc:date>2019-03-29T04:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Object Creation in abap</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/object-creation-in-abap/m-p/11903872#M1962515</link>
      <description>&lt;P&gt;I will try to answer your question using how memory is allocated.&lt;/P&gt;&lt;P&gt;So when you write following code-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS c1 DEFINITION.  ... ENDCLASS. 
DATA oref TYPE REF TO c1.  
CREATE OBJECT oref. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So in above code we are creating reference to variable oref for class c1 and then we are allocating the memory.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CLASS c1 DEFINITION. 
....
ENDCLASS. 

DATA oref TYPE REF TO object. 

CREATE OBJECT oref TYPE c1. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And in above code we are creating reference to variable object and then we are defining class and allocating the memory.&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;For more queries you can refer &lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcreate_object.htm" target="_blank"&gt;Create Object&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 09:26:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/object-creation-in-abap/m-p/11903872#M1962515</guid>
      <dc:creator>former_member596346</dc:creator>
      <dc:date>2019-04-01T09:26:52Z</dc:date>
    </item>
  </channel>
</rss>

