Skip to Content
author's profile photo Former Member
Former Member

xstring conversion

Hi ,

I receive text from Portal as xstring . Now in R/3 I need to save this as a standard text .

I can convert xstring to binary .. but how do i convert it to text to be saved as standard text.

Any idea?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 01, 2008 at 09:30 AM

    try this which will convert the xstring to text string

    data: l_convin   type ref to cl_abap_conv_in_ce,
          l_msgstr   type string ,
          l_text type xstring,
          l_html type string .
                   call method cl_abap_conv_in_ce=>create
                       encoding = 'UTF-8'
                       input    = l_text " xstring content received from portal
                       conv     = l_convin.
                   call method l_convin->read
                       data = l_html.
                 catch cx_root.
                   l_msgstr = 'Conversion error'.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.