Application Development and Automation 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: 
Read only

Problem in Uploading Excel Data ! - Urgent

Former Member
0 Likes
662

Dear Experts,

I am uploading excel data using FM 'TEXT_CONVERT_XLS_TO_SAP' , its directly convert data and store in internal table same as in excel sheet(row , column wise).

But the problem is , one of the column having description more then 500 characters. so while uploding excel to itab its truncating the text and only uploding 255 characters.

Is there any other way , so that i can upload more then 500 characters long text. Also i have tried 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM , it was also not working.

Please Help me , its Urgent.

Points will be rewared.

Thanks & Regards,

Dear Experts,

I am uploading excel data using FM 'TEXT_CONVERT_XLS_TO_SAP' , its directly convert data and store in internal table same as in excel sheet(row , column wise).

But the problem is , one of the column having description more then 500 characters. so while uploding excel to itab its truncating the text and only uploding 255 characters.

Is there any other way , so that i can upload more then 500 characters long text. Also i have tried 'ALSM_EXCEL_TO_INTERNAL_TABLE' FM , it was also not working.

Please Help me , its Urgent.

Points will be rewared.

Thanks & Regards,

3 REPLIES 3
Read only

Former Member
0 Likes
596

Hi,

Please use FM 'GUI_UPLOAD'.


types: begin of ttab,
       rec(1000) type c,
       end of ttab.
 
types: begin of tdat,
       fld1(10) type c,
       fld2(10) type c,
       fld3(10) type c,
       end of tdat.
 
data: itab type table of ttab with header line.
data: idat type table of tdat with header line.
 
data: file_str type string.
 
parameters: p_file type localfile.
 
at selection-screen on value-request for p_file.
  call function 'KD_GET_FILENAME_ON_F4'
       exporting
            static    = 'X'
       changing
            file_name = p_file.
 
start-of-selection.
 
  file_str = p_file.
 
  call function 'GUI_UPLOAD'
       exporting
            filename                = file_str
            filetype                = 'ASC'
       tables
            data_tab                = itab
       exceptions
            file_open_error         = 1
            file_read_error         = 2
            no_batch                = 3
            gui_refuse_filetransfer = 4
            invalid_type            = 5
            no_authority            = 6
            unknown_error           = 7
            bad_data_format         = 8
            header_not_allowed      = 9
            separator_not_allowed   = 10
            header_too_long         = 11
            unknown_dp_error        = 12
            access_denied           = 13
            dp_out_of_memory        = 14
            disk_full               = 15
            dp_timeout              = 16
            others                  = 17.



Best regards,

Prashant

Read only

Former Member
0 Likes
596

Thanks for your reply , but its not working with GUI_UPLOAD FM , i am not able to upload data using this FM , Its uploading garbage from excel file.

can you suggest some other thing !!!

please ...

Read only

Former Member
0 Likes
596

Hi,

Open the Excel File

Click SAVE AS

in the SAVES AS TYPE. select "Text (Tab Delimited).

Save the file

Upload the text file using GUI_UPLOAD.

Best regards,

Prashant