04-24-2009 6:48 AM
Hi All,
Im trying to use the below method, what are all the parameters need to fill and hw to declare those parameters.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
WINDOW_TITLE =
DEFAULT_EXTENSION =
DEFAULT_FILE_NAME =
FILE_FILTER =
INITIAL_DIRECTORY =
WITH_ENCODING =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
filename =
path =
fullpath =
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Puppy.
04-24-2009 6:58 AM
data:
lws_filename type string,
lws_filepath type string,
lws_tot_filename type string.
call method
cl_gui_frontend_services=>file_save_dialog
EXPORTING
WINDOW_TITLE = 'TITLE'
changing
filename = lws_filename
path = lws_filepath
fullpath = lws_tot_filename
exceptions
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
others = 4.
if sy-subrc ne 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
Regards,
Gurpreet
04-24-2009 6:52 AM
Hi,
What is your requirement.
In my case i had to replace obsolete FM Download with new FM GUI_DOWNLOAD.
So i used this file_save_dialog method.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
default_file_name = l_p_out1_new
CHANGING
filename = l_filename
path = l_path
fullpath = l_fullpath.
IF sy-subrc <> 0.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_fullpath
filetype = 'ASC'
append = 'X'
TABLES
data_tab = t_output
EXCEPTIONS
OTHERS = 1.
Hope this helps.
04-24-2009 6:56 AM
CALL METHOD cl_gui_frontend_services=>file_save_dialog
CHANGING
filename = file_name
path = file_path
fullpath = full_path
user_action = act
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
OTHERS = 3
04-24-2009 6:58 AM
data:
lws_filename type string,
lws_filepath type string,
lws_tot_filename type string.
call method
cl_gui_frontend_services=>file_save_dialog
EXPORTING
WINDOW_TITLE = 'TITLE'
changing
filename = lws_filename
path = lws_filepath
fullpath = lws_tot_filename
exceptions
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
others = 4.
if sy-subrc ne 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
Regards,
Gurpreet
04-24-2009 7:06 AM
Hi ,
copy this code and try this , after executing this code ypu will get the path into " lv_fullpath " .
and then pass this lv_fullpath to next function module like gui_download .
DATA: v_name TYPE string,
v_file TYPE rlgrap-filename,
lv_filename TYPE string,
lv_filen TYPE string,
lv_path TYPE string,
lv_fullpath TYPE string.
* MOVE v_name TO lv_filename.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
* WINDOW_TITLE =
* DEFAULT_EXTENSION =
* default_file_name = lv_filename
* WITH_ENCODING =
* FILE_FILTER =
* INITIAL_DIRECTORY =
* PROMPT_ON_OVERWRITE = 'X'
CHANGING
filename = lv_filen
path = lv_path
fullpath = lv_fullpath
* USER_ACTION =
* FILE_ENCODING =
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards,
Aby.