‎2010 Feb 09 12:49 PM
Hi Friends,
I want to upload a excel file to internal table,iam facing a issue with GUI_UPLOAD? can you please tell me how to upload it?
any sample code will be greatly helpful.
Regards
Babu
‎2010 Feb 09 12:52 PM
Please search.. there are more than 1000 posts for these...
use other FMs as well... search and you will get them..
‎2010 Feb 09 12:52 PM
Please search.. there are more than 1000 posts for these...
use other FMs as well... search and you will get them..
‎2010 Feb 09 12:53 PM
‎2010 Feb 09 12:54 PM
‎2010 Feb 09 12:56 PM
hi,
these are basic things which are already present in SDN do search before posting
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'c:\itab_mat.xls'
FILETYPE = 'DAT'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
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
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
thanks
shivraj
Edited by: ShivrajSinha on Feb 9, 2010 1:56 PM
‎2010 Feb 09 12:59 PM
Hi ,
USe the FM ALSM_EXCEL_TO_INTERNAL_TABLE to upload the file from Excel to internal table.
Reagrds,
Bharani
‎2010 Feb 09 1:04 PM