2012 Feb 02 5:52 AM
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
2015 Jun 24 11:21 PM
2012 Feb 02 6:02 AM
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
2012 Feb 02 6:11 AM
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
2012 Feb 02 6:24 AM
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.
2012 Feb 02 6:49 AM
Hi,
Check the bellow thread for your requirement.
Regards,
Goutam Kolluru.
2012 Feb 02 1:33 PM
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.
2015 Jun 24 11:21 PM
2024 Jan 31 10:09 PM
2024 Feb 05 2:04 PM
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