Skip to Content
author's profile photo Former Member
Former Member

How To SPLIT a strin at special char in NON BYTE MODE

Hi there !

Im quite new to ABAP and I'm having a following problem.

I need to parse a Input from a HTML Textarea component which is a ABAP String but can apparantly contain the 0x10, 0x13 line feed special characters. Now, is it possible that I can escape a line feed similar to "\n" in Java/c and use it in a followin way: SPLIT input AT '\n' INTO TABLE tbl. Till now I haven't really found any infos how to handle special chars in ABAP.

thanks a lot

Astrit

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 04, 2004 at 10:16 AM

    Off the top of my head, try:

    DATA:
      BEGIN OF newline,
        hex(2)             TYPE x VALUE '0D0A',
      END OF newline.
    
    * Split content by carriage return (0D) / line-feed (0A)
    SPLIT input AT newline INTO TABLE tab.
    

    This is not unicode compatible.

    Scott

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I had to change the t1 declaration in "TABLE OF STRING" because of the OO-Context and then it worked perfectly.

      Thank's a lot for your support !

      Astrit