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. 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:

*<TCODE><SPACE>FIELD_1=VALUE_1;FIELD_2=VALUE_2.......FIELD_N=VALUE_N;DYNP_OKCODE=OKCODE

If you i.e. use this with the ABAP editor SE38 and enter

*se38 RS38M-PROGRAMM=rsparam;DYNP_OKCODE=SHOP

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.

For ITS 6.20 standalone with i.e. R/3 Enterprise 4.7 the URL would be

http://ITS_HOST:ITS_PORT/scripts/wgate/webgui/!?~transaction=*se38 RS38M-PROGRAMM=rsparam;DYNP_OKCODE=SHOP

If you use SAP Netweaver 2004 or higher with integrated ITS the URL would be

http://WAS_HOST:WAS_PORT/sap/bc/gui/sap/its/webgui?~transaction=*se38 RS38M-PROGRAMM=rsparam;DYNP_OKCODE=SHOP

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.

Labels

its_howto its_howto Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.