09-29-2006 11:16 AM
Hi, All
There is a Excel who have two sheet, how can i upload
two sheet data to internal table from this excel?
thanks
09-29-2006 11:26 AM
Hi,
try the below function module.
ALSM_EXCEL_TO_INTERNAL_TABLE
Hope this will help some what.
09-29-2006 11:27 AM
09-29-2006 11:29 AM
hi,
Use <b>GUI_UPLOAD</b> FM
Use fm
ALSM_EXCEL_TO_INTERNAL_TABLE
to upload data frm excel.
Use function module GUI_UPLOAD
The FILETYPE refer to the type of file format you need: For e.g 'WK1' - Excel format , 'ASC' - Text Format etc.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:test.xls'
FILETYPE = 'ASC'
TABLES
DATA_TAB = itab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
Regards,
Santosh
Message was edited by: Santosh Kumar P
09-29-2006 3:25 PM
HI,
Try with this FM.
1) GUI_UPLOAD FM
2) ALSM_EXCEL_TO_INTERNAL_TABLE
Go thru this link
http://www.erpgenie.com/abap/functions.htm
Thanks
Sunil