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

Convert String into Bytes.

Former Member
0 Likes
2,302

Hi All,

I have a situtation where i need to convert string data containing alphanumeric characters.

example:

1234abcd**

  • represents a japanese character.

The above string should be converted into bytes.

The byte length may be 80 bytes.

The requirement is to split the data into 45 bytes for the first variable and rest to another variable.

Regards

PSNG

4 REPLIES 4
Read only

rainer_hbenthal
Active Contributor
0 Likes
1,197

In Unicode it does not make sense to cut off after 45 bytes,

Read only

Former Member
0 Likes
1,197

Hi,

It may not possible to split but to convert you can

Check this Function module SCMS_STRING_TO_XSTRING

Regards and Best wishes.

Read only

agnihotro_sinha2
Active Contributor
0 Likes
1,197

hi,

Though not sure, but isnt the

"SHIFT gv_num by 45 places IN BYTE MODE"

working for your case?

ags.

Read only

Former Member
0 Likes
1,197

Hi All,

Thank you for the quick response.

The FM SCMS_STRING_TO_XSTRING is converting the string data to buffer type.

The requirement is to get the byte length and then to split the string data as per the byte length.

Regards

PSNG

Edited by: PSNG on May 4, 2010 12:06 PM