<?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: call methods from different class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-methods-from-different-class/m-p/3692333#M889117</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai &lt;/P&gt;&lt;P&gt;   Rehaman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    it is possible to access the methods defined in one class by methods in another class by using inheritance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class my_class1  DEFINITION.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;  methods: m1.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;class my_class1 IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;  method: m1.&lt;/P&gt;&lt;P&gt;    write:/ 'This is m1 method'.&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 my_class2 DEFINITION INHERITING FROM my_class1.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;  methods: m2.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;class my_class2 IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;  method: m2.&lt;/P&gt;&lt;P&gt;write:/ 'This is from method m2'.&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: obj_ref2 type ref to my_classs2.&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;&lt;/P&gt;&lt;P&gt; create OBJECT obj_ref2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*To call method  m1 of my_class1.&lt;/P&gt;&lt;P&gt; call method  obj_ref2-&amp;gt;m1.&lt;/P&gt;&lt;P&gt;*To call method  m2 of my_class2.&lt;/P&gt;&lt;P&gt; call method  obj_ref2-&amp;gt;m2. &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 you,&lt;/P&gt;&lt;P&gt;Prasad G.V.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Apr 2008 15:21:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-12T15:21:10Z</dc:date>
    <item>
      <title>call methods from different class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-methods-from-different-class/m-p/3692329#M889113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;i have doubts regarding access of class method.&lt;/P&gt;&lt;P&gt;my scenario is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am having method called &lt;STRONG&gt;M1&lt;/STRONG&gt; which is in &lt;STRONG&gt;class A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i want 2 access that  method  &lt;STRONG&gt;M1&lt;/STRONG&gt; in &lt;STRONG&gt;Class B&lt;/STRONG&gt; which is different class..&lt;/P&gt;&lt;P&gt;how to do that... how to access????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want clear explanation with syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;points wil be rewarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2008 08:43:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-methods-from-different-class/m-p/3692329#M889113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-11T08:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: call methods from different class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-methods-from-different-class/m-p/3692330#M889114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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  ZOBJ11_ASHISH_A3                                            *&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;&lt;STRONG&gt;______________________________________________________________________&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Name: Ashish Paliwal&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Date: 29th February 2008.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;______________________________________________________________________&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report  zobj11_ashish_a3     no standard page heading message-id z11_ap.&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;      CLASS ORGANISATION_2006 DEFINITION&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;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class organisation_2006 definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  public section.&lt;/P&gt;&lt;P&gt;*instance methods declaration&lt;/P&gt;&lt;P&gt;    methods : org_name,&lt;/P&gt;&lt;P&gt;              org_address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endclass.                    "ORGANISATION_2006 DEFINITION&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;      CLASS ORGANISATION_2006 IMPLEMENTATION&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;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class organisation_2006 implementation.&lt;/P&gt;&lt;P&gt;*instance methods definition&lt;/P&gt;&lt;P&gt;  method org_name.&lt;/P&gt;&lt;P&gt;    write:/5 text-001.&lt;/P&gt;&lt;P&gt;  endmethod.                    "org_name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  method org_address.&lt;/P&gt;&lt;P&gt;    write:/5 text-002.&lt;/P&gt;&lt;P&gt;  endmethod.                    "org_address&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endclass.                    "ORGANISATION_2006 IMPLEMENTATION&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;      CLASS ORGANISATION_2007 DEFINITION&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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;This class inherits CLASS ORGANISATION_2006&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;class organisation_2007 definition inheriting from organisation_2006.&lt;/P&gt;&lt;P&gt;  public section.&lt;/P&gt;&lt;P&gt;*instance methods declaration&lt;/P&gt;&lt;P&gt;    methods : org_name redefinition,&lt;/P&gt;&lt;P&gt;              rebranding_process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endclass.                    "ORGANISATION_2007 DEFINITION&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;      CLASS ORGANISATION_2007 IMPLEMENTATION&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;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class organisation_2007 implementation.&lt;/P&gt;&lt;P&gt;*instance methods definition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  method org_name.&lt;/P&gt;&lt;P&gt;    write:/5 text-003.&lt;/P&gt;&lt;P&gt;  endmethod.                    "org_name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  method rebranding_process.&lt;/P&gt;&lt;P&gt;    write :/5 text-004.&lt;/P&gt;&lt;P&gt;  endmethod.                    "REBRANDING_PROCESS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endclass.                    "ORGANISATION_2007 IMPLEMENTATION&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;  D E C L A R A T I O N   O F   R E F E R E N C E   V A R I A B L E  *&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;&lt;/P&gt;&lt;P&gt;data : o1 type ref to organisation_2006.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : o2 type ref to organisation_2007.&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;             START-OF-SELECTION                                     *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;&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;      C R E A T I N G   O B J E C T S                                *&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;  create object :  o1, o2.&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;      C A L L I N G   M E T H O D S                                  *&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;  call method o1-&amp;gt;org_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method o1-&amp;gt;org_address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method o2-&amp;gt;org_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method o2-&amp;gt;org_address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call method o2-&amp;gt;rebranding_process.&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;do reward if helpful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2008 08:53:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-methods-from-different-class/m-p/3692330#M889114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-11T08:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: call methods from different class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-methods-from-different-class/m-p/3692331#M889115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi checkout this sample code.....any clarrification..really appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;class lcl_a  DEFINITION.
  PUBLIC SECTION.
  methods: m1.
endclass.

class lcl_a IMPLEMENTATION.
  method: m1.
    write:/ 'I am method of A class'.
  endmethod.
endclass.

class lcl_b DEFINITION INHERITING FROM lcl_a.
  PUBLIC SECTION.
  methods: m2.
endclass.

class lcl_b IMPLEMENTATION.
  method: m2.
write:/ 'I am method of B Class'.
 endmethod.
endclass.

 data: o_refb type ref to lcl_b.

 start-of-SELECTION.

 create OBJECT o_refb.
*You are calling A Class method M1.
 call method  o_refb-&amp;gt;M1.
*You are calling B Class method M2.
 call method  o_refb-&amp;gt;m2. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Anee on Apr 11, 2008 2:46 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2008 08:59:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-methods-from-different-class/m-p/3692331#M889115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-11T08:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: call methods from different class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-methods-from-different-class/m-p/3692332#M889116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; Hi &lt;/P&gt;&lt;P&gt;&amp;gt; i have doubts regarding access of class method.&lt;/P&gt;&lt;P&gt;&amp;gt; my scenario is &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; i am having method called &lt;STRONG&gt;M1&lt;/STRONG&gt; which is in &lt;STRONG&gt;class A&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; now i want 2 access that  method  &lt;STRONG&gt;M1&lt;/STRONG&gt; in &lt;STRONG&gt;Class B&lt;/STRONG&gt; which is different class..&lt;/P&gt;&lt;P&gt;&amp;gt; how to do that... how to access????&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; i want clear explanation with syntax.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; &lt;DEL&gt;points wil be rewarded.&lt;/DEL&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a method in class B&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* M1 static
CALL METHOD A=&amp;gt;M1 EXPORTING... IMPORTING...
" or
A=&amp;gt;M1( parameters ).

* M1 not static
" Create instance of A
DATA: lo_a TYPE REF TO A.
CREATE OBJECT lo_a EXPORTING...

CALL METHOD A-&amp;gt;M1 EXPORTING... IMPORTING
" or
A-&amp;gt;M1( parameters ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Simple, isn't it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2008 09:43:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-methods-from-different-class/m-p/3692332#M889116</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-04-11T09:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: call methods from different class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-methods-from-different-class/m-p/3692333#M889117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai &lt;/P&gt;&lt;P&gt;   Rehaman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    it is possible to access the methods defined in one class by methods in another class by using inheritance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;class my_class1  DEFINITION.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;  methods: m1.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;class my_class1 IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;  method: m1.&lt;/P&gt;&lt;P&gt;    write:/ 'This is m1 method'.&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 my_class2 DEFINITION INHERITING FROM my_class1.&lt;/P&gt;&lt;P&gt;  PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;  methods: m2.&lt;/P&gt;&lt;P&gt;endclass.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;class my_class2 IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;  method: m2.&lt;/P&gt;&lt;P&gt;write:/ 'This is from method m2'.&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: obj_ref2 type ref to my_classs2.&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;&lt;/P&gt;&lt;P&gt; create OBJECT obj_ref2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*To call method  m1 of my_class1.&lt;/P&gt;&lt;P&gt; call method  obj_ref2-&amp;gt;m1.&lt;/P&gt;&lt;P&gt;*To call method  m2 of my_class2.&lt;/P&gt;&lt;P&gt; call method  obj_ref2-&amp;gt;m2. &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 you,&lt;/P&gt;&lt;P&gt;Prasad G.V.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Apr 2008 15:21:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-methods-from-different-class/m-p/3692333#M889117</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-12T15:21:10Z</dc:date>
    </item>
  </channel>
</rss>

