<?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 Interfaces concept ...Urgent? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/interfaces-concept-urgent/m-p/2820846#M659753</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As we all know multiple inheritance cannot be achieved in ABAP classes, so we need to take INTERFACES approach, I am trying to do from the below mentioned code.&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;            INTERFACE Stu_course&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;INTERFACE stu_course.&lt;/P&gt;&lt;P&gt;  DATA : course_id.&lt;/P&gt;&lt;P&gt;  METHODS: max_student,&lt;/P&gt;&lt;P&gt;           add_student,&lt;/P&gt;&lt;P&gt;           drop_student.&lt;/P&gt;&lt;P&gt;ENDINTERFACE.&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;          Class cl_course&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;CLASS cl_course DEFINITION ABSTRACT.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;  INTERFACES stu_course.&lt;/P&gt;&lt;P&gt;  PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;  DATA : count TYPE i.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS cl_course IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD stu_course~add_student.&lt;/P&gt;&lt;P&gt;    WRITE: / 'Student added'.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD stu_course~drop_student.&lt;/P&gt;&lt;P&gt;    WRITE: / 'Student Dropped'.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD stu_course~max_student.&lt;/P&gt;&lt;P&gt;    count = count + 1.&lt;/P&gt;&lt;P&gt;    IF count GT 10.&lt;/P&gt;&lt;P&gt;    write: / 'maximum number of student reached'.&lt;/P&gt;&lt;P&gt;    ENDIF.&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;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;            Class cl_student&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;CLASS cl_student DEFINITION. "INHERITING FROM cl_university_member.(currently not mentioned)&lt;/P&gt;&lt;P&gt;   PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;   DATA : student_id type i.&lt;/P&gt;&lt;P&gt;   INTERFACES stu_course.&lt;/P&gt;&lt;P&gt;     METHODS:register_course&lt;/P&gt;&lt;P&gt;              IMPORTING course TYPE REF TO cl_course,&lt;/P&gt;&lt;P&gt;            withdraw_course&lt;/P&gt;&lt;P&gt;              IMPORTING course TYPE REF TO cl_course.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS cl_student IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; METHOD register_course.&lt;/P&gt;&lt;P&gt;"Here i want to call the definition of method "add_student" of class cl_course without inheritance, so that i can achieve multiple inheritance."&lt;/P&gt;&lt;P&gt; ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Class cl_student wants to inherit the definition of methods like             add_student,drop_student from class cl_course.Is this posible n how?&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks n Regards &lt;/P&gt;&lt;P&gt;Rohit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Oct 2007 14:26:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-05T14:26:10Z</dc:date>
    <item>
      <title>Interfaces concept ...Urgent?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interfaces-concept-urgent/m-p/2820846#M659753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As we all know multiple inheritance cannot be achieved in ABAP classes, so we need to take INTERFACES approach, I am trying to do from the below mentioned code.&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;            INTERFACE Stu_course&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;INTERFACE stu_course.&lt;/P&gt;&lt;P&gt;  DATA : course_id.&lt;/P&gt;&lt;P&gt;  METHODS: max_student,&lt;/P&gt;&lt;P&gt;           add_student,&lt;/P&gt;&lt;P&gt;           drop_student.&lt;/P&gt;&lt;P&gt;ENDINTERFACE.&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;          Class cl_course&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;CLASS cl_course DEFINITION ABSTRACT.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;  INTERFACES stu_course.&lt;/P&gt;&lt;P&gt;  PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;  DATA : count TYPE i.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS cl_course IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD stu_course~add_student.&lt;/P&gt;&lt;P&gt;    WRITE: / 'Student added'.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD stu_course~drop_student.&lt;/P&gt;&lt;P&gt;    WRITE: / 'Student Dropped'.&lt;/P&gt;&lt;P&gt;  ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  METHOD stu_course~max_student.&lt;/P&gt;&lt;P&gt;    count = count + 1.&lt;/P&gt;&lt;P&gt;    IF count GT 10.&lt;/P&gt;&lt;P&gt;    write: / 'maximum number of student reached'.&lt;/P&gt;&lt;P&gt;    ENDIF.&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;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;            Class cl_student&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;CLASS cl_student DEFINITION. "INHERITING FROM cl_university_member.(currently not mentioned)&lt;/P&gt;&lt;P&gt;   PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;   DATA : student_id type i.&lt;/P&gt;&lt;P&gt;   INTERFACES stu_course.&lt;/P&gt;&lt;P&gt;     METHODS:register_course&lt;/P&gt;&lt;P&gt;              IMPORTING course TYPE REF TO cl_course,&lt;/P&gt;&lt;P&gt;            withdraw_course&lt;/P&gt;&lt;P&gt;              IMPORTING course TYPE REF TO cl_course.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS cl_student IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; METHOD register_course.&lt;/P&gt;&lt;P&gt;"Here i want to call the definition of method "add_student" of class cl_course without inheritance, so that i can achieve multiple inheritance."&lt;/P&gt;&lt;P&gt; ENDMETHOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Class cl_student wants to inherit the definition of methods like             add_student,drop_student from class cl_course.Is this posible n how?&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks n Regards &lt;/P&gt;&lt;P&gt;Rohit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 14:26:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interfaces-concept-urgent/m-p/2820846#M659753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T14:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Interfaces concept ...Urgent?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interfaces-concept-urgent/m-p/2820847#M659754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi rohit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  see below details regarding Intefaces,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	Interface&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	Simple use of an interface&lt;/P&gt;&lt;P&gt;Theme	This program will show simple use of an interface with its own data and methods and how it is implemented in a class. It will also show that there can be methods of same name for an interface and the class implementing the interface.&lt;/P&gt;&lt;P&gt;Program Desc	This program contains an interface I1 with attribute : NUM an method : METH1.&lt;/P&gt;&lt;P&gt;This interface is implemented in a class : C1 which also has its own method METH1.&lt;/P&gt;&lt;P&gt;An object OREF is created from class C1 and both the methods METH1 , one for class and another for interface is called using the object.&lt;/P&gt;&lt;P&gt;Dump	&lt;/P&gt;&lt;P&gt;report ysubdel .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;interface i1.&lt;/P&gt;&lt;P&gt; data    : num type i .&lt;/P&gt;&lt;P&gt; methods : meth1.&lt;/P&gt;&lt;P&gt;endinterface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; class c1 definition.&lt;/P&gt;&lt;P&gt;  public section.&lt;/P&gt;&lt;P&gt;   methods : meth1.       &amp;#147; class C1&amp;#146;s own method&lt;/P&gt;&lt;P&gt;   interfaces : i1.&lt;/P&gt;&lt;P&gt; endclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; class c1 implementation.&lt;/P&gt;&lt;P&gt;  method : meth1.&lt;/P&gt;&lt;P&gt;   write:/5 'I am meth1 in c1'.&lt;/P&gt;&lt;P&gt;  endmethod.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  method i1~meth1.&lt;/P&gt;&lt;P&gt;   write:/5 'I am meth1 from i1'.&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; start-of-selection.&lt;/P&gt;&lt;P&gt;  data : oref type ref to c1.&lt;/P&gt;&lt;P&gt;  create object oref.&lt;/P&gt;&lt;P&gt;  write:/5 oref-&amp;gt;i1~num.&lt;/P&gt;&lt;P&gt;  call method oref-&amp;gt;meth1.&lt;/P&gt;&lt;P&gt;  call method oref-&amp;gt;i1~meth1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output	          0          &lt;/P&gt;&lt;P&gt; I am meth1 in c1    &lt;/P&gt;&lt;P&gt; I am meth1 from i1  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	Interfaces can only be implemented in the public section of a class&lt;/P&gt;&lt;P&gt;Theme	This program will show you that classes implementing an interface can only contain the features of the interface in its public section.&lt;/P&gt;&lt;P&gt;Program Description	In this program, class C1 is trying to accommodate interface I1 in its PRIVATE SECTION. &lt;/P&gt;&lt;P&gt;This creates a compilation error, establishing the theme.&lt;/P&gt;&lt;P&gt;Dump	report ysubdel .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;interface i1.&lt;/P&gt;&lt;P&gt; methods : meth1.&lt;/P&gt;&lt;P&gt;endinterface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; class c1 definition.&lt;/P&gt;&lt;P&gt;  protected section.&lt;/P&gt;&lt;P&gt;   interfaces : i1.&lt;/P&gt;&lt;P&gt; endclass.&lt;/P&gt;&lt;P&gt;Output	Compilation error with error message :-&lt;/P&gt;&lt;P&gt;INTERFACES may only be implemented in the public section.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;	A class with an interface should implement all the methods of that interface&lt;/P&gt;&lt;P&gt;Theme	This program will show that a class containing an interface should implement all the methods of the interface in its implementation section.&lt;/P&gt;&lt;P&gt;Program Descrip	Class C1 implements interface I1, which has got two methods , METH1 and METH2. But, in the IMPLEMENTATION section of class C1, only METH1 is implemented.&lt;/P&gt;&lt;P&gt;This program will create a compilation error, establishing the theme.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dump	&lt;/P&gt;&lt;P&gt;report ysubdel .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;interface i1.&lt;/P&gt;&lt;P&gt; methods : meth1 ,&lt;/P&gt;&lt;P&gt;           meth2 .&lt;/P&gt;&lt;P&gt;endinterface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; class c1 definition.&lt;/P&gt;&lt;P&gt;  public section.&lt;/P&gt;&lt;P&gt;   interfaces : i1.&lt;/P&gt;&lt;P&gt; endclass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; class c1 implementation.&lt;/P&gt;&lt;P&gt;  method i1~meth1.&lt;/P&gt;&lt;P&gt;   write:/5 'I am meth1 from i1'.&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; start-of-selection.&lt;/P&gt;&lt;P&gt;  data : oref type ref to c1.&lt;/P&gt;&lt;P&gt;   create object oref.&lt;/P&gt;&lt;P&gt;   call method oref-&amp;gt;i1~meth1.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output	Compilation error with error message :-&lt;/P&gt;&lt;P&gt;Implementation missing for method &amp;#147;I1~METH2&amp;#148;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if helpful please reward the points,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aruna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 15:07:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interfaces-concept-urgent/m-p/2820847#M659754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T15:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Interfaces concept ...Urgent?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interfaces-concept-urgent/m-p/2820848#M659755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Multiple inheritance as a concept is not allowed in ABAP Objects. But the effect and behaviour that you get by multiple inheritance is acheviable in ABAP objects with the help of interfaces. As follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An interface can inlcude more than one interface, that is an interface can extend more than one interface. Now if you have say interface1, interface2 and interface3.&lt;/P&gt;&lt;P&gt;interface4 can be declared to include all three other interfaces. And you class can include this interface4 in its interfaces tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Due to this your class gets the behviour(methods) that is defined in all ther interfaces. You can assign an object of this class to a reference of any one of these four interfaces. So one object can react to method calls on four different interfaces which is what you want to achevie in multiple inheritance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT demo_inheritance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS counter DEFINITION.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;METHODS: set IMPORTING value(set_value) TYPE i,&lt;/P&gt;&lt;P&gt;increment,&lt;/P&gt;&lt;P&gt;get EXPORTING value(get_value) TYPE i.&lt;/P&gt;&lt;P&gt;PROTECTED SECTION.&lt;/P&gt;&lt;P&gt;DATA count TYPE i.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS counter IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD set.&lt;/P&gt;&lt;P&gt;count = set_value.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD increment.&lt;/P&gt;&lt;P&gt;ADD 1 TO count.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;METHOD get.&lt;/P&gt;&lt;P&gt;get_value = count.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS counter_ten DEFINITION INHERITING FROM counter.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;METHODS increment REDEFINITION.&lt;/P&gt;&lt;P&gt;DATA count_ten(1) TYPE c.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS counter_ten IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD increment.&lt;/P&gt;&lt;P&gt;DATA modulo TYPE i.&lt;/P&gt;&lt;P&gt;CALL METHOD super-&amp;gt;increment.&lt;/P&gt;&lt;P&gt;WRITE / count.&lt;/P&gt;&lt;P&gt;modulo = count MOD 10.&lt;/P&gt;&lt;P&gt;IF modulo = 0.&lt;/P&gt;&lt;P&gt;count_ten = count_ten + 1.&lt;/P&gt;&lt;P&gt;WRITE count_ten.&lt;/P&gt;&lt;P&gt;ENDIF.&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;DATA: count TYPE REF TO counter,&lt;/P&gt;&lt;P&gt;number TYPE i VALUE 5.&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;CREATE OBJECT count TYPE counter_ten.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD count-&amp;gt;set EXPORTING set_value = number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 20 TIMES.&lt;/P&gt;&lt;P&gt;CALL METHOD count-&amp;gt;increment.&lt;/P&gt;&lt;P&gt;ENDDO. &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.intelligententerprise.com/channels/applications/feature/archive/keller.jhtml" target="test_blank"&gt;http://www.intelligententerprise.com/channels/applications/feature/archive/keller.jhtml&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_me21sp2/helpdata/en/c3/225b5c54f411d194a60000e8353423/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_me21sp2/helpdata/en/c3/225b5c54f411d194a60000e8353423/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="280783"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2633638"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give me reward points if it is useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Murali Poli&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Oct 2007 16:48:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interfaces-concept-urgent/m-p/2820848#M659755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-05T16:48:41Z</dc:date>
    </item>
  </channel>
</rss>

