<?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 Editing private methods in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538203#M1855920</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;Is is possible to add custom code to a private method of a SAP standard class? We are prototyping an upgrade of our Erec system and I have an error which is an issue with the ' add_role_to_bupa' method of the class CL_HRRCF_CANDIDATE. A SAP note meant to fix the issue has already been applied but the code is different from our current system hence the need to edit the private method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been reading about enhancement options but so far nothing I've found seems to provide me with the option that I'm after.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Aug 2014 09:18:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-08-07T09:18:27Z</dc:date>
    <item>
      <title>Editing private methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538203#M1855920</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;Is is possible to add custom code to a private method of a SAP standard class? We are prototyping an upgrade of our Erec system and I have an error which is an issue with the ' add_role_to_bupa' method of the class CL_HRRCF_CANDIDATE. A SAP note meant to fix the issue has already been applied but the code is different from our current system hence the need to edit the private method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been reading about enhancement options but so far nothing I've found seems to provide me with the option that I'm after.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 09:18:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538203#M1855920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-07T09:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Editing private methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538204#M1855921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you write the installed oss number?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 09:20:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538204#M1855921</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-07T09:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Editing private methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538205#M1855922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note 1228153&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 09:26:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538205#M1855922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-07T09:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Editing private methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538206#M1855923</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;You can do this by implementing Implicit Enhancement Point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Follow these steps :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Go to SE24 and open the method you want to add custom code to.&lt;/LI&gt;&lt;LI&gt;Enable Enhacement Mode ( Shift + F4 ).&lt;/LI&gt;&lt;LI&gt;Go to Menu-&amp;gt;Edit -&amp;gt; Enhancement Operations -&amp;gt; Show Implicit Enhancement Options.&lt;/LI&gt;&lt;LI&gt;Now, you will be able to see two Implicit enhancement points, 1st just below METHOD statement and 2nd just before ENDMETHOD statement.&lt;/LI&gt;&lt;LI&gt;Right Click on the 2nd enhancement point, Goto Enhancement Operations -&amp;gt; Create Implementation.&lt;/LI&gt;&lt;LI&gt;Specifiy a Zname for the enhancement.&lt;/LI&gt;&lt;LI&gt;A block will appear with the zname that you provided.&lt;/LI&gt;&lt;LI&gt;You can add your custom code inside this block and can use any parameters or global data available in the method.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 09:45:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538206#M1855923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-07T09:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Editing private methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538207#M1855924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for that Ashish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So basically I can't alter the existing code or overwrite a private method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I'm not getting he option to Goto Enhancement Operations -&amp;gt; Create Implementation&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 10:07:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538207#M1855924</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-07T10:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Editing private methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538208#M1855925</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;You need access key to change the standard code which is not recommended as it will void SAP support for that object. But you can add custom code using implicit enhancement point with no such disadvantages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to be in enhancement mode with implicit enhancement points visible.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Go to the source code window of the method.&lt;/LI&gt;&lt;LI&gt;Click on the spiral icon ( Shift + F4 ) on the application toolbar which will change the screen to enhancement mode.&lt;/LI&gt;&lt;LI&gt;Now go to Edit menu button -&amp;gt; Enhancement operations -&amp;gt; Show Implicit Enhancement points.&lt;/LI&gt;&lt;LI&gt;A line with quotes """"""""""""""""""" will appear just above the ENDMETHOD statement. This is the enhancement point.&lt;/LI&gt;&lt;LI&gt;Place the cursor on this line and right click, a menu will appear. Then Go to Enhancement Operations -&amp;gt; Create Implementation.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 10:34:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538208#M1855925</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-07T10:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Editing private methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538209#M1855926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cheers Ashish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got that now. If I now write my custom code how will that overwrite what's happening in the existing code which is causing the error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Jon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 12:19:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538209#M1855926</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-07T12:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Editing private methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538210#M1855927</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;Like the enhancement point you found at the end of method, similarly there is 1 at the start of the method.&lt;/P&gt;&lt;P&gt;So what you can do is :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;In the 1st enhancement point declare local data objects of same type as of the ones that are being changed in the standard code.&lt;/LI&gt;&lt;LI&gt;Copy all those variables, internal tables into your local variables.&lt;/LI&gt;&lt;LI&gt;Now, in the 2nd enhancement point, reallocate those variables and internal table values from your local ones to the standard ones, so this will create an effect as if the standard code inside the method has not been executed. &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/978/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Now add your custom code to the 2nd enhancement point. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/978/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 12:43:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538210#M1855927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-07T12:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Editing private methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538211#M1855928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh my days!! Sometimes coding with ABAP is like trying to play snooker with a piece of string!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Ashish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 12:52:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538211#M1855928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-07T12:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Editing private methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538212#M1855929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you could implement an enhancemant for the class and use an overwrite-exit for the private method as shown in this document: &lt;A href="http://wiki.scn.sap.com/wiki/display/ABAP/Enhancement+Framework+-+Class+Enhancements+-+Pre-exit,+Post-exit+and+Overwrite-exit+methods+-+Concept+and+Simple+Scenarios"&gt;http://wiki.scn.sap.com/wiki/display/ABAP/Enhancement+Framework+-+Class+Enhancements+-+Pre-exit,+Post-exit+and+Overwrite-exit+methods+-+Concept+and+Simple+Scenarios&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 13:14:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538212#M1855929</guid>
      <dc:creator>kay_streubel</dc:creator>
      <dc:date>2014-08-07T13:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Editing private methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538213#M1855930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That definitely looks promising. I'll have to evaluate which option is the most suitable for my needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 14:14:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538213#M1855930</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-07T14:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Editing private methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538214#M1855931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is a useful tip by Kay. Use that if you want to overwrite the standard code completely.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2014 05:45:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538214#M1855931</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-08T05:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Editing private methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538215#M1855932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kay and Ashish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I chose to go with Kay's suggestion in this instance as it suited my scenario best.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help and guidance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 06:49:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/editing-private-methods/m-p/10538215#M1855932</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-14T06:49:16Z</dc:date>
    </item>
  </channel>
</rss>

