‎2011 Sep 05 7:32 AM
Hi
I have create a file on the application server.
When i tried to download the file from application server into Excel file , all the fields in the file appear in the same column.
How can place the fields separately in different columns in the Excel.
Thanks
Subha
Edited by: subhacp on Sep 5, 2011 8:32 AM
‎2011 Sep 05 9:01 AM
‎2011 Sep 05 9:01 AM
‎2011 Sep 05 10:02 AM
‎2011 Sep 05 10:09 AM
The file is stored as .XLS format
You need to check for the "horizontal tab" (CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB).
‎2011 Sep 06 5:08 AM
Hi,
Try to use below function module where you need not to do anything new, just give path of the directory where you want to store on your workstation in the parameter I_FILE_FRONT_END and give path of your application server from where you want to pick file which is in .XLS format in the FM parameter I_FILE_APPL .
It will simply copy the file from Apllication server to your workstation in the same format and with the same characters.
CALL FUNCTION 'C13Z_FILE_DOWNLOAD_BINARY'
EXPORTING
I_FILE_FRONT_END = pr_down
I_FILE_APPL = l_w_file
I_FILE_OVERWRITE = 'X'
* IMPORTING
* E_FLG_OPEN_ERROR =
* E_OS_MESSAGE =
EXCEPTIONS
FE_FILE_OPEN_ERROR = 1
FE_FILE_EXISTS = 2
FE_FILE_WRITE_ERROR = 3
AP_NO_AUTHORITY = 4
AP_FILE_OPEN_ERROR = 5
AP_FILE_EMPTY = 6
OTHERS = 7
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Hope it will solve your query.
‎2011 Sep 05 9:21 AM
Can you elaborate how are you uploading and downloading file ?
‎2011 Sep 05 9:30 AM
Hi,
Try to seperate fields with CL_ABAP_CHAR_UTILITIES=>CR_LF and for new line CL_ABAP_CHAR_UTILITIES=>NEWLINE.
Regards,
Ravi.