<?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: class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853023#M926223</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ranjana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_employee DEFINITION.&lt;/P&gt;&lt;P&gt;  data: emp_no       TYPE   i,&lt;/P&gt;&lt;P&gt;          emp_name   TYPE c.&lt;/P&gt;&lt;P&gt; class-data:    &lt;/P&gt;&lt;P&gt;          no_of_employees type i.&lt;/P&gt;&lt;P&gt;ENDCLASS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Class describes the objects. That is, when we define a class we think of Object properties and methods.&lt;/P&gt;&lt;P&gt;As you see in the above example emp_no and emp_name are the object attributes, that is when you create 10 objects for that class, every object has its own emp_no and emp_name but there is class attribute called no_of_employees which does not belong to any object individually but to the class as a whole. When ever an object is created this variable gets incremented and is also called static variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition,&lt;/P&gt;&lt;P&gt;Memory gets allocated for emp_no and emp_name for every object created but for no_of_employee attribute, memory gets allocated when the class is referenced for the first time and persists as longs as the class is referenced.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Sujith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 May 2008 12:23:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-26T12:23:54Z</dc:date>
    <item>
      <title>class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853016#M926216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts&lt;/P&gt;&lt;P&gt;plz tell me what is difference in declaration b/t data anad class-data as both are defined for class only .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1  .data : inum type i .&lt;/P&gt;&lt;P&gt;   class-data : cnum type i .&lt;/P&gt;&lt;P&gt;2  methods : m1 .&lt;/P&gt;&lt;P&gt;class-methods : m2.&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;constants : c_name(4) type c value 'ABAP'.&lt;/P&gt;&lt;P&gt;data : inum type i .&lt;/P&gt;&lt;P&gt;class-data : cnum type i .&lt;/P&gt;&lt;P&gt;methods : m1 .&lt;/P&gt;&lt;P&gt;class-methods : m2.&lt;/P&gt;&lt;P&gt;endinterface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 04:52:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853016#M926216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T04:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853017#M926217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="4497305"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2931875"&gt;&lt;/A&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, 23 May 2008 04:58:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853017#M926217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T04:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853018#M926218</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;Instance attributes&lt;/P&gt;&lt;P&gt;Instance attributes are attributes that exist once per object, that is, once per&lt;/P&gt;&lt;P&gt;runtime instance of the class. They are defined with the syntax element&lt;/P&gt;&lt;P&gt;DATA.&lt;/P&gt;&lt;P&gt;Static attributes&lt;/P&gt;&lt;P&gt;Static attributes exist once for each class and are visible for all runtime&lt;/P&gt;&lt;P&gt;instances in that class. They are defined with the syntax element&lt;/P&gt;&lt;P&gt;CLASS-DATA.&lt;/P&gt;&lt;P&gt;Static attributes usually contain information that applies to all instances,&lt;/P&gt;&lt;P&gt;such as:&lt;/P&gt;&lt;P&gt;1. Types and constants&lt;/P&gt;&lt;P&gt;2. Central application data buffers&lt;/P&gt;&lt;P&gt;3. Administrative information, such as the instance counter&lt;/P&gt;&lt;P&gt;Technical literature often refers to static attributes as class attributes (compare to&lt;/P&gt;&lt;P&gt;the CLASS-DATA syntax element). In ABAP Objects, as in C++ and Java, the&lt;/P&gt;&lt;P&gt;official term is static attribute.&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;Jagadish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 05:00:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853018#M926218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T05:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853019#M926219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;First of all, what is class?  A class is a set of objects that have the same structure and same behavior.  It is a blueprint based on which all the objects in that class are created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Components of the class are : Attributes, methods, events, constants, types, and implemented interfaces.  Only methods are implemented in the implementation part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The class statement cant be nested ie we cant define a class within a class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instance attributes exists once per object ie once per runtime instance of the class.  Syntax: DATA:&lt;/P&gt;&lt;P&gt;Static or Class attributes exists once per program run. Syntax: CLASS-DATA:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Methods can have a signature(interface parameters and exceptions).  The implementation of the methods determines the "behavior" of the objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Objects can only be created and addressed using reference variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definition of Instance methods :  syntax:  METHODS:&lt;/P&gt;&lt;P&gt;Definition of static methods:  syntax :  CLASS-METHODS.&lt;/P&gt;&lt;P&gt;Static methods are called using:&lt;/P&gt;&lt;P&gt;CALL METHOD class_name=&amp;gt;method_name  EXPORTING IMPORTING CHANGING RECEIVING EXCEPTIONS.  Or simply  class_name=&amp;gt;method_name( EXP IMP CHN RECE EXCEP ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Static attributes are accessed using classname=&amp;gt;static_attribute.  &lt;/P&gt;&lt;P&gt;Instance attributes are accessed with ref-&amp;gt;instance_attribute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 06:37:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853019#M926219</guid>
      <dc:creator>former_member188594</dc:creator>
      <dc:date>2008-05-23T06:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853020#M926220</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;Attributes : Internal data fields of class &lt;/P&gt;&lt;P&gt;      Attributes can be either instance attributes u2013 specific to each instance of the class ( object ) or static attributes which are common to all instances    &lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;      Methods : 			    		&lt;/P&gt;&lt;P&gt;      Subroutines / 	procedures in  a class that define the behavior of the object. Methods can also be instance methods or static methods&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For defining static attributes we use key word u201CCLASS-DATAu201D and "DATA" for instance attributes.&lt;/P&gt;&lt;P&gt;For defining static methods use key word u201CCLASS-METHODu201D and "METHOD" fro instance methods.&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;reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Syed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2008 10:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853020#M926220</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-23T10:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853021#M926221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Ranjna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see an example on following link [ABAP Objects - Creating your First Local Class - Using Static Components|https://wiki.sdn.sap.com/wiki/x/ZtM].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more examples see [ ABAP Objects Examples Beginner|https://wiki.sdn.sap.com/wiki/x/pto].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&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>Fri, 23 May 2008 14:54:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853021#M926221</guid>
      <dc:creator>marcelo_ramos1</dc:creator>
      <dc:date>2008-05-23T14:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853022#M926222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in short .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with class-data is same for class shared by all objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and normal data individual for each object..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2008 10:21:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853022#M926222</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-26T10:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853023#M926223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ranjana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_employee DEFINITION.&lt;/P&gt;&lt;P&gt;  data: emp_no       TYPE   i,&lt;/P&gt;&lt;P&gt;          emp_name   TYPE c.&lt;/P&gt;&lt;P&gt; class-data:    &lt;/P&gt;&lt;P&gt;          no_of_employees type i.&lt;/P&gt;&lt;P&gt;ENDCLASS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Class describes the objects. That is, when we define a class we think of Object properties and methods.&lt;/P&gt;&lt;P&gt;As you see in the above example emp_no and emp_name are the object attributes, that is when you create 10 objects for that class, every object has its own emp_no and emp_name but there is class attribute called no_of_employees which does not belong to any object individually but to the class as a whole. When ever an object is created this variable gets incremented and is also called static variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition,&lt;/P&gt;&lt;P&gt;Memory gets allocated for emp_no and emp_name for every object created but for no_of_employee attribute, memory gets allocated when the class is referenced for the first time and persists as longs as the class is referenced.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Sujith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2008 12:23:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853023#M926223</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-26T12:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853024#M926224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ranjana,&lt;/P&gt;&lt;P&gt;Seems you have left open all the queries even after getting the replies.  Do close the queries for which you got answers by just marking the queries as "ANSWERED" instead of leaving the queries open in the forum.  If you still doubts you can ask and get clarified and close the query.  All the best.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2008 17:12:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853024#M926224</guid>
      <dc:creator>former_member188594</dc:creator>
      <dc:date>2008-05-26T17:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853025#M926225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi.&lt;/P&gt;&lt;P&gt;here class data is a static data .&lt;/P&gt;&lt;P&gt;here it is declared as class data but it is same as static data of c++.&lt;/P&gt;&lt;P&gt;here it can be declared once but it's scope is live through out program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class method is like static function.&lt;/P&gt;&lt;P&gt;it can use class data only.&lt;/P&gt;&lt;P&gt;it can only by the use of class name only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2008 05:02:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class/m-p/3853025#M926225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-27T05:02:51Z</dc:date>
    </item>
  </channel>
</rss>

