SAP Screen Personas
Create: Sushant Priyadarshi Aug 26, 2016 15:21
Last Update: Regina Sheynblat Feb 06, 2019 21:34
Using Function Codes in OK Field as "shortcuts"
SAP SCREEN PERSONAS KNOWLEDGE BASE - by Sushant Priyadarshi , Regina Sheynblat
This document will show you how to use Function Codes in the OK Field command to perform some of the actions in a particular transaction/screen.
Every program associated with a transaction has a list of functions (function codes) which can be triggered from OK field command. The list of function codes which can be used for a program can be found in transaction SE41. You can use these function codes in OK Field field directly to perform their assigned action.
Example used in this document : In ME21N, there are 3 expand/collapse containers. We will use function codes to expand the Header Container and add it as onLoad script.
So will these "shortcuts" increase a bit of performance? May be yes for some use cases. For example, to complete a certain step in your script, you have to press 2 buttons. If the same step can be done using the function code, it will certainly help boost the performance.
Steps to expand/collapse containers in ME21N
- Goto transaction ME21N and find out the Program Name. Copy the highlighted program Name as shown below.
- Goto transaction SE41, put the program name and click on the radio "Function List". Display
- In the resulting screen, make a note of the function codes used for the Header, Overview and Item sections for expanding and collapsing, for instance we will be using the expand function for the Header section - METOGGON1
In Scripting, you can put something like as shown below. In our example, I will put this script as onLoad screen event so that Header section is always expanded when the user launches this flavor
SAP Screen Personas Scripting