<?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 qustion in abap objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/qustion-in-abap-objects/m-p/2625151#M603167</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hallow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i wont to now what is the difference betwen  public &amp;amp; private please give me &lt;/P&gt;&lt;P&gt;example of benefit of both.and when its  recommended to use any of them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Jul 2007 15:29:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-25T15:29:27Z</dc:date>
    <item>
      <title>qustion in abap objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/qustion-in-abap-objects/m-p/2625151#M603167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hallow&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i wont to now what is the difference betwen  public &amp;amp; private please give me &lt;/P&gt;&lt;P&gt;example of benefit of both.and when its  recommended to use any of them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 15:29:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/qustion-in-abap-objects/m-p/2625151#M603167</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T15:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: qustion in abap objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/qustion-in-abap-objects/m-p/2625152#M603168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Public Class :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data declared in public section can be accessed by the class itself, by its subclasses as well as by other users outside the class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Private Class :&lt;/P&gt;&lt;P&gt;Data declared in the private section can be accessed by the class only, but not by its subclasses and by external users outside the class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT YSUBDEL LINE-SIZE 120.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS parentclass DEFINITION .&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;DATA : commondata(30) type c value 'Accessible to all'.&lt;/P&gt;&lt;P&gt;METHODS : SHOWVAL.&lt;/P&gt;&lt;P&gt;PROTECTED SECTION.&lt;/P&gt;&lt;P&gt;DATA : protectdata(40) type c value 'Protected data'.&lt;/P&gt;&lt;P&gt;private section.&lt;/P&gt;&lt;P&gt;data : privatedata(30) type c value 'Private data'.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS parentclass IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD : SHOWVAL.&lt;/P&gt;&lt;P&gt;write:/5 'All data from parentclass shown:-'.&lt;/P&gt;&lt;P&gt;write:/ sy-uline.&lt;/P&gt;&lt;P&gt;WRITE:/5 COMMONDATA,&lt;/P&gt;&lt;P&gt;/5 PROTECTDATA,&lt;/P&gt;&lt;P&gt;/5 PRIVATEDATA.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS childclass DEFINITION INHERITING FROM parentclass.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION .&lt;/P&gt;&lt;P&gt;METHODS : subval.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS childclass IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;method : subval.&lt;/P&gt;&lt;P&gt;skip 1.&lt;/P&gt;&lt;P&gt;write:/5 'Data of parent shown from child-'.&lt;/P&gt;&lt;P&gt;write:/5 sy-uline.&lt;/P&gt;&lt;P&gt;WRITE:/5 COMMONDATA,&lt;/P&gt;&lt;P&gt;/5 PROTECTDATA.&lt;/P&gt;&lt;P&gt;Commondata = 'Public data changed in subclass'.&lt;/P&gt;&lt;P&gt;Protectdata = 'Protected data changed in subclass'.&lt;/P&gt;&lt;P&gt;write:/5 sy-uline.&lt;/P&gt;&lt;P&gt;WRITE:/5 COMMONDATA,&lt;/P&gt;&lt;P&gt;/5 PROTECTDATA.&lt;/P&gt;&lt;P&gt;endmethod.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;DATA : parent type ref to parentclass ,&lt;/P&gt;&lt;P&gt;child type ref to childclass .&lt;/P&gt;&lt;P&gt;create object : parent ,&lt;/P&gt;&lt;P&gt;child .&lt;/P&gt;&lt;P&gt;call method : parent-&amp;gt;showval ,&lt;/P&gt;&lt;P&gt;child-&amp;gt;subval.&lt;/P&gt;&lt;P&gt;skip 2.&lt;/P&gt;&lt;P&gt;parent-&amp;gt;commondata = &amp;#145;User changing public data&amp;#146;.&lt;/P&gt;&lt;P&gt;write:/5 parent-&amp;gt;commondata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 15:42:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/qustion-in-abap-objects/m-p/2625152#M603168</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T15:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: qustion in abap objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/qustion-in-abap-objects/m-p/2625153#M603169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Public: It can be inherited or accessible to the subclasses.&lt;/P&gt;&lt;P&gt;Private: Which can't be access by any classes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;class A&lt;/P&gt;&lt;P&gt;private: str&lt;/P&gt;&lt;P&gt;public:str1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class B inheriting A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;object of class B can access str1 but cant access str.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 15:42:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/qustion-in-abap-objects/m-p/2625153#M603169</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-25T15:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: qustion in abap objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/qustion-in-abap-objects/m-p/2625154#M603170</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;The public and Private section is one of the visibility sections of a    &lt;/P&gt;&lt;P&gt;class, which determines the external visibility of the class &lt;/P&gt;&lt;P&gt;components.                                                  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; All of the components defined in the public section are  &lt;/P&gt;&lt;P&gt; visible in in same class or subclasses on protected and private sections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; All of the components defined in the public section are  &lt;/P&gt;&lt;P&gt; visible out of the class or in subclasses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA OBJ TYPE REF TO C1.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;OBJ-&amp;gt;A1 = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The private section must be the last visibility section to be defined (after the public and   &lt;/P&gt;&lt;P&gt;protected sections).                                     &lt;/P&gt;&lt;P&gt; All of the components defined in the private section are  &lt;/P&gt;&lt;P&gt; visible only in the same class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can't do it: &lt;/P&gt;&lt;P&gt;DATA OBJ TYPE REF TO C1.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;OBJ-&amp;gt;A1 = 'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or acess in the subclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcelo Ramos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2007 15:51:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/qustion-in-abap-objects/m-p/2625154#M603170</guid>
      <dc:creator>marcelo_ramos1</dc:creator>
      <dc:date>2007-07-25T15:51:37Z</dc:date>
    </item>
  </channel>
</rss>

