12-08-2005 7:47 PM
Hi
Can anyone tell me how can I upload data from excel file and that is from Application Server?
12-08-2005 7:49 PM
12-08-2005 8:00 PM
Hi ,
Please first copy the EXcel file to .DAT or .CSV file . Then upload by using GUI_UPLOAd (if from Presentation Server) or use Data sets.
12-08-2005 8:11 PM
Here is a sample, This program will upload a comma delimited file from app server, and break it up into specific fields of an ITAB.
report zrich_0001
no standard page heading.
parameters: d1 type localfile default '/usr/sap/TST/SYS/Data1.csv'.
data: begin of itab occurs 0,
fld1(20) type c,
fld2(20) type c,
fld3(20) type c,
end of itab.
data: wa(2000) type c.
start-of-selection.
open dataset d1 for input in text mode.
if sy-subrc = 0.
do.
read dataset d1 into wa.
if sy-subrc <> 0.
exit.
endif.
split wa at ',' into itab-fld1 itab-fld2 itab-fld3.
append itab.
enddo.
endif.
close dataset d1.
Regards,
Rich Heilman