09-18-2007 9:51 AM
Hi all,
My requirement is to replace download function module with cl_gui_frontend_services=>file_save_dialog.
When i give the window title it is not getting reflected in the save dialog box.how am i to get it ?
thanks in advance.
09-18-2007 9:56 AM
class cl_gui_frontend_services definition load.
<b>data : l_title type string value 'FILE SAVE',</b>
l_fname type string,
l_path type string,
l_fpath type string,
l_enc type abap_bool value 'X',
l_ini type string value 'C:\',
l_usr type i ,
l_dname type string . " value 'C:\abc.xls'.
data :begin of idata_tab occurs 10,
a1 type c value 'A',
b1 type c value 'B',
c1 type c value 'C',
end of idata_tab.
move p_fname to l_dname.
call method cl_gui_frontend_services=>file_save_dialog
exporting
<b>window_title = l_title</b>
default_file_name = l_dname
with_encoding = l_enc
INITIAL_DIRECTORY = L_INI
changing
filename = l_fname
path = l_path
fullpath = l_fpath
user_action = l_usr
exceptions
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3 .
09-18-2007 10:00 AM
Hi Prashant,
I even tried executing the class directly from SE24, it is not reflecting the window title,can you please suggest me on this?
09-18-2007 10:02 AM
Hello ,
I tried the method and it is getting reflected.
data : v_file type string ,
v_file1 type string ,
v_file2 type string ,
v_title type string.
v_title = 'Test program'.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
WINDOW_TITLE = v_title
* DEFAULT_EXTENSION =
* DEFAULT_FILE_NAME =
* FILE_FILTER =
* INITIAL_DIRECTORY =
CHANGING
filename = v_file
path = v_file1
fullpath = v_file2
* USER_ACTION =
* EXCEPTIONS
* CNTL_ERROR = 1
* ERROR_NO_GUI = 2
* others = 3
.
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
Arun
09-18-2007 10:11 AM
09-18-2007 10:16 AM
Hi ,
Could you paste your code here so that we can find the reason for it not getting displayed.
Regards
Arun