08-26-2012 11:58 AM
Dear Experts,
I was given a Excel file which contains two columns in which i One column contains description more that 4000 characters
while trying with upload using gui_upload(text) and TEXT_CONVERT_XLS_TO_SAP(excel) , the internal table filed is only having 255 characters uploaded
how to get all the description in to a internal table filed.
Thanks
08-26-2012 2:44 PM
Hi Abhinav,
Define that field as string. I mean the internal table which you are passing to the FM, in that internal table which field you need to be greater than 255 characters define it as string.
try and let me know if you still face the issue.
thanks
Rahul
08-27-2012 6:01 AM
Rahul Thank you for your Response ,
I did the way you said defining fields as string and when uploading ti internal table , the Fm is only fetching 255 chars to the string filed
08-27-2012 7:02 AM
hi Abhinav Nallan,
u can split that field into 2 fields having char length 250 in excel ,using the FM get it into internal table.
after that u can concatenate that field into single field.
thanks,
marimuthu.k
08-27-2012 7:32 AM
hi Abhinav,
if you have longdescription more than 5000 to append it to an interbal table
do likewise,
DATA: DESC1(5000).
DATA: LINT(2000).
first get the Length of the DESC1.
len = strlen( DESC1 ).
MOVE : LEN TO IT_ZFI_CASH-ZLINT2,
DESC1 TO IT_ZFI_CASH-ZLONGTEXT.
APPEND IT_ZFI_CASH.
TO INSERT INTO TABLE
Your table declarations should be like wise...
ZLINT2 | ZLINT2 | INT2 | 5 | 0 | Long text |
ZLONGTEXT | ZLONGTEXT | LCHR | 2000 | 0 | Long text |
________________ | ______________________________ | __________ | ______ | ______ | ____________________________________________________________ |
then insert.
the above logic works i have done it on my requirment.
if you have any doubt get back to me.
thank you,
kata.
08-27-2012 7:33 AM
Hi,
Try the function module 'ALSM_EXCEL_TO_INTERNAL_TABLE'. Which uses the concept of OLE to upload data from excel to internal table.
Thanks and ragards,
Kartik
08-27-2012 4:27 PM