FILE_SAVE_DIALOG

Use

Displays a file save dialog on the client PC that allows the user to select a folder and specify a name for a file. The file save dialog only provides a graphical interface and no operation is directly associated with it. What is to be done with the file whose name is transferred to server is up to the application that opened the file dialog.

The dialog displayed is an operating system dialog and is therefore not scriptable. In order to guarantee scriptability, please use the function module GUI_FILE_SAVE_DIALOG instead of calling CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG directly.

Arguments

[IMPORTING] window_title TYPE STRING

Title to be displayed on dialog.

This is an optional parameter.

[IMPORTING] default_extension TYPE STRING

The default extension is the extension that should be selected initially when die file dialog is displayed. Unlike in the filter string the default extension is specified without "*." at the beginning. With other words, only the characters of the extension itself are specified here.

This is an optional parameter.

[IMPORTING] default_file_name TYPE STRING

Name of file to be initially displayed. The file name specified here will also be displayed if no file with that name exists in the initial directory.

This is an optional parameter.

[IMPORTING] with_encoding TYPE ABAP_BOOL

Flag indicating whether an additional field should be displayed in the file dialog which allows the selection of an encoding in which the selected files have been stored. This parameter is another optional parameter.

[IMPORTING] file_filter TYPE STRIN

Character string that contains a list of file filters. For more information on the format of the file filter string, see SAP Note 991104 Information published on SAP site.

This is an optional parameter.

[IMPORTING] initial_directory TYPE STRING

Directory to be displayed initially when the file dialog is displayed.

This is an optional parameter.

[IMPORTING] prompt_on_overwrite TYPE ABAP_BOOL

Flag indicating whether a popup should be displayed if a file name is specified for which a file already exists. This option is activated by default.

[CHANGING] filename TYPE STRING

Name of file specified by user. This is the file name without any path information.

[CHANGING] path TYPE STRING

Path of directory in which file is to be stored.

[CHANGING] fullpath TYPE STRING

Fully-Qualified File Name

[CHANGING] user_action TYPE I

Indicates whether the user specified a file name or aborted the file dialog.

This is an optional parameter.

Possible values:

  • ACTION_OK

    the user specified a file name. (= 0)

  • ACTION_CANCEL

    the user aborted the file dialog. (= 9)

[CHANGING] file_encoding TYPE ABAP_ENCODING

Encoding of files selected. Optional parameter.

Exceptions

CNTL_ERROR

This exception is raised if calling one of the required front end methods fails.

ERROR_NO_GUI

Not currently used.

NOT_SUPPORTED_BY_GUI

Raised if neither Windows nor Java nor Web GUI is used.