<?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: To define a class inside a method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255581#M1015847</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, you can add private methods to the class, and call these private methods within that method.  Or you can create another global class, with methods, and create an object of this class inside your method, and call the appropriate methods of this other global class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no way to create an "inner class" in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Aug 2008 19:04:50 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2008-08-04T19:04:50Z</dc:date>
    <item>
      <title>To define a class inside a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255577#M1015843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Iam new to OOPS ABAP.&lt;/P&gt;&lt;P&gt;I had one doubt,&lt;/P&gt;&lt;P&gt;Can we define and implement a new class inside a method... end method (like below)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method M1&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;Class C1 Defination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Class C1 Implementation&lt;/P&gt;&lt;P&gt;Method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endmethod&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;Endmethod&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me on this how to proceed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 17:57:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255577#M1015843</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T17:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: To define a class inside a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255578#M1015844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No,  ABAP Objects does not support that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 18:04:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255578#M1015844</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2008-08-04T18:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: To define a class inside a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255579#M1015845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which requirment leads you to think to create class inside a class.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 18:05:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255579#M1015845</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2008-08-04T18:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: To define a class inside a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255580#M1015846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich Heilman/Naimesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The requirement is &lt;/P&gt;&lt;P&gt;In XI Proxy(XI proxy is related to creation of materials in SAP),there are macros defined, and my client told us to find out wheather is it possible to replace the macros with the classes and methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can i define a global class and call that method inside the class.&lt;/P&gt;&lt;P&gt;Method M1&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;Define a global class oref&lt;/P&gt;&lt;P&gt;create object.&lt;/P&gt;&lt;P&gt;Call method oref-&amp;gt;m2.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------------------------------------------------------------------" /&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;Endmethod&lt;/P&gt;&lt;P&gt;Can i do it in the above way.Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 19:00:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255580#M1015846</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-04T19:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: To define a class inside a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255581#M1015847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, you can add private methods to the class, and call these private methods within that method.  Or you can create another global class, with methods, and create an object of this class inside your method, and call the appropriate methods of this other global class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no way to create an "inner class" in ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2008 19:04:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255581#M1015847</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2008-08-04T19:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: To define a class inside a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255582#M1015848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 14:20:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255582#M1015848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T14:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: To define a class inside a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255583#M1015849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually there's a third option: Inside your global class you can create as many local classes as you need. Not inside any method, but in the specific Local class Definition and Implementation sections (SE24 -&amp;gt; menu Goto -&amp;gt; Class Local-Types).&lt;/P&gt;&lt;P&gt;Then, somewhere in your class, you should create instances of those classes and you can call their methods.&lt;/P&gt;&lt;P&gt;Have in mind though, those local classes (as their name implies) are visible to your global class only. There's no external access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 20:29:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-define-a-class-inside-a-method/m-p/4255583#M1015849</guid>
      <dc:creator>alejandro_bindi</dc:creator>
      <dc:date>2008-08-07T20:29:43Z</dc:date>
    </item>
  </channel>
</rss>

