<?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: Is there any significant difference? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-any-significant-difference/m-p/2010130#M410196</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;Both options are fine and nothing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I prefer the second option which is simple and easy to read/follow thru the logic. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Mar 2007 16:24:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-12T16:24:16Z</dc:date>
    <item>
      <title>Is there any significant difference?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-any-significant-difference/m-p/2010129#M410195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;these are my programs that demonstrate radio button. there are 2 versions and they have the same output and they are all working fine. I am just wondering why on version 1 (I got this pattern from a tutorial) I have to create sy-ucomm many times. On version 2, it looks more simple. I just want to know if  version 1 has advantage/disadvantage over version 2 and vice versa. newbie here. &amp;lt;b&amp;gt;Thanks for the help. &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;====================================&lt;/P&gt;&lt;P&gt;Code version 1&lt;/P&gt;&lt;P&gt;====================================&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: rb1(1), rb2(1), rb3(1), field1(10).
data: ok_code type sy-ucomm,
      save_ok type sy-ucomm.

initialization.
save_ok = ok_code.
clear ok_code.

start-of-selection.
  set screen 0100.

module pai input.
  case save_ok.
      when 'RADIO'.
          if RB1 = 'X'.
              field1 = 'option 1'.
          elseif RB2 = 'X'.
              field1 = 'option 2'.
          else.
              field1 = 'option 3'.
          endif.
  endcase.

  case sy-ucomm.
    when 'BTNEXIT'.
      leave program.
  endcase.
endmodule.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;====================================&lt;/P&gt;&lt;P&gt;Code version 2&lt;/P&gt;&lt;P&gt;====================================&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: rb1(1), rb2(1), rb3(1), field1(10).

start-of-selection.
  set screen 0100.

module pai input.
  case sy-ucomm.
    when 'BTNEXIT'.
      leave program.
    when 'RADIO'.
          if RB1 = 'X'.
              field1 = 'option 1'.
          elseif RB2 = 'X'.
              field1 = 'option 2'.
          else.
              field1 = 'option 3'.
          endif.
  endcase.
endmodule.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 16:18:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-any-significant-difference/m-p/2010129#M410195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T16:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any significant difference?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-any-significant-difference/m-p/2010130#M410196</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;Both options are fine and nothing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I prefer the second option which is simple and easy to read/follow thru the logic. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 16:24:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-any-significant-difference/m-p/2010130#M410196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T16:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any significant difference?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-any-significant-difference/m-p/2010131#M410197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dawson,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In effect there is no difference between the two code samples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the first code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we are storing the SY_UCOMM value to a varible and then using tthis variable to track the user actions (it is a recommended way in SAP, so that we can track the value of SY_UCOMM using this variable even in the PBO.)&lt;/P&gt;&lt;P&gt;But in the code sample, both are used, which is a little strange...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;underlying FACT...If there are N people coding for one requirement, the code can be of N different ways..........&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Sajan Joseph.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 16:24:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-any-significant-difference/m-p/2010131#M410197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T16:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any significant difference?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-any-significant-difference/m-p/2010132#M410198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Mr. Dawson,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code u have written is will work fine in both versions but I will prefer the first one because both the check are satisfied with a sigle CASE.. ENDCASE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So U can ahead with the second version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2007 16:47:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/is-there-any-significant-difference/m-p/2010132#M410198</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-12T16:47:43Z</dc:date>
    </item>
  </channel>
</rss>

