<?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 class / method, - simple example in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-method-simple-example/m-p/3402451#M816997</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;What ia a class / method,  give me one simple example of this usage.&lt;/P&gt;&lt;P&gt;why we wanted to use this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also show me one real time scenario for my understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;raj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;i already browsed the forum......they also explained ....but i couldn't understand.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Feb 2008 17:58:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-22T17:58:20Z</dc:date>
    <item>
      <title>class / method, - simple example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-method-simple-example/m-p/3402451#M816997</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;What ia a class / method,  give me one simple example of this usage.&lt;/P&gt;&lt;P&gt;why we wanted to use this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also show me one real time scenario for my understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;raj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;i already browsed the forum......they also explained ....but i couldn't understand.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 17:58:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-method-simple-example/m-p/3402451#M816997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T17:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: class / method, - simple example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-method-simple-example/m-p/3402452#M816998</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;Please refer to the link below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.saptechnical.com/Tutorials/OOPS/MainPage.htm" target="test_blank"&gt;http://www.saptechnical.com/Tutorials/OOPS/MainPage.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 18:00:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-method-simple-example/m-p/3402452#M816998</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T18:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: class / method, - simple example</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/class-method-simple-example/m-p/3402453#M816999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Demo program illustrating Simple class and Super class&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  Z_OOABAP18                                                  *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*REPORT  Z_OOABAP18                              .CLASS lcl_employee DEFINITION.
  PUBLIC SECTION.
*--------------------------------------------------------------------
* The public section is accesible from outside
*--------------------------------------------------------------------
    TYPES:
      BEGIN OF t_employee,
        no  TYPE i,
        name TYPE string,
     END OF t_employee.
    METHODS:
      constructor
        IMPORTING im_employee_no TYPE i
                  im_employee_name TYPE string,
      display_employee.
*   Class methods are global for all instances
    CLASS-METHODS: display_no_of_employees.
  PROTECTED SECTION.
*--------------------------------------------------------------------
* The protecetd section is accesible from the class and its subclasses
*--------------------------------------------------------------------
*   Class data are global for all instances
    CLASS-DATA: g_no_of_employees TYPE i.
  PRIVATE SECTION.
*--------------------------------------------------------------------
* The private section is only accesible from within the classs
*--------------------------------------------------------------------
DATA: g_employee TYPE t_employee.
ENDCLASS.
*--- LCL Employee - Implementation
CLASS lcl_employee IMPLEMENTATION.
  METHOD constructor.
    g_employee-no = im_employee_no.
    g_employee-name = im_employee_name.
    g_no_of_employees = g_no_of_employees + 1.
  ENDMETHOD.
  METHOD display_employee.
    WRITE:/ 'Employee', g_employee-no, g_employee-name.
  ENDMETHOD.
  METHOD display_no_of_employees.
    WRITE: / 'Number of employees is:', g_no_of_employees.
  ENDMETHOD.
ENDCLASS.
************************************************************************
* R E P O R T
*********************************************************************
DATA: g_employee1 TYPE REF TO lcl_employee,
      g_employee2 TYPE REF TO lcl_employee.
START-OF-SELECTION.
  CREATE OBJECT g_employee1
    EXPORTING im_employee_no = 1
              im_employee_name = 'Vikram.C'.
  CREATE OBJECT g_employee2
    EXPORTING im_employee_no = 2
              im_employee_name = 'Raghava.V'.
  CALL METHOD g_employee1-&amp;gt;display_employee.
  CALL METHOD g_employee2-&amp;gt;display_employee.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Chandru&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Feb 2008 18:26:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/class-method-simple-example/m-p/3402453#M816999</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-22T18:26:19Z</dc:date>
    </item>
  </channel>
</rss>

