<?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: Help in design methods in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-design-methods/m-p/5961092#M1337661</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The argument about splitting inserts and updates (as opposed to the more generic "modify") is an old one, but I understand that's not the topic here.&lt;/P&gt;&lt;P&gt;Regarding your design question: I'm leaning with Marcin, meaning that you should use only one method. Instead of passing it a "mode" parameter, you could also use two (optional) input parameters: one to pass data for inserting, and one to pass data for updating (and maybe one for deleting, if your application requires that). In the method, depending on which one is filled, you do either one or the other (or both).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Rainer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Aug 2009 17:13:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-04T17:13:13Z</dc:date>
    <item>
      <title>Help in design methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-design-methods/m-p/5961090#M1337659</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 know if there is performance aspects and good design i do the operation in good way ,&lt;/P&gt;&lt;P&gt;this is regards insert , update , modify &lt;/P&gt;&lt;P&gt;I  do read opration  from the DB tables and i need to create or update the value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. if sy-subrc = 0 i check if the data that i get form the &lt;/P&gt;&lt;P&gt;DB is equel to the data that i have,  if yes dont do anything .&lt;/P&gt;&lt;P&gt;2. if sy-subrc  = 0 and some records are different - &amp;gt; do update&lt;/P&gt;&lt;P&gt;3. if sy-subrc &amp;lt;&amp;gt; 0 - &amp;gt; insert the records to the DB via insert commend &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i know that modify do both update and insert but my question if for my case&lt;/P&gt;&lt;P&gt;its good to separate the operation for two method despite i can do that  in same method &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. methods handle insert&lt;/P&gt;&lt;P&gt;2. method Handle update&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Joy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 15:15:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-design-methods/m-p/5961090#M1337659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-04T15:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help in design methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-design-methods/m-p/5961091#M1337660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic rules about creating the methods would be:&lt;/P&gt;&lt;P&gt;- keep it smart&lt;/P&gt;&lt;P&gt;- keep it small&lt;/P&gt;&lt;P&gt;- let the method be responsible for certain task only&lt;/P&gt;&lt;P&gt;- minimize but don't atomize &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt; - which means do not create method just to execute one statement only. Class itself may then become very hard to maintain if too many methods are used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Generally in your case it is really of no matter how you handle it, either in both or in one method. All in all they will be both responsible for doing very similar task. So you can use one method and pass parameter i.e. &lt;EM&gt;mode&lt;/EM&gt; where &lt;STRONG&gt;I&lt;/STRONG&gt; would be for insert, &lt;STRONG&gt;U&lt;/STRONG&gt; for update, but it's always up to you which approach you take.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 16:14:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-design-methods/m-p/5961091#M1337660</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-08-04T16:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help in design methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-design-methods/m-p/5961092#M1337661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The argument about splitting inserts and updates (as opposed to the more generic "modify") is an old one, but I understand that's not the topic here.&lt;/P&gt;&lt;P&gt;Regarding your design question: I'm leaning with Marcin, meaning that you should use only one method. Instead of passing it a "mode" parameter, you could also use two (optional) input parameters: one to pass data for inserting, and one to pass data for updating (and maybe one for deleting, if your application requires that). In the method, depending on which one is filled, you do either one or the other (or both).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Rainer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 17:13:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-design-methods/m-p/5961092#M1337661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-04T17:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help in design methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-design-methods/m-p/5961093#M1337662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. in persistence class there is one method that are responsible for update and modify ?&lt;/P&gt;&lt;P&gt;i ask it because the new concept or SAP is to use persistence class model class and business class  so the persistence class have just 3 methods for create( with  delete and read ) ? &lt;/P&gt;&lt;P&gt;2. one thing that i forget to Remind is that  in the update method i do some enqueue and dequeue which i dont use in the insert method .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Joy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2009 19:59:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-in-design-methods/m-p/5961093#M1337662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-04T19:59:52Z</dc:date>
    </item>
  </channel>
</rss>

