<?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: ABAP OBJECTS in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496132#M563693</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinath &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this one &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZEKKOINFO                                                   *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*

REPORT  ZEKKOINFO                               .





tables: ekpo.



Data: begin of int_ekko occurs 0,

   EBELN  type ekko-ebeln,
   BEDAT type ekKo-BEDAT,


   end of int_ekKo.



   select EBELN BEDAT from ekKo into corresponding fields of table
int_ekKo.


loop at int_ekKo.


Write: / int_ekKo-EBELN,
         int_ekKo-BEDAT.


   endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpfull answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jul 2007 11:12:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-06T11:12:17Z</dc:date>
    <item>
      <title>ABAP OBJECTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496130#M563691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I WANT A SAMPLE PROGRAM TO PRINT SOME DATABASE VALUES( ANY TABLE) USING  ABAP OBJECTS , THANKS IN ADVANCE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 11:08:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496130#M563691</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T11:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP OBJECTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496131#M563692</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;You can goto the package SLIS there are lot of programs for displaying the results using ALV grid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 11:10:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496131#M563692</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-07-06T11:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP OBJECTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496132#M563693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srinath &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this one &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZEKKOINFO                                                   *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;                                                                     *
*&amp;amp;                                                                     *
*&amp;amp;---------------------------------------------------------------------*

REPORT  ZEKKOINFO                               .





tables: ekpo.



Data: begin of int_ekko occurs 0,

   EBELN  type ekko-ebeln,
   BEDAT type ekKo-BEDAT,


   end of int_ekKo.



   select EBELN BEDAT from ekKo into corresponding fields of table
int_ekKo.


loop at int_ekKo.


Write: / int_ekKo-EBELN,
         int_ekKo-BEDAT.


   endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpfull answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 11:12:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496132#M563693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T11:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP OBJECTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496133#M563694</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;Welcome to SDN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through this link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/victorav15/sapr3/abap_ood.html" target="test_blank"&gt;http://www.geocities.com/victorav15/sapr3/abap_ood.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.brabandt.de/html/abap_oo.html" target="test_blank"&gt;http://www.brabandt.de/html/abap_oo.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this cool weblog:&lt;/P&gt;&lt;P&gt;/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql&lt;/P&gt;&lt;P&gt;/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql&lt;/P&gt;&lt;P&gt;/people/sap.user72/blog/2005/05/10/a-small-tip-for-the-beginners-in-oo-abap&lt;/P&gt;&lt;P&gt;/people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action&lt;/P&gt;&lt;P&gt;/people/thomas.jung3/blog/2005/09/08/oo-abap-dynpro-programming&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm&lt;/A&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;A href="http://www.sapgenie.com/abap/OO/" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt" target="test_blank"&gt;http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf" target="test_blank"&gt;http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt" target="test_blank"&gt;http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/" target="test_blank"&gt;http://www.allsaplinks.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/" target="test_blank"&gt;http://www.sap-img.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/" target="test_blank"&gt;http://www.sapgenie.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com" target="test_blank"&gt;http://help.sap.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/controls/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/controls/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf" target="test_blank"&gt;http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf" target="test_blank"&gt;http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;these links &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For funtion module to class&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for classes&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for methods&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for inheritance&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for interfaces&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if it helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Omkar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 11:14:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496133#M563694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T11:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP OBJECTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496134#M563695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this is one&lt;/P&gt;&lt;P&gt;TYPES:begin of str_bkpf,&lt;/P&gt;&lt;P&gt;      blart type blart,&lt;/P&gt;&lt;P&gt;      bukrs type bukrs,&lt;/P&gt;&lt;P&gt;      belnr type bseg-belnr,&lt;/P&gt;&lt;P&gt;      gjahr type gjahr,&lt;/P&gt;&lt;P&gt;      budat type budat,&lt;/P&gt;&lt;P&gt;      end of str_bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: begin of str_bseg,&lt;/P&gt;&lt;P&gt;       belnr type belnr_d,&lt;/P&gt;&lt;P&gt;       gjahr type gjahr,&lt;/P&gt;&lt;P&gt;       buzei type buzei,&lt;/P&gt;&lt;P&gt;       bschl type bschl,&lt;/P&gt;&lt;P&gt;       hkont type hkont,&lt;/P&gt;&lt;P&gt;       bukrs type bukrs,&lt;/P&gt;&lt;P&gt;       blart type blart,&lt;/P&gt;&lt;P&gt;       budat type bkpf-budat,&lt;/P&gt;&lt;P&gt;       saknr type saknr,&lt;/P&gt;&lt;P&gt;       fstag type fstag,&lt;/P&gt;&lt;P&gt;       ktopl type ktopl,&lt;/P&gt;&lt;P&gt;       bilkt type bilkt,&lt;/P&gt;&lt;P&gt;       color(4) type c,&lt;/P&gt;&lt;P&gt;       end of str_bseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES:begin of str_t001,&lt;/P&gt;&lt;P&gt;      bukrs type bukrs,&lt;/P&gt;&lt;P&gt;      ktopl type ktopl,&lt;/P&gt;&lt;P&gt;      end of str_t001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES:begin of str_ska1,&lt;/P&gt;&lt;P&gt;      bilkt type bilkt,&lt;/P&gt;&lt;P&gt;      ktopl type ktopl,&lt;/P&gt;&lt;P&gt;      saknr type saknr,&lt;/P&gt;&lt;P&gt;      end of str_ska1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES:begin of str_skb1,&lt;/P&gt;&lt;P&gt;      fstag type fstag,&lt;/P&gt;&lt;P&gt;      bukrs type bukrs,&lt;/P&gt;&lt;P&gt;      saknr type saknr,&lt;/P&gt;&lt;P&gt;      end of str_skb1.&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;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               DATA  DECLARATIONS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:it_bkpf type standard table of str_bkpf  ,&lt;/P&gt;&lt;P&gt;     it_bseg type standard table of  str_bseg ,&lt;/P&gt;&lt;P&gt;     it_t001 type standard  table of str_t001 ,&lt;/P&gt;&lt;P&gt;     it_ska1 type standard  table of str_ska1 ,&lt;/P&gt;&lt;P&gt;     it_skb1 type standard table of str_skb1 ,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    fieldcat type slis_t_fieldcat_alv WITH HEADER LINE,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    events   type slis_t_event WITH HEADER LINE,&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;    layout  type slis_layout_alv,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    layout type  slis_layout_alv1 ,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    ALV type SY-REPID.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;data:w_index type sy-tabix.&lt;/P&gt;&lt;P&gt;data: wa_bkpf like line of it_bkpf,&lt;/P&gt;&lt;P&gt;      wa_bseg like line of it_bseg,&lt;/P&gt;&lt;P&gt;      wa_t001 like line of it_t001,&lt;/P&gt;&lt;P&gt;      wa_ska1 like line of it_ska1,&lt;/P&gt;&lt;P&gt;      wa_skb1 like line of it_skb1,&lt;/P&gt;&lt;P&gt;      WA_LAYOUT-INFO_FNAME = 'COLOR'.&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;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                 INPUT VARIABLES&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS:s_BUKRS FOR BKPF-BUKRS obligatory,&lt;/P&gt;&lt;P&gt;               s_BLART FOR BKPF-BLART obligatory,&lt;/P&gt;&lt;P&gt;               s_BUDAT FOR BKPF-BUDAT,&lt;/P&gt;&lt;P&gt;               s_BSCHL FOR BSEG-BSCHL,&lt;/P&gt;&lt;P&gt;               s_HKONT FOR BSEG-HKONT.&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;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               SELECT STATEMENTS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&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;&lt;/P&gt;&lt;P&gt;  select   blart      "Document type&lt;/P&gt;&lt;P&gt;           bukrs      "Company Code&lt;/P&gt;&lt;P&gt;           belnr      "Accounting Document Number&lt;/P&gt;&lt;P&gt;           gjahr      "Fiscal Year&lt;/P&gt;&lt;P&gt;           budat      "Posting Date in the Document&lt;/P&gt;&lt;P&gt;           from bkpf&lt;/P&gt;&lt;P&gt;           into&lt;/P&gt;&lt;P&gt;           table it_bkpf&lt;/P&gt;&lt;P&gt;           where bukrs in s_bukrs&lt;/P&gt;&lt;P&gt;           and   blart in s_blart&lt;/P&gt;&lt;P&gt;           and budat in s_BUDAT.&lt;/P&gt;&lt;P&gt;check sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if not it_bkpf[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   select belnr "Accounting Document Number&lt;/P&gt;&lt;P&gt;          gjahr "Fiscal Year&lt;/P&gt;&lt;P&gt;          buzei "Number of Line Item Within Accounting Document&lt;/P&gt;&lt;P&gt;          bschl  "Posting Key&lt;/P&gt;&lt;P&gt;          hkont  "General Ledger Account&lt;/P&gt;&lt;P&gt;          bukrs  "Company Code&lt;/P&gt;&lt;P&gt;          from bseg&lt;/P&gt;&lt;P&gt;          into table it_bseg&lt;/P&gt;&lt;P&gt;          for all entries in it_bkpf&lt;/P&gt;&lt;P&gt;          where  belnr = it_bkpf-belnr&lt;/P&gt;&lt;P&gt;          and    gjahr = it_bkpf-gjahr&lt;/P&gt;&lt;P&gt;          and    bukrs = it_bkpf-bukrs.&lt;/P&gt;&lt;P&gt;          endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if not s_BSCHL[] is initial.&lt;/P&gt;&lt;P&gt;    delete it_bseg where not bschl in s_bschl.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if not s_HKONT[] is initial.&lt;/P&gt;&lt;P&gt;    delete it_bseg where not hkont in s_hkont.&lt;/P&gt;&lt;P&gt;  endif.&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;  if it_bseg[] is not initial.&lt;/P&gt;&lt;P&gt;    sort it_bseg by bukrs gjahr belnr.&lt;/P&gt;&lt;P&gt;    refresh it_t001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SELECT bukrs              "Company Code&lt;/P&gt;&lt;P&gt;           ktopl              "Chart of Accounts&lt;/P&gt;&lt;P&gt;           from T001&lt;/P&gt;&lt;P&gt;           into table it_t001&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;           where bukrs in s_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    if not it_t001[] is initial.&lt;/P&gt;&lt;P&gt;      sort it_t001 by bukrs.&lt;/P&gt;&lt;P&gt;      refresh it_ska1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      SELECT bilkt           "Group Account Number&lt;/P&gt;&lt;P&gt;             ktopl           "Chart of Accounts&lt;/P&gt;&lt;P&gt;             saknr           "G/L account number&lt;/P&gt;&lt;P&gt;             from SKA1&lt;/P&gt;&lt;P&gt;             into table it_ska1&lt;/P&gt;&lt;P&gt;             for all entries in it_t001&lt;/P&gt;&lt;P&gt;             where ktopl = it_t001-ktopl.&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;      if not it_ska1[] is initial.&lt;/P&gt;&lt;P&gt;        sort it_ska1.&lt;/P&gt;&lt;P&gt;        refresh it_skb1.&lt;/P&gt;&lt;P&gt;        SELECT fstag  "Field status group&lt;/P&gt;&lt;P&gt;               bukrs  "Company code&lt;/P&gt;&lt;P&gt;               saknr  "G/L account number&lt;/P&gt;&lt;P&gt;               from skb1&lt;/P&gt;&lt;P&gt;               into table it_skb1&lt;/P&gt;&lt;P&gt;               for all entries in it_ska1&lt;/P&gt;&lt;P&gt;               where bukrs in s_bukrs and&lt;/P&gt;&lt;P&gt;                       SAKNR = it_ska1-saknr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at it_bseg into wa_bseg.&lt;/P&gt;&lt;P&gt;    w_index = sy-tabix.&lt;/P&gt;&lt;P&gt;    read table it_bkpf into wa_bkpf with key BUKRS = wa_bseg-bukrs.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    wa_bseg-blart = wa_bkpf-blart.&lt;/P&gt;&lt;P&gt;    Read Table it_t001 into wa_t001 with key bukrs = wa_bseg-bukrs.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    wa_bseg-ktopl = wa_t001-ktopl.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    Read table it_ska1 into wa_ska1 with key ktopl = wa_bseg-ktopl.&lt;/P&gt;&lt;P&gt;    wa_bseg-saknr = wa_ska1-saknr.&lt;/P&gt;&lt;P&gt;    wa_bseg-bilkt = wa_ska1-bilkt.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;    Read Table it_skb1 into wa_skb1 with key bukrs = wa_bseg-bukrs saknr = wa_bseg-hkont.&lt;/P&gt;&lt;P&gt;    wa_bseg-fstag = wa_skb1-fstag.&lt;/P&gt;&lt;P&gt;    modify it_bseg  from wa_bseg index w_index transporting ktopl bilkt saknr fstag blart.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   LOOP AT IT_bseg.&lt;/P&gt;&lt;P&gt;     IF SY-TABIX LE 5.&lt;/P&gt;&lt;P&gt;        IT_besg-COLOR = 'C410'.&lt;/P&gt;&lt;P&gt;          MODIFY IT_bseg INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnkx &lt;/P&gt;&lt;P&gt;bhanu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 11:14:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496134#M563695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T11:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP OBJECTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496135#M563696</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;check the below links lot of info and examples r there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/victorav15/sapr3/abap_ood.html" target="test_blank"&gt;http://www.geocities.com/victorav15/sapr3/abap_ood.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.brabandt.de/html/abap_oo.html" target="test_blank"&gt;http://www.brabandt.de/html/abap_oo.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this cool weblog:&lt;/P&gt;&lt;P&gt;/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql&lt;/P&gt;&lt;P&gt;/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm&lt;/A&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;A href="http://www.sapgenie.com/abap/OO/" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt" target="test_blank"&gt;http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf" target="test_blank"&gt;http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt" target="test_blank"&gt;http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/" target="test_blank"&gt;http://www.allsaplinks.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/" target="test_blank"&gt;http://www.sap-img.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/" target="test_blank"&gt;http://www.sapgenie.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com" target="test_blank"&gt;http://help.sap.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/controls/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/controls/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf" target="test_blank"&gt;http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf" target="test_blank"&gt;http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;these links&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For funtion module to class&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for classes&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for methods&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for inheritance&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for interfaces&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm&lt;/A&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;For Materials:&lt;/P&gt;&lt;P&gt;1) &lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf&lt;/A&gt; -- Page no: 1291&lt;/P&gt;&lt;P&gt;2) &lt;A href="http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt" target="test_blank"&gt;http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;3) &lt;A href="http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf" target="test_blank"&gt;http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;4) &lt;A href="http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf" target="test_blank"&gt;http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;5) &lt;A href="http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt" target="test_blank"&gt;http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;6) &lt;A href="http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf" target="test_blank"&gt;http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;7) &lt;A href="http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt" target="test_blank"&gt;http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; &lt;A href="http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8" target="test_blank"&gt;http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) &lt;A href="http://www.erpgenie.com/sap/abap/OO/index.htm" target="test_blank"&gt;http://www.erpgenie.com/sap/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2) &lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&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;Ashu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 11:14:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496135#M563696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T11:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP OBJECTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496136#M563697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TYPE-POOLS: SLIS.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;TYPES:&lt;/P&gt;&lt;P&gt;  BEGIN OF TY_KNA1,&lt;/P&gt;&lt;P&gt;    KUNNR TYPE KUNNR,&lt;/P&gt;&lt;P&gt;    NAME1 TYPE NAME1,&lt;/P&gt;&lt;P&gt;    ORT01 TYPE ORT01,&lt;/P&gt;&lt;P&gt;    END OF TY_KNA1.&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF TY_VBAK,&lt;/P&gt;&lt;P&gt;VBELN TYPE VBELN,&lt;/P&gt;&lt;P&gt;ERNAM TYPE ERNAM,&lt;/P&gt;&lt;P&gt;ERDAT TYPE ERDAT,&lt;/P&gt;&lt;P&gt;NETWR TYPE NETWR,&lt;/P&gt;&lt;P&gt;WAERK TYPE WAERK,&lt;/P&gt;&lt;P&gt;END OF TY_VBAK.&lt;/P&gt;&lt;P&gt;*&amp;amp;--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="----------" /&gt;WORK AREA &amp;amp; TABLE DECLARATION--&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="------------------" /&gt;&lt;P&gt;DATA: W_KNA1 TYPE TY_KNA1.&lt;/P&gt;&lt;P&gt;DATA: T_KNA1 TYPE STANDARD TABLE OF TY_KNA1 INITIAL SIZE 1.&lt;/P&gt;&lt;P&gt;DATA: W_VBAK TYPE TY_VBAK.&lt;/P&gt;&lt;P&gt;DATA: T_VBAK TYPE STANDARD TABLE OF TY_VBAK INITIAL SIZE 1.&lt;/P&gt;&lt;P&gt;*&amp;amp;--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="----------" /&gt;FIELDCAT TABLE &amp;amp; WORK AREA--&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="---------------------" /&gt;&lt;P&gt;DATA: W_FCAT TYPE SLIS_FIELDCAT_ALV.&lt;/P&gt;&lt;P&gt;DATA: T_FCAT TYPE SLIS_T_FIELDCAT_ALV.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;DATA: W_FCAT1 TYPE SLIS_FIELDCAT_ALV.&lt;/P&gt;&lt;P&gt;DATA: T_FCAT1 TYPE SLIS_T_FIELDCAT_ALV.&lt;/P&gt;&lt;P&gt;*&amp;amp;--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="-----------" /&gt;EVENT TABLE AND WORK AREA--&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="--------------------" /&gt;&lt;P&gt;DATA: W_EVENTS TYPE SLIS_ALV_EVENT.&lt;/P&gt;&lt;P&gt;DATA: T_EVENTS TYPE SLIS_T_EVENT.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;DATA: W_EVENTS1 TYPE SLIS_ALV_EVENT.&lt;/P&gt;&lt;P&gt;DATA: T_EVENTS1 TYPE SLIS_T_EVENT.&lt;/P&gt;&lt;P&gt;*&amp;amp;--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;COMMENT TABLE &amp;amp; WORK AREA--&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="------------------" /&gt;&lt;P&gt;DATA: W_COMMENT TYPE SLIS_LISTHEADER.&lt;/P&gt;&lt;P&gt;DATA: T_COMMENT TYPE SLIS_T_LISTHEADER.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;DATA: W_COMMENT1 TYPE SLIS_LISTHEADER.&lt;/P&gt;&lt;P&gt;DATA: T_COMMENT1 TYPE SLIS_T_LISTHEADER.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="---------------" /&gt;&lt;P&gt;APPENDING FCAT -&lt;/P&gt;&lt;HR originaltext="---------------------------------" /&gt;&lt;P&gt;W_FCAT-COL_POS = 1.&lt;/P&gt;&lt;P&gt;W_FCAT-FIELDNAME = 'KUNNR'.&lt;/P&gt;&lt;P&gt;W_FCAT-SELTEXT_M = 'CUST. NO'.&lt;/P&gt;&lt;P&gt;W_FCAT-HOTSPOT = 'X'.                  " HOT SPOT HAND SYMBOL&lt;/P&gt;&lt;P&gt;W_FCAT-EMPHASIZE = 'C119'.             " FOR COLORING THE COLUMN 1&lt;/P&gt;&lt;P&gt;APPEND W_FCAT TO T_FCAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR W_FCAT.&lt;/P&gt;&lt;P&gt;W_FCAT-COL_POS = 2.&lt;/P&gt;&lt;P&gt;W_FCAT-FIELDNAME = 'NAME1'.&lt;/P&gt;&lt;P&gt;W_FCAT-SELTEXT_M = 'CUST. NAME'.&lt;/P&gt;&lt;P&gt;APPEND W_FCAT TO T_FCAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;W_FCAT-COL_POS = 3.&lt;/P&gt;&lt;P&gt;W_FCAT-FIELDNAME = 'ORT01'.&lt;/P&gt;&lt;P&gt;W_FCAT-SELTEXT_M = 'CITY'.&lt;/P&gt;&lt;P&gt;APPEND W_FCAT TO T_FCAT.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;W_FCAT1-COL_POS = 1.&lt;/P&gt;&lt;P&gt;W_FCAT1-FIELDNAME = 'VBELN'.&lt;/P&gt;&lt;P&gt;W_FCAT1-SELTEXT_M = 'ORDER NO'.&lt;/P&gt;&lt;P&gt;W_FCAT1-EMPHASIZE = 'C519'.&lt;/P&gt;&lt;P&gt;APPEND W_FCAT1 TO T_FCAT1.&lt;/P&gt;&lt;P&gt;CLEAR W_FCAT.&lt;/P&gt;&lt;P&gt;W_FCAT1-COL_POS = 2.&lt;/P&gt;&lt;P&gt;W_FCAT1-FIELDNAME = 'ERNAM'.&lt;/P&gt;&lt;P&gt;W_FCAT1-SELTEXT_M = 'NAME OF PARTY'.&lt;/P&gt;&lt;P&gt;APPEND W_FCAT1 TO T_FCAT1.&lt;/P&gt;&lt;P&gt;W_FCAT1-COL_POS = 3.&lt;/P&gt;&lt;P&gt;W_FCAT1-FIELDNAME = 'ERDAT'.&lt;/P&gt;&lt;P&gt;W_FCAT1-SELTEXT_M = 'DATE'.&lt;/P&gt;&lt;P&gt;APPEND W_FCAT1 TO T_FCAT1.&lt;/P&gt;&lt;P&gt;W_FCAT1-COL_POS = 4.&lt;/P&gt;&lt;P&gt;W_FCAT1-FIELDNAME = 'NETWR'.&lt;/P&gt;&lt;P&gt;W_FCAT1-SELTEXT_M = 'ORDER VALUE'.&lt;/P&gt;&lt;P&gt;APPEND W_FCAT1 TO T_FCAT1.&lt;/P&gt;&lt;P&gt;W_FCAT1-COL_POS = 5.&lt;/P&gt;&lt;P&gt;W_FCAT1-FIELDNAME = 'WAERK'.&lt;/P&gt;&lt;P&gt;W_FCAT1-SELTEXT_M = 'CURRENCY'.&lt;/P&gt;&lt;P&gt;APPEND W_FCAT1 TO T_FCAT1.&lt;/P&gt;&lt;P&gt;*&amp;amp;--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;APPEND COMMENTRY--&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------" /&gt;&lt;P&gt;W_COMMENT-TYP = 'H'.&lt;/P&gt;&lt;P&gt;W_COMMENT-INFO = 'CUSTOMER DETAILS'.&lt;/P&gt;&lt;P&gt;APPEND W_COMMENT TO T_COMMENT.&lt;/P&gt;&lt;P&gt;CLEAR W_COMMENT.&lt;/P&gt;&lt;P&gt;*&amp;amp;--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="-------------" /&gt;APPEND EVENTS TABLE--&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;P&gt;W_EVENTS-NAME = 'TOP_OF_PAGE'.&lt;/P&gt;&lt;P&gt;W_EVENTS-FORM = 'TOPPAGE'.&lt;/P&gt;&lt;P&gt;APPEND W_EVENTS TO T_EVENTS.&lt;/P&gt;&lt;P&gt;W_EVENTS-NAME = 'USER_COMMAND'.&lt;/P&gt;&lt;P&gt;W_EVENTS-FORM = 'SUB2'.&lt;/P&gt;&lt;P&gt;APPEND W_EVENTS TO T_EVENTS.&lt;/P&gt;&lt;P&gt;W_EVENTS1-NAME = 'TOP_OF_PAGE'.&lt;/P&gt;&lt;P&gt;W_EVENTS1-FORM = 'TOPPAGE1'.&lt;/P&gt;&lt;P&gt;APPEND W_EVENTS1 TO T_EVENTS1.&lt;/P&gt;&lt;P&gt;CLEAR W_EVENTS1.&lt;/P&gt;&lt;P&gt;W_EVENTS1-NAME = 'USER_COMMAND'.&lt;/P&gt;&lt;P&gt;W_EVENTS1-FORM = 'SUB3'.&lt;/P&gt;&lt;P&gt;APPEND W_EVENTS1 TO T_EVENTS1.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;SELECT-OPTIONS: CUSTNO FOR W_KNA1-KUNNR.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;SELECT KUNNR&lt;/P&gt;&lt;P&gt;       NAME1&lt;/P&gt;&lt;P&gt;       ORT01&lt;/P&gt;&lt;P&gt;  FROM KNA1&lt;/P&gt;&lt;P&gt;  INTO TABLE T_KNA1&lt;/P&gt;&lt;P&gt; WHERE KUNNR IN CUSTNO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    I_CALLBACK_PROGRAM = 'ZKAL_ALV_INTERACTIVE_12'&lt;/P&gt;&lt;P&gt;    I_BACKGROUND_ID    = 'BIKE'&lt;/P&gt;&lt;P&gt;    I_GRID_TITLE       = 'CUSTOMER DETAILS'&lt;/P&gt;&lt;P&gt;    IT_FIELDCAT        = T_FCAT&lt;/P&gt;&lt;P&gt;    IT_EVENTS          = T_EVENTS&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    T_OUTTAB           = T_KNA1.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;FORM TOPPAGE.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      IT_LIST_COMMENTARY = T_COMMENT&lt;/P&gt;&lt;P&gt;      I_LOGO             = 'LOGO_ALV'.&lt;/P&gt;&lt;P&gt;ENDFORM.                               " END OF TOPPAGE SUB.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;FORM SUB2 USING UCOMM LIKE SY-UCOMM FIELDS1 TYPE SLIS_SELFIELD.&lt;/P&gt;&lt;P&gt;  READ TABLE T_KNA1 INTO W_KNA1 INDEX FIELDS1-TABINDEX.&lt;/P&gt;&lt;P&gt;  SELECT VBELN&lt;/P&gt;&lt;P&gt;         ERNAM&lt;/P&gt;&lt;P&gt;         ERDAT&lt;/P&gt;&lt;P&gt;         NETWR&lt;/P&gt;&lt;P&gt;         WAERK&lt;/P&gt;&lt;P&gt;    FROM VBAK&lt;/P&gt;&lt;P&gt;    INTO TABLE T_VBAK&lt;/P&gt;&lt;P&gt;   WHERE KUNNR = W_KNA1-KUNNR.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      I_CALLBACK_PROGRAM = 'ZKAL_ALV_INTERACTIVE_12'&lt;/P&gt;&lt;P&gt;      I_BACKGROUND_ID    = 'KALEEM'&lt;/P&gt;&lt;P&gt;      I_GRID_TITLE       = 'LIST OF ORDERS'&lt;/P&gt;&lt;P&gt;      IT_FIELDCAT        = T_FCAT1&lt;/P&gt;&lt;P&gt;      IT_EVENTS          = T_EVENTS1&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      T_OUTTAB           = T_VBAK.&lt;/P&gt;&lt;P&gt;ENDFORM. "END OF SUB2.&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;FORM TOPPAGE1.&lt;/P&gt;&lt;P&gt;*&amp;amp;--&lt;DEL&gt;&lt;/DEL&gt;&lt;/P&gt;&lt;HR originaltext="-------" /&gt;APPEND COMMENTRYOF SECONDRY SCREEN--&lt;P&gt;&lt;/P&gt;&lt;HR originaltext="----------------" /&gt;&lt;P&gt;  W_COMMENT1-TYP = 'H'.&lt;/P&gt;&lt;P&gt;  W_COMMENT1-INFO = 'LIST OF ORDERS'.&lt;/P&gt;&lt;P&gt;  APPEND W_COMMENT1 TO T_COMMENT1.&lt;/P&gt;&lt;P&gt;  W_COMMENT1-TYP = 'S'.&lt;/P&gt;&lt;P&gt;  W_COMMENT1-KEY = 'CUSTOMER'.&lt;/P&gt;&lt;P&gt;  W_COMMENT1-INFO = W_KNA1-KUNNR.&lt;/P&gt;&lt;P&gt;  APPEND W_COMMENT1 TO T_COMMENT1.&lt;/P&gt;&lt;P&gt;  CLEAR W_COMMENT.&lt;/P&gt;&lt;P&gt;  W_COMMENT1-TYP = 'A'.&lt;/P&gt;&lt;P&gt;  W_COMMENT1-INFO = W_KNA1-NAME1.&lt;/P&gt;&lt;P&gt;  APPEND W_COMMENT1 TO T_COMMENT1.&lt;/P&gt;&lt;P&gt;  CLEAR W_COMMENT1.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      IT_LIST_COMMENTARY = T_COMMENT1&lt;/P&gt;&lt;P&gt;      I_LOGO             = 'LOGO_ALV'.&lt;/P&gt;&lt;P&gt;  REFRESH T_COMMENT1.&lt;/P&gt;&lt;P&gt;ENDFORM.                               " END OF TOPPAGE1&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;FORM SUB3 USING UCOMM LIKE SY-UCOMM FIELDS1 TYPE SLIS_SELFIELD.&lt;/P&gt;&lt;P&gt;  READ TABLE T_VBAK INTO W_VBAK INDEX FIELDS1-TABINDEX.&lt;/P&gt;&lt;P&gt;  SET PARAMETER ID 'AUN' FIELD W_VBAK-VBELN.&lt;/P&gt;&lt;P&gt;  CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.&lt;/P&gt;&lt;P&gt;ENDFORM.                    ":&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give customer number as 3400 on the Selection-screen.You can even check for different values...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pavan P.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 11:16:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496136#M563697</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T11:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP OBJECTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496137#M563698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi srinath,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;look at this code and paste it in ur report page and run it.&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;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZSANINTERNAL2                                               *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZSANINTERNAL2                           .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: SALESORDER(10) TYPE C,&lt;/P&gt;&lt;P&gt;      SALESORDERNO(15) TYPE C,&lt;/P&gt;&lt;P&gt;      CREATEDBY(15) TYPE C,&lt;/P&gt;&lt;P&gt;      CREATEDON LIKE SY-DATUM,&lt;/P&gt;&lt;P&gt;      NETVALUE TYPE P DECIMALS 2,&lt;/P&gt;&lt;P&gt;      DATE LIKE SY-DATUM.&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: 'DATE',SY-DATUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SALESORDER = 'TELEVISION'.&lt;/P&gt;&lt;P&gt;SALESORDERNO = '100'.&lt;/P&gt;&lt;P&gt;CREATEDBY = 'SANKET SETHI'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: /'SALES ORDER   :',SALESORDER,&lt;/P&gt;&lt;P&gt;       /'SALES ORDER NO.   :',SALESORDERNO,&lt;/P&gt;&lt;P&gt;       /'CREATED BY   :',CREATEDBY,&lt;/P&gt;&lt;P&gt;       /'CREATED ON   :',SY-DATUM.&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;DATA: BEGIN OF T_SANKET OCCURS 0,&lt;/P&gt;&lt;P&gt;      MATERIALNO(5) TYPE C,&lt;/P&gt;&lt;P&gt;      MATERIAL(15) TYPE C,&lt;/P&gt;&lt;P&gt;      QUANTITY(5) TYPE C,&lt;/P&gt;&lt;P&gt;      VALUE(10) TYPE P DECIMALS 2 VALUE 0,&lt;/P&gt;&lt;P&gt;      END OF T_SANKET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T_SANKET-MATERIALNO = '1'.&lt;/P&gt;&lt;P&gt;T_SANKET-MATERIAL = '1000'.&lt;/P&gt;&lt;P&gt;T_SANKET-QUANTITY = '1'.&lt;/P&gt;&lt;P&gt;T_SANKET-VALUE = 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND T_SANKET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T_SANKET-MATERIALNO = '2'.&lt;/P&gt;&lt;P&gt;T_SANKET-MATERIAL = '2000'.&lt;/P&gt;&lt;P&gt;T_SANKET-QUANTITY = '2'.&lt;/P&gt;&lt;P&gt;T_SANKET-VALUE = 200.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND T_SANKET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T_SANKET-MATERIALNO = '3'.&lt;/P&gt;&lt;P&gt;T_SANKET-MATERIAL = '3000'.&lt;/P&gt;&lt;P&gt;T_SANKET-QUANTITY = '4'.&lt;/P&gt;&lt;P&gt;T_SANKET-VALUE = 400.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND T_SANKET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T_SANKET-MATERIALNO = '4'.&lt;/P&gt;&lt;P&gt;T_SANKET-MATERIAL = '5000'.&lt;/P&gt;&lt;P&gt;T_SANKET-QUANTITY = '6'.&lt;/P&gt;&lt;P&gt;T_SANKET-VALUE = 500.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND T_SANKET.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: /40(17)'DAILY-SHEET' INVERSE ON COLOR 6.&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;WRITE : /20(54) SY-ULINE,&lt;/P&gt;&lt;P&gt;        /20 SY-VLINE,&lt;/P&gt;&lt;P&gt;        24(10)'MATERIALNO',&lt;/P&gt;&lt;P&gt;        35 SY-VLINE,&lt;/P&gt;&lt;P&gt;        36(8) 'MATERIAL',&lt;/P&gt;&lt;P&gt;        45 SY-VLINE,&lt;/P&gt;&lt;P&gt;        46(8)'QUANTITY',&lt;/P&gt;&lt;P&gt;        55 SY-VLINE,&lt;/P&gt;&lt;P&gt;        56(10) 'VALUE',&lt;/P&gt;&lt;P&gt;        73 SY-VLINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NETVALUE = 0.&lt;/P&gt;&lt;P&gt;READ TABLE T_SANKET INDEX 1.&lt;/P&gt;&lt;P&gt;T_SANKET-MATERIAL = '90000'.&lt;/P&gt;&lt;P&gt;MODIFY T_SANKET INDEX 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_SANKET .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NETVALUE = NETVALUE + T_SANKET-VALUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE : /20(54) SY-ULINE,&lt;/P&gt;&lt;P&gt;        /20 SY-VLINE,&lt;/P&gt;&lt;P&gt;        24(10) T_SANKET-MATERIALNO,&lt;/P&gt;&lt;P&gt;        35 SY-VLINE,&lt;/P&gt;&lt;P&gt;        36(8) T_SANKET-MATERIAL,&lt;/P&gt;&lt;P&gt;        45 SY-VLINE,&lt;/P&gt;&lt;P&gt;        46(8) T_SANKET-QUANTITY,&lt;/P&gt;&lt;P&gt;        55 SY-VLINE,&lt;/P&gt;&lt;P&gt;        56(10) T_SANKET-VALUE,&lt;/P&gt;&lt;P&gt;        73 SY-VLINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; WRITE:/20(54) SY-ULINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SKIP.&lt;/P&gt;&lt;P&gt;WRITE: /'NET VALUE',NETVALUE INVERSE ON COLOR 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*CLEAR: T_SANKET.&lt;/P&gt;&lt;P&gt;*FREE T_SANKET.&lt;/P&gt;&lt;P&gt;*WRITE: /'MATERIALNO',T_SANKET-MATERIALNO.&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;If useful reward points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sanket.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2007 11:17:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496137#M563698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-06T11:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP OBJECTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496138#M563699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THANKS FOR RESPONDING ,I WANT SAMPLE PROGRAM TO LEARN OOPS&lt;/P&gt;&lt;P&gt;CONCEPT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jul 2007 05:15:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496138#M563699</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-07T05:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP OBJECTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496139#M563700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;Go through it you can learn your self &lt;/P&gt;&lt;P&gt;Public attributes&lt;/P&gt;&lt;P&gt;Public attributes are defined in the PUBLIC section and can be viewed and changed from outside the class. There is direct access to public attributes. As a general rule, as few public attributes should be defined as possible.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;DATA: Counter type i.&lt;/P&gt;&lt;P&gt;Private attributes&lt;/P&gt;&lt;P&gt;Private attributes are defined in the PRIVATE section. The can only be viewes and changed from within the class. There is no direct access from outside the class.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;DATA: name(25) TYPE c,&lt;/P&gt;&lt;P&gt;planetype LIKE saplane-planetyp,&lt;/P&gt;&lt;P&gt;Instance attributes&lt;/P&gt;&lt;P&gt;There exist one instance attribute for each instance of the class, thus they exist seperately for each object. Instance attributes are declared with the DATA keyword.&lt;/P&gt;&lt;P&gt;Static attributes&lt;/P&gt;&lt;P&gt;Static attributes exist only once for each class. The data are the same for all instances of the class, and can be used e.g. for instance counters. Static attributes are defined with the keyword CLASS-DATA.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS-DATA: counter type i, &lt;/P&gt;&lt;P&gt;Public methods&lt;/P&gt;&lt;P&gt;Can called from outside the class&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHODS: set_attributes IMPORTING p_name(25) TYPE c,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_planetype LIKE saplane-planetyp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Private methods&lt;/P&gt;&lt;P&gt;Can only be called from inside the class. They are placed in the PRIVATE section of the class. &lt;/P&gt;&lt;P&gt;Constructor method&lt;/P&gt;&lt;P&gt;Implicitly, each class has an instance constructor method with the reserved name constructor and a static constructor method with the reserved name class_constructor.&lt;/P&gt;&lt;P&gt;The instance constructor is executed each time you create an object (instance) with the CREATE OBJECT statement, while the class constructor is executed exactly once before you first access a class.&lt;/P&gt;&lt;P&gt;The constructors are always present. However, to implement a constructor you must declare it explicitly with the METHODS or CLASS-METHODS statements. An instance constructor can have IMPORTING parameters and exceptions. You must pass all non-optional parameters when creating an object. Static constructors have no parameters.&lt;/P&gt;&lt;P&gt;Static constructor&lt;/P&gt;&lt;P&gt;The static constructor is always called CLASS_CONSTRUCTER, and is called autmatically before the clas is first accessed, that is before any of the following actions are executed:&lt;/P&gt;&lt;P&gt;&amp;#149; Creating an instance using CREATE_OBJECT &lt;/P&gt;&lt;P&gt;&amp;#149; Adressing a static attribute using  &lt;/P&gt;&lt;P&gt;&amp;#149; Calling a ststic attribute using CALL METHOD &lt;/P&gt;&lt;P&gt;&amp;#149; Registering a static event handler &lt;/P&gt;&lt;P&gt;&amp;#149; Registering an evetm handler method for a static event&lt;/P&gt;&lt;P&gt;The static constructor cannot be called explicitly.&lt;/P&gt;&lt;P&gt;Protected components&lt;/P&gt;&lt;P&gt;When we are talking subclassing and enheritance there is one more component than Public and Private, the Protected component. Protected components can be used by the superclass and all of the subclasses. Note that Subclasses cannot access Private components.&lt;/P&gt;&lt;P&gt;Polymorphism&lt;/P&gt;&lt;P&gt;Polymorphism: When the same method is implemented differently in different classes. This can be done using enheritance, by redefining a method from the superclass in subclasses and implement it differently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Template for making a class&lt;/P&gt;&lt;P&gt;Delete the parts that should not be used&lt;/P&gt;&lt;P&gt;******************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Definition part&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;******************************************&lt;/P&gt;&lt;P&gt;CLASS xxx DEFINITION.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Public section&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;TYPES:&lt;/P&gt;&lt;P&gt;DATA: &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Static data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLASS-DATA:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Methods&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Using the constructor to initialize parameters&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;constructor IMPORTING xxx type yyy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Method with parameters&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;mm1 IMPORTING iii TYPE ttt.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Method without parameters&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;mm2.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Static methods&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLASS-METHODS: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Protected section. Also accessable by subclasses&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------" /&gt;&lt;P&gt;PROTECTED SECTION.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Private section. Not accessable by subclasses&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="---------------------------------------------" /&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;******************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Implementation part&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;******************************************&lt;/P&gt;&lt;P&gt;CLASS lcl_airplane IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD mm1.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD mm2.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;Template for calling a class&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create reference to class lcl_airplane&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: airplane1 TYPE REF TO lcl_airplane.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create instance using parameters in the cosntructor method&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE OBJECT airplane1 exporting im_name = 'Hansemand'&lt;/P&gt;&lt;P&gt;im_planetype = 'Boing 747'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Calling a method with parameters&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD: airplane1-&amp;gt;display_n_o_airplanes,&lt;/P&gt;&lt;P&gt;airplane1-&amp;gt;display_attributes.&lt;/P&gt;&lt;P&gt;Subclass&lt;/P&gt;&lt;P&gt;CLASS xxx DEFINITION INHERITING FROM yyy.&lt;/P&gt;&lt;P&gt;Using af class as a parameter for a method&lt;/P&gt;&lt;P&gt;The class LCL_AIRPLANE is used as a parameter for method add_a_new_airplane:&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;add_a_new_airplane importing im_airplane TYPE REF to lcl_airplane.&lt;/P&gt;&lt;P&gt;Interfaces&lt;/P&gt;&lt;P&gt;In ABAP interfaces are implemented in addition to, and independently of classes. An interface only has a declaration part, &lt;/P&gt;&lt;P&gt;and do not have visibility sections. Components (Attributes, methods, constants, types) can be defined the same way as in classes.&lt;/P&gt;&lt;P&gt;&amp;#149; Interfaces are listed in the definition part lof the class, and must always be in the PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;&amp;#149; Operations defined in the interface atre impemented as methods of the class. All methods of the interface&lt;/P&gt;&lt;P&gt;must be present in the implementation part of the class.&lt;/P&gt;&lt;P&gt;&amp;#149; Attributes, events, constants and types defined in the interface are automatically available to the class &lt;/P&gt;&lt;P&gt;carrying out the implementation.&lt;/P&gt;&lt;P&gt;&amp;#149; Interface components are addressed in the class by ]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Define, implement and use simple class | Use constructor to create an object with parameters | Subclassing | Polymorphism | Events&lt;/P&gt;&lt;P&gt;Define, implement and use simple class&lt;/P&gt;&lt;P&gt;***INCLUDE ZBC404_HF_LCL_AIRPLANE .&lt;/P&gt;&lt;P&gt;******************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Definition part&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;******************************************&lt;/P&gt;&lt;P&gt;CLASS lcl_airplane DEFINITION.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Public section&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;TYPES: t_name(25) TYPE c.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;constructor,&lt;/P&gt;&lt;P&gt;set_attributes IMPORTING p_name TYPE t_name&lt;/P&gt;&lt;P&gt;p_planetype TYPE saplane-planetype,&lt;/P&gt;&lt;P&gt;display_attributes,&lt;/P&gt;&lt;P&gt;display_n_o_airplanes.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Private section&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Private attributes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: name(25) TYPE c,&lt;/P&gt;&lt;P&gt;planetype TYPE saplane-planetype.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Private static attribute&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLASS-DATA n_o_airplanes TYPE i.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;******************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Implementation part&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;******************************************&lt;/P&gt;&lt;P&gt;CLASS lcl_airplane IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Counts number of instances&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;n_o_airplanes = n_o_airplanes + 1.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD set_attributes.&lt;/P&gt;&lt;P&gt;name = p_name.&lt;/P&gt;&lt;P&gt;planetype = p_planetype.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD display_attributes.&lt;/P&gt;&lt;P&gt;WRITE:/ 'Name:', name, 'Planetype:', planetype.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD display_n_o_airplanes.&lt;/P&gt;&lt;P&gt;WRITE: / 'No. planes:', n_o_airplanes.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;REPORT zbc404_hf_maintain_airplanes .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INCLUDE zbc404_hf_lcl_airplane.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create reference to class lcl_airplane&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: airplane1 TYPE REF TO lcl_airplane,&lt;/P&gt;&lt;P&gt;airplane2 TYPE REF TO lcl_airplane.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create instance&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE OBJECT airplane1.&lt;/P&gt;&lt;P&gt;CALL METHOD: airplane1-&amp;gt;display_n_o_airplanes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT airplane2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Setting attributes using a method with parameters&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD airplane1-&amp;gt;set_attributes EXPORTING p_name = 'Kurt'&lt;/P&gt;&lt;P&gt;p_planetype = 'MD80'.&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Using methods &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD: airplane1-&amp;gt;display_n_o_airplanes,&lt;/P&gt;&lt;P&gt;airplane1-&amp;gt;display_attributes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The resulting report:&lt;/P&gt;&lt;P&gt;Maintain airplanes &lt;/P&gt;&lt;P&gt;No. planes: 1 &lt;/P&gt;&lt;P&gt;No. planes: 2 &lt;/P&gt;&lt;P&gt;Name: Kurt Planetype: MD80 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use constructor to create an object with parameters&lt;/P&gt;&lt;P&gt;CLASS lcl_airplane DEFINITION.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;TYPES: t_name(25) TYPE c.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;constructor importing p2_name type t_name&lt;/P&gt;&lt;P&gt;p2_planetype TYPE saplane-planetype,&lt;/P&gt;&lt;P&gt;..... more code .......&lt;/P&gt;&lt;P&gt;CLASS lcl_airplane IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;P&gt;name = p2_name.&lt;/P&gt;&lt;P&gt;planetype = p2_planetype.&lt;/P&gt;&lt;P&gt;..... more code .......&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;CREATE OBJECT airplane1 exporting p2_name = 'Hansemand'&lt;/P&gt;&lt;P&gt;p2_planetype = 'Boing 747'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subclassing&lt;/P&gt;&lt;P&gt;This example uses a superclass LCL_AIRPLANE and subclasses it into LCL_PASSENGER_AIRPLANE and LCL_CARGO_PLANE.&lt;/P&gt;&lt;P&gt;LCL_AIRPLANE has a method display_n_o_airplanes that displays the number of object instances.&lt;/P&gt;&lt;P&gt;LCL_PASSENGER_AIRPLANE has the private instance attribute n_o_seats, and redefines the superclass method display_attributes, &lt;/P&gt;&lt;P&gt;so it also displays n_o_seats.&lt;/P&gt;&lt;P&gt;LCL_CARGO_PLANE has the private instance attribute cargomax, and redefines the superclass method&lt;/P&gt;&lt;P&gt;display_attributes, so it also displays cargomax.&lt;/P&gt;&lt;P&gt;All instance attributes are provided by the cunstructor method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Superclass LCL_AIRPLANE&lt;/P&gt;&lt;P&gt;***INCLUDE ZBC404_HF_LCL_AIRPLANE .&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;Definition part&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;******************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_airplane DEFINITION.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Public section&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;TYPES: t_name(25) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;constructor IMPORTING im_name TYPE t_name&lt;/P&gt;&lt;P&gt;im_planetype TYPE saplane-planetype,&lt;/P&gt;&lt;P&gt;display_attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Static methods&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLASS-METHODS:&lt;/P&gt;&lt;P&gt;display_n_o_airplanes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Protected section&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------" /&gt;&lt;P&gt;PROTECTED SECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Private attributes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: name(25) TYPE c,&lt;/P&gt;&lt;P&gt;planetype TYPE saplane-planetype.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Private static attribute&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLASS-DATA n_o_airplanes TYPE i.&lt;/P&gt;&lt;P&gt;&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;******************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Implementation part&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;******************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_airplane IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;P&gt;name = im_name.&lt;/P&gt;&lt;P&gt;planetype = im_planetype.&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;Counts number of instances&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;n_o_airplanes = n_o_airplanes + 1.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD display_attributes.&lt;/P&gt;&lt;P&gt;WRITE:/ 'Name:', name, 'Planetype:', planetype.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD display_n_o_airplanes.&lt;/P&gt;&lt;P&gt;WRITE: / 'No. planes:', n_o_airplanes.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;Sub class LCL_PASSENGER_AIRPLANE&lt;/P&gt;&lt;P&gt;***INCLUDE ZBC404_HF_LCL_PASSENGER_PLANE .&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;This is a subclass of class lcl_airplane&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_passenger_airplane DEFINITION INHERITING FROM lcl_airplane.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&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;The constructor contains the parameters from the superclass&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;plus the parameters from the subclass&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;constructor IMPORTING im_name TYPE t_name&lt;/P&gt;&lt;P&gt;im_planetype TYPE saplane-planetype&lt;/P&gt;&lt;P&gt;im_n_o_seats TYPE sflight-seatsmax,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Redefinition of superclass method display_attributes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;display_attributes REDEFINITION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;DATA: n_o_seats TYPE sflight-seatsmax.&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;CLASS lcl_passenger_airplane IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The constructor method of the superclass MUST be called withing the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;construtor&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD super-&amp;gt;constructor&lt;/P&gt;&lt;P&gt;EXPORTING im_name = im_name&lt;/P&gt;&lt;P&gt;im_planetype = im_planetype.&lt;/P&gt;&lt;P&gt;n_o_seats = im_n_o_seats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The redefined display_attributes method&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;METHOD display_attributes.&lt;/P&gt;&lt;P&gt;CALL METHOD super-&amp;gt;display_attributes.&lt;/P&gt;&lt;P&gt;WRITE: / 'No. seats:', n_o_seats.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&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;Sub class LCL_CARGO_PLANE&lt;/P&gt;&lt;P&gt;***INCLUDE ZBC404_HF_LCL_CARGO_PLANE .&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;This is a subclass of class lcl_airplane&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_cargo_plane DEFINITION INHERITING FROM lcl_airplane.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The constructor contains the parameters from the superclass&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;plus the parameters from the subclass&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constructor IMPORTING im_name TYPE t_name&lt;/P&gt;&lt;P&gt;im_planetype TYPE saplane-planetype&lt;/P&gt;&lt;P&gt;im_cargomax type scplane-cargomax,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Redefinition of superclass method display_attributes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;display_attributes REDEFINITION.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;DATA:cargomax TYPE scplane-cargomax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS lcl_cargo_plane IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The constructor method of the superclass MUST be called withing the&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;constructor&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD super-&amp;gt;constructor&lt;/P&gt;&lt;P&gt;EXPORTING im_name = im_name&lt;/P&gt;&lt;P&gt;im_planetype = im_planetype.&lt;/P&gt;&lt;P&gt;cargomax = im_cargomax.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD display_attributes.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The redefined display_attributes method&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD super-&amp;gt;display_attributes.&lt;/P&gt;&lt;P&gt;WRITE: / 'Cargo max:', cargomax.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;The Main program that uses the classes&lt;/P&gt;&lt;P&gt;REPORT zbc404_hf_main .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Super class&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;INCLUDE zbc404_hf_lcl_airplane.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sub classes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;INCLUDE zbc404_hf_lcl_passenger_plane.&lt;/P&gt;&lt;P&gt;INCLUDE zbc404_hf_lcl_cargo_plane.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Type ref to sub classes. Note: It is not necesssary to make typeref to the superclass&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;o_passenger_airplane TYPE REF TO lcl_passenger_airplane,&lt;/P&gt;&lt;P&gt;o_cargo_plane TYPE REF TO lcl_cargo_plane.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display initial number of instances = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD lcl_airplane=&amp;gt;display_n_o_airplanes.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create objects&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE OBJECT o_passenger_airplane&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;im_name = 'LH505'&lt;/P&gt;&lt;P&gt;im_planetype = 'Boing 747'&lt;/P&gt;&lt;P&gt;im_n_o_seats = 350.&lt;/P&gt;&lt;P&gt;CREATE OBJECT o_cargo_plane&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;im_name = 'AR13'&lt;/P&gt;&lt;P&gt;im_planetype = 'DC 3'&lt;/P&gt;&lt;P&gt;im_cargomax = 35.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display attributes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD o_passenger_airplane-&amp;gt;display_attributes.&lt;/P&gt;&lt;P&gt;CALL METHOD o_cargo_plane-&amp;gt;display_attributes.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call static method display_n_o_airplanes&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Note: The syntax for calling a superclass method, differs from the syntax when calling a &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;subclass method.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;When calling a superclass =&amp;gt; must be used instead of -&amp;gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD lcl_airplane=&amp;gt;display_n_o_airplanes.&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;No. planes: 0&lt;/P&gt;&lt;P&gt;Name: LH505 Planetype: Boing 747&lt;/P&gt;&lt;P&gt;No. seats: 350&lt;/P&gt;&lt;P&gt;Name: AR13 Planetype: DC 3&lt;/P&gt;&lt;P&gt;Cargo max: 35,0000&lt;/P&gt;&lt;P&gt;No. planes: 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Polymorphism&lt;/P&gt;&lt;P&gt;Polymorphism: When the same method is implemented differently in different classes. This can be done u&lt;/P&gt;&lt;P&gt;sing enheritance, by redefining a method from the superclass in subclasses and implement it differently.&lt;/P&gt;&lt;P&gt;Classes:&lt;/P&gt;&lt;P&gt;&amp;#149; lcl_airplane Superclass &lt;/P&gt;&lt;P&gt;&amp;#149; lcl_cargo_airplane Subclass &lt;/P&gt;&lt;P&gt;&amp;#149; lcl_passenger_airplane Subclass&lt;/P&gt;&lt;P&gt;The method estimate_fuel_consumption is implemented differently in the 3 classes, as it depends on the airplane type.&lt;/P&gt;&lt;P&gt;Object from different classes are stored in an internal table (plane_list) consisting of references to the &lt;/P&gt;&lt;P&gt;superclass, and the processed &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;identically for all the classes. &lt;/P&gt;&lt;P&gt;What coding for the estimate_fuel_consumption method taht is actually executed, depends on the dynamic &lt;/P&gt;&lt;P&gt;type of the plane reference variable,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is, depends on which object plane points to.&lt;/P&gt;&lt;P&gt;DATA: cargo_plane TYPE REF to lcl_cargo_airplane,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;passenger_plane TYPE REF to lcl_passenger_airplane,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plane_list TYPE TABLE OF REF TO lcl_airplane.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Creating the list of references&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT cargo_plane.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND cargo_plane to plane_list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT passenger_plane&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND passenger_plane to plane list.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Generic method for calucalting required fuel&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD calculate required_fuel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: plane TYPE REF TO lcl_airplane.&lt;/P&gt;&lt;P&gt;LOOP AT plane_list INTO plane.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;re_fuel = re_fuel + plane-&amp;gt;estimate_fuel_consumption( distance ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Working example:&lt;/P&gt;&lt;P&gt;This example assumes that the classes lcl_airplane, lcl_passnger_airplane and lcl_cargo plane exists.&lt;/P&gt;&lt;P&gt;Create objects of type lcl_cargo_plane and lcl_passenger_airplane, adds them to a list in lcl_carrier, &lt;/P&gt;&lt;P&gt;and displays the list. &lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;*&amp;amp; Include ZBC404_HF_LCL_CARRIER *&lt;/P&gt;&lt;P&gt;*&amp;amp;----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CLASS lcl_carrier DEFINITION *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;CLASS lcl_carrier DEFINITION.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF flight_list_type,&lt;/P&gt;&lt;P&gt;connid TYPE sflight-connid,&lt;/P&gt;&lt;P&gt;fldate TYPE sflight-fldate,&lt;/P&gt;&lt;P&gt;airplane TYPE REF TO lcl_airplane,&lt;/P&gt;&lt;P&gt;seatsocc TYPE sflight-seatsocc,&lt;/P&gt;&lt;P&gt;cargo(5) TYPE p DECIMALS 3,&lt;/P&gt;&lt;P&gt;END OF flight_list_type.&lt;/P&gt;&lt;P&gt;METHODS: constructor IMPORTING im_name TYPE string,&lt;/P&gt;&lt;P&gt;get_name RETURNING value(ex_name) TYPE string,&lt;/P&gt;&lt;P&gt;add_a_new_airplane IMPORTING&lt;/P&gt;&lt;P&gt;im_airplane TYPE REF TO lcl_airplane,&lt;/P&gt;&lt;P&gt;create_a_new_flight importing&lt;/P&gt;&lt;P&gt;im_connid type sflight-connid&lt;/P&gt;&lt;P&gt;im_fldate type sflight-fldate&lt;/P&gt;&lt;P&gt;im_airplane type ref to lcl_airplane&lt;/P&gt;&lt;P&gt;im_seatsocc type sflight-seatsocc&lt;/P&gt;&lt;P&gt;optional&lt;/P&gt;&lt;P&gt;im_cargo type p optional,&lt;/P&gt;&lt;P&gt;display_airplanes.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;DATA: name TYPE string,&lt;/P&gt;&lt;P&gt;list_of_airplanes TYPE TABLE OF REF TO lcl_airplane,&lt;/P&gt;&lt;P&gt;list_of_flights TYPE TABLE OF flight_list_type.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CLASS lcl_carrier IMPLEMENTATION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;CLASS lcl_carrier IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;P&gt;name = im_name.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD get_name.&lt;/P&gt;&lt;P&gt;ex_name = name.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD create_a_new_flight.&lt;/P&gt;&lt;P&gt;DATA: wa_list_of_flights TYPE flight_list_type.&lt;/P&gt;&lt;P&gt;wa_list_of_flights-connid = im_connid.&lt;/P&gt;&lt;P&gt;wa_list_of_flights-fldate = im_fldate.&lt;/P&gt;&lt;P&gt;wa_list_of_flights-airplane = im_airplane.&lt;/P&gt;&lt;P&gt;IF im_seatsocc IS INITIAL.&lt;/P&gt;&lt;P&gt;wa_list_of_flights-cargo = im_cargo.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;wa_list_of_flights-seatsocc = im_seatsocc.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;APPEND wa_list_of_flights TO list_of_flights.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD add_a_new_airplane.&lt;/P&gt;&lt;P&gt;APPEND im_airplane TO list_of_airplanes.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD display_airplanes.&lt;/P&gt;&lt;P&gt;DATA: l_airplane TYPE REF TO lcl_airplane.&lt;/P&gt;&lt;P&gt;LOOP AT list_of_airplanes INTO l_airplane.&lt;/P&gt;&lt;P&gt;CALL METHOD l_airplane-&amp;gt;display_attributes.&lt;/P&gt;&lt;P&gt;ENDLOOP.&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;REPORT zbc404_hf_main .&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;This reprort uses class LCL_AIRPLNAE and subclasses&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;LCL_CARGO_PLANE and LCL_PASSENGER_AIRPLANE and class LCL_CARRIER&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;Super class for airplanes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;INCLUDE zbc404_hf_lcl_airplane.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sub classes for airplanes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;INCLUDE zbc404_hf_lcl_passenger_plane.&lt;/P&gt;&lt;P&gt;INCLUDE zbc404_hf_lcl_cargo_plane.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Carrier class&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;INCLUDE zbc404_hf_lcl_carrier.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Type ref to classes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;o_passenger_airplane TYPE REF TO lcl_passenger_airplane,&lt;/P&gt;&lt;P&gt;o_passenger_airplane2 TYPE REF TO lcl_passenger_airplane,&lt;/P&gt;&lt;P&gt;o_cargo_plane TYPE REF TO lcl_cargo_plane,&lt;/P&gt;&lt;P&gt;o_cargo_plane2 TYPE REF TO lcl_cargo_plane,&lt;/P&gt;&lt;P&gt;o_carrier TYPE REF TO lcl_carrier.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create objects&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE OBJECT o_passenger_airplane&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;im_name = 'LH505'&lt;/P&gt;&lt;P&gt;im_planetype = 'Boing 747'&lt;/P&gt;&lt;P&gt;im_n_o_seats = 350.&lt;/P&gt;&lt;P&gt;CREATE OBJECT o_passenger_airplane2&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;im_name = 'SK333'&lt;/P&gt;&lt;P&gt;im_planetype = 'MD80'&lt;/P&gt;&lt;P&gt;im_n_o_seats = 110.&lt;/P&gt;&lt;P&gt;CREATE OBJECT o_cargo_plane&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;im_name = 'AR13'&lt;/P&gt;&lt;P&gt;im_planetype = 'DC 3'&lt;/P&gt;&lt;P&gt;im_cargomax = 35.&lt;/P&gt;&lt;P&gt;CREATE OBJECT o_cargo_plane2&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;im_name = 'AFL124'&lt;/P&gt;&lt;P&gt;im_planetype = 'Iljutsin 2'&lt;/P&gt;&lt;P&gt;im_cargomax = 35000.&lt;/P&gt;&lt;P&gt;CREATE OBJECT o_carrier&lt;/P&gt;&lt;P&gt;EXPORTING im_name = 'Spritisch Airways'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add passenger and cargo planes to the list of airplanes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD o_carrier-&amp;gt;add_a_new_airplane&lt;/P&gt;&lt;P&gt;EXPORTING im_airplane = o_passenger_airplane.&lt;/P&gt;&lt;P&gt;CALL METHOD o_carrier-&amp;gt;add_a_new_airplane&lt;/P&gt;&lt;P&gt;EXPORTING im_airplane = o_passenger_airplane2.&lt;/P&gt;&lt;P&gt;CALL METHOD o_carrier-&amp;gt;add_a_new_airplane&lt;/P&gt;&lt;P&gt;EXPORTING im_airplane = o_cargo_plane.&lt;/P&gt;&lt;P&gt;CALL METHOD o_carrier-&amp;gt;add_a_new_airplane&lt;/P&gt;&lt;P&gt;EXPORTING im_airplane = o_cargo_plane2.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display list of airplanes&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call method o_carrier-&amp;gt;display_airplanes.&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;Name: LH505 Planetype: Boing 747 &lt;/P&gt;&lt;P&gt;No. seats: 350 &lt;/P&gt;&lt;P&gt;Name: SK333 Planetype: MD80 &lt;/P&gt;&lt;P&gt;No. seats: 110 &lt;/P&gt;&lt;P&gt;Name: AR13 Planetype: DC 3 &lt;/P&gt;&lt;P&gt;Cargo max: 35,0000 &lt;/P&gt;&lt;P&gt;Name: AFL124 Planetype: Iljutsin 2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cargo max: 35.000,0000 &lt;/P&gt;&lt;P&gt;Events&lt;/P&gt;&lt;P&gt;Below is a simple example of how to implement an event.&lt;/P&gt;&lt;P&gt;REPORT zbc404_hf_events_5.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CLASS lcl_dog DEFINITION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;CLASS lcl_dog DEFINITION.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declare events&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EVENTS:&lt;/P&gt;&lt;P&gt;dog_is_hungry&lt;/P&gt;&lt;P&gt;EXPORTING value(ex_time_since_last_meal) TYPE i.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;constructor&lt;/P&gt;&lt;P&gt;IMPORTING im_name TYPE string,&lt;/P&gt;&lt;P&gt;set_time_since_last_meal&lt;/P&gt;&lt;P&gt;IMPORTING im_time TYPE i,&lt;/P&gt;&lt;P&gt;on_dog_is_hungry FOR EVENT dog_is_hungry OF lcl_dog&lt;/P&gt;&lt;P&gt;IMPORTING ex_time_since_last_meal.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CLASS lcl_dog IMPLEMENTATION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;CLASS lcl_dog IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;P&gt;WRITE: / 'I am a dog and my name is', im_name.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD set_time_since_last_meal.&lt;/P&gt;&lt;P&gt;IF im_time &amp;lt; 4.&lt;/P&gt;&lt;P&gt;SKIP 1.&lt;/P&gt;&lt;P&gt;WRITE: / 'You fool, I am not hungry yet'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Subsrcribe for event:&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;set handler &amp;lt;Event handler method&amp;gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FOR &amp;lt;ref_sender&amp;gt;!FOR ALL INSTANCES [ACTIVATION &amp;lt;var&amp;gt;]&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SET HANDLER on_dog_is_hungry FOR ALL INSTANCES ACTIVATION 'X'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Raise event&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;RAISE EVENT dog_is_hungry&lt;/P&gt;&lt;P&gt;EXPORTING ex_time_since_last_meal = im_time.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD on_dog_is_hungry.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Event method, called when the event dog_is_hungry is raised&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SKIP 1.&lt;/P&gt;&lt;P&gt;WRITE: / 'You son of a ****. I have not eaten for more than',&lt;/P&gt;&lt;P&gt;ex_time_since_last_meal, ' hours'.&lt;/P&gt;&lt;P&gt;WRITE: / 'Give me something to eat NOW!'.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;R E P O R T&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;DATA: o_dog1 TYPE REF TO lcl_dog.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;CREATE OBJECT o_dog1 EXPORTING im_name = 'Beefeater'.&lt;/P&gt;&lt;P&gt;CALL METHOD o_dog1-&amp;gt;set_time_since_last_meal&lt;/P&gt;&lt;P&gt;EXPORTING im_time = 2.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This method call will raise the event dog_is_hungy&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;because time &amp;gt; 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD o_dog1-&amp;gt;set_time_since_last_meal&lt;/P&gt;&lt;P&gt;EXPORTING im_time = 5.&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;I am a dog and my name is Beefeater&lt;/P&gt;&lt;P&gt;You fool, I am not hungry yet&lt;/P&gt;&lt;P&gt;You son of a ****. I have not eaten for more than 5 hours&lt;/P&gt;&lt;P&gt;Give me something to eat NOW&lt;/P&gt;&lt;P&gt;This example is a step by step example, moving from a simple clas to more sophisticated classes, and covers inheritance, interfaces and events. &lt;/P&gt;&lt;P&gt;Simple class | Inheritance and ploymorphism | Interfaces | Events &lt;/P&gt;&lt;P&gt;1. Simple class&lt;/P&gt;&lt;P&gt;This example shows how to create a simple employee class. The constructor method is used to initialize number and name of thje employee when the object is created. A display_employee method can be called to show the attributes of the employee, and CLASS-METHOD dosplay_no_of_employees can be called to show the total number of employees (Number of instances of the employee class).&lt;/P&gt;&lt;P&gt;REPORT zbc404_hf_events_1.&lt;/P&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;L C L _ E M P L O Y E E&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;P&gt;*---- LCL Employee - Definition&lt;/P&gt;&lt;P&gt;CLASS lcl_employee DEFINITION.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The public section is accesible from outside &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------" /&gt;&lt;P&gt;TYPES:&lt;/P&gt;&lt;P&gt;BEGIN OF t_employee,&lt;/P&gt;&lt;P&gt;no TYPE i,&lt;/P&gt;&lt;P&gt;name TYPE string,&lt;/P&gt;&lt;P&gt;END OF t_employee.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;constructor&lt;/P&gt;&lt;P&gt;IMPORTING im_employee_no TYPE i&lt;/P&gt;&lt;P&gt;im_employee_name TYPE string,&lt;/P&gt;&lt;P&gt;display_employee.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Class methods are global for all instances &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLASS-METHODS: display_no_of_employees.&lt;/P&gt;&lt;P&gt;PROTECTED SECTION.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The protecetd section is accesible from the class and its subclasses &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Class data are global for all instances &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLASS-DATA: g_no_of_employees TYPE i.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The private section is only accesible from within the classs &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;DATA: g_employee TYPE t_employee.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- LCL Employee - Implementation&lt;/P&gt;&lt;P&gt;CLASS lcl_employee IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;P&gt;g_employee-no = im_employee_no.&lt;/P&gt;&lt;P&gt;g_employee-name = im_employee_name.&lt;/P&gt;&lt;P&gt;g_no_of_employees = g_no_of_employees + 1.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD display_employee.&lt;/P&gt;&lt;P&gt;WRITE:/ 'Employee', g_employee-no, g_employee-name.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD display_no_of_employees.&lt;/P&gt;&lt;P&gt;WRITE: / 'Number of employees is:', g_no_of_employees.&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;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;R E P O R T&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;P&gt;DATA: g_employee1 TYPE REF TO lcl_employee,&lt;/P&gt;&lt;P&gt;g_employee2 TYPE REF TO lcl_employee.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;CREATE OBJECT g_employee1&lt;/P&gt;&lt;P&gt;EXPORTING im_employee_no = 1&lt;/P&gt;&lt;P&gt;im_employee_name = 'John Jones'.&lt;/P&gt;&lt;P&gt;CREATE OBJECT g_employee2&lt;/P&gt;&lt;P&gt;EXPORTING im_employee_no = 2&lt;/P&gt;&lt;P&gt;im_employee_name = 'Sally Summer'.&lt;/P&gt;&lt;P&gt;CALL METHOD g_employee1-&amp;gt;display_employee.&lt;/P&gt;&lt;P&gt;CALL METHOD g_employee2-&amp;gt;display_employee.&lt;/P&gt;&lt;P&gt;CALL METHOD g_employee2-&amp;gt;display_no_of_employees.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Inheritance and polymorphism&lt;/P&gt;&lt;P&gt;This example uses a superclass lcl_company_employees and two subclasses lcl_bluecollar_employee and lcl_whitecollar_employee to add employees to a list and then display a list of employees and there wages. The wages are calcukated in the method add_employee, but as the wages are calculated differently for blue collar employees and white collar emplyees, the superclass method add_employee is redeifined in the subclasses.&lt;/P&gt;&lt;P&gt;Principles:&lt;/P&gt;&lt;P&gt;Create super class LCL_CompanyEmployees.&lt;/P&gt;&lt;P&gt;The class has the methods:&lt;/P&gt;&lt;P&gt;&amp;#149; Constructor &lt;/P&gt;&lt;P&gt;&amp;#149; Add_Employee - Adds a new employee to the list of employees &lt;/P&gt;&lt;P&gt;&amp;#149; Display_Employee_List - Displays all employees and there wage &lt;/P&gt;&lt;P&gt;&amp;#149; Display_no_of_employees - Displays total number of employees&lt;/P&gt;&lt;P&gt;Note the use of CLASS-DATA to keep the list of employees and number of employees the same from instance to instance.&lt;/P&gt;&lt;P&gt;Create subclasses lcl_bluecollar_employee and lcl_whitecollar_employee. The calsses are identical, except for the redifinition of the add_employee method, where the caclculation of wage is different.&lt;/P&gt;&lt;P&gt;Methodes:&lt;/P&gt;&lt;P&gt;&amp;#149; Constructor. The constructor is used to initialize the attributes of the employee. Note that the constructor in the supclasss has to be called from within the constructor of the subclass. &lt;/P&gt;&lt;P&gt;&amp;#149; Add_Employee. This is a redinition of the same method in the superclass. In the redefined class the wage is calcuated, and the superclass method is called to add the employees to the emploee list.:&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;The program&lt;/P&gt;&lt;P&gt;REPORT zbc404_hf_events_2 .&lt;/P&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Super class LCL_CompanyEmployees&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;CLASS lcl_company_employees DEFINITION.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;TYPES:&lt;/P&gt;&lt;P&gt;BEGIN OF t_employee,&lt;/P&gt;&lt;P&gt;no TYPE i,&lt;/P&gt;&lt;P&gt;name TYPE string,&lt;/P&gt;&lt;P&gt;wage TYPE i,&lt;/P&gt;&lt;P&gt;END OF t_employee.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;constructor,&lt;/P&gt;&lt;P&gt;add_employee&lt;/P&gt;&lt;P&gt;IMPORTING im_no TYPE i&lt;/P&gt;&lt;P&gt;im_name TYPE string&lt;/P&gt;&lt;P&gt;im_wage TYPE i,&lt;/P&gt;&lt;P&gt;display_employee_list,&lt;/P&gt;&lt;P&gt;display_no_of_employees.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;CLASS-DATA: i_employee_list TYPE TABLE OF t_employee,&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 LCL_CompanyEmployees IMPLEMENTATION&lt;/P&gt;&lt;P&gt;CLASS lcl_company_employees IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;P&gt;no_of_employees = no_of_employees + 1.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD add_employee.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Adds a new employee to the list of employees&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: l_employee TYPE t_employee.&lt;/P&gt;&lt;P&gt;l_employee-no = im_no.&lt;/P&gt;&lt;P&gt;l_employee-name = im_name.&lt;/P&gt;&lt;P&gt;l_employee-wage = im_wage.&lt;/P&gt;&lt;P&gt;APPEND l_employee TO i_employee_list.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD display_employee_list.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Displays all employees and there wage&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: l_employee TYPE t_employee.&lt;/P&gt;&lt;P&gt;WRITE: / 'List of Employees'.&lt;/P&gt;&lt;P&gt;LOOP AT i_employee_list INTO l_employee.&lt;/P&gt;&lt;P&gt;WRITE: / l_employee-no, l_employee-name, l_employee-wage.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD display_no_of_employees.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Displays total number of employees&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SKIP 3.&lt;/P&gt;&lt;P&gt;WRITE: / 'Total number of employees:', no_of_employees.&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sub class LCL_BlueCollar_Employee&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;CLASS lcl_bluecollar_employee DEFINITION&lt;/P&gt;&lt;P&gt;INHERITING FROM lcl_company_employees.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;constructor&lt;/P&gt;&lt;P&gt;IMPORTING im_no TYPE i&lt;/P&gt;&lt;P&gt;im_name TYPE string&lt;/P&gt;&lt;P&gt;im_hours TYPE i&lt;/P&gt;&lt;P&gt;im_hourly_payment TYPE i,&lt;/P&gt;&lt;P&gt;add_employee REDEFINITION.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;DATA:no TYPE i,&lt;/P&gt;&lt;P&gt;name TYPE string,&lt;/P&gt;&lt;P&gt;hours TYPE i,&lt;/P&gt;&lt;P&gt;hourly_payment TYPE i.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---- CLASS LCL_BlueCollar_Employee IMPLEMENTATION&lt;/P&gt;&lt;P&gt;CLASS lcl_bluecollar_employee IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The superclass constructor method must be called from the subclass&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;constructor method&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD super-&amp;gt;constructor.&lt;/P&gt;&lt;P&gt;no = im_no.&lt;/P&gt;&lt;P&gt;name = im_name.&lt;/P&gt;&lt;P&gt;hours = im_hours.&lt;/P&gt;&lt;P&gt;hourly_payment = im_hourly_payment.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD add_employee.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Calculate wage an call the superclass method add_employee to add&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;the employee to the employee list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: l_wage TYPE i.&lt;/P&gt;&lt;P&gt;l_wage = hours * hourly_payment.&lt;/P&gt;&lt;P&gt;CALL METHOD super-&amp;gt;add_employee&lt;/P&gt;&lt;P&gt;EXPORTING im_no = no&lt;/P&gt;&lt;P&gt;im_name = name&lt;/P&gt;&lt;P&gt;im_wage = l_wage.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sub class LCL_WhiteCollar_Employee&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;CLASS lcl_whitecollar_employee DEFINITION&lt;/P&gt;&lt;P&gt;INHERITING FROM lcl_company_employees.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;constructor&lt;/P&gt;&lt;P&gt;IMPORTING im_no TYPE i&lt;/P&gt;&lt;P&gt;im_name TYPE string&lt;/P&gt;&lt;P&gt;im_monthly_salary TYPE i&lt;/P&gt;&lt;P&gt;im_monthly_deducations TYPE i,&lt;/P&gt;&lt;P&gt;add_employee REDEFINITION.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;no TYPE i,&lt;/P&gt;&lt;P&gt;name TYPE string,&lt;/P&gt;&lt;P&gt;monthly_salary TYPE i,&lt;/P&gt;&lt;P&gt;monthly_deducations TYPE i.&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;*---- CLASS LCL_WhiteCollar_Employee IMPLEMENTATION&lt;/P&gt;&lt;P&gt;CLASS lcl_whitecollar_employee IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The superclass constructor method must be called from the subclass&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;constructor method&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD super-&amp;gt;constructor.&lt;/P&gt;&lt;P&gt;no = im_no.&lt;/P&gt;&lt;P&gt;name = im_name.&lt;/P&gt;&lt;P&gt;monthly_salary = im_monthly_salary.&lt;/P&gt;&lt;P&gt;monthly_deducations = im_monthly_deducations.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD add_employee.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Calculate wage an call the superclass method add_employee to add&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;the employee to the employee list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: l_wage TYPE i.&lt;/P&gt;&lt;P&gt;l_wage = monthly_salary - monthly_deducations.&lt;/P&gt;&lt;P&gt;CALL METHOD super-&amp;gt;add_employee&lt;/P&gt;&lt;P&gt;EXPORTING im_no = no&lt;/P&gt;&lt;P&gt;im_name = name&lt;/P&gt;&lt;P&gt;im_wage = l_wage.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;R E P O R T&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Object references&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;o_bluecollar_employee1 TYPE REF TO lcl_bluecollar_employee,&lt;/P&gt;&lt;P&gt;o_whitecollar_employee1 TYPE REF TO lcl_whitecollar_employee.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create bluecollar employee obeject&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE OBJECT o_bluecollar_employee1&lt;/P&gt;&lt;P&gt;EXPORTING im_no = 1&lt;/P&gt;&lt;P&gt;im_name = 'Gylle Karen'&lt;/P&gt;&lt;P&gt;im_hours = 38&lt;/P&gt;&lt;P&gt;im_hourly_payment = 75.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add bluecollar employee to employee list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD o_bluecollar_employee1-&amp;gt;add_employee&lt;/P&gt;&lt;P&gt;EXPORTING im_no = 1&lt;/P&gt;&lt;P&gt;im_name = 'Gylle Karen'&lt;/P&gt;&lt;P&gt;im_wage = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create whitecollar employee obeject&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE OBJECT o_whitecollar_employee1&lt;/P&gt;&lt;P&gt;EXPORTING im_no = 2&lt;/P&gt;&lt;P&gt;im_name = 'John Dickens'&lt;/P&gt;&lt;P&gt;im_monthly_salary = 10000&lt;/P&gt;&lt;P&gt;im_monthly_deducations = 2500.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add bluecollar employee to employee list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD o_whitecollar_employee1-&amp;gt;add_employee&lt;/P&gt;&lt;P&gt;EXPORTING im_no = 1&lt;/P&gt;&lt;P&gt;im_name = 'Karen Johnson'&lt;/P&gt;&lt;P&gt;im_wage = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display employee list and number of employees. Note that the result&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;will be the same when called from o_whitecollar_employee1 or&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;o_bluecolarcollar_employee1, because the methods are defined&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;as static (CLASS-METHODS)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD o_whitecollar_employee1-&amp;gt;display_employee_list.&lt;/P&gt;&lt;P&gt;CALL METHOD o_whitecollar_employee1-&amp;gt;display_no_of_employees.&lt;/P&gt;&lt;P&gt;The resulting report&lt;/P&gt;&lt;P&gt;List of Employees&lt;/P&gt;&lt;P&gt;1 Karen Johnson 2.850&lt;/P&gt;&lt;P&gt;2 John Dickens 7.500&lt;/P&gt;&lt;P&gt;Total number of employees: 2&lt;/P&gt;&lt;P&gt;3. Interfaces&lt;/P&gt;&lt;P&gt;This example is similiar to th eprevious example, however an interface is implemented with the method add_employee. Note that the interface is only implemented in the superclass ( The INTERFACE stament), but also used in the subclasses.&lt;/P&gt;&lt;P&gt;The interface in the example only contains a method, but an iterface can also contain attrbutes, constants, types and alias names.&lt;/P&gt;&lt;P&gt;The output from example 3 is similiar to the output in example 2.&lt;/P&gt;&lt;P&gt;All changes in the program compared to example 2 are marked with red.&lt;/P&gt;&lt;P&gt;REPORT zbc404_hf_events_3 .&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INTERFACE lif_employee&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;INTERFACE lif_employee.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;add_employee&lt;/P&gt;&lt;P&gt;IMPORTING im_no TYPE i&lt;/P&gt;&lt;P&gt;im_name TYPE string&lt;/P&gt;&lt;P&gt;im_wage TYPE i.&lt;/P&gt;&lt;P&gt;ENDINTERFACE.&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;Super class LCL_CompanyEmployees&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;CLASS lcl_company_employees DEFINITION.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;INTERFACES lif_employee.&lt;/P&gt;&lt;P&gt;TYPES:&lt;/P&gt;&lt;P&gt;BEGIN OF t_employee,&lt;/P&gt;&lt;P&gt;no TYPE i,&lt;/P&gt;&lt;P&gt;name TYPE string,&lt;/P&gt;&lt;P&gt;wage TYPE i,&lt;/P&gt;&lt;P&gt;END OF t_employee.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;constructor,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;add_employee "Removed&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IMPORTING im_no TYPE i&lt;/P&gt;&lt;P&gt;im_name TYPE string&lt;/P&gt;&lt;P&gt;im_wage TYPE i,&lt;/P&gt;&lt;P&gt;display_employee_list,&lt;/P&gt;&lt;P&gt;display_no_of_employees.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;CLASS-DATA: i_employee_list TYPE TABLE OF t_employee,&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 LCL_CompanyEmployees IMPLEMENTATION&lt;/P&gt;&lt;P&gt;CLASS lcl_company_employees IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;P&gt;no_of_employees = no_of_employees + 1.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD lif_employee~add_employee.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Adds a new employee to the list of employees&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: l_employee TYPE t_employee.&lt;/P&gt;&lt;P&gt;l_employee-no = im_no.&lt;/P&gt;&lt;P&gt;l_employee-name = im_name.&lt;/P&gt;&lt;P&gt;l_employee-wage = im_wage.&lt;/P&gt;&lt;P&gt;APPEND l_employee TO i_employee_list.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD display_employee_list.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Displays all employees and there wage&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: l_employee TYPE t_employee.&lt;/P&gt;&lt;P&gt;WRITE: / 'List of Employees'.&lt;/P&gt;&lt;P&gt;LOOP AT i_employee_list INTO l_employee.&lt;/P&gt;&lt;P&gt;WRITE: / l_employee-no, l_employee-name, l_employee-wage.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD display_no_of_employees.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Displays total number of employees&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SKIP 3.&lt;/P&gt;&lt;P&gt;WRITE: / 'Total number of employees:', no_of_employees.&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;*******************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sub class LCL_BlueCollar_Employee&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;CLASS lcl_bluecollar_employee DEFINITION&lt;/P&gt;&lt;P&gt;INHERITING FROM lcl_company_employees.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;constructor&lt;/P&gt;&lt;P&gt;IMPORTING im_no TYPE i&lt;/P&gt;&lt;P&gt;im_name TYPE string&lt;/P&gt;&lt;P&gt;im_hours TYPE i&lt;/P&gt;&lt;P&gt;im_hourly_payment TYPE i,&lt;/P&gt;&lt;P&gt;lif_employee~add_employee REDEFINITION..&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;DATA:no TYPE i,&lt;/P&gt;&lt;P&gt;name TYPE string,&lt;/P&gt;&lt;P&gt;hours TYPE i,&lt;/P&gt;&lt;P&gt;hourly_payment TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;*---- CLASS LCL_BlueCollar_Employee IMPLEMENTATION&lt;/P&gt;&lt;P&gt;CLASS lcl_bluecollar_employee IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The superclass constructor method must be called from the subclass&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;constructor method&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD super-&amp;gt;constructor.&lt;/P&gt;&lt;P&gt;no = im_no.&lt;/P&gt;&lt;P&gt;name = im_name.&lt;/P&gt;&lt;P&gt;hours = im_hours.&lt;/P&gt;&lt;P&gt;hourly_payment = im_hourly_payment.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD lif_employee~add_employee.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Calculate wage an call the superclass method add_employee to add&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;the employee to the employee list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: l_wage TYPE i.&lt;/P&gt;&lt;P&gt;l_wage = hours * hourly_payment.&lt;/P&gt;&lt;P&gt;CALL METHOD super-&amp;gt;lif_employee~add_employee&lt;/P&gt;&lt;P&gt;EXPORTING im_no = no&lt;/P&gt;&lt;P&gt;im_name = name&lt;/P&gt;&lt;P&gt;im_wage = l_wage.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sub class LCL_WhiteCollar_Employee&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;CLASS lcl_whitecollar_employee DEFINITION&lt;/P&gt;&lt;P&gt;INHERITING FROM lcl_company_employees.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;constructor&lt;/P&gt;&lt;P&gt;IMPORTING im_no TYPE i&lt;/P&gt;&lt;P&gt;im_name TYPE string&lt;/P&gt;&lt;P&gt;im_monthly_salary TYPE i&lt;/P&gt;&lt;P&gt;im_monthly_deducations TYPE i,&lt;/P&gt;&lt;P&gt;lif_employee~add_employee REDEFINITION.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;no TYPE i,&lt;/P&gt;&lt;P&gt;name TYPE string,&lt;/P&gt;&lt;P&gt;monthly_salary TYPE i,&lt;/P&gt;&lt;P&gt;monthly_deducations TYPE i.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;*---- CLASS LCL_WhiteCollar_Employee IMPLEMENTATION&lt;/P&gt;&lt;P&gt;CLASS lcl_whitecollar_employee IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The superclass constructor method must be called from the subclass&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;constructor method&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD super-&amp;gt;constructor.&lt;/P&gt;&lt;P&gt;no = im_no.&lt;/P&gt;&lt;P&gt;name = im_name.&lt;/P&gt;&lt;P&gt;monthly_salary = im_monthly_salary.&lt;/P&gt;&lt;P&gt;monthly_deducations = im_monthly_deducations.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD lif_employee~add_employee.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Calculate wage an call the superclass method add_employee to add&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;the employee to the employee list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: l_wage TYPE i.&lt;/P&gt;&lt;P&gt;l_wage = monthly_salary - monthly_deducations.&lt;/P&gt;&lt;P&gt;CALL METHOD super-&amp;gt;lif_employee~add_employee&lt;/P&gt;&lt;P&gt;EXPORTING im_no = no&lt;/P&gt;&lt;P&gt;im_name = name&lt;/P&gt;&lt;P&gt;im_wage = l_wage.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;R E P O R T&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Object references&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;o_bluecollar_employee1 TYPE REF TO lcl_bluecollar_employee,&lt;/P&gt;&lt;P&gt;o_whitecollar_employee1 TYPE REF TO lcl_whitecollar_employee.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create bluecollar employee obeject&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE OBJECT o_bluecollar_employee1&lt;/P&gt;&lt;P&gt;EXPORTING im_no = 1&lt;/P&gt;&lt;P&gt;im_name = 'Gylle Karen'&lt;/P&gt;&lt;P&gt;im_hours = 38&lt;/P&gt;&lt;P&gt;im_hourly_payment = 75.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add bluecollar employee to employee list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD o_bluecollar_employee1-&amp;gt;lif_employee~add_employee&lt;/P&gt;&lt;P&gt;EXPORTING im_no = 1&lt;/P&gt;&lt;P&gt;im_name = 'Karen Johnson'&lt;/P&gt;&lt;P&gt;im_wage = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create whitecollar employee obeject&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE OBJECT o_whitecollar_employee1&lt;/P&gt;&lt;P&gt;EXPORTING im_no = 2&lt;/P&gt;&lt;P&gt;im_name = 'John Dickens'&lt;/P&gt;&lt;P&gt;im_monthly_salary = 10000&lt;/P&gt;&lt;P&gt;im_monthly_deducations = 2500.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add bluecollar employee to employee list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD o_whitecollar_employee1-&amp;gt;lif_employee~add_employee&lt;/P&gt;&lt;P&gt;EXPORTING im_no = 1&lt;/P&gt;&lt;P&gt;im_name = 'Gylle Karen'&lt;/P&gt;&lt;P&gt;im_wage = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display employee list and number of employees. Note that the result&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;will be the same when called from o_whitecollar_employee1 or&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;o_bluecolarcollar_employee1, because the methods are defined&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;as static (CLASS-METHODS)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD o_whitecollar_employee1-&amp;gt;display_employee_list.&lt;/P&gt;&lt;P&gt;CALL METHOD o_whitecollar_employee1-&amp;gt;display_no_of_employees.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Events&lt;/P&gt;&lt;P&gt;This is the same example as example 4. All changes are marked with red. There have been no canges to the subclasses, only to the superclass and the report, sp the code for th esubclasses is not shown.&lt;/P&gt;&lt;P&gt;For a simple example refer to Events in Examples.&lt;/P&gt;&lt;P&gt;REPORT zbc404_hf_events_4 .&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INTERFACE lif_employee&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;INTERFACE lif_employee.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;add_employee&lt;/P&gt;&lt;P&gt;IMPORTING im_no TYPE i&lt;/P&gt;&lt;P&gt;im_name TYPE string&lt;/P&gt;&lt;P&gt;im_wage TYPE i.&lt;/P&gt;&lt;P&gt;ENDINTERFACE.&lt;/P&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Super class LCL_CompanyEmployees&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;CLASS lcl_company_employees DEFINITION.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;TYPES:&lt;/P&gt;&lt;P&gt;BEGIN OF t_employee,&lt;/P&gt;&lt;P&gt;no TYPE i,&lt;/P&gt;&lt;P&gt;name TYPE string,&lt;/P&gt;&lt;P&gt;wage TYPE i,&lt;/P&gt;&lt;P&gt;END OF t_employee.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declare event. Note that declaration could also be placed in the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;interface&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EVENTS: employee_added_to_list&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING value(ex_employee_name) TYPE string.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CLASS-EVENTS: Events can also be defined as class-events&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;INTERFACES lif_employee.&lt;/P&gt;&lt;P&gt;METHODS:&lt;/P&gt;&lt;P&gt;constructor,&lt;/P&gt;&lt;P&gt;display_employee_list,&lt;/P&gt;&lt;P&gt;display_no_of_employees,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Declare event method&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;on_employee_added_to_list FOR EVENT employee_added_to_list OF lcl_company_employees&lt;/P&gt;&lt;P&gt;IMPORTING ex_employee_name sender.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;CLASS-DATA:&lt;/P&gt;&lt;P&gt;i_employee_list TYPE TABLE OF t_employee,&lt;/P&gt;&lt;P&gt;no_of_employees TYPE i.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;*-- CLASS LCL_CompanyEmployees IMPLEMENTATION&lt;/P&gt;&lt;P&gt;CLASS lcl_company_employees IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD constructor.&lt;/P&gt;&lt;P&gt;no_of_employees = no_of_employees + 1.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD lif_employee~add_employee.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Adds a new employee to the list of employees&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: l_employee TYPE t_employee.&lt;/P&gt;&lt;P&gt;l_employee-no = im_no.&lt;/P&gt;&lt;P&gt;l_employee-name = im_name.&lt;/P&gt;&lt;P&gt;l_employee-wage = im_wage.&lt;/P&gt;&lt;P&gt;APPEND l_employee TO i_employee_list.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Raise event employee_added_to_list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;RAISE EVENT employee_added_to_list&lt;/P&gt;&lt;P&gt;EXPORTING ex_employee_name = l_employee-name.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD display_employee_list.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Displays all employees and there wage&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: l_employee TYPE t_employee.&lt;/P&gt;&lt;P&gt;WRITE: / 'List of Employees'.&lt;/P&gt;&lt;P&gt;LOOP AT i_employee_list INTO l_employee.&lt;/P&gt;&lt;P&gt;WRITE: / l_employee-no, l_employee-name, l_employee-wage.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD display_no_of_employees.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Displays total number of employees&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SKIP 3.&lt;/P&gt;&lt;P&gt;WRITE: / 'Total number of employees:', no_of_employees.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD on_employee_added_to_list.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Event method&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;WRITE: / 'Employee added to list', ex_employee_name.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sub class LCL_BlueCollar_Employee&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;CLASS lcl_bluecollar_employee DEFINITION&lt;/P&gt;&lt;P&gt;INHERITING FROM lcl_company_employees.&lt;/P&gt;&lt;P&gt;See code in example 3...&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;CLASS lcl_bluecollar_employee IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;See code in example 3...&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sub class LCL_WhiteCollar_Employee&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;CLASS lcl_whitecollar_employee DEFINITION&lt;/P&gt;&lt;P&gt;See code in example 3...&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;CLASS lcl_whitecollar_employee IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;See code in example 3...&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;R E P O R T&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*******************************************************&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Object references&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;o_bluecollar_employee1 TYPE REF TO lcl_bluecollar_employee,&lt;/P&gt;&lt;P&gt;o_whitecollar_employee1 TYPE REF TO lcl_whitecollar_employee.&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create bluecollar employee obeject&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE OBJECT o_bluecollar_employee1&lt;/P&gt;&lt;P&gt;EXPORTING im_no = 1&lt;/P&gt;&lt;P&gt;im_name = 'Karen Johnson'&lt;/P&gt;&lt;P&gt;im_hours = 38&lt;/P&gt;&lt;P&gt;im_hourly_payment = 75.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Register event for o_bluecollar_employee1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SET HANDLER o_bluecollar_employee1-&amp;gt;on_employee_added_to_list&lt;/P&gt;&lt;P&gt;FOR o_bluecollar_employee1.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Add bluecollar employee to employee list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD o_bluecollar_employee1-&amp;gt;lif_employee~add_employee&lt;/P&gt;&lt;P&gt;EXPORTING im_no = 1&lt;/P&gt;&lt;P&gt;im_name = 'Gylle Karen'&lt;/P&gt;&lt;P&gt;im_wage = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create whitecollar employee obeject&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CREATE OBJECT o_whitecollar_employee1&lt;/P&gt;&lt;P&gt;EXPORTING im_no = 2&lt;/P&gt;&lt;P&gt;im_name = 'John Dickens'&lt;/P&gt;&lt;P&gt;im_monthly_salary = 10000&lt;/P&gt;&lt;P&gt;im_monthly_deducations = 2500.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Register event for o_whitecollar_employee1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SET HANDLER o_whitecollar_employee1-&amp;gt;on_employee_added_to_list&lt;/P&gt;&lt;P&gt;FOR o_whitecollar_employee1.´&lt;/P&gt;&lt;P&gt;&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;Add bluecollar employee to employee list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL METHOD o_whitecollar_employee1-&amp;gt;lif_employee~add_employee&lt;/P&gt;&lt;P&gt;EXPORTING im_no = 1&lt;/P&gt;&lt;P&gt;im_name = 'Gylle Karen'&lt;/P&gt;&lt;P&gt;im_wage = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Display employee list and number of employees. Note that the result&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;will be the same when called from o_whitecollar_employee1 or&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;o_bluecolarcollar_employee1, because the methods are defined&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;as static (CLASS-METHODS)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD o_whitecollar_employee1-&amp;gt;display_employee_list.&lt;/P&gt;&lt;P&gt;CALL METHOD o_whitecollar_employee1-&amp;gt;display_no_of_employees.&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;Employee added to list Karen Johnson&lt;/P&gt;&lt;P&gt;Employee added to list John Dickens&lt;/P&gt;&lt;P&gt;List of Employees&lt;/P&gt;&lt;P&gt;1 Karen Johnson 2.850&lt;/P&gt;&lt;P&gt;2 John Dickens 7.500&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total number of employees: 2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check these links for clear view on oops concept&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the below links lot of info and examples r there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.geocities.com/victorav15/sapr3/abap_ood.html" target="test_blank"&gt;http://www.geocities.com/victorav15/sapr3/abap_ood.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.brabandt.de/html/abap_oo.html" target="test_blank"&gt;http://www.brabandt.de/html/abap_oo.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this cool weblog:&lt;/P&gt;&lt;P&gt;/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql&lt;/P&gt;&lt;P&gt;/people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm&lt;/A&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;A href="http://www.sapgenie.com/abap/OO/" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt" target="test_blank"&gt;http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf" target="test_blank"&gt;http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt" target="test_blank"&gt;http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.allsaplinks.com/" target="test_blank"&gt;http://www.allsaplinks.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/" target="test_blank"&gt;http://www.sap-img.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/" target="test_blank"&gt;http://www.sapgenie.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com" target="test_blank"&gt;http://help.sap.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/controls/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/controls/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf" target="test_blank"&gt;http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf" target="test_blank"&gt;http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/index.htm" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapgenie.com/abap/OO/" target="test_blank"&gt;http://www.sapgenie.com/abap/OO/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;these links &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For funtion module to class&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for classes&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for methods&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for inheritance&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for interfaces&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm&lt;/A&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;For Materials:&lt;/P&gt;&lt;P&gt;1) &lt;A href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf" target="test_blank"&gt;http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf&lt;/A&gt; -- Page no: 1291&lt;/P&gt;&lt;P&gt;2) &lt;A href="http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt" target="test_blank"&gt;http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;3) &lt;A href="http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf" target="test_blank"&gt;http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;4) &lt;A href="http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf" target="test_blank"&gt;http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;5) &lt;A href="http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt" target="test_blank"&gt;http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;6) &lt;A href="http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf" target="test_blank"&gt;http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;7) &lt;A href="http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt" target="test_blank"&gt;http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; &lt;A href="http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8" target="test_blank"&gt;http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) &lt;A href="http://www.erpgenie.com/sap/abap/OO/index.htm" target="test_blank"&gt;http://www.erpgenie.com/sap/abap/OO/index.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2) &lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpfull answers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Pavan praveen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jul 2007 05:22:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496139#M563700</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-07T05:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP OBJECTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496140#M563701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi srinath,&lt;/P&gt;&lt;P&gt;     This code will help you to access database values form EKPO table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: EKPO.&lt;/P&gt;&lt;P&gt;Data: Itab like ekpo occurs 0 with header line.&lt;/P&gt;&lt;P&gt;SELECT * FROM EKPO INTO TABLE ITAB.&lt;/P&gt;&lt;P&gt;LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;WRITE: /10 ITAB-MATNR.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF USEFULL REWARD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jul 2007 05:48:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496140#M563701</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-07T05:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP OBJECTS</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496141#M563702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THANKS  PAVAN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REGRADS&lt;/P&gt;&lt;P&gt;SRINATH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jul 2007 07:31:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-objects/m-p/2496141#M563702</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-07T07:31:29Z</dc:date>
    </item>
  </channel>
</rss>

