Issue while downloading file in .CSV format
Hi,
I need to download the file in .CSV format.
I hade used FM SAP_CONVERT_TO_CSV_FORMAT and then used GUI_Download.
Now when I am opening file which is downloaded, it gives all the data in a single column. If there are 5 fields in my table, the generated file gives the data of all the 5 fields in a single column.
Could you please help?
Hi try wi th the following code.
TYPE-POOLS : truxs.
DATA: t_file TYPE STANDARD TABLE OF type_file.
data:t_conv_data TYPE truxs_t_text_data.
CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
EXPORTING
i_field_seperator = ', '
TABLES
i_tab_sap_data = t_file
CHANGING
i_tab_converted_data = t_conv_data
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\TESTCSV.CSV'
filetype = 'ASC'
write_field_separator = ' '
TABLES
data_tab = t_file
fieldnames = names
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.
Similar Messages
-
Hi all,
I want to create a file on the presentation server with csv format. i used gui_download function. The file is created but it is not csv format.
it is urgent please can you help e out in this
I used filetype as 'ASC' then CSV but in vain
GV_ERR_FNAME = '
SAM\ERRORFILE.CSV'
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = GV_ERR_FNAME
FILETYPE = 'ASC'
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = GT_ERROR_TAX
THANKX IN ADVPlease check out this sample program.
report zrich_0001.
data: begin of itab occurs 0,
fld1(10) type c,
fld2(10) type c,
fld3(10) type c,
end of itab.
data: begin of iout occurs 0,
rec(1000) type c,
end of iout.
parameters: p_file type localfile default 'C:test.csv'.
data: file type string.
start-of-selection.
* Build the ITAB
itab-fld1 = 'A'.
itab-fld2 = 'B'.
itab-fld3 = 'C'.
append itab.
itab-fld1 = 'D'.
itab-fld2 = 'E'.
itab-fld3 = 'F'.
append itab.
itab-fld1 = 'G'.
itab-fld2 = 'H'.
itab-fld3 = 'I'.
append itab.
* Build the output internal table from ITAB
* Concatenate all fields into IOUT-REC
loop at itab.
concatenate itab-fld1 itab-fld2 itab-fld3 into iout-rec
separated by ','.
condense iout-rec no-gaps.
append iout.
endloop.
* Now Download
file = p_file.
call function 'GUI_DOWNLOAD'
exporting
filename = file
tables
data_tab = iout
exceptions
others = 22.
Regards,
Rich Heilman -
Mighty Mouse tracking issue while downloading files
Hi everybody ...
I'm the owner of the Wireless Mighty Mouse... For about 2 months I'm recognizing a strange behavior.
When I do start a download via Safari (I'm connected to the Internet via Wifi 54Mbits (2,4 GHz)) the mouse tracking start to bucking. During the download no fluent motion occurs. After the download finished the bucking stops and the tracking flows seamlessly. Does anyone have the same problem? I'm not quite sure what the exact problem is but could this behavior result from the connectivity frequency of bluetooth and wifi? And please don't tell me to reset my keyboard or my mouse. I already did that. I also updated to the latest official software update for bluetooth.
Please help me.
Thx destinationCloudHi,
I have the same problem, but mine usually shows up when I have MS Word opened for a while. It is as if there is some other process cycling that interferes with the tracking. Sometimes it shows up as a major lag (cursor stutters and moves a little bit for a large hand motion) or the cursor jumps way across the screen. It isn't always when MS Word is opened, but more frequent when it is (occasionally with Pages too). Changing batteries doesn't help, changing surfaces doesn't help. After some time, the problem resolves and mouse moves smoothly again, for a while. This has been more of a problem in the last few months than before.... was the Bluetooth driver changed? Does it have anything to do with a cache that is used before changes are saved?
Where is the Bug Report link... I can never find it. Just put it right on the Support page please, BIG.
Message was edited by: dammittakethealias -
Computer slows down while downloading files using Safari version 4.0.3
I experience some performance issues while downloading files from the internet.
The system performance/responsiveness is perfect until starting the download process.
E.g. opening the finder takes noticeably more time.
However, the worst is moving the mouse (bluetooth mighty mouse). It's hard to explain, but during a download there's a lag which could be compared to decreasing the mouse sensitivity to a minimum.
Maybe someone could help me with that...
Thanks a lot!HI and Welcome to Apple Discussions...
Check to see how much free drive space there is on the MacBook.
Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. *Make sure you always have a minimum of 10% to 15% free disk space at all times.*
If you need to free up disk space, go here for help.
http://www.thexlab.com/faqs/freeingspace.html
Could be an underlying issue with the hard disk. Boot from your install disk and run Disk Utility.
Insert Installer disk and Restart, holding down the "C" key until grey Apple appears.
Go to Installer menu and launch Disk Utility.
Select your HDD (manufacturer ID) in the left panel.
Select First Aid in the Main panel.
*(Check S.M.A.R.T Status of HDD at the bottom of right panel. It should say: Verified)*
Click Repair Disk on the bottom right.
If DU reports disk does not need repairs quit DU and restart.
If DU reports errors Repair again and again until DU reports disk is repaired.
When you are finished with DU, from the Menu Bar, select Utilities/Startup Manager.
Select your start up disk and click Restart
Carolyn -
Downloading Excel File in CSV Format
Hi All,
How can I Download a file in .CSV Format?
I am using the below shown code.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = 'C:\Documents and Settings\sandeepp3\Desktop\sample.csv'
FILETYPE = 'DAT'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ','
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
SHOW_TRANSFER_STATUS = ABAP_TRUE
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = ITAB
FIELDNAMES = HTAB
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.
I am getting the field separator as Tab(SPACE).
Please AdviseHi Anil,
Try this way.
REPORT ztest_notepad.
"Declarations
TYPE-POOLS :truxs.
DATA : it_download TYPE truxs_t_text_data.
DATA: BEGIN OF it_data OCCURS 0,
arbgb TYPE t100-arbgb,
msgnr TYPE t100-msgnr,
text TYPE t100-text,
END OF it_data.
START-OF-SELECTION.
"Select Data
SELECT * FROM t100
INTO CORRESPONDING FIELDS OF TABLE it_data UP TO 200 ROWS WHERE sprsl = sy-langu.
"Convert SAP to CSV format
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = it_data
CHANGING
i_tab_converted_data = it_download
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc = 0.
"Download data using GUI_DOWNLOAD
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\test.txt'
filetype = 'ASC'
TABLES
data_tab = it_download.
ENDIF.
Thanks
venkat.O -
Error occurred while downloading files from Administration Server...
Hi guys,
If i already have my application deployed and exploded in ../tmp/_WL_user , when I restart the managed server it will try to download again the files from the upload directory in the Administration Servers? (I'm using stage mode).
Sometimes I got the following error:
Caused By: java.io.IOException: [DeploymentService:290066]Error occurred while downloading files from Administration Server for deployment request "0". Underlying error is: "null"
and I already have the war exploded in /tmp/_WL_user
the staging mode is not only for the first deployment? when i don't have the war exploded in /tmp/_WL_user?
I've some confusion related to the process or deployment/startup of the managed servers.
ThanksHi,
when you get following error * DeploymentService:290066 * then that means
A service on the machine is preventing the WebLogic Server remote instance from downloading the configuration file. This can be Hosts Intrusion Prevention (HIPS) agents or any other agent causing this issue.
Disable the agent interfering with the download process to fix this issue.
Regards,
Kal -
Is there a way to download data into CSV format?
Is there a way to download data into CSV format?
I can't do this using delimiter as ',' because user wants the decimal format in the ','s only.
Any suggestions?go through this link...
Download CSV file in presentation server through FM GUI_DOWNLOAD
Re: how to create a CSV file
type-pools:TRUXS.
data: begin of itab occurs 0,
vbeln like vbap-vbeln,
posnr like vbap-posnr,
end of itab.
data: itab1 type TRUXS_T_TEXT_DATA.
select vbeln
posnr
up to 10 rows
from vbap
into table itab.
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
I_FIELD_SEPERATOR = ','
TABLES
I_TAB_SAP_DATA = itab
CHANGING
I_TAB_CONVERTED_DATA = itab1
EXCEPTIONS
CONVERSION_FAILED = 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.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:TEMPtest.TXT'
TABLES
data_tab = itab1
EXCEPTIONS
OTHERS = 1. -
Converting flat files to csv format
hi,
Iam converting flat files to csv format..the problem is that iam running a script for inserting values.while i run this script it works fine .but while i open this csv file the datas in the excel sheet is not coming in a single line that is for a particular record its moving to second line .there is a break for a single record.so there is a problem in conversion.can anything be done in it this to avoid the breaking of lines
thanks
RatheeshYOGenereally, you shouldn't convert from a lossy format AAC or MP3) to another lossy fomrat.
It's called loss because you lose information when you convert it.
If you only use these files on the computer and the iPod, I'd recommend AAC. Better quality at same bit rate as MP3. -
Saving the output of a .sql file in .csv format
Hi,
I am saving the output of a .sql file in .csv format. But the problem is , the record of few columns have "new line" character in it, so when it is getting saved in .csv format, those records are coming in multiple rows, but they should come in one single row in single block. Please advise how to overcome this problem.
Regards,
NirajHi Guys,
I guess, there is a misunderstanding.
He is talking about the issue caused as a result of the data containing a "CRLF" ( Carriage return Line feed ) .
That is mainly a data issue.
The query i presume, must be right.
I guess you should be able to fix it using some string functions.
Some thing similar to this
CREATE TABLE ASH (NAME VARCHAR2(10))
SELECT REPLACE(NAME, CHR(13)||CHR(10), 'ISH') FROM ASH;
SELECT REPLACE(NAME, CHR(10), 'ISH') FROM ASH;
SELECT REPLACE(NAME, CHR(13), 'ISH') FROM ASH;
depending on the type of new line whether it is CR or LF. or CRLF.
Regards
Ashish/- -
Had some wifi issues while downloading an album. First 3 tracks... sound stops way early but continues the count. How can I tell iTunes to redo the first 3? Any way to just fix it?
Hey davma1
All you need to delete the songs then go through the process of downloading the past purchase again.
Deleting files from the iTunes library and your computer
http://support.apple.com/kb/ht3842
Downloading past purchases from the App Store, iBookstore, and iTunes Store
http://support.apple.com/kb/HT2519
Thanks for using Apple Support Communities.
Regards,
-Norm G. -
Downloading file - MS WORD FORMAT
hi.
I am trying to make a download on user request in MS-WORD format. I have already downloaded the file in CSV format successfully. What i want to know is how to arrange data in word file ... i.e there should be some tags, or keywords which will help me to make table in word file, bold specific font, alignment ... and such stuff.
can you tell me how can i?You can try setting the content type.
Search for the appropriate type and use it.
- Subramanyam V -
BW System - F.M to down load the file to CSV format
Hi All,
Canm any one plz let me what is the F.M to down load the file to CSV format in BW systemHi,
try using this FM " /LICMAN/UT_CONVERT_ITAB_2_CSV" to conver the data to CSV. then call GUI_Download to download
Regards,
Aditya -
Need help in writing data to a flat file in .csv format
Hi All,
could you please show with a sample example to write data in .csv format using UTL_file.
The result of the refcursor i want to write to a file in .csv format.
How can i achieve this.
ThxHi,
There are two ways to acheive this.
First and which I prefer is creating a SQL script which will generate csv file at the specified location in CSV format. And then this SQL script can be called from your cron job similar to how you call stored procedure. Following is pseudo code that can be used -
set linesize 500
set echo off
set feedback off
set prompt off
set pagesize 0
spool <name of the csv file>.csv
<Your select statement>;
spool offPut select statement delimiting columns you want to use with ','. E.g. following query should create a CSV file named as abc.csv with one record and 2 columns delimited by comma. First column is ENO and second column is ENAME.
set linesize 500
set echo off
set feedback off
set prompt off
set pagesize 0
spool abc.csv
select ENO || ',' || ENAME from employee;
spool offSecond, you can write a PLSQL procedure and then call this procedure from cron job. There is a generic procedure shared by BluShadow some time back which is a very good example for this. Please refer to following link for this solution -
REF Cursor creating CSV files
I will suggest to use first method above if possible since it will be faster and less complicated in my opinion. Second method is recommended for scenarios where select statement is created dynamically and cannot be written during development.
Hope this solves your purpose.
Cheers,
Anirudha -
How to create column header text while downloading file
How can we create column header text while downloading file using function GUI_DOWNLOAD(in SAP Release 4.6c) because there is no FIELDNAMES parameter in
4.6c version.Hii,
Check this sample code. I have called GUI_DOWNLOAD twice. Onetime to download header of table and next time data of table
REPORT z_file_download.
DATA: w_name(90) TYPE c.
DATA:
BEGIN OF fs_flight,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
price LIKE sflight-price,
currency LIKE sflight-currency,
END OF fs_flight.
DATA:
BEGIN OF fs_head,
carrid(10) TYPE c,
connid(10) TYPE c,
fldate(10) TYPE c,
price(10) TYPE c,
curr(10) TYPE c,
END OF fs_head.
DATA:
t_head LIKE
TABLE OF
fs_head.
DATA:
t_flight LIKE
TABLE OF
fs_flight.
fs_head-carrid = 'CARRID'.
fs_head-connid = 'CONNID'.
fs_head-fldate = 'FLDATE'.
fs_head-price = 'PRICE'.
fs_head-curr = 'CURRENCY'.
APPEND fs_head TO t_head.
SELECT-OPTIONS:
s_carrid FOR fs_flight-carrid.
START-OF-SELECTION.
SELECT carrid
connid
fldate
price
currency
FROM sflight
INTO TABLE t_flight
WHERE carrid IN s_carrid.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = 'D:\flight.xls'
FILETYPE = 'ASC'
* APPEND = ' '
WRITE_FIELD_SEPARATOR = 'X'
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* CONFIRM_OVERWRITE = ' '
* NO_AUTH_CHECK = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = ' '
* IMPORTING
* FILELENGTH =
tables
data_tab = t_head
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 NE 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
filename = 'D:\flight.xls'
filetype = 'ASC'
append = 'X'
write_field_separator = 'X'
TABLES
data_tab = t_flight
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 'Download successful' TYPE 'I'.
ENDIF.
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
Abhijeet -
DME output files in CSV format
Hi,
Can anybody please let me know whether we can get the DME output files in CSV format using program RFFOJP_L?
Your help and time will be really appreciate.
Thanks & Regards,
Niki Shah
Edited by: Niki Shah on Aug 5, 2009 10:14 AMNo it will not work. You need full Photoshop (CS5)
Maybe you are looking for
-
Can i use Logitech G27 racing wheel on my iMac by installing Windows 7 on Bootcamp?
Will the Logitech G27 racing wheel be fully compatible with iMac if i install Windows 7 on it by using Bootcamp? Can i use all the functions of the Logitech G27 without any problems if i install Windows 7 on my iMac using Bootcamp? Please help me! Th
-
Creating links to specific area in a PDF
I want to create a link to go to a specific text area in my one-page PDF... not allowing anything outside of this specified area to be filled unless you click on this link. Does anyone know how to do this?
-
How to change package for Process chain
Hi Experts, How do i change the package in the Transport connection. Iam transporting a PC from D to Q. 1. I have some routines created in the infopackage.So i selected this one in the transport connection. I noticed under infopackages the
-
Dissolve/aggregate line segments
I have a polyline layer of segmented roads. There is a unique identifier for the road segments (Road_ID). I would like to 'dissolve' based on this unique id, to make one continuous line for each group of segments with a common ID. From what i have
-
Filtering Only Images by using query text
Hi Dear, I am going through in a trouble.. that is i want to filter only images from a site by using "query text" in "Search Result webpart" I am writting the following query but not getting any result... {searchboxquery}ContentType:Image and i h