09-26-2008 9:59 AM
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
09-26-2008 10:06 AM
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
09-26-2008 10:05 AM
OPEN DATASET FNAME FOR INPUT IN BINARY MODE.
READ DATASET FNAME INTO TEXT2 LENGTH LENG.
CLOSE DATASET FNAME.
09-26-2008 12:22 PM
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
09-26-2008 1:24 PM
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
09-26-2008 2:31 PM
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
09-26-2008 10:06 AM
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
09-26-2008 11:43 AM
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
09-26-2008 2:16 PM
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
09-27-2008 2:04 AM
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