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

xstring

Former Member
0 Likes
783

Hello,

how can I create from a normal string a xstring?

Is there a function module for it...?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
721

Check the FM:

<b>HR_KR_STRING_TO_XSTRING

SCMS_STRING_TO_XSTRING</b>

For Xtring to string check:

<b>HR_KR_XSTRING_TO_STRING</b>

Regards,

PRakash.

Message was edited by: Prakash Ramu

6 REPLIES 6
Read only

Former Member
0 Likes
721

...and how can i create from a xstring a string?

Read only

Former Member
0 Likes
721

hi,

chk this FM SCMS_STRING_TO_XSTRING

Read only

Former Member
0 Likes
722

Check the FM:

<b>HR_KR_STRING_TO_XSTRING

SCMS_STRING_TO_XSTRING</b>

For Xtring to string check:

<b>HR_KR_XSTRING_TO_STRING</b>

Regards,

PRakash.

Message was edited by: Prakash Ramu

Read only

0 Likes
721
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 .
Read only

0 Likes
721

Many thanks!

Read only

0 Likes
721

Now I use the function HR_KR_XSTRING_TO_STRING.

I have one string output (output=1bec41bb) and I will change output in a string RESULT, but there is a error.

Is the problem that output is not declare as a xstring?

CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'

EXPORTING

  • FROM_CODEPAGE = OUTPUT

IN_XSTRING = 'KGK

  • OUT_LEN =

  • IMPORTING

OUT_STRING = RESULT.