Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem while downloading data from Application server.

Former Member
0 Likes
781

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

1 ACCEPTED SOLUTION
Read only

JL23
Active Contributor
0 Likes
727

in which format is the file on the application server?

6 REPLIES 6
Read only

JL23
Active Contributor
0 Likes
728

in which format is the file on the application server?

Read only

Former Member
0 Likes
727

The file is stored as .XLS format

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
727

The file is stored as .XLS format

You need to check for the "horizontal tab" (CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB).

Read only

Former Member
0 Likes
727

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.

Read only

Former Member
0 Likes
727

Can you elaborate how are you uploading and downloading file ?

Read only

Former Member
0 Likes
727

Hi,

Try to seperate fields with CL_ABAP_CHAR_UTILITIES=>CR_LF and for new line CL_ABAP_CHAR_UTILITIES=>NEWLINE.

Regards,

Ravi.