<?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: ok codes in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ok-codes/m-p/2571669#M587217</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&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;In your application programs, the first step in PAI processing should be to save the function code in an auxiliary variable and then initialize the OK_CODE field. You can then read the function code from the auxiliary variable (for example, using a CASE structure), and control the program flow from there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OK_CODE field can have a different name on each screen. However, common practice is to use the same name for the field on each screen of an ABAP program. You then only need one field in the ABAP program, with the same name, into which the function code is placed, and from which you can read it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Aug 2007 08:39:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-03T08:39:21Z</dc:date>
    <item>
      <title>ok codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ok-codes/m-p/2571666#M587214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can any body tell about the ok-code and all ok-codes in the sap. for what purpose '=ausw' is used for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 08:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ok-codes/m-p/2571666#M587214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-03T08:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: ok codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ok-codes/m-p/2571667#M587215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi raman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Whenever we interact on the screen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    a) press some button on toolbar&lt;/P&gt;&lt;P&gt;    b) select something from menu&lt;/P&gt;&lt;P&gt;    c) select a radiobutton or push some push button on screen&lt;/P&gt;&lt;P&gt;    d) press Enter&lt;/P&gt;&lt;P&gt;    e) etc..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Then to DETECT what has happened and which thing has been pressed/interacted,&lt;/P&gt;&lt;P&gt;   a simple code is pre-defined for each such actions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  That code is called OKCODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. It is totally dependent upon each program. We can give any code we like&lt;/P&gt;&lt;P&gt;    to each of the actions.&lt;/P&gt;&lt;P&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 08:36:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ok-codes/m-p/2571667#M587215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-03T08:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: ok codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ok-codes/m-p/2571668#M587216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi amith,&lt;/P&gt;&lt;P&gt;      can i know the particular ok-code from pushbutton, radiobutton, checkbox etc...on a particulsr screen. if yes how can i find out it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 08:38:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ok-codes/m-p/2571668#M587216</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-03T08:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: ok codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ok-codes/m-p/2571669#M587217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&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;In your application programs, the first step in PAI processing should be to save the function code in an auxiliary variable and then initialize the OK_CODE field. You can then read the function code from the auxiliary variable (for example, using a CASE structure), and control the program flow from there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OK_CODE field can have a different name on each screen. However, common practice is to use the same name for the field on each screen of an ABAP program. You then only need one field in the ABAP program, with the same name, into which the function code is placed, and from which you can read it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 08:39:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ok-codes/m-p/2571669#M587217</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-03T08:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: ok codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ok-codes/m-p/2571670#M587218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. supppose u want to know the fcode&lt;/P&gt;&lt;P&gt;for a button on toolbar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. then follow these simple steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) Take your mouse on the button&lt;/P&gt;&lt;P&gt;Left Click It&lt;/P&gt;&lt;P&gt;DO NOT RELEASE THE LEFT MOUSE BUTTON&lt;/P&gt;&lt;P&gt;Then Move Away your mouse pointer from the button,&lt;/P&gt;&lt;P&gt;then release the left mouse button&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b) In this manner, the button is SELECTED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(We can also do this using TAB TAB..)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c) Then just press F1 &lt;/P&gt;&lt;P&gt;d) a new small window will come &lt;/P&gt;&lt;P&gt;which will display the program name and fcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- If this is to be done in menu,&lt;/P&gt;&lt;P&gt;then select the menu and press Shift + F1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2007 08:52:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ok-codes/m-p/2571670#M587218</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-03T08:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: ok codes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ok-codes/m-p/2571671#M587219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. You have no idea how much time and grief you just saved me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2014 21:34:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ok-codes/m-p/2571671#M587219</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-01-29T21:34:35Z</dc:date>
    </item>
  </channel>
</rss>

