cancel
Showing results for 
Search instead for 
Did you mean: 

Get Content of Uploaded File

Former Member
0 Kudos

hello all,

I create a WDA application for uploading files, waht  Inned now is a FM that convert/give back the content of this File.

it is not an XML file, it is just normal DATA, but I need this Data in an internal Table.

by Debugging, i cann see this DATA when clicking on XML Broser. but i get it alawys as XSTRING forma.

please show me how solve this. how to get this data in internal table as it is writen on the Files.

thank you very much

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You have to convert XSTRING to STRING. Just search for it and you will find the corresponding fm

Former Member
0 Kudos

thanks for help, but i get alawys the data as String, i need it in a table, is there a FM that gives the data back in table ?

I want get the data as it is in the file, without any change of record position

thank you

Former Member
0 Kudos

Do you get the data as XSTRING or STRING?

To convert the values from STRING to TABLE, you could search for FM, but it's not diffcult to cut the string in 20 char steps e.g and append to your table

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,
You have to supply an encoding to tell the system what codepage/unicode type the XSTRING is.

  
data: convin  type ref to cl_abap_conv_in_ce,
      call method cl_abap_conv_in_ce=>create
        exporting
           encoding    = encoding
           input       = buffer
        receiving
          conv        = convin.

      call method convin->read
        importing
          data = text_buffer.

Note : Buffer is the XSTRING, text_buffer is the string.

Or

You can use this FM : HR_KR_XSTRING_TO_STRING

Hope this helps you.

Thanks

KH