Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Evaluating customer Ok-codes in screen exits

Customer Ok-codes should always be evaluated during PAI of the main-screen.

A screen exit is used to add pushbuttons and table controls to a screen in an R/3 application. Customer (Z*) Ok-codes are assigned to those pushbuttons in the Screen Painter.

Customer Ok-codes should always be evaluated during PAI of the main-screen. If this is not possible, e.g. the main-screen does not provide a user-exit for Ok-code processing, Customer Ok-codes will have to be evaluated during PAI of the Screen Exit. However, the OK_CODE field of the main-screen is usually not available in Screen Exits and the SY-UCOMM field cannot be used as it is not overwritten by blank Ok-codes, such as scrolling in table controls (the use of the SY-UCOMM field can result in repetitive execution of Customer Ok-codes). The actual Ok-code can be obtained by calling system-function 'DYNP_OKCODE_GET'.
DATA okcode LIKE sy-ucomm.

CALL 'DYNP_OKCODE_GET' ID 'FCODE' FIELD okcode.
IF okcode(1) EQ '='.
  SHIFT okcode.
ENDIF.
This was last published in May 2003

Dig Deeper on SAP development and programming languages

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchHRSoftware

Close