Ca any one please suggest me some FM (SAP version in 4.6B) for converting String to Xstring..?
I have got the data in w_string in STRING format. The below FM is called in other FM which is created by me. But the requirement is to Export the data in Xstring format.
Convert table to to string
CALL FUNCTION 'CONVERT_TABLE_TO_STRING'
i_tabline_length = '1024'
e_string = w_string
it_table = it_contents.
I will reward points points if helpful.
The following code only works if the unicode validation is switched off:
data: a1(100) type c,
a2(100) type x,
s1 type string, " source
s2 type xstring. " target
s1 = 'My string to convert'.
a1 = s1.
FIELD-SYMBOLS: <char_container> TYPE c.
ASSIGN a2 TO <char_container> CASTING.
<char_container> = a1.
s2 = a2.