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

Problem reading excel cell which has 1000 characters

Former Member
0 Likes
1,160

Hello Frnds,

I am reading an excel file , i have declared my internal table with fields of length 1000 characters each. But it is holding only 256 characters in a field ( where that cell has 1000 chars in excel ) in the internal table and i want all the 1000 chars to be stored in internal table . Is there any way to get all the 1000 chars in to the internal table field ? please suggest on this ?

Thanks,

subash

Hello Frnds,

I am reading an excel file , i have declared my internal table with fields of length 1000 characters each. But it is holding only 256 characters in a field ( where that cell has 1000 chars in excel ) in the internal table and i want all the 1000 chars to be stored in internal table . Is there any way to get all the 1000 chars in to the internal table field ? please suggest on this ?

Thanks,

subash

4 REPLIES 4
Read only

Former Member
0 Likes
871

structures can keep these long data but tables cannot

Read only

Former Member
0 Likes
871

Hi,

Declare the fields of the internal table as string, since its length is not fixed,it can hold any number of characters.

Use FM TEXT_CONVERT_XLS_TO_SAP while uploading.

Regards,

Amit

Read only

GauthamV
Active Contributor
0 Likes
871

Hello subash,

Instead of using Excel use a text tab-delimited file for FM GUI_UPLOAD .


CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = p_file
filetype = 'ASC'
has_field_separator = 'X'
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.

Read only

Former Member
0 Likes
871

Hi GADDAMEEDI SUBASH,

What Data Type you are using while declaring the internal table.. ??

I would suggest you to increase the field length of the internal table fileld which stores this string

OR

Use String or LRAW data type.. Depends on your requirement..

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

ilesh Nandaniya