<?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 b/w ok_code and sy-ucomm in module pool ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949196#M944229</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Difference b/w ok_code and sy-ucomm&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;It is not obligatory that you write OK_CODE, it is just a denomination from SAP. You can declare any name for the variable in your code that is going to trap the transaction code of the button that the user pressed.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OK_CODE is used in SAP Dialog Programming, while SY-UCOMM is used all around SAP (classes, SAP Dialog Programming, ABAP, forms, and a long etc.).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;receive the contents of the corresponding screen fields means the transaction code that you assign at development time to the objects on the screen, which should trigger an event (buttons tipically or folders in a folder control).&lt;/STRONG&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;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 May 2008 06:38:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-29T06:38:59Z</dc:date>
    <item>
      <title>difference b/w ok_code and sy-ucomm in module pool ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949192#M944225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hai abap gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; ok_code and sy-ucomm store the function code of the element.. then y do v use ok-code in the program. y dont v use sy-ucomm... pls clear my doubt...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 06:25:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949192#M944225</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T06:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w ok_code and sy-ucomm in module pool ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949193#M944226</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;During internal processing value of sy-ucomm may change. So we store its value in ok_code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 06:31:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949193#M944226</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T06:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w ok_code and sy-ucomm in module pool ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949194#M944227</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 are the same. they contain fct code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as sy-ucomm is a system variable its value keeps on changing &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so if its a push button sysytem places the fct code in ok_code(screen specific) for further usage&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;prasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 06:31:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949194#M944227</guid>
      <dc:creator>prasanth_kasturi</dc:creator>
      <dc:date>2008-05-29T06:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w ok_code and sy-ucomm in module pool ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949195#M944228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-UCOMM and OK_CODE both stored function code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK_CODE is screen specific; if you have declared in a screen it will contain values for that screen. And if screen changes the value will not change or does not conatin next screen's function code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY_UCOMM contains both screen's fcode and does not depend on screen or any other object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Krishnendu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 06:34:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949195#M944228</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T06:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w ok_code and sy-ucomm in module pool ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949196#M944229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Difference b/w ok_code and sy-ucomm&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;It is not obligatory that you write OK_CODE, it is just a denomination from SAP. You can declare any name for the variable in your code that is going to trap the transaction code of the button that the user pressed.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OK_CODE is used in SAP Dialog Programming, while SY-UCOMM is used all around SAP (classes, SAP Dialog Programming, ABAP, forms, and a long etc.).&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;receive the contents of the corresponding screen fields means the transaction code that you assign at development time to the objects on the screen, which should trigger an event (buttons tipically or folders in a folder control).&lt;/STRONG&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;Raj.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 06:38:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949196#M944229</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T06:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w ok_code and sy-ucomm in module pool ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949197#M944230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both are same and contains function code&lt;/P&gt;&lt;P&gt;diff:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) OK_CODE is of type SY-UCOMM created with screen by default.&lt;/P&gt;&lt;P&gt;but SY-UCOMM is present in the DDIC structure (SYST structure) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) when some even occurs, SY-UCOMM is set with the value and we need to explicitly assign the value to the OK_CODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in short ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK_CODE is a screen element and SY-UCOMM is present inthe  general DDIC structure SYST which is also called system field table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Reji Prabhakaran Konnasseri on May 29, 2008 8:40 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 06:40:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949197#M944230</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T06:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w ok_code and sy-ucomm in module pool ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949198#M944231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what will happen if v use sy-ucomm instead of ok_code ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 May 2008 06:57:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949198#M944231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-29T06:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: difference b/w ok_code and sy-ucomm in module pool ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949199#M944232</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;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>Thu, 29 May 2008 07:05:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-b-w-ok-code-and-sy-ucomm-in-module-pool/m-p/3949199#M944232</guid>
      <dc:creator>prasanth_kasturi</dc:creator>
      <dc:date>2008-05-29T07:05:04Z</dc:date>
    </item>
  </channel>
</rss>

