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

METHOD GUI_UPLOAD PROBLEM

Former Member
0 Likes
617

Hi,

I have used method gui_upload with 'ASC' to get data from excel into my internal table.But when i run the program my report is unreadable.By the way I am using method gui_upload because java doesnt support the function TEXT_CONVERT_XLS_TO_SAP.(Also I have tried 'DAT' and 'TXT' with method gui_upload)

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
581

if you save your excel as txt file separated by tabulator, you can use the f.m. (or the method if you like)

call function 'GUI_UPLOAD'

exporting

filename = l_filename

filetype = 'ASC'

has_field_separator = 'X'

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

dat_mode = 'X'

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • CHECK_BOM = ' '

  • VIRUS_SCAN_PROFILE =

  • NO_AUTH_CHECK = ' '

  • IMPORTING

  • FILELENGTH =

  • HEADER =

tables

data_tab = wt_input[]

regards.

Andrea

4 REPLIES 4
Read only

Former Member
0 Likes
582

if you save your excel as txt file separated by tabulator, you can use the f.m. (or the method if you like)

call function 'GUI_UPLOAD'

exporting

filename = l_filename

filetype = 'ASC'

has_field_separator = 'X'

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

dat_mode = 'X'

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • CHECK_BOM = ' '

  • VIRUS_SCAN_PROFILE =

  • NO_AUTH_CHECK = ' '

  • IMPORTING

  • FILELENGTH =

  • HEADER =

tables

data_tab = wt_input[]

regards.

Andrea

Read only

Former Member
0 Likes
581

Use FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' to upload the data from excel.

[http://wiki.sdn.sap.com/wiki/display/Snippets/Howtouse+FM'ALSM_EXCEL_TO_INTERNAL_TABLE']

Edited by: praveen reddy on Jan 26, 2011 12:01 PM

Read only

Clemenss
Active Contributor
0 Likes
581

Hi Masuke,

please open your excel file in a text editor and see what it looks like - I suppose like your report as described..

I do not know if it is possible to read proprietary Microsoft excel format and convert this into anything that makes sense.

Please search before post. There is so much stuff available.

Regards,

Clemens

Read only

madhu_vadlamani
Active Contributor
0 Likes
581

Dear

Masuke,

Please elaborate your requirement more clear.

Regards,

Madhu.