cancel
Showing results for 
Search instead for 
Did you mean: 

Upload xls file from Web transaction

Former Member

Dear Colleagues,

I created a tile that run my transaction which upload an xls or xlsx file.

When I run my transaction in sap gui, all works fine I can access to data contained in my file, I'm using the FM 'ALSM_EXCEL_TO_INTERNAL_TABLE'.

With HTML usage this FM doesn't work.

Could you please help me to find an API to convert my xls to sap internal table?

Many Thanks in advance,

Kalthoum.

Accepted Solutions (0)

Answers (3)

Answers (3)

matt
Active Contributor

Understand that when you're running a web application, there is no SAPGui. SAPGui handles communications between the application server and the presentation server (your PC). Therefore, when there is no SAPGui (as in a background process, or web applications) any function module that communicates with the presentation server won't work.

If you search, you will find solutions for reading XLSX files programmatically and converting them to internal tables. There are blogs concerning this.

XLS is more difficult as it is not an open standard.

You should also search for convering XLS and XLSX to internal table in background - the same solutions apply as to web applications.

Former Member
0 Kudos

Thanks a lot for your feedback.

I cannot find any solution for my problem.

I found how to convert internal table to XLS, but what I need is how to convert xls or xlsx to internal table using web transaction. Could you pleasse help me?

Many Thanks,

Kalthoum.

former_member365727
Active Contributor

try abap2xlsx

check the demo report ZDEMO_EXCEL15. This reads excel files of format .xslx

hope this works 🙂

Former Member
0 Kudos

Thank you for your feedback!

Where can I find this program? In which system? Can you assist me?

former_member365727
Active Contributor
0 Kudos

you need to install aba2xslx on your system....this shows the demo program

Follow the installation instructions

roberto_forti
Contributor

Hi Kalthoum,

Try these Function Modules

1. CALL FUNCTION 'WWW_LIST_TO_HTML'
... 
2. CALL FUNCTION 'LIST_DOWNLOAD_HTML'
...

Regards,

Former Member
0 Kudos

Hi Roberto,

Thanks a lot for your help.

As importing parameter for this FM LIST_INDEX what shall I put as list_index, I have only the path to my xls file in my program ( my input field to upload the xls file). Could you please clarify to me how I can use this FM on my case?

Many Thanks,

Kalthoum.

matt
Active Contributor
0 Kudos

I'm afraid that Roberto's answer is not relevant to your issue.