10-18-2007 11:37 AM
hi friends,
can any1 pls tell the name of the FM which asks where to download the file.
i am converting smartform to pdf and using FM convert_otf_2_pdf to convert.i want a pop-up window which will ask me where to store the pdf.
thank you.
10-18-2007 11:38 AM
10-18-2007 11:38 AM
10-18-2007 11:42 AM
HI,
DO THE FOLLOWING:
DATA: output_file TYPE string,
PARAMETER: p_ofile TYPE rlgrap-filename DEFAULT 'C:\TEST.PDF.
MOVE p_ofile TO output_file.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = output_file
filetype = 'ASC'
write_field_separator = ' '
TABLES
data_tab = i_output
EXCEPTIONS
file_open_error = 1
file_write_error = 2
OTHERS = 3.
10-18-2007 11:45 AM
10-18-2007 11:50 AM
Hi
try this
&----
*& Form get_file_name
&----
To get the File name
----
--->pv_fname File name
----
FORM get_file_name USING pv_fname TYPE rlgrap-filename.
DATA: lwa_files TYPE filetable,
lwa_title TYPE string,
l_file TYPE file_table,
lw_subrc TYPE sy-subrc.
lwa_title = text-099.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = lwa_title
CHANGING
file_table = lwa_files
rc = lw_subrc
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
OTHERS = 4.
IF sy-subrc = 0.
READ TABLE lwa_files INTO l_file INDEX 1.
IF sy-subrc = 0.
pv_fname = l_file.
ENDIF."IF sy-subrc = 0.
ENDIF."IF sy-subrc = 0.
ENDFORM. " get_file_name
regards
Shiva
10-18-2007 11:59 AM
guys <b>f4_filename</b> will not help me.
i want a pop-up window which will ask me where to save the file and not where the file is saved.
10-18-2007 12:15 PM
Hi ,
Use the method file_save_dialog of the class CL_GUI_FRONTEND_SERVICES.
Regards
Arun
10-18-2007 12:07 PM
10-18-2007 12:19 PM
Hi,
Refer to the following code:
DATA: it_tab TYPE filetable,
wf_subrc TYPE i.
DATA: wf_filter TYPE string,
wf_dir TYPE string,
wf_title TYPE string,
wf_ext TYPE string.
if p_ml = 'X'. "Manula Load - PC File
wf_title = text-012. "Window title
wf_ext = text-013. "Extension of the file
wf_filter = text-014. "File Type
wf_dir = wf_pcfile. "Directory
*Adds a GUI-Supported Feature
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = wf_title
default_extension = wf_ext
file_filter = wf_filter
initial_directory = wf_dir
CHANGING
file_table = it_tab
rc = wf_subrc.
LOOP AT it_tab INTO p_p_pc .
ENDLOOP.
Hope this helps.
Reward if helpful.
Regards,
Sipra