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 r3 system

Former Member
0 Kudos

hi experts

i upload a excel file into application system,and i write a abap program,my question is if there is a function or others that can read the file into my itab

best regards

zlf

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Use DX_FILE_READ Function Module.

call function 'DX_FILE_READ'

exporting

filename = source_filename

server = source_server "if multiple Application Server give server name

tables

data_tab = lt_data

exceptions

others = 4.

Thanks,

Durai.V

8 REPLIES 8

Former Member
0 Kudos

OPEN DATASET FNAME FOR INPUT IN BINARY MODE.

READ DATASET FNAME INTO TEXT2 LENGTH LENG.

CLOSE DATASET FNAME.

0 Kudos

hi neelambari naik

OPEN DATASET FNAME FOR INPUT IN BINARY MODE.

READ DATASET FNAME INTO TEXT2 LENGTH LENG.

CLOSE DATASET FNAME. seems not work for the excel file

best regards

zlf

0 Kudos

hi neelambari naik

OPEN DATASET FNAME FOR INPUT IN BINARY MODE.

READ DATASET FNAME INTO TEXT2 LENGTH LENG.

CLOSE DATASET FNAME.works for txt file

and but i don't konw how to read the second row datas,the first datas get

best regards

zlf

0 Kudos

Hi

use this FM

F4_DXFILENAME_TOPRECURSION

This FM you can use in both the ways if you want to select from the file from Presentation server or even you can select any file from the application server.

Regards

Pavan

Former Member
0 Kudos

Hi,

Use DX_FILE_READ Function Module.

call function 'DX_FILE_READ'

exporting

filename = source_filename

server = source_server "if multiple Application Server give server name

tables

data_tab = lt_data

exceptions

others = 4.

Thanks,

Durai.V

0 Kudos

HI Durai.V,

I TRIED THIS FUNCTION,BUT subrc always ne 0,the file i uploaded is located "c:\temp\zlf.xls",and server parameter i gave 'hteccdev_HE3_01',pc is 'X',well,are they correct?

by the way,i set ip of the r3 system for server parameter,the same error.

best regards

zlf

0 Kudos

Hi,

DATA tdata_tab LIKE dxrawdata OCCURS 0.

CALL FUNCTION 'DX_FILE_READ' DESTINATION 'devr3_EED_00'

EXPORTING

filename = 'F:\usr\sap\EED\DVEBMGS00\work\SD1.txt'

TABLES

data_tab = tdata_tab[].

I was use for TXT file only. I working fine.

Above code i was used.

Thanks,

Durai.V

0 Kudos

hi Durai.V

thanx,you are right,but i tested in se37,this function not work,and dataset also work,i have worked out

thanks all

best regards

zlf