<?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: Problem with Abap Object in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548016#M1266679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps for this requirement SAP provides a corresponding method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZUS_SDN_IS_INSTANCE_OF
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Thread: Problem with Abap Object 
*&amp;amp; &amp;lt;a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1309987"&amp;gt;&amp;lt;/a&amp;gt; 
*&amp;amp;---------------------------------------------------------------------*

REPORT  zus_sdn_is_instance_of.


DATA:
  go_term_mngr      TYPE REF TO cl_reaj_term_mngr,
  to_period_mngr    TYPE REF TO cl_retm_period_mngr.


START-OF-SELECTION.

" NOTE: Direct instantiation not possible =&amp;gt; fake coding
  CREATE OBJECT go_term_mngr.
  CREATE OBJECT go_period_mngr.

  IF ( cf_reca_object=&amp;gt;get_classname( go_term_mngr ) = 'CL_REAJ_TERM_MNGR' ).

  ELSE.

  ENDIF.


END-OF-SELECTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps it is necessary to use the underlying interfaces instead of the classes:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF_REAJ_TERM_MNGR
IF_RETM_PERIOD_MNGR&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;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>Thu, 16 Apr 2009 17:32:14 GMT</pubDate>
    <dc:creator>uwe_schieferstein</dc:creator>
    <dc:date>2009-04-16T17:32:14Z</dc:date>
    <item>
      <title>Problem with Abap Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548011#M1266674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi expert,&lt;/P&gt;&lt;P&gt;I have problem with "CLASS":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my program i'm calling a method wich give me :&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_macro_name="O"&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want just the first : &lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;How can i do not to take the second?&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;
How can right in abap : 
&lt;PRE&gt;&lt;CODE&gt;
if ... eq CLASS=CL_RETM_PERIOD_MNGR
exit.
endif.
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 14:35:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548011#M1266674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-16T14:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Abap Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548012#M1266675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: lv_vbap TYPE REF TO &amp;lt;class_name&amp;gt;.
CREATE OBJECT lv_vbap.


if  lv_vbap eq CL_RETM_PERIOD_MNGR.

do ...this

else.

donot .. do this
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 14:45:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548012#M1266675</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-04-16T14:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Abap Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548013#M1266676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank u for your response but it doesn't work.&lt;/P&gt;&lt;P&gt;the problem is here:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if lv_vbap eq CL_RETM_PERIOD_MNGR.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It takes CL_RETM_PERIOD_MNGR as a field and not as class, and gives:    CL_RETM_PERIOD_MNGR is unknown&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 15:11:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548013#M1266676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-16T15:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Abap Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548014#M1266677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I meant to check the instance of the class....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 15:18:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548014#M1266677</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-04-16T15:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Abap Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548015#M1266678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="green" __jive_macro_name="color"&gt;You mean: &lt;SPAN __jive_macro_name="O"&gt;&lt;/SPAN&gt; ?&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
        IF lo_specific_term_mngr  EQ {O:153*\CLASS=CL_REAJ_TERM_MNGR}.

          DO.
            go_adjmterm_mngr ?= lo_specific_term_mngr.
          ENDDO.
        ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's that , it doesn't work: the error message: {0  is unknown.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2009 15:24:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548015#M1266678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-16T15:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Abap Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548016#M1266679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps for this requirement SAP provides a corresponding method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Report  ZUS_SDN_IS_INSTANCE_OF
*&amp;amp;
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp; Thread: Problem with Abap Object 
*&amp;amp; &amp;lt;a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1309987"&amp;gt;&amp;lt;/a&amp;gt; 
*&amp;amp;---------------------------------------------------------------------*

REPORT  zus_sdn_is_instance_of.


DATA:
  go_term_mngr      TYPE REF TO cl_reaj_term_mngr,
  to_period_mngr    TYPE REF TO cl_retm_period_mngr.


START-OF-SELECTION.

" NOTE: Direct instantiation not possible =&amp;gt; fake coding
  CREATE OBJECT go_term_mngr.
  CREATE OBJECT go_period_mngr.

  IF ( cf_reca_object=&amp;gt;get_classname( go_term_mngr ) = 'CL_REAJ_TERM_MNGR' ).

  ELSE.

  ENDIF.


END-OF-SELECTION.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps it is necessary to use the underlying interfaces instead of the classes:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IF_REAJ_TERM_MNGR
IF_RETM_PERIOD_MNGR&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;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>Thu, 16 Apr 2009 17:32:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548016#M1266679</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2009-04-16T17:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Abap Object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548017#M1266680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Uwe, it solves my pb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mehdi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2009 07:39:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-abap-object/m-p/5548017#M1266680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-17T07:39:37Z</dc:date>
    </item>
  </channel>
</rss>

