cancel
Showing results for 
Search instead for 
Did you mean: 

File Upload

Former Member
0 Kudos

HI Friends,

Now im working with file upload. I reffered the standard application wdr_test_events. Now i got the contents in My dynpro application.

But the datas consist of numbers only. How can i get my actual data as stored in my file.

Thanks.

Prakasam.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Now your data's are in Xstring format.

So you can change it to Xstring format to string Format.

DATA : loc_conv TYPE REF TO cl_abap_conv_in_ce,

data_string TYPE 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.

Now your actual datas are stored in variable data_string.

Thanks.

Edited by: Viji on Mar 31, 2008 6:39 AM

Answers (0)