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

Error while uploading an edited excel file into an internal table

Former Member
0 Likes
1,236

Hi Experts,

I am getting error while uploading an excel file that has been edited.

I am using GUI_UPLOAD for uploading the file into internal table.

In my program I first have to download a file, if I use the same file without editing I am able to read the file.

When I try to edit it and then use it to upload it fails, but this is part of the my requirement.

PLease suggest.

Regards

Kishore

1 ACCEPTED SOLUTION
Read only

former_member224404
Active Participant
0 Likes
1,159

Hi Sumodh,

Can you give us your program snippet.

Thanks,

Mainak

Hi Sumodh,

Can you give us your program snippet.

Thanks,

Mainak

7 REPLIES 7
Read only

SimoneMilesi
Active Contributor
0 Likes
1,159

Please, search the SDN! The forum is full of this kind of request...

">

Read only

0 Likes
1,159

I have searched the form before posting this, I problem I am having here is that I am able to upload using an unedited file.

But when I try after editing the file, the gui_upload fails.

Please suggest for solution.

Rgeards

Kishore

Read only

0 Likes
1,159

When you use gui_download you download a file in a format and you can upload without problem in the same format (not XLS) if you unchange it!

When you change it with excel, the format change and so you need the right FM to upload it.

I bet that excel ask you if you want save the file in the right format when you modify the file.

Solution?->Read the link i posted and use the right FM.

Read only

Former Member
0 Likes
1,159

Hi,

Use the below Fm for uploading the internal table for the excel file.

SAP_CONVERT_TO_XLS_FORMAT

While downloading use 'DAT' format for the filetype in GUI_DOWNLOAD and concatenate '.xls' with filename that you are passing for download.

With Regards,

Sumodh.P

Edited by: Sumodh P on May 11, 2010 4:17 PM

Read only

former_member224404
Active Participant
0 Likes
1,160

Hi Sumodh,

Can you give us your program snippet.

Thanks,

Mainak

Read only

0 Likes
1,159

TYPE-POOLS: truxs.

parameter : lv_full_path TYPE rlgrap-filename,

data : lt_conv_data TYPE truxs_t_text_data,

lt_roles_excel type table of ( your structure).

start-of-selection.

CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'

EXPORTING

i_line_header = 'X'

i_filename = lv_full_path

TABLES

i_tab_sap_data = lt_roles_excel

CHANGING

i_tab_converted_data = lt_conv_data

EXCEPTIONS

conversion_failed = 1

OTHERS = 2.

In the FM Line_header = 'X' means it will negelect the first line. So u can give the heading in the excel file.

Hope this might help u .

With Regards,

Sumodh.P

Read only

christian_grail
Product and Topic Expert
Product and Topic Expert
0 Likes
1,159

We have developed a solution for the "JAVABEANNOTSUPPORTED" error for SAP GUI for HTML and SAP GUI for JAVA.

The solution will be available with SAP S/4HANA Cloud 2305 (SAP_BASIS release 7.92 or newer) and SAP S/4HANA on premise 2023 (SAP_BASIS release 7.58 or newer).

You can find more information about the solution in the following blog entry:

https://blogs.sap.com/2023/03/08/how-to-enable-the-sap-desktop-office-integration-for-sap-gui-for-ht.../