02-15-2007 6:49 AM
Hi all
I need to write a program in which I have to read data from Excel spread sheet or Tab delimited file and write these values in the database table.I have no idea about this.will u please explain to me how to do this task.Its very urgent.
Thank you.
Regards
Giri
02-15-2007 6:52 AM
Hi,
First save the fiel as Tab Delimited text file.
In the code declare a Internal table.
Use some Function module like WS_UPLOAD/or GUI_UPLOAD and pass the file as a parameter to this fun module. You will get the data uploaded into the internal table.
Now you can update the database table with this internal table.
Regards,
Anji
02-15-2007 6:51 AM
Hi
You can achieve this using:
CALL FUNCTION 'FILE_GET_NAME' EXPORTING logical_filename = p_file
parameter_1 = 'PC'
parameter_1 = parm1
IMPORTING file_name = physical_file
EXCEPTIONS OTHERS = 1.
FM.
Regards,
kumar
02-15-2007 6:52 AM
Hi,
First save the fiel as Tab Delimited text file.
In the code declare a Internal table.
Use some Function module like WS_UPLOAD/or GUI_UPLOAD and pass the file as a parameter to this fun module. You will get the data uploaded into the internal table.
Now you can update the database table with this internal table.
Regards,
Anji
02-15-2007 6:52 AM
Hi giri,
Using <b> GUI_UPLOAD </b> Function module to upload data from your tab delimtd file.This will upload the data to your Internal Table.Then from your Itab you upload to your DB table.
<b> ALSM_EXCEL_TO_INTERNAL_TABLE </b> uploads data from your Excel to Itab.
Rgds,
Jothi.P
Do awrd pts for all helpfule ans.
02-15-2007 6:56 AM
Hi,
To upload excel file use FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' or use 'GUI_UPLOAD' to upload tab delimited file. Then u have to write 'BDC' program to store the values into the database table.
If you need more infn write to me
Regards,
U. Uma