---
title: "  Handy SAP function module to automate user events "
author: "huang850625"
date: "2013-11-28T09:49:24Z"
tags: []
categories: ["行业应用"]
slug: "handy-sap-function-module-to-automate-user-events"
draft: false
lastmod: "2013-11-28T09:49:24Z"
id: 1982167
url: "https://wabaper.iteye.com/blog/1982167"
---

*Begin-Auto triggers ENTER command

    CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'

       EXPORTING

            functioncode           = 'ENTER'

       EXCEPTIONS

            function_not_supported = 1

            OTHERS                    = 2.


*End-Auto triggers ENTER command




Similarly we can work around with standard function codes (viz.,SAVE,EXECUTE etc.) and custom function codes (which we add in push button,radio button,hyperlink etc.) with this wonderful FM.


refer to:http://scn.sap.com/community/abap/blog/2013/07/31/handy-sap-function-module-to-automate-pai-events