Skip to Content
author's profile photo Former Member
Former Member

How to read the excel data from ftp through abap Program

Dear All,

How to read the excel data which is present in FTP server through ABAP program. I followed few methods but its not happening pls help me.

Here i'm putting the data what i followed.

1) using FM "FTP_SERVER_TO_R3" passing data and file name i'm passing as aba.xls , then it is showing in alpha-numeric characters (Ï#ࡱ#á################>###þÿ##################,#########) if the table format is text and if change the table format also coming same.

2) If suppose i'm downloading the data from SAP byusing the below structure

Ex :

BEGIN OF ST_CUS,

LEDGERKEY(50) TYPE C, "LedgerKey

WRK_DELIM1 TYPE X ,

NAME1(80) TYPE C, "AccountName

WRK_DELIM2 TYPE X ,

KUNNR(50) TYPE C, "AccountReference

WRK_DELIM3 TYPE X ,

end of xxx.

and same data i'm uploading that time it is taking. but if i'm giving external excel file then why its not taking.

which file format it will support. i'm not finding the documentation of the FM & definition of method also.

Regards,

Krishna


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on May 29, 2013 at 06:54 AM

    Hi Krishna,

    you can use the function module "ALSM_EXCEL_TO_INTERNAL_TABLE" to directly read Excel data into SAP. As this module needs a filename, I don't think you'll be able to get the data via FTP here.

    Also, the FM uses OLE objects to upload and convert the data into an internal table and therefore can only be executed online, background processing here is not possible.

    You could save the file as tab seperated text file or csv file and load this into your SAP system. That would be my suggestion here.

    Cheers,

    Marc

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.