<?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: GetObject in ABAP language in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getobject-in-abap-language/m-p/8256745#M1631672</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No there is not. If you are going to write a Z class you can achieve the same functionality by using the Singleton pattern ([http://en.wikipedia.org/wiki/Singleton_pattern]). In ABAP you can achieve more or less like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CLASS lcl_test DEFINITION   CREATE PROTECTED .

  PUBLIC SECTION.
    CLASS-METHODS get_instance
     RETURNING
       value(re_instance) TYPE REF TO lcl_test.

  PROTECTED SECTION.
    CLASS-DATA: my_instance TYPE REF TO lcl_test.
ENDCLASS.                    "lcl_test DEFINITION

CLASS lcl_test IMPLEMENTATION.
  METHOD get_instance.
    IF my_instance IS NOT BOUND.
      CREATE OBJECT my_instance.
    ENDIF.
    re_instance = my_instance.
  ENDMETHOD.                    "get_instance
ENDCLASS.                    "lcl_test IMPLEMENTATION
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Oct 2011 16:48:05 GMT</pubDate>
    <dc:creator>arseni_gallardo</dc:creator>
    <dc:date>2011-10-10T16:48:05Z</dc:date>
    <item>
      <title>GetObject in ABAP language</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getobject-in-abap-language/m-p/8256744#M1631671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;to create a new COM object I use the command CREATE OBJECT in ABAP. Is it possible to use an existing COM object on the presentation server? Other programming languages offers the command GET OBJECT to return a reference to an existing object. Is there an equivalent in ABAP?&lt;/P&gt;&lt;P&gt;Thanks for hints and tips.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 16:24:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getobject-in-abap-language/m-p/8256744#M1631671</guid>
      <dc:creator>Stefan-Schnell</dc:creator>
      <dc:date>2011-10-10T16:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: GetObject in ABAP language</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getobject-in-abap-language/m-p/8256745#M1631672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No there is not. If you are going to write a Z class you can achieve the same functionality by using the Singleton pattern ([http://en.wikipedia.org/wiki/Singleton_pattern]). In ABAP you can achieve more or less like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CLASS lcl_test DEFINITION   CREATE PROTECTED .

  PUBLIC SECTION.
    CLASS-METHODS get_instance
     RETURNING
       value(re_instance) TYPE REF TO lcl_test.

  PROTECTED SECTION.
    CLASS-DATA: my_instance TYPE REF TO lcl_test.
ENDCLASS.                    "lcl_test DEFINITION

CLASS lcl_test IMPLEMENTATION.
  METHOD get_instance.
    IF my_instance IS NOT BOUND.
      CREATE OBJECT my_instance.
    ENDIF.
    re_instance = my_instance.
  ENDMETHOD.                    "get_instance
ENDCLASS.                    "lcl_test IMPLEMENTATION
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2011 16:48:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getobject-in-abap-language/m-p/8256745#M1631672</guid>
      <dc:creator>arseni_gallardo</dc:creator>
      <dc:date>2011-10-10T16:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: GetObject in ABAP language</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getobject-in-abap-language/m-p/8256746#M1631673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you mean using OLE, yes there is such a way in ABAP. Search for term +CREATE OBJECT ole + .&lt;/P&gt;&lt;P&gt;Also nice references how to import various controls from outside SAP [Using .Net Windows Controls in the ABAP Control Framework|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/754] &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt;; and [Using Classic ActiveX Controls in the ABAP Control Framework|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/995] &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 06:59:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getobject-in-abap-language/m-p/8256746#M1631673</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2011-10-11T06:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: GetObject in ABAP language</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getobject-in-abap-language/m-p/8256747#M1631674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Arseni,&lt;/P&gt;&lt;P&gt;thanks for your answer and your snippet to simulate GetObject in ABAP.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 09:05:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getobject-in-abap-language/m-p/8256747#M1631674</guid>
      <dc:creator>Stefan-Schnell</dc:creator>
      <dc:date>2011-10-11T09:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: GetObject in ABAP language</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getobject-in-abap-language/m-p/8256748#M1631675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://answers.sap.com/docs/DOC-31780"&gt;here&lt;/A&gt; is a solution for this problem.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Sep 2012 05:07:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getobject-in-abap-language/m-p/8256748#M1631675</guid>
      <dc:creator>Stefan-Schnell</dc:creator>
      <dc:date>2012-09-21T05:07:47Z</dc:date>
    </item>
  </channel>
</rss>

