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 SAPscript and Smart Forms

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close