2007 Aug 08 2:26 PM
hi
its urgent !
how can i down load internal table to .csv file format?
Babumiya Mohammad
Hi!
The easiest way, if you enter to debugger mode, and click on table button, then click on the export to excel button.
Then save you excel as a CSV.
It's working with SAP 4.7+
Regards
Tamá
2007 Aug 08 2:29 PM
If you have access to debugging then -
1. Click on the internal table.
2. Go to Menu GoTo>>Display Data Object>> Structure Editor.
3. Once the structure Editor opens , you can go to Menu System>>List>>Save and you can choose your extension.
2007 Aug 08 2:29 PM
Hi!
The easiest way, if you enter to debugger mode, and click on table button, then click on the export to excel button.
Then save you excel as a CSV.
It's working with SAP 4.7+
Regards
Tamá
2007 Aug 08 2:29 PM
use GUI_DOWNLOAD functon module... the only thing is while specfying the file path give the extension as .csv
2007 Aug 08 2:30 PM
Hi Raje
use the function module as displayed below,
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
CODEPAGE = 'xxx'
FILENAME = L_FILENAME
FILETYPE = 'CSV'
TABLES
DATA_TAB = I<YOUR INTERNAL TABLE>
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC <> 0.
SKIP 1.
WRITE:/1 'File download failed. File directory and name:',
L_FILENAME.
ELSE.
SKIP.
WRITE:/1 'File download successful. File directory and name:',
L_FILENAME.
ENDIF.
u can use the function module SAP_CONVERT_TO_CSV_FORMAT or GUI_DOWNLOAD
Plz award points if helpful,
Kiran .M
2007 Aug 08 2:38 PM
Downloading a table with CSV format means fields are seperated by Comma.
For this concatenate all the table fields in an string field SEPARATED by Comma.
Condense it and download it.
data: begin of t_csv occurs 0,
text(1000) type c,
end of t_csv.
loop at itab.
concatenate itab-fld1 itab-fld2 ......into t_csv-text separated by ','.
condense t_csv
append t_csv.
endloop.
now download t_csv with extension .CSV
The standard FM has a hard coded ';' in it so it will not be CSV file.
Regards,
Amit
Reward all helpful replies.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |