<?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: Diff bet OK-CODE and SY-UCOMM in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262172#M490444</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;&amp;lt;b&amp;gt;sy-ucomm&amp;lt;/b&amp;gt; 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;&amp;lt;b&amp;gt;ok_code&amp;lt;/b&amp;gt; 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;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2772622"&gt;&lt;/A&gt;&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 May 2007 06:47:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-18T06:47:25Z</dc:date>
    <item>
      <title>Diff bet OK-CODE and SY-UCOMM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262168#M490440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear all,&lt;/P&gt;&lt;P&gt;can any one help me regarding, when to use OK-CODE and when to SY-UCOMM. is any difference regarding usage?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 03:49:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262168#M490440</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T03:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Diff bet OK-CODE and SY-UCOMM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262169#M490441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 03:51:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262169#M490441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T03:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Diff bet OK-CODE and SY-UCOMM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262170#M490442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Venkata , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    In simple words , OK_Code is a variable used to keep the system user command values , which is nothing but sy-comm. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  you use it like this ina  screen or any operation  : &lt;/P&gt;&lt;P&gt;  eg :  &lt;/P&gt;&lt;P&gt;data: ok_code like sy-ucomm .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in PAI at user-command event ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok_code = sy-ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case ok_code .&lt;/P&gt;&lt;P&gt;   when  'SAVE'.&lt;/P&gt;&lt;P&gt;     w3rite logic for saving .&lt;/P&gt;&lt;P&gt;   when 'EXIT'.&lt;/P&gt;&lt;P&gt;    write logic for exit .&lt;/P&gt;&lt;P&gt;   when 'BACK'.&lt;/P&gt;&lt;P&gt;    write logic for back .&lt;/P&gt;&lt;P&gt;endcase ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  hope this clears your concept .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ranjita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 04:18:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262170#M490442</guid>
      <dc:creator>former_member196299</dc:creator>
      <dc:date>2007-05-18T04:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Diff bet OK-CODE and SY-UCOMM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262171#M490443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sy-ucomm is the system variable, which is maintained by the system automatically. U need take care of that variable. U ca find the Function-Code that was pressed on a particular screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok_code is an variable which u have  to maintain(means u have to declare and initialize). Usually it is used to copy the sy-ucomm in the PAI and clear the sy-ucomm. Because the value should not be processed in the next screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as it is general variable. it cna be 'okcode' also.&lt;/P&gt;&lt;P&gt;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 06:46:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262171#M490443</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T06:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Diff bet OK-CODE and SY-UCOMM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262172#M490444</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;&amp;lt;b&amp;gt;sy-ucomm&amp;lt;/b&amp;gt; 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;&amp;lt;b&amp;gt;ok_code&amp;lt;/b&amp;gt; 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;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2772622"&gt;&lt;/A&gt;&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 06:47:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262172#M490444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T06:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Diff bet OK-CODE and SY-UCOMM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262173#M490445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;if it is a varible (ok_code), instead of declaring like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: ok_code like sy-ucomm.&lt;/P&gt;&lt;P&gt;can't i use like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: xyz like sy-ucomm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please clear my query briefly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 06:59:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262173#M490445</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-18T06:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Diff bet OK-CODE and SY-UCOMM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262174#M490446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes definately you can declare like that ( XYZ) and use it ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ok_code is the standard variable provided by SAP for capturing the sy-ucomm values , that is why it is mostly declared as OK_CODE.&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;Ranjita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2007 09:00:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diff-bet-ok-code-and-sy-ucomm/m-p/2262174#M490446</guid>
      <dc:creator>former_member196299</dc:creator>
      <dc:date>2007-05-18T09:00:52Z</dc:date>
    </item>
  </channel>
</rss>

