Program Execution/Document Display

Use

EXECUTE

Executes a program, displays a file or executes an operation on a file, e.g. print.

Arguments

[IMPORTING] document TYPE STRING

Document to operate on. If a path is specified for the file, it can either be relative or absolute but it may not contain environment variables.

[IMPORTING] application TYPE STRING

Application to start. Environment variables in the program name are not allowed.

[IMPORTING] parameter TYPE STRING

Command line parameters for the application to start.

IMPORTING] default_directory TYPE STRING

Working directory to set for application.

[IMPORTING] maximized TYPE STRING

Flag indicating whether the application should be started with maximized window.

Possible values:

  • ' '

    application window should not be maximized

  • 'X'

    application window should be maximized

[IMPORTING] minimized TYPE STRING

If the application should be started minimized, this flag needs to be set.

Possible values:

  • ' '

    application window should not be minimized

  • 'X'

    application window should be minimized

[IMPORTING] synchronous TYPE STRING

Flag indicating whether the ABAP application should wait for the external program to finish or not.

Possible values:

  • ' '

    ABAP application should continue operation without waiting for the external application started to finish

  • 'X'

    ABAP applications needs to wait for the external program to terminate

[IMPORTING] operation TYPE STRING

Operation to execute on specified program/document.

Exceptions

BAD_PARAMETER

This exception is raised, if both an application and a document, the options maximized and minimized or a document and command line parameters are specified at the same time.

CNTL_ERROR

Raised if the calling the required client method fails.

ERROR_EXECUTE_FAILED

This exception is thrown if an error occurred while trying to start the program/execute the operation.

ERROR_NO_GUI

Currently not used.

FILE_EXTENSION_UNKNOWN

If the file type is unknown and no application is associated with the file type, this exception will be fired.

FILE_NOT_FOUND

Thrown if the specified file was not found.

NOT_SUPPORTED_BY_GUI

Raised if neither Windows nor Java nor Web GUI is being used or the synchronous flag is specified when a Web GUI is being used.

PATH_NOT_FOUND

This exception is thrown if the specified file path could not be found.

SYNCHRONOUS_FAILED

Raised if it is not possible to wait for the operation to complete.