<?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 About ABAP Object in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-abap-object/m-p/3616592#M871255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;i have some question about ABAP Object.&lt;/P&gt;&lt;P&gt;What is the meaning of friend class and singleton?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Luke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Mar 2008 06:07:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-28T06:07:03Z</dc:date>
    <item>
      <title>About ABAP Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-abap-object/m-p/3616592#M871255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;i have some question about ABAP Object.&lt;/P&gt;&lt;P&gt;What is the meaning of friend class and singleton?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Luke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 06:07:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-abap-object/m-p/3616592#M871255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T06:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: About ABAP Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-abap-object/m-p/3616593#M871256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FRIEND CLASS is a concept useing which a child can access private components of the base class in it &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FRIENDSHIP is extended by parent to the child &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FRIENDSHIP is not transtive&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VISIBILITY is allways 1st preference in the object oriented programing &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the PRIVATE components are not inherited to the child class but thriugh that child class we can acess PRIVATE components of the BASE CLASS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*For this we need to create an object of the BASE CLASS with in the child class to access PRIVATE components *&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FRIENDS key word along with the child class name is used in the parent clas definition section to consider a child as a friend&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP Objects - Defining a Local Class as FRIENDS&lt;/P&gt;&lt;P&gt;ABAP Objects - Defining a Local Interface as FRIENDS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why should it not be possible to call methods of this class "simultaneously"?&lt;/P&gt;&lt;P&gt;For example, if you have a static method GET_INSTANCE and the singleton instance has not been created yet the first call will create the instance whereas the second call will simply retrieve the already created instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the local table is an instance attribute it will vanish as soon as you do not have any reference to your singleton anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 06:30:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-abap-object/m-p/3616593#M871256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T06:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: About ABAP Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-abap-object/m-p/3616594#M871257</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;Generally users of a class may only access the public components of that class. Sometimes, however, you might want to create a closer link between classes. The concept of friends could be of use here. &lt;/P&gt;&lt;P&gt;In this case a class can permit explicitly named users (friends) to access its protected and private components. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the users specified as friends can also access PROTECTED a nd PRIVATE components of the class in question if the Modeled only flag was not set in step 4. The friends relationship is always one-sided and is not inherited. This means that friends of a superclass are not automatically friends of the subclasses. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Singelton property is used for instantiating an element only &lt;/P&gt;&lt;P&gt;once....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cardinality : number of possible elements within the node.&lt;/P&gt;&lt;P&gt;Singleton property means whether or not all instances of this node get created at runtime or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow this lik .&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/7a/787e40417c6d1de10000000a1550b0/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/7a/787e40417c6d1de10000000a1550b0/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope this helps, Do reward.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Runal Singh on Mar 28, 2008 12:30 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 06:59:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-abap-object/m-p/3616594#M871257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T06:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: About ABAP Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-abap-object/m-p/3616595#M871258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If class/interface A is defined in class B as a friend, then class/interface A can access all the private and protected (and of course public) attributes, methods, types of class B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"The friends of a class have unlimited access to the protected and private components of the class and can create instances of the class without constraints. "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 08:37:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-abap-object/m-p/3616595#M871258</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-03-28T08:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: About ABAP Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-abap-object/m-p/3616596#M871259</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;&lt;/P&gt;&lt;P&gt;The addition Friends makes class class a friend of classes classi and or interfaces ifaci.At the sam time, all subclasses of classes classi, all classes that implement one of the interfaces ifaci and all interfaces that have one of the interfaces ifaci as a component interface become friends of class. you have to specify at least one class or interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The friends of a class have unrestricted access to the protected and private components of that class, and can generate unrestricted instances of the class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The friends of class are not automatically friends of subclasses of class. the addition Friends does not make class a friend of its friends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thea ddition global is allowed only when you use the addition public for the global class of a class pool at the same time.You can list other global classes and interfaces from the class library after global friends.This addition is generated when the Class Builder creates a global class and you specified friends at the corresponding tab page of the class Builder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;`&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example , classs c2 is a friend of interface i1, and therefore also of the implementing class c1. It can instantiate these objects and access their private component a1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;interface i1.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;endinterface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class c1 definition create private friends i1.&lt;/P&gt;&lt;P&gt;private section.&lt;/P&gt;&lt;P&gt;data a1(10) type c value 'Class 1'.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class c2 definition.&lt;/P&gt;&lt;P&gt;public section.&lt;/P&gt;&lt;P&gt;interfaces i1.&lt;/P&gt;&lt;P&gt;methods m2.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class c2 implementation.&lt;/P&gt;&lt;P&gt;method m2.&lt;/P&gt;&lt;P&gt;data oref type ref to c1.&lt;/P&gt;&lt;P&gt;create object oref.&lt;/P&gt;&lt;P&gt;write oref-&amp;gt;a1.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;enclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Kindly Reward Points If You Found The Reply Helpful&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chaitanya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2008 08:53:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-abap-object/m-p/3616596#M871259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-28T08:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: About ABAP Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/about-abap-object/m-p/3616597#M871260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luke,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A class grants friendship to other classes and interfaces. These friends can then access the protected and private components of the granting class and can always create instances of this class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A class that grants friendship is not automatically a friend of it's friends - it is a one-sided relationship.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subclasses of friends also become friends.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subclasses of the grantor of friendship do not automatically grant friendship as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham Robbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Mar 2008 01:11:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/about-abap-object/m-p/3616597#M871260</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2008-03-29T01:11:20Z</dc:date>
    </item>
  </channel>
</rss>

