Often it is desired to prefill fields of a screen and skip this screen by triggering an okcode. This article describes how to do this with ITS.
How to prefill fields and skip first screen with webgui?
Often it is desired to prefill fields of a screen and skip this screen by triggering an okcode. The SAP kernel provides a special okcode functionality which can be used with webgui and SAP GUI. You have to create a okcode with the following syntax:
If you i.e. use this with the ABAP editor SE38 and enter
in the transaction code field of webgui or SAP GUI, the ABAP editor will be started with directly showing the ABAP code of RSPARAM. You can also make use of this in the URL with the well known ~transaction parameter
After authenticating the user, the SAP system will automatically process the transaction and skip the first screen.
Parameter ~okcode is obsolete for skipping screens
Many of you may know, that the parameter ~okcode provides a similar functionality with ITS 6.20. However it is not recommended anymore to use it for skipping screens. One reason is, that the solution discussed above provides much more performance because it avoids superfluous roundtrips between the SAP kernel an ITS 6.20. The other is that with SAP Netweaver 2004 and above the ~okcode syntax no longer works in any case. Therefore just forget screen skipping with ~okcode and make use of the method described above.