<?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 Call method from an other program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method-from-an-other-program/m-p/5812715#M1313508</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please is there a way to call and use a method declared in an other program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;Issam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jun 2009 14:15:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-24T14:15:40Z</dc:date>
    <item>
      <title>Call method from an other program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method-from-an-other-program/m-p/5812715#M1313508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please is there a way to call and use a method declared in an other program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;Issam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 14:15:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method-from-an-other-program/m-p/5812715#M1313508</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-24T14:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Call method from an other program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method-from-an-other-program/m-p/5812716#M1313509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Issam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are talking about &lt;STRONG&gt;local&lt;/STRONG&gt; classes defined within a program then the answer is most likely not.&lt;/P&gt;&lt;P&gt;Perhaps if the program containing the local classes calls your report you may try the "...Love User-Exits..." trick:&lt;/P&gt;&lt;P&gt;[SAP User Exits and the People Who Love Them|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/208811b0-00b2-2910-c5ac-dd2c7c50c8e8]&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>Wed, 24 Jun 2009 14:31:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method-from-an-other-program/m-p/5812716#M1313509</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2009-06-24T14:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Call method from an other program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method-from-an-other-program/m-p/5812717#M1313510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Uwe,&lt;/P&gt;&lt;P&gt;I will try this , though I never use the USER EXIT. I have work with BADI I don't if this help me out,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank u for your help.&lt;/P&gt;&lt;P&gt;Issam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 14:47:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method-from-an-other-program/m-p/5812717#M1313510</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-24T14:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Call method from an other program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method-from-an-other-program/m-p/5812718#M1313511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Issam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In ABAP, there are 2 ways of defining Repository Objects. 1. Local Objects and 2. Global Objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While you can define local objects (eg.local classes,data types) and those will be available in the local context of that Object. (Except few Objects like Subroutines - you can call a subroutine of one report program from another report). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, if you want to use objects across application, you need to define them Globally. There are certain advantages of defining it globally for example Object Maintainence will be easy. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, generally a method defined in one local class will not be available in another class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Samantak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 04:31:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method-from-an-other-program/m-p/5812718#M1313511</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-26T04:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Call method from an other program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method-from-an-other-program/m-p/5812719#M1313512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Issam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is possible, but in my opinion it is not recommended. Classes which are used over multiple programs should be implemented in class pools and not in local classes. Local classes may have dependencies to their context (e.g. through the usage of a global variable in the surrounding program). Using them from outside this context is potentially dangerous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nevertheless, here is a simple example how to use a local class of another program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program 1 - contains the local class:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT y_test_prog1.

CLASS lcl_local_class DEFINITION.
  PUBLIC SECTION.
    METHODS foo.
ENDCLASS.

CLASS lcl_local_class IMPLEMENTATION.
  METHOD foo.
    WRITE 'Foo.'.
  ENDMETHOD.
ENDCLASS.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Program 2 - uses the class LCL_LOCAL_CLASS from program 1:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT y_test_prog2.

DATA: go_test TYPE REF TO object,
      ge_abs_typename TYPE string VALUE
                        `\PROGRAM=Y_TEST_PROG1\CLASS=LCL_LOCAL_CLASS`.

START-OF-SELECTION.
  CREATE OBJECT go_test TYPE (ge_abs_typename).
  CALL METHOD go_test-&amp;gt;('FOO').                    " writes 'Foo.'
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2009 09:41:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method-from-an-other-program/m-p/5812719#M1313512</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-26T09:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Call method from an other program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/call-method-from-an-other-program/m-p/5812720#M1313513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check out this wiki:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/passing%2bdata%2bfrom%2bone%2babap%2bprogram%2bto%2banother" target="test_blank"&gt;https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/passing%2bdata%2bfrom%2bone%2babap%2bprogram%2bto%2banother&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 07:53:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/call-method-from-an-other-program/m-p/5812720#M1313513</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-29T07:53:15Z</dc:date>
    </item>
  </channel>
</rss>

