<?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 call a method from class interface in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-method-from-class-interface/m-p/7769950#M1584452</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you use the keyword 'CALL METHOD' the syntax is similar to the 'CALL FUNCTION' keyword.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the method in question is a static method, it should look like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD /SAPSRM/CL_PDO_DO_BASE=&amp;gt;UPDATE_ITEM_PARTNERS&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If the method is an instance method, it should look like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD /SAPSRM/CL_PDO_DO_BASE-&amp;gt;UPDATE_ITEM_PARTNERS&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If what you're after is more specific information about how to implement a BADI, or about the parameters required for this specific method, please provide more details and clarify.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Apr 2011 18:38:13 GMT</pubDate>
    <dc:creator>alex_campbell</dc:creator>
    <dc:date>2011-04-15T18:38:13Z</dc:date>
    <item>
      <title>how to call a method from class interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-method-from-class-interface/m-p/7769949#M1584451</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 want to call a method from a 'class interface' in a BADI .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Class Interface -- /SAPSRM/CL_PDO_DO_BASE&lt;/P&gt;&lt;P&gt;Method -- /SAPSRM/IF_PDO_DO_PARTNER_BASE~UPDATE_ITEM_PARTNERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how can I call this method in my BADI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks-&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 15:09:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-method-from-class-interface/m-p/7769949#M1584451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-15T15:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to call a method from class interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-method-from-class-interface/m-p/7769950#M1584452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you use the keyword 'CALL METHOD' the syntax is similar to the 'CALL FUNCTION' keyword.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the method in question is a static method, it should look like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD /SAPSRM/CL_PDO_DO_BASE=&amp;gt;UPDATE_ITEM_PARTNERS&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If the method is an instance method, it should look like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD /SAPSRM/CL_PDO_DO_BASE-&amp;gt;UPDATE_ITEM_PARTNERS&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If what you're after is more specific information about how to implement a BADI, or about the parameters required for this specific method, please provide more details and clarify.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 18:38:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-method-from-class-interface/m-p/7769950#M1584452</guid>
      <dc:creator>alex_campbell</dc:creator>
      <dc:date>2011-04-15T18:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to call a method from class interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-method-from-class-interface/m-p/7769951#M1584453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you're not sure how to write it, you can use the Pattern feature from the ABAP editor.&lt;/P&gt;&lt;P&gt;Just set the cursor in the code in place, where you want to call the method and click the Pattern button. There is an option "ABAP Objects Pattern". When you choose it, new window will appear in which you can:&lt;/P&gt;&lt;P&gt;- for static method - just provide class name and method name,&lt;/P&gt;&lt;P&gt;- for instance method - provide class name, instance name and method name,&lt;/P&gt;&lt;P&gt;- for creating an instance (calling constructor) - provide class name and instance name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, a code which calls desired method will be inserted in your code (just like for the function module calling). You can now provide the parameters, deal with the exceptions etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Apr 2011 09:46:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-method-from-class-interface/m-p/7769951#M1584453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-16T09:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to call a method from class interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-method-from-class-interface/m-p/7769952#M1584454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi harmeet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                   please check that in the badi methods ur needed interface method is there. if it is there then u can call with that interface method with the interface name. if it is not there in any of the badi's then u can go for custom badi's.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Apr 2011 09:52:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-method-from-class-interface/m-p/7769952#M1584454</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-16T09:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to call a method from class interface</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-method-from-class-interface/m-p/7769953#M1584455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harmeet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow these simple steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create an instance of class interface /SAPSRM/CL_PDO_DO_BASE if method /SAPSRM/IF_PDO_DO_PARTNER_BASE~UPDATE_ITEM_PARTNERS is instance method and &lt;/P&gt;&lt;P&gt;call instance -&amp;gt; /SAPSRM/IF_PDO_DO_PARTNER_BASE~UPDATE_ITEM_PARTNERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.if method /SAPSRM/IF_PDO_DO_PARTNER_BASE&lt;SUB&gt;UPDATE_ITEM_PARTNERS is static method ,call directly using class interface like /SAPSRM/CL_PDO_DO_BASE=&amp;gt; /SAPSRM/IF_PDO_DO_PARTNER_BASE&lt;/SUB&gt;UPDATE_ITEM_PARTNERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you feel any dificulty in declaring instances and call methods,  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Goto EDIT-&amp;gt; Pattern -&amp;gt;ABAP Object Patterns, Give class name , instance name and method, you got the required code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prasad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Apr 2011 14:12:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-call-a-method-from-class-interface/m-p/7769953#M1584455</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-18T14:12:04Z</dc:date>
    </item>
  </channel>
</rss>

