cancel
Showing results for 
Search instead for 
Did you mean: 

File upload

Former Member
0 Kudos

Experts,

I'm using File Upload UI element to upload my excel files.

when I convert the xstring to string I could read only "?#".

Can anyone help me out ??

I used below code to conert xstring to string.

  • Convert XString to String

CALL METHOD cl_abap_conv_in_ce=>create

EXPORTING

input = item_filecontent

encoding = 'UTF-8'

replacement = '?'

ignore_cerr = abap_true

RECEIVING

conv = loc_conv.

*Read the file contents

TRY.

CALL METHOD loc_conv->read

IMPORTING

data = data_string.

CATCH cx_sy_conversion_codepage.

Thanks,

Suba

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi suba ram.....

it happens when you give it directly as an excel... but when you give it as a tab delimited text file, it works fine.

---regards,

alex b justin

Former Member
0 Kudos

Justin,

Thanks for your quick reply.

My requirement is to accept xls(excel) file format.

Any idea, how to do it???

Thanks,

Suba

Former Member
0 Kudos

Hi

Excel upload doesn't work. You can atleast save that in CSV format and then try uploading.

Thank You,

Gajendra.