Skip to Content
0
Jul 19, 2019 at 08:43 AM

Split a string and also keep the special character which is used, how to do it?

72 Views

Hi,

I have a string and I need to split it at '>'.

  DATA : data_table_3 TYPE  tab_char512,
         str type string.
str = '<abc>data</abc>'
SPLIT str AT '>' INTO TABLE data_table_3.
* Expected output
*<abc>
*data</abc>
* Output I am getting above
*<abc
*data</abc

Please suggest if there is any workaround.

Thanks in advance.