<?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: Discover interface at runtime in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/discover-interface-at-runtime/m-p/5656199#M1286767</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sebastian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps the following sample report may be useful:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZUS_SDN_INTF_AT_RUNTIME
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Thread: Discover interface at runtime
*&amp;amp; &amp;lt;a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1371815"&amp;gt;&amp;lt;/a&amp;gt;
*&amp;amp;---------------------------------------------------------------------*

REPORT  zus_sdn_intf_at_runtime.


DATA:
  go_classdescr   TYPE REF TO cl_abap_classdescr,
  gt_intf         TYPE abap_intfdescr_tab,
  gs_intf         LIKE LINE OF gt_intf,
  go_msglist      TYPE REF TO if_reca_message_list.


START-OF-SELECTION.

  go_msglist = cf_reca_message_list=&amp;gt;create( ).

  BREAK-POINT.

  go_classdescr ?= cl_abap_classdescr=&amp;gt;describe_by_object_ref( go_msglist ).

  LOOP AT go_classdescr-&amp;gt;interfaces INTO gs_intf.
    WRITE: / gs_intf-name, gs_intf-is_inherited.
  ENDLOOP.


END-OF-SELECTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Jun 2009 08:02:37 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2009-06-10T08:02:37Z</dc:date>
    <item>
      <title>Discover interface at runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/discover-interface-at-runtime/m-p/5656198#M1286766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there a better way to discover wether an object implements an interface,&lt;/P&gt;&lt;P&gt;rather than just downcasting it and catching any resulting exception? (i. e. what&lt;/P&gt;&lt;P&gt;is the ABAP code equivalent for the runtime check that the ?= operator performs?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Sebastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 07:28:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/discover-interface-at-runtime/m-p/5656198#M1286766</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-10T07:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Discover interface at runtime</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/discover-interface-at-runtime/m-p/5656199#M1286767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sebastian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps the following sample report may be useful:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZUS_SDN_INTF_AT_RUNTIME
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Thread: Discover interface at runtime
*&amp;amp; &amp;lt;a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1371815"&amp;gt;&amp;lt;/a&amp;gt;
*&amp;amp;---------------------------------------------------------------------*

REPORT  zus_sdn_intf_at_runtime.


DATA:
  go_classdescr   TYPE REF TO cl_abap_classdescr,
  gt_intf         TYPE abap_intfdescr_tab,
  gs_intf         LIKE LINE OF gt_intf,
  go_msglist      TYPE REF TO if_reca_message_list.


START-OF-SELECTION.

  go_msglist = cf_reca_message_list=&amp;gt;create( ).

  BREAK-POINT.

  go_classdescr ?= cl_abap_classdescr=&amp;gt;describe_by_object_ref( go_msglist ).

  LOOP AT go_classdescr-&amp;gt;interfaces INTO gs_intf.
    WRITE: / gs_intf-name, gs_intf-is_inherited.
  ENDLOOP.


END-OF-SELECTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 08:02:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/discover-interface-at-runtime/m-p/5656199#M1286767</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2009-06-10T08:02:37Z</dc:date>
    </item>
  </channel>
</rss>

