Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FUNCTION MODULE

Former Member
0 Likes
567

Hi

GUI_FILE_SAVE_DIALOG.

THE ABOVE FUNCTION MODULE USE AND WHAT VARIABLE IS GOING TO PASS IN THAT.

LET ME KNOW .

5 REPLIES 5
Read only

Former Member
0 Likes
543

This function module opens a pop-up requesting for a path where a file can be or is to be saved.

All the import parameters are optional. If there is a deafult file name, then it can be passed in the parameter DEFAULT_FILE_NAME. Similarly, if there is a default file type, it can be passed in the parameter FILE_FILTER.

Export Parameters:

FILENAME: Returns the file name selected/entered in the pop-up.

PATH: Returns the path selected in the pop-up

FULLPATH: Returns the full path. i.e. Path followed by filename.

Please mark points if the solution was useful.

Regards,

Manoj

Read only

Former Member
0 Likes
543

in 4.6c this function module does not exist...

in ur system please check in where used list so u can know which parameters u have to pass....

thanks,

maheedhar.t

Read only

Former Member
0 Likes
543

This function module is to save the file in the specified file path.

Nowmally if u try to save a text document or word whatever may be it will open one \dialog box where u can specify the place where u want to store the file.

This functionj module is for the same purpose.

WINDOW_TITLE: is the Title of the file Save dialog box.( Test window)

DEFAULT_FILE_NAME : File name (TEST.TXT)

INITIAL_DIRECTORY : Path ( C:\)

Read only

Former Member
0 Likes
543

hi Ramesh,,

Use it in this way


  CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
    IMPORTING
      FULLPATH                = V_FILENAME
      USER_ACTION             = V_RETCODE
    EXCEPTIONS
      OTHERS                  = 1.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ELSEIF V_RETCODE = 9.
    <b>MESSAGE E000 WITH 'Action cancelled'.</b>
    EXIT.
  ENDIF.

Read only

former_member189059
Active Contributor
0 Likes
543

DATA: filename TYPE string.
DATA: path TYPE string.
DATA: fullpath TYPE string.


CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
 EXPORTING
   window_title            = 'Save a File'
   default_extension       = '.jpg'
*   DEFAULT_FILE_NAME       =
*   WITH_ENCODING           =
*   FILE_FILTER             =
   initial_directory       = 'C:'
 IMPORTING
   filename                = filename
   path                    = path
   fullpath                = fullpath
*   USER_ACTION             =
*   FILE_ENCODING           =
          .

WRITE:/ filename.
WRITE:/ path.
WRITE:/ fullpath.