cancel
Showing results for 
Search instead for 
Did you mean: 

Excel File Upload Problem

graghavendra_sharma
Contributor
0 Kudos

Hi

I'm trying to upload an excel file. The following code I'm using to get the file name. But it is not giving the file name always. When I debug this code, I got the file name, but when execute this noramally, file name is not coming.

lv_fupld_data ?= cl_htmlb_manager=>get_data(

request = runtime->server->request

name = 'fileupload'

id = 'view_anal_fupld_1').

Could anybody pls help me

Thanks in advance

Raghav

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try this code...

In OnInputProcessing Event:

-


data: conv TYPE REF TO CL_ABAP_CONV_IN_CE.

conv = cl_abap_conv_in_ce=>create( input = f_content ). "content of the file

conv->read( IMPORTING data = content len = len ). "length of the file

split content at cl_abap_char_utilities=>cr_lf into table text_tab1 . " your output table

loop at text_tab1 into wa_text .

split wa_text at cl_abap_char_utilities=>HORIZONTAL_TAB into wa_excel-colum1 wa_excel-column2 ........

append wa_excel to excel_itab

endloop.

Regards,

Azaz Ali.