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: 

To upload an excel sheet from the "Application" Server

Former Member
0 Kudos

Hi All,

Can you please suggest some function modules which can be used to read an excel sheet placed in the Application Layer.

Thanks,

3 REPLIES 3

Former Member
0 Kudos

Hi,

Try this one

Retrieve Data file from Application server(Upload from Unix)

DATA: i_file like rlgrap-filename value '/usr/sap/tmp/file.txt'.

OPEN DATASET i_file FOR INPUT IN TEXT MODE.

IF sy-subrc NE 0.

MESSAGE e999(za) WITH 'Error opening file' i_file.

ENDIF.

DO.

  • Reads each line of file individually

READ DATASET i_file INTO wa_datatab.

  • Perform processing here

  • .....

ENDDO.

Refer: http://www.sapdevelopment.co.uk/file/file_updown.htm

http://www.sapdevelopment.co.uk/file/file_uptabsap.htm

OR

FM: <b>UPLOAD_FILES</b>

File Transfer from PC or Appl. Server in Internal Table

Thanks & Regards,

Judith.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Check this.

http://www.sapgenie.com/abap/code/abap1.htm

In this below link, you can find lot of links related to file transfer.

http://www.sapgenie.com/abap/example_code.htm

Former Member
0 Kudos

Hi Archana,

Try this FM:

'GUI_UPLOAD'

Eg:

CALL FUNCTION 'GUI_UPLOAD'

exporting

filetype = 'ASC'

filename = 'C:\DOWNLOAD.XLS'

tables

data_tab = itab.

This loads the contents of the file 'C:\DOWNLOAD.XLS' on the frontend PC line by line into the internal table itab.

Hope this helps you.

Regards,

Anjali.