<?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 do we call Private Methods? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961576#M395249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Satish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can call a private method of a class, if this class has made you a friend with the syntax of FRIEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zex33.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS mytest DEFINITION FOR TESTING.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;METHODS test FOR TESTING.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS myclass DEFINITION FRIENDS mytest.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;CLASS-METHODS my_method.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS myclass IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD my_method.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS mytest IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD test.&lt;/P&gt;&lt;P&gt;CALL METHOD myclass=&amp;gt;my_method.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If my_method is not a class method, then you need to create an object of the class first, whose methods you want to test.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Feb 2007 13:22:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-07T13:22:07Z</dc:date>
    <item>
      <title>How do we call Private Methods?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961571#M395244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; How do we call Private Methods? How it would be in case of Subclass?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Sathish Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 11:54:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961571#M395244</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T11:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do we call Private Methods?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961572#M395245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD method .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD super-&amp;gt;method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/1d/df5f57127111d3b9390000e8353423/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/1d/df5f57127111d3b9390000e8353423/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 12:14:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961572#M395245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T12:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do we call Private Methods?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961573#M395246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can try this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD method .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD super-&amp;gt;method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;still you have any doubt send your doubt clearly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;veera nagi reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 13:06:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961573#M395246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T13:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do we call Private Methods?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961574#M395247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sathish Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through the following Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: L_APP TYPE STRING VALUE 'EXCEL' ,&lt;/P&gt;&lt;P&gt;        L_PARAMETER TYPE STRING VALUE 'C:\ZRPP030.XLS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;  CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;EXECUTE&amp;lt;/b&amp;gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      APPLICATION            = L_APP&lt;/P&gt;&lt;P&gt;      PARAMETER              = L_PARAMETER&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      CNTL_ERROR             = 1&lt;/P&gt;&lt;P&gt;      ERROR_NO_GUI           = 2&lt;/P&gt;&lt;P&gt;      BAD_PARAMETER          = 3&lt;/P&gt;&lt;P&gt;      FILE_NOT_FOUND         = 4&lt;/P&gt;&lt;P&gt;      PATH_NOT_FOUND         = 5&lt;/P&gt;&lt;P&gt;      FILE_EXTENSION_UNKNOWN = 6&lt;/P&gt;&lt;P&gt;      ERROR_EXECUTE_FAILED   = 7&lt;/P&gt;&lt;P&gt;      SYNCHRONOUS_FAILED     = 8&lt;/P&gt;&lt;P&gt;      NOT_SUPPORTED_BY_GUI   = 9&lt;/P&gt;&lt;P&gt;      others                 = 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sreeni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 13:13:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961574#M395247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T13:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do we call Private Methods?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961575#M395248</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;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Private methods&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Can only be called from inside the class. They are placed in the PRIVATE section of the class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;Private section. Not accessable by subclasses&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Private attributes&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Private attributes are defined in the PRIVATE section. The can only be viewes and changed from within the class. There is no direct access from outside the class.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;    DATA: name(25) TYPE c,&lt;/P&gt;&lt;P&gt;          planetype LIKE saplane-planetyp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards&lt;/P&gt;&lt;P&gt;vinayaka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 13:16:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961575#M395248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T13:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do we call Private Methods?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961576#M395249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Satish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can call a private method of a class, if this class has made you a friend with the syntax of FRIEND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zex33.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS mytest DEFINITION FOR TESTING.&lt;/P&gt;&lt;P&gt;PRIVATE SECTION.&lt;/P&gt;&lt;P&gt;METHODS test FOR TESTING.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS myclass DEFINITION FRIENDS mytest.&lt;/P&gt;&lt;P&gt;PUBLIC SECTION.&lt;/P&gt;&lt;P&gt;CLASS-METHODS my_method.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS myclass IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD my_method.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS mytest IMPLEMENTATION.&lt;/P&gt;&lt;P&gt;METHOD test.&lt;/P&gt;&lt;P&gt;CALL METHOD myclass=&amp;gt;my_method.&lt;/P&gt;&lt;P&gt;ENDMETHOD.&lt;/P&gt;&lt;P&gt;ENDCLASS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If my_method is not a class method, then you need to create an object of the class first, whose methods you want to test.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 13:22:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961576#M395249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T13:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do we call Private Methods?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961577#M395250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sathish.&lt;/P&gt;&lt;P&gt;The syntax for calling a private method is no different from that of calling any other instance method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is call method object-&amp;gt;method&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;gt;&lt;/P&gt;&lt;P&gt;importing&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But remember, that you can call the private method only within the same class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. Remember to reward points if it does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Prashanth.&lt;/P&gt;&lt;P&gt;SAP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Feb 2007 14:59:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-we-call-private-methods/m-p/1961577#M395250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-07T14:59:14Z</dc:date>
    </item>
  </channel>
</rss>

