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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.