<?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: How to execue this Instance Method? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699917#M625232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rich&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciated your help&lt;/P&gt;&lt;P&gt;Full points awarded .&lt;/P&gt;&lt;P&gt;Have a good day&lt;/P&gt;&lt;P&gt;AG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Aug 2007 23:25:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-23T23:25:48Z</dc:date>
    <item>
      <title>How to execue this Instance Method?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699909#M625224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question to all ABAP gurus.There is a standard class called CL_RSPLS_ALVL and I wish to execute mathod ACTIVATE . Since this method is defined as "Instance Method" , it doesnot appear when I try to execute this class using F8 transaction. It only shows me static methods to run. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I test this method ? by executing this class? &lt;/P&gt;&lt;P&gt;Is there any other way I can execute this method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 22:34:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699909#M625224</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T22:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to execue this Instance Method?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699910#M625225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what this class does, or even if calling the method ACTIVATE will do anything, but you would need to create a instance of the object, you should be able to do this in SE24, using the Test button, create the instance, then call the method.  Or you can write a short test program. Of course, if this method has parameters you will need to handle them as well as well as any parameters in the constructor method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: o_ref type ref to CL_RSPLS_ALVL.

create object o_ref.
call method o_ref-&amp;gt;activate( ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 22:46:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699910#M625225</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-08-23T22:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to execue this Instance Method?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699911#M625226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not a good programmer . I tried copy the code that you given below and I got into another syntax error that says - "You cannot create an instance of the class "CL_RSPLS_ALVL" outside the class". I actually create a small test program and paste your code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help. When I tried executing the class, option to create instance of the class was greyed out so I could not even do that step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 22:54:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699911#M625226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T22:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to execue this Instance Method?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699912#M625227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see, this class is built in such a way that you can not call if directly, it you must access it via a sub class or super class, but not directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 22:57:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699912#M625227</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-08-23T22:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to execue this Instance Method?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699913#M625228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you or someone help to understand how to do that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;AG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 22:59:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699913#M625228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T22:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to execue this Instance Method?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699914#M625229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm looking at the class now, it has private instaniation, which means that you can not call the CONSTRUCTOR, but it does have a static method called FACTORY which a lot of times will give you an instance of the class, it appears that in this case it does.  So when in the class in SE24, click the "Test" button, you will see a list of methods, execute the factory method, give the parameters and continue executing, I think at the next point you will be able to execute the ACTIVATE method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not at all familar with this class, so I don't know what its for, what it does, or even what it needs as far as parameters are concerned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 23:06:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699914#M625229</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-08-23T23:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to execue this Instance Method?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699915#M625230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rich. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think now I can execute this ACTIVATE method after executing the FACTORY method. If I wish to put all this execution steps into code then is it too much of effort?  Is it going to be few lines of code or not a good idea to write that complex code? Can you help if possible. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Appreciated your help&lt;/P&gt;&lt;P&gt;AG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 23:14:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699915#M625230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T23:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to execue this Instance Method?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699916#M625231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, since you are testing this class, I would think that the end result would be that you want to use it in your code somehow, right?  But as far as calling it in code,  you would need to pass the parameters and call the method. SOmething like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

DATA: o_ref TYPE REF TO cl_rspls_alvl.

TRY.
    CALL METHOD cl_rspls_alvl=&amp;gt;factory
      EXPORTING
        i_aggrlevel = '1'   "Whatever value here
*    i_new       = rs_c_false
*    i_reload    = rs_c_false
*    i_txtlg     =
*    i_txtsh     =
*    i_infoarea  =
*    i_bwappl    =
*    i_infoprov  =
      RECEIVING
        r_r_alvl    = o_ref
        .
  CATCH cx_rspls_object_not_found .
  CATCH cx_rs_msg .
  CATCH cx_rs_not_found .
ENDTRY.

CALL METHOD o_ref-&amp;gt;activate( ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 23:21:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699916#M625231</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-08-23T23:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to execue this Instance Method?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699917#M625232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rich&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciated your help&lt;/P&gt;&lt;P&gt;Full points awarded .&lt;/P&gt;&lt;P&gt;Have a good day&lt;/P&gt;&lt;P&gt;AG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 23:25:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699917#M625232</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-23T23:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to execue this Instance Method?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699918#M625233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Al,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this class has been designed to only allow it to instantiate itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there will probably be a static method for instantiation that returns the reference to the object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to do something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: myobj type ref CL_RSPLS_ALVL.

myobj = CL_RSPLS_ALVL=&amp;gt;INSTANTIATE( ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously the method name will be different and it may require you to pass parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Graham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2007 23:32:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-execue-this-instance-method/m-p/2699918#M625233</guid>
      <dc:creator>GrahamRobbo</dc:creator>
      <dc:date>2007-08-23T23:32:32Z</dc:date>
    </item>
  </channel>
</rss>

