SAP GUI_FILE_SAVE_DIALOG Function Module for









GUI_FILE_SAVE_DIALOG is a standard gui file save dialog SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for gui file save dialog FM, simply by entering the name GUI_FILE_SAVE_DIALOG into the relevant SAP transaction such as SE37 or SE38.

Function Group: SFES
Program Name: SAPLSFES
Main Program: SAPLSFES
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function GUI_FILE_SAVE_DIALOG pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'"
EXPORTING
* WINDOW_TITLE = "Window title
* DEFAULT_EXTENSION = "Default Extension
* DEFAULT_FILE_NAME = "Default File Name
* WITH_ENCODING = "
* FILE_FILTER = "File Type Filter Table
* INITIAL_DIRECTORY = "File Name to Save
* DEFAULT_ENCODING = "

IMPORTING
FILENAME = "
PATH = "
FULLPATH = "
USER_ACTION = "
FILE_ENCODING = "
.



IMPORTING Parameters details for GUI_FILE_SAVE_DIALOG

WINDOW_TITLE - Window title

Data type: STRING
Optional: Yes
Call by Reference: Yes

DEFAULT_EXTENSION - Default Extension

Data type: STRING
Optional: Yes
Call by Reference: Yes

DEFAULT_FILE_NAME - Default File Name

Data type: STRING
Optional: Yes
Call by Reference: Yes

WITH_ENCODING -

Data type: ABAP_BOOL
Optional: Yes
Call by Reference: Yes

FILE_FILTER - File Type Filter Table

Data type: STRING
Optional: Yes
Call by Reference: Yes

INITIAL_DIRECTORY - File Name to Save

Data type: STRING
Optional: Yes
Call by Reference: Yes

DEFAULT_ENCODING -

Data type: CPCODEPAGE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for GUI_FILE_SAVE_DIALOG

FILENAME -

Data type: STRING
Optional: No
Call by Reference: Yes

PATH -

Data type: STRING
Optional: No
Call by Reference: Yes

FULLPATH -

Data type: STRING
Optional: No
Call by Reference: Yes

USER_ACTION -

Data type: I
Optional: No
Call by Reference: Yes

FILE_ENCODING -

Data type: ABAP_ENCODING
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for GUI_FILE_SAVE_DIALOG Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_filename  TYPE STRING, "   
lv_window_title  TYPE STRING, "   
lv_path  TYPE STRING, "   
lv_default_extension  TYPE STRING, "   
lv_fullpath  TYPE STRING, "   
lv_default_file_name  TYPE STRING, "   
lv_user_action  TYPE I, "   
lv_with_encoding  TYPE ABAP_BOOL, "   
lv_file_filter  TYPE STRING, "   
lv_file_encoding  TYPE ABAP_ENCODING, "   
lv_initial_directory  TYPE STRING, "   
lv_default_encoding  TYPE CPCODEPAGE. "   

  CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'  "
    EXPORTING
         WINDOW_TITLE = lv_window_title
         DEFAULT_EXTENSION = lv_default_extension
         DEFAULT_FILE_NAME = lv_default_file_name
         WITH_ENCODING = lv_with_encoding
         FILE_FILTER = lv_file_filter
         INITIAL_DIRECTORY = lv_initial_directory
         DEFAULT_ENCODING = lv_default_encoding
    IMPORTING
         FILENAME = lv_filename
         PATH = lv_path
         FULLPATH = lv_fullpath
         USER_ACTION = lv_user_action
         FILE_ENCODING = lv_file_encoding
. " GUI_FILE_SAVE_DIALOG




ABAP code using 7.40 inline data declarations to call FM GUI_FILE_SAVE_DIALOG

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!