Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Uploading Excel file using GUI_UPLOAD

Former Member
0 Likes
4,860

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
962

Please search.. there are more than 1000 posts for these...

use other FMs as well... search and you will get them..

6 REPLIES 6
Read only

Former Member
0 Likes
963

Please search.. there are more than 1000 posts for these...

use other FMs as well... search and you will get them..

Read only

Former Member
0 Likes
962

Hello

Are you read RULES and use SEARCH before posting ?

Read only

former_member188827
Active Contributor
0 Likes
962

check FM documentation in se37.sample code is available there

Read only

Former Member
0 Likes
962

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

Read only

BH2408
Active Contributor
0 Likes
962

Hi ,

USe the FM ALSM_EXCEL_TO_INTERNAL_TABLE to upload the file from Excel to internal table.

Reagrds,

Bharani

Read only

Former Member
0 Likes
962

Next time, please search before asking basic questions.