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

How to split an xstring

Former Member
0 Likes
2,600

Hi,

I have an xstring which needs to be split into chunks of 1024 bytes.

how to achieve this?

Thanks in advance,

ajay

8 REPLIES 8
Read only

Former Member
0 Likes
1,417

hi,

Check out the below related thread to understand the same

Regards,

Santosh

Read only

0 Likes
1,417

i saw the thread previously.

The strlen function does not work for xstrings.

Read only

Former Member
0 Likes
1,417

SPLIT dobj AT sep INTO { {result1 result2} | {TABLE resulttab} } (IN {BYTE Or CHARACTER} MODE).

check below syntax for split

hear you can give number of bytes you need to split.

Read only

0 Likes
1,417

Thanks for the reply.

I need to split the xstring based on size and not based on a seperator.

with regards,

ajay

Read only

0 Likes
1,417

use FM

SCMS_XSTRING_TO_BINARY

the table you will pass to BINARY_TAB has to have the following definition.

constants: line_size type i value 1024.

data: begin of binary_tab occurs 0,

raw(line_size) type x,

end of binary_tab .

Read only

0 Likes
1,417

HI Durairaj,

SCMS_XSTRING_TO_BINARY doesn't work as system on the other end is unable to put the xstring back together which was split using the above FM.


Its old post, but would appreciate more clarity.

Any alternative way of splitting the Xstring.


Thanks,

Vikram

Read only

Former Member
0 Likes
1,417

Hi

Go through the link given below :

With Regards

Nikunj Shah

Read only

0 Likes
1,417

This message was moderated.