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: 

Char more than 255 in excel to internal table

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

hi  ,

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

Former Member
0 Kudos

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...

ZLINT2ZLINT2INT250Long text
ZLONGTEXTZLONGTEXTLCHR20000Long 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.

Kartik2
Contributor
0 Kudos

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

Former Member
0 Kudos

Thank you all for your valuable response