Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

FUNCTION MODULE TO CONVERT STRING TO XSTRING

Former Member
0 Kudos

HI,

CAN ANYONE TELL ME WHATS THE FUNCTION MODULE TO CONVERT STRING TO AN XSTRING.

Thanks

1 ACCEPTED SOLUTION

Former Member

Check out 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 .

5 REPLIES 5

Former Member
0 Kudos

hi,

use the following FM

SCMS_STRING_TO_XSTRING

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'

Regards,

Santosh

Former Member
0 Kudos

chk these 3,

ECATT_CONV_STRING_TO_XSTRING

HR_KR_STRING_TO_XSTRING

SCMS_STRING_TO_XSTRING

Former Member
0 Kudos

Hi Santosh,

we are working in 4.6c

could not find the FM here.

Any other way to do the conversion.

Thanks

Former Member

Check out 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 .

0 Kudos

Hi Santosh,

Thanks you very much