cancel
Showing results for 
Search instead for 
Did you mean: 

Upload Excel File

Former Member
0 Kudos

Hi All ,

I want to upload excel file for that I want to create search help .

So which function module I have to use for Search Help and to upload EXCEL file?

I tried by using F4_FILENAME but its not working .

Regards ,

Rasika

Accepted Solutions (1)

Accepted Solutions (1)

deepak_sharma_sap
Active Participant
0 Kudos

Hi,

Try using Class :  CL_GUI_FRONTEND_SERVICES

Method : FILE_OPEN_DIALOG

Thanks

Deepak

Former Member
0 Kudos

Above method was to create search help .

Now I want to upload excel file ,I am using GUI_UPLOAD FM but it is showing garbage values while uploading excel.

And showing correct data while uploading text file .

Why so ?

Former Member
0 Kudos

Hi Rasika,

Text files are flat file but .xls file are encoded file so it is not possible to read details of it using GUI_UPLOAD. you can go for .csv file format which can be read using GUI_UPLOAD. If you still want to upload .xls file you can search for the same in scn, the only drawback with all the solutions are MS EXCEL should be installed in the presentation server system. If business requirement is excel file then u can restrict it to .xlsx file which is actually a zip file, whose details can read easily using zip utility class. Confirm which solution is ok for u so that i can share complete code...

thanks and regards,

Pramod Kumar Mandal

deepak_sharma_sap
Active Participant
0 Kudos

Hi,

You can use FM : UPLOAD_XLS_FILE_2_ITAB to get the data from your excel file into SAP internal table.

But I would also suggest its better to use TXT or CSV file.

Thanks

Deepak

Answers (0)