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 an excel file

former_member212005
Active Contributor
0 Likes
1,000

Hi,

I am uploading an excel file from presentation server to an internal table.I am using GUI_UPLOAD for this.

However after uploading, if I check the GT_EXCEL internal table it contains one entry as expected but with some junk data like ####yyyyyy

Can anyone tell me what the problem might be?

Hi,

I am uploading an excel file from presentation server to an internal table.I am using GUI_UPLOAD for this.

However after uploading, if I check the GT_EXCEL internal table it contains one entry as expected but with some junk data like ####yyyyyy

Can anyone tell me what the problem might be?

7 REPLIES 7
Read only

Former Member
0 Likes
965

hi,

just check the file which is to be uploaded it might contain that junk data

Read only

0 Likes
965

No, it doesnt contain junk data

Read only

Former Member
0 Likes
965

Vin, Can you attach the code to check.

Read only

0 Likes
965
  • Upload the excel data

CALL METHOD cl_gui_frontend_services=>gui_upload

EXPORTING

filename = lv_file_name

CHANGING

data_tab = gt_excel

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.

BEGIN OF ty_excel,

data(1000) TYPE c,

END OF ty_excel.

gt_excel TYPE TABLE OF ty_excel.

Read only

agnihotro_sinha2
Active Contributor
0 Likes
965

hi,

its not junk data ...

basically if u stretch the coloumn u will get the full date i believe...

just try once...

Read only

0 Likes
965

Hi ags,

The problem is not there in the excel file, but after the data is uploaded into an internal table. It should contain data but not someting like ####%%%***** etc

Read only

Former Member
0 Likes
965

Check by declaring like this:

data:

BEGIN OF ty_excel,

data TYPE string,

END OF ty_excel.

Edited by: Eswar Kanakanti on Nov 27, 2008 8:37 AM