Application Development 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 file from ftp into an internal table

Former Member
0 Kudos

Hello,

I need to read the data from an excel file which was uploaded from ftp into an internal table.

How can we go ahead ?

Kindly suggest with the help of some code.

7 REPLIES 7

former_member673464
Active Contributor
0 Kudos

hi,

you can use the function module ALSM_EXCEL_TO_INTERNAL_TABLE for converting the excel data into internal table.

Regards,

Veeresh

0 Kudos

Thanks for your feedback.

Actually the FM used for uploading the file through FTP have not really passed the file into the SAP.

Hence I want to know that how can we access the file uploaded from FTP in the SAP system.

The FM suggested by you will only convert the excel file into an internal table.But I want to have that file first in the system and then access it in SAP system.

0 Kudos

hi,

u can upload data from ftp to SAP using sap XI.

it is the best tool to do so.

0 Kudos

Thanks.

I need to use a report program for uploading an excel file on the selction screen from the FTP.

From the FM I have got the answer of how the FTP will be connected by the user id and password but the input file data has not been taken in.

Certainly I will require that data in the internal table to furthur process it.

Former Member
0 Kudos

Hai,

CALL METHOD cl_gui_frontend_services=>file_exist

EXPORTING

file = dy_fullpath

RECEIVING

result = rc.

IF rc IS NOT INITIAL.

call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'.

endif.

Thanks,

Durai.V

0 Kudos

Hello Freind,

I am drafting this code in a report.I am not using the OOPS ABAP.

Can you kindly suggest a similar thing which can be written in ABAP

0 Kudos

Hi,

data: dy_fullpathtype string.

data : rc type c.

CALL METHOD cl_gui_frontend_services=>file_exist

EXPORTING

file = dy_fullpath

RECEIVING

result = rc.

Just copy and paste the code and pass the file path in dy_fullpath .

U get the result in RC

Thanks,

Durai.V