No field defined for the function code

Message type: E = Error

Message class: 00 - VSO R/3 Message Texts

Message number: 125

Message text: No field defined for the function code



What causes this issue?

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.


How to fix this error?

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.

Error message extract from SAP system. Copyright SAP SE.