<?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 Interface related query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface-related-query/m-p/6388480#M1404349</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;I have one interface with method XYZ... i am implementing that method with the help of classes ZCL and ZCL1 ...suppose when i am implemetig interface with class ZCL then its output is 123 and with class ZCL1 output is 456 ...when i call the instance of that interface in report with the help of class method get_instance of class cl_exithandler and run the report i am getting output as 123456.... i want to know how both the instances of both classes are called when we call one interface?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Dec 2009 04:34:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-03T04:34:31Z</dc:date>
    <item>
      <title>Interface related query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface-related-query/m-p/6388480#M1404349</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;I have one interface with method XYZ... i am implementing that method with the help of classes ZCL and ZCL1 ...suppose when i am implemetig interface with class ZCL then its output is 123 and with class ZCL1 output is 456 ...when i call the instance of that interface in report with the help of class method get_instance of class cl_exithandler and run the report i am getting output as 123456.... i want to know how both the instances of both classes are called when we call one interface?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 04:34:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface-related-query/m-p/6388480#M1404349</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-03T04:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Interface related query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/interface-related-query/m-p/6388481#M1404350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You must not use the class cl_exithandler to get your instance of the class. This class is part of the classical BADI framework.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your requirement, you need to explicitly mention which class' object you want to instantiate. Like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: o_obj_ref type ref to zif_interface.

if condition = 0.
create object o_obj_ref type ZCL .
else.
create object o_obj_ref type ZCL1.
endif.

o_obj_ref-&amp;gt;xyz( ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 14:45:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/interface-related-query/m-p/6388481#M1404350</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2009-12-03T14:45:12Z</dc:date>
    </item>
  </channel>
</rss>

