Application Development 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: 

string problem

Former Member
0 Kudos

HI,

i am downloading the data from excel to internal table.in that i have one field which i have declared as string type.(since it will hold more than 300 char).but still when try to get the string length its displaying only 256 and only i am getting 256 character.

pls help me

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

why dont u declare the variable as char type with length 300.

11 REPLIES 11

Former Member
0 Kudos

Hi,

did u check the size of the field of the internal table in which you are passing the value.

0 Kudos

i have declared as type string.the size of the field coming from the excel is 293.

Edited by: Shantha Sheela on Jun 5, 2009 11:07 AM

former_member212005
Active Contributor
0 Kudos

I did check it...by creating a dummy program but dont know why it is giving you 256?

May be you can try char datatype with higher value rather than using string

say, DATA: gv_data(1000) TYPE c.

Edited by: Vin on Jun 5, 2009 11:07 AM

0 Kudos

i have tried that as well not taking.

UmaArjunan
Active Participant
0 Kudos

I had the same problem when i downloading the data from excel.

After 255 characters , remaining characters are truncated

Using std \ custom FM , it is not possible to send more than 255 characters in CSV ( excel ) file format.

The solution which we used is described in the following steps:

we collected all the final data in the internal table ( including the path to download ) .

Then, that internal table is passed to SAP XI system ( integrated system ) thru the method of proxy calling.

We did it with the help of an XI consultant.

XI will support for downloading more than 255 characteres in excel file becos XI considers as a string.

Please check with any XI consultant to create proxy and try to send the internal table data for downloading

Thanks,

Uma

matteo_montalto
Contributor
0 Kudos

Hi Shanta,

try to look at other types of data element based on CHAR in se11 tx. You should find many types to replace the string one that could get more than 300 char (i.e, CHAR339, CHAR512, CHAR600 and many more).

HTH,

Matteo

Former Member
0 Kudos

Hi,

why dont u declare the variable as char type with length 300.

0 Kudos

Looks to me like you got the solution from Uma...

Refer the below link....it says microsoft has designed in a way that it wont allow more than 255 characters in a column....

http://office.microsoft.com/en-us/excel/HP051992911033.aspx

(Worksheet and Workbook specification)

May be you can use a text file or something...

0 Kudos

is it possible to download into two separate fields.

if anyone worked on it can u pls send me the sample code.

0 Kudos

i tried with text tab delimted file.

same problem.

its taking only 255 character.

0 Kudos

Hi,

Don't use FM because FM supports for 255 characters only. You use OLE concept to get data from excel with above 255 length of data.

L.Velu