APPEND cl_gui_frontend_services file_save_dialog
Hi,
with old functions DOWNLOAD it was possible to append a file to an existing,
how can I do this using method file_save_dialog of the class cl_gui_frontend_services?
Please help me!
Thanks
Lara
Hello Lara,
file_save_dialog doesn't have this option but gui_download from cl_gui_frontend_services has it (append).
Regards, Martin
Similar Messages
-
Hello Experts,
Is there a way to disable the 'Cancel' button in method 'FILE_SAVE_DIALOG' of class
cl_gui_frontend_services? Because in our requirement, the saving of the file is mandatory.
Thank you guys and take care!HI, Viraylab
Use the Logic Bellow it will solve out your problem, using following you must provide a file name other wise after selecting Cancel button this dialog will appear again.
PERFORM save_dialog.
*& Form save_dialog
* text
FORM save_dialog.
DATA: filename TYPE string,
path TYPE string,
fullpath TYPE string.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = 'Select File Name'
CHANGING
filename = filename
path = path
fullpath = fullpath
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.
IF filename IS INITIAL.
PERFORM save_dialog.
ENDIF.
ENDFORM. "save_dialog
Please Reply if any Issue,
Best Regards,
Faisal -
Hi Guys,
I am saving Invoice Output type into local PDF file and using CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG to give user the choice where to save the file. It gives an abap short dump "Access not possible using 'NULL' object reference". and update is terminated in the same method.
I think output types are executing in Update Taks.
It's working fine when used in other programs(Normal)
Suggestions are Welcome. Thanks! Vijender
The code is :
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE = 'Save PDF File'
DEFAULT_EXTENSION = 'PDF'
DEFAULT_FILE_NAME = LV_NAME_INIT
FILE_FILTER = '*.PDF'
INITIAL_DIRECTORY = 'C:'
PROMPT_ON_OVERWRITE = 'X'
CHANGING
FILENAME = LV_FNAME
PATH = LV_PATH_FOLDER
FULLPATH = LV_FILE_NAME
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4.HI, Viraylab
Use the Logic Bellow it will solve out your problem, using following you must provide a file name other wise after selecting Cancel button this dialog will appear again.
PERFORM save_dialog.
*& Form save_dialog
* text
FORM save_dialog.
DATA: filename TYPE string,
path TYPE string,
fullpath TYPE string.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = 'Select File Name'
CHANGING
filename = filename
path = path
fullpath = fullpath
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.
IF filename IS INITIAL.
PERFORM save_dialog.
ENDIF.
ENDFORM. "save_dialog
Please Reply if any Issue,
Best Regards,
Faisal -
Question for cl_gui_frontend_services= file_save_dialog
Hi Expert.
I made simple test page.
there is nothing but this code in oninitlization
* event handler for data retrieval
DATA: ld_filename TYPE string,
ld_path TYPE string,
ld_fullpath TYPE string,
ld_result TYPE i.
* Display save dialog window
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
* window_title = ' '
DEFAULT_EXTENSION = 'XLS'
default_file_name = 'accountsdata'
INITIAL_DIRECTORY = 'c:temp'
CHANGING
filename = ld_filename
path = ld_path
fullpath = ld_fullpath
* Check user did not cancel request
CHECK ld_result EQ '0'.
and that shows
"method:FILE_SAVE_DIALOG ,line : 164
An attempt was made to execute a dynamic method callon an initial(NULL-) object reference. The reference must refer to an object."
why this error caught?
Did I miss something or made mistake BSP code above?
should I create some object before call cl_gui_frontend_services=>file_save_dialog?
I don't have any clue on this.
help me please. thanks .Oh yes - this most certainly will not work from BSP. This class and any other that uses the control framework are written as proxy objects to code that actually executes as part of the SAPGui on the client machine.
BSP is completly web centric. Its output can only be ran in a browser. To the browser the output of BSP doesn't look any different than any other web page that might come from ASP, JSP, PHP, etc.
Also because BSP runs in a browser - the amount of interaction that can occur with the client (particularly around file downloads) is somewhat limited. There is no file download element or a file save as dialog object. There are other ways to attach content to an HTTP Response or place it in a hidden iFrame - the browser is then responsible for intrepting this information and offering the file save as or open dialog based upon the appropriate MIME Type.
This weblog is the primer on BSP downloads written by the Jedi Master himself:
<a href="/people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents:///people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents
If you search you will find other examples in the older BSP weblogs as well. -
CALL METHOD cl_gui_frontend_services= file_save_dialog
Hi,
I want to use 'CALL METHOD cl_gui_frontend_services=>file_save_dialog', to choose a path for saving my txt files. I only want the user to be able to choose the path and not have to supply a filename aswell. My filenames are standard in the program and I don't want them to be changed by the user.
Is there another method which is designed for this or is there a simple parameter I have missed?
Thanks and regards,
Simon.AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_f.
PERFORM f_search_help_pa_f1.
FORM f_search_help_pa_f1 .
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
program_name = sy-repid
dynpro_number = sy-dynnr
CHANGING
file_name = pa_f
EXCEPTIONS
mask_too_long = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f_search_help_pa_f1
Try this
Regards -
Cl_gui_frontend_services= file_save_dialog?
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.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. -
hi all, i'm using the: cl_gui_frontend_services=>file_save_dialog class and method..
My question, how can i do for RESTRICT the file extension of the file JUST to '.txt' ?? if the user select the name of the file to create to 123.pdf -for example- that the system don't let him to continue, or just add the txt extension to the final of the filename.. -like 123.pdf.txt ??
Thanks!!Hi Pampeano,
i I have created a small code snippet :-
LV_FILENAME TYPE STRING,
LV_FULLPATH TYPE STRING,
LV_PATH TYPE STRING,
LV_ACTION TYPE I,
LV_FILE TYPE STRING,
DEFAULT_EXTENSION TYPE STRING.
if DEFALUT_EXTENSION ne 'TXT'.
eRROR ........
ENDIF.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE = 'Please select the location'
DEFAULT_EXTENSION = DEAFAULT_EXTENSION
DEFAULT_FILE_NAME = LV_FILE
FILE_FILTER = '*.TXT'
CHANGING
FILENAME = LV_FILENAME
PATH = LV_PATH
FULLPATH = LV_FULLPATH
USER_ACTION = LV_ACTION
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
OTHERS = 3.
Regards
Abhii
Edited by: Abhii on Aug 17, 2010 7:44 AM
Edited by: Abhii on Aug 17, 2010 7:44 AM
Edited by: Abhii on Aug 17, 2010 7:44 AM
Edited by: Abhii on Aug 17, 2010 7:46 AM -
Question on cl_gui_frontend_services= file_save_dialog
Hi all,,, need your help.. thank you i n ad vance ..
why ist tht happen? the default extension, 'txt'
but the "save as type" in the dialog box shows 'XLS', excel file ??
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = 'Save file to'
DEFAULT_EXTENSION = 'txt'
default_file_name = v_filename
INITIAL_DIRECTORY = 'c:\'
CHANGING
filename = t_file
path = ld_path
fullpath = ld_fullpath
user_action = ld_result.you can do in this way....
in this case default is 'XLS' and he can choose all the files.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = l_title
default_extension = 'XLS'
file_filter = ' '
CHANGING
fullpath = l_fullpath
path = l_path
filename = l_filename
EXCEPTIONS
OTHERS = 1.
Regards
Vijay -
About file_save_dialog and gui_download
Hello experts,
I have made a report wherein I can let the users download the report to their PC. Now, they want it in such a way that they don't have to 'maximize' the width for each column so the data can be read clearly. Also, they want it to be defaulted in excel format.
below are the codes:
DATA: file_name TYPE string,
file_path TYPE string,
full_path TYPE string,
act TYPE i,
var1 TYPE string.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
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
*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.
IF act = 0.
var1 = full_path.
p_file = var1.
ENDIF.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = var1
filetype = 'ASC'
write_field_separator = 'X'
CHANGING
data_tab = it_download[]
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Again, thank you guys and take care!Hi,
Check this in that case....
REPORT testexcel .
INCLUDE ole2incl.
DATA: application TYPE ole2_object,
workbook TYPE ole2_object,
sheet TYPE ole2_object,
cells TYPE ole2_object.
CONSTANTS: row_max TYPE i VALUE 256.
DATA index TYPE i.
DATA: BEGIN OF itab1 OCCURS 0,
first_name(10),
last_name(10),
END OF itab1.
START-OF-SELECTION.
itab1-first_name = '123445'.
itab1-last_name = 'tesst'.
append itab1.
clear itab1.
itab1-first_name = '123446'.
itab1-last_name = 'tesst'.
append itab1.
clear itab1.
CREATE OBJECT application 'excel.application'.
SET PROPERTY OF application 'visible' = 1.
CALL METHOD OF application 'Workbooks' = workbook.
CALL METHOD OF workbook 'Add'.
* Create first Excel Sheet
CALL METHOD OF application 'Worksheets' = sheet
EXPORTING #1 = 1.
CALL METHOD OF sheet 'Activate'.
SET PROPERTY OF sheet 'Name' = 'Sheet1'.
LOOP AT itab1.
index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
SET PROPERTY OF cells 'Value' = itab1-first_name.
index = index + 1. " 1 - column name
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
SET PROPERTY OF cells 'Value' = itab1-last_name.
ENDLOOP.
* Save excel speadsheet to particular filename
CALL METHOD OF sheet 'SaveAs'
EXPORTING #1 = 'c:tempexceldoc1.xls' "filename
#2 = 1. "fileFormat
Regards
vijay -
GUI_DOWNLOAD doesnt prompt APPEND option
Dear all
APPEND option prompt window doesnt appear from GUI_DOWNLOAD.
Plz help.
Thnx
Moni
I m using this code
DATA: FILENAME TYPE STRING VALUE 'MULTI_PRINT.pdf',
PATH TYPE STRING VALUE 'C:\DESKTOP\',
FULLPATH TYPE STRING VALUE 'C:\DESKTOP\PDF\MULTI_PRINT.pdf'.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
* WINDOW_TITLE =
* DEFAULT_EXTENSION =
* DEFAULT_FILE_NAME =
* WITH_ENCODING =
* FILE_FILTER =
* INITIAL_DIRECTORY =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
filename = FILENAME
path = PATH
fullpath = FULLPATH.
USER_ACTION =
FILE_ENCODING =*
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4 .
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = FINAL_SIZE
FILENAME = FULLPATH
FILETYPE = 'BIN'
APPEND = 'X'
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = 'X'
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
IMPORTING
FILELENGTH = FINAL_SIZE
TABLES
DATA_TAB = T_FINAL_PDF
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF SY-SUBRC EQ 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
MESSAGE S031(ZQOTBANK) WITH 'PDF Generated Successfully'.
ENDIF.
Message was edited by: md monirujjamanIs this is entire code ? bcos I do not understand the code. You are trying to save a file and then trying to download something to a file . When you already saved the file using the
cl_gui_frontend_services=>file_save_dialog
why are yoiu trying to download again ?
In anycase you should get a prompt that asks you to something like "Do you want to overwrite ?" after you uncommented the CONFIRM_OVERWRITE = 'X' line .
Anu -
HOW TO USE Class Interface CL_GUI_FRONTEND_SERVICES
Dear All,
I am working to get output of SMARTFORMS through report into PDF file.Following code i am using inside LOOP.
*CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE =
DEFAULT_EXTENSION = 'PDF'
DEFAULT_FILE_NAME = 'PAYSLIP.pdf'
WITH_ENCODING =
FILE_FILTER =
INITIAL_DIRECTORY =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
FILENAME = W_FILE_NAME
PATH = W_FILE_PATH
FULLPATH = W_FULL_PATH
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.
*CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_BIN_FILESIZE
FILENAME = W_FILE_NAME
FILETYPE = 'BIN'
TABLES
DATA_TAB = T_PDF_TAB.
*IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
I am getting proper output through the above coding.
But problem is,if there will be a multiple PDF output it always ask the path to save each PDF file as i am using "FILE_SAVE_DIALOG"
I want all PDF files to save at once by giving default path of PC.
How can i do this, is there any other method i can use please
let me know...
Regards,
AnkurHi,
I have used following code..
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize =
filename =
filetype = 'ASC'
append = SPACE
write_field_separator = SPACE
header = '00'
trunc_trailing_blanks = SPACE
write_lf = 'X'
col_select = SPACE
col_select_mask = SPACE
dat_mode = SPACE
confirm_overwrite = SPACE
no_auth_check = SPACE
codepage = SPACE
ignore_cerr = ABAP_TRUE
replacement = '#'
write_bom = SPACE
trunc_trailing_blanks_eol = 'X'
wk1_n_format = SPACE
wk1_n_size = SPACE
wk1_t_format = SPACE
wk1_t_size = SPACE
IMPORTING
filelength =
changing
data_tab = T_PDF_TAB
but the error it is giving that "T_PDF_TAB is not a compatible type". -
Hi,
In sap gui was trigered action whih is using smartform and then output was being downloaded and saved as using:
CALL FUNCTION 'GUI_DOWNLOAD' - to
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
After the ubgrade this action is not working in web ui.
Anyone knows how to change this to work in web ui?
Thank you in advanceHi Tanja Lukovic
Pls check the settings defined in the SPRO path CRM->Basic settings->actions under this select your relevant application area and check whether any start/schedule conditions are not met (check in conditions) , apart from this reason there could be other reasons also pls check the trigger processing type (it should be smart form print).
if the actions are already created , you can change actions and conditions.
Thanks & Regards
Raj -
Cl_gui_frontend_services
How it possible to download file to excel with the column header by using the class cl_gui_frontend_services
Hi,
Please go through the following Thread hope will help you out,
[Download Data Into Excel File |Re: download data into excel file]
[Regarding CL_GUI_FRONTEND_SERVICES|Regarding CL_GUI_FRONTEND_SERVICES]
[CALL METHOD cl_gui_frontend_services=>file_save_dialog|Re: CALL METHOD cl_gui_frontend_services=>file_save_dialog]
Kind Regards,
Faisal -
Hello,
we are using cl_gui_frontend_services=>gui_download to create from an itab an excel file.
We face the issue that in this excel file german special characters like Ä, Ü, Ö, ß are not displayed correctly.
I think we need to use a different codepage. But which one?
could you please give us a short coding example how to call cl_gui_frontend_services=>gui_download.
Thanks a lot
Kind regards
ManfredHi,
Check the system is unicode or non-unicode . Codepage for Unicode system is ' 4102' and non-unicode is '1100'.
Below are the sample code for the GUI_download with Class.
DATA: l_filename TYPE string,
l_filen TYPE string,
l_path TYPE string,
l_fullpath TYPE string,
l_usr_act TYPE I.
l_filename = SPACE.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
DEFAULT_FILE_NAME = l_filename
CHANGING
FILENAME = l_filen
PATH = l_path
FULLPATH = l_fullpath
USER_ACTION = l_usr_act
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4.
IF sy-subrc = 0
AND l_usr_act <>
CL_GUI_FRONTEND_SERVICES=>ACTION_CANCEL.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = l_fullpath
FILETYPE = 'DAT'
TABLES
DATA_TAB = T_DOWNL
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
Edited by: Sumodh P on May 11, 2010 5:24 PM -
Hello,
I would like to set the file extension for cl_gui_frontend_services=>file_open_dialog such that my default extension in the file open dialogue is the .csv (comma-separated value) file. May I know how can I do that?
Thanks!
Regards,
AnyiHello,
Thanks for the quick reply.
Howeer, I tried to use the extension of CSV and the file dialogue opened up with .RTF (which is the default extension) instead.
Any comment on that?
Thanks!
Anyi
> HI,
>
> Here is the code
>
DATA: l_title TYPE string,
> l_dfext TYPE string,
> l_dfinm TYPE string,
> l_file TYPE string,
> l_path TYPE string,
> l_fpath TYPE string.
> le = 'SAVE FILE PATH'.
> l_dfext = 'csv'.
> l_dfinm = 'Error_Idoc'.
>
> CONCATENATE l_dfinm sy-datum sy-uzeit INTO l_dfinm
> SEPARATED BY '_'.
>
> CONCATENATE l_dfinm l_dfext INTO l_dfinm SEPARATED
> BY '.'.
>
> CALL METHOD
> cl_gui_frontend_services=>file_save_dialog
> EXPORTING
> window_title = l_title
> default_extension = l_dfext
> default_file_name = l_dfinm
> INITIAL_DIRECTORY = L_DIR
> CHANGING
> filename = l_file
> path = l_path
> fullpath = l_fpath
> CEPTIONS
> cntl_error = 1
> error_no_gui = 2
> OTHERS = 3.
> s,
> Richa
Maybe you are looking for
-
What do I needto do to connect a tv as an external display for my mbp using a mini display port to hdmi cable. I have tried display without success. tv is receiving a signal as displays apples default wallpaper when connected but nothing from scree
-
Can't shut down system preferences
After changing display settings while using VGA port to remote display laptop will not shutdown because System Preferance will not shut down. Shutdown grey-Ed.
-
Subversion -- Problem After Deleting a File from Repository
I am using Dreamweaver CS6 and am using Subversion as a Repository server. In doing a massive check-in, Subversion reported an error with one file: SVN: #160024, Commit failed (details to follow): File or directory 'aff.php' is out of date; try updat
-
MY 'sent' messages are marked as junk
I am in training mode in Apple mail. Why are all my sent messages marked as junk?
-
I purchased downloaded and installed microsoft office 2011 onto my iMac. At no time was I prompted to enter the product key so I am unable to activate the software. Can anyone tell me what to do in order to activate the software?