SAP Function SAPGUI_SET_FUNCTIONCODE - Set a function code and continue processing

Parameter Reference Type Length Default Optional Text
FUNCTIONCODE C C 0 '=' X Function Code

Exception Text
FUNCTION_NOT_SUPPORTED Not supported on this front end platform

Functionality
This module simulates user input in the command field. This enables youto run screen sequences without user input.

Example
A screen contains a single output field:
Counter ____
with the field reference "count".
This field is changed in the single flow logic module:
process before output.
module pbo.
and the default function code "=" is processed:
module pbo output. add 1 to count. if count > 20.
leave to screen 0.
endif.
call function 'SAPGUI_SET_FUNCTIONCODE'.
endmodule.

Notes
Since the function SAPGUI_SET_FUNCTIONCODE is not implemented for allfront end platforms, you may need to use a substitute solution. Forexample:
call function 'SAPGUI_SET_FUNCTIONCODE' exporting functioncode = 'ABCD'
exceptions function_not_supported = 1.
if sy-subrc <> 0. suppress dialog. endif. "For Motif etc.

Description
This function code is processed as a command field command by SAPgui.It processes the function codes exactly as you would enter them. Thismeans that as well as entering "abcd" for a transaction, you can alsoenter "/h" for debugging or ".xyz" for menu fastpaths.
However, the function code " " is not processed as ENTER, but isignored. Instead, you must use "=" as the function code (see alsodefault).

Default
"=" is the default function code (equivalent of ENTER).

1754283Asynch. F-Code lost because of addit. data request by ALV
1459729Asynchronous F-Code is lost becauce of an auto-resize