SAP Function Modules

Share |

SAPGUI_SET_FUNCTIONCODE SAP Function module - Set a function code and continue processing

Pattern for FM SAPGUI_SET_FUNCTIONCODE - SAPGUI SET FUNCTIONCODE
Associated Function Group: SGUI
Released Date: 21.08.1997
CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE' "Set a function code and continue processing
* EXPORTING
*   functioncode = '='          " c             Function Code
  EXCEPTIONS
    FUNCTION_NOT_SUPPORTED = 1  "               Not supported on this front end platform
    .  "  SAPGUI_SET_FUNCTIONCODE

SAP Documentation for FM SAPGUI_SET_FUNCTIONCODE


FUNCTIONALITY

This module simulates user input in the command field. This enables you to 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.


HINTS
Since the function SAPGUI_SET_FUNCTIONCODE is not implemented for all front end platforms, you may need to use a substitute solution. For example:

call function 'SAPGUI_SET_FUNCTIONCODE' exporting functioncode = 'ABCD'
exceptions function_not_supported = 1.
if sy-subrc <> 0. suppress dialog. endif. "For Motif etc.
Documentation extract taken from SAP system, Copyright (c) SAP AG






Share |