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.
SAP Note 651600 - Starting applications with desktop shortcuts
If you call a WebGUI URL as per the following example to skip the first screen and you get a blank screen as a result, there are a few tips below in identifying what the issue is.
First recommendation. Test via A SAPGUI Shortcut.
It is important to do this as calling the following string example in the OkFieldCode (transaction field)in SAPGUI will result in success.
Why? This difference is outlined in SAP Note 1399324
The check as to whether or not users are allowed to start a transaction using the option "Skip Initial Screen" can be activated in a client-specific manner using this parameter.
This check is executed only if the transaction was started using a shortcut (SAP GUI for Windows), using a start transaction (SAP GUI for Java), or using a URL (SAP GUI for HTML).
This SAPGUI Shortcut passes the same parameters as the above STRING called in the OKFieldCode
If the SAPGUI Shortcut as per below screenshot does not result in success.
and one gets the following Status Bar Message.
"Skip Initial Screen" is not permitted for transaction SWNWIEX
The reason for this, is that the parameter dynp/checkskip1screen needs to be activated.
Also important to restart the system as the parameter dynp/checkskip1screen is NOT a dynamic parameter.
Once this is activated and the SAPGUI Shortcut works correctly by skipping the first screen in SAPGUI, then one should retest the WebGUI URL.
The Status Bar message will only be viewed via SAPGUI screen (but not via Webgui in the Browser when calling the parameters via a URL ) when attempting to launch the Shortcut
SAP Note 1399324 - Profile parameter dynp/checkskip1screen
SAP Note 2562022 - Error during execution of work item - "Skip Initial Screen" is not permitted for transaction
Further troublehshooting if dynp/checkskip1screen is activated
If the dynp/checkskip1screen is activated but now when you call the following URL
you get the following Warning POPUP (Text of the popup is listed in the right hand side pane of the table)
You are about to execute a link to an SAP
Do you want to continue executing this link?
Please check the following SAP Documentation: General Settings for Calling Transactions
The transaction(s) need to be added as exceptions in the table V_TSTCS.
The table V_TSTCS is client-specific, which means that the transaction must be entered in each affected client.
If the above entry in table V_TSTCS does not resolve.
Then you should check if the parameter dynp/confirmskip1screen should also be set.
Do a trace level 3 using the SM50 transaction on the WP TY. = DIA and select the following as per Screenshot below.
Then review the Work Process trace files in ST11 (important to reset the SM50 trace to level 1 after testing the Warning POPUP scenario)
If you see an entry similar to the following
Then review the SAP Note 1956086 - Profile parameter for XSRF protection
which outlines in more detail how the additional profile parameter "dynp/confirmskip1screen" can be configured.
See also SAP Note 1922712 SLDW: FAQ: Supplementary notes for whitelist maintenance
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.
In a WebGUI context, one can also restrict execution of transactions and dynp_codes.
See SAP NOTE 1501768 - ITS: Config. permitted or prohibited OK codes during start
And the WIKI: Service Parameters for the Integrated ITS