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: 

Unable to read more than 255 characters during File Upload

Former Member
0 Kudos
3,231

Hello Friends,

I have a requirement where I need to upload Long Texts to Material Master from a File. I am able to upload the file successfully but while reading the text the system is considering only first 255 characters, but for business they will maintain about greater than 5000 characters of text.

I tried using GUI_UPLOAD and TEXT_CONVERT_XLS_TO_SAP for different file types of XLS, CSV, TXT file types. It is same in cse of these file types.

I tried searching SDN Forums but couldn't find the relevant solution as most of them are facing the same problem.

Friends kindly help me in solving the above issue by your valuable suggestions.

Thanks and Regards

Pradeep Goli

1 ACCEPTED SOLUTION

Former Member
927

Hi,

Check this.. If you want to upload the long texts through excel sheet then you can use this.

Thanks,

Srinu Marapureddi

8 REPLIES 8

former_member404244
Active Contributor
0 Kudos
927

Hi,

How you have declared the internal table for GUI_UPLOAD.. Did you try with string or the number of char you want?

Regards,

Nagaraj

Former Member
0 Kudos
927

Hi,

In your data_tab declaration for gui_upload put your internal table declaration as , for example if 500 char are there then ,

DATA: begin of int_tab occurs 0,

int_data(500) type c,

end of int_tab.

Thanks,

Benson

Former Member
0 Kudos
927

Hi Pradeep,

Please check the length of the respective column or field in the structure used to upload the file.

There is no restriction for field length in GUI_UPLOAD.

Regards,

akshay ruia.

Former Member
0 Kudos
927

Hi,

Check the bellow thread for your requirement.

Regards,

Goutam Kolluru.

Former Member
0 Kudos
927

business they will maintain about greater than 5000 characters of text.

Why do you think you got only 255 characters? Using AL11 or something? Always look at the length of the data in the internal table with the STRLEN or similar function, or a "real" data display tool.

GUI_UPLOAD/DOWNLOAD supports row lengths up to 1024 characters/bytes, while the ancient CG3* transactions support 255 bytes.

For those really wide files, convert your Excel to tab-delimited (if you're starting with Excel file) and you will need to store on Apps server, then use the Open dataset, read dataset into variable described as long enough (type c can be up to 65535), parse into internal table, close dataset, etc.

Then put the texts into an internal table of typeTLINE and utilize the SAVE_TEXT FM, supplying the appropriate header values. If you have really long lines of text, you can parse with FM like RKD_WORD_WRAP, converting to an internal table that you can easily convert to TLINE for the save_text FM call.

Former Member
928

Hi,

Check this.. If you want to upload the long texts through excel sheet then you can use this.

Thanks,

Srinu Marapureddi

0 Kudos
906

I couldn't see if there was any solution posted.

0 Kudos
769

Hello @gdiazcas,

While we're happy that you've come to SAP Community to get an answer to your question, you posted your question as an answer in an old thread. Posting in older threads is not the best way to get guidance.

If you're looking for help, you should start a new discussion instead: https://community.sap.com/t5/application-development-discussions/bd-p/application-developmentforum-b...

Or you can ask a question in our Technology area: https://community.sap.com/t5/technology-q-a/qa-p/technology-questions

Best regards,
Anne