Application Development and Automation 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: 
Read only

FUNCTION MODULE TO CONVERT STRING TO XSTRING

Former Member
0 Likes
13,530

HI,

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

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
6,405

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
Read only

Former Member
0 Likes
6,405

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

Read only

Former Member
0 Likes
6,405

chk these 3,

ECATT_CONV_STRING_TO_XSTRING

HR_KR_STRING_TO_XSTRING

SCMS_STRING_TO_XSTRING

Read only

Former Member
0 Likes
6,405

Hi Santosh,

we are working in 4.6c

could not find the FM here.

Any other way to do the conversion.

Thanks

Read only

Former Member
6,406

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 .

Read only

0 Likes
6,405

Hi Santosh,

Thanks you very much