cancel
Showing results for 
Search instead for 
Did you mean: 

How to Convert a String into xstring.

Former Member
0 Kudos

Hi Abapers,

I want to convert a string data to an xstring data. Can anybody help me with some example code.

Regards,

Vinay.

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

use the following FM

SCMS_STRING_TO_XSTRING

Regards

Raja

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Chk out this FM:

SCMS_STRING_TO_XSTRING in release 640.

See this link for sample code and explanation by Thomas Jung:

/people/thomas.jung3/blog/2004/08/09/bsp-download-to-excel-in-unicode-format

***********Convert XSTRING TO STRING*********

CALL FUNCTION 'ECATT_CONV_XSTRING_TO_STRING'

Best Regards,

Anjali

Former Member
0 Kudos

hi,

to convert unicode string into xstring

use HR_KR_STRING_TO_XSTRING..

sample code..

data : in_string type string value 'trial' , length type i,

out_xstring type xstring.

CALL FUNCTION 'HR_KR_STRING_TO_XSTRING'

EXPORTING

unicode_string = in_string

out_len = length

IMPORTING

xstring_stream = out_xstring

EXCEPTIONS

invalid_codepage = 1

.

write : out_xstring .

regards

satesh