<?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 Error ! No field defined for function Code in MENU EXIT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-no-field-defined-for-function-code-in-menu-exit/m-p/4174466#M998011</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've created a project in CMOD for the MENU EXIT for handling one menu item in the SAP Standard Menu Bar .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e  under the HELP MENU Item I've included one more sub menu item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've activated the project and I'm able to se the newly added Sub-Menu Item in the activated mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I press the newly created Sub Menu Item I'm getting a Message in the Status Bar saying :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;No field defined for the function code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Help of it says :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Message no. 00125

Diagnosis
The function code field (OK code field) has not been defined on this screen. If the user selects an application function (not a system function), the system usually provides it in the function code field (OK code field) as well as in SY-UCOMM. This is no longer possible.

System Response
The system is unable to inform the application of the current function code. The application should not use field SY_COMM. This field always contains the code of the last function chosen, which is not always identical to the application-relevant code.

Procedure
You should always define a field for the function code on every screen. The Screen Painter always proposes such a field (OK category), you only need to assign a name and include the definition in the ABAP program.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know what shud be done ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepu.K&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Jul 2008 07:54:28 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-17T07:54:28Z</dc:date>
    <item>
      <title>Error ! No field defined for function Code in MENU EXIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-no-field-defined-for-function-code-in-menu-exit/m-p/4174466#M998011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've created a project in CMOD for the MENU EXIT for handling one menu item in the SAP Standard Menu Bar .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e  under the HELP MENU Item I've included one more sub menu item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've activated the project and I'm able to se the newly added Sub-Menu Item in the activated mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I press the newly created Sub Menu Item I'm getting a Message in the Status Bar saying :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;No field defined for the function code&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Help of it says :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Message no. 00125

Diagnosis
The function code field (OK code field) has not been defined on this screen. If the user selects an application function (not a system function), the system usually provides it in the function code field (OK code field) as well as in SY-UCOMM. This is no longer possible.

System Response
The system is unable to inform the application of the current function code. The application should not use field SY_COMM. This field always contains the code of the last function chosen, which is not always identical to the application-relevant code.

Procedure
You should always define a field for the function code on every screen. The Screen Painter always proposes such a field (OK category), you only need to assign a name and include the definition in the ABAP program.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know what shud be done ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepu.K&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2008 07:54:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-no-field-defined-for-function-code-in-menu-exit/m-p/4174466#M998011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-17T07:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Error ! No field defined for function Code in MENU EXIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-no-field-defined-for-function-code-in-menu-exit/m-p/4174467#M998012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't use this scanrio ! Instead got Access Key and chamged the Std. Program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2008 17:27:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-no-field-defined-for-function-code-in-menu-exit/m-p/4174467#M998012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-02T17:27:30Z</dc:date>
    </item>
  </channel>
</rss>

