<?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: DIFFERENCE BET 'SY-UCOMM' AND 'OK-CODE'..? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-bet-sy-ucomm-and-ok-code/m-p/2138360#M450114</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siva Reddy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-ucomm is for doing the functions what the user wishes to do at that particular event. You use it in menus and other place . this mainly in using &amp;lt;pfstatus&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok_code is generally used in screen as of I have used. You will define the function in the screen. and you can use it in the main program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok_code acts just as a temporary variable that stores the value of sy-ucomm. &lt;/P&gt;&lt;P&gt;When user interacts with the screen elements, the function code that you have assigned is filled in the sy-ucomm field which is turn gets reflected in OK_CODE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your ABAP programs, you should work with the OK_CODE field instead of SY-UCOMM. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reword  some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;P.Naganjana Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Apr 2007 11:39:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-20T11:39:27Z</dc:date>
    <item>
      <title>DIFFERENCE BET 'SY-UCOMM' AND 'OK-CODE'..?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-bet-sy-ucomm-and-ok-code/m-p/2138356#M450110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;I AM SIVA,&lt;/P&gt;&lt;P&gt;I AM NEW FOR ABAP,&lt;/P&gt;&lt;P&gt;I AM LITTLE BIT NOT UNAWARE OF DIFFERENCE BET SY-UCOMM AND&lt;/P&gt;&lt;P&gt;OK-CODE..&lt;/P&gt;&lt;P&gt;PLEASE SEND ME ANSWER ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2007 19:25:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-bet-sy-ucomm-and-ok-code/m-p/2138356#M450110</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-19T19:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: DIFFERENCE BET 'SY-UCOMM' AND 'OK-CODE'..?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-bet-sy-ucomm-and-ok-code/m-p/2138357#M450111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use SY-UCOMM when dealing with regular report programs.    USe OK_CODE in your screen(dynpro) programming.  Every dynpro allows you do specify the OKCODE for the screen, it is the field type "OK",  usually ABAPERs will name this field in the screen as OK_CODE.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They do the same thing,  SY-UCOMM is the system field which is to be used in interactive reporting,   OK_CODE more used for module pool programming or dialog programming.&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;Rich HEilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2007 19:31:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-bet-sy-ucomm-and-ok-code/m-p/2138357#M450111</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-04-19T19:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: DIFFERENCE BET 'SY-UCOMM' AND 'OK-CODE'..?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-bet-sy-ucomm-and-ok-code/m-p/2138358#M450112</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;for SY-UCOM:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbab0235c111d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbab0235c111d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for OK-CODE:&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.ittoolbox.com/groups/groups.asp?v=SAP-R3-DEV&amp;amp;i=201819" target="test_blank"&gt;http://sap.ittoolbox.com/groups/groups.asp?v=SAP-R3-DEV&amp;amp;i=201819&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2007 19:37:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-bet-sy-ucomm-and-ok-code/m-p/2138358#M450112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-19T19:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: DIFFERENCE BET 'SY-UCOMM' AND 'OK-CODE'..?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-bet-sy-ucomm-and-ok-code/m-p/2138359#M450113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;OK-CODE FIELD:&amp;lt;/b&amp;gt; :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also called function code field.&lt;/P&gt;&lt;P&gt; Internal work field for storing a defined function code.&lt;/P&gt;&lt;P&gt;When the user triggers a function in a transaction, the system copies the function code into the OK code field OK_CODE.&lt;/P&gt;&lt;P&gt;The contents of the field are evaluated in the corresponding PAI module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SY-UCOMM&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the system field.&lt;/P&gt;&lt;P&gt;Used to access the function code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shobana.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 11:33:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-bet-sy-ucomm-and-ok-code/m-p/2138359#M450113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T11:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: DIFFERENCE BET 'SY-UCOMM' AND 'OK-CODE'..?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-bet-sy-ucomm-and-ok-code/m-p/2138360#M450114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siva Reddy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sy-ucomm is for doing the functions what the user wishes to do at that particular event. You use it in menus and other place . this mainly in using &amp;lt;pfstatus&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok_code is generally used in screen as of I have used. You will define the function in the screen. and you can use it in the main program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok_code acts just as a temporary variable that stores the value of sy-ucomm. &lt;/P&gt;&lt;P&gt;When user interacts with the screen elements, the function code that you have assigned is filled in the sy-ucomm field which is turn gets reflected in OK_CODE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your ABAP programs, you should work with the OK_CODE field instead of SY-UCOMM. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reword  some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;P.Naganjana Reddy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 11:39:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-bet-sy-ucomm-and-ok-code/m-p/2138360#M450114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T11:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: DIFFERENCE BET 'SY-UCOMM' AND 'OK-CODE'..?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-bet-sy-ucomm-and-ok-code/m-p/2138361#M450115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;thanks  for clarifying my doubt,&lt;/P&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yours,&lt;/P&gt;&lt;P&gt;siva.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2007 14:18:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-bet-sy-ucomm-and-ok-code/m-p/2138361#M450115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-20T14:18:47Z</dc:date>
    </item>
  </channel>
</rss>

