‎2006 Nov 21 10:51 PM
hi guyz,
can anybody plz tell me how to upload data in my c drive into sap database table.
this is a zipcode file.
I created a database table in se11.
i need it asap.
plz help me
thanks in advance
sudheer
‎2006 Nov 21 11:10 PM
Well the easiest way is to write a quick program which uploads the data to an internal table, then you can fill the database table . A short program may look like this, here ZTABLE is your custom table and it is assumed that the file is comma delimited. I find it easier to work with this way.
report zrich_0001.
data: istr_tab type table of string with header line.
data: xztable type ztable.
call function 'GUI_UPLOAD'
exporting
filename = 'c:ztable.txt'
tables
data_tab = istr_tab.
loop at istr_tab.
split istr_tab at ',' into xztable-fld1 xztable-fld2 xztable-fld3.
insert ztable from xztable.
endloop.
Regards,
Rich Heilman
‎2006 Nov 21 11:10 PM
Well the easiest way is to write a quick program which uploads the data to an internal table, then you can fill the database table . A short program may look like this, here ZTABLE is your custom table and it is assumed that the file is comma delimited. I find it easier to work with this way.
report zrich_0001.
data: istr_tab type table of string with header line.
data: xztable type ztable.
call function 'GUI_UPLOAD'
exporting
filename = 'c:ztable.txt'
tables
data_tab = istr_tab.
loop at istr_tab.
split istr_tab at ',' into xztable-fld1 xztable-fld2 xztable-fld3.
insert ztable from xztable.
endloop.
Regards,
Rich Heilman