GUI Download - Path Question
Hi @all ,
I made an Interface that downloads via GUI_Download a File. That works just great. Now I noticed, that this Function Module is creating an new Windows Folder if the Folder that the user entered does not exist.
Is there a way to check, if an Folder exists? I Could not find an Function Module that does something like this.
Thanks in advance !
Christian
Hi,
You can use the DIRECTORY_EXIST method for both, PC frontend and application server, you will need to know the fully qualified name of the appilication server on your network in order for it to work.
Please check this sample code.
report ztest.
type-pools: abap.
data: rc type abap_bool.
data: dir type string.
parameters: p_file type localfile default 'C:'.
start-of-selection.
dir = p_file.
call method cl_gui_frontend_services=>directory_exist
exporting
directory = dir
receiving
result = rc
exceptions
cntl_error = 1
error_no_gui = 2
wrong_parameter = 3
not_supported_by_gui = 4
others = 5.
if rc = 'X'.
write:/ 'The directory does exist'.
else.
write:/ 'The directory does not exist'.
endif.
Also you can check this FM as well.
RZL_READ_DIR_LOCAL
CONV_UTIL_CHECK_FILE_EXISTENCE
CV120_DOC_FILE_EXISTENCE_CHECK
CV122_DOC_FILE_EXISTENCE_CHECK
DX_FILE_EXISTENCE_CHECK
PFL_CHECK_OS_FILE_EXISTENCE
Regards,
Ferry Lianto
Similar Messages
-
Without giving the path - file is transfereed using gui download
i use GUI download to download the internal table data in the path specified by the user.
But there is a strange behavoir in this.
i havent given the file path to download.
But i have given only the file name (notthedrive say
In the file output path : sample
once i execute the it shows the message this much bytes transferred.
but the file is transferred and stored in some location.
I dont know y this happens in my progrram
only if i give the directory path the file is to be strored.
other wise it shouldnt .
How to solve this.
please help
thanksFriend i have given a sample code ...
i couldnt copy from there.
Just execute the code and check without giving the path but give only any name . i
it will say bytes transferred.
Please check
*& Report Z_POP_UP_DOWH
report sdfjksdfjk.
selection-screen begin of block g2 with frame title text-001.
parameters: p_file like rlgrap-filename default 'd:\uma.csv'.
selection-screen end of block g2.
DATA: filestring TYPE string.
data: returncode type i.
DATA : itab_Data type table of mara,
wa_data like line of itab_data.
DATA: BEGIN OF fields OCCURS 2.
INCLUDE STRUCTURE sval.
DATA: END OF fields.
CLEAR fields.
fields-tabname = 'RLGRAP'.
fields-fieldname = 'FILENAME'.
fields-value = p_file.
fields-field_attr = '00'.
APPEND fields.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
popup_title = text-003
IMPORTING
returncode = returncode
TABLES
fields = fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2.
CHECK returncode EQ space.
filestring = fields-value.
select * from mara into table itab_data up to 10 rows.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = filestring
write_field_separator = ','
TABLES
data_tab = itab_data
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 s999(b1) WITH 'File ' filestring
' NOT created!'.
ELSE.
MESSAGE s999(b1) WITH 'File ' filestring
' Created successfully!'.
ENDIF. "Check on download success
WRITE : 'Download Completed'. -
Do we have control over the download path for firefox android ?
I'm using Firefox in android , I need to change the download path , where the files I download from Firefox are getting saved. How can I do that ? I don't see any settings for that .
See https://support.mozilla.org/en-US/questions/1008534#answer-597769
-
Header in Excel when downloading using GUI DOWNLOAD
Hi,
I have a requirement where i need to download data from table into an excel sheet on a location in PC. I used FM 'GUI DOWNLOAD' for this purpose. Now, i need a header to be displayed in the excel when i download. The header should contain a date which is entered during the execution as a screen input. How to display this date as a header in the excel sheet when using GUI DOWNLOAD.Hi,
If you only want the header to be displayed in the first row, you can do as suggested by Ikshula.
If you want a real excel header, you can use OLE and set the property ActiveSheet.PageSetup.LeftHeader (or CenterHeader, or RightHeader) to the value "&D". This will add the current system date as header (you can of course pass any other value between the " ").
Kr,
m. -
Clear download path in the selection screen
Hi All,
Im facing the problem in the selection screen.
User wants to clear the selection screen download path when they are changing the radio button one to another another radio button. this is as below
PARAMETERS::pa_werks like ekpo-wekrs,
pa_path like string.
PARAMETERS:rb1 RADIOBUTTON GROUP g01 USER-COMMAND radio,
rb2 RADIOBUTTON GROUP g01,
rb3 RADIOBUTTON GROUP g01.
ex:first default is rb1 radio button,so they will select the download path based on F4 help. then they will choose rb2,now the download path has to clear. cause they want choose F4 according to second radio button RB2.
Thank you very much.
Anu.Hi Anitha,
Please try this code.
PARAMETERS: P_FNAME LIKE RLGRAP-FILENAME.
PARAMETERS:RB1 RADIOBUTTON GROUP G01 USER-COMMAND RADIO,
RB2 RADIOBUTTON GROUP G01,
RB3 RADIOBUTTON GROUP G01.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF RB1 = 'X'.
CLEAR P_FNAME.
ELSEIF RB2 = 'X'.
CLEAR P_FNAME.
ELSEIF RB3 = 'X'.
CLEAR P_FNAME.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAME.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SY-REPID
DYNPRO_NUMBER = SY-DYNNR
FIELD_NAME = 'PATH'
IMPORTING
FILE_NAME = P_FNAME. -
How to come bak on Selcton Scrn in case of err while using Gui Download
Hi All,
I am using GUI Download function in my report.Now i f the excel to which i am donloading is already open there comes an error message saying 'Access to file is denied' and program is terminated.Is there any way so that after the error message program comes to Selection Screen only.
Thanks in Advance,
Saket.Hi Saket.....
In case of error i.e sy-subrc ne 0.
pass below code:
IF SY-SUBRC <> 0.
MESSAGE S000(0K) WITH 'Error in downloading file. Returncode' SY-SUBRC.
ENDIF.
Regards,
Piyush Mathur
Rewards Points,if helpfull -
GUI download, how to retain format of decimal places
Hi everyone!
I have a program that downloads data to excel file using GUI Download. The values of the amount in the ALV display are 11.90, 11.90- which is correct because it has two decimal places. But the problem now occurs in the excel file. The values are now 11.9, 11.9-.
Do you know of any method that will retain the format of the values when it is already in the excel file.
The format of my decimal notation is 1,234,567.89.
Thanks in advance.Thank you!
But I need to have the format of the numbers in the excel the same as the format in the ALV <b>without changing the format of the cells in the excel file</b>. It has to be changed in the program.
Actually there are also amounts that are being displayed in excel file with 2 decimal places the same as the ALV display. But some of the amounts were changed when it comes to the excel file, and I don't know why this happens.
Thanks.
Message was edited by:
Betsie Camoro -
My Firefox 3.6 is setup to download anything automatically in MyDocuments (which I never use).
For security reasons, I designated a different location on my hard drive, where I keep my confidential files.
How do I change this downloading path? I tried to change it by going to "Tools-Options-Save Files To", but it does not work.
Thanks,
Dan.Do you have any extensions that might interfere?<br />
See [[Troubleshooting extensions and themes]]
Does it work if you select Tools > Options > General : Downloads : "Always ask me where to save every file" ?
Your above posted system details show outdated plugin(s) with known security and stability risks.
# Shockwave Flash 10.0 r42
# Java Plug-in 1.6.0_03 for Netscape Navigator (DLL Helper)
Update the [[Java]] plugin to the latest version.
*http://java.sun.com/javase/downloads/index.jsp (Java Platform: Download JRE)
Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
*http://www.adobe.com/software/flash/about/ -
Using append in gui download with file_type = 'DBF'
Hi gurus,
I wanna download data from three internal tables into the same excel sheet, i am using append and am also using FILE_TYPE = 'DBF'.
For this i am using 2 gui_downloads.
The problem is that my data is getting overwrite in the Excel file.
but when i am using FILE_TYPE = 'DAT' , the data is not getting overwrite.
Now my condition is that i HAVE to use DBF and i also want to append the data into the excel file.
How do i achieve the same using DBF and append.
Please help.Hello Dilip,
I tried using GUI_DOWNLOAD with FILE TYPE as "DBF", and i see the problem as mentioned. My question to you is:
1. Why do you need 'DBF' format?
2. Is it required to save the file as '.CSV'? Can you not try to save in '.XLS' file?
Plz revert back.
BR,
Suhas -
32 bit vs. 64bit download link question
My daughter just bought a prepaid CC student and teacher license for her studies. She bought it thru thinkedu.com and it is the $199.00/12 month subscription. Her computer runs windows 8 pro 64 bit OS. The download link says 32 bit. I want to help her install it this weekend and have not clicked on the link yet to install.
Two questions. 1) Will the 32 bit link be a problem in getting the best possible performance out of her computer (hardware aside)? 2) does the subscription begin when activation begins or is the meter running right now?Audio and video apps are mostly 64 bit only - Audition included.
http://www.adobe.com/au/products/creativecloud/faq.html#desktop-products
Which desktop applications in Creative Cloud require 64-bit operating systems?
With the new CC apps, most of the pro video and audio applications now require 64-bit operating systems to run. These native 64-bit applications include Adobe Premiere® Pro CC, Adobe Audition® CC, After Effects® CC, Prelude® CC, and SpeedGrade® CC. Flash Professional CC, Photoshop CC and Lightroom® also require 64-bit on Mac OS.
Where 32 bit and 64 bit versions are available, both will be installed automatically. The 32 bit versions may occasionally be required to run older plugins, though in your daughter's case I doubt she'll ever need the 32 bit versions.
The 64 bit version of each app should be the version which launches by default in each case, -
Hi,
whenever I use GUI_DOWNLOD (cl_gui_frontend_services=>gui_download)
I get a popup (title "SapGuI file save options") with the message "The file ... might be overwritten by a download. Do you want to allow this?".
I have to confirm and then the download starts. Note: it happens also when the target file does not exist. Only my home office connected over VPN acts like this. SAp Gui is 640 Final Release Build 760892 Patch level 11.
WS_DOWNLOAD does not show this phenomenon.
Anybody experienced this?Hi,
I solved the problem by accessing the SapGui options.
Under the local data settings -> Front end security, there is an option I didn't find in the help file.
I unchecked the marker and it solved my problem.
I hoe it helps. -
File path question....
Yet another really simple question from me, as I've been away from DIAdem for too long.
I have a program which, in part of it, needs the user to select the path that they want a set of a few hundred files to be saved in. I've tried using FileNameGet, but this requires me to select a file in the directory i want to save into to record the path. I just want the user to have to select the folder once.
I've tried this:
'===============
dim newfilepath
If (FileNameGet("ANY",,,,,,"Select the directory to save the new files into:") = "IDOk") Then
newfilepath=FileDlgDir
else
End If
'===============
Can I select a directory instead of a file?
Solved!
Go to Solution.Hello Tom!
Yes, with the PathNameGet() command.
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater? -
IWeb 1.1.1 download PLUS: Question about iWeb 2.0 templates
I read the notice up there that iWeb 1.1.1 has been released to address certain issues. I went to:
http://www.apple.com/support/downloads/iweb111.html
and saw a download situation there. So, if I click download, then everything falls into place, just like in the software updates in the OS X system? Or if not, then I have to click to install something? But does it all go into the right place afterwards?
iWeb 2.0 question:
I am going to buy iWeb 2.0 when it is available. However, is there any news about what kind of TEMPLATES 2.0 will have? Will 3rd party templates bought prior to 2.0 function in iWeb 2.0?
Lorna in Southern CaliforniaLorna, I am pretty sure you already have
1.1.1............
OH, I just now checked and that is correct. I noticed that the format of the announcement looked different and in my mind, that signalled a newer update. Wrong.
Lorna in Southern California -
AppIntegrator zip file download path
Dear All,
I am using NW Portal 7 and want to use Appintegrator to connect yahoo and some other websites.Please let me know the path to download com.sap.portal.howtos.webapp.par file for EP7.
I have gone through the following link but unable to get correct path in sdn/service market place
Step-By-Step Guide to implement Application IntegratorHi Nancy,
Here you go:
<a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bf8cc890-0201-0010-00b1-8d04e5f4378a">Click!</a>
Please award points if helpful
Best regards,
Jan Laros -
I am trying to change the path when downloading a file using the download_db procedure (webutil_file_transfer.db_to_client).
Thanks,
TerryIs the procedure DB_TO_CLIENT built in oracle?
I also want to download video files from Oracle to client and save to d:\video, How can I do?
Appreciate for your any words.
If you know, Plz email to:
[email protected]
Maybe you are looking for
-
How to update the table when change list item in classic report
hi , i worked with apex 4.2 and i create normal classic report with one select list(named loved)Column ,now i want to update table when user change the list with new value ,i can't create dynamic action to do this,i create check box with primary key
-
Transfer from a 3GS to 5, but keep the 3GS for all but Phone use
I have ordered an iPhone 5, currently have a 3GS. I plan to backup everything on the 3GS and then restore to the iPhone 5 using iTunes. Will I still be able to synch my 3GS when I plug it into iTunes to keep my applications etc. up to date? Will iTu
-
How to create a 2-color job in PageMaker?
how to create a 2-color job in PageMaker?
-
Hello all could you point me in the right direction. I am using net beans, and I want to write an application which will send a collection of objects to mobiles. However the objects on the server need to do various things that are only in the J2SE AP
-
Before I reset my Firefox I was able to just type words in the Location bar and Firefox would redirect me to the website. For example, typing "reservoir dogs imdb" would redirect to the IMDB page of this movie, and typing a random sequence of charact